Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
4db3307
feat: wire sessionId alongside instanceId on the trace wire
EdwardIrby Sep 24, 2026
dc5fde4
docs: drop stale ACP and Tauri references from comments
EdwardIrby Sep 24, 2026
b372c35
feat: instance lock — pidfile liveness under <home>
EdwardIrby Sep 24, 2026
a224983
feat: the attach lane — unix-socket carrier for the host dispatcher
EdwardIrby Sep 24, 2026
b26ffab
feat: the three TUI primitives — emit, prompt, select
EdwardIrby Sep 24, 2026
391a48b
feat: attach-or-start — the bare behavioral command
EdwardIrby Sep 24, 2026
8af6535
feat: static GUI serving on the instance socket + --dev
EdwardIrby Sep 24, 2026
cd5c20f
refactor: one bundle home — the fixture re-exports the production bun…
EdwardIrby Sep 24, 2026
159038c
feat(shell): the generic fetch-based JSON-RPC 2.0 client
EdwardIrby Sep 25, 2026
8059289
feat(shell): the `rpc` op — a generic remote JSON-RPC transport variant
EdwardIrby Sep 25, 2026
e12df6f
feat(security): the credential-vending skeleton — a dedicated securit…
EdwardIrby Sep 25, 2026
5042228
feat(security): host-supplied ctx on credential_request — the issuer-…
EdwardIrby Sep 25, 2026
4158e4a
feat(shell): the credential seam — vend-and-replay threads wire rpc t…
EdwardIrby Sep 25, 2026
7da427a
feat(shell): the remote-mcp thread pack — deprecate the mcp faculty
EdwardIrby Sep 25, 2026
76a5067
feat: bun randomUUIDv7 for the trace-identity ids
EdwardIrby Sep 25, 2026
186a486
feat: hello-with-id on attach — the host speaks first
EdwardIrby Sep 25, 2026
006f50a
docs: retire the behavioral-tools skill — the code self-documents
EdwardIrby Sep 25, 2026
ee46993
feat(frontier): the add_thread op — frontier-mediated thread admission
EdwardIrby Sep 25, 2026
6174d48
feat(frontier): the admission path end-to-end — candidates go live
EdwardIrby Sep 25, 2026
42752af
docs(design): the shipped DESIGN.md — spec-conformant, light-dark the…
EdwardIrby Sep 26, 2026
4a7a904
feat(system-one): the admission judgment pack — the BP-native blockin…
EdwardIrby Sep 26, 2026
d40f035
feat(system-one): the admission judgment Decision shapes — one home each
EdwardIrby Sep 26, 2026
76c7e93
feat(composition): the judged admission path — candidates wait on the…
EdwardIrby Sep 26, 2026
3daa8e5
docs(skill): behavioral.md — the engine as the code has it
EdwardIrby Sep 26, 2026
c0a1515
docs(skill): controller.md — the ui_* wire and one live surface
EdwardIrby Sep 26, 2026
42dc509
docs(skill): retire the design-spec surface, refresh SKILL routing
EdwardIrby Sep 26, 2026
350f44f
docs(skill): eval.md — the capture-side data contract, reshaped
EdwardIrby Sep 26, 2026
0ce7c6b
docs(design): sync the DESIGN.md body with the full token set
EdwardIrby Sep 26, 2026
7d60f15
docs: sweep the pack vocabulary — thread sets are threads
EdwardIrby Sep 26, 2026
14737c5
test(behavioral): the cascade characterization + overflow specs
EdwardIrby Sep 26, 2026
6e90697
test(behavioral): retire the overflow-completion contract
EdwardIrby Sep 26, 2026
752d7f1
feat(composition): livelock detection is part of adding threads
EdwardIrby Sep 26, 2026
0b83bdf
fix(shell): the failure-path transform gates match only failures
EdwardIrby Sep 26, 2026
7f2f235
fix(shell): the rpc op's error detail carries retryable — the sibling…
EdwardIrby Sep 26, 2026
78b0822
feat(system-one): the supervision threads — the counting breaker, pur…
EdwardIrby Sep 26, 2026
1c57cdd
feat(system-one): block-then-judge + fail-visible — the trip is judge…
EdwardIrby Sep 26, 2026
1bba525
feat(system-one): the supervision recovery threads — bounded judge-re…
EdwardIrby Sep 26, 2026
4755d30
docs: the runtime supervision layer landed — plan + boundaries in sync
EdwardIrby Sep 26, 2026
2e477ac
docs: repoint the stale JSDoc references — AddThread is the type, cre…
EdwardIrby Sep 26, 2026
b186ba0
feat(shell): plugin threads scan under sh.behavioral/threads — the §8…
EdwardIrby Sep 26, 2026
ff0f145
fix(behavioral): space matching is symmetric — an unstamped listener …
EdwardIrby Sep 26, 2026
701606d
feat(shell): the plugin-threads proposal path — worker import, valida…
EdwardIrby Sep 26, 2026
b53bcef
feat(composition): the plugin-thread admission registry — durable dec…
EdwardIrby Sep 26, 2026
9b273e0
docs: the plugin-threads follow-ups landed — boundaries in sync
EdwardIrby Sep 26, 2026
0171243
fix(behavioral): root authority — the unstamped listener sees every s…
EdwardIrby Sep 26, 2026
363fd31
test: the root-authority consumers — guard, supervision, plugin dispa…
EdwardIrby Sep 26, 2026
d530975
docs: the root-authority sync — the skill reference and the supervisi…
EdwardIrby Sep 26, 2026
1b2614a
feat(composition): the ui_* producer threads' design tenant — the DES…
EdwardIrby Sep 26, 2026
cdcd0b7
feat(composition): the ui_* producer threads' scale preflight — block…
EdwardIrby Sep 26, 2026
6382363
feat(composition): the ui_* producer threads' generation lane — syste…
EdwardIrby Sep 26, 2026
203a515
feat(composition): the ui autoresearch loop — the raw capture + the f…
EdwardIrby Sep 26, 2026
30c93a9
feat: per-trigger ui pipelines — dispatcher + minted once-thread sets
EdwardIrby Sep 26, 2026
b8ce892
feat: the ui generation config seam — provider/modelId via bProgram
EdwardIrby Sep 26, 2026
3fad5c9
feat: the artifact serving seam — scoped ui_style egress
EdwardIrby Sep 26, 2026
731d268
test: the CI-hardened fixtures — the admitted self-sustainer and the …
EdwardIrby Sep 26, 2026
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
57 changes: 45 additions & 12 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,26 +93,41 @@ faculties), plus its `tests/`:
`configSystemTwo(respond)` wires it, `useSystemTwo({ endpoints })` seeds the
endpoint map
- `system-one/` — TypeSafe/OpenRouter Decisions; `configSystemOne` +
`useSystemOne({ endpoint })`, with 429/529 retry
`useSystemOne({ endpoint })`, with 429/529 retry; `threads.ts` — the
admission judgment threads (the BP-native blocking judge over the Decisions
lane; the composition mounts it when systemOne is wired) and the supervision
threads (the runtime circuit breaker — the counting supervisor, its
block-then-judge verdict, and its recovery; `bProgram({ supervision })`
mounts the pack with systemOne when the host names watched types; a
root-mounted supervisor's block is global — one space's runaway loop halts
the watched type everywhere — while a space-stamped supervisor set
confines, expressible but not built)
- `shell/` — bun-direct script execution — `run` op TS scripts via `bun run -`,
`shell` op Bun Shell commands through the wrapper; temp-file payloads over
~100KB, deleted on every exit
`shell` op Bun Shell commands through the wrapper; `rpc` op generic remote
JSON-RPC (the remote-mcp layering is the threads, not the op);
temp-file payloads over ~100KB, deleted on every exit
- `store/` — durable space-scoped persistence
- `mcp/` — remote MCP connections/sessions/auth; `keychain-oauth-provider.ts`
is the MCP OAuth `BunKeychain` over `Bun.secrets` plus the issuer-binding v2
provider (faculty-only: nothing outside `mcp/` imports it)
- `security/` — the cross-cutting credential/policy faculty:
`keychain-oauth-provider.ts` is the issuer-bound OAuth `BunKeychain` over
`Bun.secrets` (SDK-free plain types in `security/types.ts`); the faculty
vends `credential_request` → `credential_result` (broker env-data first,
keychain floor second) — consumers are shell (remote MCP), system-two, ATProto
- `frontier/` — the in-process embed — imported and driven by the composition;
standalone spawns are a compatibility entry
Each faculty owns its event types + input boundary; results echo the request
`space`; op runners errors-as-data.
**`src/tools/`** — deleted (fleet 0): the ICL conversion retired the CLI tool
fleet. mcp-client is the mcp faculty (`src/faculties/mcp/faculty.ts`);
fleet. Remote MCP is remote-mcp threads over the shell faculty's
generic `rpc` op (`src/faculties/shell/remote-mcp.threads.ts` — the retired
`mcp` faculty's replacement; the official SDK dependency is gone);
skill/plugin operations are the shell faculty's threads
(`src/faculties/shell/threads.ts`) + recipes + store, taught by
`skills/skill-conventions/`.
(`src/faculties/shell/threads.ts` + `src/faculties/shell/plugin-threads.threads.ts` —
the plugin-thread proposal path: a host proposal → worker import → engine-ThreadSchema
validation → one `add_thread` candidate per validated export) + recipes + store,
taught by `skills/skill-conventions/`.
**`src/faculties.ts`** — the faculties public surface (package export `./faculties`): the
`Faculty` union, the wire types + JSON schemas/validators (`faculties.types.ts`), the override thread
threads (`shellThreads`, `mcpThreads`), their schemas/types, `useFaculty`, and the
threads (`shellThreads`), their schemas/types, `useFaculty`, and the
System One/Two config surface (`configSystemOne`/`useSystemOne`,
`configSystemTwo`/`useSystemTwo`) — what a
`config.ts` imports to compose. (`facultiesThreads`, the default root threads, is internal.) The runtime composition itself is `src/cli/b-program.ts`.
Expand All @@ -137,11 +152,29 @@ fleet (0 tools); turn/config commands land here as the composition rulings build
JSON-RPC IPC host lives here too: `b-program.ts` (the runtime composition, `bProgram`),
`json-rpc.ts` (the line codec), `serve.ts` (the `serve`
entry — ingress messages → triggers, `ui_*` selections → client notifications, redacted
traces out), `load-config.ts` (`<BEHAVIORAL_HOME>/config.ts`), and `trace-consumer.ts`.
traces out), `load-config.ts` (`<BEHAVIORAL_HOME>/config.ts`), `trace-consumer.ts`, and
`plugin-thread-registry.ts` (the plugin-thread admission registry under `<home>` —
host-local, keyed (plugin, file, content hash, space): `bProgram` mounts admitted
snapshots at boot, decided keys never re-adjudicate), and `ui-threads.ts` (the
`ui_*` producer threads — the view-generation policy: the standing design.md
scan → store tenant + artifact compile + render gate, plus the per-trigger
pipeline factory `uiPipelineThreads` (six once-threads minted by b-program's
pump on each `render` ingress — scale preflight, generation, `ui_render`,
the scoped `ui_style` serving seam, every correlation id per-trigger); mounted with shell + store + systemTwo,
composition territory — no process, not a faculty), and `ui-capture.ts` (the
autoresearch loop's capture side — the in-process lineage-keyed raw run
consumer + the frontier replay builder; the socket host wires its file sink
under `<home>/captures`).
**`src/utils/`** — shared pure utilities.
**`src/faculties/<faculty>/threads.ts`** — faculty threads: `shell/threads.ts`
(the ICL threads — skill/plugin scans, catalog/manifest schema gates, links dispatchers
+ stored recipes) and `mcp/threads.ts` (the auth replay spine). Threads ship with
+ stored recipes), `shell/rpc-auth.threads.ts` (the credential vend-and-replay
spine), `shell/remote-mcp.threads.ts` (the MCP layering over the rpc op),
`shell/plugin-threads.threads.ts` (the plugin-thread proposal path — dispatcher,
import join, candidate carry, add_thread dispatch), and
`system-one/threads.ts` (the admission judgment threads + the supervision
threads — the runtime circuit breaker, its judgment, and its recovery).
Threads ship with
their faculty; `bProgram` mounts the faculty's threads when the faculty and its required
faculties are on — except `faculties.threads.ts`, the composition's **root guard
threads**, always mounted regardless of the allow-list. The
Expand Down
9 changes: 9 additions & 0 deletions bin/behavioral.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ export const runCli = makeCliRouter({
await init(args)
},
},
// The bare command is attach-or-start: attach to a running instance over
// <home>/instance.sock, or start the foreground instance. --dev is a
// start-time flag: it configures the instance THIS process starts; an
// attaching process cannot flip a running instance. Lazy: --help and
// the subcommands must not load the composition graph until invoked.
default: async (args: string[]) => {
const { attachOrStart } = await import('../src/cli/attach-or-start.ts')
await attachOrStart({ dev: args.includes('--dev') })
},
})

await runCli(Bun.argv)
28 changes: 1 addition & 27 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@
"@biomejs/biome": "2.5.12",
"@commitlint/cli": "21.2.2",
"@commitlint/config-conventional": "21.2.2",
"@modelcontextprotocol/client": "^2.0.0",
"@modelcontextprotocol/server": "^2.0.0",
"@types/bun": "^1.4.1",
"@webref/css": "^8.7.4",
"commitlint": "21.2.2",
Expand Down
33 changes: 0 additions & 33 deletions skills/behavioral-tools/SKILL.md

This file was deleted.

Loading
Loading