@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
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
kind: knowledge
|
|
3
3
|
when-and-why-to-read: When the user invokes /insights:init to begin gathering user-derived insight about a domain, this knowledge should be read because a correctly scoped listener preserves uniquely valuable knowledge without creating a parallel store or background system.
|
|
4
|
-
short-form: Initialize passive insight gathering for a domain at the narrowest durable
|
|
4
|
+
short-form: Initialize passive insight gathering for a domain at the narrowest durable owner; create one routed topic index that reviews user-derived principles before saving them.
|
|
5
5
|
slash: true
|
|
6
6
|
rationale: Ordinary conversations, corrections, answers to `crtr human send`, and review comments carry unique user knowledge that agents inconsistently recognize or save; when agents do infer a deeper principle, they have written it without first letting the user correct the extrapolation.
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# /insights:init — begin domain listening
|
|
10
10
|
|
|
11
|
-
Initialize an ordinary
|
|
11
|
+
Initialize an ordinary document that listens for user-derived insight about this domain.
|
|
12
12
|
|
|
13
13
|
**Requested domain and mode:** $ARGUMENTS
|
|
14
14
|
|
|
@@ -16,35 +16,35 @@ Initialize an ordinary memory directory that listens for user-derived insight ab
|
|
|
16
16
|
|
|
17
17
|
If `$ARGUMENTS` contains `--active`, follow the **active mode** steps below. Otherwise, follow the **passive mode** steps.
|
|
18
18
|
|
|
19
|
-
## Establish the topic and
|
|
19
|
+
## Establish the topic and owner
|
|
20
20
|
|
|
21
21
|
Turn the request into a short path-safe topic slug and a compact domain boundary that preserves the user's meaning rather than reducing it to a single keyword. If the request is empty or too vague to distinguish relevant from unrelated information, ask one focused question through `crtr human send`.
|
|
22
22
|
|
|
23
|
-
Choose the narrowest durable
|
|
23
|
+
Choose the narrowest durable owner that reaches every future conversation where this domain matters:
|
|
24
24
|
|
|
25
25
|
- project when the insight is meaningful only inside one project;
|
|
26
26
|
- profile when it spans the selected profile's projects but should not follow the user elsewhere; or
|
|
27
27
|
- user when it concerns the person, a market, a craft, or a domain that crosses workspaces.
|
|
28
28
|
|
|
29
|
-
Infer the
|
|
29
|
+
Infer the owner from the request and current workspace. Ask through `crtr human send` only when more than one owner is genuinely plausible, and settle the owner before writing anything. Never make a node the owner of an ongoing listener.
|
|
30
30
|
|
|
31
|
-
Search the chosen
|
|
31
|
+
Search the chosen owner before creating. Use `insights/<topic>` under the chosen owner (`--owner repo`, `--owner profile` or `--owner user`); if that name already represents the same domain, refine that listener rather than creating an overlapping one.
|
|
32
32
|
|
|
33
33
|
## Create the listener
|
|
34
34
|
|
|
35
|
-
Run `crtr
|
|
35
|
+
Run `crtr doc write -h`, then create the listener document under the chosen owner, named `insights/<topic>`, as a preference with the rule `on: boot`, `deliver: preview` (`--rule`, see `crtr doc write --rule -h`).
|
|
36
36
|
|
|
37
|
-
Its
|
|
37
|
+
Its preview must name the actual domain trigger: when user-supplied information, a correction, or a user response relates to this domain, read the preference because recognizing the underlying principle preserves knowledge future decisions can use.
|
|
38
38
|
|
|
39
39
|
Keep the body short. It contains:
|
|
40
40
|
|
|
41
41
|
- the domain boundary, including exclusions needed to prevent false triggers;
|
|
42
42
|
- a directive to follow [[insights/capture]] whenever a source episode may reveal a reusable principle; and
|
|
43
|
-
- an `Approved insights` section containing
|
|
43
|
+
- an `Approved insights` section containing links to the principle documents as they are approved.
|
|
44
44
|
|
|
45
45
|
Do not copy the capture workflow into the listener. The link keeps that process in one maintained place. Do not create placeholder principle documents.
|
|
46
46
|
|
|
47
|
-
Run `crtr
|
|
47
|
+
Run `crtr doc lint`, fix every finding, then report the canonical listener name, selected owner, and the domain boundary. Initialization is complete once the routed listener exists; no independent work follows.
|
|
48
48
|
|
|
49
49
|
## Active mode: research and surface claims
|
|
50
50
|
|
|
@@ -52,7 +52,7 @@ When `--active` is present, do not stop after creating the listener. After initi
|
|
|
52
52
|
|
|
53
53
|
### 1. Create the listener first
|
|
54
54
|
|
|
55
|
-
Follow the passive mode steps above through "Initialization is complete." The listener
|
|
55
|
+
Follow the passive mode steps above through "Initialization is complete." The listener document must exist before spawning the explorer.
|
|
56
56
|
|
|
57
57
|
### 2. Spawn the explorer child
|
|
58
58
|
|
|
@@ -68,7 +68,7 @@ Gather evidence from code, docs, existing understanding, and project artifacts.
|
|
|
68
68
|
**Evidence:** [why you believe this]
|
|
69
69
|
**Question:** [what would prove or disprove this?]
|
|
70
70
|
|
|
71
|
-
Repeat for each claim. Write findings
|
|
71
|
+
Repeat for each claim. Write findings as the document `claims` with `crtr doc write`, and point at it in your report as `[[<node-id>/claims]]`.
|
|
72
72
|
TASK
|
|
73
73
|
```
|
|
74
74
|
|
|
@@ -81,8 +81,8 @@ When the explorer reports, share its claims with the user. For each claim, ask:
|
|
|
81
81
|
- Is it incomplete or wrong?
|
|
82
82
|
- What's the actual principle?
|
|
83
83
|
|
|
84
|
-
For each user response, use [[insights/capture]] to extract and review the insight. Apply approved insights directly to the listener
|
|
84
|
+
For each user response, use [[insights/capture]] to extract and review the insight. Apply approved insights directly to the listener document's `Approved insights` section.
|
|
85
85
|
|
|
86
86
|
### 4. Report completion
|
|
87
87
|
|
|
88
|
-
Once claims have been surfaced and user guidance has generated approved insights, report that active initialization is complete. The listener
|
|
88
|
+
Once claims have been surfaced and user guidance has generated approved insights, report that active initialization is complete. The listener document now passively captures this domain as new user material emerges.
|
|
@@ -15,14 +15,14 @@ Open this dir whenever a task turns on understanding the runtime itself or chang
|
|
|
15
15
|
|
|
16
16
|
- **nodes-and-canvas** — the agent-runtime model: nodes on the canvas graph, spawn/delegate, the push/feed spine, lifecycle (mode + lifecycle axes), and revive (manual + daemon auto-revive).
|
|
17
17
|
- **storage-tiers** — where every kind of state lives: the two tiers (scope root and canvas home) and their durability/ownership contracts.
|
|
18
|
-
- **memory-loading** —
|
|
19
|
-
- **agent-shaping** — the when-to-use-which layer over the four dials that shape a node: kinds (the builtin roster, sub-kinds, and custom personas), modes (base vs orchestrator), profiles, and
|
|
18
|
+
- **memory-loading** — how documents load: the delivery events, `deliver` levels, `if` conditions, listings, boot-render ordering, and the reader's view — read when diagnosing why a document did or didn't load.
|
|
19
|
+
- **agent-shaping** — the when-to-use-which layer over the four dials that shape a node: kinds (the builtin roster, sub-kinds, and custom personas), modes (base vs orchestrator), profiles, and document owners (node/profile/repo/user).
|
|
20
20
|
- **plugins** — authoring a crtr plugin: the plugin.json manifest, directory layout, scopes, install mechanics, versioning, command-capable plugins (contributing top-level CLI commands through commands.json plus an exec or HTTP transport), and bare binaries a plugin or scope puts on every node's PATH.
|
|
21
21
|
- **marketplaces** — authoring a crtr marketplace: the marketplace.json index, local-link and remote-Git plugin sources, auto-bump CI, dual-publishing.
|
|
22
22
|
- **examples/** — worked compositions of the primitives into complete systems (the analogue of pi's `examples/` dir), e.g. the iMessage assistant node.
|
|
23
23
|
|
|
24
|
-
Adjacent, outside this dir:
|
|
24
|
+
Adjacent, outside this dir: writing documents (kind, delivery rules, preview, the asked-to-remember workflow) is owned by `crtr doc write -h` and its focused `--owner -h`/`--rule -h` — the guide lives on that `-h` surface so it is delivered exactly when you write.
|
|
25
25
|
|
|
26
26
|
Briefly: **plugins** package docs and commands, with command execution selected by `plugin.json.transport` (`exec` for a trusted local executable or `http` for a fetched remote REST manifest); **marketplaces** index and distribute plugins. Plugin commands enter the **external-command** fallthrough, leaving the core fast-path untouched.
|
|
27
27
|
|
|
28
|
-
The individual files surface at their canonical names (open the one the situation calls for); this
|
|
28
|
+
The individual files surface at their canonical names (open the one the situation calls for); this document is delivered at `preview` under the name `internal`, and `crtr canvas read internal` returns its body followed by the names under it.
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
---
|
|
2
2
|
kind: knowledge
|
|
3
|
-
when-and-why-to-read: When you are choosing how to shape a node — which kind to spawn, base vs orchestrator, which profile, or which
|
|
4
|
-
short-form: The four orthogonal dials that shape a node — kind (role + model tier), mode (base vs orchestrator), profile (identity + purview), and
|
|
5
|
-
rationale: Agents pick shaping dials by reflex from the one-line `-h` blurbs and get the discriminators wrong — delegating debugging to explore instead of advisor, grinding an orchestrator-shaped job in base, minting a duplicate
|
|
3
|
+
when-and-why-to-read: When you are choosing how to shape a node — which kind to spawn, base vs orchestrator, which profile, or which owner a document belongs to — this reference should be read so each task gets the right role, orchestration depth, identity, and guidance reach instead of paying for a mismatched agent shape.
|
|
4
|
+
short-form: The four orthogonal dials that shape a node — kind (role + model tier), mode (base vs orchestrator), profile (identity + purview), and document owner (who sees a document) — plus when to reach for each over its alternatives.
|
|
5
|
+
rationale: Agents pick shaping dials by reflex from the one-line `-h` blurbs and get the discriminators wrong — delegating debugging to explore instead of advisor, grinding an orchestrator-shaped job in base, minting a duplicate document under the wrong owner. The per-kind base docs carry the rationale but only the running node of that kind ever sees them; nothing gave a chooser the cross-cutting "which one, and why it's built this way" view before committing.
|
|
6
6
|
surfaces:
|
|
7
7
|
- on: boot
|
|
8
8
|
at: name
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
# Agent shaping — kinds, modes, profiles, and
|
|
11
|
+
# Agent shaping — kinds, modes, profiles, and document owners
|
|
12
12
|
|
|
13
|
-
Four orthogonal dials shape every node. This is the **when-to-use-which** layer over them — the philosophy of each and how to choose between alternatives. It does not cover mechanics: the node/canvas/lifecycle model is `internal/nodes-and-canvas`,
|
|
13
|
+
Four orthogonal dials shape every node. This is the **when-to-use-which** layer over them — the philosophy of each and how to choose between alternatives. It does not cover mechanics: the node/canvas/lifecycle model is `internal/nodes-and-canvas`, where state lives is `internal/storage-tiers`, and the writing and delivery-rule contract for documents is `crtr doc write -h`. Point at those; this doc decides which dial to turn.
|
|
14
14
|
|
|
15
15
|
The dials are independent — you set each without constraining the others:
|
|
16
16
|
|
|
17
17
|
- **kind** — the node's role and expertise (`explore`, `developer`, a custom persona). Carries a model tier and a tool set.
|
|
18
18
|
- **mode** — `base` (do it yourself; yield hands-on when an unsplittable task needs another window) vs `orchestrator` (delegate and hold a roadmap across cycles).
|
|
19
|
-
- **profile** — the node's identity: which project dirs it can see and which
|
|
20
|
-
- **
|
|
19
|
+
- **profile** — the node's identity: which project dirs it can see and which documents and config it resolves against.
|
|
20
|
+
- **document owner** — who owns a shared document, which decides who ever reads it.
|
|
21
21
|
|
|
22
22
|
A fifth axis, **lifecycle** (`terminal` vs `resident`), is orthogonal too but belongs to the runtime model — see `internal/nodes-and-canvas`. Terminal owes a final up the spine and reaps; resident stays interactable and is never forced to submit. Orchestrating never earns residency on its own.
|
|
23
23
|
|
|
@@ -54,25 +54,25 @@ The roster is extensible. Add a `kinds.<name>` entry to a `config.json` at user
|
|
|
54
54
|
|
|
55
55
|
Every kind has both a `base` and an `orchestrator` persona; mode picks which one splices in.
|
|
56
56
|
|
|
57
|
-
- **base** — hands-on. Do the work yourself and deliver its artifact
|
|
58
|
-
- **orchestrator** — you own a goal with enough independent parallel work that coordination is now your primary job. Decompose it, delegate each piece, integrate what comes back, hold
|
|
57
|
+
- **base** — hands-on. Do the work yourself and deliver its artifact. Your scarce resource is the task. Spawn a child only for a cleanly separable unit, never as your first move. When an unsplittable task needs another context window, `crtr node yield` and continue hands-on as base.
|
|
58
|
+
- **orchestrator** — you own a goal with enough independent parallel work that coordination is now your primary job. Decompose it, delegate each piece, integrate what comes back, hold its document `roadmap`, which loads at every new session, and yield (`crtr node yield`) into a clean window when context fills. Your scarce resource is your own context window; the moment you start grinding the whole goal out by hand you've lost the plot. The shared loop lives in the `orchestration-kernel` doc (auto-gated for orchestrators).
|
|
59
59
|
|
|
60
60
|
**When to reach for orchestrator over base.** Both conditions must hold: the remaining work contains genuinely independent units that can proceed in parallel, and the task is large or valuable enough that parallel execution will materially improve intelligence, productivity, or elapsed throughput after delegation and synthesis costs. Promote early (`crtr node promote`) once coordination and integration should replace hands-on execution as your primary job; a base node that merely spawns one helper stays base. Task duration, phase count, context exhaustion, and sequential or tightly coupled work do not qualify — yield and continue hands-on instead. Create a bounded child directly as a sub-orchestrator (`crtr node new --mode orchestrator`) only when its own assignment passes the same test.
|
|
61
61
|
|
|
62
|
-
## Profiles — identity, purview, and
|
|
62
|
+
## Profiles — identity, purview, and its own documents
|
|
63
63
|
|
|
64
|
-
A profile is a stable **agent identity**: a fixed id, a display name, its own
|
|
64
|
+
A profile is a stable **agent identity**: a fixed id, a display name, its own documents, and a **purview** of project directories it resolves documents and config from. Select it at spawn with `crtr node new --profile <id-or-name>`; omit and a child inherits the caller's profile. Pin a directory's default profile with `crtr profile default` so the startup chooser stops asking. Manage the identity and purview with `crtr profile new/show/project/rename/delete` (see `crtr profile -h`).
|
|
65
65
|
|
|
66
|
-
Each project in the purview carries
|
|
66
|
+
Each project in the purview carries the profile's delivery limit per owner (today set per project), capping how much of that repo's documents reach a node's automatic boot and workspace-open context from any directory that node works in. Give `content` to the repos whose front doors the profile's nodes should operate inside, `preview` or `name` to a project the profile must know exists but rarely enters, and `none` to purview held for config, plugins, and deliberate reads alone. It is a delivery dial, not an access one: `crtr canvas read` and `file-read`/`command` rules still reach those documents.
|
|
67
67
|
|
|
68
|
-
Reach for a **new** profile when a distinct body of work has its own set of directories and its own conventions worth
|
|
68
|
+
Reach for a **new** profile when a distinct body of work has its own set of directories and its own conventions worth dedicated documents — not for every repo. **The profile as owner** is exactly where cross-repo conventions and your stance toward that body of work belong (see the owners below); a profile spanning several related dirs lets one document reach every node working anywhere in that bundle.
|
|
69
69
|
|
|
70
|
-
##
|
|
70
|
+
## Owners — who owns a document decides who sees it
|
|
71
71
|
|
|
72
|
-
A
|
|
72
|
+
A document's **owner** is a reach dial: the wider the owner, the more agents pay to carry it, forever. Choose the **narrowest owner that still reaches the next agent who needs it**. Where state lives is in `internal/storage-tiers`; the field and delivery-rule contract is `crtr doc write -h`. The owners, narrowest reach to widest:
|
|
73
73
|
|
|
74
|
-
- **node**
|
|
75
|
-
- **profile** (
|
|
76
|
-
- **
|
|
77
|
-
- **user** (
|
|
78
|
-
- **
|
|
74
|
+
- **node** — the default owner of what a node writes. Only this node's view includes it; it is deleted with the node unless a kept document links to it. One goal's cross-refresh state.
|
|
75
|
+
- **profile** (`--owner profile`) — every node running under that profile, across all the dirs in its purview. Cross-repo conventions and the user's stance toward that bundle of work.
|
|
76
|
+
- **repo** (`--owner repo`) — any agent operating in that one repo. Facts and procedures tied to that codebase. Every clone and worktree shares one set, synced over the repo's git ref `refs/crtr/docs`; a repo owns only public documents.
|
|
77
|
+
- **user** (`--owner user`) — person-wide facts and preferences that follow the user everywhere, regardless of repo or profile.
|
|
78
|
+
- **crtr's own documents** (plugin `crtr`, files in `src/builtin-memory/` of the crouter repo) — ships inside crtr, so *every crtr user on every host* carries it. This owner holds the runtime's own self-documentation (this document lives here); a change here is a change to the product. Write here only for guidance every crouter user needs, never for anything person- or repo-specific.
|
|
@@ -20,7 +20,7 @@ A standing assistant that lives on the canvas, sleeps for free, wakes when a tex
|
|
|
20
20
|
| Hears incoming texts | launchd watcher on `chat.db-wal` → `crtr node message send <body> --to <id>` (event-driven; the message delivers and revives, the node never polls) |
|
|
21
21
|
| Reads messages | sqlite against `~/Library/Messages/chat.db`, cursored by ROWID |
|
|
22
22
|
| Sends replies | `osascript` → Messages.app |
|
|
23
|
-
| Memory |
|
|
23
|
+
| Memory | Documents the assistant's repo owns (`--owner repo`) for durable knowledge; context dir for the cursor |
|
|
24
24
|
| Identity/behavior | A custom persona kind |
|
|
25
25
|
| Crash recovery | The daemon makes bounded recovery attempts for interrupted live exits; after terminalization, use `node lifecycle revive` or let the watcher's `node message send` wake the resident target |
|
|
26
26
|
|
|
@@ -90,7 +90,7 @@ Group chats target the chat instead: `send "..." to chat id "iMessage;+;chat123.
|
|
|
90
90
|
|
|
91
91
|
Two tiers, matching [[internal/storage-tiers]]:
|
|
92
92
|
|
|
93
|
-
- **Durable knowledge** →
|
|
93
|
+
- **Durable knowledge** → documents owned by the node's repo (`crtr doc write --owner repo`): one per contact/thread (who they are, open loops, tone), delivered by rules on the node's boots. The persona says when to write or update them with `crtr doc write`/`crtr doc edit`.
|
|
94
94
|
- **Working state** → the node's context dir: the ROWID cursor, drafts, a running log.
|
|
95
95
|
|
|
96
96
|
## The wake loop (persona-side)
|
|
@@ -108,7 +108,7 @@ cd <marketplace-repo>
|
|
|
108
108
|
mkdir -p plugins/my-new-plugin/.crouter-plugin plugins/my-new-plugin/memory
|
|
109
109
|
$EDITOR plugins/my-new-plugin/.crouter-plugin/plugin.json
|
|
110
110
|
|
|
111
|
-
# Add at least one doc (`crtr
|
|
111
|
+
# Add at least one doc (`crtr doc write -h` is the field + delivery-rule guide)
|
|
112
112
|
$EDITOR plugins/my-new-plugin/memory/first-doc.md
|
|
113
113
|
|
|
114
114
|
# Add the plugin to the marketplace index
|
|
@@ -117,7 +117,7 @@ $EDITOR .crouter-marketplace/marketplace.json
|
|
|
117
117
|
|
|
118
118
|
# Validate
|
|
119
119
|
crtr sys doctor # manifest + structure
|
|
120
|
-
crtr
|
|
120
|
+
crtr doc lint # document fields and links
|
|
121
121
|
|
|
122
122
|
# Commit — CI bumps versions if you've wired up auto-bump
|
|
123
123
|
git add -A
|
|
@@ -1,63 +1,64 @@
|
|
|
1
1
|
---
|
|
2
2
|
kind: knowledge
|
|
3
|
-
when-and-why-to-read: When you need to know why a
|
|
4
|
-
short-form:
|
|
3
|
+
when-and-why-to-read: When you need to know why a document did or didn't load — or are deciding how a new document should be delivered — this reference should be read because it names the event, delivery level, `if` condition, and ordering that produced the behavior, so you fix loading by turning the right dial instead of guessing at fields.
|
|
4
|
+
short-form: How documents load — the delivery events, `deliver` levels, `if` conditions, listings, the exposure ledger, boot-render ordering, and the reader's view.
|
|
5
5
|
surfaces:
|
|
6
6
|
- on: boot
|
|
7
7
|
at: name
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
# How
|
|
10
|
+
# How documents load
|
|
11
11
|
|
|
12
|
-
Every
|
|
12
|
+
Every document declares its own delivery in its `delivery` rules; the runtime never guesses. Delivery is seven `on` values, one `deliver` level per rule, one `if` per rule, and structural ordering. The writing contract (flags, preview craft) is `crtr doc write -h` and its focused `crtr doc write --rule -h`; which owner to write under is `internal/agent-shaping`; where state lives is `internal/storage-tiers`. This document is the mechanics between those: what actually fires, when, and in what order.
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Delivery rules
|
|
15
15
|
|
|
16
|
-
A
|
|
16
|
+
A document with no delivery rules does exactly one thing: appears in the listing of the names above it. Everything beyond that is an explicit rule — `{on: <event>, match?, match-frontmatter?, if?, deliver: <level>}`. A rule's event constraints and optional `if` over the receiving node must both match; matching rules OR across and fold to their highest delivery (`content` > `preview` > `name`), with no cross-rule deny precedence. Multiple rules per event are legal. The events:
|
|
17
17
|
|
|
18
|
-
- **boot** — the frozen preference system snapshot and first-message knowledge catalog assembled when a context begins. No match; the
|
|
19
|
-
- **workspace-open** — first-message context when
|
|
20
|
-
- **read** — a `read` tool call returned a matching file: path globs vs the file's absolute path and basename, `./`-anchored globs vs its path relative to the
|
|
21
|
-
- **
|
|
18
|
+
- **boot** — the frozen preference system snapshot and first-message knowledge catalog assembled when a context begins. No match; the rule's presence is the match.
|
|
19
|
+
- **workspace-open** — first-message context when the node works in the repo that owns the document. Repo-owned documents only.
|
|
20
|
+
- **file-read** — a `read` tool call returned a matching file: path globs vs the file's absolute path and basename, `./`-anchored globs vs its path relative to the owning repo's checkout, `match-frontmatter` predicates over the read file's own YAML frontmatter.
|
|
21
|
+
- **document-read** — another document's full body entered context, including `crtr canvas read`: name globs vs its name, `./` anchored to this document's own name.
|
|
22
22
|
- **command** — a matching shell command ran: globs vs the whole command string, `*` crossing `/`. Delivery is post-execution — right for "you are now in this territory"; when the point is "don't run this at all," use `pre-command` instead.
|
|
23
|
-
- **pre-command** — a matching `bash` command is about to run. When the
|
|
23
|
+
- **pre-command** — a matching `bash` command is about to run. When the document has not been read yet, the command does not execute — the document comes back as the tool result instead, and the agent re-issues the command, which then runs. Use it to guarantee a document is seen before a sensitive action is taken. Same globs as `command`, matched at command position; `match` is required. A guardrail against the faithful-but-uninformed action, not an enforcement boundary.
|
|
24
|
+
- **slash-command** — the document is offered as a slash command in the viewer; invoking it delivers its content.
|
|
24
25
|
|
|
25
|
-
Nothing positional fires from where a
|
|
26
|
+
Nothing positional fires from where a document's name sits — only from its declared rules and its listing.
|
|
26
27
|
|
|
27
|
-
##
|
|
28
|
+
## Delivery levels
|
|
28
29
|
|
|
29
|
-
`
|
|
30
|
+
`deliver` sets how much delivers when a rule fires:
|
|
30
31
|
|
|
31
|
-
- `name` — the bare title. The practical boot floor: an agent can't reach for a
|
|
32
|
-
- `preview` — name + the `
|
|
33
|
-
- `content` — the full body inlined. Reserved for always-relevant
|
|
32
|
+
- `name` — the bare title. The practical boot floor: an agent can't reach for a document it has never seen named.
|
|
33
|
+
- `preview` — name + the `preview` line, rendered verbatim. The heart of progressive disclosure: one sentence that lets an agent decide whether to spend the read.
|
|
34
|
+
- `content` — the full body inlined. Reserved for always-relevant documents that are either a bullet's worth of text or a wholly-important operating guide (the workspace front door below).
|
|
34
35
|
|
|
35
|
-
Silence is the absence of
|
|
36
|
+
Silence is the absence of a rule; there is no `none` level. `summary` is **not** a level and never enters agent context — it exists for listings and search results. Disclosure is name → preview → whole thing; there is deliberately no "just the summary" level, because agents satisfice on abbreviations and never read the rest.
|
|
36
37
|
|
|
37
|
-
##
|
|
38
|
+
## Conditions
|
|
38
39
|
|
|
39
|
-
A
|
|
40
|
+
A rule's `if` is the eligibility predicate over the receiving node — kind, mode, lifecycle, orchestration depth, cwd, the repo it works in, profile — using the standard matcher vocabulary (`crtr doc write --rule -h`). When it fails, that rule delivers nothing; there is no document-level condition, so one document can choose a different level by node kind with two rules. No `if` means always eligible. Persona prose is just boot-content documents with an `if` (`if: {kind: developer, mode: base}`); guidance that should scale with effort is one predicate (`orchestration.depth: {gte: 2}`), not a mechanism.
|
|
40
41
|
|
|
41
42
|
## Listings and dedup
|
|
42
43
|
|
|
43
|
-
A full-body delivery is a read: `crtr
|
|
44
|
+
A full-body delivery is a read: `crtr canvas read <name>` and every content delivery expose, once per loaded context, the listing of each prefix of the document's name — one preview per document, one bare name per prefix that has names under it — then fire matching `document-read` rules. A document named `x` and documents named `x/…` coexist; reading `x` returns its body and the names under it. Content-delivered companions are read in turn until nothing new is delivered. `unlisted: true` suppresses a document from every listing. An owner's top level is never auto-listed — `crtr canvas list --type document` is the deliberate browse. Every content delivery, like every read, records a watch, so later edits reach the reader as pushes.
|
|
44
45
|
|
|
45
|
-
Every delivery registers
|
|
46
|
+
Every delivery registers the document or listing and its level in the loaded context's exposure ledger, kept in canvas.db. System and transcript ranks max-fold, so a higher level pierces a lower one while a content delivery silences later lower-level deliveries and duplicate read attachments. A strict resume preserves that ledger and the byte-stable preference snapshot; yield or another new-session boundary clears it and replaces them with exactly the new system and first-message snapshots.
|
|
46
47
|
|
|
47
|
-
##
|
|
48
|
+
## The reader's view
|
|
48
49
|
|
|
49
|
-
|
|
50
|
+
A rule applies to every node whose view includes the document's owner. A node's view is: its own node, the repos it works in (nearest first), its profile, its app, the user, and installed plugins, with crtr's own documents (plugin `crtr`) last. A bare name resolves in that same order, which is what lets a repo's document shadow one of crtr's own. A node's own documents are in no other node's view, so their rules apply only to that node.
|
|
50
51
|
|
|
51
|
-
Each
|
|
52
|
+
Each owner the selected profile manages carries a delivery limit — `none`, `name`, `preview`, or `content` — and that value is the maximum level anything that owner holds delivers at `boot` and `workspace-open`, whatever directory the node is working in. It only lowers: a rule authored below the maximum delivers at its authored level. `none` contributes nothing to either automatic event, so a `none` owner cannot shadow a same-named document from a wider owner — that wider document becomes the winner. An owner with no limit set delivers exactly what it authored.
|
|
52
53
|
|
|
53
|
-
The
|
|
54
|
+
The limit reaches those two events and nothing else. `file-read`, `document-read`, `command`, and `pre-command` rules fire at their authored levels; listings, `crtr canvas read`, `crtr canvas search`, config resolution, and plugin discovery all see every document the reader may read. An explicit `crtr canvas read` is itself a content delivery, so reading a capped document returns its whole body and records content — the upgrade path for a document the automatic events disclosed only by name or preview. `if` conditions apply to companion documents delivered by the `document-read` event, not to the deliberate read or its listings.
|
|
54
55
|
|
|
55
|
-
A workspace's front door is an ordinary
|
|
56
|
+
A workspace's front door is an ordinary repo-owned document carrying the rule pair `{on: workspace-open, deliver: content}` + `{on: file-read, match: "./**", deliver: content}` — the operating guide loads when a node works in that repo or reads its files, not in every boot catalog. `crtr doc lint` requires exactly one `workspace-open` content document per repo the profile manages. Several repos render broad-to-specific.
|
|
56
57
|
|
|
57
|
-
A
|
|
58
|
+
A repo's documents about one package or subsystem are named under its folder (for example `packages/api/…`) and keep their `file-read` rules: reading any file beneath that folder delivers them, filtered against what the loaded context already contains.
|
|
58
59
|
|
|
59
60
|
## Ordering
|
|
60
61
|
|
|
61
|
-
The boot render is structural, never a per-
|
|
62
|
+
The boot render is structural, never a per-document knob: documents group by boot level (content bodies as prose, then previews, then names), and within a group order general-to-specific — owner first (crtr → user → profile → outermost repo → nearest), then name depth (shorter names before deeper ones), then name. A numeric `NN-` prefix (stripped from the document's name) is the sparing escape hatch when an exact sequence must be pinned.
|
|
62
63
|
|
|
63
|
-
`crtr
|
|
64
|
+
`crtr doc lint` is the validator for the rest: body length for its delivery, the preview's shape when a rule delivers it at `preview`, links to nothing, and one `workspace-open` content document per repo the profile manages.
|
|
@@ -9,7 +9,7 @@ surfaces:
|
|
|
9
9
|
|
|
10
10
|
# How nodes and the canvas work (operational)
|
|
11
11
|
|
|
12
|
-
Every agent is a **node** in one directed graph (the **canvas**). Each node has a canvas row, its own context dir, and one detached headless broker engine; tmux panes are only viewer surfaces that attach to a broker. The graph's edges are `subscribes_to` — the **spine** — and they decide who-wakes-whom.
|
|
12
|
+
Every agent is a **node** in one directed graph (the **canvas**). Each node has a canvas row, its own documents and context dir, and one detached headless broker engine; tmux panes are only viewer surfaces that attach to a broker. The graph's edges are `subscribes_to` — the **spine** — and they decide who-wakes-whom.
|
|
13
13
|
|
|
14
14
|
The **daemon** (`crtrd`) is the sole owner of canvas persistent state: it is the only process that opens `canvas.db`, launches brokers, and writes runtime/model-auth, all behind an HTTP+WS API on a unix socket (dockerd model). Every `crtr` command and viewer is a pure client of that `/v1` API — they never open the store. A local interactive viewer still streams a node's broker socket (`view.sock`) directly, because that is broker IPC, not canvas state.
|
|
15
15
|
|
|
@@ -13,12 +13,14 @@ A **plugin** is a directory shipping substrate docs (knowledge and preferences)
|
|
|
13
13
|
|
|
14
14
|
Audience: LLM agents creating or maintaining a crtr plugin.
|
|
15
15
|
|
|
16
|
-
## When you need a plugin (vs
|
|
16
|
+
## When you need a plugin (vs documents a person or repo owns)
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Documents a person or repo owns are written with `crtr doc write --owner user|repo`; a plugin's documents ship as files in its `memory/` folder and belong to the plugin.
|
|
19
|
+
|
|
20
|
+
Each file under `memory/` becomes one document the plugin owns: its path below `memory/`, without `.md` (and without a `NN-` prefix), is the document's name, written `<plugin>/<name>` from other owners. Installing records the document and its delivery rules; its body is always read from the file. The file's frontmatter keys are the document's fields: `kind` (`knowledge` or `preference`), `preview`, `summary`, `delivery` (a list of rules, each with `on`, optional `match`/`match-frontmatter`, optional `if`, and `deliver`), `unlisted`, `why-it-exists`, `lint-ignore`, and `extensions`. Plugin documents are public and read-only; they change only when the plugin is updated.
|
|
19
21
|
|
|
20
22
|
Reach for a **plugin** when:
|
|
21
|
-
- You want to share
|
|
23
|
+
- You want to share documents across multiple projects or with other people.
|
|
22
24
|
- You want versioning + update mechanics (`crtr pkg plugin update --name <name>`).
|
|
23
25
|
- You want a marketplace to index the work — see [[internal/marketplaces]].
|
|
24
26
|
|
|
@@ -98,8 +100,8 @@ Each addendum is a nonempty object keyed by lowercase kebab-case local field nam
|
|
|
98
100
|
| `type` | yes | `boolean`, `string`, `number`, or `enum`. |
|
|
99
101
|
| `values` | enum only | A nonempty, unique list of nonempty strings. It is invalid for every other type. |
|
|
100
102
|
| `default` | no | A value matching `type`; an enum default must be one of `values`. |
|
|
101
|
-
| `write_help` | yes | Nonblank single-line text generated into the field catalog on `crtr
|
|
102
|
-
| `edit_help` | yes | Nonblank single-line text generated into the field catalog on `crtr
|
|
103
|
+
| `write_help` | yes | Nonblank single-line text generated into the field catalog on `crtr doc write -h`. |
|
|
104
|
+
| `edit_help` | yes | Nonblank single-line text generated into the field catalog on `crtr doc edit -h`. |
|
|
103
105
|
|
|
104
106
|
The generated catalogs show each installed field's full path, type (or enum alternatives), and default when declared. They are the maintained authoring surface; the addendum is their sole help source. Read those leaves for the set, change, and unset mechanics.
|
|
105
107
|
|
|
@@ -113,7 +115,7 @@ extensions:
|
|
|
113
115
|
|
|
114
116
|
`extensions` and each namespace must be mappings. Values may only be strings, booleans, or finite numbers; a declared field then must satisfy its own type, and an enum must be one of its declared strings. A plugin can declare only fields in its own manifest-name namespace. Two plugins can use the same local field name because their namespaces remain distinct.
|
|
115
117
|
|
|
116
|
-
A default is interpretation, not persistence: an absent declared field resolves to its default only in the effective metadata projection and is never written back into frontmatter. `crtr
|
|
118
|
+
A default is interpretation, not persistence: an absent declared field resolves to its default only in the effective metadata projection and is never written back into frontmatter. `crtr canvas read --fields` exposes exactly the explicit raw mapping. Structured `crtr --json canvas read` and `crtr --json canvas list --type document` expose only effective, valid metadata in `extensions`, overlaying explicit values on enabled declarations' defaults. Ordinary read and list rendering deliberately omit the metadata, and crouter never injects it into a memory body or agent-facing memory render.
|
|
117
119
|
|
|
118
120
|
Crouter maintains separate declaration views for validation and interpretation. Validation and generated authoring help use the closest installed declaration even when its plugin is disabled, so an existing value remains type-checked and can be changed or removed. Effective structured metadata uses only the winning enabled declaration. Therefore disabling a plugin leaves its raw frontmatter in place but omits that namespace and its defaults from effective output; it has no crouter behavior of its own. If the owner is removed or cannot resolve, the namespace is raw-only and inert, lint reports it as unresolved, and unrelated core-frontmatter edits preserve it. Re-enabling or reinstalling the owner restores explicit values and defaults to effective interpretation without rewriting the document.
|
|
119
121
|
|
|
@@ -135,11 +137,11 @@ Archive plugins declare the identical addendum in `bundle.json` beside `bundleVe
|
|
|
135
137
|
|
|
136
138
|
The archive validator applies the same closed declaration contract and copies the accepted block into the synthesized installed `plugin.json`; archive and source plugins therefore present one installed declaration model.
|
|
137
139
|
|
|
138
|
-
`crtr
|
|
140
|
+
`crtr doc lint` validates extension mappings and reports malformed mappings, unresolved namespaces, undeclared fields, non-scalar values, wrong types, and invalid enum values at their field paths. Installation and every update validate the candidate declaration plus every candidate `memory/**/*.md` document against the shared core-frontmatter and extension contracts before activation. The candidate's own declaration governs its package while it is checked, including when it changes or removes a declaration present in the installed version. Candidates are staged outside active plugin paths and replace the active package only after validation; a failed source, archive, or marketplace candidate never becomes reachable through an active plugin path, and the previous package and recorded version remain active.
|
|
139
141
|
|
|
140
142
|
## Plugin kinds
|
|
141
143
|
|
|
142
|
-
A plugin can ship a complete persona kind: declare the registry entry in the manifest's `kinds` block, and author the persona prose as ordinary plugin
|
|
144
|
+
A plugin can ship a complete persona kind: declare the registry entry in the manifest's `kinds` block, and author the persona prose as ordinary plugin documents with the rule `{on: boot, if: {kind: <name>, mode: base}, deliver: content}` (and one with `if: {kind: <name>, mode: orchestrator}`) — the same shape a builtin kind uses at `kinds/<kind>/00-base.md`. Nothing else is needed: `if` conditions evaluate uniformly over plugin documents, so the persona splices into any node launched with that kind.
|
|
143
145
|
|
|
144
146
|
`readMergedLaunchConfig` layers an enabled plugin's `kinds` entries directly above the builtin registry and below its host scope's own `config.json` — full precedence: builtin → user-scope plugins → user config → profile → per project root (that root's plugins → that root's config). So a plugin kind appears in `crtr node new -h` and is launchable like any other, and a user or project `config.json` can still patch or shadow it. Plugins within one scope layer name-sorted; the scope's own config always wins.
|
|
145
147
|
|
|
@@ -194,7 +196,7 @@ Four ways a plugin lands in a scope:
|
|
|
194
196
|
mkdir -p my-plugin/.crouter-plugin my-plugin/memory
|
|
195
197
|
$EDITOR my-plugin/.crouter-plugin/plugin.json # write the manifest
|
|
196
198
|
cd my-plugin
|
|
197
|
-
$EDITOR my-plugin/memory/my-first-doc.md # author the doc — `crtr
|
|
199
|
+
$EDITOR my-plugin/memory/my-first-doc.md # author the doc — `crtr doc write -h` is the field + delivery-rule guide
|
|
198
200
|
|
|
199
201
|
# Symlink for fast iteration — no clone, edits land immediately
|
|
200
202
|
ln -s $(pwd) ~/.crouter/plugins/my-plugin
|
|
@@ -202,9 +204,9 @@ ln -s $(pwd) ~/.crouter/plugins/my-plugin
|
|
|
202
204
|
# Verify
|
|
203
205
|
crtr pkg plugin list # my-plugin appears
|
|
204
206
|
crtr pkg plugin show my-plugin # lists its docs
|
|
205
|
-
crtr
|
|
207
|
+
crtr canvas read my-plugin/my-first-doc # resolve it under the plugin's name
|
|
206
208
|
crtr sys doctor # validates the manifest
|
|
207
|
-
crtr
|
|
209
|
+
crtr doc lint # validates document fields and links
|
|
208
210
|
```
|
|
209
211
|
|
|
210
212
|
When ready to share: push to a git remote; anyone can `crtr pkg plugin install <url> --scope user`.
|
|
@@ -223,9 +225,9 @@ Standard semver:
|
|
|
223
225
|
|
|
224
226
|
## Enable/disable
|
|
225
227
|
|
|
226
|
-
`crtr pkg plugin disable <name>` flips the per-scope config without removing files. Disabled plugins are hidden from `crtr
|
|
228
|
+
`crtr pkg plugin disable <name>` flips the per-scope config without removing files. Disabled plugins are hidden from `crtr canvas list` and don't resolve via `crtr canvas read <name>`. Re-enable with `crtr pkg plugin enable <name>`.
|
|
227
229
|
|
|
228
|
-
Individual
|
|
230
|
+
Individual documents inside an enabled plugin are hidden by giving them no delivery rules plus `unlisted: true` (or a rule whose `if` fails), not by a command — see `crtr doc write --rule -h`.
|
|
229
231
|
|
|
230
232
|
## What goes in a plugin
|
|
231
233
|
|
|
@@ -410,7 +412,7 @@ Both relative `argv[0]` and `cwd` resolve against the declaring scope's authorin
|
|
|
410
412
|
- Each scope `humanActions` declaration is reported as a `humanActions:<name>` check. Doctor validates names, argv shape, cwd, executable existence, and execute permission without executing the action; plugins and profiles never contribute this block.
|
|
411
413
|
- When an enabled plugin declares `requires`, each `requires:<name>` check names the plugin and resolved executable path on pass, or carries its install hint as remediation on fail. The executable is never run; a malformed declaration fails source-plugin install and update, while an absent executable remains advisory.
|
|
412
414
|
|
|
413
|
-
`crtr
|
|
415
|
+
`crtr doc lint` checks the documents under `memory/`: fields parse, valid `kind`, valid `delivery` rules. Run `crtr doc write -h` for the field + delivery-rule guide. Other sibling artifact dirs (`rules/`, `agents/`, `hooks/`) are validated by their respective specs as those land.
|
|
414
416
|
|
|
415
417
|
## Cross-publishing with Claude Code
|
|
416
418
|
|
|
@@ -15,17 +15,17 @@ crtr state is split into two tiers with distinct ownership and durability. This
|
|
|
15
15
|
|
|
16
16
|
## 1. Scope root — durable user/repo content and prepared support material
|
|
17
17
|
|
|
18
|
-
`~/.crouter/` (user scope) or `<project>/.crouter/` (project scope), resolved by `src/core/scope.ts`. Durable content includes `
|
|
18
|
+
`~/.crouter/` (user scope) or `<project>/.crouter/` (project scope), resolved by `src/core/scope.ts`. Durable content includes `prompts/`, `plugins/`, `marketplaces/`, `personas/`, and `config.json`; user-authored content belongs to the user scope and repo-authored content to the project scope. `prompts/<name>.md` becomes `/<name>` in every node, with nested paths becoming colon-namespaced commands and the nearest resolved scope winning.
|
|
19
19
|
|
|
20
|
-
`~/.crouter/support/<reference>/` is user-scope prepared local diagnostic material. A reference contains the prepared support bundle and manifest for explicit handling; it is not
|
|
20
|
+
`~/.crouter/support/<reference>/` is user-scope prepared local diagnostic material. A reference contains the prepared support bundle and manifest for explicit handling; it is not a document, a node context artifact, or a project-scoped support store. Preparation is local and zero-egress; submission is an explicit operation to its verified destination. Invocation, output, and artifact details belong on the relevant command leaf `-h` surfaces.
|
|
21
21
|
|
|
22
22
|
User-wide content with no cwd dimension also belongs here: `~/.crouter/profile-defaults.json` maps realpath'd directories to their selected profile, and `~/.crouter/prompt-reviews/` holds prompt-review exports.
|
|
23
23
|
|
|
24
24
|
## 2. Canvas home — node-graph runtime state, node artifacts, and bounded diagnostics
|
|
25
25
|
|
|
26
|
-
`~/.crouter/canvas/` (overridable with `CRTR_HOME`) is the cwd-agnostic node-graph home. `canvas.db` is the SQLite WAL topology store for nodes and edges, including durable tmux-pane focus. `nodes/<node_id>/` owns `meta.json`, `context/`, `
|
|
26
|
+
`~/.crouter/canvas/` (overridable with `CRTR_HOME`) is the cwd-agnostic node-graph home. `canvas.db` is the SQLite WAL topology store for nodes and edges, including durable tmux-pane focus. `nodes/<node_id>/` owns `meta.json`, `context/`, `messages/`, `inbox.jsonl`, `transcript.jsonl`, `session.ptr`, and `job/` state. Human ticket files (`page.json`, `page.tsx`, `page.js`, optional `reply-route.json`, `action.json`, `response.json`, `review.json`, and `branch-point.jsonl`) live under `nodes/`, the single derived ticket root. A ticket is not owned by a node: reply-bearing tickets target the bridge recorded in `reply-route.json`, while a ticket created programmatically has no bridge and outlives the process that created it. `action.json` is the frozen action binding — the declared `humanActions` name, its resolved argv and cwd, and the opaque payload — written once at creation and never rewritten, so a later config edit cannot redirect an existing request. Whichever writer wins settlement is the one that queues delivery; the attempt schedule itself is crtrd scheduling state in `canvas.db`, not a ticket file, and delivery never rewrites the ticket's terminal result. Document bodies are content-addressed files under `bodies/`; their records, revisions, delivery rules, edges and watches are rows in `canvas.db`. A repo's documents also travel on the repo's git ref `refs/crtr/docs`.
|
|
27
27
|
|
|
28
|
-
Specifications and plans are
|
|
28
|
+
Specifications and plans are documents their node owns. They are deleted with that node unless a kept document links to them or they are given another owner (`crtr doc move --owner`).
|
|
29
29
|
|
|
30
30
|
### Canonical event streams
|
|
31
31
|
|
|
@@ -10,4 +10,4 @@ surfaces:
|
|
|
10
10
|
at: content
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
`crtr
|
|
13
|
+
`crtr canvas read --fields <name>` includes the document's fields. Revise a document with `crtr doc edit` (recorded, with a rationale), or browse the inventory with `crtr canvas list --type document`.
|