@north-light/crouter 0.3.353 → 0.3.354
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/client.d.ts +35 -25
- package/dist/api/client.js +2 -2
- package/dist/api/dto/broker-ops.d.ts +2 -36
- package/dist/api/dto/canvas.d.ts +8 -13
- package/dist/api/dto/config.d.ts +4 -0
- package/dist/api/dto/delivery.d.ts +61 -0
- package/dist/api/dto/docs.d.ts +133 -0
- package/dist/api/dto/docs.js +1 -0
- package/dist/api/dto/health.d.ts +26 -79
- package/dist/api/dto/node-outcomes.d.ts +1 -3
- package/dist/api/dto/nodes.d.ts +5 -26
- package/dist/api/dto/objects.d.ts +167 -0
- package/dist/api/dto/objects.js +1 -0
- package/dist/api/dto/profiles.d.ts +14 -8
- package/dist/api/dto/reports.d.ts +9 -7
- package/dist/api/dto/reviews.d.ts +9 -3
- package/dist/api/dto/worktree.d.ts +1 -1
- package/dist/api/index.d.ts +0 -1
- package/dist/api/index.js +1 -1
- package/dist/api/routes.d.ts +14 -12
- package/dist/api/routes.js +1 -1
- package/dist/build-root.js +1 -1
- package/dist/builtin-memory/00-runtime-base/00-authoring.md +10 -5
- package/dist/builtin-memory/04-orchestration-kernel.md +7 -7
- package/dist/builtin-memory/05-kinds/advisor/01-orchestrator.md +1 -1
- package/dist/builtin-memory/05-kinds/explore/00-base.md +2 -2
- package/dist/builtin-memory/05-kinds/explore/01-orchestrator.md +2 -2
- package/dist/builtin-memory/crouter-concepts/INDEX.md +2 -2
- package/dist/builtin-memory/crouter-concepts/lifecycle-and-wakes.md +1 -1
- package/dist/builtin-memory/crouter-concepts/memory.md +15 -15
- package/dist/builtin-memory/crouter-concepts/nodes-and-the-canvas.md +1 -1
- package/dist/builtin-memory/crouter-concepts/profiles-kinds-and-modes.md +5 -5
- package/dist/builtin-memory/crouter-concepts/scopes-and-trust.md +1 -1
- package/dist/builtin-memory/crouter-concepts/why-a-daemon.md +1 -1
- package/dist/builtin-memory/crouter-sdk/INDEX.md +2 -2
- package/dist/builtin-memory/crouter-sdk/README.md +5 -6
- package/dist/builtin-memory/crouter-sdk/errors.md +0 -13
- package/dist/builtin-memory/crouter-sdk/guides/README.md +0 -1
- package/dist/builtin-memory/crouter-sdk/guides/event-driven-assistant.md +2 -2
- package/dist/builtin-memory/crouter-sdk/nodes.md +0 -2
- package/dist/builtin-memory/crouter-sdk/resources.md +0 -1
- package/dist/builtin-memory/explore/exploration-doc.md +4 -4
- package/dist/builtin-memory/insights/capture.md +6 -6
- package/dist/builtin-memory/insights/init.md +14 -14
- package/dist/builtin-memory/internal/INDEX.md +4 -4
- package/dist/builtin-memory/internal/agent-shaping.md +20 -20
- package/dist/builtin-memory/internal/examples/imessage-assistant.md +2 -2
- package/dist/builtin-memory/internal/marketplaces.md +2 -2
- package/dist/builtin-memory/internal/memory-loading.md +31 -30
- package/dist/builtin-memory/internal/nodes-and-canvas.md +1 -1
- package/dist/builtin-memory/internal/plugins.md +16 -14
- package/dist/builtin-memory/internal/storage-tiers.md +4 -4
- package/dist/builtin-memory/memory-read-orientation.md +1 -1
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/memory-slash-commands.ts +32 -40
- package/dist/clients/attach/input/controller.js +1 -1
- package/dist/clients/attach/input/ref-autocomplete.js +1 -1
- package/dist/clients/attach/input/titled-editor.js +1 -1
- package/dist/clients/attach/render/chat-view.js +1 -1
- package/dist/clients/attach/render/crtr-output.d.ts +1 -2
- package/dist/clients/attach/render/crtr-output.js +17 -17
- package/dist/clients/attach/render/group-activity.d.ts +8 -8
- package/dist/clients/attach/render/group-activity.js +2 -2
- package/dist/clients/attach/render/group-recap.js +1 -1
- package/dist/clients/attach/render/tool-calls.d.ts +1 -1
- package/dist/clients/attach/session/profile-files.js +1 -1
- package/dist/clients/attach/slash/dispatch.js +1 -1
- package/dist/clients/attach/viewer.js +806 -1553
- package/dist/commands/api-client.d.ts +2 -0
- package/dist/commands/api-client.js +3 -3
- package/dist/commands/canvas/edges.d.ts +2 -0
- package/dist/commands/canvas/edges.js +2 -0
- package/dist/commands/canvas/list.d.ts +4 -0
- package/dist/commands/canvas/list.js +3 -0
- package/dist/commands/canvas/read.d.ts +8 -0
- package/dist/commands/canvas/read.js +5 -0
- package/dist/commands/canvas/search.d.ts +2 -0
- package/dist/commands/canvas/search.js +3 -0
- package/dist/commands/canvas/unwatch.d.ts +2 -0
- package/dist/commands/canvas/unwatch.js +1 -0
- package/dist/commands/canvas/watch.d.ts +3 -0
- package/dist/commands/canvas/watch.js +1 -0
- package/dist/commands/canvas-analytics.js +1 -1
- package/dist/commands/canvas-history/grep.js +4 -4
- package/dist/commands/canvas-history/read.js +2 -2
- package/dist/commands/canvas-history/search.js +7 -7
- package/dist/commands/canvas-history/shared.d.ts +0 -1
- package/dist/commands/canvas-history/shared.js +1 -1
- package/dist/commands/canvas-history/stats.js +2 -2
- package/dist/commands/canvas-history.js +1 -1
- package/dist/commands/canvas.js +1 -1
- package/dist/commands/doc/delete.d.ts +2 -0
- package/dist/commands/doc/delete.js +1 -0
- package/dist/commands/doc/edit.d.ts +2 -0
- package/dist/commands/doc/edit.js +1 -0
- package/dist/commands/doc/history.d.ts +2 -0
- package/dist/commands/doc/history.js +2 -0
- package/dist/commands/doc/lint.d.ts +2 -0
- package/dist/commands/doc/lint.js +2 -0
- package/dist/commands/doc/list.d.ts +2 -0
- package/dist/commands/doc/list.js +1 -0
- package/dist/commands/doc/move.d.ts +2 -0
- package/dist/commands/doc/move.js +1 -0
- package/dist/commands/doc/read.d.ts +2 -0
- package/dist/commands/doc/read.js +1 -0
- package/dist/commands/doc/shared.d.ts +25 -0
- package/dist/commands/doc/shared.js +2 -0
- package/dist/commands/doc/write.d.ts +2 -0
- package/dist/commands/doc/write.js +1 -0
- package/dist/commands/{memory.d.ts → doc.d.ts} +1 -1
- package/dist/commands/doc.js +1 -0
- package/dist/commands/human/review.js +1 -1
- package/dist/commands/node/bash.js +2 -2
- package/dist/commands/node/create.js +1 -1
- package/dist/commands/node/inspect.js +10 -10
- package/dist/commands/node/lifecycle.js +2 -2
- package/dist/commands/node/outcome.js +1 -1
- package/dist/commands/node/subscription.js +1 -1
- package/dist/commands/node-context.js +2 -2
- package/dist/commands/pkg/browse/catalog.js +1 -1
- package/dist/commands/pkg/browse/doc-view.js +1 -1
- package/dist/commands/pkg/browse/model.d.ts +9 -17
- package/dist/commands/pkg/plugin-inspect.js +1 -1
- package/dist/commands/pkg/plugin-manage.d.ts +4 -8
- package/dist/commands/pkg/plugin-manage.js +15 -17
- package/dist/commands/profile/list.js +1 -1
- package/dist/commands/profile/new.js +1 -1
- package/dist/commands/profile/project.js +1 -1
- package/dist/commands/profile/show.js +1 -1
- package/dist/commands/push.js +3 -3
- package/dist/commands/sys/config.js +1 -1
- package/dist/commands/sys/context/admin/actions.d.ts +18 -43
- package/dist/commands/sys/context/admin/actions.js +1 -2
- package/dist/commands/sys/context/admin/detail-panel.d.ts +17 -25
- package/dist/commands/sys/context/admin/detail-panel.js +2 -1
- package/dist/commands/sys/context/admin/docs-panel.d.ts +7 -6
- package/dist/commands/sys/context/admin/docs-panel.js +1 -1
- package/dist/commands/sys/context/admin/list-view.d.ts +12 -12
- package/dist/commands/sys/context/admin/list-view.js +1 -1
- package/dist/commands/sys/context/admin/model.d.ts +96 -69
- package/dist/commands/sys/context/admin/model.js +1 -1
- package/dist/commands/sys/context/admin/rail-panel.d.ts +7 -5
- package/dist/commands/sys/context/admin/rail-panel.js +1 -1
- package/dist/commands/sys/context/admin/read-view.d.ts +10 -14
- package/dist/commands/sys/context/admin/read-view.js +1 -2
- package/dist/commands/sys/context/admin/shell.d.ts +26 -31
- package/dist/commands/sys/context/admin/shell.js +1 -1
- package/dist/commands/sys/context/admin.js +2 -2
- package/dist/commands/sys/context/doc.js +2 -3
- package/dist/commands/sys/context/expose.js +2 -2
- package/dist/commands/sys/context/prompt-review.js +4 -4
- package/dist/commands/sys/context/resolve.d.ts +92 -65
- package/dist/commands/sys/context/resolve.js +7 -9
- package/dist/commands/sys/context.js +1 -1
- package/dist/commands/sys/doctor.js +1 -1
- package/dist/commands/sys/migrate.js +1 -1
- package/dist/commands/sys/panels/profiles-panel.d.ts +3 -1
- package/dist/commands/sys/panels/profiles-panel.js +1 -1
- package/dist/commands/sys/sync-deps.d.ts +6 -11
- package/dist/commands/sys/sync-deps.js +7 -8
- package/dist/commands/sys/sync-project-guidance.js +5 -4
- package/dist/commands/sys/sync-shared.d.ts +41 -4
- package/dist/commands/sys/sync-shared.js +1 -1
- package/dist/commands/sys/sync-skills.js +2 -2
- package/dist/commands/sys/sync.js +1 -1
- package/dist/core/bash-job-supervisor.d.ts +2 -3
- package/dist/core/bash-job-supervisor.js +3 -3
- package/dist/core/bash-jobs.d.ts +0 -5
- package/dist/core/bash-jobs.js +7 -7
- package/dist/core/bootstrap.js +2 -2
- package/dist/core/canvas/canvas.d.ts +6 -50
- package/dist/core/canvas/canvas.js +16 -21
- package/dist/core/canvas/db.d.ts +4 -1
- package/dist/core/canvas/db.js +2 -2
- package/dist/core/canvas/history.d.ts +11 -39
- package/dist/core/canvas/history.js +9 -20
- package/dist/core/canvas/install-id.d.ts +2 -2
- package/dist/core/canvas/install-id.js +1 -1
- package/dist/core/canvas/memory-reads.d.ts +5 -0
- package/dist/core/canvas/memory-reads.js +1 -1
- package/dist/core/canvas/migrations.js +215 -41
- package/dist/core/canvas/node-agent-paths.js +1 -1
- package/dist/core/canvas/node-tokens.js +1 -1
- package/dist/core/canvas/paths.d.ts +0 -4
- package/dist/core/canvas/paths.js +1 -1
- package/dist/core/canvas/remote-canvas-source.d.ts +0 -1
- package/dist/core/canvas/remote-canvas-source.js +1 -1
- package/dist/core/canvas/render-source.d.ts +9 -6
- package/dist/core/canvas/render-source.js +6 -6
- package/dist/core/canvas/sessions.js +2 -2
- package/dist/core/canvas/source.d.ts +6 -0
- package/dist/core/canvas/tree.d.ts +29 -0
- package/dist/core/canvas/tree.js +12 -0
- package/dist/core/canvas/types.d.ts +0 -20
- package/dist/core/command-plugins/bundle.js +1 -1
- package/dist/core/config.d.ts +1 -1
- package/dist/core/conversation-store/listener.js +4 -2
- package/dist/core/feed/feed.d.ts +9 -7
- package/dist/core/feed/feed.js +3 -7
- package/dist/core/feed/inbox.d.ts +3 -5
- package/dist/core/feed/inbox.js +1 -10
- package/dist/core/feed/messages.d.ts +33 -6
- package/dist/core/feed/messages.js +10 -7
- package/dist/core/feed/reports.d.ts +10 -0
- package/dist/core/feed/reports.js +2 -0
- package/dist/core/grants/remove.js +1 -1
- package/dist/core/graph/access.d.ts +24 -0
- package/dist/core/graph/access.js +8 -0
- package/dist/core/graph/bodies.d.ts +6 -0
- package/dist/core/graph/bodies.js +1 -0
- package/dist/core/graph/deletion.d.ts +9 -0
- package/dist/core/graph/deletion.js +5 -0
- package/dist/core/graph/diff.d.ts +4 -0
- package/dist/core/graph/diff.js +4 -0
- package/dist/core/graph/documents.d.ts +160 -0
- package/dist/core/graph/documents.js +7 -0
- package/dist/core/graph/edges.d.ts +24 -0
- package/dist/core/graph/edges.js +1 -0
- package/dist/core/graph/events.d.ts +26 -0
- package/dist/core/graph/events.js +6 -0
- package/dist/core/graph/exposures.d.ts +53 -0
- package/dist/core/graph/exposures.js +4 -0
- package/dist/core/graph/jobs.d.ts +31 -0
- package/dist/core/graph/jobs.js +2 -0
- package/dist/core/graph/names.d.ts +28 -0
- package/dist/core/graph/names.js +3 -0
- package/dist/core/graph/objects.d.ts +55 -0
- package/dist/core/graph/objects.js +9 -0
- package/dist/core/graph/package-docs.d.ts +31 -0
- package/dist/core/graph/package-docs.js +5 -0
- package/dist/core/graph/package-files.d.ts +20 -0
- package/dist/core/graph/package-files.js +2 -0
- package/dist/core/graph/reader.d.ts +21 -0
- package/dist/core/graph/reader.js +3 -0
- package/dist/core/graph/repo-sync/exchange.d.ts +34 -0
- package/dist/core/graph/repo-sync/exchange.js +2 -0
- package/dist/core/graph/repo-sync/identity.d.ts +30 -0
- package/dist/core/graph/repo-sync/identity.js +1 -0
- package/dist/core/graph/repo-sync/index.d.ts +4 -0
- package/dist/core/graph/repo-sync/index.js +1 -0
- package/dist/core/graph/repo-sync/mirror.d.ts +30 -0
- package/dist/core/graph/repo-sync/mirror.js +6 -0
- package/dist/core/graph/repo-sync/ref-format.d.ts +76 -0
- package/dist/core/graph/repo-sync/ref-format.js +2 -0
- package/dist/core/graph/repo-sync/repos.d.ts +17 -0
- package/dist/core/graph/repo-sync/repos.js +3 -0
- package/dist/core/graph/repo-sync/sync.d.ts +42 -0
- package/dist/core/graph/repo-sync/sync.js +2 -0
- package/dist/core/graph/rules.d.ts +26 -0
- package/dist/core/graph/rules.js +3 -0
- package/dist/core/graph/spaces/app.d.ts +3 -0
- package/dist/core/graph/spaces/app.js +1 -0
- package/dist/core/graph/spaces/index.d.ts +19 -0
- package/dist/core/graph/spaces/index.js +1 -0
- package/dist/core/graph/spaces/person.d.ts +5 -0
- package/dist/core/graph/spaces/person.js +2 -0
- package/dist/core/graph/spaces/repo.d.ts +4 -0
- package/dist/core/graph/spaces/repo.js +1 -0
- package/dist/core/graph/types.d.ts +75 -0
- package/dist/core/graph/types.js +1 -0
- package/dist/core/graph/watches.d.ts +62 -0
- package/dist/core/graph/watches.js +18 -0
- package/dist/core/human/feedback-companion.js +1 -1
- package/dist/core/human/requests.d.ts +3 -1
- package/dist/core/human/requests.js +6 -6
- package/dist/core/inspector/model.js +2 -2
- package/dist/core/io.js +5 -5
- package/dist/core/layout-migrate/index.d.ts +24 -1
- package/dist/core/layout-migrate/index.js +4 -4
- package/dist/core/layout-migrate/paths.d.ts +4 -0
- package/dist/core/layout-migrate/paths.js +1 -1
- package/dist/core/layout-migrate/stored-paths.d.ts +7 -0
- package/dist/core/layout-migrate/stored-paths.js +11 -11
- package/dist/core/layout-migrate/stores.d.ts +19 -6
- package/dist/core/layout-migrate/stores.js +3 -4
- package/dist/core/manifest.d.ts +0 -2
- package/dist/core/manifest.js +1 -1
- package/dist/core/{memory/extensions.d.ts → plugin-extensions.d.ts} +9 -10
- package/dist/core/plugin-extensions.js +1 -0
- package/dist/core/preview-registry.d.ts +1 -1
- package/dist/core/preview-registry.js +3 -2
- package/dist/core/profiles/manifest.d.ts +7 -7
- package/dist/core/profiles/manifest.js +1 -1
- package/dist/core/profiles/select.js +3 -3
- package/dist/core/review/birth.js +1 -1
- package/dist/core/review/companion.js +1 -1
- package/dist/core/review/stage.d.ts +12 -1
- package/dist/core/review/stage.js +1 -1
- package/dist/core/review/store.d.ts +2 -0
- package/dist/core/review/store.js +1 -1
- package/dist/core/review/types.d.ts +7 -1
- package/dist/core/runs/events.js +1 -1
- package/dist/core/runs/operations.js +5 -5
- package/dist/core/runs/questions.js +2 -2
- package/dist/core/runtime/bearings-render.d.ts +13 -7
- package/dist/core/runtime/bearings-render.js +12 -12
- package/dist/core/runtime/bearings.d.ts +8 -18
- package/dist/core/runtime/bearings.js +7 -7
- package/dist/core/runtime/broker/daemon-ops.d.ts +7 -12
- package/dist/core/runtime/broker/daemon-ops.js +1 -1
- package/dist/core/runtime/broker/fault-retry.d.ts +2 -0
- package/dist/core/runtime/broker/fault-retry.js +1 -1
- package/dist/core/runtime/broker/frame-dispatch.d.ts +1 -1
- package/dist/core/runtime/broker/frame-memory-refs.d.ts +7 -2
- package/dist/core/runtime/broker/frame-memory-refs.js +1 -1
- package/dist/core/runtime/broker/inbox.d.ts +1 -4
- package/dist/core/runtime/broker/inbox.js +1 -10
- package/dist/core/runtime/broker/rebind.js +1 -1
- package/dist/core/runtime/broker/retry-card-elision.d.ts +7 -0
- package/dist/core/runtime/broker/retry-card-elision.js +1 -0
- package/dist/core/runtime/broker-extension-render.d.ts +0 -13
- package/dist/core/runtime/broker-extension-render.js +2 -4
- package/dist/core/runtime/broker-persona-guidance.js +3 -3
- package/dist/core/runtime/broker-protocol.d.ts +1 -1
- package/dist/core/runtime/broker.js +1 -1
- package/dist/core/runtime/close.d.ts +9 -4
- package/dist/core/runtime/close.js +1 -1
- package/dist/core/runtime/deliver-live.js +1 -1
- package/dist/core/runtime/kickoff.js +17 -19
- package/dist/core/runtime/launch-target.d.ts +7 -0
- package/dist/core/runtime/launch-target.js +1 -1
- package/dist/core/runtime/ledger.d.ts +10 -0
- package/dist/core/runtime/ledger.js +3 -0
- package/dist/core/runtime/lifecycle.js +2 -2
- package/dist/core/runtime/nodes.d.ts +10 -2
- package/dist/core/runtime/nodes.js +1 -1
- package/dist/core/runtime/outcome-document.d.ts +2 -2
- package/dist/core/runtime/outcome-document.js +1 -1
- package/dist/core/runtime/persona.js +2 -2
- package/dist/core/runtime/placement.js +1 -1
- package/dist/core/runtime/promote.d.ts +2 -2
- package/dist/core/runtime/promote.js +1 -1
- package/dist/core/runtime/prospective-inventory-cli.js +2 -2
- package/dist/core/runtime/recycle.js +1 -1
- package/dist/core/runtime/reopen.js +1 -1
- package/dist/core/runtime/revive.js +2 -2
- package/dist/core/runtime/roadmap.d.ts +17 -9
- package/dist/core/runtime/roadmap.js +4 -4
- package/dist/core/runtime/spawn-env.js +1 -1
- package/dist/core/runtime/spawn.d.ts +5 -3
- package/dist/core/runtime/spawn.js +2 -2
- package/dist/core/runtime/structured-output.d.ts +3 -1
- package/dist/core/runtime/structured-output.js +4 -4
- package/dist/core/scope.d.ts +1 -32
- package/dist/core/scope.js +1 -1
- package/dist/core/scoped-state/db.js +2 -1
- package/dist/core/scoped-state/migrate.js +2 -2
- package/dist/core/scoped-state/profiles.d.ts +11 -0
- package/dist/core/scoped-state/profiles.js +1 -1
- package/dist/core/scoped-state/schema.d.ts +1 -1
- package/dist/core/scoped-state/schema.js +7 -5
- package/dist/core/spaces/permissions.d.ts +0 -14
- package/dist/core/spaces/permissions.js +1 -1
- package/dist/core/spaces/stop.d.ts +13 -0
- package/dist/core/spaces/stop.js +2 -2
- package/dist/core/storage/tables.d.ts +1 -1
- package/dist/core/substrate/delivery/corpus.d.ts +21 -0
- package/dist/core/substrate/delivery/corpus.js +3 -0
- package/dist/core/substrate/delivery/deliver.d.ts +76 -0
- package/dist/core/substrate/delivery/deliver.js +6 -0
- package/dist/core/substrate/delivery/listings.d.ts +27 -0
- package/dist/core/substrate/delivery/listings.js +4 -0
- package/dist/core/substrate/delivery/match.d.ts +28 -0
- package/dist/core/substrate/delivery/match.js +1 -0
- package/dist/core/substrate/delivery/plan.d.ts +67 -0
- package/dist/core/substrate/delivery/plan.js +3 -0
- package/dist/core/substrate/delivery/render-boot.d.ts +20 -0
- package/dist/core/substrate/delivery/render-boot.js +54 -0
- package/dist/core/substrate/delivery/render-event.d.ts +47 -0
- package/dist/core/substrate/delivery/render-event.js +6 -0
- package/dist/core/substrate/delivery/sub-persona-menu.d.ts +2 -0
- package/dist/core/substrate/delivery/sub-persona-menu.js +6 -0
- package/dist/core/substrate/delivery/types.d.ts +30 -0
- package/dist/core/substrate/delivery/types.js +0 -0
- package/dist/core/substrate/gate-explain.d.ts +0 -13
- package/dist/core/substrate/gate-explain.js +1 -1
- package/dist/core/substrate/schema.d.ts +11 -139
- package/dist/core/substrate/schema.js +1 -1
- package/dist/core/substrate/subject-fields.d.ts +3 -0
- package/dist/core/substrate/subject.d.ts +2 -1
- package/dist/core/substrate/subject.js +1 -1
- package/dist/daemon/api/handlers/app-profiles.js +1 -1
- package/dist/daemon/api/handlers/bash-jobs.js +1 -2
- package/dist/daemon/api/handlers/broker-ops.js +1 -1
- package/dist/daemon/api/handlers/canvas.js +5 -5
- package/dist/daemon/api/handlers/daemon.js +1 -1
- package/dist/daemon/api/handlers/delivery.d.ts +2 -0
- package/dist/daemon/api/handlers/delivery.js +1 -0
- package/dist/daemon/api/handlers/{memory.d.ts → docs.d.ts} +1 -1
- package/dist/daemon/api/handlers/docs.js +1 -0
- package/dist/daemon/api/handlers/hook-exec.js +1 -1
- package/dist/daemon/api/handlers/messages.js +2 -2
- package/dist/daemon/api/handlers/node-records.js +2 -2
- package/dist/daemon/api/handlers/nodes.js +1 -1
- package/dist/daemon/api/handlers/objects.d.ts +2 -0
- package/dist/daemon/api/handlers/objects.js +5 -0
- package/dist/daemon/api/handlers/package-docs.d.ts +2 -0
- package/dist/daemon/api/handlers/package-docs.js +1 -0
- package/dist/daemon/api/handlers/profiles.js +1 -1
- package/dist/daemon/api/handlers/reports.d.ts +2 -2
- package/dist/daemon/api/handlers/reports.js +4 -4
- package/dist/daemon/api/handlers/reviews.js +1 -1
- package/dist/daemon/api/map.d.ts +2 -2
- package/dist/daemon/api/map.js +2 -2
- package/dist/daemon/api/operations.d.ts +1 -1
- package/dist/daemon/api/operations.js +1 -1
- package/dist/daemon/api/reader.d.ts +17 -0
- package/dist/daemon/api/reader.js +1 -0
- package/dist/daemon/api/server.js +1 -1
- package/dist/daemon/control.d.ts +2 -3
- package/dist/daemon/crtrd.js +8 -6
- package/dist/daemon/fleet.js +4 -4
- package/dist/daemon/reconcilers/bash-deadline.d.ts +11 -1
- package/dist/daemon/reconcilers/bash-deadline.js +2 -1
- package/dist/daemon/reconcilers/broker-supervision.js +4 -4
- package/dist/daemon/reconcilers/live-obligation.js +1 -1
- package/dist/daemon/reconcilers/node-deadline.js +1 -1
- package/dist/daemon/reconcilers/node-lifecycle/freeze-lane.js +1 -1
- package/dist/daemon/reconcilers/storage-maintenance.d.ts +1 -0
- package/dist/daemon/reconcilers/storage-maintenance.js +1 -1
- package/dist/daemon/review/deliver.js +2 -2
- package/dist/daemon/review/finish.js +1 -1
- package/dist/hook-authoring.d.ts +0 -1
- package/dist/hook-authoring.js +3 -3
- package/dist/migrations/004-canvas-documents/apply.d.ts +10 -0
- package/dist/migrations/004-canvas-documents/apply.js +1 -0
- package/dist/migrations/004-canvas-documents/fields.d.ts +24 -0
- package/dist/migrations/004-canvas-documents/fields.js +2 -0
- package/dist/migrations/004-canvas-documents/index.d.ts +16 -0
- package/dist/migrations/004-canvas-documents/index.js +2 -0
- package/dist/migrations/004-canvas-documents/legacy/discover.d.ts +16 -0
- package/dist/migrations/004-canvas-documents/legacy/discover.js +1 -0
- package/dist/migrations/004-canvas-documents/legacy/history.d.ts +5 -0
- package/dist/migrations/004-canvas-documents/legacy/history.js +2 -0
- package/dist/migrations/004-canvas-documents/legacy/nested.d.ts +7 -0
- package/dist/migrations/004-canvas-documents/legacy/nested.js +1 -0
- package/dist/migrations/004-canvas-documents/legacy/parse.d.ts +14 -0
- package/dist/migrations/004-canvas-documents/legacy/parse.js +1 -0
- package/dist/migrations/004-canvas-documents/legacy/types.d.ts +91 -0
- package/dist/migrations/004-canvas-documents/legacy/types.js +0 -0
- package/dist/migrations/004-canvas-documents/legacy-edges.d.ts +6 -0
- package/dist/migrations/004-canvas-documents/legacy-edges.js +18 -0
- package/dist/migrations/004-canvas-documents/plan.d.ts +102 -0
- package/dist/migrations/004-canvas-documents/plan.js +3 -0
- package/dist/migrations/004-canvas-documents/pointers.d.ts +23 -0
- package/dist/migrations/004-canvas-documents/pointers.js +4 -0
- package/dist/migrations/activation.d.ts +9 -18
- package/dist/migrations/activation.js +2 -2
- package/dist/pi-extensions/broker-local.d.ts +2 -2
- package/dist/pi-extensions/broker-local.js +2 -2
- package/dist/pi-extensions/canvas-bash-valve.js +5 -4
- package/dist/pi-extensions/canvas-context-intro.js +2 -2
- package/dist/pi-extensions/canvas-doc-substrate.d.ts +0 -1
- package/dist/pi-extensions/canvas-doc-substrate.js +6 -6
- package/dist/pi-extensions/canvas-inbox-watcher.js +2 -2
- package/dist/pi-extensions/canvas-passive-context.js +1 -1
- package/dist/pi-extensions/canvas-recap.js +2 -2
- package/dist/pi-extensions/canvas-stophook.d.ts +1 -1
- package/dist/pi-extensions/canvas-stophook.js +1 -1
- package/dist/prompts/review.js +3 -3
- package/dist/shared/env.d.ts +5 -0
- package/dist/shared/env.js +1 -1
- package/dist/shared/generated-context.js +2 -10
- package/dist/shared/inbox-entry-body.d.ts +22 -0
- package/dist/shared/inbox-entry-body.js +10 -0
- package/dist/{core/memory → shared}/inline-ref-guidance.d.ts +2 -2
- package/dist/shared/inline-ref-guidance.js +2 -0
- package/dist/types.d.ts +3 -1
- package/docs/cli/memory-and-preferences.md +12 -14
- package/docs/concepts/README.md +1 -1
- package/docs/concepts/lifecycle-and-wakes.md +1 -1
- package/docs/concepts/memory.md +15 -15
- package/docs/concepts/nodes-and-the-canvas.md +1 -1
- package/docs/concepts/profiles-kinds-and-modes.md +5 -5
- package/docs/concepts/scopes-and-trust.md +1 -1
- package/docs/concepts/why-a-daemon.md +1 -1
- package/docs/sdk/README.md +5 -6
- package/docs/sdk/errors.md +0 -13
- package/docs/sdk/guides/README.md +0 -1
- package/docs/sdk/nodes.md +0 -2
- package/docs/sdk/resources.md +0 -1
- package/package.json +2 -2
- package/packages/crouter-identity/package.json +1 -1
- package/runtime.lock.json +11 -11
- package/dist/api/dto/memory.d.ts +0 -171
- package/dist/api/dto/memory.js +0 -1
- package/dist/builtin-memory/crouter-sdk/guides/app-memory.md +0 -73
- package/dist/builtin-memory/crouter-sdk/memory.md +0 -87
- package/dist/commands/broker-permissions.d.ts +0 -2
- package/dist/commands/broker-permissions.js +0 -1
- package/dist/commands/memory/client.d.ts +0 -11
- package/dist/commands/memory/client.js +0 -1
- package/dist/commands/memory/delete.d.ts +0 -1
- package/dist/commands/memory/delete.js +0 -1
- package/dist/commands/memory/edit.d.ts +0 -1
- package/dist/commands/memory/edit.js +0 -21
- package/dist/commands/memory/find.d.ts +0 -1
- package/dist/commands/memory/find.js +0 -1
- package/dist/commands/memory/history.d.ts +0 -1
- package/dist/commands/memory/history.js +0 -5
- package/dist/commands/memory/lint.d.ts +0 -1
- package/dist/commands/memory/lint.js +0 -1
- package/dist/commands/memory/list.d.ts +0 -1
- package/dist/commands/memory/list.js +0 -1
- package/dist/commands/memory/move.d.ts +0 -1
- package/dist/commands/memory/move.js +0 -1
- package/dist/commands/memory/origin.d.ts +0 -1
- package/dist/commands/memory/origin.js +0 -1
- package/dist/commands/memory/read.d.ts +0 -1
- package/dist/commands/memory/read.js +0 -6
- package/dist/commands/memory/shared.d.ts +0 -22
- package/dist/commands/memory/shared.js +0 -1
- package/dist/commands/memory/write.d.ts +0 -1
- package/dist/commands/memory/write.js +0 -13
- package/dist/commands/memory.js +0 -1
- package/dist/commands/node-inspect-artifacts.d.ts +0 -1
- package/dist/commands/node-inspect-artifacts.js +0 -8
- package/dist/core/help/memory-extensions.d.ts +0 -3
- package/dist/core/help/memory-extensions.js +0 -2
- package/dist/core/memory/cli-selector.d.ts +0 -13
- package/dist/core/memory/cli-selector.js +0 -1
- package/dist/core/memory/doc-link-grammar.d.ts +0 -20
- package/dist/core/memory/doc-link-grammar.js +0 -2
- package/dist/core/memory/extensions.js +0 -1
- package/dist/core/memory/history.d.ts +0 -87
- package/dist/core/memory/history.js +0 -6
- package/dist/core/memory/identity.d.ts +0 -65
- package/dist/core/memory/identity.js +0 -1
- package/dist/core/memory/inline-ref-guidance.js +0 -2
- package/dist/core/memory/inline-ref-inventory.d.ts +0 -9
- package/dist/core/memory/inline-ref-inventory.js +0 -1
- package/dist/core/memory/lint.d.ts +0 -163
- package/dist/core/memory/lint.js +0 -2
- package/dist/core/memory/mutation-domain.d.ts +0 -113
- package/dist/core/memory/mutation-domain.js +0 -12
- package/dist/core/memory/mutations.d.ts +0 -74
- package/dist/core/memory/mutations.js +0 -1
- package/dist/core/memory/project-namespace.d.ts +0 -31
- package/dist/core/memory/project-namespace.js +0 -2
- package/dist/core/memory/repository-association.d.ts +0 -31
- package/dist/core/memory/repository-association.js +0 -1
- package/dist/core/memory/service.d.ts +0 -145
- package/dist/core/memory/service.js +0 -2
- package/dist/core/memory/tree.d.ts +0 -39
- package/dist/core/memory/tree.js +0 -1
- package/dist/core/memory-resolver.d.ts +0 -280
- package/dist/core/memory-resolver.js +0 -2
- package/dist/core/nested-stores.d.ts +0 -18
- package/dist/core/nested-stores.js +0 -1
- package/dist/core/runtime/memory.d.ts +0 -3
- package/dist/core/runtime/memory.js +0 -1
- package/dist/core/substrate/frontmatter-validation.d.ts +0 -11
- package/dist/core/substrate/frontmatter-validation.js +0 -1
- package/dist/core/substrate/gate.d.ts +0 -16
- package/dist/core/substrate/gate.js +0 -1
- package/dist/core/substrate/index.d.ts +0 -18
- package/dist/core/substrate/index.js +0 -1
- package/dist/core/substrate/injected-store.d.ts +0 -75
- package/dist/core/substrate/injected-store.js +0 -2
- package/dist/core/substrate/listings.d.ts +0 -28
- package/dist/core/substrate/listings.js +0 -1
- package/dist/core/substrate/memory-events.d.ts +0 -6
- package/dist/core/substrate/memory-events.js +0 -1
- package/dist/core/substrate/on-read-node.d.ts +0 -6
- package/dist/core/substrate/on-read-node.js +0 -1
- package/dist/core/substrate/on-read.d.ts +0 -101
- package/dist/core/substrate/on-read.js +0 -9
- package/dist/core/substrate/plan.d.ts +0 -94
- package/dist/core/substrate/plan.js +0 -1
- package/dist/core/substrate/render-node.d.ts +0 -12
- package/dist/core/substrate/render-node.js +0 -1
- package/dist/core/substrate/render.d.ts +0 -41
- package/dist/core/substrate/render.js +0 -65
- package/dist/core/substrate/session-cache.d.ts +0 -27
- package/dist/core/substrate/session-cache.js +0 -1
- package/dist/core/substrate/surface-match.d.ts +0 -73
- package/dist/core/substrate/surface-match.js +0 -1
- package/dist/daemon/api/handlers/memory.js +0 -5
- package/dist/migrations/001-surfaces-frontmatter.d.ts +0 -2
- package/dist/migrations/001-surfaces-frontmatter.js +0 -1
- package/dist/migrations/002-profile-project-memory.d.ts +0 -2
- package/dist/migrations/002-profile-project-memory.js +0 -1
- package/dist/migrations/003-repository-root-memory-identity/front-door.d.ts +0 -26
- package/dist/migrations/003-repository-root-memory-identity/front-door.js +0 -11
- package/dist/migrations/003-repository-root-memory-identity/index.d.ts +0 -2
- package/dist/migrations/003-repository-root-memory-identity/index.js +0 -5
- package/dist/migrations/003-repository-root-memory-identity/references.d.ts +0 -95
- package/dist/migrations/003-repository-root-memory-identity/references.js +0 -5
- package/dist/migrations/003-repository-root-memory-identity/repository-facts.d.ts +0 -39
- package/dist/migrations/003-repository-root-memory-identity/repository-facts.js +0 -3
- package/dist/migrations/convergent.d.ts +0 -43
- package/dist/migrations/convergent.js +0 -2
- package/dist/migrations/corpus.d.ts +0 -75
- package/dist/migrations/corpus.js +0 -3
- package/dist/migrations/frontmatter-splice.d.ts +0 -15
- package/dist/migrations/frontmatter-splice.js +0 -8
- package/dist/migrations/profile-manifests.d.ts +0 -30
- package/dist/migrations/profile-manifests.js +0 -2
- package/dist/migrations/registry.d.ts +0 -7
- package/dist/migrations/registry.js +0 -1
- package/dist/migrations/runner.d.ts +0 -43
- package/dist/migrations/runner.js +0 -1
- package/dist/migrations/types.d.ts +0 -211
- package/dist/shared/birth-announcement.d.ts +0 -12
- package/dist/shared/birth-announcement.js +0 -1
- package/docs/sdk/guides/app-memory.md +0 -22
- package/docs/sdk/memory.md +0 -85
- /package/dist/{migrations/types.js → api/dto/delivery.js} +0 -0
- /package/dist/{core/memory → shared}/inline-ref-grammar.d.ts +0 -0
- /package/dist/{core/memory → shared}/inline-ref-grammar.js +0 -0
package/dist/build-root.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var L=Object.defineProperty;var o=(e,n)=>L(e,"name",{value:n,configurable:!0});import{defineBranch as j,defineRoot as l,GLOBAL_TOKENS as R}from"./core/command.js";import{createCoreHookCatalog as x}from"./core/command-hooks/catalog.js";import{composeCoreHooks as C}from"./core/command-hooks/compose.js";import{mark as f}from"./core/timing.js";import{envNodeId as k,envScopes as H,scopeAllowed as d}from"./shared/env.js";const
|
|
1
|
+
var L=Object.defineProperty;var o=(e,n)=>L(e,"name",{value:n,configurable:!0});import{defineBranch as j,defineRoot as l,GLOBAL_TOKENS as R}from"./core/command.js";import{createCoreHookCatalog as x}from"./core/command-hooks/catalog.js";import{composeCoreHooks as C}from"./core/command-hooks/compose.js";import{mark as f}from"./core/timing.js";import{envNodeId as k,envScopes as H,scopeAllowed as d}from"./shared/env.js";const p="crtr: agentic runtime.",m=[{name:"--json",desc:"stdout as the leaf's declared outputs in raw JSON instead of prose \u2014 for scripts (a cron's bash, external tooling) that must branch on canvas state; prose stays the contract for what you read yourself."}],g=Object.assign(Object.create(null),{doc:o(async()=>(await import("./commands/doc.js")).registerDoc(),"doc"),profile:o(async()=>(await import("./commands/profile.js")).registerProfile(),"profile"),pkg:o(async()=>(await import("./commands/pkg.js")).registerPkg(),"pkg"),human:o(async()=>(await import("./commands/human.js")).registerHuman(),"human"),sys:o(async()=>(await import("./commands/sys.js")).registerSys(),"sys"),node:o(async()=>(await import("./commands/node.js")).registerNode(),"node"),push:o(async()=>(await import("./commands/push.js")).registerPush(),"push"),cron:o(async()=>(await import("./commands/cron.js")).registerCron(),"cron"),canvas:o(async()=>(await import("./commands/canvas.js")).registerCanvas(),"canvas"),surface:o(async()=>(await import("./commands/surface.js")).registerSurface(),"surface")}),h=Object.freeze(Object.keys(g)),G={human:["crtr:act"],cron:["crtr:schedule"],doc:["crtr:memory:read:user","crtr:memory:rw:user"]};function b(e){const n=H();return n===null?e:e.filter(r=>{const t=G[r.name];return t===void 0||t.some(s=>d(n,s))||r.name==="doc"&&typeof process.env.CRTR_GRANTEE=="string"&&process.env.CRTR_GRANTEE.startsWith("app:")&&(d(n,`crtr:memory:read:${process.env.CRTR_GRANTEE}`)||d(n,`crtr:memory:rw:${process.env.CRTR_GRANTEE}`))})}o(b,"allowedSubtrees");let P;function u(){return P??=Promise.all(h.map(e=>g[e]())),P}o(u,"loadCoreSubtrees");let T;function M(){return f("cli.hooks.catalog"),T??=u().then(x),T}o(M,"coreHookCatalog");function O(){let e;return()=>(e??=(async()=>{const{compileHookRegistry:n,effectiveHookPlugins:r}=await import("./core/command-hooks/discovery.js"),t=r(),s=process.platform==="linux"&&k()?await(await import("./core/command-hooks/transport/plan.js")).remoteHookPlan(process.cwd()):[];return f("cli.hooks.effective_plugins",{count:t.length+s.length}),t.length===0&&s.length===0?(f("cli.hooks.empty_registry"),n(x([]),[])):n(await M(),process.platform==="linux"&&k()?t.filter(a=>a.scope==="project"):t,s)})(),e)}o(O,"hookRegistryLoader");function y(e){const n=new Set,r=o((t,s)=>{if(!(t.kind==="branch"&&t.passthrough!==void 0)&&(n.add(s),t.kind==="branch"))for(const a of t.children)r(a,`${s} ${a.name}`)},"visit");for(const t of e)r(t,t.name);return n}o(y,"commandPathsFor");async function Y(){return y(await u())}o(Y,"coreCommandPaths");function I(e){const n=[],r=o((t,s)=>{t.extensible===!0&&n.push(s);for(const a of t.children)a.kind==="branch"&&r(a,[...s,a.name])},"visit");for(const t of e)r(t,[t.name]);return n}o(I,"extensibleBranchPaths");async function _(){return new Set(I(await u()).map(e=>e.join(" ")))}o(_,"extensibleCoreBranches");function D(e,n){const{listing:r,...t}=e.help;return j({name:e.name,description:e.description,whenToUse:e.whenToUse,tier:e.tier,help:t,rootEntry:e.rootEntry,extensible:e.extensible,plugin:e.plugin,slash:e.slash,passthrough:e.passthrough,children:n})}o(D,"rebuildBranch");async function B(e,n){if(n.size===0)return e;const[{buildExternalCommandSnapshot:r},{composeCoreBranchMounts:t}]=await Promise.all([import("./core/command-plugins/discovery.js"),import("./core/command-plugins/compose.js")]),s=r(new Set(h),void 0,void 0,y(await u()),n),a=o((i,w)=>{let S=!1;const A=i.children.map(c=>{if(c.kind!=="branch")return c;const E=a(c,[...w,c.name]);return E!==c&&(S=!0),E}),v=i.extensible===!0?t(s.coreMounts,w):[];return S||v.length>0?D(i,[...A,...v]):i},"composeBranch");return e.map(i=>a(i,[i.name]))}o(B,"composeCorePluginMounts");function N(e,n){const r=e.slice(2).filter(t=>!R.has(t));return r[0]==="sys"&&r[1]===n}o(N,"isSysInvocation");const U=[["surface"],["sys"],["pkg"],["profile","default"],["canvas","chord"],["canvas","config"],["canvas","use"],["canvas","browse"],["canvas","issue"]];function Q(e){const n=e.slice(2).filter(t=>!R.has(t)),r=U.find(t=>t.every((s,a)=>n[a]===s));return r===void 0?null:r.join(" ")}o(Q,"personOnlyInvocation");function V(e){return N(e,"daemon")}o(V,"isDaemonControlInvocation");function X(e){return N(e,"migrate")}o(X,"isLayoutMigrationInvocation");async function Z(){const{registerDaemonControlSys:e}=await import("./commands/sys/daemon.js");return l({tagline:p,globals:m,subtrees:[e()]})}o(Z,"resolveDaemonControlRoot");async function ee(){const[{defineSysBranch:e},{sysMigrateLeaf:n}]=await Promise.all([import("./commands/sys/branch.js"),import("./commands/sys/migrate.js")]);return l({tagline:p,globals:m,subtrees:[e([n])]})}o(ee,"resolveLayoutMigrationRoot");async function te(e){const n=e!==void 0?g[e]:void 0;if(n!==void 0){const r=b(await B([await n()],await _()));if(r.length>0)return l({tagline:p,globals:m,subtrees:C(r,O())})}return $()}o(te,"resolveRoot");async function $(){const e=await u(),[{buildExternalCommandSnapshot:n},{composeExternalSubtrees:r}]=await Promise.all([import("./core/command-plugins/discovery.js"),import("./core/command-plugins/compose.js")]),t=await _(),s=await B(e,t),a=n(new Set(h),void 0,void 0,y(e),t),i=r(a);return l({tagline:p,globals:m,subtrees:[...C(b(s),O()),...i]})}o($,"buildRoot");export{h as SUBTREE_NAMES,$ as buildRoot,Y as coreCommandPaths,M as coreHookCatalog,_ as extensibleCoreBranches,V as isDaemonControlInvocation,X as isLayoutMigrationInvocation,Q as personOnlyInvocation,Z as resolveDaemonControlRoot,ee as resolveLayoutMigrationRoot,te as resolveRoot};
|
|
@@ -10,7 +10,9 @@ rationale: >-
|
|
|
10
10
|
|
|
11
11
|
The Mermaid line exists because the viewer's inline diagram affordance is otherwise invisible to an agent working from ordinary Markdown defaults.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
"Watching" exists because every read records a watch that lasts until the reader removes it, and nothing else an agent sees at boot says so or names `crtr canvas unwatch`; without it agents accumulate edit notices for documents they no longer care about (Silas, 2026-09-26).
|
|
14
|
+
|
|
15
|
+
An "Identity" section is deliberately absent, and the documents section carries no paths. The bearings message already states the node id, how its documents and context dir work, and the cwd — so a layer copy was pure duplication. It was also the only per-node text in the whole system-prompt block: the preference render interpolates `$CRTR_NODE_ID`/`$CRTR_CONTEXT_DIR`, which made every node's cached prompt prefix globally unique. Keep node-specific values out of this layer; bearings is where they belong.
|
|
14
16
|
lint-ignore: length
|
|
15
17
|
surfaces:
|
|
16
18
|
- on: boot
|
|
@@ -20,11 +22,14 @@ surfaces:
|
|
|
20
22
|
## Working in the canvas
|
|
21
23
|
You are a **node** in a live agent graph (the crtr canvas). This section is your operating protocol — it is true for every node regardless of role.
|
|
22
24
|
|
|
23
|
-
##
|
|
24
|
-
|
|
25
|
+
## Documents
|
|
26
|
+
A document you write for another reader — a spec, plan, map or findings — is shared by pointer: write it with `crtr doc write`, and whatever carries it — a report, a reply, an ask, another document — points at it as `[[<node-id>/<name>]]`, the name `crtr doc write` printed, never pasting its substance and never naming a file path. Scripts, data and logs stay files in your context dir.
|
|
27
|
+
|
|
28
|
+
## Watching
|
|
29
|
+
Reading an object, writing or editing a document, messaging a node, or spawning one makes you its watcher: its later events — an edit to a document you read, a node's reports — reach your inbox, and an edit steers you if you are running. A watch from reading or writing lasts until you remove it; one from a message ends when the node answers or finishes. When a document or node no longer bears on your work, run `crtr canvas unwatch <name>`; `crtr canvas edges <your node id> --type watches --direction out` lists everything you watch.
|
|
25
30
|
|
|
26
31
|
## Living documents
|
|
27
|
-
Every
|
|
32
|
+
Every document you keep — plan, findings, map, roadmap — is a living statement of what is true *now*, never a log of how it got that way. When something changes, rewrite the doc in place as if writing it fresh: fold an answer into the section it settles and delete the question, replace superseded findings, and never leave an old version beside the new one. Superseded text keeps steering whoever reads it — an audit trail in a working doc costs the next reader the very attention the doc exists to save.
|
|
28
33
|
|
|
29
34
|
## Ground what you report
|
|
30
35
|
Before reporting progress, audit each claim against a tool result from this session. Report only work you can point to evidence for; if something is not yet verified, say so explicitly. Report outcomes faithfully: if tests fail, say so with the output; if a step was skipped, say that; when something is done and verified, state it plainly without hedging.
|
|
@@ -33,7 +38,7 @@ Before reporting progress, audit each claim against a tool result from this sess
|
|
|
33
38
|
When you have enough information to act, act — do not re-derive facts already established, re-litigate a decision already made, or narrate options you will not pursue; when weighing a choice, give a recommendation, not a survey. When whoever tasked you is describing a problem or thinking out loud rather than requesting a change, the deliverable is your assessment — report your findings and stop. Before a command that changes system state (a restart, a delete, a config edit), check that the evidence supports that specific action — a signal that pattern-matches a known failure may have a different cause.
|
|
34
39
|
|
|
35
40
|
## Say what actually happens
|
|
36
|
-
Everything you write — replies, reports, approval requests,
|
|
41
|
+
Everything you write — replies, reports, approval requests, documents, comments — describes systems in concrete, existing product terms: the real command, the real event, the actual cause. When you need shorthand for a distinction, spell it out ("a root created by a person" vs "a root created by a cron job") instead of coining a label ("attended root"); an invented term makes the reader stop and decode a category the system does not actually have.
|
|
37
42
|
|
|
38
43
|
## Mermaid diagrams
|
|
39
44
|
When visual structure would land faster than prose, use a Mermaid fence; it renders inline.
|
|
@@ -5,7 +5,7 @@ gate: {mode: orchestrator}
|
|
|
5
5
|
rationale: >-
|
|
6
6
|
Two observed orchestration failures set this kernel's stopping rules. A sole-writer feature lane produced a 5-deep 1:1 developer/orchestrator chain by repeatedly delegating the whole assignment; separately, the kernel's “idle capacity,” “maximum agents,” and “when in doubt, more rigor” objective helped produce review-only subtrees as large as 87 nodes and five levels deep. Coordination must optimize new evidence toward the goal rather than node count or process length.
|
|
7
7
|
|
|
8
|
-
Prompt-writing guidance (outcome framing, intent context, artifact
|
|
8
|
+
Prompt-writing guidance (outcome framing, intent context, artifact pointers, report shape) is deliberately absent because `node new -h` owns it — the forced read at the spawn moment for every spawner, base and orchestrator alike; the kernel keeps only decomposition and cross-child routing. Waiting guidance is deliberately absent: 02-turn-lifecycle/00-ending-a-turn owns waiting for every node, including the auto-wake on a child's report, so a kernel copy only duplicated it. Likewise the roadmap-curation paragraph leans on 00-runtime-base/00-authoring's "Living documents" for the fold-in/rewrite discipline and keeps only what is roadmap-specific, and memory guidance is absent because the substrate's always-present boot rendering already carries read-before-act, capture, and staleness rules for every node. Promotion guidance is absent because the promote boundary is a base-node decision 04-base-worker owns; here only the sub-orchestrator-child threshold matters, and "Delegating" carries it. User-engagement calibration is absent because 00-runtime-base/01-escalation's "When blocked" section owns it for every node, and the yield-with-unasked-question rule already lives in 02-turn-lifecycle/00-ending-a-turn; the kernel keeps only the stakeholder framing and the roadmap note about pending answers.
|
|
9
9
|
lint-ignore: length
|
|
10
10
|
surfaces:
|
|
11
11
|
- on: boot
|
|
@@ -18,13 +18,13 @@ You own a goal whose worthwhile parallel work makes coordination your primary jo
|
|
|
18
18
|
|
|
19
19
|
You set the quality ceiling for everything under you. A conservative orchestrator produces conservative output no matter how good its agents are. You do not accept deferred Critical or Major findings, or anything that violates an acceptance criterion — deferring those becomes permanent debt. A Minor or cosmetic finding closed with a one-line reason is resolved, not deferred. You do not accept "good enough" understanding — shallow understanding is the root cause of bad delegation, because you cannot write a sharp task for work you do not understand.
|
|
20
20
|
|
|
21
|
-
When your context fills you yield (`crtr node yield`) and revive in a clean window oriented by your roadmap (`roadmap
|
|
21
|
+
When your context fills you yield (`crtr node yield`) and revive in a clean window oriented by your roadmap (your document `roadmap`, loaded at every new session of yours; edit it with `crtr doc edit roadmap`) and the durable context artifacts it lists. Use refreshes to continue an open phase, not to add cycles after its exit criterion is met.
|
|
22
22
|
|
|
23
23
|
## The loop
|
|
24
24
|
|
|
25
|
-
Every wake advances the same loop, but orientation follows the wake: a fresh window starts from the roadmap and its active artifacts; an ordinary child or inbox wake resumes the live conversation and the delivered report
|
|
25
|
+
Every wake advances the same loop, but orientation follows the wake: a fresh window starts from the roadmap and its active artifacts; an ordinary child or inbox wake resumes the live conversation and the delivered report pointers.
|
|
26
26
|
|
|
27
|
-
1. **Orient.** After a yield, read your roadmap and the artifacts under `## Active context`. After an ordinary wake, continue from the live conversation and dereference the child reports that matter — the wake already delivered their digest and paths, so read the detail
|
|
27
|
+
1. **Orient.** After a yield, read your roadmap and the artifacts under `## Active context`. After an ordinary wake, continue from the live conversation and dereference the child reports that matter — the wake already delivered their digest and paths, so read the detail with `crtr canvas read` rather than acting on a one-line summary.
|
|
28
28
|
2. **Assess.** What landed? What failed? What did a report reveal that changes the plan — a blocker, scope drift, a wrong assumption?
|
|
29
29
|
3. **Understand before you delegate.** If you are missing current-state facts about the code, spawn an `explore` scout; once the facts land, give diagnosis or target-state decisions to the matching specialist. You write a sharp task only from evidence — asking a cheap scout to make the decision puts judgment on the wrong model tier.
|
|
30
30
|
4. **Find useful parallel work.** Delegate genuinely independent units that already belong to the current phase; spare capacity is not a reason to create another task or review.
|
|
@@ -35,7 +35,7 @@ Be proactive — look ahead. If the current phase is wrapping up, prepare the ne
|
|
|
35
35
|
|
|
36
36
|
## The roadmap is your strategic handoff
|
|
37
37
|
|
|
38
|
-
Your roadmap carries strategy and present state into a fresh window; the
|
|
38
|
+
Your roadmap carries strategy and present state into a fresh window; the documents it points to remain durable too. Every ordinary wake (a child's report, an inbox message) resumes this same conversation, so the roadmap stays unread and unchanged while the live context still holds the work. Bring it fully current as the last thing you do before yielding, because that is when the fresh you needs it to continue — including what each pending `crtr human send` answer will settle, so the fresh window knows what to do when it arrives. It holds exactly two things: **how you intend to reach the goal, and where you are right now.** It is not a journal of what you did, a queue of what you'll do next, or a log of which agents you spawned.
|
|
39
39
|
|
|
40
40
|
**The roadmap has exactly these sections. Nothing else belongs in it.** A **frozen core** you set once and rarely touch:
|
|
41
41
|
- `## Goal` — one paragraph: what "done" looks like, who and what is affected.
|
|
@@ -44,7 +44,7 @@ Your roadmap carries strategy and present state into a fresh window; the context
|
|
|
44
44
|
And an **evolving body** you bring current right before you yield:
|
|
45
45
|
- `## Scope assumptions / non-goals` — what's settled and what's out, so children inherit the framing.
|
|
46
46
|
- `## Strategy / phases` — your high-level shape of how you reach the goal: the ordered phases from here to done, the current one carrying a one-line status of what's happening right now. A phase with enough independent parallel work to need its own coordinator becomes a sub-orchestrator; a merely long sequential phase stays with one base child across yields.
|
|
47
|
-
- `## Active context` — the
|
|
47
|
+
- `## Active context` — the `[[<node-id>/<name>]]` pointers of the documents currently relevant to the work.
|
|
48
48
|
|
|
49
49
|
**Present state and strategic shape only — never tactical plans.** Don't list the agents you're about to spawn, "next steps," or an upcoming-action queue; what to delegate next is decided live each wake from the feed and the phases, not stored here. Don't record the status of children you've spawned; the feed carries their live status every wake, so a copy here only goes stale. Don't keep a dated history of what landed; that lives in your reports (`crtr push`), not the roadmap.
|
|
50
50
|
|
|
@@ -52,7 +52,7 @@ Delete completed items entirely rather than marking them done — no `[done]` ma
|
|
|
52
52
|
|
|
53
53
|
You shape the roadmap once at the start and revise it rarely afterward. When you write or reshape it, read the methodology named by your kind prompt first. It carries the roadmap shapes, styles, and decomposition patterns for your kind of work; this kernel describes only the roadmap's *structure*, not how to shape it for your domain.
|
|
54
54
|
|
|
55
|
-
Larger artifacts — specs, plans, exploration findings, test recipes —
|
|
55
|
+
Larger artifacts — specs, plans, exploration findings, test recipes — are documents their authors own. Children report each as `[[<node-id>/<name>]]`, and your roadmap points at it in `## Active context`. When a report makes an active document stale, bring it current before the next child relies on it (`crtr doc edit`), so the roadmap points only to current truth.
|
|
56
56
|
|
|
57
57
|
## Working in phases
|
|
58
58
|
|
|
@@ -14,4 +14,4 @@ Use a council only when the cost of a wrong consequential judgment warrants deli
|
|
|
14
14
|
|
|
15
15
|
Keep first-round opinions blind and independent, then synthesize on evidence quality rather than consensus. Preserve a well-supported minority and name a residual crux instead of manufacturing agreement.
|
|
16
16
|
|
|
17
|
-
When convening a council, read `crtr
|
|
17
|
+
When convening a council, read [[advisor/council]] (`crtr canvas read advisor/council`) for the bounded panel, live model-configuration, pre-mortem, and targeted-second-round procedure, because its mechanics belong on demand rather than in every advisor prompt.
|
|
@@ -3,7 +3,7 @@ kind: preference
|
|
|
3
3
|
when-and-why-to-read: When a node is spawned as kind explore in base mode, this preference should be read so unfamiliar code is mapped quickly with traceable evidence and judgment-heavy questions are left to the appropriate specialist.
|
|
4
4
|
gate: {kind: explore, mode: base}
|
|
5
5
|
rationale: >-
|
|
6
|
-
Explore defaults to a fast/cheap model, right for current-state compression and wrong for judgment. Context-delivery history showed parents treating read-only as context-only and explicitly asking explorers to choose fixes, architecture, acceptance, and task boundaries; the old "do not suggest beyond what was asked" wording authorized exactly that leakage. The deliverable split (inline answer vs explore-<topic
|
|
6
|
+
Explore defaults to a fast/cheap model, right for current-state compression and wrong for judgment. Context-delivery history showed parents treating read-only as context-only and explicitly asking explorers to choose fixes, architecture, acceptance, and task boundaries; the old "do not suggest beyond what was asked" wording authorized exactly that leakage. The deliverable split (inline answer vs `explore-<topic>` document) exists because scout output previously had no standard form — the artifact contract lives in explore/exploration-doc, and this layer names only which form a task earns.
|
|
7
7
|
surfaces:
|
|
8
8
|
- on: boot
|
|
9
9
|
at: content
|
|
@@ -16,4 +16,4 @@ Keep the result descriptive. Root cause and recommendations belong to `advisor`,
|
|
|
16
16
|
|
|
17
17
|
Done is the **requested factual surface fully mapped** with evidence, not a plausible partial sketch. Promote into an explore orchestrator only when the area splits into independent surfaces for parallel scouts; otherwise yield and keep mapping it hands-on.
|
|
18
18
|
|
|
19
|
-
Your deliverable takes one of two forms. A question gets its answer inline in your final push — complete and self-contained, with the evidence that proves it: `file:line` when the subject is code, the source otherwise. A mapping task gets an exploration
|
|
19
|
+
Your deliverable takes one of two forms. A question gets its answer inline in your final push — complete and self-contained, with the evidence that proves it: `file:line` when the subject is code, the source otherwise. A mapping task gets an exploration document — `explore-<topic>`, written with `crtr doc write` and shaped by [[explore/exploration-doc]] — and a push that leads with the digest and points at the document as `[[<node-id>/explore-<topic>]]`. When the task points at an existing `explore-*` document, that document is your deliverable: read it with `crtr canvas read`, then extend and correct it in place with `crtr doc edit` rather than writing a parallel one.
|
|
@@ -3,7 +3,7 @@ kind: preference
|
|
|
3
3
|
when-and-why-to-read: When a node is spawned as kind explore in orchestrator mode, this preference should be read so a large research surface is covered deeply without exhausting one context or returning disconnected scout notes.
|
|
4
4
|
gate: {kind: explore, mode: orchestrator}
|
|
5
5
|
rationale: >-
|
|
6
|
-
Large scout fan-outs amplify role leakage when a coordinator treats target-state choices as research; the synthesis must preserve the current-state evidence boundary of every scout. The deliverable paragraph names explore-map
|
|
6
|
+
Large scout fan-outs amplify role leakage when a coordinator treats target-state choices as research; the synthesis must preserve the current-state evidence boundary of every scout. The deliverable paragraph names the `explore-map` document rather than an assembly procedure: an earlier revision prescribed cp-and-rename of scout reports — a how-to that belongs nowhere in a boot prompt — and the artifact contract itself lives in explore/exploration-doc.
|
|
7
7
|
surfaces:
|
|
8
8
|
- on: boot
|
|
9
9
|
at: content
|
|
@@ -14,4 +14,4 @@ Decompose the factual surface — by subsystem, directory, layer, or sub-questio
|
|
|
14
14
|
|
|
15
15
|
Wait for all exploration agents in each wave to complete before reading their responses. Integrate what they return into one coherent map with evidence — `file:line` when the subject is code. The map is complete only when every factual sub-question is answered: fill a gap with another scout rather than a guess, and reconcile contradictory evidence with a focused follow-up.
|
|
16
16
|
|
|
17
|
-
Your deliverable is `explore-map
|
|
17
|
+
Your deliverable is the document `explore-map`, written with `crtr doc write` and shaped by [[explore/exploration-doc]]: the high-level picture, with `[[<node-id>/explore-…]]` pointers into each scout's exploration document for depth. Task each scout to write its findings as an `explore-*` document (or to extend an existing one the task points at), fold what returns into the map, and keep the map lean — it carries the synthesis, the pointed docs carry the detail.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
kind: knowledge
|
|
3
|
-
description: Why crouter is shaped the way it is — durable nodes, the canvas graph, dormancy,
|
|
3
|
+
description: Why crouter is shaped the way it is — durable nodes, the canvas graph, dormancy, document owners, profiles, scoped authority, and one daemon
|
|
4
4
|
when-and-why-to-read: When you are choosing the shape of an agent application on crtr — whether work needs a durable node, whether it should finish or stay resident, where memory belongs, or why only the daemon writes canvas state — this section should be read because picking an SDK method or plugin field before understanding the runtime model produces an application that fights the runtime instead of using it.
|
|
5
5
|
short-form: The concepts behind the crtr runtime, read before choosing an SDK method or plugin field — nodes and the canvas, lifecycle and wakes, memory, profiles/kinds/modes, scopes and trust, and why a daemon.
|
|
6
6
|
surfaces:
|
|
@@ -10,4 +10,4 @@ surfaces:
|
|
|
10
10
|
|
|
11
11
|
# `crouter-concepts/` — choose the crouter runtime shape before using the SDK
|
|
12
12
|
|
|
13
|
-
Read `crouter-concepts/README` for the section overview. These pages explain why crouter uses durable nodes, the canvas graph, free dormancy,
|
|
13
|
+
Read `crouter-concepts/README` for the section overview. These pages explain why crouter uses durable nodes, the canvas graph, free dormancy, document owners, profiles, scoped authority, and one daemon before an application chooses an SDK method or plugin field.
|
|
@@ -25,4 +25,4 @@ A node wakes when work actually arrives: a subscribed child pushes a report, ano
|
|
|
25
25
|
|
|
26
26
|
Do not keep a node active to poll a child, a person, or a message. Creation automatically subscribes a parent to its child, and the runtime delivers the child’s outcome. Waiting for something the canvas can push is free: end the turn and let the node become dormant. Schedule a cron only for recurring work or an external condition that nothing can push into the canvas, such as checking a CI run. A timer added “just in case” a child does not report duplicates a runtime guarantee and hides a runtime defect.
|
|
27
27
|
|
|
28
|
-
A broker crash does not erase the node. The daemon retains the durable node row, conversation, waits, and outstanding inbox entries, then applies its recovery policy. This is what makes a resident event-driven assistant practical: it can wait for a webhook, be dormant for hours, and resume its saved work only when the webhook produces a message. Use [[crouter-sdk/nodes]] to deliver that external event, and run `crtr
|
|
28
|
+
A broker crash does not erase the node. The daemon retains the durable node row, conversation, waits, and outstanding inbox entries, then applies its recovery policy. This is what makes a resident event-driven assistant practical: it can wait for a webhook, be dormant for hours, and resume its saved work only when the webhook produces a message. Use [[crouter-sdk/nodes]] to deliver that external event, and run `crtr canvas read internal/nodes-and-canvas` for lifecycle operations.
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
---
|
|
2
2
|
kind: knowledge
|
|
3
3
|
when-and-why-to-read: When shaping an agent without rewriting its prompt, read
|
|
4
|
-
this because
|
|
5
|
-
|
|
4
|
+
this because documents separate facts to consult from behavior to embody and
|
|
5
|
+
let each owner control who receives them.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
#
|
|
8
|
+
# Documents
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Documents shape a node without adding the same instructions to every prompt. A document says what it contains, who owns it, and when it should enter context. The result is durable guidance that can be discovered when relevant instead of a growing startup prompt.
|
|
11
11
|
|
|
12
12
|
There are two kinds. **Knowledge** is something an agent consults: a procedure, fact, or technical reference. A **preference** is behavior the agent should embody: a standing directive or correction. This is a use-based split. A procedure and a fact are both knowledge because the agent reads either one to answer a question; a preference changes how it acts.
|
|
13
13
|
|
|
14
|
-
|
|
|
14
|
+
| Owner | Who it is | Put here |
|
|
15
15
|
|---|---|---|
|
|
16
16
|
| Node | One running node | A note needed across that node’s fresh contexts |
|
|
17
|
-
|
|
|
17
|
+
| Repo | One repository | Repository facts and procedures |
|
|
18
18
|
| Profile | One application identity and its purview | Application-wide conventions and knowledge |
|
|
19
19
|
| User | One person | Facts and preferences that follow them everywhere |
|
|
20
|
-
|
|
|
20
|
+
| Plugin `crtr` | crouter | Runtime documentation that ships to every user |
|
|
21
21
|
|
|
22
|
-
Choose the narrowest
|
|
22
|
+
Choose the narrowest owner that reaches the next agent who needs the document. For an application author, the profile is the usual owner for knowledge shared by that application’s nodes across repositories. A node’s `memory:read` and `memory:write` scopes can respectively permit reading while denying changes.
|
|
23
23
|
|
|
24
24
|
```mermaid
|
|
25
25
|
flowchart LR
|
|
26
|
-
Doc[
|
|
27
|
-
|
|
28
|
-
Preview -->
|
|
29
|
-
|
|
26
|
+
Doc[Document] --> Rule[Delivery rule: on, if, deliver]
|
|
27
|
+
Rule -->|activity matches| Preview[Name, preview, or full body]
|
|
28
|
+
Preview --> Line[Preview tells the agent why to read]
|
|
29
|
+
Line --> Read[Explicit full read when needed]
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
A
|
|
32
|
+
A delivery rule is the delivery mechanism. A document is not loaded because of its name or because its preview resembles the task. Each rule names an activity such as boot, workspace-open, file-read, document-read, command, or pre-command; it can also match a path, carry an `if` on the node’s shape, and selects what to deliver: the name, the preview, or the full content. A document with no delivery rule stays in its listing until an agent deliberately finds or reads it.
|
|
33
33
|
|
|
34
|
-
The
|
|
34
|
+
The preview is delivered at the middle level, not a trigger. For example, a profile document can have a file-read rule that delivers its preview when an order record is opened. Its line — “When handling a refund request, read this because the eligibility window is not in the order record” — then tells the agent why an explicit full read is useful. The rule delivers the preview; the line helps the agent decide whether to read the body without pretending to replace it.
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
Documents therefore support progressive disclosure. You can record knowledge freely, but it costs future contexts only when a delivery rule delivers it. Read `crtr doc write -h` to write a document and `crtr canvas read internal/memory-loading` for the delivery mechanics.
|
|
@@ -27,4 +27,4 @@ The one way work reports upward is a **push**. A push writes a durable report an
|
|
|
27
27
|
|
|
28
28
|
A node owns an outcome, not merely an artifact. It may write files and reports while working, but its terminal result is credible only when it has evidence that the requested goal was met. The canvas supports that responsibility: it preserves the goal, durable artifacts, reports, and relationships across fresh contexts and broker replacement.
|
|
29
29
|
|
|
30
|
-
Use a one-shot SDK call such as [[crouter-sdk/nodes]] when work is bounded and its only useful output is a typed result. Use `nodes.create` when the application needs a continuing conversation or must observe work while it runs. For the operational graph and report model, run `crtr
|
|
30
|
+
Use a one-shot SDK call such as [[crouter-sdk/nodes]] when work is bounded and its only useful output is a typed result. Use `nodes.create` when the application needs a continuing conversation or must observe work while it runs. For the operational graph and report model, run `crtr canvas read internal/nodes-and-canvas`.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
kind: knowledge
|
|
3
3
|
when-and-why-to-read: When designing an agent run, read this because profiles,
|
|
4
|
-
kinds, modes, and
|
|
4
|
+
kinds, modes, and document owners solve different problems and prevent a long
|
|
5
5
|
prompt from becoming an unstable substitute for an application identity.
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -14,20 +14,20 @@ Shape a run by choosing the dial that owns the decision. The four dials are inde
|
|
|
14
14
|
| Profile | Which application identity, project purview, environment, and profile memory apply? | An application or body of work has stable directories and conventions |
|
|
15
15
|
| Kind | What standing role, model tier, tools, and expertise should the agent have? | The work matches a recurring role such as developer or reviewer |
|
|
16
16
|
| Mode | Does this node work hands-on or coordinate independent children? | Parallel work makes coordination the main job |
|
|
17
|
-
|
|
|
17
|
+
| Document owner | Who should receive a document? | Guidance must reach one node, repo, profile, user, or all crouter users |
|
|
18
18
|
|
|
19
|
-
A profile is not a label on a run. It is a stable agent identity with its own
|
|
19
|
+
A profile is not a label on a run. It is a stable agent identity with its own documents and a purview of project directories. It lets an application create nodes from the same target context even if the caller runs elsewhere. Create a profile when an app has a durable set of directories, environment values, and conventions worth sharing. Do not make a profile for every repository or individual request. Use [[crouter-sdk/resources]] and the SDK’s `profile` create field to select the application’s identity.
|
|
20
20
|
|
|
21
21
|
```mermaid
|
|
22
22
|
flowchart LR
|
|
23
23
|
Profile[Profile: purview, environment, memory] --> Node
|
|
24
24
|
Kind[Kind: role and tools] --> Node
|
|
25
25
|
Mode[Mode: base or orchestrator] --> Node
|
|
26
|
-
Tier[
|
|
26
|
+
Tier[Document owner: reach] --> Node
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
A kind is a recurring role, not a decorative name. It carries a role-specific posture and may choose a suitable model tier and tools. A custom kind beats a long prompt when the role recurs and needs standing discipline that should survive every run: for example, an application’s compliance reviewer that always needs the same tools, expertise, and model choice. A one-off instruction belongs in the node’s prompt, where it does not create a permanent persona to maintain.
|
|
30
30
|
|
|
31
31
|
Base mode is the normal choice: the node owns and performs the work, using a child only for a separable part. Promote to orchestrator only when independent parts can proceed in parallel and the benefits outweigh coordination and integration. A terminal orchestrator still finishes normally; residency is separate and belongs to a person-facing ongoing conversation.
|
|
32
32
|
|
|
33
|
-
These choices keep the application prompt focused. Identity belongs in a profile, standing role in a kind, task-specific intent in the prompt, coordination in mode, and reusable knowledge in the narrowest
|
|
33
|
+
These choices keep the application prompt focused. Identity belongs in a profile, standing role in a kind, task-specific intent in the prompt, coordination in mode, and reusable knowledge in the narrowest document owner. For the full selection rules, run `crtr canvas read internal/agent-shaping`; [[crouter-sdk/nodes]] documents the profile, kind, and mode fields an application passes.
|
|
@@ -31,4 +31,4 @@ Scopes rely on a more basic trust boundary: `crtrd` is the sole writer of durabl
|
|
|
31
31
|
|
|
32
32
|
For a browser or remote process, run `crtr sys connect`. It enables the daemon’s TCP listener when needed and returns `base_url` plus a bearer `token` to give the application. `crtr sys connect --scopes …` mints a new scoped token instead of returning the owner token. Treat either token as a credential: the remote app sends it as `Authorization: Bearer <token>`, and its scope list is the ceiling for scope-gated calls and newly created nodes.
|
|
33
33
|
|
|
34
|
-
The remote API is an explicit boundary, not permission to reach around it. Keep application code on the SDK or `/v1` contract, and let the daemon own state transitions. Run `crtr
|
|
34
|
+
The remote API is an explicit boundary, not permission to reach around it. Keep application code on the SDK or `/v1` contract, and let the daemon own state transitions. Run `crtr canvas read internal/nodes-and-canvas` for the operational ownership model.
|
|
@@ -28,4 +28,4 @@ The costs are real. A daemon must be running, and canvas state has one home inst
|
|
|
28
28
|
|
|
29
29
|
Those costs buy a simpler model: one state owner, one broker launcher, and clients that can reconnect. A CLI command, an SDK application, and a terminal viewer all use the same API for canvas state. They can come and go without creating competing writers or losing the graph that explains what each agent is doing.
|
|
30
30
|
|
|
31
|
-
For the lower-level runtime model, run `crtr
|
|
31
|
+
For the lower-level runtime model, run `crtr canvas read internal/nodes-and-canvas`. For a complete remote application setup, start with the SDK [[crouter-sdk/getting-started]].
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
kind: knowledge
|
|
3
3
|
description: Driving a crouter daemon from an application with @north-light/crouter-sdk
|
|
4
|
-
when-and-why-to-read: When you are writing or reviewing application code that runs a crtr agent — installing @north-light/crouter-sdk, constructing a client, creating a node, watching its event stream, reading its result
|
|
5
|
-
short-form: The ESM-only application-facing client for a crtrd daemon. Construction and transports, `client.nodes` create/wait/parse/stream, activity snapshots, phase-2 resources including files and bash,
|
|
4
|
+
when-and-why-to-read: When you are writing or reviewing application code that runs a crtr agent — installing @north-light/crouter-sdk, constructing a client, creating a node, watching its event stream, reading its result or connecting a browser to a daemon — this reference should be read because `generate()` and `local()` were deleted, while the typed client keeps daemon transport and agent outcomes distinct.
|
|
5
|
+
short-form: The ESM-only application-facing client for a crtrd daemon. Construction and transports, `client.nodes` create/wait/parse/stream, activity snapshots, phase-2 resources including files and bash, the returned-not-thrown outcome union, and error classes.
|
|
6
6
|
surfaces:
|
|
7
7
|
- on: boot
|
|
8
8
|
at: name
|
|
@@ -7,7 +7,7 @@ when-and-why-to-read: When you need SDK overview, this knowledge should be read
|
|
|
7
7
|
|
|
8
8
|
# `@north-light/crouter-sdk`
|
|
9
9
|
|
|
10
|
-
The ESM-only client an application installs to drive a crouter daemon: create agent runs, watch streamed events, wait for typed results,
|
|
10
|
+
The ESM-only client an application installs to drive a crouter daemon: create agent runs, watch streamed events, wait for typed results, and reach the rest of the daemon's `/v1` API.
|
|
11
11
|
|
|
12
12
|
One package, one class. `new Crouter()` in Node talks to the owner's unix socket. `new Crouter({ baseURL, token })` in a browser or a remote process talks to the daemon's TCP listener with a bearer token. Resource methods issue `/v1` requests; `createAndWait`, `parse`, and `auth.status` compose more than one request. crtrd stays the sole owner of canvas state.
|
|
13
13
|
|
|
@@ -34,7 +34,6 @@ if (run.kind === 'result') console.log(run.output_parsed.root_cause);
|
|
|
34
34
|
| [[crouter-sdk/client]] | Every constructor option and its environment-variable fallback; per-request options |
|
|
35
35
|
| [[crouter-sdk/nodes]] | `create` parameters, the outcome union, `parse()` with a zod schema, `waitForOutcome`, `message`, `cancel`, nested resources |
|
|
36
36
|
| [[crouter-sdk/streaming]] | The event table, `stream()` / `events()`, the activity helper, resume with `after`, `stream_gap` and `stream_dropped` |
|
|
37
|
-
| [[crouter-sdk/memory]] | The scope object and every `client.memory` method |
|
|
38
37
|
| [[crouter-sdk/files]] | Absolute-path reads, writes, and one-level lists |
|
|
39
38
|
| [[crouter-sdk/bash]] | One bounded command and its output result |
|
|
40
39
|
| [[crouter-sdk/resources]] | Every namespace with its phase, what is deliberately excluded, and the `client.request()` escape hatch |
|
|
@@ -44,21 +43,21 @@ if (run.kind === 'result') console.log(run.output_parsed.root_cause);
|
|
|
44
43
|
|
|
45
44
|
## Phases
|
|
46
45
|
|
|
47
|
-
The surface ships in three cuts.
|
|
46
|
+
The surface ships in three cuts.
|
|
48
47
|
|
|
49
48
|
| Phase | What lands | State |
|
|
50
49
|
|---|---|---|
|
|
51
50
|
| **Phase 1** | Client construction and transports; `client.auth.status()`; `client.nodes.create`, `retrieve`, `list`, `outcome`, `waitForOutcome`, `createAndWait`, `parse`, `message`, `cancel`, and `interrupt`; `nodes.reports.list`; `profiles.ensure` and `retrieve`; `system.status` and `health`; the error hierarchy; per-request options; `crtr sys connect`; and `env-docker.connection()` | Shipped |
|
|
52
51
|
| **Phase 2 namespaces** | Node lifecycle, job, worktree, and result; canvas and canvas history; crons; human requests and inbox; models; `client.files.read` through `/v1/files/peek`, `write`, and `list`; and `client.bash.run` | Shipped |
|
|
53
52
|
| **Phase 2 streaming** | `GET /v1/nodes/{id}/events`, `nodes.stream(params, options?)`, `nodes.events(id, options?)`, `NodeStream`, and the activity helper | Shipped |
|
|
54
|
-
| **Phase 3** |
|
|
53
|
+
| **Phase 3** | The review, comment, and chat-inventory namespaces | Not shipped |
|
|
55
54
|
|
|
56
55
|
The per-run `scopes` create field ships in phase 1. `nodes.update` scope support remains phase 2 and is not in the shipped client or wire declarations.
|
|
57
56
|
|
|
58
57
|
## Verification status
|
|
59
58
|
|
|
60
|
-
The SDK declarations
|
|
59
|
+
The SDK declarations and streaming examples are verified.
|
|
61
60
|
|
|
62
61
|
## Where the agents read this
|
|
63
62
|
|
|
64
|
-
The same content routed for agents lives in the builtin memory document `crouter-sdk`, which ships with the `crtr` binary. An agent working in an application's repository reaches it with `crtr
|
|
63
|
+
The same content routed for agents lives in the builtin memory document `crouter-sdk`, which ships with the `crtr` binary. An agent working in an application's repository reaches it with `crtr canvas read crouter-sdk` and does not need this repository checked out.
|
|
@@ -66,19 +66,6 @@ The SDK validates path-segment identifiers before it makes a request. Invalid no
|
|
|
66
66
|
| The bearer token's ceiling lacks the scope a route needs, or `nodes.create` asks for `scopes` outside it (`details.scopes` lists them) | `PermissionDeniedError`, 403 `scope_denied` |
|
|
67
67
|
| A scoped token reaches an owner-only route (daemon restart, attach, broker internals, canvas prune, profile pause/resume/delete, model credential install) | `PermissionDeniedError`, 403 `owner_only` |
|
|
68
68
|
|
|
69
|
-
## Memory requests
|
|
70
|
-
|
|
71
|
-
| Condition | Class, status, and code |
|
|
72
|
-
|---|---|
|
|
73
|
-
| `retrieve` or `resolve` names a document that does not exist, including a document deleted earlier | `NotFoundError`, 404 `memory_document_not_found` |
|
|
74
|
-
| `history` names a document with no document or revision history | `NotFoundError`, 404 `not_found` |
|
|
75
|
-
| History is requested for a builtin or plugin document | `BadRequestError`, 400 `usage` |
|
|
76
|
-
| A mutation directly sets protected frontmatter (`kind`, `when-and-why-to-read`, `origin`, or `last-updated`) | `BadRequestError`, 400 `invalid_request` |
|
|
77
|
-
| An update would make no change | `BadRequestError`, 400 `usage` |
|
|
78
|
-
| A node-targeted caller lacks `memory:read` or `memory:write` | `PermissionDeniedError`, 403 `scope_denied` |
|
|
79
|
-
|
|
80
|
-
Invalid names, invalid scope combinations, invalid limits, builtin mutation selections, and invalid search combinations are also `BadRequestError` responses. Builtin and plugin documents cannot be mutated; no code should treat a 400 refusal as a successful write.
|
|
81
|
-
|
|
82
69
|
## The wire body
|
|
83
70
|
|
|
84
71
|
The daemon answers an error with:
|
|
@@ -14,6 +14,5 @@ These recipes turn the SDK namespaces into complete applications: a bounded extr
|
|
|
14
14
|
| [[crouter-sdk/guides/event-driven-assistant]] | Events arrive over time from a webhook, queue, or watcher. | A resident node that wakes for each event. |
|
|
15
15
|
| [[crouter-sdk/guides/fan-out-pipeline]] | One task needs independent research before a synthesis. | An orchestrator's final report. |
|
|
16
16
|
| [[crouter-sdk/guides/human-approval]] | A person must decide before work continues. | A node resumed by an inbox answer. |
|
|
17
|
-
| [[crouter-sdk/guides/app-memory]] | Several runs need the same durable application knowledge. | A profile-owned document read by a scoped run. |
|
|
18
17
|
|
|
19
18
|
Start with typed extraction for a request/response job. Use a resident node when the same assistant should react again later. Use an orchestrator only when child work can proceed independently; otherwise keep the composition in your application.
|
|
@@ -51,13 +51,13 @@ for await (const line of input) {
|
|
|
51
51
|
if (stopping !== undefined) break;
|
|
52
52
|
if (line.trim() === '') continue;
|
|
53
53
|
try {
|
|
54
|
-
const previous = (await client.nodes.reports.list(assistant.node_id, { limit: 1 }))[0]?.
|
|
54
|
+
const previous = (await client.nodes.reports.list(assistant.node_id, { limit: 1 }))[0]?.id;
|
|
55
55
|
if (stopping !== undefined) break;
|
|
56
56
|
await client.nodes.message(assistant.node_id, { body: line });
|
|
57
57
|
while (stopping === undefined) {
|
|
58
58
|
const report = (await client.nodes.reports.list(assistant.node_id, { limit: 1 }))[0];
|
|
59
59
|
if (stopping !== undefined) break;
|
|
60
|
-
if (report !== undefined && report.
|
|
60
|
+
if (report !== undefined && report.id !== previous) {
|
|
61
61
|
console.log(report.body);
|
|
62
62
|
break;
|
|
63
63
|
}
|
|
@@ -190,8 +190,6 @@ for (const report of reports) console.log(report.tier, report.body);
|
|
|
190
190
|
|
|
191
191
|
List routes return what the daemon returns. `nodes.list`, `nodes.reports.list`, and `nodes.jobs.list` return plain arrays — there is no page object, no `hasNextPage()`, and no `after` cursor on them, because the daemon has no paging substrate behind those routes and an envelope there would promise a continuation that can never happen.
|
|
192
192
|
|
|
193
|
-
The one place the page envelope exists is the phase-3 memory routes. See [[crouter-sdk/memory]].
|
|
194
|
-
|
|
195
193
|
## Identifier validation
|
|
196
194
|
|
|
197
195
|
Methods that take a node id validate it before the request: core node methods, lifecycle methods, `nodes.reports`, `nodes.jobs`, `nodes.worktree`, and `nodes.result`. An invalid id throws `TypeError` locally and sends no request. `nodes.outcome(id, { wait })` also throws `RangeError` locally when `wait` is not an integer from 0 through 25.
|
|
@@ -28,7 +28,6 @@ Every namespace exported by the client. Namespaces are camelCase. Verbs are `cre
|
|
|
28
28
|
| `human.inbox` | `list`, `retrieve`, `respond`, `progress`, `cancel`, `history`, `response` | `/v1/human/inbox…` |
|
|
29
29
|
| `models.credentials` | `list`, `install`, `remove` | `/v1/model-auth…` |
|
|
30
30
|
| `models.config` | `update` | `PUT /v1/model-config` |
|
|
31
|
-
| `memory` | `list`, `retrieve`, `create`, `update`, `delete`, `move`, `search`, `history`, `resolve` | `/v1/memory…`; see [[crouter-sdk/memory]] |
|
|
32
31
|
|
|
33
32
|
Action methods keep the product's literal name (`fork`, `revive`, `promote`, `yield`) rather than being renamed into a generic verb. Every request-capable method takes `RequestOptions` as its final argument after its path, body, or query arguments. `RequestOptions` is `{ headers?, signal?, timeout?, maxRetries? }`; stream event options exclude `timeout` and add `after`.
|
|
34
33
|
|
|
@@ -11,17 +11,17 @@ surfaces:
|
|
|
11
11
|
|
|
12
12
|
# Exploration docs
|
|
13
13
|
|
|
14
|
-
An exploration
|
|
14
|
+
An exploration document is the durable form of a mapping result: `explore-<topic>`, written with `crtr doc write` and owned by the node that mapped it, shared by its pointer `[[<node-id>/explore-<topic>]]`. An orchestrator's synthesis is `explore-map` — the high-level picture, with pointers into the `explore-*` documents that carry depth.
|
|
15
15
|
|
|
16
16
|
Sections:
|
|
17
17
|
|
|
18
18
|
- **Scope** — one or two lines: what this maps and where the boundary sits.
|
|
19
19
|
- **The map** — the current state, organized by the subject's real seams (subsystem, layer, sub-question). Every claim carries the evidence that proves it: `file:line` when the subject is code, the source path or URL otherwise.
|
|
20
|
-
- **Pointers** —
|
|
20
|
+
- **Pointers** — `[[<node-id>/<name>]]` pointers to the exploration documents holding deeper detail, one line each naming what depth it holds. Omit when there are none.
|
|
21
21
|
- **Gaps** — what remains unmapped or unverified, stated explicitly so a reader does not mistake silence for verified absence.
|
|
22
22
|
|
|
23
23
|
Rules:
|
|
24
24
|
|
|
25
|
-
- When a task
|
|
25
|
+
- When a task points at an existing `explore-*` document, that document is your deliverable: extend and correct it in place with `crtr doc edit` — never write a parallel copy beside it.
|
|
26
26
|
- Current state only. Recommendations, diagnosis, target design, and narration of how the exploration proceeded all belong elsewhere; a doc that accumulates them stops being a map.
|
|
27
|
-
- These are goal-scoped
|
|
27
|
+
- These are goal-scoped documents owned by the node that wrote them. A durable reusable truth uncovered while mapping still goes through [[insights/capture]].
|
|
@@ -21,13 +21,13 @@ The destination can be an existing canonical document, an active listener, an ex
|
|
|
21
21
|
|
|
22
22
|
## Review one coherent principle
|
|
23
23
|
|
|
24
|
-
Write
|
|
24
|
+
Write the proposal as a small document with `crtr doc write` and submit it with `crtr human review new <name>`. Do not batch unrelated principles or ask a separate confirmation question first.
|
|
25
25
|
|
|
26
26
|
```markdown
|
|
27
27
|
# Proposed insight: <short principle name>
|
|
28
28
|
|
|
29
|
-
- **destination:** <canonical name (
|
|
30
|
-
- **visibility:** <the
|
|
29
|
+
- **destination:** <canonical name (owner) — existing doc to rewrite, new flat doc, or link into a listener or router — with the neighbouring listing, so the placement is judgeable without a lookup>
|
|
30
|
+
- **visibility:** <the delivery rules the document will carry, or none, and why that reach is right>
|
|
31
31
|
- **source:** <the episode in one line, quoting the user's pivotal words>
|
|
32
32
|
|
|
33
33
|
## Proposed durable truth
|
|
@@ -42,8 +42,8 @@ The review is asynchronous. Continue unrelated work or wait dormant, but do not
|
|
|
42
42
|
|
|
43
43
|
## Apply only approved truth
|
|
44
44
|
|
|
45
|
-
Apply direct line edits and explicit comments. If feedback requires a materially new formulation, update the open review
|
|
45
|
+
Apply direct line edits and explicit comments. If feedback requires a materially new formulation, update the open review document or submit a replacement review; review the revised formulation before writing it. If no candidate survives, save nothing.
|
|
46
46
|
|
|
47
|
-
Run `crtr
|
|
47
|
+
Run `crtr doc write -h` for the writing contract, then reach only the approved destination — `crtr doc write --owner <owner>` to create it, `crtr doc edit` to revise one that exists. A new principle is normally knowledge, and a preference only when its use is behavioral; give it no delivery rule unless review approves a boot rule. Keep its body to the approved truth, any material boundary, and the concise why. Update the selected active listener or organizing router with the canonical link without duplicating the principle.
|
|
48
48
|
|
|
49
|
-
Source context and agent reasoning stay only in the review
|
|
49
|
+
Source context and agent reasoning stay only in the review document. Do not copy them into the principle's body or fields. Run `crtr doc lint` after every create or rewrite and fix every finding.
|