@ouro.bot/cli 0.1.0-alpha.158 → 0.1.0-alpha.1581
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/LICENSE +21 -0
- package/README.md +158 -42
- package/RepairGuide.ouro/agent.json +5 -0
- package/RepairGuide.ouro/psyche/IDENTITY.md +19 -0
- package/RepairGuide.ouro/psyche/SOUL.md +55 -0
- package/RepairGuide.ouro/skills/diagnose-broken-remote.md +63 -0
- package/RepairGuide.ouro/skills/diagnose-stacked-typed-issues.md +35 -0
- package/RepairGuide.ouro/skills/diagnose-sync-blocked.md +54 -0
- package/RepairGuide.ouro/skills/diagnose-vault-expired.md +60 -0
- package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/agent.json +4 -2
- package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/SOUL.md +2 -2
- package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/the-serpent.md +1 -1
- package/assets/bluebubbles-host +264 -0
- package/assets/sanctuary-host-launcher.sh +16 -0
- package/changelog.json +9216 -44
- package/deploy/unraid/Dockerfile +85 -0
- package/deploy/unraid/INSTALL.md +64 -0
- package/deploy/unraid/README.txt +3034 -0
- package/deploy/unraid/audit-container-spec.sh +4 -0
- package/deploy/unraid/container-runtime.json +1 -0
- package/deploy/unraid/credit-gateway.md +95 -0
- package/deploy/unraid/docker-man-template-transaction.mjs +733 -0
- package/deploy/unraid/docker-man-template-xml.cjs +105 -0
- package/deploy/unraid/github_known_hosts +3 -0
- package/deploy/unraid/install.sh +274 -0
- package/deploy/unraid/migrate-sanctuary-bundle.mjs +63 -0
- package/deploy/unraid/ouro-events/bootstrap-spool.sh +92 -0
- package/deploy/unraid/ouro-events/emit-event.mjs +310 -0
- package/deploy/unraid/ouro-events/emit-usenet-event.sh +54 -0
- package/deploy/unraid/ouro-events/install-usenet-guard.sh +435 -0
- package/deploy/unraid/ouro-events/usenet-health.sh +176 -0
- package/deploy/unraid/ouro-host-lock.mjs +245 -0
- package/deploy/unraid/ouro-sync-ssh +98 -0
- package/deploy/unraid/ouro-sync.sudoers +3 -0
- package/deploy/unraid/sanctuary-acceptance-adapter.sh +43 -0
- package/deploy/unraid/sanctuary-acceptance-contract.json +198 -0
- package/deploy/unraid/sanctuary-acceptance-harness.sh +23 -0
- package/deploy/unraid/sanctuary-authority-installation.json +36 -0
- package/deploy/unraid/sanctuary-authority-service.sh +30 -0
- package/deploy/unraid/sanctuary-butler-upgrade.mjs +1604 -0
- package/deploy/unraid/sanctuary-deployment-target.mjs +710 -0
- package/deploy/unraid/sanctuary-replay-gate.mjs +2781 -0
- package/deploy/unraid/sanctuary-safe-rename.py +24 -0
- package/deploy/unraid/sanctuary-sync-cutover.sh +1039 -0
- package/deploy/unraid/sanctuary-unit16-host-broker.mjs +2088 -0
- package/deploy/unraid/sanctuary-unit16-run.sh +570 -0
- package/deploy/unraid/sanctuary-unit18-target-audit.sh +27 -0
- package/deploy/unraid/sanctuary.ouro/agent.json +72 -0
- package/deploy/unraid/sanctuary.ouro/arc/README.md +3 -0
- package/deploy/unraid/sanctuary.ouro/awaiting/house-care-sweep.md +17 -0
- package/deploy/unraid/sanctuary.ouro/bundle-meta.json +5 -0
- package/deploy/unraid/sanctuary.ouro/habits/sanctuary-health.md +8 -0
- package/deploy/unraid/sanctuary.ouro/mcp/media-mcp.mjs +2533 -0
- package/deploy/unraid/sanctuary.ouro/product/PRODUCT.md +13 -0
- package/deploy/unraid/sanctuary.ouro/provider-readiness.json +11 -0
- package/deploy/unraid/sanctuary.ouro/psyche/ASPIRATIONS.md +5 -0
- package/deploy/unraid/sanctuary.ouro/psyche/IDENTITY.md +7 -0
- package/deploy/unraid/sanctuary.ouro/psyche/LORE.md +7 -0
- package/deploy/unraid/sanctuary.ouro/psyche/SOUL.md +15 -0
- package/deploy/unraid/sanctuary.ouro/psyche/TACIT.md +3 -0
- package/deploy/unraid/sanctuary.ouro/state/policy/steward.json +7 -0
- package/deploy/unraid/sanctuary.ouro/tool-profiles.json +274 -0
- package/deploy/unraid/sanctuary.xml +30 -0
- package/desk.lock.json +8 -0
- package/dist/a2a/approval-relay-forward.js +117 -0
- package/dist/a2a/approval-relay.js +95 -0
- package/dist/a2a/approval-request-wire.js +123 -0
- package/dist/a2a/card.js +57 -0
- package/dist/a2a/client.js +331 -0
- package/dist/a2a/config.js +50 -0
- package/dist/a2a/delegated-command-grants.js +93 -0
- package/dist/a2a/delegated-command.js +200 -0
- package/dist/a2a/delegation-stores.js +56 -0
- package/dist/a2a/did-resolution.js +205 -0
- package/dist/a2a/escalation-grants.js +84 -0
- package/dist/a2a/escalation-wiring.js +60 -0
- package/dist/a2a/identity.js +258 -0
- package/dist/a2a/inbound-share.js +131 -0
- package/dist/a2a/mission-result-wire.js +265 -0
- package/dist/a2a/onboarding.js +133 -0
- package/dist/a2a/operator-trust.js +399 -0
- package/dist/a2a/outbox-client.js +59 -0
- package/dist/a2a/outbox-store.js +245 -0
- package/dist/a2a/outbox-wire.js +106 -0
- package/dist/a2a/pin-store.js +167 -0
- package/dist/a2a/refusals.js +55 -0
- package/dist/a2a/relay-client.js +106 -0
- package/dist/a2a/relay-config-vault.js +64 -0
- package/dist/a2a/relay-contacts.js +120 -0
- package/dist/a2a/relay-inbox.js +360 -0
- package/dist/a2a/relay-retirements.js +89 -0
- package/dist/a2a/replay-grant-holders.js +33 -0
- package/dist/a2a/replay-harness.js +188 -0
- package/dist/a2a/resolution-proof.js +53 -0
- package/dist/a2a/sealed-chat.js +142 -0
- package/dist/a2a/seen-ledger.js +216 -0
- package/dist/a2a/server.js +1088 -0
- package/dist/a2a/task-store.js +69 -0
- package/dist/a2a/transport.js +100 -0
- package/dist/a2a/trust-commands.js +203 -0
- package/dist/a2a/trusted-files.js +185 -0
- package/dist/a2a/types.js +3 -0
- package/dist/actions/generated/mailbox/actions.json +592 -0
- package/dist/actions/generated/mailbox/commands.json +181 -0
- package/dist/actions/generated/mailbox/mcp.json +454 -0
- package/dist/actions/generated/mailbox-tools/tools.json +516 -0
- package/dist/arc/attention-types.js +8 -0
- package/dist/arc/cares.js +360 -0
- package/dist/arc/episodes.js +118 -0
- package/dist/arc/evolution.js +490 -0
- package/dist/arc/flight-recorder.js +1009 -0
- package/dist/arc/intentions.js +134 -0
- package/dist/arc/json-store.js +117 -0
- package/dist/arc/obligations.js +386 -0
- package/dist/arc/packets.js +336 -0
- package/dist/arc/presence.js +185 -0
- package/dist/arc/task-lifecycle.js +57 -0
- package/dist/commerce/store.js +755 -0
- package/dist/commerce/types.js +3 -0
- package/dist/eval/assertions/index.js +378 -0
- package/dist/eval/billing-guard.js +23 -0
- package/dist/eval/budget.js +142 -0
- package/dist/eval/domain/case.js +115 -0
- package/dist/eval/domain/stats.js +19 -0
- package/dist/eval/guest-entry.js +18 -0
- package/dist/eval/h-guest-entry.js +19 -0
- package/dist/eval/interview-entry.js +174 -0
- package/dist/eval/interview-grade-entry.js +36 -0
- package/dist/eval/interview-guest-entry.js +19 -0
- package/dist/eval/interviews/allocation.js +90 -0
- package/dist/eval/interviews/final.js +133 -0
- package/dist/eval/interviews/grader.js +209 -0
- package/dist/eval/interviews/guest/arms.js +173 -0
- package/dist/eval/interviews/guest/ax/ax-command.js +792 -0
- package/dist/eval/interviews/guest/ax/effects.js +51 -0
- package/dist/eval/interviews/guest/ax/exit-codes.js +51 -0
- package/dist/eval/interviews/guest/ax/help.js +181 -0
- package/dist/eval/interviews/guest/ax/mcp.js +246 -0
- package/dist/eval/interviews/guest/ax/outcome.js +211 -0
- package/dist/eval/interviews/guest/ax/output.js +53 -0
- package/dist/eval/interviews/guest/ax/precise-copy.js +200 -0
- package/dist/eval/interviews/guest/ax/problem.js +95 -0
- package/dist/eval/interviews/guest/ax/voice.js +83 -0
- package/dist/eval/interviews/guest/ax/wait.js +158 -0
- package/dist/eval/interviews/guest/books-core.js +54 -0
- package/dist/eval/interviews/guest/cli-shell.js +267 -0
- package/dist/eval/interviews/guest/h/codex.js +201 -0
- package/dist/eval/interviews/guest/h/fidelity.js +59 -0
- package/dist/eval/interviews/guest/h/openhands.js +176 -0
- package/dist/eval/interviews/guest/h/run.js +99 -0
- package/dist/eval/interviews/guest/h/wire.js +403 -0
- package/dist/eval/interviews/guest/loop.js +87 -0
- package/dist/eval/interviews/guest/operations.js +108 -0
- package/dist/eval/interviews/guest/run.js +81 -0
- package/dist/eval/interviews/guest/u/arms.js +268 -0
- package/dist/eval/interviews/h/kit.js +119 -0
- package/dist/eval/interviews/latch.js +143 -0
- package/dist/eval/interviews/protocol.js +120 -0
- package/dist/eval/interviews/rewrite.js +57 -0
- package/dist/eval/interviews/runner.js +354 -0
- package/dist/eval/interviews/u/kit.js +117 -0
- package/dist/eval/kill-switch.js +33 -0
- package/dist/eval/month-ledger.js +95 -0
- package/dist/eval/readback/hedges.js +39 -0
- package/dist/eval/remote-entry.js +32 -0
- package/dist/eval/report.js +85 -0
- package/dist/eval/run-command.js +188 -0
- package/dist/eval/run-entry.js +93 -0
- package/dist/eval/sandbox/agent-profile.js +74 -0
- package/dist/eval/sandbox/declared-gaps.js +17 -0
- package/dist/eval/sandbox/docker.js +353 -0
- package/dist/eval/sandbox/guest.js +55 -0
- package/dist/eval/sandbox/host-lock.js +62 -0
- package/dist/eval/sandbox/images.js +39 -0
- package/dist/eval/sandbox/oracle.js +32 -0
- package/dist/eval/sandbox/projection.js +127 -0
- package/dist/eval/sandbox/readback.js +137 -0
- package/dist/eval/sandbox/remote.js +102 -0
- package/dist/eval/sandbox/slugger-projection.js +377 -0
- package/dist/eval/self-test.js +84 -0
- package/dist/eval/stop-command.js +71 -0
- package/dist/eval/stop-entry.js +46 -0
- package/dist/eval/targets/index.js +127 -0
- package/dist/eval/transport/provider-proxy.js +262 -0
- package/dist/eval/transport/synthetic-sanctuary.js +111 -0
- package/dist/eval/transport/telegram-turn.js +241 -0
- package/dist/eval/watch/cli.js +63 -0
- package/dist/eval/watch/guarded-fs.js +254 -0
- package/dist/eval/watch/log-reader.js +99 -0
- package/dist/eval/watch/rows.js +143 -0
- package/dist/eval/watch/run-watch.js +160 -0
- package/dist/eval/watch-entry.js +26 -0
- package/dist/gateway/keys.js +117 -0
- package/dist/gateway/server.js +429 -0
- package/dist/heart/active-work.js +421 -45
- package/dist/heart/agent-entry.js +255 -4
- package/dist/heart/approval-files.js +94 -0
- package/dist/heart/approval-store.js +1000 -0
- package/dist/heart/atomic-file.js +115 -0
- package/dist/heart/attachments/downloaded-store.js +89 -0
- package/dist/heart/attachments/image-normalize.js +201 -0
- package/dist/heart/attachments/materialize.js +97 -0
- package/dist/heart/attachments/originals.js +102 -0
- package/dist/heart/attachments/render.js +29 -0
- package/dist/heart/attachments/sources/bluebubbles.js +155 -0
- package/dist/heart/attachments/sources/cli-local-file.js +78 -0
- package/dist/heart/attachments/sources/downloaded.js +76 -0
- package/dist/heart/attachments/sources/index.js +19 -0
- package/dist/heart/attachments/store.js +132 -0
- package/dist/heart/attachments/transcribe-audio.js +231 -0
- package/dist/heart/attachments/types.js +93 -0
- package/dist/heart/attachments/understand.js +195 -0
- package/dist/heart/auth/auth-flow.js +589 -0
- package/dist/heart/auth/github-device-login.js +104 -0
- package/dist/heart/autonomy-budget.js +426 -0
- package/dist/heart/awaiting/a2a-await-delivery.js +109 -0
- package/dist/heart/awaiting/await-alert.js +152 -0
- package/dist/heart/awaiting/await-expiry.js +143 -0
- package/dist/heart/awaiting/await-loader.js +91 -0
- package/dist/heart/awaiting/await-parser.js +152 -0
- package/dist/heart/awaiting/await-runtime-state.js +130 -0
- package/dist/heart/awaiting/await-scheduler.js +462 -0
- package/dist/heart/background-operations.js +281 -0
- package/dist/heart/bluebubbles-host-account.js +78 -0
- package/dist/heart/bridges/manager.js +137 -17
- package/dist/heart/bridges/store.js +14 -2
- package/dist/heart/bundle-state.js +168 -0
- package/dist/heart/chat-interaction.js +69 -0
- package/dist/heart/commitments.js +44 -14
- package/dist/heart/config-registry.js +340 -0
- package/dist/heart/config.js +191 -140
- package/dist/heart/context-loss-gauntlet.js +387 -0
- package/dist/heart/context-loss-sentinel.js +1206 -0
- package/dist/heart/core.js +2760 -695
- package/dist/heart/cross-chat-delivery.js +29 -22
- package/dist/heart/daemon/agent-config-check.js +494 -0
- package/dist/heart/daemon/agent-discovery.js +304 -3
- package/dist/heart/daemon/agent-home.js +409 -0
- package/dist/heart/daemon/agent-service.js +210 -28
- package/dist/heart/daemon/agentic-repair.js +548 -0
- package/dist/heart/daemon/app-sessions-record.js +82 -0
- package/dist/heart/daemon/await-private-wake.js +59 -0
- package/dist/heart/daemon/bluebubbles-cli-integration.js +71 -0
- package/dist/heart/daemon/bluebubbles-health-diagnostics.js +122 -0
- package/dist/heart/daemon/bluebubbles-host-protocol.js +433 -0
- package/dist/heart/daemon/bluebubbles-host.js +273 -0
- package/dist/heart/daemon/boot-sync-probe.js +223 -0
- package/dist/heart/daemon/cadence.js +110 -0
- package/dist/heart/daemon/cli-arg-redaction.js +26 -0
- package/dist/heart/daemon/cli-commands/a2a.js +26 -0
- package/dist/heart/daemon/cli-commands/cards.js +68 -0
- package/dist/heart/daemon/cli-commands/coding-tools.js +13 -0
- package/dist/heart/daemon/cli-commands/desk.js +43 -0
- package/dist/heart/daemon/cli-commands/dns.js +13 -0
- package/dist/heart/daemon/cli-commands/entry-points.js +182 -0
- package/dist/heart/daemon/cli-commands/failure-code.js +11 -0
- package/dist/heart/daemon/cli-commands/friends.js +18 -0
- package/dist/heart/daemon/cli-commands/habits.js +15 -0
- package/dist/heart/daemon/cli-commands/lifecycle.js +42 -0
- package/dist/heart/daemon/cli-commands/mail.js +11 -0
- package/dist/heart/daemon/cli-commands/mind.js +25 -0
- package/dist/heart/daemon/cli-commands/presence.js +28 -0
- package/dist/heart/daemon/cli-commands/providers.js +20 -0
- package/dist/heart/daemon/cli-commands/rsvp.js +20 -0
- package/dist/heart/daemon/cli-commands/shepherd.js +17 -0
- package/dist/heart/daemon/cli-commands/vault.js +23 -0
- package/dist/heart/daemon/cli-defaults.js +997 -0
- package/dist/heart/daemon/cli-desk.js +346 -0
- package/dist/heart/daemon/cli-exec.js +9688 -0
- package/dist/heart/daemon/cli-gate.js +198 -0
- package/dist/heart/daemon/cli-help.js +800 -0
- package/dist/heart/daemon/cli-manifest.js +115 -0
- package/dist/heart/daemon/cli-parse.js +3635 -0
- package/dist/heart/daemon/cli-render-doctor.js +57 -0
- package/dist/heart/daemon/cli-render.js +816 -0
- package/dist/heart/daemon/cli-types.js +8 -0
- package/dist/heart/daemon/compile-cache.js +69 -0
- package/dist/heart/daemon/connect-bay.js +323 -0
- package/dist/heart/daemon/container-credential-bootstrap.js +273 -0
- package/dist/heart/daemon/container-healthcheck.js +123 -0
- package/dist/heart/daemon/container-runtime.js +97 -0
- package/dist/heart/daemon/container-spec-auditor-main.js +187 -0
- package/dist/heart/daemon/container-spec-auditor.js +261 -0
- package/dist/heart/daemon/daemon-bootstrap-startup.js +115 -0
- package/dist/heart/daemon/daemon-cli.js +29 -3243
- package/dist/heart/daemon/daemon-entry.js +1074 -55
- package/dist/heart/daemon/daemon-health.js +51 -1
- package/dist/heart/daemon/daemon-rollup.js +57 -0
- package/dist/heart/daemon/daemon-runtime-sync.js +147 -13
- package/dist/heart/daemon/daemon-tombstone.js +116 -3
- package/dist/heart/daemon/daemon.js +1983 -131
- package/dist/heart/daemon/desk-admin.js +420 -0
- package/dist/heart/daemon/dns-workflow.js +394 -0
- package/dist/heart/daemon/doctor-types.js +8 -0
- package/dist/heart/daemon/doctor.js +1890 -0
- package/dist/heart/daemon/freshness.js +345 -0
- package/dist/heart/daemon/habit-private-wake.js +61 -0
- package/dist/heart/daemon/health-monitor.js +242 -12
- package/dist/heart/daemon/home-filesystem.js +93 -0
- package/dist/heart/daemon/hook-post-tool-use.js +149 -0
- package/dist/heart/daemon/hooks/agent-config-v2.js +33 -0
- package/dist/heart/daemon/hooks/bundle-meta.js +135 -1
- package/dist/heart/daemon/http-health-probe.js +80 -0
- package/dist/heart/daemon/human-command-screens.js +234 -0
- package/dist/heart/daemon/human-readiness.js +114 -0
- package/dist/heart/daemon/inner-status.js +7 -18
- package/dist/heart/daemon/interactive-repair.js +394 -0
- package/dist/heart/daemon/launchd.js +40 -8
- package/dist/heart/daemon/linux-service.js +382 -0
- package/dist/heart/daemon/log-tailer.js +79 -10
- package/dist/heart/daemon/logs-prune.js +132 -0
- package/dist/heart/daemon/mailroom-copy-proof.js +158 -0
- package/dist/heart/daemon/mcp-canary.js +525 -0
- package/dist/heart/daemon/message-router.js +65 -5
- package/dist/heart/daemon/migrate-to-desk.js +848 -0
- package/dist/heart/daemon/os-cron-deps.js +5 -0
- package/dist/heart/daemon/os-cron.js +45 -15
- package/dist/heart/daemon/ouro-bot-entry.js +8 -3
- package/dist/heart/daemon/ouro-cli-main.js +50 -0
- package/dist/heart/daemon/ouro-entry.js +43 -20
- package/dist/heart/daemon/plugin-cli.js +432 -0
- package/dist/heart/daemon/portable-git-install.js +265 -0
- package/dist/heart/daemon/portable-git.js +179 -0
- package/dist/heart/daemon/presence-daemon.js +265 -0
- package/dist/heart/daemon/presence-roster.js +260 -0
- package/dist/heart/daemon/presence.js +469 -0
- package/dist/heart/daemon/process-manager.js +790 -71
- package/dist/heart/daemon/process-tree.js +109 -0
- package/dist/heart/daemon/provider-discovery.js +171 -0
- package/dist/heart/daemon/provider-ping-progress.js +83 -0
- package/dist/heart/daemon/prunable-bundle.js +144 -0
- package/dist/heart/daemon/pulse.js +511 -0
- package/dist/heart/daemon/readiness-repair.js +365 -0
- package/dist/heart/daemon/run-hooks.js +2 -0
- package/dist/heart/daemon/runtime-logging.js +54 -14
- package/dist/heart/daemon/runtime-metadata.js +2 -30
- package/dist/heart/daemon/runtime-mode.js +13 -2
- package/dist/heart/daemon/runtime-replacement-handoff.js +207 -0
- package/dist/heart/daemon/sanctuary-acceptance-adapter.js +2659 -0
- package/dist/heart/daemon/sanctuary-acceptance-harness.js +1832 -0
- package/dist/heart/daemon/sanctuary-acceptance-marker.js +267 -0
- package/dist/heart/daemon/sanctuary-acceptance-scenarios.js +956 -0
- package/dist/heart/daemon/sanctuary-authority-codec.js +86 -0
- package/dist/heart/daemon/sanctuary-authority-epoch.js +291 -0
- package/dist/heart/daemon/sanctuary-authority-installation.js +161 -0
- package/dist/heart/daemon/sanctuary-authority-ledger.js +241 -0
- package/dist/heart/daemon/sanctuary-authority-root-lifecycle.js +1370 -0
- package/dist/heart/daemon/sanctuary-authority-vault-migration.js +79 -0
- package/dist/heart/daemon/sanctuary-bundle-migration.js +974 -0
- package/dist/heart/daemon/sanctuary-host-authority.js +1008 -0
- package/dist/heart/daemon/sanctuary-host-detached-supervisor.js +493 -0
- package/dist/heart/daemon/sanctuary-host-executor.js +670 -0
- package/dist/heart/daemon/sanctuary-host-linux-kernel.js +334 -0
- package/dist/heart/daemon/sanctuary-host-supervisor-entry.js +210 -0
- package/dist/heart/daemon/sanctuary-host-supervisor.js +95 -0
- package/dist/heart/daemon/sanctuary-package-management.js +113 -0
- package/dist/heart/daemon/sanctuary-scheduler-liveness.js +227 -0
- package/dist/heart/daemon/sanctuary-scheduler-origin.js +132 -0
- package/dist/heart/daemon/sanctuary-telegram-authority-entry.js +481 -0
- package/dist/heart/daemon/sanctuary-telegram-authority-gateway.js +614 -0
- package/dist/heart/daemon/sanctuary-telegram-authority-service.js +763 -0
- package/dist/heart/daemon/sanctuary-telegram-test-driver-entry.js +97 -0
- package/dist/heart/daemon/sanctuary-telegram-test-driver.js +294 -0
- package/dist/heart/daemon/sense-manager.js +1071 -60
- package/dist/heart/daemon/skill-management-installer.js +1 -1
- package/dist/heart/daemon/socket-client.js +180 -12
- package/dist/heart/daemon/stale-bundle-prune.js +113 -0
- package/dist/heart/daemon/startup-tui.js +339 -0
- package/dist/heart/daemon/state-retention.js +234 -0
- package/dist/heart/daemon/supercronic-supervisor.js +282 -0
- package/dist/heart/daemon/task-scheduler.js +115 -15
- package/dist/heart/daemon/terminal-ui.js +503 -0
- package/dist/heart/daemon/thoughts.js +133 -49
- package/dist/heart/daemon/up-progress.js +366 -0
- package/dist/heart/daemon/vault-items.js +56 -0
- package/dist/heart/daemon/vault-outage.js +74 -0
- package/dist/heart/delegated-work-report.js +115 -0
- package/dist/heart/delegation.js +0 -3
- package/dist/heart/external-events/router.js +1556 -0
- package/dist/heart/failure-reports.js +398 -0
- package/dist/heart/file-lock.js +109 -0
- package/dist/heart/frontend-approval-runtime.js +506 -0
- package/dist/heart/frontend-journal.js +215 -0
- package/dist/heart/frontend-session-service.js +330 -0
- package/dist/heart/frontend-socket-client.js +173 -0
- package/dist/heart/frontend-socket.js +434 -0
- package/dist/heart/frontend-turn-errors.js +20 -0
- package/dist/heart/git-binary.js +115 -0
- package/dist/heart/habits/habit-cancel.js +810 -0
- package/dist/heart/habits/habit-lifecycle.js +1324 -0
- package/dist/heart/{daemon → habits}/habit-migration.js +41 -28
- package/dist/heart/habits/habit-parser.js +258 -0
- package/dist/heart/habits/habit-runtime-state.js +93 -0
- package/dist/heart/habits/habit-scheduler.js +667 -0
- package/dist/heart/habits/habit-session-summary.js +318 -0
- package/dist/heart/habits/habit-session.js +638 -0
- package/dist/heart/{daemon → hatch}/hatch-flow.js +60 -36
- package/dist/heart/{daemon → hatch}/hatch-specialist.js +6 -8
- package/dist/heart/{daemon → hatch}/specialist-prompt.js +10 -6
- package/dist/heart/hatch/specialist-tools.js +395 -0
- package/dist/heart/identity.js +404 -60
- package/dist/heart/kept-notes.js +289 -0
- package/dist/heart/letters/doors-tools.js +63 -0
- package/dist/heart/letters/doors.js +436 -0
- package/dist/heart/letters/letter-index.js +89 -0
- package/dist/heart/letters/letter.js +247 -0
- package/dist/heart/letters/store.js +210 -0
- package/dist/heart/letters/writer.js +298 -0
- package/dist/heart/machine-identity.js +175 -0
- package/dist/heart/mail-import-discovery.js +356 -0
- package/dist/heart/mcp/mcp-server.js +922 -0
- package/dist/heart/migrate-config.js +100 -0
- package/dist/heart/model-capabilities.js +98 -16
- package/dist/heart/model-limits.js +49 -0
- package/dist/heart/optional-packages.js +77 -0
- package/dist/heart/orientation-frame.js +393 -0
- package/dist/heart/platform.js +81 -0
- package/dist/heart/primitives.js +1 -1
- package/dist/heart/private-runtime/decision-renderer.js +158 -0
- package/dist/heart/private-runtime/index.js +18 -0
- package/dist/heart/private-runtime/ledger.js +212 -0
- package/dist/heart/private-runtime/policy.js +303 -0
- package/dist/heart/private-runtime/types.js +2 -0
- package/dist/heart/progress-story.js +1 -1
- package/dist/heart/provider-attempt.js +137 -0
- package/dist/heart/provider-binding-resolver.js +273 -0
- package/dist/heart/provider-credentials.js +449 -0
- package/dist/heart/provider-failover.js +260 -37
- package/dist/heart/provider-fallback.js +228 -0
- package/dist/heart/provider-models.js +96 -0
- package/dist/heart/provider-ping-child.js +125 -0
- package/dist/heart/provider-ping-entry.js +8 -0
- package/dist/heart/provider-ping.js +217 -78
- package/dist/heart/provider-readiness-cache.js +119 -0
- package/dist/heart/provider-visibility.js +188 -0
- package/dist/heart/providers/account-pool.js +717 -0
- package/dist/heart/providers/anthropic-token.js +15 -47
- package/dist/heart/providers/anthropic.js +275 -80
- package/dist/heart/providers/azure.js +19 -31
- package/dist/heart/providers/error-classification.js +129 -0
- package/dist/heart/providers/github-copilot.js +131 -36
- package/dist/heart/providers/minimax-vlm.js +189 -0
- package/dist/heart/providers/minimax.js +19 -27
- package/dist/heart/providers/openai-codex-token.js +349 -0
- package/dist/heart/providers/openai-codex.js +46 -57
- package/dist/heart/providers/openai-compatible.js +177 -0
- package/dist/heart/quota/fleet-readings.js +222 -0
- package/dist/heart/quota/tranche.js +59 -0
- package/dist/heart/reach-channel.js +85 -0
- package/dist/heart/reply-style.js +52 -0
- package/dist/heart/run-ledger.js +247 -0
- package/dist/heart/runtime-capability-check.js +170 -0
- package/dist/heart/runtime-credentials.js +647 -0
- package/dist/heart/runtime-cwd.js +87 -0
- package/dist/heart/sense-truth.js +26 -4
- package/dist/heart/sent-message-ledger.js +98 -0
- package/dist/heart/session-activity.js +89 -23
- package/dist/heart/session-events.js +1609 -0
- package/dist/heart/session-playback-cli-main.js +10 -0
- package/dist/heart/session-playback-cli.js +36 -0
- package/dist/heart/session-playback.js +231 -0
- package/dist/heart/session-redaction-repair-cli-main.js +34 -0
- package/dist/heart/session-redaction-repair.js +552 -0
- package/dist/heart/session-stats-cli-main.js +10 -0
- package/dist/heart/session-stats.js +183 -0
- package/dist/heart/session-transcript.js +133 -0
- package/dist/heart/shelf-claims.js +136 -0
- package/dist/heart/shepherd/custody-types.js +2 -0
- package/dist/heart/shepherd/mandates.js +352 -0
- package/dist/heart/shepherd/operation-commands.js +19 -0
- package/dist/heart/shepherd/operations.js +139 -0
- package/dist/heart/shepherd/supervision-read.js +131 -0
- package/dist/heart/shepherd/supervision.js +114 -0
- package/dist/heart/shepherd/types.js +2 -0
- package/dist/heart/shepherd-config.js +113 -0
- package/dist/heart/source-grounding.js +313 -0
- package/dist/heart/sqlite.js +18 -0
- package/dist/heart/start-of-turn-packet.js +372 -0
- package/dist/heart/steward-policy.js +656 -0
- package/dist/heart/streaming.js +627 -193
- package/dist/heart/structured-output.js +196 -0
- package/dist/heart/sync-classification.js +176 -0
- package/dist/heart/sync-health.js +152 -0
- package/dist/heart/sync-lock.js +431 -0
- package/dist/heart/sync.js +1583 -0
- package/dist/heart/target-resolution.js +7 -7
- package/dist/heart/tempo.js +93 -0
- package/dist/heart/temporal-view.js +41 -0
- package/dist/heart/termination-guard.js +27 -0
- package/dist/heart/timeouts.js +101 -0
- package/dist/heart/tool-activity-callbacks.js +27 -4
- package/dist/heart/tool-approval.js +382 -0
- package/dist/heart/tool-description.js +29 -9
- package/dist/heart/tool-friction.js +55 -0
- package/dist/heart/tool-images.js +42 -0
- package/dist/heart/tool-loop.js +9 -3
- package/dist/heart/tool-output-budget.js +41 -0
- package/dist/heart/turn-context.js +503 -0
- package/dist/heart/turn-execution-lease.js +78 -0
- package/dist/heart/turn-summary.js +216 -0
- package/dist/heart/versioning/host-self-update.js +118 -0
- package/dist/heart/{daemon → versioning}/ouro-bot-global-installer.js +6 -5
- package/dist/heart/{daemon → versioning}/ouro-bot-wrapper.js +3 -2
- package/dist/heart/versioning/ouro-path-installer.js +432 -0
- package/dist/heart/versioning/ouro-recovery-launcher.js +98 -0
- package/dist/heart/versioning/ouro-version-manager.js +432 -0
- package/dist/heart/versioning/release-sources.js +185 -0
- package/dist/heart/versioning/self-update-defaults.js +443 -0
- package/dist/heart/versioning/self-update.js +270 -0
- package/dist/heart/{daemon → versioning}/staged-restart.js +40 -8
- package/dist/heart/{daemon → versioning}/update-checker.js +12 -35
- package/dist/heart/versioning/update-hooks.js +160 -0
- package/dist/heart/versioning/update-state.js +134 -0
- package/dist/heart/versioning/updater-launchd.js +204 -0
- package/dist/heart/versioning/version-intent.js +114 -0
- package/dist/heart/work-card.js +380 -0
- package/dist/mailroom/attention.js +167 -0
- package/dist/mailroom/autonomy.js +209 -0
- package/dist/mailroom/azure-sdk.js +27 -0
- package/dist/mailroom/blob-store.js +991 -0
- package/dist/mailroom/body-cache.js +61 -0
- package/dist/mailroom/cache-sync-cli.js +58 -0
- package/dist/mailroom/core.js +813 -0
- package/dist/mailroom/entry.js +169 -0
- package/dist/mailroom/file-store.js +568 -0
- package/dist/mailroom/hosted-cache-sync.js +384 -0
- package/dist/mailroom/mbox-import.js +393 -0
- package/dist/mailroom/migration.js +164 -0
- package/dist/mailroom/outbound.js +380 -0
- package/dist/mailroom/policy.js +263 -0
- package/dist/mailroom/reader.js +308 -0
- package/dist/mailroom/search-cache.js +513 -0
- package/dist/mailroom/search-relevance.js +319 -0
- package/dist/mailroom/smtp-ingress.js +176 -0
- package/dist/mailroom/source-state.js +176 -0
- package/dist/mailroom/sweep-orphans-cli.js +34 -0
- package/dist/mailroom/thread.js +109 -0
- package/dist/mailroom/travel-extract.js +89 -0
- package/dist/mind/bundle-manifest.js +25 -4
- package/dist/mind/context.js +335 -198
- package/dist/mind/desk-section.js +332 -0
- package/dist/mind/diary-integrity.js +60 -0
- package/dist/mind/diary.js +38 -56
- package/dist/mind/embedding-provider.js +60 -0
- package/dist/mind/file-state.js +179 -0
- package/dist/mind/friend-link-codes.js +209 -0
- package/dist/mind/friend-merge.js +336 -0
- package/dist/mind/house-names.js +43 -0
- package/dist/mind/note-search.js +198 -0
- package/dist/mind/obligation-steering.js +15 -9
- package/dist/mind/outbound-record.js +176 -0
- package/dist/mind/pending.js +294 -11
- package/dist/mind/prompt-budget.js +511 -0
- package/dist/mind/prompt-refresh.js +3 -2
- package/dist/mind/prompt.js +922 -375
- package/dist/mind/provenance-trust.js +26 -0
- package/dist/mind/record-paths.js +312 -0
- package/dist/mind/scrutiny.js +121 -0
- package/dist/mind/session-transaction.js +642 -0
- package/dist/mind/token-estimate.js +17 -0
- package/dist/mind/where-am-i.js +176 -0
- package/dist/nerves/cli-logging.js +7 -1
- package/dist/nerves/coverage/audit-rules.js +15 -6
- package/dist/nerves/coverage/audit.js +28 -2
- package/dist/nerves/coverage/cli-main.js +6 -1
- package/dist/nerves/coverage/cli.js +1 -1
- package/dist/nerves/coverage/contract.js +5 -5
- package/dist/nerves/coverage/file-completeness.js +153 -5
- package/dist/nerves/coverage/run-artifacts.js +55 -35
- package/dist/nerves/coverage/source-scanner.js +4 -4
- package/dist/nerves/index.js +266 -30
- package/dist/nerves/observation.js +18 -0
- package/dist/nerves/redact.js +79 -0
- package/dist/nerves/review/cli-main.js +10 -0
- package/dist/nerves/review/cli.js +156 -0
- package/dist/nerves/review/core.js +159 -0
- package/dist/nerves/runtime.js +16 -1
- package/dist/repertoire/ado-client.js +15 -56
- package/dist/repertoire/ado-semantic.js +108 -40
- package/dist/repertoire/api-client.js +97 -0
- package/dist/repertoire/auth-required.js +22 -0
- package/dist/repertoire/bitwarden-native.js +458 -0
- package/dist/repertoire/bitwarden-store.js +1296 -0
- package/dist/repertoire/bundle-templates.js +71 -0
- package/dist/repertoire/bw-installer.js +268 -0
- package/dist/repertoire/coding/context-pack.js +80 -3
- package/dist/repertoire/coding/feedback.js +27 -26
- package/dist/repertoire/coding/index.js +63 -6
- package/dist/repertoire/coding/manager.js +31 -14
- package/dist/repertoire/coding/orca-client.js +194 -0
- package/dist/repertoire/coding/orca-manager.js +460 -0
- package/dist/repertoire/coding/router.js +124 -0
- package/dist/repertoire/coding/spawner.js +3 -2
- package/dist/repertoire/coding/tools.js +178 -34
- package/dist/repertoire/coding/workbench-client.js +272 -0
- package/dist/repertoire/coding/workbench-manager.js +404 -0
- package/dist/repertoire/commerce-errors.js +109 -0
- package/dist/repertoire/commerce-self-test.js +156 -0
- package/dist/repertoire/credential-access.js +183 -0
- package/dist/repertoire/desk/classifier.js +362 -0
- package/dist/repertoire/desk-mcp.js +204 -0
- package/dist/repertoire/duffel-client.js +185 -0
- package/dist/repertoire/github-client.js +14 -55
- package/dist/repertoire/graph-client.js +11 -52
- package/dist/repertoire/guardrails.js +1174 -71
- package/dist/repertoire/house-sweep.js +471 -0
- package/dist/repertoire/in-turn-tools-door.js +55 -0
- package/dist/repertoire/mcp-client.js +58 -5
- package/dist/repertoire/mcp-declared-tools.js +156 -0
- package/dist/repertoire/mcp-manager.js +457 -141
- package/dist/repertoire/mcp-tools.js +199 -0
- package/dist/repertoire/mcp-write-guard.js +85 -0
- package/dist/repertoire/plugin-mcp.js +175 -0
- package/dist/repertoire/plugins.js +253 -0
- package/dist/repertoire/relationship-authorization.js +322 -0
- package/dist/repertoire/sanctuary-container-policy.js +50 -0
- package/dist/repertoire/shell-sessions.js +136 -0
- package/dist/repertoire/skill-search.js +177 -0
- package/dist/repertoire/skill-summaries.js +129 -0
- package/dist/repertoire/skills.js +34 -4
- package/dist/repertoire/stripe-client.js +163 -0
- package/dist/repertoire/tool-arguments.js +180 -0
- package/dist/repertoire/tool-candidates.js +50 -0
- package/dist/repertoire/tool-catalog.js +228 -0
- package/dist/repertoire/tool-error-code.js +30 -0
- package/dist/repertoire/tool-limits.js +20 -0
- package/dist/repertoire/tool-results.js +29 -0
- package/dist/repertoire/tools-a2a.js +792 -0
- package/dist/repertoire/tools-app-sessions.js +219 -0
- package/dist/repertoire/tools-attachments.js +302 -0
- package/dist/repertoire/tools-awaiting.js +934 -0
- package/dist/repertoire/tools-base.js +85 -1422
- package/dist/repertoire/tools-bridge.js +153 -0
- package/dist/repertoire/tools-bundle.js +998 -0
- package/dist/repertoire/tools-chat.js +185 -0
- package/dist/repertoire/tools-commerce.js +272 -0
- package/dist/repertoire/tools-config.js +199 -0
- package/dist/repertoire/tools-continuity.js +648 -0
- package/dist/repertoire/tools-credential.js +410 -0
- package/dist/repertoire/tools-escalation.js +98 -0
- package/dist/repertoire/tools-evolution.js +560 -0
- package/dist/repertoire/tools-files.js +521 -0
- package/dist/repertoire/tools-flight.js +313 -0
- package/dist/repertoire/tools-flow.js +169 -0
- package/dist/repertoire/tools-friend-link.js +65 -0
- package/dist/repertoire/tools-github.js +11 -4
- package/dist/repertoire/tools-habits.js +111 -0
- package/dist/repertoire/tools-house-care.js +190 -0
- package/dist/repertoire/tools-mail.js +1928 -0
- package/dist/repertoire/tools-notes.js +571 -0
- package/dist/repertoire/tools-obligations.js +187 -0
- package/dist/repertoire/tools-orientation.js +36 -0
- package/dist/repertoire/tools-record.js +497 -0
- package/dist/repertoire/tools-rsvp.js +148 -0
- package/dist/repertoire/tools-runtime.js +260 -0
- package/dist/repertoire/tools-sanctuary-host.js +213 -0
- package/dist/repertoire/tools-session.js +1198 -0
- package/dist/repertoire/tools-shell.js +275 -0
- package/dist/repertoire/tools-shepherd-guidance.js +183 -0
- package/dist/repertoire/tools-shepherd.js +369 -0
- package/dist/repertoire/tools-steward-policy.js +157 -0
- package/dist/repertoire/tools-stripe.js +244 -0
- package/dist/repertoire/tools-surface.js +557 -0
- package/dist/repertoire/tools-teams.js +67 -17
- package/dist/repertoire/tools-telegram-contacts.js +41 -0
- package/dist/repertoire/tools-travel.js +142 -0
- package/dist/repertoire/tools-trip.js +1041 -0
- package/dist/repertoire/tools-unraid.js +627 -0
- package/dist/repertoire/tools-user-profile.js +166 -0
- package/dist/repertoire/tools-vault.js +46 -0
- package/dist/repertoire/tools-voice-local.js +210 -0
- package/dist/repertoire/tools-voice.js +153 -0
- package/dist/repertoire/tools-web.js +238 -0
- package/dist/repertoire/tools.js +614 -288
- package/dist/repertoire/travel-api-client.js +463 -0
- package/dist/repertoire/unraid-client.js +155 -0
- package/dist/repertoire/unraid-restart.js +342 -0
- package/dist/repertoire/user-profile.js +131 -0
- package/dist/repertoire/vault-setup.js +298 -0
- package/dist/repertoire/vault-unlock.js +816 -0
- package/dist/rsvp/aisleplanner-client.js +354 -0
- package/dist/rsvp/cli.js +936 -0
- package/dist/rsvp/config.js +327 -0
- package/dist/rsvp/cutover.js +453 -0
- package/dist/rsvp/diagnostics.js +232 -0
- package/dist/rsvp/diff-renderer.js +176 -0
- package/dist/rsvp/habit-policy.js +109 -0
- package/dist/rsvp/habit-stage.js +122 -0
- package/dist/rsvp/incident-bundle.js +97 -0
- package/dist/rsvp/migration.js +204 -0
- package/dist/rsvp/native-habit-runner.js +621 -0
- package/dist/rsvp/outbound-state.js +628 -0
- package/dist/rsvp/query.js +118 -0
- package/dist/rsvp/replay.js +233 -0
- package/dist/rsvp/snapshot.js +232 -0
- package/dist/rsvp/spend-ledger.js +175 -0
- package/dist/scripts/claude-code-stop-hook.js +4 -3
- package/dist/senses/a2a-entry.js +145 -0
- package/dist/senses/acp-server.js +386 -0
- package/dist/senses/app-sessions/client.js +128 -0
- package/dist/senses/app-sessions/digest-cards.js +263 -0
- package/dist/senses/app-sessions/digest-push.js +108 -0
- package/dist/senses/app-sessions/digest-sources.js +204 -0
- package/dist/senses/app-sessions/digest.js +284 -0
- package/dist/senses/app-sessions/run-command.js +51 -0
- package/dist/senses/app-sessions/sense.js +242 -0
- package/dist/senses/app-sessions/shepherd-cli.js +166 -0
- package/dist/senses/app-sessions/shepherd-rows.js +67 -0
- package/dist/senses/app-sessions/store.js +149 -0
- package/dist/senses/app-sessions/waiting-prompts.js +137 -0
- package/dist/senses/app-sessions/waiting-status.js +23 -0
- package/dist/senses/app-sessions-entry.js +87 -0
- package/dist/senses/attention-queue.js +95 -6
- package/dist/senses/await-turn-message.js +65 -0
- package/dist/senses/bluebubbles/active-turns.js +241 -0
- package/dist/senses/bluebubbles/attachment-cache.js +53 -0
- package/dist/senses/bluebubbles/attachment-download.js +143 -0
- package/dist/senses/{bluebubbles-client.js → bluebubbles/client.js} +391 -49
- package/dist/senses/bluebubbles/context-packet.js +207 -0
- package/dist/senses/bluebubbles/context-smoke.js +144 -0
- package/dist/senses/bluebubbles/entry.js +80 -0
- package/dist/senses/bluebubbles/host-account-verifier.js +113 -0
- package/dist/senses/{bluebubbles-inbound-log.js → bluebubbles/inbound-log.js} +21 -3
- package/dist/senses/bluebubbles/index.js +4666 -0
- package/dist/senses/bluebubbles/latest-turn.js +342 -0
- package/dist/senses/bluebubbles/media.js +255 -0
- package/dist/senses/{bluebubbles-model.js → bluebubbles/model.js} +152 -30
- package/dist/senses/{bluebubbles-mutation-log.js → bluebubbles/mutation-log.js} +24 -13
- package/dist/senses/bluebubbles/outbound-state.js +335 -0
- package/dist/senses/bluebubbles/processed-log.js +133 -0
- package/dist/senses/bluebubbles/reactions.js +18 -0
- package/dist/senses/bluebubbles/replay.js +284 -0
- package/dist/senses/{bluebubbles-runtime-state.js → bluebubbles/runtime-state.js} +47 -4
- package/dist/senses/bluebubbles/semantic-receipts.js +2014 -0
- package/dist/senses/bluebubbles/send-file.js +20 -0
- package/dist/senses/bluebubbles/send-health.js +126 -0
- package/dist/senses/{bluebubbles-session-cleanup.js → bluebubbles/session-cleanup.js} +1 -1
- package/dist/senses/bluebubbles/webhook-registration.js +257 -0
- package/dist/senses/bluebubbles-meta-guard.js +39 -0
- package/dist/senses/chat-file.js +75 -0
- package/dist/senses/cli/bracketed-paste.js +82 -0
- package/dist/senses/cli/image-paste.js +287 -0
- package/dist/senses/cli/image-ref-navigation.js +75 -0
- package/dist/senses/cli/ink-app.js +156 -0
- package/dist/senses/cli/inline-diff.js +64 -0
- package/dist/senses/cli/input-keys.js +209 -0
- package/dist/senses/cli/kill-ring.js +86 -0
- package/dist/senses/cli/message-list.js +51 -0
- package/dist/senses/cli/ouro-tui.js +633 -0
- package/dist/senses/cli/spinner-imperative.js +135 -0
- package/dist/senses/cli/spinner.js +101 -0
- package/dist/senses/cli/status-line.js +60 -0
- package/dist/senses/cli/streaming-markdown.js +526 -0
- package/dist/senses/cli/tool-display.js +85 -0
- package/dist/senses/cli/tool-render.js +85 -0
- package/dist/senses/cli/tui-store.js +252 -0
- package/dist/senses/cli/virtual-list.js +35 -0
- package/dist/senses/cli-entry.js +62 -9
- package/dist/senses/cli.js +625 -370
- package/dist/senses/commands.js +29 -3
- package/dist/senses/context-packet-ledger.js +367 -0
- package/dist/senses/context-packets.js +154 -0
- package/dist/senses/habit-lifecycle-guard.js +24 -0
- package/dist/senses/habit-turn-message.js +58 -6
- package/dist/senses/inbound-journal.js +186 -0
- package/dist/senses/ingress-evidence.js +2 -0
- package/dist/senses/mail-entry.js +69 -0
- package/dist/senses/mail.js +524 -0
- package/dist/senses/ordinary-owner-decision.js +98 -0
- package/dist/senses/pipeline.js +1223 -298
- package/dist/senses/private-runtime-worker.js +820 -0
- package/dist/senses/private-runtime.js +1648 -0
- package/dist/senses/proactive-content-guard.js +144 -0
- package/dist/senses/program-status.js +155 -0
- package/dist/senses/repeat-while.js +36 -0
- package/dist/senses/reply-gate.js +237 -0
- package/dist/senses/root-host-approval-port.js +345 -0
- package/dist/senses/root-host-approval-runtime.js +393 -0
- package/dist/senses/sanctuary-authority-resident.js +102 -0
- package/dist/senses/sanctuary-download-credit-presentation.js +31 -0
- package/dist/senses/sanctuary-full-visibility-contract.js +302 -0
- package/dist/senses/sanctuary-grounding.js +118 -0
- package/dist/senses/sanctuary-health-acceptance-probe-entry.js +21 -0
- package/dist/senses/sanctuary-health-acceptance-probe.js +802 -0
- package/dist/senses/sanctuary-health-runner.js +106 -0
- package/dist/senses/sanctuary-health.js +442 -0
- package/dist/senses/sanctuary-house.js +97 -0
- package/dist/senses/sanctuary-install-state-contract.js +169 -0
- package/dist/senses/sanctuary-interactive-control.js +410 -0
- package/dist/senses/sanctuary-media-catalog-contract.js +268 -0
- package/dist/senses/sanctuary-media-optimization.js +517 -0
- package/dist/senses/sanctuary-runtime.js +392 -0
- package/dist/senses/sanctuary-sab.js +85 -0
- package/dist/senses/sanctuary-storage-optimization-contract.js +32 -0
- package/dist/senses/sense-shutdown.js +72 -0
- package/dist/senses/shared-turn.js +741 -97
- package/dist/senses/shepherd/agent-presentation.js +88 -0
- package/dist/senses/shepherd/attention-page.js +166 -0
- package/dist/senses/shepherd/attention-sidebar.js +76 -0
- package/dist/senses/shepherd/attention.js +295 -0
- package/dist/senses/shepherd/checkin-config.js +76 -0
- package/dist/senses/shepherd/checkin-store.js +383 -0
- package/dist/senses/shepherd/client.js +196 -0
- package/dist/senses/shepherd/cmux.js +483 -0
- package/dist/senses/shepherd/composer.js +336 -0
- package/dist/senses/shepherd/conversation-hold.js +78 -0
- package/dist/senses/shepherd/feedback-reply.js +108 -0
- package/dist/senses/shepherd/feedback-source.js +20 -0
- package/dist/senses/shepherd/feedback-store.js +328 -0
- package/dist/senses/shepherd/feedback-submit.js +182 -0
- package/dist/senses/shepherd/feedback-worker.js +208 -0
- package/dist/senses/shepherd/guidance.js +273 -0
- package/dist/senses/shepherd/herdr.js +427 -0
- package/dist/senses/shepherd/host.js +14 -0
- package/dist/senses/shepherd/human-decision-guard.js +29 -0
- package/dist/senses/shepherd/judge-evaluation-command.js +185 -0
- package/dist/senses/shepherd/judge-evaluation-entry.js +20 -0
- package/dist/senses/shepherd/judge-evaluation.js +144 -0
- package/dist/senses/shepherd/judge.js +210 -0
- package/dist/senses/shepherd/notice-outbox.js +254 -0
- package/dist/senses/shepherd/observation-publisher.js +320 -0
- package/dist/senses/shepherd/operations-defaults.js +86 -0
- package/dist/senses/shepherd/operations.js +159 -0
- package/dist/senses/shepherd/owner-notice.js +496 -0
- package/dist/senses/shepherd/prompt-state.js +60 -0
- package/dist/senses/shepherd/recovery.js +543 -0
- package/dist/senses/shepherd/redact.js +66 -0
- package/dist/senses/shepherd/returns.js +79 -0
- package/dist/senses/shepherd/sense.js +862 -0
- package/dist/senses/shepherd/shepherd-judge-corpus-v1.json +170 -0
- package/dist/senses/shepherd/surface.js +125 -0
- package/dist/senses/shepherd/target-binding.js +13 -0
- package/dist/senses/shepherd/terminal-process.js +147 -0
- package/dist/senses/shepherd-entry.js +98 -0
- package/dist/senses/surface-tool.js +60 -34
- package/dist/senses/teams-attachments.js +68 -0
- package/dist/senses/teams-entry.js +80 -9
- package/dist/senses/teams-image.js +128 -0
- package/dist/senses/teams-inbound.js +76 -0
- package/dist/senses/teams-off-turn.js +199 -0
- package/dist/senses/teams-outbox.js +249 -0
- package/dist/senses/teams.js +1250 -366
- package/dist/senses/telegram-admission.js +700 -0
- package/dist/senses/telegram-approval-relay.js +293 -0
- package/dist/senses/telegram-approval-runtime.js +831 -0
- package/dist/senses/telegram-attachments.js +128 -0
- package/dist/senses/telegram-audit-ledger.js +220 -0
- package/dist/senses/telegram-authority-transport.js +233 -0
- package/dist/senses/telegram-chat-actions.js +57 -0
- package/dist/senses/telegram-client.js +1896 -0
- package/dist/senses/telegram-effect-adapter.js +892 -0
- package/dist/senses/telegram-entry.js +87 -0
- package/dist/senses/telegram-handoff.js +150 -0
- package/dist/senses/telegram-identity-key.js +143 -0
- package/dist/senses/telegram-markdown.js +331 -0
- package/dist/senses/telegram-owner-route.js +129 -0
- package/dist/senses/telegram.js +2789 -0
- package/dist/senses/terminal-handoff.js +44 -0
- package/dist/senses/trust-gate.js +104 -9
- package/dist/senses/turn-attempts.js +171 -0
- package/dist/senses/turn-watch.js +268 -0
- package/dist/senses/voice/audio-playback.js +237 -0
- package/dist/senses/voice/audio-routing.js +119 -0
- package/dist/senses/voice/call-auth.js +250 -0
- package/dist/senses/voice/elevenlabs.js +202 -0
- package/dist/senses/voice/floor-control.js +431 -0
- package/dist/senses/voice/floor-controller.js +115 -0
- package/dist/senses/voice/golden-path.js +116 -0
- package/dist/senses/voice/index.js +29 -0
- package/dist/senses/voice/local-audio-control.js +344 -0
- package/dist/senses/voice/local-audio-devices.js +516 -0
- package/dist/senses/voice/local-audio-disclosure.js +174 -0
- package/dist/senses/voice/local-audio-identity.js +103 -0
- package/dist/senses/voice/local-audio-join.js +325 -0
- package/dist/senses/voice/local-audio-mute.js +199 -0
- package/dist/senses/voice/local-audio-notify.js +124 -0
- package/dist/senses/voice/local-audio-prompts.js +116 -0
- package/dist/senses/voice/local-audio-transport.js +427 -0
- package/dist/senses/voice/local-audio.js +281 -0
- package/dist/senses/voice/local-media-stream.js +145 -0
- package/dist/senses/voice/meeting.js +113 -0
- package/dist/senses/voice/outbound.js +190 -0
- package/dist/senses/voice/phone.js +33 -0
- package/dist/senses/voice/playback.js +139 -0
- package/dist/senses/voice/process-guards.js +51 -0
- package/dist/senses/voice/realtime-eval.js +496 -0
- package/dist/senses/voice/realtime-tool-schema.js +195 -0
- package/dist/senses/voice/realtime-trace.js +531 -0
- package/dist/senses/voice/realtime-utterances.js +158 -0
- package/dist/senses/voice/transcript.js +70 -0
- package/dist/senses/voice/turn.js +219 -0
- package/dist/senses/voice/twilio-phone-runtime.js +836 -0
- package/dist/senses/voice/twilio-phone.js +5660 -0
- package/dist/senses/voice/types.js +2 -0
- package/dist/senses/voice/utterances.js +207 -0
- package/dist/senses/voice/whisper.js +153 -0
- package/dist/senses/voice-entry.js +84 -0
- package/dist/senses/voice-realtime-eval-command.js +99 -0
- package/dist/senses/voice-realtime-eval-entry.js +25 -0
- package/dist/senses/voice-twilio-entry.js +88 -0
- package/dist/trips/core.js +138 -0
- package/dist/trips/store.js +265 -0
- package/dist/util/frontmatter.js +69 -0
- package/node_modules/@ouro.bot/friends/LICENSE +201 -0
- package/node_modules/@ouro.bot/friends/README.md +687 -0
- package/node_modules/@ouro.bot/friends/actions/generated/mcp.json +1105 -0
- package/node_modules/@ouro.bot/friends/changelog.json +197 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/a2a-message.d.ts +39 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/a2a-message.js +54 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/adapter.d.ts +117 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/adapter.js +202 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/agent-card.d.ts +50 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/agent-card.js +32 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/did-key.d.ts +38 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/did-key.js +120 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/did-verifier.d.ts +195 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/did-verifier.js +342 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/did-web.d.ts +26 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/did-web.js +140 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/envelope-binding.d.ts +62 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/envelope-binding.js +83 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/index.d.ts +26 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/index.js +82 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/jcs.d.ts +5 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/jcs.js +84 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/reachability.d.ts +22 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/reachability.js +17 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/roster-verify.d.ts +15 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/roster-verify.js +61 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/seal.d.ts +47 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/seal.js +95 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/sealed-envelope.d.ts +58 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/sealed-envelope.js +113 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/sign.d.ts +42 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/sign.js +87 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/sodium.d.ts +5 -0
- package/node_modules/@ouro.bot/friends/dist/a2a-client/sodium.js +19 -0
- package/node_modules/@ouro.bot/friends/dist/account-roster.d.ts +52 -0
- package/node_modules/@ouro.bot/friends/dist/account-roster.js +108 -0
- package/node_modules/@ouro.bot/friends/dist/agent-peer.d.ts +26 -0
- package/node_modules/@ouro.bot/friends/dist/agent-peer.js +138 -0
- package/node_modules/@ouro.bot/friends/dist/audit.d.ts +42 -0
- package/node_modules/@ouro.bot/friends/dist/audit.js +86 -0
- package/node_modules/@ouro.bot/friends/dist/channel.d.ts +16 -0
- package/{dist/mind/friends → node_modules/@ouro.bot/friends/dist}/channel.js +83 -4
- package/node_modules/@ouro.bot/friends/dist/connect-authority.d.ts +43 -0
- package/node_modules/@ouro.bot/friends/dist/connect-authority.js +84 -0
- package/node_modules/@ouro.bot/friends/dist/connect.d.ts +56 -0
- package/node_modules/@ouro.bot/friends/dist/connect.js +163 -0
- package/node_modules/@ouro.bot/friends/dist/consent.d.ts +34 -0
- package/node_modules/@ouro.bot/friends/dist/consent.js +65 -0
- package/node_modules/@ouro.bot/friends/dist/coordination.d.ts +116 -0
- package/node_modules/@ouro.bot/friends/dist/coordination.js +329 -0
- package/node_modules/@ouro.bot/friends/dist/delegation-grant.d.ts +21 -0
- package/node_modules/@ouro.bot/friends/dist/delegation-grant.js +39 -0
- package/node_modules/@ouro.bot/friends/dist/file-bundle.d.ts +17 -0
- package/node_modules/@ouro.bot/friends/dist/file-bundle.js +27 -0
- package/node_modules/@ouro.bot/friends/dist/friend-lookup.d.ts +9 -0
- package/node_modules/@ouro.bot/friends/dist/friend-lookup.js +69 -0
- package/node_modules/@ouro.bot/friends/dist/grant-store-file.d.ts +19 -0
- package/node_modules/@ouro.bot/friends/dist/grant-store-file.js +157 -0
- package/node_modules/@ouro.bot/friends/dist/grant-store.d.ts +7 -0
- package/node_modules/@ouro.bot/friends/dist/grant-store.js +8 -0
- package/node_modules/@ouro.bot/friends/dist/grants.d.ts +43 -0
- package/node_modules/@ouro.bot/friends/dist/grants.js +100 -0
- package/node_modules/@ouro.bot/friends/dist/group-context.d.ts +21 -0
- package/{dist/mind/friends → node_modules/@ouro.bot/friends/dist}/group-context.js +5 -4
- package/node_modules/@ouro.bot/friends/dist/identity.d.ts +17 -0
- package/node_modules/@ouro.bot/friends/dist/identity.js +68 -0
- package/node_modules/@ouro.bot/friends/dist/index.d.ts +73 -0
- package/node_modules/@ouro.bot/friends/dist/index.js +164 -0
- package/node_modules/@ouro.bot/friends/dist/link-identity.d.ts +14 -0
- package/node_modules/@ouro.bot/friends/dist/link-identity.js +157 -0
- package/node_modules/@ouro.bot/friends/dist/mailbox/index.d.ts +105 -0
- package/node_modules/@ouro.bot/friends/dist/mailbox/index.js +205 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/bin.d.ts +2 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/bin.js +17 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/dispatch.d.ts +40 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/dispatch.js +744 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/index.d.ts +6 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/index.js +14 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/run-main.d.ts +7 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/run-main.js +59 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/schemas.d.ts +10 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/schemas.js +23 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/server.d.ts +30 -0
- package/node_modules/@ouro.bot/friends/dist/mcp/server.js +195 -0
- package/node_modules/@ouro.bot/friends/dist/message.d.ts +93 -0
- package/node_modules/@ouro.bot/friends/dist/message.js +129 -0
- package/node_modules/@ouro.bot/friends/dist/mission-result.d.ts +89 -0
- package/node_modules/@ouro.bot/friends/dist/mission-result.js +207 -0
- package/node_modules/@ouro.bot/friends/dist/mission-share.d.ts +94 -0
- package/node_modules/@ouro.bot/friends/dist/mission-share.js +232 -0
- package/node_modules/@ouro.bot/friends/dist/mission-store-file.d.ts +18 -0
- package/node_modules/@ouro.bot/friends/dist/mission-store-file.js +169 -0
- package/node_modules/@ouro.bot/friends/dist/mission-store.d.ts +10 -0
- package/node_modules/@ouro.bot/friends/dist/mission-store.js +9 -0
- package/node_modules/@ouro.bot/friends/dist/missions.d.ts +31 -0
- package/node_modules/@ouro.bot/friends/dist/missions.js +99 -0
- package/node_modules/@ouro.bot/friends/dist/notes.d.ts +11 -0
- package/node_modules/@ouro.bot/friends/dist/notes.js +90 -0
- package/node_modules/@ouro.bot/friends/dist/observability.d.ts +27 -0
- package/node_modules/@ouro.bot/friends/dist/observability.js +31 -0
- package/node_modules/@ouro.bot/friends/dist/outcomes.d.ts +9 -0
- package/node_modules/@ouro.bot/friends/dist/outcomes.js +51 -0
- package/node_modules/@ouro.bot/friends/dist/resolver.d.ts +59 -0
- package/node_modules/@ouro.bot/friends/dist/resolver.js +276 -0
- package/node_modules/@ouro.bot/friends/dist/results.d.ts +10 -0
- package/node_modules/@ouro.bot/friends/dist/results.js +2 -0
- package/node_modules/@ouro.bot/friends/dist/room.d.ts +22 -0
- package/node_modules/@ouro.bot/friends/dist/room.js +40 -0
- package/node_modules/@ouro.bot/friends/dist/roster-store-file.d.ts +16 -0
- package/node_modules/@ouro.bot/friends/dist/roster-store-file.js +125 -0
- package/node_modules/@ouro.bot/friends/dist/roster-store-memory.d.ts +9 -0
- package/node_modules/@ouro.bot/friends/dist/roster-store-memory.js +20 -0
- package/node_modules/@ouro.bot/friends/dist/roster-store.d.ts +29 -0
- package/node_modules/@ouro.bot/friends/dist/roster-store.js +9 -0
- package/node_modules/@ouro.bot/friends/dist/roster-verifier.d.ts +23 -0
- package/node_modules/@ouro.bot/friends/dist/roster-verifier.js +47 -0
- package/node_modules/@ouro.bot/friends/dist/share.d.ts +113 -0
- package/node_modules/@ouro.bot/friends/dist/share.js +314 -0
- package/node_modules/@ouro.bot/friends/dist/standing.d.ts +83 -0
- package/node_modules/@ouro.bot/friends/dist/standing.js +111 -0
- package/node_modules/@ouro.bot/friends/dist/store-file.d.ts +82 -0
- package/node_modules/@ouro.bot/friends/dist/store-file.js +1089 -0
- package/node_modules/@ouro.bot/friends/dist/store.d.ts +43 -0
- package/node_modules/@ouro.bot/friends/dist/tokens.d.ts +10 -0
- package/{dist/mind/friends → node_modules/@ouro.bot/friends/dist}/tokens.js +7 -4
- package/node_modules/@ouro.bot/friends/dist/trust-explanation.d.ts +22 -0
- package/node_modules/@ouro.bot/friends/dist/trust-explanation.js +90 -0
- package/node_modules/@ouro.bot/friends/dist/trust-mutation.d.ts +16 -0
- package/node_modules/@ouro.bot/friends/dist/trust-mutation.js +67 -0
- package/node_modules/@ouro.bot/friends/dist/types.d.ts +333 -0
- package/node_modules/@ouro.bot/friends/dist/types.js +55 -0
- package/node_modules/@ouro.bot/friends/dist/util/cap-string.d.ts +7 -0
- package/node_modules/@ouro.bot/friends/dist/util/cap-string.js +35 -0
- package/node_modules/@ouro.bot/friends/dist/util/safe-id.d.ts +1 -0
- package/node_modules/@ouro.bot/friends/dist/util/safe-id.js +10 -0
- package/node_modules/@ouro.bot/friends/dist/verifier.d.ts +11 -0
- package/node_modules/@ouro.bot/friends/dist/verifier.js +29 -0
- package/node_modules/@ouro.bot/friends/dist/whoami.d.ts +7 -0
- package/node_modules/@ouro.bot/friends/dist/whoami.js +39 -0
- package/node_modules/@ouro.bot/friends/package.json +82 -0
- package/node_modules/libsodium/LICENSE +16 -0
- package/node_modules/libsodium/README.md +281 -0
- package/node_modules/libsodium/dist/modules/libsodium.js +1 -0
- package/node_modules/libsodium/dist/modules-esm/libsodium.mjs +1 -0
- package/node_modules/libsodium/package.json +54 -0
- package/node_modules/libsodium-wrappers/LICENSE +16 -0
- package/node_modules/libsodium-wrappers/README.md +281 -0
- package/node_modules/libsodium-wrappers/dist/modules/libsodium-wrappers.d.ts +2155 -0
- package/node_modules/libsodium-wrappers/dist/modules/libsodium-wrappers.js +1 -0
- package/node_modules/libsodium-wrappers/dist/modules-esm/libsodium-wrappers.d.mts +2743 -0
- package/node_modules/libsodium-wrappers/dist/modules-esm/libsodium-wrappers.mjs +1 -0
- package/node_modules/libsodium-wrappers/package.json +74 -0
- package/npm-shrinkwrap.json +8789 -0
- package/package.json +97 -12
- package/skills/agent-commerce.md +116 -0
- package/skills/browser-navigation.md +120 -0
- package/skills/commerce-setup-guide.md +116 -0
- package/skills/commerce-setup.md +87 -0
- package/skills/configure-dev-tools.md +32 -14
- package/skills/sense-setup.md +56 -0
- package/skills/travel-planning.md +141 -0
- package/vendor/desk/.claude-plugin/plugin.json +35 -0
- package/vendor/desk/.mcp.claude-codex.json +28 -0
- package/vendor/desk/.mcp.copilot.json +16 -0
- package/vendor/desk/.ouro-desk.json +6 -0
- package/vendor/desk/CHANGELOG.md +7644 -0
- package/vendor/desk/README.md +195 -0
- package/vendor/desk/activation/README.md +98 -0
- package/vendor/desk/activation/copilot-root.flattened-bundle.json +38 -0
- package/vendor/desk/activation/desk.activation.json +251 -0
- package/vendor/desk/activation/host-capability-evidence.md +46 -0
- package/vendor/desk/activation/support-matrix.json +84 -0
- package/vendor/desk/agency.json +20 -0
- package/vendor/desk/agents/observer.agent.md +26 -0
- package/vendor/desk/agents/observer.md +29 -0
- package/vendor/desk/agents/worker.agent.md +32 -0
- package/vendor/desk/agents/worker.md +40 -0
- package/vendor/desk/artifacts/tombstones/tombstone.schema.json +53 -0
- package/vendor/desk/artifacts/tombstones/tombstones.jsonl +1 -0
- package/vendor/desk/changelog.d/README.md +12 -0
- package/vendor/desk/docs/agent-files.md +104 -0
- package/vendor/desk/docs/agentic-engineering-v2-rfc.md +206 -0
- package/vendor/desk/docs/agentic-engineering-v3-rfc.md +109 -0
- package/vendor/desk/docs/browser-remote-desktops.md +69 -0
- package/vendor/desk/docs/dependency-activation-stories-and-criteria.md +500 -0
- package/vendor/desk/docs/evaluation-packet.md +363 -0
- package/vendor/desk/docs/factory-local-capture.md +651 -0
- package/vendor/desk/docs/factory-store-playbook.md +927 -0
- package/vendor/desk/docs/images/factory-site.png +0 -0
- package/vendor/desk/docs/issue-drains.md +81 -0
- package/vendor/desk/docs/lfs-inspection.md +55 -0
- package/vendor/desk/docs/preview-diagnostics.md +11 -0
- package/vendor/desk/docs/relays.md +88 -0
- package/vendor/desk/docs/schedules.md +69 -0
- package/vendor/desk/docs/search-recovery.md +22 -0
- package/vendor/desk/docs/session-labels.md +157 -0
- package/vendor/desk/docs/session-retention.md +125 -0
- package/vendor/desk/docs/sessions.md +17 -0
- package/vendor/desk/docs/stalled-nudges.md +54 -0
- package/vendor/desk/docs/webhooks.md +80 -0
- package/vendor/desk/docs/workspace-tidy.md +74 -0
- package/vendor/desk/hooks/boot-checks.cjs +7 -0
- package/vendor/desk/hooks/claude-session-start.cjs +123 -0
- package/vendor/desk/hooks/compatible-node.cjs +97 -0
- package/vendor/desk/hooks/copilot-boot-prompt.cjs +69 -0
- package/vendor/desk/hooks/copilot-durable-files.cjs +8 -0
- package/vendor/desk/hooks/copilot-hooks.json +61 -0
- package/vendor/desk/hooks/copilot-intake-context.cjs +5 -0
- package/vendor/desk/hooks/copilot-lane-model.cjs +8 -0
- package/vendor/desk/hooks/copilot-session-start.cjs +264 -0
- package/vendor/desk/hooks/copilot-skill-current.cjs +28 -0
- package/vendor/desk/hooks/factory-end.cjs +5 -0
- package/vendor/desk/hooks/factory-start.cjs +27 -0
- package/vendor/desk/hooks/hooks.json +40 -0
- package/vendor/desk/hooks/lib/boot-checks.cjs +643 -0
- package/vendor/desk/hooks/lib/child-agent.cjs +14 -0
- package/vendor/desk/hooks/lib/copilot-intake-context.cjs +73 -0
- package/vendor/desk/hooks/lib/current-release.cjs +162 -0
- package/vendor/desk/hooks/lib/delivery-stop.cjs +326 -0
- package/vendor/desk/hooks/lib/detach-worker.cjs +43 -0
- package/vendor/desk/hooks/lib/durable-files.cjs +102 -0
- package/vendor/desk/hooks/lib/factory-end.cjs +330 -0
- package/vendor/desk/hooks/lib/lane-model.cjs +82 -0
- package/vendor/desk/hooks/lib/node-required.cjs +56 -0
- package/vendor/desk/hooks/lib/orca-session-title.cjs +60 -0
- package/vendor/desk/hooks/lib/session-end.cjs +30 -0
- package/vendor/desk/hooks/lib/sync-end.cjs +89 -0
- package/vendor/desk/hooks/loop-start.cjs +105 -0
- package/vendor/desk/hooks/node-missing.sh +78 -0
- package/vendor/desk/hooks/orca-session-title.cjs +8 -0
- package/vendor/desk/hooks/session-end.cjs +8 -0
- package/vendor/desk/mcp/README.md +277 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/support-matrix.json +72 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/README.md +25 -0
- package/vendor/desk/mcp/bootstrap.cjs +787 -0
- package/vendor/desk/mcp/docs/private-feedback.md +13 -0
- package/vendor/desk/mcp/idle-proxy.cjs +431 -0
- package/vendor/desk/mcp/index.js +813 -0
- package/vendor/desk/mcp/package-lock.json +3717 -0
- package/vendor/desk/mcp/package.json +44 -0
- package/vendor/desk/mcp/scripts/agency-desk-channel.js +7 -0
- package/vendor/desk/mcp/scripts/build-runtime-deps-pack.js +5 -0
- package/vendor/desk/mcp/scripts/crew.js +89 -0
- package/vendor/desk/mcp/scripts/drains-launcher.mjs +330 -0
- package/vendor/desk/mcp/scripts/drains.js +5 -0
- package/vendor/desk/mcp/scripts/factory.js +666 -0
- package/vendor/desk/mcp/scripts/file-desk-problem.js +9 -0
- package/vendor/desk/mcp/scripts/finish-commit.js +7 -0
- package/vendor/desk/mcp/scripts/lfs.js +37 -0
- package/vendor/desk/mcp/scripts/local-recovery.js +445 -0
- package/vendor/desk/mcp/scripts/migrations.js +11 -0
- package/vendor/desk/mcp/scripts/private-view.js +177 -0
- package/vendor/desk/mcp/scripts/resolve-desk-root.js +105 -0
- package/vendor/desk/mcp/scripts/session-boot.js +22 -0
- package/vendor/desk/mcp/scripts/session-retention.js +5 -0
- package/vendor/desk/mcp/scripts/session-sync.js +10 -0
- package/vendor/desk/mcp/scripts/sessions.js +5 -0
- package/vendor/desk/mcp/scripts/sync-push.js +13 -0
- package/vendor/desk/mcp/scripts/tidy-status.js +8 -0
- package/vendor/desk/mcp/scripts/verify-runtime-deps-pack.js +5 -0
- package/vendor/desk/mcp/src/actions/desk-read.actions.mts +73 -0
- package/vendor/desk/mcp/src/actions/desk-session.actions.mts +57 -0
- package/vendor/desk/mcp/src/actions/desk-web.actions.mts +52 -0
- package/vendor/desk/mcp/src/actions/desk.actions.mts +5 -0
- package/vendor/desk/mcp/src/actions/generated/desk/OuroActions.swift +649 -0
- package/vendor/desk/mcp/src/actions/generated/desk/OuroActionsReins.swift +61 -0
- package/vendor/desk/mcp/src/actions/generated/desk/actions.json +315 -0
- package/vendor/desk/mcp/src/actions/generated/desk/commands.json +145 -0
- package/vendor/desk/mcp/src/actions/generated/desk/mcp.json +289 -0
- package/vendor/desk/mcp/src/actions/generated/desk/web.ts +59 -0
- package/vendor/desk/mcp/src/actions/generated/desk/webmcp.json +250 -0
- package/vendor/desk/mcp/src/actions/generated/desk-web/OuroActions.swift +241 -0
- package/vendor/desk/mcp/src/actions/generated/desk-web/OuroActionsReins.swift +25 -0
- package/vendor/desk/mcp/src/actions/generated/desk-web/actions.json +73 -0
- package/vendor/desk/mcp/src/actions/generated/desk-web/commands.json +53 -0
- package/vendor/desk/mcp/src/actions/generated/desk-web/mcp.json +83 -0
- package/vendor/desk/mcp/src/actions/generated/desk-web/web.ts +47 -0
- package/vendor/desk/mcp/src/actions/generated/desk-web/webmcp.json +81 -0
- package/vendor/desk/mcp/src/actions/served.js +5 -0
- package/vendor/desk/mcp/src/activation/admit.js +77 -0
- package/vendor/desk/mcp/src/activation/failures.js +65 -0
- package/vendor/desk/mcp/src/activation/readiness-policy.js +102 -0
- package/vendor/desk/mcp/src/activation/schema.js +17 -0
- package/vendor/desk/mcp/src/activation/superpowers-context.js +274 -0
- package/vendor/desk/mcp/src/activation/validate.js +540 -0
- package/vendor/desk/mcp/src/artifacts/tombstones.js +61 -0
- package/vendor/desk/mcp/src/crew/initiative.js +287 -0
- package/vendor/desk/mcp/src/crew/workspace.js +1285 -0
- package/vendor/desk/mcp/src/db/init.js +75 -0
- package/vendor/desk/mcp/src/db/schema.sql +83 -0
- package/vendor/desk/mcp/src/desk/active-tasks.js +408 -0
- package/vendor/desk/mcp/src/desk/card-commit-guard.js +282 -0
- package/vendor/desk/mcp/src/desk/cleanup-index.js +53 -0
- package/vendor/desk/mcp/src/desk/content-home.js +262 -0
- package/vendor/desk/mcp/src/desk/crew-config.js +102 -0
- package/vendor/desk/mcp/src/desk/crew-member.js +196 -0
- package/vendor/desk/mcp/src/desk/crew-roster.js +151 -0
- package/vendor/desk/mcp/src/desk/frontmatter-lite.js +228 -0
- package/vendor/desk/mcp/src/desk/gh-logins.js +109 -0
- package/vendor/desk/mcp/src/desk/handles.js +123 -0
- package/vendor/desk/mcp/src/desk/handoff-reference.js +35 -0
- package/vendor/desk/mcp/src/desk/improvement-authority.js +3 -0
- package/vendor/desk/mcp/src/desk/improvement-cards.js +704 -0
- package/vendor/desk/mcp/src/desk/improvement-person.js +51 -0
- package/vendor/desk/mcp/src/desk/lifecycle.js +16 -0
- package/vendor/desk/mcp/src/desk/machine-desks.js +119 -0
- package/vendor/desk/mcp/src/desk/naming.js +333 -0
- package/vendor/desk/mcp/src/desk/organization.js +592 -0
- package/vendor/desk/mcp/src/desk/resources.js +274 -0
- package/vendor/desk/mcp/src/desk/runtime-resolver.js +30 -0
- package/vendor/desk/mcp/src/desk/scratch-paths.js +44 -0
- package/vendor/desk/mcp/src/desk/step-delivery.js +140 -0
- package/vendor/desk/mcp/src/desk/steps.js +263 -0
- package/vendor/desk/mcp/src/desk/tidy.js +930 -0
- package/vendor/desk/mcp/src/desk/unsigned-deliveries.js +359 -0
- package/vendor/desk/mcp/src/factory/agent-types.js +45 -0
- package/vendor/desk/mcp/src/factory/andon-watch.js +109 -0
- package/vendor/desk/mcp/src/factory/binding.js +612 -0
- package/vendor/desk/mcp/src/factory/boot-check.js +645 -0
- package/vendor/desk/mcp/src/factory/capture-classify.js +158 -0
- package/vendor/desk/mcp/src/factory/capture-count.js +183 -0
- package/vendor/desk/mcp/src/factory/capture-flush.js +268 -0
- package/vendor/desk/mcp/src/factory/capture-publish.js +141 -0
- package/vendor/desk/mcp/src/factory/capture-schema.js +193 -0
- package/vendor/desk/mcp/src/factory/capture-sweep.js +239 -0
- package/vendor/desk/mcp/src/factory/catch-point.js +60 -0
- package/vendor/desk/mcp/src/factory/commit-resolve.js +94 -0
- package/vendor/desk/mcp/src/factory/consent-answer.js +37 -0
- package/vendor/desk/mcp/src/factory/context-capability.js +15 -0
- package/vendor/desk/mcp/src/factory/context-outbox.js +885 -0
- package/vendor/desk/mcp/src/factory/context-run.js +386 -0
- package/vendor/desk/mcp/src/factory/context-schema.js +249 -0
- package/vendor/desk/mcp/src/factory/copilot-turn-index.js +93 -0
- package/vendor/desk/mcp/src/factory/copilot-usage.js +148 -0
- package/vendor/desk/mcp/src/factory/credential.js +45 -0
- package/vendor/desk/mcp/src/factory/derive-claude.js +960 -0
- package/vendor/desk/mcp/src/factory/derive-codex.js +734 -0
- package/vendor/desk/mcp/src/factory/derive-common.js +279 -0
- package/vendor/desk/mcp/src/factory/derive-copilot.js +1057 -0
- package/vendor/desk/mcp/src/factory/derive-run.js +807 -0
- package/vendor/desk/mcp/src/factory/desk-problem-file.js +310 -0
- package/vendor/desk/mcp/src/factory/desk-problem-fingerprint.js +70 -0
- package/vendor/desk/mcp/src/factory/desk-problem-known.js +246 -0
- package/vendor/desk/mcp/src/factory/desk-problem-template.js +107 -0
- package/vendor/desk/mcp/src/factory/desk-repo.js +1223 -0
- package/vendor/desk/mcp/src/factory/desk-task-line.js +28 -0
- package/vendor/desk/mcp/src/factory/desk-visibility.js +48 -0
- package/vendor/desk/mcp/src/factory/end-hook.js +14 -0
- package/vendor/desk/mcp/src/factory/evaluate-kick.js +164 -0
- package/vendor/desk/mcp/src/factory/evaluate-run.js +678 -0
- package/vendor/desk/mcp/src/factory/evaluator-step.js +484 -0
- package/vendor/desk/mcp/src/factory/filer-launch.js +79 -0
- package/vendor/desk/mcp/src/factory/flush-health.js +26 -0
- package/vendor/desk/mcp/src/factory/flush.js +1758 -0
- package/vendor/desk/mcp/src/factory/focus.js +326 -0
- package/vendor/desk/mcp/src/factory/headless-flag.cjs +32 -0
- package/vendor/desk/mcp/src/factory/headless-flag.js +25 -0
- package/vendor/desk/mcp/src/factory/headless-ledger.js +743 -0
- package/vendor/desk/mcp/src/factory/headless.js +567 -0
- package/vendor/desk/mcp/src/factory/held-route.js +93 -0
- package/vendor/desk/mcp/src/factory/host-flags.js +36 -0
- package/vendor/desk/mcp/src/factory/improvement-verify.js +429 -0
- package/vendor/desk/mcp/src/factory/kaizen-file.js +231 -0
- package/vendor/desk/mcp/src/factory/label-binding.js +90 -0
- package/vendor/desk/mcp/src/factory/label-schema.js +426 -0
- package/vendor/desk/mcp/src/factory/local-status.js +368 -0
- package/vendor/desk/mcp/src/factory/loop-conditions.js +121 -0
- package/vendor/desk/mcp/src/factory/loop-health.js +500 -0
- package/vendor/desk/mcp/src/factory/loop-slot.js +90 -0
- package/vendor/desk/mcp/src/factory/loop-status.js +100 -0
- package/vendor/desk/mcp/src/factory/loop-switch.cjs +14 -0
- package/vendor/desk/mcp/src/factory/loop-worker-state.js +96 -0
- package/vendor/desk/mcp/src/factory/loop-worker.js +290 -0
- package/vendor/desk/mcp/src/factory/marker.js +61 -0
- package/vendor/desk/mcp/src/factory/mirror-step.js +145 -0
- package/vendor/desk/mcp/src/factory/os-protect.js +243 -0
- package/vendor/desk/mcp/src/factory/outbox.js +2231 -0
- package/vendor/desk/mcp/src/factory/outcome.js +431 -0
- package/vendor/desk/mcp/src/factory/pipeline/andon.js +319 -0
- package/vendor/desk/mcp/src/factory/pipeline/attention-rollup.js +158 -0
- package/vendor/desk/mcp/src/factory/pipeline/attention.js +146 -0
- package/vendor/desk/mcp/src/factory/pipeline/build.js +299 -0
- package/vendor/desk/mcp/src/factory/pipeline/compare.js +148 -0
- package/vendor/desk/mcp/src/factory/pipeline/formulas.js +652 -0
- package/vendor/desk/mcp/src/factory/pipeline/kaizen.js +387 -0
- package/vendor/desk/mcp/src/factory/pipeline/lifecycle-clocks.js +345 -0
- package/vendor/desk/mcp/src/factory/pipeline/normalize.js +73 -0
- package/vendor/desk/mcp/src/factory/pipeline/number-states.js +154 -0
- package/vendor/desk/mcp/src/factory/pipeline/outcomes.js +268 -0
- package/vendor/desk/mcp/src/factory/pipeline/report.js +737 -0
- package/vendor/desk/mcp/src/factory/pipeline/rollups.js +883 -0
- package/vendor/desk/mcp/src/factory/pipeline/stretches.js +523 -0
- package/vendor/desk/mcp/src/factory/pipeline/timeline.js +199 -0
- package/vendor/desk/mcp/src/factory/pipeline/validate-pr.js +238 -0
- package/vendor/desk/mcp/src/factory/pipeline/versions.js +42 -0
- package/vendor/desk/mcp/src/factory/pipeline/walk.js +1177 -0
- package/vendor/desk/mcp/src/factory/plugin-registry.js +72 -0
- package/vendor/desk/mcp/src/factory/plugin-sources.cjs +249 -0
- package/vendor/desk/mcp/src/factory/pr-green.js +77 -0
- package/vendor/desk/mcp/src/factory/process-lock.js +142 -0
- package/vendor/desk/mcp/src/factory/proof-session.js +75 -0
- package/vendor/desk/mcp/src/factory/publish.js +637 -0
- package/vendor/desk/mcp/src/factory/published-schema.js +648 -0
- package/vendor/desk/mcp/src/factory/reconcile-reasons.js +22 -0
- package/vendor/desk/mcp/src/factory/reconcile-step.js +251 -0
- package/vendor/desk/mcp/src/factory/reconcile.js +808 -0
- package/vendor/desk/mcp/src/factory/release-version.js +134 -0
- package/vendor/desk/mcp/src/factory/repo-name.js +13 -0
- package/vendor/desk/mcp/src/factory/retention.js +60 -0
- package/vendor/desk/mcp/src/factory/route-desk.js +40 -0
- package/vendor/desk/mcp/src/factory/route-issues.js +251 -0
- package/vendor/desk/mcp/src/factory/route-local.js +264 -0
- package/vendor/desk/mcp/src/factory/schema.js +957 -0
- package/vendor/desk/mcp/src/factory/session-kind.js +16 -0
- package/vendor/desk/mcp/src/factory/session-lifetime.js +56 -0
- package/vendor/desk/mcp/src/factory/session-route.js +183 -0
- package/vendor/desk/mcp/src/factory/shell-git.js +500 -0
- package/vendor/desk/mcp/src/factory/store-issues.js +143 -0
- package/vendor/desk/mcp/src/factory/store-route.js +208 -0
- package/vendor/desk/mcp/src/factory/test-state-guard.js +103 -0
- package/vendor/desk/mcp/src/factory/time.js +36 -0
- package/vendor/desk/mcp/src/factory/tool-issue-file.js +84 -0
- package/vendor/desk/mcp/src/factory/tool-kinds.js +87 -0
- package/vendor/desk/mcp/src/factory/triage-schema.js +233 -0
- package/vendor/desk/mcp/src/factory/windows-acl.js +679 -0
- package/vendor/desk/mcp/src/indexer/chunk.js +232 -0
- package/vendor/desk/mcp/src/indexer/discover.js +442 -0
- package/vendor/desk/mcp/src/indexer/exclusions.js +247 -0
- package/vendor/desk/mcp/src/indexer/index.js +167 -0
- package/vendor/desk/mcp/src/indexer/refs.js +0 -0
- package/vendor/desk/mcp/src/indexer/text-hash.js +18 -0
- package/vendor/desk/mcp/src/lib/ouro-actions/actions.claims.json +75 -0
- package/vendor/desk/mcp/src/lib/ouro-actions/dist-manifest.json +70 -0
- package/vendor/desk/mcp/src/lib/ouro-actions/ouro-actions.mts +1416 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/LICENSE +21 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/ax-claims.ts +191 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/ax-command.ts +1040 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/checks.ts +343 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/cli.ts +240 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/component.ts +430 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/dev-commands.ts +204 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/doctor.ts +126 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/effects.ts +68 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/exit-codes.ts +75 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/help.ts +220 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/mcp.ts +268 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/outcome.ts +265 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/output.ts +67 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/precise-copy.ts +235 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/problem.ts +124 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/surfaces.kit.mts +8 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/surfaces.ts +568 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/terminal.ts +245 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/voice.ts +136 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/wait.ts +226 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/work-event.ts +181 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/xray.kit.mts +18 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/xray.ts +2110 -0
- package/vendor/desk/mcp/src/package-metadata.js +20 -0
- package/vendor/desk/mcp/src/protected/legacy-ledger.js +55 -0
- package/vendor/desk/mcp/src/readiness/leftovers.js +75 -0
- package/vendor/desk/mcp/src/readiness/process-start.js +149 -0
- package/vendor/desk/mcp/src/runtime/admission-worker.js +194 -0
- package/vendor/desk/mcp/src/runtime/admission.js +177 -0
- package/vendor/desk/mcp/src/runtime/agency-desk-channel.js +342 -0
- package/vendor/desk/mcp/src/runtime/agents-md.js +62 -0
- package/vendor/desk/mcp/src/runtime/append-lane.js +68 -0
- package/vendor/desk/mcp/src/runtime/argv-safe-reason.js +55 -0
- package/vendor/desk/mcp/src/runtime/boot-dependencies.js +75 -0
- package/vendor/desk/mcp/src/runtime/boot-text.js +504 -0
- package/vendor/desk/mcp/src/runtime/boot.js +1676 -0
- package/vendor/desk/mcp/src/runtime/bootstrap.js +1455 -0
- package/vendor/desk/mcp/src/runtime/chunked-import.js +102 -0
- package/vendor/desk/mcp/src/runtime/copilot-commit-trailer.js +133 -0
- package/vendor/desk/mcp/src/runtime/copilot-session.js +155 -0
- package/vendor/desk/mcp/src/runtime/deliver.js +506 -0
- package/vendor/desk/mcp/src/runtime/desk-channel.js +86 -0
- package/vendor/desk/mcp/src/runtime/desk-failure.js +26 -0
- package/vendor/desk/mcp/src/runtime/desk-health.js +168 -0
- package/vendor/desk/mcp/src/runtime/desk-session.js +1451 -0
- package/vendor/desk/mcp/src/runtime/diagnostic-server.js +72 -0
- package/vendor/desk/mcp/src/runtime/diagnostics.js +241 -0
- package/vendor/desk/mcp/src/runtime/drains-cli.js +195 -0
- package/vendor/desk/mcp/src/runtime/drains.js +1220 -0
- package/vendor/desk/mcp/src/runtime/elsewhere-note.js +9 -0
- package/vendor/desk/mcp/src/runtime/failure-evidence.js +21 -0
- package/vendor/desk/mcp/src/runtime/fast-refs.js +209 -0
- package/vendor/desk/mcp/src/runtime/filer-throttle.js +66 -0
- package/vendor/desk/mcp/src/runtime/focused-card.js +147 -0
- package/vendor/desk/mcp/src/runtime/front-door.js +204 -0
- package/vendor/desk/mcp/src/runtime/gate-wait.js +2 -0
- package/vendor/desk/mcp/src/runtime/git-inspection.js +201 -0
- package/vendor/desk/mcp/src/runtime/git-read-worker.js +157 -0
- package/vendor/desk/mcp/src/runtime/health.js +50 -0
- package/vendor/desk/mcp/src/runtime/hooks.js +353 -0
- package/vendor/desk/mcp/src/runtime/hosted.js +165 -0
- package/vendor/desk/mcp/src/runtime/inbox.js +102 -0
- package/vendor/desk/mcp/src/runtime/index-drift.js +118 -0
- package/vendor/desk/mcp/src/runtime/last-start.js +133 -0
- package/vendor/desk/mcp/src/runtime/lesson-section.js +92 -0
- package/vendor/desk/mcp/src/runtime/lessons-shelf.js +100 -0
- package/vendor/desk/mcp/src/runtime/lfs.js +319 -0
- package/vendor/desk/mcp/src/runtime/native-path.js +12 -0
- package/vendor/desk/mcp/src/runtime/newest-release.js +197 -0
- package/vendor/desk/mcp/src/runtime/node-selection.js +233 -0
- package/vendor/desk/mcp/src/runtime/orca-session-title.js +225 -0
- package/vendor/desk/mcp/src/runtime/other-sessions.js +183 -0
- package/vendor/desk/mcp/src/runtime/pending-migrations.js +657 -0
- package/vendor/desk/mcp/src/runtime/plugin-update.js +215 -0
- package/vendor/desk/mcp/src/runtime/pluginless-runtimes.js +34 -0
- package/vendor/desk/mcp/src/runtime/pr-publication.js +252 -0
- package/vendor/desk/mcp/src/runtime/preview-snapshot.js +23 -0
- package/vendor/desk/mcp/src/runtime/publication-mode.js +19 -0
- package/vendor/desk/mcp/src/runtime/relays.js +983 -0
- package/vendor/desk/mcp/src/runtime/release-alert.js +148 -0
- package/vendor/desk/mcp/src/runtime/remote-identity.js +162 -0
- package/vendor/desk/mcp/src/runtime/resolve-here.js +4 -0
- package/vendor/desk/mcp/src/runtime/runtime-deps-cli.js +65 -0
- package/vendor/desk/mcp/src/runtime/runtime-deps.js +1109 -0
- package/vendor/desk/mcp/src/runtime/runtime-identity.js +22 -0
- package/vendor/desk/mcp/src/runtime/runtime-swap.js +101 -0
- package/vendor/desk/mcp/src/runtime/schedules.js +235 -0
- package/vendor/desk/mcp/src/runtime/session-activity.js +190 -0
- package/vendor/desk/mcp/src/runtime/session-label.js +30 -0
- package/vendor/desk/mcp/src/runtime/session-retention.js +662 -0
- package/vendor/desk/mcp/src/runtime/session-sync.js +333 -0
- package/vendor/desk/mcp/src/runtime/session-trailer.js +126 -0
- package/vendor/desk/mcp/src/runtime/sessions-cli.js +301 -0
- package/vendor/desk/mcp/src/runtime/signoff-listed.js +81 -0
- package/vendor/desk/mcp/src/runtime/skills.js +76 -0
- package/vendor/desk/mcp/src/runtime/stale-card-lead.js +52 -0
- package/vendor/desk/mcp/src/runtime/stale-desk-refresh.js +198 -0
- package/vendor/desk/mcp/src/runtime/stale-desk.js +219 -0
- package/vendor/desk/mcp/src/runtime/stalled.js +255 -0
- package/vendor/desk/mcp/src/runtime/standing-authority.js +79 -0
- package/vendor/desk/mcp/src/runtime/startup-boot.js +341 -0
- package/vendor/desk/mcp/src/runtime/startup-resolve.js +140 -0
- package/vendor/desk/mcp/src/runtime/state-branch.js +203 -0
- package/vendor/desk/mcp/src/runtime/status-compact.js +165 -0
- package/vendor/desk/mcp/src/runtime/status-inspection-child.js +26 -0
- package/vendor/desk/mcp/src/runtime/status-inspection.js +147 -0
- package/vendor/desk/mcp/src/runtime/status-root.js +39 -0
- package/vendor/desk/mcp/src/runtime/sync-worker.js +913 -0
- package/vendor/desk/mcp/src/runtime/test-state-guard.js +107 -0
- package/vendor/desk/mcp/src/runtime/unmerged-saves.js +273 -0
- package/vendor/desk/mcp/src/runtime/workspace-claim.js +53 -0
- package/vendor/desk/mcp/src/runtime/workspace-evidence.js +96 -0
- package/vendor/desk/mcp/src/runtime/workspace-tidy.js +509 -0
- package/vendor/desk/mcp/src/search/direct-lexical.js +54 -0
- package/vendor/desk/mcp/src/search/embedder.js +108 -0
- package/vendor/desk/mcp/src/search/engine.js +406 -0
- package/vendor/desk/mcp/src/search/files-router.js +22 -0
- package/vendor/desk/mcp/src/search/old-index.js +46 -0
- package/vendor/desk/mcp/src/search/vectors.js +60 -0
- package/vendor/desk/mcp/src/server.js +390 -0
- package/vendor/desk/mcp/src/tool-names.js +71 -0
- package/vendor/desk/mcp/src/tool-refusal.cjs +35 -0
- package/vendor/desk/mcp/src/tool-schema-parts.js +12 -0
- package/vendor/desk/mcp/src/tool-schemas.js +320 -0
- package/vendor/desk/mcp/src/tools/_card-commit.js +148 -0
- package/vendor/desk/mcp/src/tools/archive-links.js +188 -0
- package/vendor/desk/mcp/src/tools/archive-move.js +18 -0
- package/vendor/desk/mcp/src/tools/archive-native-session.js +728 -0
- package/vendor/desk/mcp/src/tools/archive-state.js +513 -0
- package/vendor/desk/mcp/src/tools/delivery-gate.js +251 -0
- package/vendor/desk/mcp/src/tools/desk-save.js +449 -0
- package/vendor/desk/mcp/src/tools/doctor.js +122 -0
- package/vendor/desk/mcp/src/tools/done-evidence.js +260 -0
- package/vendor/desk/mcp/src/tools/factory-context.js +204 -0
- package/vendor/desk/mcp/src/tools/friction.js +332 -0
- package/vendor/desk/mcp/src/tools/improvement.js +156 -0
- package/vendor/desk/mcp/src/tools/lesson-lines.js +22 -0
- package/vendor/desk/mcp/src/tools/lesson-owners.js +137 -0
- package/vendor/desk/mcp/src/tools/lesson-team.js +169 -0
- package/vendor/desk/mcp/src/tools/lesson.js +254 -0
- package/vendor/desk/mcp/src/tools/local-only.js +151 -0
- package/vendor/desk/mcp/src/tools/move.js +823 -0
- package/vendor/desk/mcp/src/tools/native-stage-context.js +32 -0
- package/vendor/desk/mcp/src/tools/note.js +267 -0
- package/vendor/desk/mcp/src/tools/search.js +634 -0
- package/vendor/desk/mcp/src/tools/shared-write.js +196 -0
- package/vendor/desk/mcp/src/tools/sibling-desk.js +43 -0
- package/vendor/desk/mcp/src/tools/status.js +236 -0
- package/vendor/desk/mcp/src/tools/task-archive-due.js +9 -0
- package/vendor/desk/mcp/src/tools/task-archived-resource.js +53 -0
- package/vendor/desk/mcp/src/tools/task-body.js +141 -0
- package/vendor/desk/mcp/src/tools/task-focus.js +164 -0
- package/vendor/desk/mcp/src/tools/task-log.js +80 -0
- package/vendor/desk/mcp/src/tools/task-signoff.js +155 -0
- package/vendor/desk/mcp/src/tools/task.js +1780 -0
- package/vendor/desk/mcp/src/tools/track-row.js +89 -0
- package/vendor/desk/mcp/src/tools/track.js +240 -0
- package/vendor/desk/mcp/src/util/agency-session.cjs +29 -0
- package/vendor/desk/mcp/src/util/archive-links.js +105 -0
- package/vendor/desk/mcp/src/util/bash.js +36 -0
- package/vendor/desk/mcp/src/util/capture-record.js +73 -0
- package/vendor/desk/mcp/src/util/cas-commit.js +252 -0
- package/vendor/desk/mcp/src/util/citations.js +54 -0
- package/vendor/desk/mcp/src/util/created-dirs.js +71 -0
- package/vendor/desk/mcp/src/util/deferred-tools.js +51 -0
- package/vendor/desk/mcp/src/util/desk-owner.js +99 -0
- package/vendor/desk/mcp/src/util/env-value.js +13 -0
- package/vendor/desk/mcp/src/util/file-identity.js +40 -0
- package/vendor/desk/mcp/src/util/finish-commit.js +145 -0
- package/vendor/desk/mcp/src/util/fm.js +410 -0
- package/vendor/desk/mcp/src/util/git-config-file.js +85 -0
- package/vendor/desk/mcp/src/util/git-stage.js +440 -0
- package/vendor/desk/mcp/src/util/main-publish.js +240 -0
- package/vendor/desk/mcp/src/util/markdown-links.cjs +555 -0
- package/vendor/desk/mcp/src/util/object-input.js +59 -0
- package/vendor/desk/mcp/src/util/paths.js +647 -0
- package/vendor/desk/mcp/src/util/rank.js +189 -0
- package/vendor/desk/mcp/src/util/redact.js +92 -0
- package/vendor/desk/mcp/src/util/remove-retry.js +35 -0
- package/vendor/desk/mcp/src/util/rename-retry.js +73 -0
- package/vendor/desk/mcp/src/util/route-around.js +265 -0
- package/vendor/desk/mcp/src/util/shell-quote.js +18 -0
- package/vendor/desk/mcp/src/util/startup-direction.js +124 -0
- package/vendor/desk/mcp/src/util/state-ignore.js +33 -0
- package/vendor/desk/mcp/src/util/tool-commits.js +64 -0
- package/vendor/desk/mcp/src/util/unicode-16/LICENSE-MIT.txt +7 -0
- package/vendor/desk/mcp/src/util/unicode-16/README.md +9 -0
- package/vendor/desk/mcp/src/util/unicode-16/letter.cjs +1 -0
- package/vendor/desk/mcp/src/util/unicode-16/mark.cjs +1 -0
- package/vendor/desk/mcp/src/util/unicode-16/number.cjs +1 -0
- package/vendor/desk/mcp/web-auth.cjs +1914 -0
- package/vendor/desk/mcp/web-browser-discovery.cjs +53 -0
- package/vendor/desk/mcp/web-catalog.json +34 -0
- package/vendor/desk/mcp/web-launch.cjs +101 -0
- package/vendor/desk/mcp/web-sso.cjs +52 -0
- package/vendor/desk/mcp/web.cjs +1239 -0
- package/vendor/desk/migrations/01-move-to-ourostack-desk.md +188 -0
- package/vendor/desk/migrations/02-tidy-desk.md +87 -0
- package/vendor/desk/migrations/03-desk-release-channel.md +38 -0
- package/vendor/desk/optional/session-label/consumer.mjs +237 -0
- package/vendor/desk/optional/session-label/extension.mjs +32 -0
- package/vendor/desk/plugin.json +54 -0
- package/vendor/desk/settings.json +3 -0
- package/vendor/desk/skills/add-workspace-mcp/SKILL.md +180 -0
- package/vendor/desk/skills/adopt-inflight-work/SKILL.md +212 -0
- package/vendor/desk/skills/archive-workflow/SKILL.md +132 -0
- package/vendor/desk/skills/content-routing/SKILL.md +95 -0
- package/vendor/desk/skills/coordinating-lanes/SKILL.md +24 -0
- package/vendor/desk/skills/core-meeting-capture/SKILL.md +47 -0
- package/vendor/desk/skills/core-meeting-capture/references/capture-contract.md +175 -0
- package/vendor/desk/skills/curator/SKILL.md +103 -0
- package/vendor/desk/skills/delightful-decks/SKILL.md +67 -0
- package/vendor/desk/skills/desk-problem/SKILL.md +87 -0
- package/vendor/desk/skills/directory-structure/SKILL.md +169 -0
- package/vendor/desk/skills/doc-review-rigor/SKILL.md +63 -0
- package/vendor/desk/skills/draining-issues/SKILL.md +62 -0
- package/vendor/desk/skills/evaluate-release/SKILL.md +96 -0
- package/vendor/desk/skills/evidence-discipline/SKILL.md +146 -0
- package/vendor/desk/skills/factory-evaluator/SKILL.md +122 -0
- package/vendor/desk/skills/factory-task-context/SKILL.md +116 -0
- package/vendor/desk/skills/factory-work/SKILL.md +16 -0
- package/vendor/desk/skills/fast-honest-ci/SKILL.md +70 -0
- package/vendor/desk/skills/fast-honest-ci/examples.md +49 -0
- package/vendor/desk/skills/first-run-bootstrap/SKILL.md +95 -0
- package/vendor/desk/skills/friction-management/SKILL.md +98 -0
- package/vendor/desk/skills/git-hygiene/SKILL.md +259 -0
- package/vendor/desk/skills/independent-review/SKILL.md +34 -0
- package/vendor/desk/skills/interaction-style/SKILL.md +241 -0
- package/vendor/desk/skills/lesson-capture/SKILL.md +85 -0
- package/vendor/desk/skills/lesson-capture/agents-md-budget.mjs +61 -0
- package/vendor/desk/skills/live-ui-iteration/SKILL.md +35 -0
- package/vendor/desk/skills/online-evaluation/SKILL.md +81 -0
- package/vendor/desk/skills/operator-voice-comments/LICENSE-humanize +21 -0
- package/vendor/desk/skills/operator-voice-comments/SKILL.md +94 -0
- package/vendor/desk/skills/operator-voice-comments/human-voice.md +43 -0
- package/vendor/desk/skills/outside-approval/SKILL.md +10 -0
- package/vendor/desk/skills/peer-pr-review/SKILL.md +104 -0
- package/vendor/desk/skills/pr-feedback-on-own-pr/SKILL.md +149 -0
- package/vendor/desk/skills/pr-review-interrogation/SKILL.md +121 -0
- package/vendor/desk/skills/pr-reviewer-audit/SKILL.md +68 -0
- package/vendor/desk/skills/pr-reviewer-audit/helpers/audit.py +353 -0
- package/vendor/desk/skills/pr-reviewer-audit/helpers/test_audit.py +522 -0
- package/vendor/desk/skills/pr-self-review/SKILL.md +86 -0
- package/vendor/desk/skills/pr-surface-hygiene/SKILL.md +129 -0
- package/vendor/desk/skills/pr-surface-hygiene/check-visual-proof.cjs +112 -0
- package/vendor/desk/skills/pr-surface-hygiene/repository-setup.md +19 -0
- package/vendor/desk/skills/pr-surface-hygiene/resources/pr-visual-proof.yml +29 -0
- package/vendor/desk/skills/pr-surface-hygiene/resources/pull-request-template.md +5 -0
- package/vendor/desk/skills/preflight-actions/SKILL.md +60 -0
- package/vendor/desk/skills/preview-feedback/SKILL.md +70 -0
- package/vendor/desk/skills/prior-art/SKILL.md +14 -0
- package/vendor/desk/skills/repo-handling/SKILL.md +67 -0
- package/vendor/desk/skills/rnd-lab/SKILL.md +52 -0
- package/vendor/desk/skills/runtime-symptom-investigation/SKILL.md +110 -0
- package/vendor/desk/skills/session-resumption/SKILL.md +128 -0
- package/vendor/desk/skills/session-start/SKILL.md +54 -0
- package/vendor/desk/skills/session-start/details.md +150 -0
- package/vendor/desk/skills/session-start-migrations/README.md +71 -0
- package/vendor/desk/skills/session-start-migrations/SKILL.md +108 -0
- package/vendor/desk/skills/start-task/SKILL.md +88 -0
- package/vendor/desk/skills/task-card-format/SKILL.md +198 -0
- package/vendor/desk/skills/task-lifecycle/SKILL.md +217 -0
- package/vendor/desk/skills/track-card-format/SKILL.md +90 -0
- package/vendor/desk/skills/using-desk/SKILL.md +58 -0
- package/vendor/desk/skills/using-superpowers-with-desk/SKILL.md +158 -0
- package/vendor/desk/skills/visual-proof/SKILL.md +42 -0
- package/vendor/desk/skills/work-orchestration/SKILL.md +177 -0
- package/dist/heart/daemon/auth-flow.js +0 -457
- package/dist/heart/daemon/habit-parser.js +0 -119
- package/dist/heart/daemon/habit-scheduler.js +0 -369
- package/dist/heart/daemon/mcp-server.js +0 -591
- package/dist/heart/daemon/ouro-path-installer.js +0 -221
- package/dist/heart/daemon/ouro-version-manager.js +0 -171
- package/dist/heart/daemon/specialist-tools.js +0 -283
- package/dist/heart/daemon/update-hooks.js +0 -138
- package/dist/heart/obligations.js +0 -197
- package/dist/heart/session-recall.js +0 -216
- package/dist/mind/associative-recall.js +0 -287
- package/dist/mind/friends/resolver.js +0 -84
- package/dist/mind/friends/store-file.js +0 -190
- package/dist/mind/friends/trust-explanation.js +0 -74
- package/dist/mind/friends/types.js +0 -29
- package/dist/mind/journal-index.js +0 -161
- package/dist/mind/obligations.js +0 -134
- package/dist/repertoire/tasks/board.js +0 -160
- package/dist/repertoire/tasks/fix.js +0 -182
- package/dist/repertoire/tasks/index.js +0 -228
- package/dist/repertoire/tasks/lifecycle.js +0 -80
- package/dist/repertoire/tasks/middleware.js +0 -65
- package/dist/repertoire/tasks/parser.js +0 -174
- package/dist/repertoire/tasks/scanner.js +0 -289
- package/dist/repertoire/tasks/transitions.js +0 -128
- package/dist/repertoire/tools-bluebubbles.js +0 -94
- package/dist/senses/bluebubbles-entry.js +0 -13
- package/dist/senses/bluebubbles-media.js +0 -339
- package/dist/senses/bluebubbles.js +0 -1327
- package/dist/senses/inner-dialog-worker.js +0 -154
- package/dist/senses/inner-dialog.js +0 -739
- package/subagents/README.md +0 -7
- /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/basilisk.md +0 -0
- /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/jafar.md +0 -0
- /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/jormungandr.md +0 -0
- /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/kaa.md +0 -0
- /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/medusa.md +0 -0
- /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/monty.md +0 -0
- /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/nagini.md +0 -0
- /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/ouroboros.md +0 -0
- /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/python.md +0 -0
- /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/quetzalcoatl.md +0 -0
- /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/sir-hiss.md +0 -0
- /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/the-snake.md +0 -0
- /package/dist/{repertoire/tasks/types.js → heart/attachments/sources/adapter.js} +0 -0
- /package/dist/heart/{daemon → hatch}/hatch-animation.js +0 -0
- /package/dist/heart/{daemon → hatch}/specialist-orchestrator.js +0 -0
- /package/dist/heart/{daemon → versioning}/ouro-uti.js +0 -0
- /package/dist/heart/{daemon → versioning}/wrapper-publish-guard.js +0 -0
- /package/{dist/mind/friends → node_modules/@ouro.bot/friends/dist}/store.js +0 -0
|
@@ -0,0 +1,927 @@
|
|
|
1
|
+
# Factory store playbook
|
|
2
|
+
|
|
3
|
+
This playbook sets up a new factory store: the GitHub repository that receives a boundary's published session facts, validates them, merges them and publishes the job reports. A maintainer with temporary admin rights on the repository can finish it in one sitting. Every step below was proven on the public [`ourostack/factory`](https://github.com/ourostack/factory) store, whose pull requests 1 to 6 are the receipts; the one exception is the private-store fork setting in step 4.
|
|
4
|
+
|
|
5
|
+
The store design, the published schema and the "no who, no when, just how" stance are in section 4 of the [Agentic Engineering Epoch 2 RFC](agentic-engineering-v2-rfc.md#4-the-factory-measuring-and-designing-the-work). The store-side commands are described in [Factory local session capture](factory-local-capture.md#store-side-validation-and-reports).
|
|
6
|
+
|
|
7
|
+
## What you end with
|
|
8
|
+
|
|
9
|
+
- A repository whose `main` holds `README.md`, `factory.json`, `.github/workflows/` and two data paths: published facts at `facts/<host>-<session id>.json` and published waste labels at `labels/<job>/<session id>.json`. Anyone may add data files, grow a facts file or replace labels with a newer evaluator's; a maintainer (`OWNER`, `MEMBER` or `COLLABORATOR`) may also delete a facts or labels file, a retraction that `factory-merge` merges like any intake; every other change, including any other file under those folders and any removal at a path outside those two shapes, is maintenance, and anyone else's removal is refused (`removal`, or `path` outside the data paths).
|
|
10
|
+
- A ruleset on `main`: every change arrives by pull request, the `factory-validate` check must pass, and nobody can force-push or delete the branch. Admins can bypass only while merging a pull request.
|
|
11
|
+
- `factory-validate`, which checks every pull request with Desk's validator. Our workflow file never runs the candidate's files, but GitHub runs a pull request's own workflow files, so the check alone is not evidence (see "Merging by hand" below).
|
|
12
|
+
- `factory-merge`, which validates each intake pull request again and merges it or closes it with `factory-rejected: <code>` comments. It never merges maintenance pull requests.
|
|
13
|
+
- `factory-build`, which rebuilds the reports and publishes them on the `reports` branch as one commit with no history, then, in a separate job that can write issues but not code, runs the kaizen check on every open kaizen card and andon on the plugins the store tracks.
|
|
14
|
+
- A kaizen issue form (`.github/ISSUE_TEMPLATE/kaizen.yml`) that opens cards with the `kaizen` label and the card's `yaml` block.
|
|
15
|
+
- `factory.json`, which lists the plugins andon watches. It lies outside the data paths, so only a maintainer can change it.
|
|
16
|
+
- The labels `maintenance`, `kaizen`, `andon`, `andon-dismissed`, `confirmed` and `not-confirmed`.
|
|
17
|
+
- Three proof pull requests: one intake merged automatically, one intake rejected and closed, and one maintenance cleanup merged by a maintainer.
|
|
18
|
+
|
|
19
|
+
## Before you start
|
|
20
|
+
|
|
21
|
+
- **Admin rights.** You need admin on the store repository for the settings, and permission to create repositories in the owner account or organization.
|
|
22
|
+
- **Maintainers are people with write access.** The workflows treat a pull request's author as a maintainer when their permission on the store repository is `admin` or `write` (the `maintain` role reads as `write`). They read it from `GET /repos/{owner}/{repo}/collaborators/{author}/permission` with the workflow's own read-only token. They do not use GitHub's author association, which reports an organization member whose membership is private as `CONTRIBUTOR`. Give each maintainer write access or more, directly or through a team; nothing else is needed.
|
|
23
|
+
- **Private stores need a paid plan.** Rulesets on a private repository need GitHub Team or higher. A private store also needs the fork pull request settings in step 4.
|
|
24
|
+
- **Tools.** The GitHub CLI (`gh`), `git` and `jq`, and a token with the `repo` and `workflow` scopes. Pass the token per command as `GH_TOKEN=$(gh auth token --user <login>)`; do not switch the CLI's active account. The commands below assume `export GH_TOKEN=$(gh auth token --user <login>)` in the same shell.
|
|
25
|
+
- **Desk.** The workflows run `plugins/desk/mcp/scripts/factory.js` from `ourostack/desk` `main`, which must provide the `validate-pr` and `build` commands, and the runner's Git must be 2.38 or later, which GitHub-hosted runners provide. On an older Git, `validate-pr` fails closed with `git_too_old` and nothing merges.
|
|
26
|
+
|
|
27
|
+
Set the store name once:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
STORE=<owner>/<repository>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 1. Create the repository
|
|
34
|
+
|
|
35
|
+
Create the repository with no files, then push one bootstrap commit that holds only `README.md`. Protection goes on before any workflow lands.
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
gh repo create "$STORE" --public --disable-wiki \
|
|
39
|
+
--description "Desk factory store: published session facts and CI-built job reports. No who, no when, just how."
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Use `--private` instead of `--public` for a private store. The README must say:
|
|
43
|
+
|
|
44
|
+
- what the store holds, and that it measures the work, never the people;
|
|
45
|
+
- the stance: no who, no when, just how;
|
|
46
|
+
- the published schema's guarantees, with a link to section 4 of the RFC;
|
|
47
|
+
- how to read the `reports` branch (`index.md`, `jobs/<job>.md`, `jobs/<job>.json`);
|
|
48
|
+
- that contribution is opt-in through Desk;
|
|
49
|
+
- that an intake pull request's author, a GitHub account, is visible to anyone who can read the store, as are the times of the pull request and its commits, and that a rejected pull request stays readable after it is closed.
|
|
50
|
+
|
|
51
|
+
Copy the README of `ourostack/factory` and change the store name and links. Then:
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
git clone "https://github.com/$STORE" store && cd store
|
|
55
|
+
git add README.md
|
|
56
|
+
git commit -m "Bootstrap the factory store"
|
|
57
|
+
git push origin main
|
|
58
|
+
gh api "repos/$STORE" --jq '{full_name, visibility, default_branch}'
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The read-back must show the visibility you chose and `default_branch: "main"`.
|
|
62
|
+
|
|
63
|
+
## 2. Repository settings
|
|
64
|
+
|
|
65
|
+
Merge commits only, so each intake keeps its own commit. Branches a maintainer merges are deleted after merge; GitHub skips this for merges made with the workflow token, which suits Desk's reused intake branches. Auto-merge stays off because `factory-merge` does the merging.
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
gh api -X PATCH "repos/$STORE" --input - <<'EOF'
|
|
69
|
+
{"has_issues":true,"has_projects":false,"has_wiki":false,"has_discussions":false,"allow_merge_commit":true,"allow_squash_merge":false,"allow_rebase_merge":false,"allow_auto_merge":false,"delete_branch_on_merge":true,"allow_update_branch":false,"merge_commit_title":"PR_TITLE","merge_commit_message":"PR_BODY","web_commit_signoff_required":false}
|
|
70
|
+
EOF
|
|
71
|
+
gh api "repos/$STORE" --jq '{has_issues,has_wiki,allow_merge_commit,allow_squash_merge,allow_rebase_merge,allow_auto_merge,delete_branch_on_merge}'
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Issues stay on: kaizen cards are issues, and the build's kaizen and andon steps comment on them, label them and open andon issues.
|
|
75
|
+
|
|
76
|
+
## 3. Labels
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
label() { gh api -X POST "repos/$STORE/labels" -f name="$1" -f color="$2" -f description="$3" --jq .name; }
|
|
80
|
+
label maintenance fbca04 "Maintainer change outside facts/ and labels/; never auto-merged"
|
|
81
|
+
label kaizen 0e8a16 "Improvement proposal raised from factory evidence"
|
|
82
|
+
label andon d93f0b "Stop-the-line signal raised from factory evidence"
|
|
83
|
+
label andon-dismissed c5def5 "Andon alarm a reviewer judged not to be a real regression"
|
|
84
|
+
label confirmed 1d76db "Kaizen check: the data supports the card's hypothesis"
|
|
85
|
+
label not-confirmed bfd4f2 "Kaizen check: the data shows the opposite of the card's hypothesis"
|
|
86
|
+
gh api "repos/$STORE/labels?per_page=100" --jq '[.[].name]'
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
`factory-merge` adds `maintenance` to maintenance pull requests and skips every pull request that carries it. Kaizen cards carry `kaizen`; the build's kaizen check adds `confirmed` or `not-confirmed` to a card and removes them when the data no longer supports them; `confirmed` and `not-confirmed` are the kaizen check's own and mean nothing on other issues. Andon issues carry `andon`, and a reviewer adds `andon-dismissed` to one that is not a real regression: the build then never reopens or closes it, but still posts its new numbers when they change.
|
|
90
|
+
|
|
91
|
+
## 4. Actions settings
|
|
92
|
+
|
|
93
|
+
Allow only GitHub-owned actions, keep the default workflow token read-only (each workflow declares the permissions it needs), and let workflows run on pull requests from first-time contributors unless they are new to GitHub.
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
A="repos/$STORE/actions/permissions"
|
|
97
|
+
gh api -X PUT "$A" --input - <<<'{"enabled":true,"allowed_actions":"selected","sha_pinning_required":false}'
|
|
98
|
+
gh api -X PUT "$A/selected-actions" --input - <<<'{"github_owned_allowed":true,"verified_allowed":false,"patterns_allowed":[]}'
|
|
99
|
+
gh api -X PUT "$A/workflow" --input - <<<'{"default_workflow_permissions":"read","can_approve_pull_request_reviews":false}'
|
|
100
|
+
gh api -X PUT "$A/fork-pr-contributor-approval" --input - <<<'{"approval_policy":"first_time_contributors_new_to_github"}'
|
|
101
|
+
for p in "" /selected-actions /workflow /fork-pr-contributor-approval; do gh api "$A$p"; echo; done
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`factory-validate` runs with a read-only token and no secrets, so running it on outside contributions without approval is safe. A stricter policy (`first_time_contributors` or `all_external_contributors`) makes a maintainer approve each new contributor's first run before the intake can merge.
|
|
105
|
+
|
|
106
|
+
**Private store only.** Workflows do not run on fork pull requests to a private repository until you allow it. Allow the runs without write tokens or secrets:
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
gh api -X PUT "$A/fork-pr-workflows-private-repos" --input - <<<'{"run_workflows_from_fork_pull_requests":true,"send_write_tokens_to_workflows":false,"send_secrets_and_variables":false,"require_approval_for_fork_pr_workflows":false}'
|
|
110
|
+
gh api "$A/fork-pr-workflows-private-repos"
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
In the web UI this is Settings → Actions → General → Fork pull request workflows. The organization's Actions policy must allow the same; an organization owner sets it under the organization's Settings → Actions → General. This setting was not exercised on `ourostack/factory`, which is public; read it back after setting it.
|
|
114
|
+
|
|
115
|
+
## 5. The ruleset on `main`
|
|
116
|
+
|
|
117
|
+
```sh
|
|
118
|
+
gh api -X POST "repos/$STORE/rulesets" --input - <<'EOF'
|
|
119
|
+
{
|
|
120
|
+
"name": "main",
|
|
121
|
+
"target": "branch",
|
|
122
|
+
"enforcement": "active",
|
|
123
|
+
"conditions": {
|
|
124
|
+
"ref_name": {
|
|
125
|
+
"include": [
|
|
126
|
+
"~DEFAULT_BRANCH"
|
|
127
|
+
],
|
|
128
|
+
"exclude": []
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"bypass_actors": [
|
|
132
|
+
{
|
|
133
|
+
"actor_id": 5,
|
|
134
|
+
"actor_type": "RepositoryRole",
|
|
135
|
+
"bypass_mode": "pull_request"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"rules": [
|
|
139
|
+
{
|
|
140
|
+
"type": "deletion"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"type": "non_fast_forward"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"type": "pull_request",
|
|
147
|
+
"parameters": {
|
|
148
|
+
"required_approving_review_count": 0,
|
|
149
|
+
"dismiss_stale_reviews_on_push": false,
|
|
150
|
+
"require_code_owner_review": false,
|
|
151
|
+
"require_last_push_approval": false,
|
|
152
|
+
"required_review_thread_resolution": false,
|
|
153
|
+
"allowed_merge_methods": [
|
|
154
|
+
"merge"
|
|
155
|
+
],
|
|
156
|
+
"require_extra_approval_for_unattributed_changes": false
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"type": "required_status_checks",
|
|
161
|
+
"parameters": {
|
|
162
|
+
"strict_required_status_checks_policy": false,
|
|
163
|
+
"do_not_enforce_on_create": false,
|
|
164
|
+
"required_status_checks": [
|
|
165
|
+
{
|
|
166
|
+
"context": "factory-validate",
|
|
167
|
+
"integration_id": 15368
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
EOF
|
|
175
|
+
gh api "repos/$STORE/rulesets" --jq '.[] | {id, name, enforcement}'
|
|
176
|
+
gh api "repos/$STORE/rules/branches/main" --jq '[.[].type]'
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
What each part does:
|
|
180
|
+
|
|
181
|
+
- `deletion` and `non_fast_forward`: nobody can delete `main` or force-push it.
|
|
182
|
+
- `pull_request` with no required approvals and merge method `merge`: every change arrives through a pull request; no human review is required, because the validator decides.
|
|
183
|
+
- `require_extra_approval_for_unattributed_changes: false`: GitHub turns this on when a ruleset leaves it out. It demands a human approval for commits whose author email maps to no GitHub account, which would stall automatic intake merges.
|
|
184
|
+
- `required_status_checks` with `factory-validate` from integration `15368` (GitHub Actions): the validator's check must pass, and only GitHub Actions can supply it. A pull request's own workflow files also run on GitHub Actions, so a pull request can supply a green `factory-validate` of its own; the ruleset keeps unvalidated changes off `main` only together with the rule in "Merging by hand". It is not strict, so an intake does not need to be rebased onto the latest `main`.
|
|
185
|
+
- The bypass: the repository Admin role (actor `5`) in `pull_request` mode. Admins cannot push to `main` directly; they can only merge a pull request past a failing requirement, and GitHub records the bypass on the pull request. Use it only for a maintenance pull request that cannot pass, such as a fix to a broken validator.
|
|
186
|
+
|
|
187
|
+
The check can be required before it has ever run. Prove the protection by trying a direct push; it must be refused with "push declined due to repository rule violations":
|
|
188
|
+
|
|
189
|
+
```sh
|
|
190
|
+
git commit --allow-empty -m "Probe protection" && git push origin HEAD:main; git reset --hard HEAD~1
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## 6. The workflows
|
|
194
|
+
|
|
195
|
+
Add the five files below unchanged, on a branch, and open the pull request with the `maintenance` label so `factory-merge` leaves it alone:
|
|
196
|
+
|
|
197
|
+
```sh
|
|
198
|
+
git switch -c maintenance/workflows
|
|
199
|
+
git add factory.json .github/workflows/validate.yml .github/workflows/merge.yml .github/workflows/build.yml .github/ISSUE_TEMPLATE/kaizen.yml
|
|
200
|
+
git commit -m "Add the factory workflows"
|
|
201
|
+
git push -u origin maintenance/workflows
|
|
202
|
+
gh pr create --repo "$STORE" --base main --head maintenance/workflows --label maintenance \
|
|
203
|
+
--title "Add the factory workflows" --body "Adds factory-validate, factory-merge and factory-build."
|
|
204
|
+
gh pr checks --repo "$STORE" --watch maintenance/workflows
|
|
205
|
+
gh pr merge --repo "$STORE" maintenance/workflows --merge
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
`factory-validate` must pass before you merge; when it passes for a maintenance change, its summary reads `factory-validate: passed (maintenance)`. If it fails with `path`, your permission on the repository is below `write`, or the summary also says `maintainer_check_unavailable` because the permission lookup failed; fix the permission or re-run the check.
|
|
209
|
+
|
|
210
|
+
### `factory.json`
|
|
211
|
+
|
|
212
|
+
The plugins andon watches. List the plugins whose releases this store should stop the line for; a store without this file raises no andon issues. Up to 64 plugin names, each listed once.
|
|
213
|
+
|
|
214
|
+
```json
|
|
215
|
+
{
|
|
216
|
+
"andon": {
|
|
217
|
+
"plugins": ["desk"]
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### `.github/workflows/validate.yml`
|
|
223
|
+
|
|
224
|
+
```yaml
|
|
225
|
+
# Validates every pull request against the published facts schema.
|
|
226
|
+
#
|
|
227
|
+
# The candidate is untrusted data. This workflow checks out the base, fetches
|
|
228
|
+
# the pull request's exact head commit as Git objects only, and runs Desk's
|
|
229
|
+
# validator, cloned from ourostack/desk main, on what merging that head into
|
|
230
|
+
# the base would land. This file never checks out, installs or executes the
|
|
231
|
+
# candidate's files. Failures report stable reason codes only.
|
|
232
|
+
#
|
|
233
|
+
# GitHub runs the workflow files of the pull request's own merge commit on
|
|
234
|
+
# `pull_request`, so a pull request that edits this file, or adds a workflow
|
|
235
|
+
# with a job named `factory-validate`, runs its own code here instead, with
|
|
236
|
+
# a read-only token and no secrets, and can post a green check. A green
|
|
237
|
+
# `factory-validate` is therefore not evidence on its own: factory-merge
|
|
238
|
+
# validates again from main before it merges, and a maintainer merges
|
|
239
|
+
# someone else's pull request only through factory-merge or after running
|
|
240
|
+
# validate-pr at its exact head.
|
|
241
|
+
#
|
|
242
|
+
# A maintainer is the pull request author when their permission on this
|
|
243
|
+
# repository is `admin` or `write` (`maintain` reads as `write`), read from
|
|
244
|
+
# the collaborator permission API with the read-only workflow token. The
|
|
245
|
+
# author association is not used: it depends on whether a member's
|
|
246
|
+
# organization membership is public. Any API error means "not a maintainer".
|
|
247
|
+
name: factory-validate
|
|
248
|
+
|
|
249
|
+
on:
|
|
250
|
+
pull_request:
|
|
251
|
+
|
|
252
|
+
permissions:
|
|
253
|
+
contents: read
|
|
254
|
+
|
|
255
|
+
concurrency:
|
|
256
|
+
group: factory-validate-${{ github.event.pull_request.number }}
|
|
257
|
+
cancel-in-progress: true
|
|
258
|
+
|
|
259
|
+
jobs:
|
|
260
|
+
factory-validate:
|
|
261
|
+
name: factory-validate
|
|
262
|
+
runs-on: ubuntu-latest
|
|
263
|
+
timeout-minutes: 10
|
|
264
|
+
steps:
|
|
265
|
+
- name: Set up Node
|
|
266
|
+
uses: actions/setup-node@v7
|
|
267
|
+
with:
|
|
268
|
+
node-version: 22
|
|
269
|
+
|
|
270
|
+
- name: Check out the base
|
|
271
|
+
uses: actions/checkout@v7
|
|
272
|
+
with:
|
|
273
|
+
ref: ${{ github.event.pull_request.base.sha }}
|
|
274
|
+
fetch-depth: 0
|
|
275
|
+
persist-credentials: false
|
|
276
|
+
|
|
277
|
+
- name: Fetch the candidate as data
|
|
278
|
+
env:
|
|
279
|
+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
|
280
|
+
run: |
|
|
281
|
+
set -euo pipefail
|
|
282
|
+
git fetch --quiet --no-tags origin "$HEAD_SHA"
|
|
283
|
+
test "$(git rev-parse --verify "$HEAD_SHA^{commit}")" = "$HEAD_SHA"
|
|
284
|
+
|
|
285
|
+
- name: Clone Desk main
|
|
286
|
+
run: |
|
|
287
|
+
set -euo pipefail
|
|
288
|
+
git clone --quiet --depth 1 --branch main https://github.com/ourostack/desk "$RUNNER_TEMP/desk"
|
|
289
|
+
echo "Desk main: $(git -C "$RUNNER_TEMP/desk" rev-parse HEAD)"
|
|
290
|
+
|
|
291
|
+
- name: Decide whether the author maintains this repository
|
|
292
|
+
id: maintainer
|
|
293
|
+
env:
|
|
294
|
+
GH_TOKEN: ${{ github.token }}
|
|
295
|
+
REPOSITORY: ${{ github.repository }}
|
|
296
|
+
AUTHOR: ${{ github.event.pull_request.user.login }}
|
|
297
|
+
run: |
|
|
298
|
+
set -uo pipefail
|
|
299
|
+
association=NONE
|
|
300
|
+
if [[ ${#AUTHOR} -le 39 && "$AUTHOR" =~ ^[A-Za-z0-9][A-Za-z0-9-]*(_[A-Za-z0-9]+)?$ ]]; then
|
|
301
|
+
if permission=$(gh api "repos/$REPOSITORY/collaborators/$AUTHOR/permission" --jq '.permission' 2> /dev/null); then
|
|
302
|
+
case "$permission" in
|
|
303
|
+
admin|write) association=COLLABORATOR ;;
|
|
304
|
+
esac
|
|
305
|
+
else
|
|
306
|
+
printf 'factory-validate: maintainer_check_unavailable\n' | tee -a "$GITHUB_STEP_SUMMARY"
|
|
307
|
+
fi
|
|
308
|
+
fi
|
|
309
|
+
echo "association=$association" >> "$GITHUB_OUTPUT"
|
|
310
|
+
echo "Maintainer association: $association"
|
|
311
|
+
|
|
312
|
+
- name: Validate the pull request
|
|
313
|
+
env:
|
|
314
|
+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
|
315
|
+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
|
316
|
+
AUTHOR_ASSOCIATION: ${{ steps.maintainer.outputs.association }}
|
|
317
|
+
run: |
|
|
318
|
+
set -uo pipefail
|
|
319
|
+
result="$RUNNER_TEMP/factory-validate.json"
|
|
320
|
+
node "$RUNNER_TEMP/desk/plugins/desk/mcp/scripts/factory.js" validate-pr \
|
|
321
|
+
--base "$BASE_SHA" --head "$HEAD_SHA" --author-association "$AUTHOR_ASSOCIATION" \
|
|
322
|
+
> "$result" 2> /dev/null || true
|
|
323
|
+
if ! jq -e '(.ok | type) == "boolean"' "$result" > /dev/null 2>&1; then
|
|
324
|
+
printf 'factory-validate: validator_unavailable\n' | tee -a "$GITHUB_STEP_SUMMARY"
|
|
325
|
+
exit 1
|
|
326
|
+
fi
|
|
327
|
+
if jq -e '.ok == true' "$result" > /dev/null; then
|
|
328
|
+
if jq -e '.maintenance == true' "$result" > /dev/null; then
|
|
329
|
+
printf 'factory-validate: passed (maintenance)\n' | tee -a "$GITHUB_STEP_SUMMARY"
|
|
330
|
+
else
|
|
331
|
+
printf 'factory-validate: passed\n' | tee -a "$GITHUB_STEP_SUMMARY"
|
|
332
|
+
fi
|
|
333
|
+
exit 0
|
|
334
|
+
fi
|
|
335
|
+
printf 'factory-validate: failed\n' | tee -a "$GITHUB_STEP_SUMMARY"
|
|
336
|
+
jq -r '[.errors[].code | if type == "string" and test("^[a-z][a-z0-9_]{0,63}$") then . else "unknown_code" end] | unique[] | "factory-rejected: \(.)"' "$result" | tee -a "$GITHUB_STEP_SUMMARY"
|
|
337
|
+
exit 1
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### `.github/workflows/merge.yml`
|
|
341
|
+
|
|
342
|
+
```yaml
|
|
343
|
+
# Merges or rejects intake pull requests after factory-validate completes.
|
|
344
|
+
#
|
|
345
|
+
# This workflow always runs from main, so a pull request cannot change it.
|
|
346
|
+
# It never trusts the triggering run: a pull request's own workflow files run
|
|
347
|
+
# on its `pull_request` event and can post a green `factory-validate`, or name
|
|
348
|
+
# a workflow `factory-validate`, so the only field of the `workflow_run`
|
|
349
|
+
# event used here is `head_sha`, and that head is validated again with Desk
|
|
350
|
+
# main, fetched as Git objects only. Keep it that way: never read any other
|
|
351
|
+
# event field, and never trust the triggering conclusion alone.
|
|
352
|
+
#
|
|
353
|
+
# Three steps keep the write token away from candidate data: the first finds
|
|
354
|
+
# the open pull requests at that head and their authors' permission; the
|
|
355
|
+
# second, which holds no token, runs Desk's validator; the third acts on the
|
|
356
|
+
# results. It merges only when both validations pass and the pull request
|
|
357
|
+
# still has that head, and the merge call passes that head as `sha`, so
|
|
358
|
+
# GitHub refuses the merge if the head moved. It rejects only when the
|
|
359
|
+
# trusted validation fails and the head is unchanged, with a comment of
|
|
360
|
+
# `factory-rejected: <code>` lines and nothing else. Maintenance pull
|
|
361
|
+
# requests (changes outside the data paths facts/ and labels/, including
|
|
362
|
+
# .github/, by a maintainer) are labeled `maintenance` and left for a
|
|
363
|
+
# maintainer; the same changes from anyone else fail validation with `path`
|
|
364
|
+
# and are rejected. A maintainer is the pull request author when their
|
|
365
|
+
# permission on this repository is `admin` or `write`; any API error means
|
|
366
|
+
# "not a maintainer".
|
|
367
|
+
name: factory-merge
|
|
368
|
+
|
|
369
|
+
on:
|
|
370
|
+
workflow_run:
|
|
371
|
+
workflows: [factory-validate]
|
|
372
|
+
types: [completed]
|
|
373
|
+
|
|
374
|
+
permissions:
|
|
375
|
+
contents: write
|
|
376
|
+
pull-requests: write
|
|
377
|
+
|
|
378
|
+
concurrency:
|
|
379
|
+
group: factory-merge-${{ github.event.workflow_run.head_sha }}
|
|
380
|
+
cancel-in-progress: false
|
|
381
|
+
|
|
382
|
+
jobs:
|
|
383
|
+
factory-merge:
|
|
384
|
+
name: factory-merge
|
|
385
|
+
if: >-
|
|
386
|
+
github.event.workflow_run.event == 'pull_request' &&
|
|
387
|
+
(github.event.workflow_run.conclusion == 'success' || github.event.workflow_run.conclusion == 'failure')
|
|
388
|
+
runs-on: ubuntu-latest
|
|
389
|
+
timeout-minutes: 10
|
|
390
|
+
steps:
|
|
391
|
+
- name: Set up Node
|
|
392
|
+
uses: actions/setup-node@v7
|
|
393
|
+
with:
|
|
394
|
+
node-version: 22
|
|
395
|
+
|
|
396
|
+
- name: Check out main
|
|
397
|
+
uses: actions/checkout@v7
|
|
398
|
+
with:
|
|
399
|
+
ref: ${{ github.event.repository.default_branch }}
|
|
400
|
+
fetch-depth: 0
|
|
401
|
+
persist-credentials: false
|
|
402
|
+
|
|
403
|
+
- name: Clone Desk main
|
|
404
|
+
run: |
|
|
405
|
+
set -euo pipefail
|
|
406
|
+
git clone --quiet --depth 1 --branch main https://github.com/ourostack/desk "$RUNNER_TEMP/desk"
|
|
407
|
+
echo "Desk main: $(git -C "$RUNNER_TEMP/desk" rev-parse HEAD)"
|
|
408
|
+
|
|
409
|
+
- name: Find the pull requests at the validated head
|
|
410
|
+
env:
|
|
411
|
+
GH_TOKEN: ${{ github.token }}
|
|
412
|
+
REPOSITORY: ${{ github.repository }}
|
|
413
|
+
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
|
414
|
+
HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
|
|
415
|
+
run: |
|
|
416
|
+
set -euo pipefail
|
|
417
|
+
summary() { printf '%s\n' "$1" | tee -a "$GITHUB_STEP_SUMMARY"; }
|
|
418
|
+
: > "$RUNNER_TEMP/factory-prs.tsv"
|
|
419
|
+
|
|
420
|
+
if ! printf '%s' "$HEAD_SHA" | grep -Eq '^[0-9a-f]{40}$'; then
|
|
421
|
+
summary "factory-merge: invalid head"
|
|
422
|
+
exit 1
|
|
423
|
+
fi
|
|
424
|
+
|
|
425
|
+
# Fork pull requests leave workflow_run.pull_requests empty, so find
|
|
426
|
+
# the open pull requests whose head is the validated commit.
|
|
427
|
+
numbers=$(gh api "repos/$REPOSITORY/pulls?state=open&base=$DEFAULT_BRANCH&per_page=100" --paginate \
|
|
428
|
+
--jq ".[] | select(.head.sha == \"$HEAD_SHA\") | .number")
|
|
429
|
+
if [ -z "$numbers" ]; then
|
|
430
|
+
summary "factory-merge: no open pull request has head $HEAD_SHA"
|
|
431
|
+
exit 0
|
|
432
|
+
fi
|
|
433
|
+
|
|
434
|
+
for number in $numbers; do
|
|
435
|
+
pr=$(gh api "repos/$REPOSITORY/pulls/$number")
|
|
436
|
+
if [ "$(jq -r '.state' <<<"$pr")" != "open" ] || [ "$(jq -r '.head.sha' <<<"$pr")" != "$HEAD_SHA" ]; then
|
|
437
|
+
summary "factory-merge: #$number head moved; skipped"
|
|
438
|
+
continue
|
|
439
|
+
fi
|
|
440
|
+
if jq -e '[.labels[].name] | index("maintenance")' <<<"$pr" > /dev/null; then
|
|
441
|
+
summary "factory-merge: #$number is maintenance; left for a maintainer"
|
|
442
|
+
continue
|
|
443
|
+
fi
|
|
444
|
+
author=$(jq -r '.user.login' <<<"$pr")
|
|
445
|
+
association=NONE
|
|
446
|
+
if [[ ${#author} -le 39 && "$author" =~ ^[A-Za-z0-9][A-Za-z0-9-]*(_[A-Za-z0-9]+)?$ ]]; then
|
|
447
|
+
if permission=$(gh api "repos/$REPOSITORY/collaborators/$author/permission" --jq '.permission' 2> /dev/null); then
|
|
448
|
+
case "$permission" in
|
|
449
|
+
admin|write) association=COLLABORATOR ;;
|
|
450
|
+
esac
|
|
451
|
+
else
|
|
452
|
+
summary "factory-merge: #$number maintainer_check_unavailable"
|
|
453
|
+
fi
|
|
454
|
+
fi
|
|
455
|
+
printf '%s\t%s\n' "$number" "$association" >> "$RUNNER_TEMP/factory-prs.tsv"
|
|
456
|
+
done
|
|
457
|
+
|
|
458
|
+
- name: Validate with Desk main (no token)
|
|
459
|
+
env:
|
|
460
|
+
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
|
461
|
+
HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
|
|
462
|
+
run: |
|
|
463
|
+
set -euo pipefail
|
|
464
|
+
if [ ! -s "$RUNNER_TEMP/factory-prs.tsv" ]; then
|
|
465
|
+
exit 0
|
|
466
|
+
fi
|
|
467
|
+
git fetch --quiet --no-tags origin "+refs/heads/$DEFAULT_BRANCH:refs/remotes/origin/$DEFAULT_BRANCH"
|
|
468
|
+
git fetch --quiet --no-tags origin "$HEAD_SHA"
|
|
469
|
+
test "$(git rev-parse --verify "$HEAD_SHA^{commit}")" = "$HEAD_SHA"
|
|
470
|
+
base_sha=$(git rev-parse "refs/remotes/origin/$DEFAULT_BRANCH")
|
|
471
|
+
while IFS=$'\t' read -r number association; do
|
|
472
|
+
node "$RUNNER_TEMP/desk/plugins/desk/mcp/scripts/factory.js" validate-pr \
|
|
473
|
+
--base "$base_sha" --head "$HEAD_SHA" --author-association "$association" \
|
|
474
|
+
> "$RUNNER_TEMP/factory-validate-$number.json" 2> /dev/null || true
|
|
475
|
+
done < "$RUNNER_TEMP/factory-prs.tsv"
|
|
476
|
+
|
|
477
|
+
- name: Merge or reject
|
|
478
|
+
env:
|
|
479
|
+
GH_TOKEN: ${{ github.token }}
|
|
480
|
+
REPOSITORY: ${{ github.repository }}
|
|
481
|
+
HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
|
|
482
|
+
CONCLUSION: ${{ github.event.workflow_run.conclusion }}
|
|
483
|
+
run: |
|
|
484
|
+
set -euo pipefail
|
|
485
|
+
summary() { printf '%s\n' "$1" | tee -a "$GITHUB_STEP_SUMMARY"; }
|
|
486
|
+
unavailable=0
|
|
487
|
+
while IFS=$'\t' read -r number association; do
|
|
488
|
+
result="$RUNNER_TEMP/factory-validate-$number.json"
|
|
489
|
+
if ! jq -e '(.ok | type) == "boolean"' "$result" > /dev/null 2>&1; then
|
|
490
|
+
summary "factory-merge: #$number validator_unavailable; no action"
|
|
491
|
+
unavailable=1
|
|
492
|
+
continue
|
|
493
|
+
fi
|
|
494
|
+
|
|
495
|
+
if jq -e '.ok == true' "$result" > /dev/null; then
|
|
496
|
+
if jq -e '.maintenance == true' "$result" > /dev/null; then
|
|
497
|
+
gh api -X POST "repos/$REPOSITORY/issues/$number/labels" -f 'labels[]=maintenance' > /dev/null
|
|
498
|
+
summary "factory-merge: #$number labeled maintenance; left for a maintainer"
|
|
499
|
+
continue
|
|
500
|
+
fi
|
|
501
|
+
if [ "$CONCLUSION" != "success" ]; then
|
|
502
|
+
summary "factory-merge: #$number passed revalidation but its validation run failed; no action"
|
|
503
|
+
continue
|
|
504
|
+
fi
|
|
505
|
+
# The sha parameter makes GitHub refuse the merge if the head moved.
|
|
506
|
+
gh api -X PUT "repos/$REPOSITORY/pulls/$number/merge" \
|
|
507
|
+
-f merge_method=merge -f sha="$HEAD_SHA" > /dev/null
|
|
508
|
+
summary "factory-merge: #$number merged at head $HEAD_SHA"
|
|
509
|
+
continue
|
|
510
|
+
fi
|
|
511
|
+
|
|
512
|
+
codes=$(jq -r '[.errors[].code | if type == "string" and test("^[a-z][a-z0-9_]{0,63}$") then . else "unknown_code" end] | unique[] | "factory-rejected: \(.)"' "$result")
|
|
513
|
+
if [ -z "$codes" ]; then
|
|
514
|
+
codes="factory-rejected: unknown_code"
|
|
515
|
+
fi
|
|
516
|
+
current=$(gh api "repos/$REPOSITORY/pulls/$number" --jq '.head.sha')
|
|
517
|
+
if [ "$current" != "$HEAD_SHA" ]; then
|
|
518
|
+
summary "factory-merge: #$number head moved before rejection; skipped"
|
|
519
|
+
continue
|
|
520
|
+
fi
|
|
521
|
+
gh api -X POST "repos/$REPOSITORY/issues/$number/comments" -f body="$codes" > /dev/null
|
|
522
|
+
gh api -X PATCH "repos/$REPOSITORY/pulls/$number" -f state=closed > /dev/null
|
|
523
|
+
summary "factory-merge: #$number rejected and closed"
|
|
524
|
+
summary "$codes"
|
|
525
|
+
done < "$RUNNER_TEMP/factory-prs.tsv"
|
|
526
|
+
exit "$unavailable"
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
### `.github/workflows/build.yml`
|
|
530
|
+
|
|
531
|
+
```yaml
|
|
532
|
+
# Rebuilds the reports from the facts on main and publishes them on the
|
|
533
|
+
# `reports` branch as a single orphan commit.
|
|
534
|
+
#
|
|
535
|
+
# Runs on pushes to main (maintainer merges), after factory-merge completes
|
|
536
|
+
# (merges made with the workflow token do not start push workflows), daily,
|
|
537
|
+
# and on demand. The build is deterministic and the commit has fixed metadata,
|
|
538
|
+
# so the same facts always produce the same commit and an unchanged build
|
|
539
|
+
# pushes nothing. The commit has no parent and holds only the build output.
|
|
540
|
+
#
|
|
541
|
+
# It also runs when an issue is opened, edited, reopened or labeled, so a new
|
|
542
|
+
# or edited kaizen card is checked right away; an issue event skips the
|
|
543
|
+
# report build and runs only the issue checks. Changes the build itself makes
|
|
544
|
+
# with the workflow token start no new run.
|
|
545
|
+
#
|
|
546
|
+
# Two jobs keep write access apart. `factory-build` holds `contents: write`
|
|
547
|
+
# and no issue access; it reads only facts and labels on main. The second
|
|
548
|
+
# job, `issue-checks`, reads issue text anyone can write, so it holds only
|
|
549
|
+
# `contents: read` and `issues: write`. It runs the kaizen check: for every
|
|
550
|
+
# open issue labeled `kaizen` it compares the card's measure before and after
|
|
551
|
+
# the card's version, keeps one comment of its own on the card up to date and
|
|
552
|
+
# sets or clears the `confirmed` and `not-confirmed` labels. It never closes
|
|
553
|
+
# a card. Card bodies are untrusted data: Desk parses them strictly and
|
|
554
|
+
# echoes nothing back but stable codes and validated values; a card that
|
|
555
|
+
# fails is reported and the rest are still checked. Then andon runs even if
|
|
556
|
+
# the kaizen check failed: for each plugin listed in `factory.json` (a
|
|
557
|
+
# maintenance path, so only a maintainer changes it) it compares the latest
|
|
558
|
+
# version with enough jobs to the one before it on the quality measures and
|
|
559
|
+
# opens, updates, reopens or closes the issues labeled `andon` that this
|
|
560
|
+
# workflow opened; it never touches anyone else's issue.
|
|
561
|
+
#
|
|
562
|
+
# A pull request can name one of its own workflows `factory-merge` and start
|
|
563
|
+
# this workflow through `workflow_run`, and anyone can open an issue. That is
|
|
564
|
+
# harmless because this workflow reads no event data: it always builds main.
|
|
565
|
+
# Keep it that way.
|
|
566
|
+
name: factory-build
|
|
567
|
+
|
|
568
|
+
on:
|
|
569
|
+
push:
|
|
570
|
+
branches: [main]
|
|
571
|
+
workflow_run:
|
|
572
|
+
workflows: [factory-merge]
|
|
573
|
+
types: [completed]
|
|
574
|
+
issues:
|
|
575
|
+
types: [opened, edited, reopened, labeled]
|
|
576
|
+
schedule:
|
|
577
|
+
- cron: "23 4 * * *"
|
|
578
|
+
workflow_dispatch:
|
|
579
|
+
|
|
580
|
+
permissions: {}
|
|
581
|
+
|
|
582
|
+
concurrency:
|
|
583
|
+
group: factory-build
|
|
584
|
+
cancel-in-progress: false
|
|
585
|
+
|
|
586
|
+
jobs:
|
|
587
|
+
factory-build:
|
|
588
|
+
name: factory-build
|
|
589
|
+
if: github.event_name != 'issues' && (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success')
|
|
590
|
+
runs-on: ubuntu-latest
|
|
591
|
+
timeout-minutes: 15
|
|
592
|
+
permissions:
|
|
593
|
+
contents: write
|
|
594
|
+
steps:
|
|
595
|
+
- name: Set up Node
|
|
596
|
+
uses: actions/setup-node@v7
|
|
597
|
+
with:
|
|
598
|
+
node-version: 22
|
|
599
|
+
|
|
600
|
+
- name: Check out main
|
|
601
|
+
uses: actions/checkout@v7
|
|
602
|
+
with:
|
|
603
|
+
ref: ${{ github.event.repository.default_branch }}
|
|
604
|
+
persist-credentials: false
|
|
605
|
+
|
|
606
|
+
- name: Clone Desk main
|
|
607
|
+
run: |
|
|
608
|
+
set -euo pipefail
|
|
609
|
+
git clone --quiet --depth 1 --branch main https://github.com/ourostack/desk "$RUNNER_TEMP/desk"
|
|
610
|
+
echo "Desk main: $(git -C "$RUNNER_TEMP/desk" rev-parse HEAD)"
|
|
611
|
+
|
|
612
|
+
- name: Build the reports
|
|
613
|
+
run: |
|
|
614
|
+
set -euo pipefail
|
|
615
|
+
echo "Store main: $(git rev-parse HEAD)"
|
|
616
|
+
# Git keeps no empty folders, so a store with no facts has none.
|
|
617
|
+
mkdir -p facts
|
|
618
|
+
node "$RUNNER_TEMP/desk/plugins/desk/mcp/scripts/factory.js" build --store . --out _out
|
|
619
|
+
|
|
620
|
+
- name: Publish the reports branch
|
|
621
|
+
env:
|
|
622
|
+
GH_TOKEN: ${{ github.token }}
|
|
623
|
+
REPOSITORY: ${{ github.repository }}
|
|
624
|
+
run: |
|
|
625
|
+
set -euo pipefail
|
|
626
|
+
cd _out
|
|
627
|
+
git init --quiet --initial-branch=reports
|
|
628
|
+
git add --all
|
|
629
|
+
export GIT_AUTHOR_NAME="github-actions[bot]"
|
|
630
|
+
export GIT_AUTHOR_EMAIL="41898282+github-actions[bot]@users.noreply.github.com"
|
|
631
|
+
export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
|
|
632
|
+
export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
|
|
633
|
+
export GIT_AUTHOR_DATE="1970-01-01T00:00:00Z"
|
|
634
|
+
export GIT_COMMITTER_DATE="1970-01-01T00:00:00Z"
|
|
635
|
+
git -c commit.gpgsign=false commit --quiet --message "Build factory reports"
|
|
636
|
+
built=$(git rev-parse HEAD)
|
|
637
|
+
published=$(git ls-remote "https://github.com/$REPOSITORY" refs/heads/reports | cut -f1)
|
|
638
|
+
echo "Reports commit: $built (tree $(git rev-parse 'HEAD^{tree}'))" | tee -a "$GITHUB_STEP_SUMMARY"
|
|
639
|
+
if [ "$built" = "$published" ]; then
|
|
640
|
+
echo "Reports unchanged; nothing to publish." | tee -a "$GITHUB_STEP_SUMMARY"
|
|
641
|
+
exit 0
|
|
642
|
+
fi
|
|
643
|
+
auth=$(printf 'x-access-token:%s' "$GH_TOKEN" | base64 | tr -d '\n')
|
|
644
|
+
echo "::add-mask::$auth"
|
|
645
|
+
git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic $auth" \
|
|
646
|
+
push --quiet --force "https://github.com/$REPOSITORY" HEAD:refs/heads/reports
|
|
647
|
+
echo "Published reports: $built" | tee -a "$GITHUB_STEP_SUMMARY"
|
|
648
|
+
|
|
649
|
+
issue-checks:
|
|
650
|
+
name: issue-checks
|
|
651
|
+
needs: factory-build
|
|
652
|
+
if: ${{ !cancelled() && (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success') }}
|
|
653
|
+
runs-on: ubuntu-latest
|
|
654
|
+
timeout-minutes: 15
|
|
655
|
+
permissions:
|
|
656
|
+
contents: read
|
|
657
|
+
issues: write
|
|
658
|
+
steps:
|
|
659
|
+
- name: Set up Node
|
|
660
|
+
uses: actions/setup-node@v7
|
|
661
|
+
with:
|
|
662
|
+
node-version: 22
|
|
663
|
+
|
|
664
|
+
- name: Check out main
|
|
665
|
+
uses: actions/checkout@v7
|
|
666
|
+
with:
|
|
667
|
+
ref: ${{ github.event.repository.default_branch }}
|
|
668
|
+
persist-credentials: false
|
|
669
|
+
|
|
670
|
+
- name: Clone Desk main
|
|
671
|
+
run: |
|
|
672
|
+
set -euo pipefail
|
|
673
|
+
git clone --quiet --depth 1 --branch main https://github.com/ourostack/desk "$RUNNER_TEMP/desk"
|
|
674
|
+
echo "Desk main: $(git -C "$RUNNER_TEMP/desk" rev-parse HEAD)"
|
|
675
|
+
mkdir -p facts
|
|
676
|
+
|
|
677
|
+
- name: Check the kaizen cards
|
|
678
|
+
env:
|
|
679
|
+
GH_TOKEN: ${{ github.token }}
|
|
680
|
+
REPOSITORY: ${{ github.repository }}
|
|
681
|
+
run: |
|
|
682
|
+
set -uo pipefail
|
|
683
|
+
node "$RUNNER_TEMP/desk/plugins/desk/mcp/scripts/factory.js" kaizen-check --store . --repo "$REPOSITORY" > "$RUNNER_TEMP/kaizen.json"
|
|
684
|
+
status=$?
|
|
685
|
+
echo "Kaizen check: $(cat "$RUNNER_TEMP/kaizen.json")" | tee -a "$GITHUB_STEP_SUMMARY"
|
|
686
|
+
exit $status
|
|
687
|
+
|
|
688
|
+
- name: Pull the andon cord
|
|
689
|
+
if: ${{ !cancelled() }}
|
|
690
|
+
env:
|
|
691
|
+
GH_TOKEN: ${{ github.token }}
|
|
692
|
+
REPOSITORY: ${{ github.repository }}
|
|
693
|
+
run: |
|
|
694
|
+
set -uo pipefail
|
|
695
|
+
node "$RUNNER_TEMP/desk/plugins/desk/mcp/scripts/factory.js" andon --store . --repo "$REPOSITORY" > "$RUNNER_TEMP/andon.json"
|
|
696
|
+
status=$?
|
|
697
|
+
echo "Andon: $(cat "$RUNNER_TEMP/andon.json")" | tee -a "$GITHUB_STEP_SUMMARY"
|
|
698
|
+
exit $status
|
|
699
|
+
```
|
|
700
|
+
|
|
701
|
+
### `.github/ISSUE_TEMPLATE/kaizen.yml`
|
|
702
|
+
|
|
703
|
+
The issue form for kaizen cards. It applies the `kaizen` label and fills the card's `yaml` block with a template.
|
|
704
|
+
|
|
705
|
+
```yaml
|
|
706
|
+
name: Kaizen card
|
|
707
|
+
description: Propose one improvement to how the work runs, with the measure the build checks once it ships.
|
|
708
|
+
title: "Kaizen: "
|
|
709
|
+
labels: [kaizen]
|
|
710
|
+
body:
|
|
711
|
+
- type: markdown
|
|
712
|
+
attributes:
|
|
713
|
+
value: |
|
|
714
|
+
A kaizen card names a signal from the rollups, the countermeasure meant to improve it, and the measure the store's build compares before and after the version that ships it. The build keeps one comment on the card with the numbers and adds `confirmed` or `not-confirmed` only when the 95% bootstrap interval for the change in median lies wholly on one side of zero. Jobs that share a session count as one independent group, and each side needs at least 6 groups before any interval exists.
|
|
715
|
+
|
|
716
|
+
Write the card generically: no person, private repository, work system, date or time of day.
|
|
717
|
+
- type: textarea
|
|
718
|
+
id: signal
|
|
719
|
+
attributes:
|
|
720
|
+
label: What the rollups show
|
|
721
|
+
description: The signal in plain words, for example "shell tool failures are most of every job's tool failures".
|
|
722
|
+
validations:
|
|
723
|
+
required: true
|
|
724
|
+
- type: textarea
|
|
725
|
+
id: card
|
|
726
|
+
attributes:
|
|
727
|
+
label: Card
|
|
728
|
+
description: The block the build checks. Set `version` to the first plugin version that carries the countermeasure once its release lands. Keep `job_class: any`: published facts do not carry a job class yet, so every job is `other` and the build compares all jobs together.
|
|
729
|
+
render: yaml
|
|
730
|
+
value: |
|
|
731
|
+
kaizen: 1
|
|
732
|
+
signal: tool_failures
|
|
733
|
+
job_class: any
|
|
734
|
+
evidence_jobs: []
|
|
735
|
+
countermeasure: null
|
|
736
|
+
plugin: desk
|
|
737
|
+
version: null
|
|
738
|
+
hypothesis: { measure: tool_failures, direction: down }
|
|
739
|
+
validations:
|
|
740
|
+
required: true
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
Why the workflows are shaped this way:
|
|
744
|
+
|
|
745
|
+
- **The candidate's workflow runs; its files are data.** `factory-validate` runs on `pull_request`, so GitHub uses the pull request's copy of the workflow files, with a read-only token and no secrets. A pull request that rewrites `validate.yml`, or adds any workflow with a job named `factory-validate`, can post a green check, and one that names a workflow `factory-validate` or `factory-merge` can start `factory-merge` or `factory-build`. That is why `factory-merge` runs from `main`, reads only `head_sha` from the event, validates again with Desk `main` in a step that holds no token, and rejects anything that fails there, and why `factory-build` reads no event data at all. Changes under `.github/` are outside the data paths, so a non-maintainer's are always rejected.
|
|
746
|
+
- **The merge, not a diff.** `validate-pr` judges the tree that merging the head into `main` produces (`git merge-tree`, Git 2.38 or later), refuses heads whose merge conflicts or that carry merge commits of their own, and fails closed on an older Git. A `main...head` diff reads only one merge base and can miss what a crafted merge changes.
|
|
747
|
+
- **Maintainers by permission.** Both workflows read the author's repository permission and pass `COLLABORATOR` to `validate-pr` for `admin` or `write`, and `NONE` otherwise. The lookup accepts ordinary GitHub logins and managed-user logins with one underscore followed by an alphanumeric enterprise suffix (for example `synthetic-user_example`), within 39 characters total. GitHub documents the underscore suffix for [managed accounts](https://docs.github.com/en/enterprise-cloud%40latest/admin/managing-iam/iam-configuration-reference/username-considerations-for-external-authentication). The whole value must match: empty values, whitespace, newlines, path separators and other punctuation are refused. Syntax alone grants no authority; an invalid login or any API error gives `NONE`, so the check fails closed. No token is widened: the permission API works with the default read-only workflow token.
|
|
748
|
+
- **Fork pull requests.** `workflow_run.pull_requests` is empty for a pull request from a fork, so `factory-merge` finds pull requests by the validated head commit.
|
|
749
|
+
- **No stale merges.** The merge call passes the validated head as `sha`, so GitHub refuses it if the head moved after validation.
|
|
750
|
+
- **Builds after automatic merges.** A merge made with the workflow token starts no `push` workflow, so `factory-build` also runs when `factory-merge` completes. `factory-validate` → `factory-merge` → `factory-build` is three `workflow_run` levels, GitHub's limit.
|
|
751
|
+
- **Kaizen cards are data.** Anyone can open an issue on a public store, and the issue form applies `kaizen` for them. The kaizen check reads only open issues labeled `kaizen`, parses each card with a strict YAML subset, comments only stable error codes and validated values, and edits only its own comment (a `github-actions[bot]` comment that starts with `<!-- desk-kaizen-check -->`). Runs the build starts itself with the workflow token start no new run, so its own comments and labels cannot loop.
|
|
752
|
+
- **Issue text never meets the code token.** The steps that read issue bodies and comments run in the `issue-checks` job, which holds only `contents: read` and `issues: write`; `factory-build`, which pushes the reports, has no issue access. A card that fails (for example, one with more comments than the check reads) is reported with a stable code, the other cards are still checked, and andon runs even when the kaizen check failed.
|
|
753
|
+
- **Andon reads only its own issues, for tracked plugins.** Andon lists issues labeled `andon` and changes only those `github-actions[bot]` opened with a title of the form `Andon: <plugin> <version> <measure> <job class>`, so a look-alike issue opened by anyone else is never updated, reopened or closed. It raises alarms only for the plugins in `factory.json`, so an intake pull request that invents plugins cannot make the build open issues about them; with one version pair per plugin, measure and job class, the number of open alarms stays bounded. Intake is still open, so forged facts for a tracked plugin can still move its measures: the alarm is a signal to review the named jobs, not proof.
|
|
754
|
+
- **Deterministic reports.** The build output is byte-stable and the reports commit has fixed metadata, so the same facts produce the same commit and an unchanged build pushes nothing. The `reports` branch is outside the ruleset, and each build replaces it.
|
|
755
|
+
|
|
756
|
+
### Merging by hand
|
|
757
|
+
|
|
758
|
+
Maintainers merge by hand only maintenance pull requests; a maintainer's retraction of a facts or labels file is not one. Follow these rules:
|
|
759
|
+
|
|
760
|
+
- **Your own maintenance pull requests.** Merge after `factory-validate` passes; you know what the pull request contains.
|
|
761
|
+
- **Anyone else's pull request.** Let `factory-merge` merge it, or run `validate-pr` yourself at its exact head before merging. A green `factory-validate` on someone else's pull request is not evidence on its own, because the pull request's own workflow files may have produced it. This matters most when `factory-merge` took no action (`validator_unavailable`) or the pull request carries `maintenance`.
|
|
762
|
+
|
|
763
|
+
To validate a pull request yourself, from a clone of the store and a clone of `ourostack/desk` `main`:
|
|
764
|
+
|
|
765
|
+
```sh
|
|
766
|
+
git fetch origin main "pull/<n>/head"
|
|
767
|
+
node <desk clone>/plugins/desk/mcp/scripts/factory.js validate-pr \
|
|
768
|
+
--base "$(git rev-parse origin/main)" --head <the pull request's head sha> --author-association NONE
|
|
769
|
+
```
|
|
770
|
+
|
|
771
|
+
Use `COLLABORATOR` instead of `NONE` only when the author has write access or more. Merge with `gh pr merge <n> --merge --match-head-commit <the same sha>`.
|
|
772
|
+
|
|
773
|
+
**Rejection comments.** `factory-merge` posts `factory-rejected: <code>` as `github-actions[bot]`. Anyone can post a comment that looks the same on a public pull request, so anything that reads these comments must accept them only from `github-actions[bot]`.
|
|
774
|
+
|
|
775
|
+
## 7. Point desks at the store
|
|
776
|
+
|
|
777
|
+
Desk picks the store for a desk in this order:
|
|
778
|
+
|
|
779
|
+
1. The desk's committed `_meta/factory.json`:
|
|
780
|
+
|
|
781
|
+
```json
|
|
782
|
+
{ "schema_version": 1, "store": "<owner>/<repository>" }
|
|
783
|
+
```
|
|
784
|
+
|
|
785
|
+
2. An overlay plugin installed beside Desk whose manifest (`plugin.json`, `.claude-plugin/plugin.json` or `.codex-plugin/plugin.json`) declares:
|
|
786
|
+
|
|
787
|
+
```json
|
|
788
|
+
{ "desk": { "factory": { "store": "<owner>/<repository>" } } }
|
|
789
|
+
```
|
|
790
|
+
|
|
791
|
+
3. Otherwise `ourostack/factory`.
|
|
792
|
+
|
|
793
|
+
A declaration that is present but malformed holds the desk's facts locally instead of falling through to a later source, so a desk meant for a private store never reports to a public one by mistake. So does a plugin manifest that exists but cannot be read or parsed, since it may be the overlay that declares the private store, and so does a Claude Code plugin registry (`installed_plugins.json`) that is missing or unreadable; `desk_doctor` reports it by code. A session held this way is routed again once the manifest reads: to the store it declares, or, when it declares nothing, to the route recorded beside it by a Desk before 2026-10-06, else it stays held. Each machine then opts in once, with the account `factory.js account` names (it asks GitHub which signed-in account can open pull requests on the store, and never assumes gh's active account):
|
|
794
|
+
|
|
795
|
+
```sh
|
|
796
|
+
node <desk plugin root>/mcp/scripts/factory.js account --store <owner>/<repository>
|
|
797
|
+
node <desk plugin root>/mcp/scripts/factory.js consent --store <owner>/<repository> --contribute yes --account <login>
|
|
798
|
+
```
|
|
799
|
+
|
|
800
|
+
## 8. Prove the store
|
|
801
|
+
|
|
802
|
+
Run the three proof pull requests in order and keep each receipt. The facts files come from Desk's synthetic store fixture, `tests/desk/mcp/__tests__/factory/fixtures/store/facts/`, in a clone of `ourostack/desk` `main`. Never use real facts for the proof.
|
|
803
|
+
|
|
804
|
+
```sh
|
|
805
|
+
FIXTURES=<desk clone>/tests/desk/mcp/__tests__/factory/fixtures/store/facts
|
|
806
|
+
```
|
|
807
|
+
|
|
808
|
+
### Proof 1: a valid intake merges itself
|
|
809
|
+
|
|
810
|
+
```sh
|
|
811
|
+
git switch main && git pull
|
|
812
|
+
git switch -c intake/proof-valid
|
|
813
|
+
mkdir -p facts
|
|
814
|
+
cp "$FIXTURES/claude-code-11111111-1111-4111-8111-111111111111.json" facts/
|
|
815
|
+
git add facts && git commit -m "Factory intake" && git push -u origin intake/proof-valid
|
|
816
|
+
gh pr create --repo "$STORE" --base main --head intake/proof-valid --title "Factory intake" --body "1 file."
|
|
817
|
+
```
|
|
818
|
+
|
|
819
|
+
Expected, within a few minutes:
|
|
820
|
+
|
|
821
|
+
- `factory-validate` passes with the summary `factory-validate: passed`.
|
|
822
|
+
- `factory-merge` merges the pull request with a merge commit; its summary reads `#<n> merged at head <sha>`.
|
|
823
|
+
- `factory-build` starts when `factory-merge` completes and publishes `reports`: `index.md`, `README.md`, and `jobs/<job>.md` and `jobs/<job>.json` for the fixture's job (`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa`).
|
|
824
|
+
- The head branch stays: GitHub does not delete a branch merged with the workflow token. Delete it with `git push origin --delete intake/proof-valid`. Desk reuses one intake branch per machine, so real intake branches are meant to stay.
|
|
825
|
+
|
|
826
|
+
Receipts:
|
|
827
|
+
|
|
828
|
+
```sh
|
|
829
|
+
gh pr view <n> --repo "$STORE" --json state,mergedAt,mergeCommit,headRefOid,statusCheckRollup
|
|
830
|
+
gh run list --repo "$STORE" --limit 10 --json databaseId,name,event,headSha,conclusion
|
|
831
|
+
gh api "repos/$STORE/git/trees/reports?recursive=1" --jq '[.tree[].path]'
|
|
832
|
+
gh api "repos/$STORE/commits/reports" --jq '{sha, parents: (.parents | length)}'
|
|
833
|
+
```
|
|
834
|
+
|
|
835
|
+
The reports commit must have no parents.
|
|
836
|
+
|
|
837
|
+
### Proof 2: an invalid intake is rejected
|
|
838
|
+
|
|
839
|
+
Put a date inside a field that must never hold one. A model ID is a good target, because its pattern would otherwise accept it:
|
|
840
|
+
|
|
841
|
+
```sh
|
|
842
|
+
git switch main && git pull
|
|
843
|
+
git switch -c intake/proof-invalid
|
|
844
|
+
mkdir -p facts
|
|
845
|
+
sed 's/"model-gamma"/"model-2026-09-27"/g' "$FIXTURES/copilot-cli-22222222-2222-4222-8222-222222222222.json" \
|
|
846
|
+
> facts/copilot-cli-22222222-2222-4222-8222-222222222222.json
|
|
847
|
+
git add facts && git commit -m "Factory intake" && git push -u origin intake/proof-invalid
|
|
848
|
+
gh pr create --repo "$STORE" --base main --head intake/proof-invalid --title "Factory intake" --body "1 file."
|
|
849
|
+
```
|
|
850
|
+
|
|
851
|
+
Expected: `factory-validate` fails with `factory-rejected: date` in its summary, and `factory-merge` comments `factory-rejected: date` (reason codes only, never the value) and closes the pull request unmerged. Keep `gh pr view <n> --repo "$STORE" --json state,mergedAt,comments` as the receipt. Delete the closed branch with `git push origin --delete intake/proof-invalid`, because only merged branches are deleted automatically.
|
|
852
|
+
|
|
853
|
+
### Proof 3: a maintainer removes the proof data
|
|
854
|
+
|
|
855
|
+
```sh
|
|
856
|
+
git switch main && git pull
|
|
857
|
+
git switch -c maintenance/remove-proof-facts
|
|
858
|
+
git rm -r facts && git commit -m "Remove the synthetic proof facts" && git push -u origin maintenance/remove-proof-facts
|
|
859
|
+
gh pr create --repo "$STORE" --base main --head maintenance/remove-proof-facts --label maintenance \
|
|
860
|
+
--title "Remove the synthetic proof facts" --body "Removes the proof data."
|
|
861
|
+
gh pr checks --repo "$STORE" --watch maintenance/remove-proof-facts
|
|
862
|
+
gh pr merge --repo "$STORE" maintenance/remove-proof-facts --merge
|
|
863
|
+
```
|
|
864
|
+
|
|
865
|
+
A maintainer's removal of facts is maintenance: `factory-validate` passes with `passed (maintenance)` and `factory-merge` leaves it for you. Open it with the `maintenance` label: any other author's removal fails with `removal`, and without the label `factory-merge` would then reject and close the pull request. After the merge, `factory-build` runs on the push and republishes `reports` with an `index.md` and no job files:
|
|
866
|
+
|
|
867
|
+
```sh
|
|
868
|
+
gh api "repos/$STORE/git/trees/reports?recursive=1" --jq '[.tree[].path]'
|
|
869
|
+
```
|
|
870
|
+
|
|
871
|
+
## Reading outcomes in the reports
|
|
872
|
+
|
|
873
|
+
Facts that carry `outcomes` (see [local capture](factory-local-capture.md), "Outcomes: delivery and sign-off") let the build report whether delivered work was accepted. Read the `state` of a figure (`measured`, `partial` or `unavailable`) and its `reasons` before any count: a figure that is not `measured` is not a complete count, and a count of zero never stands in for data that was not recorded.
|
|
874
|
+
|
|
875
|
+
Per job, `jobs/<job>.json` carries a `signoff` figure under `formulas`: its `value` is the outcome state, with `verified`, `reason` and `wait`. It is unavailable, with the reason `not_recorded` or `signoff_not_recorded`, for a job with no outcome record. `rollups/outcomes.json` has a `signoff` block: `jobs`, `accepted`, `delivered_unsigned`, `refused`, `reopened`, `not_recorded`, `not_delivered`, `no_record` and `jobs_without_work_record`, the `refusal_reasons`, and the `waits`, signed and unsigned apart. An acceptance is recorded by the agent on the operator's word, so `accepted` counts every job whose state is `accepted`. The block reads `signoff: { recorded: false }` when no session published outcomes. Show `no_record` beside the sign-off counts, so jobs with no outcome record are never read as unsigned or refused. The site shows these figures and never recomputes them.
|
|
876
|
+
|
|
877
|
+
Rework is reported the same way. Per job, `first_pass_yield` has `value` 0 or 1 and `returns: { counting, changed_ask }`; a yield of 1 can be `partial` (with the reason `awaiting_signoff`) until the job is accepted, so the yield is an upper bound, and `rework` has `value: { in_task, at_review, after_delivery }` (return counts) and `reason_check: { compared, disagree }`. `reason_check.disagree` is a lower bound because refusals classed `other` are not compared. In `rollups/outcomes.json`, `first_pass_yield` carries `state`, `value`, `reasons`, `n`, `N`, `passed`, `returned`, `awaiting_signoff`, `changed_ask_only` and the `excluded` jobs with the reason for each, and `rework` carries the returns by catch point and reason, `changed_ask`, a `reason_check` with its own `state`, and `defects`. A disagreement between the operator's reason and the agent's is counted, not punished, and a changed ask does not lower first-pass yield.
|
|
878
|
+
|
|
879
|
+
## Reading attention in the reports
|
|
880
|
+
|
|
881
|
+
Facts may carry `human_turns` (see [local capture](factory-local-capture.md), "Human attention"): at most 1,000 entries in time order, each `{ at_ms, basis, window_ms, prompt_class, output_class }`. `at_ms` is the offset on the session clock. `basis` is `first`, `after_stop` or `mid_turn`. `window_ms` is the gap in milliseconds, and `null` for `first`. The two classes are `none`, `xs`, `s`, `m`, `l` or `xl`. The entry holds no prompt text and no time of day. A session whose host cannot tell flags `unavailable[].field` `human_turns` with `host_does_not_record` and publishes no list; other flags are `host_records_partly`, `field_absent`, `source_unreadable`, `log_truncated` and `capped`. The store's limit for `unavailable` entries is now 231, because `human_turns` is a new field value, and the validator accepts the key only in schema `desk.factory.published/2`. Since `outcomes` became a field value too (a session whose outcome list was cut at 256 flags `outcomes` `capped`), the limit is 242 (22 fields × 11 reasons); the validator accepts that flag, and a commit's `at_ms`, only in schema `desk.factory.published/3`. Since `interval_outside_session_clock` became a reason value (an interval the publishing transform dropped because it ran outside the session clock), the limit is 264 (22 fields × 12 reasons).
|
|
882
|
+
|
|
883
|
+
Per job, `jobs/<job>.json` carries an `attention` figure under `formulas`: `value` in milliseconds, `turns` and `method`. It is unavailable with the reason `not_recorded`, `desk_public`, `no_segments`, `turn_not_estimable` or `mixed` (several reasons, listed in `reasons`). It is partial, with `reasons`, for `turns_not_recorded`, `turns_capped`, `turn_not_estimable` or a host's own flag. `rollups/outcomes.json` has an `attention` block: `method`, `headline`, `turns_per_accepted`, `human_turns`, `est_ms` (attributed, unattributed and unplaced), `sessions` (in the period and complete) and `permission`. The headline is `{ state, value?, reasons, n, N, numerator_ms?, accepted_outcomes }` (`value` is absent when unavailable, and `numerator_ms` when no session kept a list or no turn could be estimated), and `human_turns` is left out only when no session kept a list, and `est_ms` and `numerator_ms` are also left out when no turn could be estimated, and `n` and `N` both equal the accepted and verified outcomes, so the site is to read `thin sample` under 5.
|
|
884
|
+
|
|
885
|
+
Read `state` first. The figure is an estimate, made from size classes and the gaps the host shows, and it is labelled with its method version. A partial figure is a lower bound, and the headline prints it as one: the headline is partial when some session in the period flags the field (Codex sessions and every Copilot session do), is cut at 1,000 turns, or has a turn the estimator cannot read (`turn_not_estimable`), and its reasons say which. It is unavailable with no value and no total when no session in the period kept a list (`no_turn_records` when no session is in the period, `turns_not_recorded` with the host's own reason otherwise). It is also unavailable, with no total, when every turn is unreadable (`turn_not_estimable`). It is unavailable, with its total still published when a list exists and a turn could be estimated, when no verified acceptance exists (`no_accepted_outcomes`, shown as "no accepted outcomes yet", with the total as "at least" when partial). It is never zero, and sessions in the old `/1` format are outside the period. Show unattributed and unplaced attention beside the headline: they are in it. Permission decisions are reported beside it, not in it, and only where the host records them. The site is to show these figures and never recompute them.
|
|
886
|
+
|
|
887
|
+
## Facts schema /4: finish days, created PRs and stop facts
|
|
888
|
+
|
|
889
|
+
The intake validator accepts `desk.factory.published/4` beside `/1`, `/2` and `/3`, and every file already in a store stays valid. A `/4` file carries four keys that no older file may carry (`inconsistent` if one does), and it must carry each of them where it applies (`missing` if not):
|
|
890
|
+
|
|
891
|
+
- `jobs[].finished_on` is the UTC day the task finished, written exactly as `YYYY-MM-DD`, or `null`. It is the only key in published facts that may hold a date; every other string still refuses one (`date`). It must be a real calendar day (else `pattern`) no earlier than 2025-01-01 (else `range`), and the intake check also refuses a day after the UTC day it runs (`future`).
|
|
892
|
+
- `jobs[].finished_basis` says where the day came from: `transition` (the session's own last move of the card into its final status) or `card_updated` (the card's `updated` time, which is an upper bound because a card can be edited after it is done). It is `null` exactly when `finished_on` is. A day sits only on a job whose card was seen `done` or `cancelled`, and its basis must match a timed transition or a timed observation in the same file; anything else is `inconsistent`. A file marked `{job_offsets, desk_public}` carries no finish day.
|
|
893
|
+
- `refs.prs[].created` is `true` when the session's own call created the pull request and `false` when the session only mentioned it. There is no "not known" value. A file marked `{job_offsets, desk_public}` never says `true` (`inconsistent`), because GitHub's public creation time of that pull request would date the session.
|
|
894
|
+
- `intervals[].stop`, on `human_wait` intervals only (any other interval kind carrying it is `unknown_key`), records how the agent's turn ended before the wait: `end` is one of `end_turn`, `max_tokens`, `rate_limit`, `api_error`, `refusal`, `interrupted`, `ask_question`, `ask_plan` or `not_recorded`, and `asks` (the final reply ended in a question mark) and `pending_agents` (the agent's own background agents were still running) are `true`, `false` or `null`. It holds no text and no tool name.
|
|
895
|
+
|
|
896
|
+
Desk's publishing transform writes `/4` for every file, so the first flush after the change sends every session in a machine's outbox once more, as a modification of the stored file. A session derived before the derivers recorded these facts publishes each wait's `stop` as `not_recorded` with both flags `null` and each PR as `created: false`; its finish day needs only the card times the local file already holds. A session that is re-derived after that flush is sent a second time, with its stop facts and created PRs filled in. The sweep before each flush re-derives every session that still has its capture marker, but it re-derives at most 25 sessions whose marker was pruned per sweep, within 60 seconds, so a machine with many such sessions sends some of them twice. Both sends are accepted as modifications of the stored file, and nothing is lost; the older values stand in the store until the second send merges. Desk does not hold a file back until its session re-derives, because a session whose re-derive keeps failing would then never publish. How each host fills the keys is in [local capture](factory-local-capture.md), "Why the agent stopped, created pull requests and finish days".
|
|
897
|
+
|
|
898
|
+
## 9. Read-back checklist
|
|
899
|
+
|
|
900
|
+
A request that was accepted is not proof. Read each setting back from GitHub and keep the output:
|
|
901
|
+
|
|
902
|
+
- `gh api "repos/$STORE"`: visibility, default branch `main`, merge commits only.
|
|
903
|
+
- `gh api "repos/$STORE/rulesets/<id>"`: the four rules, the check from integration `15368`, the admin bypass in `pull_request` mode, `enforcement: active`.
|
|
904
|
+
- `gh api "repos/$STORE/actions/permissions"` and its `/selected-actions`, `/workflow` and `/fork-pr-contributor-approval` (and `/fork-pr-workflows-private-repos` for a private store).
|
|
905
|
+
- `gh api "repos/$STORE/labels?per_page=100"`.
|
|
906
|
+
- The three proof pull requests, their check runs, the workflow runs and the final `reports` tree.
|
|
907
|
+
|
|
908
|
+
## Troubleshooting
|
|
909
|
+
|
|
910
|
+
| Symptom | Cause | Fix |
|
|
911
|
+
| --- | --- | --- |
|
|
912
|
+
| `factory-validate: validator_unavailable` | Desk `main` has no `factory.js` with `validate-pr`, or the clone failed. | Wait for Desk to ship it or re-run the check. `factory-merge` takes no action on this result. |
|
|
913
|
+
| A maintainer's change fails with `factory-rejected: path` or `removal` | The author's permission on the store is below `write`, or the permission lookup failed (the summary then also says `maintainer_check_unavailable`). | Grant write access or more and re-run the check. A failed lookup always counts as "not a maintainer". |
|
|
914
|
+
| An intake passed but nothing merged | The pull request carries `maintenance`, its head moved after validation, or the pull request is from a first-time contributor waiting for approval. | Read the `factory-merge` run summary; approve the run under the pull request's Checks tab if GitHub asks. |
|
|
915
|
+
| `reports` did not update after an automatic merge | `factory-build` did not run after `factory-merge`. | Check the Actions tab for the `workflow_run` build; run `gh workflow run build.yml --repo "$STORE"` to rebuild. |
|
|
916
|
+
| An intake is blocked waiting for review | The ruleset's `require_extra_approval_for_unattributed_changes` is on. | Set it to `false` as in step 5. |
|
|
917
|
+
|
|
918
|
+
## 10. Optional: accept capture records
|
|
919
|
+
|
|
920
|
+
A store can also take one content-free count record per machine, `capture/<intake id>.json`, which says how many of each host's sessions on disk were captured. It is separate from facts and labels, and nothing in sections 1 to 9 needs it. The record is described in [Local capture](factory-local-capture.md#capture-coverage); this section is what the store does about it.
|
|
921
|
+
|
|
922
|
+
- **The flag.** A store says it accepts records with a file `capture.json` at the root of its default branch whose content is exactly the JSON object `{"capture":1}` and nothing else (an extra key, another value, bad JSON or no file means not ready). It is a maintenance path, so a maintainer adds it. Desk reads it before sending a record; without it Desk records `store_not_ready`, sends nothing and asks again after a day. Add the file only after the store's validator and merge workflow handle `capture/`, so a record is never sent into a store that refuses it. `factory.json` is deliberately untouched, and a `capture` key in it enables nothing, so an older client's andon parser, which refuses any key but `andon`, keeps working. Newer andon readers tolerate a positive-integer `capture` beside `andon`, only as tolerance.
|
|
923
|
+
- **The path.** `capture/<16 hex>.json`, one file per machine, named by the machine's intake id. It is a data path like `facts/` and `labels/`: Desk's validator checks each added or changed file on its own bytes (closed key set, at most 2 KiB, counts that add up), and `factory-merge` merges it like any intake. A pull request may carry one. The store's own check script can only be a belt; Desk's validator is the authority.
|
|
924
|
+
- **Retraction by empty record.** A machine retracts by replacing its file with the empty record, `{"schema":"desk.factory.capture/1","basis":"still_on_disk","hosts":{}}`. Any contributor may do that, and a maintainer may also delete the file. Anyone else's deletion is refused (`removal`).
|
|
925
|
+
- **Self-reported.** The store cannot check a record. Anyone who can open an intake pull request can overwrite a capture file, so a record is a signal and not proof. The site shows the caveats `still_on_disk` (the share is of sessions still on disk and an upper bound) and `self_reported` with every figure.
|
|
926
|
+
- **Freshness on the site.** The build sums the records it can read and never publishes a date. A record whose last commit is more than 45 days old is stale: it is left out of the sums and counted under `machines.stale`. An empty record is counted under `machines.empty` and adds nothing. An invalid file is counted but never summed. With no counted record the state is `unavailable`, never zero. A machine that keeps running replaces its record at most every 20 hours, and Desk stops sending when its own coverage is more than three days old, so a machine that goes quiet ages out after 45 days.
|
|
927
|
+
- **A refusal never costs facts.** If the store refuses a pull request and names the record (a `capture_` code, or `path` for the pull request that carried it), Desk sends its facts again without the record and never quarantines them for it, and does not offer the record again for a week.
|