Skip to content
This repository was archived by the owner on Aug 19, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .agents/skills/summon/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ handlers, network, credentials, state, grants, and the selected `SurfacePlan`.
Generated artifacts must not emit or widen `/surface-plan`.

New generation servers should prefer `runSurfaceGeneration(input, emit)` from
`@summon/server`; `generateSurfaceStream()` remains available for existing
async-generator integrations. Applications should consume built package exports,
not `src/*.ts` paths.
`@anarchitecture/summon-server`; `generateSurfaceStream()` remains available for
existing async-generator integrations. Applications should consume built public
package exports, not `src/*.ts` paths or `@summon-internal/*` packages.

Use `defineAction` and `defineDataResource` for common host-backed
interactivity. Use `defineWorkerAction` / `defineWorkerResource` for host-owned
Expand Down
9 changes: 9 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Changesets

This folder tracks public package versioning for:

- `@anarchitecture/summon`
- `@anarchitecture/summon-server`
- `@anarchitecture/summon-react`

Private `@summon-internal/*` workspaces and demo apps are ignored.
20 changes: 20 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.4/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "block/summon" }],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [
"@summon-internal/devtools",
"@summon-internal/engine",
"@summon-internal/host",
"@summon-internal/react",
"@summon-internal/sandbox-runtime",
"@summon-internal/server",
"@summon-internal/demo",
"@summon-internal/demo-server"
]
}
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
- run: pnpm typecheck
- run: pnpm test
- run: pnpm build
- run: pnpm check:public-packages
- run: pnpm pack:dry-run

safety:
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Release

on:
push:
branches: [main]
workflow_dispatch:

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false

permissions:
contents: write
pull-requests: write
id-token: write

jobs:
release:
name: Version or publish
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0

- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
cache: pnpm
registry-url: https://registry.npmjs.org

- run: pnpm install --frozen-lockfile

- run: pnpm build

- run: pnpm check:public-packages

- name: Create Release PR or publish
uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0
with:
publish: pnpm release
version: pnpm changeset version
commit: "chore: version packages"
title: "chore: version packages"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
NPM_TOKEN: ${{ secrets.SUMMON_NPM_PUBLISH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.SUMMON_NPM_PUBLISH_TOKEN }}
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
registry=https://registry.npmjs.org/
link-workspace-packages=true
auto-install-peers=false
40 changes: 23 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@ network, credentials, state, handlers, grants, and persistence.

## Project Status: Beta

Summon is pre-1.0 and under active development. The protocol, package layout,
workspace package names, generated-surface contract, and public JavaScript
exports may change before a stable release.
Summon is pre-1.0 and under active development. The protocol,
generated-surface contract, and public JavaScript exports may change before a
stable release.

This initial public import keeps the existing `@summon/*` workspace package
names. Public npm packaging will be introduced in a follow-up change.
The public package boundary is:

```txt
@anarchitecture/summon
@anarchitecture/summon-server
@anarchitecture/summon-react
```

## Quickstart

Expand Down Expand Up @@ -75,20 +80,21 @@ generation starts. The model sees that plan as a contract but cannot widen it.
sandbox description.
- `/fatal.html` - sandbox startup failure handling.

## Public Packages

- `@anarchitecture/summon` - core protocol, validation, surface plans, policy,
browser sandbox host, runtime assets, envelopes, and Devtools events.
- `@anarchitecture/summon-server` - provider-neutral generation lifecycle,
repair, summaries, and model-provider interfaces.
- `@anarchitecture/summon-react` - `SummonSurface` and React component island
adapter. `react` and `react-dom` are peer dependencies.

## Workspace Map

- `packages/sandbox-runtime` - built `bootstrap.js`, `tokens.css`, and
`@summon/sandbox-runtime/assets` string exports for non-Vite consumers.
- `packages/host` - policy, capability registry, envelope helpers, and the
browser-only `spawnSandbox` iframe primitive.
- `packages/engine` - protocol constants/parsers, `SectionAccumulator`,
`StreamGraph`, contract compilers, protocol hardener, token validation, and
parser-based runtime validation.
- `packages/devtools` - `EventStore` and typed lifecycle, protocol, intent,
state, render, and stream-graph events.
- `packages/react` - controlled `SummonSurface` component for React hosts.
- `packages/server` - provider-neutral generation primitives; no Express
routes.
- `packages/summon*` - public package facades.
- `packages/engine`, `packages/host`, `packages/devtools`,
`packages/sandbox-runtime`, `packages/server`, `packages/react` - private
implementation workspaces published only through the public facades.
- `apps/server` - Anthropic-backed demo server, direction loading, repair
feedback, and demo backing routes.
- `apps/demo` - Vite host app for generation, batch runs, adversarial checks,
Expand Down
11 changes: 4 additions & 7 deletions apps/demo/package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
{
"name": "@summon/demo",
"name": "@summon-internal/demo",
"version": "0.0.1",
"private": true,
"type": "module",
"scripts": {
"dev": "pnpm --filter @summon/devtools --filter @summon/engine --filter @summon/host --filter @summon/sandbox-runtime build && vite",
"build": "pnpm --filter @summon/devtools --filter @summon/engine --filter @summon/host --filter @summon/sandbox-runtime build && vite build",
"dev": "pnpm --filter @summon-internal/devtools --filter @summon-internal/engine --filter @summon-internal/host --filter @summon-internal/sandbox-runtime build && pnpm --filter @anarchitecture/summon build && vite",
"build": "pnpm --filter @summon-internal/devtools --filter @summon-internal/engine --filter @summon-internal/host --filter @summon-internal/sandbox-runtime build && pnpm --filter @anarchitecture/summon build && vite build",
"preview": "vite preview",
"test": "tsx --test src/*.test.ts",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@summon/devtools": "workspace:*",
"@summon/engine": "workspace:*",
"@summon/host": "workspace:*",
"@summon/sandbox-runtime": "workspace:*",
"@anarchitecture/summon": "workspace:*",
"zod": "^3.23.0"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions apps/demo/src/batch-main.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { spawnSandbox, PolicyEngine, type SandboxHandle } from '@summon/host';
import { spawnSandbox, PolicyEngine, type SandboxHandle } from '@anarchitecture/summon';
import {
parseProtocolLine,
SectionAccumulator,
type CapabilityPack,
type ValidationCapability,
} from '@summon/engine';
import bootstrapSource from '@summon/sandbox-runtime/bootstrap.js?raw';
import defaultTokensSource from '@summon/sandbox-runtime/tokens.css?raw';
} from '@anarchitecture/summon';
import bootstrapSource from '@anarchitecture/summon/bootstrap.js?raw';
import defaultTokensSource from '@anarchitecture/summon/tokens.css?raw';
import { ALL_PROMPTS, sample } from './prompts.js';
import { createDemoCapabilityRegistry } from './capabilities.js';

Expand Down
2 changes: 1 addition & 1 deletion apps/demo/src/capabilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
type CapabilityDefinition,
type CapabilityRegistry,
type IntentHandler,
} from '@summon/host';
} from '@anarchitecture/summon';
import { z } from 'zod';

const logArgsSchema = z.object({ payload: z.any().optional() }).passthrough();
Expand Down
4 changes: 2 additions & 2 deletions apps/demo/src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {
defineComponent,
type ComponentDefinition,
type ComponentRegistry,
} from '@summon/host';
import type { ComponentPack } from '@summon/engine';
} from '@anarchitecture/summon';
import type { ComponentPack } from '@anarchitecture/summon';
import { z } from 'zod';

const metricCardPropsSchema = z.object({
Expand Down
4 changes: 2 additions & 2 deletions apps/demo/src/fatal-main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import bootstrapSource from '@summon/sandbox-runtime/bootstrap.js?raw';
import tokensSource from '@summon/sandbox-runtime/tokens.css?raw';
import bootstrapSource from '@anarchitecture/summon/bootstrap.js?raw';
import tokensSource from '@anarchitecture/summon/tokens.css?raw';

/**
* Self-test harness. We deliberately drive the bootstrap into two iframes:
Expand Down
10 changes: 5 additions & 5 deletions apps/demo/src/generate-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
type SurfaceStreamContext,
type SurfaceStreamResult,
type SurfaceEnvelope,
} from '@summon/host';
} from '@anarchitecture/summon';
import {
deriveSurfacePlanControls,
normalizeSurfacePlan,
Expand All @@ -30,10 +30,10 @@ import {
type SummonLayout,
type ValidationCapability,
type ValidationComponent,
} from '@summon/engine';
import { createEventStore, type DevtoolsEvent } from '@summon/devtools';
import bootstrapSource from '@summon/sandbox-runtime/bootstrap.js?raw';
import defaultTokensSource from '@summon/sandbox-runtime/tokens.css?raw';
} from '@anarchitecture/summon';
import { createEventStore, type DevtoolsEvent } from '@anarchitecture/summon/devtools';
import bootstrapSource from '@anarchitecture/summon/bootstrap.js?raw';
import defaultTokensSource from '@anarchitecture/summon/tokens.css?raw';
import {
createGhostShowcaseScenario,
createScopedDemoRegistry,
Expand Down
6 changes: 3 additions & 3 deletions apps/demo/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { spawnSandbox } from '@summon/host';
import bootstrapSource from '@summon/sandbox-runtime/bootstrap.js?raw';
import tokensSource from '@summon/sandbox-runtime/tokens.css?raw';
import { spawnSandbox } from '@anarchitecture/summon';
import bootstrapSource from '@anarchitecture/summon/bootstrap.js?raw';
import tokensSource from '@anarchitecture/summon/tokens.css?raw';
import { ADVERSARIAL_BODY_HTML } from './adversarial-artifact.js';

const iframe = document.getElementById('sandbox') as HTMLIFrameElement;
Expand Down
2 changes: 1 addition & 1 deletion apps/demo/src/showcase.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assert from 'node:assert/strict';
import test from 'node:test';
import { deriveSurfacePlanControls } from '@summon/engine';
import { deriveSurfacePlanControls } from '@anarchitecture/summon';
import {
createScopedDemoRegistry,
narrowCapabilityPack,
Expand Down
4 changes: 2 additions & 2 deletions apps/demo/src/showcase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import type {
ScriptPolicy,
SurfacePlan,
SurfacePlanMode,
} from '@summon/engine';
import type { CapabilityRegistry } from '@summon/host';
} from '@anarchitecture/summon';
import type { CapabilityRegistry } from '@anarchitecture/summon';
import { createDemoCapabilityRegistry, type DemoHandlerOptions } from './capabilities.js';

export type Mode = SurfacePlanMode;
Expand Down
6 changes: 3 additions & 3 deletions apps/demo/src/strict-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import {
createStrictInputRegistry,
type SandboxHandle,
type StrictInputController,
} from '@summon/host';
import bootstrapSource from '@summon/sandbox-runtime/bootstrap.js?raw';
import tokensSource from '@summon/sandbox-runtime/tokens.css?raw';
} from '@anarchitecture/summon';
import bootstrapSource from '@anarchitecture/summon/bootstrap.js?raw';
import tokensSource from '@anarchitecture/summon/tokens.css?raw';
import { STRICT_DEMO_BODY_HTML } from './strict-demo-artifact.js';

const iframe = document.getElementById('sandbox') as HTMLIFrameElement;
Expand Down
8 changes: 4 additions & 4 deletions apps/server/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@summon/demo-server",
"name": "@summon-internal/demo-server",
"version": "0.0.1",
"private": true,
"type": "module",
Expand All @@ -12,10 +12,10 @@
"dependencies": {
"@anarchitecture/ghost": "^0.2.0",
"@anthropic-ai/sdk": "^0.88.0",
"@summon/engine": "workspace:*",
"@summon/server": "workspace:*",
"cors": "^2.8.5",
"express": "^4.22.1"
"express": "^4.21.2",
"@anarchitecture/summon": "workspace:*",
"@anarchitecture/summon-server": "workspace:*"
},
"devDependencies": {
"@types/cors": "^2.8.17",
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/capability-pack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
type CapabilitySurface,
type CapabilityTrigger,
type IntentSpec,
} from '@summon/engine';
} from '@anarchitecture/summon';

/**
* Validate a capability pack sent by the client. The server is intent-agnostic
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/component-pack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type {
ComponentPack,
ComponentSizing,
ComponentSurface,
} from '@summon/engine';
} from '@anarchitecture/summon';

/**
* Validate a component pack sent by the client. The server remains renderer
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/directions-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
compileDirectionContract,
coerceOpts,
type DirectionOpts,
} from '@summon/engine';
} from '@anarchitecture/summon';

export const PREFERRED_DEFAULT_DIRECTION_ID = 'ghost';

Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/generate-route.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { createServer, type IncomingMessage } from 'node:http';
import { dirname, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import test from 'node:test';
import type { CapabilityPack, ProtocolLine, SurfaceCeiling, SurfacePlan } from '@summon/engine';
import type { CapabilityPack, ProtocolLine, SurfaceCeiling, SurfacePlan } from '@anarchitecture/summon';

const here = dirname(fileURLToPath(import.meta.url));
const packageRoot = resolve(here, '..');
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/ghost-adapter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe('Ghost adapter', () => {
const ctx = await resolveGhostContext(parsed.request, roots);

assert.equal(ctx.tokenSource.kind, 'summon-default');
assert.equal(ctx.tokenSource.source, '@summon/sandbox-runtime/tokens.css');
assert.equal(ctx.tokenSource.source, '@anarchitecture/summon/tokens.css');
assert.match(ctx.tokenSource.css, /--color-bg:/);
assert.ok(ctx.tokenSource.warnings.some((warning) => warning.includes('failed token contract')));
});
Expand Down
4 changes: 2 additions & 2 deletions apps/server/src/ghost-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
type GhostMemoryStackLayer,
type PackageMemory,
} from '@anarchitecture/ghost/scan';
import { compileTokenContract, type ProtocolLine } from '@summon/engine';
import { compileTokenContract, type ProtocolLine } from '@anarchitecture/summon';
import { existsSync, readFileSync, statSync } from 'node:fs';
import { mkdtemp, readFile, rm } from 'node:fs/promises';
import { tmpdir } from 'node:os';
Expand Down Expand Up @@ -395,7 +395,7 @@ async function resolveGhostTokenSource(
}
return {
kind: 'summon-default',
source: '@summon/sandbox-runtime/tokens.css',
source: '@anarchitecture/summon/tokens.css',
css: DEFAULT_TOKENS_CSS,
warnings: [
...warnings,
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/infer-capabilities.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Anthropic from '@anthropic-ai/sdk';
import type { CapabilityPack } from '@summon/engine';
import type { CapabilityPack } from '@anarchitecture/summon';

export interface InferenceResult {
/** Narrowed pack — never wider than the ceiling. Null when mode is static. */
Expand Down
Loading
Loading