@ouro.bot/cli 0.1.0-alpha.145 → 0.1.0-alpha.1450
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 +194 -30
- 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 +8497 -41
- 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 +207 -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 +73 -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/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/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 +1030 -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/budget.js +135 -0
- package/dist/eval/domain/case.js +115 -0
- package/dist/eval/domain/stats.js +19 -0
- package/dist/eval/guest-entry.js +16 -0
- package/dist/eval/interview-entry.js +106 -0
- package/dist/eval/interview-grade-entry.js +35 -0
- package/dist/eval/interview-guest-entry.js +17 -0
- package/dist/eval/interviews/allocation.js +64 -0
- package/dist/eval/interviews/final.js +133 -0
- package/dist/eval/interviews/grader.js +179 -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/loop.js +78 -0
- package/dist/eval/interviews/guest/operations.js +108 -0
- package/dist/eval/interviews/guest/run.js +62 -0
- package/dist/eval/interviews/latch.js +122 -0
- package/dist/eval/interviews/protocol.js +77 -0
- package/dist/eval/interviews/runner.js +292 -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 +161 -0
- package/dist/eval/run-entry.js +89 -0
- package/dist/eval/sandbox/declared-gaps.js +17 -0
- package/dist/eval/sandbox/docker.js +338 -0
- package/dist/eval/sandbox/guest.js +41 -0
- package/dist/eval/sandbox/host-lock.js +62 -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/self-test.js +84 -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 +204 -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 +172 -0
- package/dist/heart/attachments/types.js +93 -0
- package/dist/heart/attachments/understand.js +195 -0
- package/dist/heart/auth/auth-flow.js +590 -0
- package/dist/heart/auth/github-device-login.js +104 -0
- package/dist/heart/autonomy-budget.js +478 -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 +38 -0
- package/dist/heart/commitments.js +44 -14
- package/dist/heart/config-registry.js +340 -0
- package/dist/heart/config.js +195 -140
- package/dist/heart/context-loss-gauntlet.js +387 -0
- package/dist/heart/context-loss-sentinel.js +1200 -0
- package/dist/heart/core.js +2751 -693
- 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/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 +180 -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 +34 -0
- package/dist/heart/daemon/cli-commands/dns.js +13 -0
- package/dist/heart/daemon/cli-commands/entry-points.js +172 -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 +12 -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 +329 -0
- package/dist/heart/daemon/cli-exec.js +9697 -0
- package/dist/heart/daemon/cli-gate.js +198 -0
- package/dist/heart/daemon/cli-help.js +809 -0
- package/dist/heart/daemon/cli-manifest.js +112 -0
- package/dist/heart/daemon/cli-parse.js +3600 -0
- package/dist/heart/daemon/cli-render-doctor.js +57 -0
- package/dist/heart/daemon/cli-render.js +823 -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 -3001
- package/dist/heart/daemon/daemon-entry.js +1109 -32
- package/dist/heart/daemon/daemon-health.js +186 -0
- 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 +236 -0
- package/dist/heart/daemon/daemon.js +2050 -128
- 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 +209 -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/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 +139 -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 +259 -0
- package/dist/heart/daemon/presence.js +462 -0
- package/dist/heart/daemon/process-manager.js +841 -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/safe-mode.js +161 -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/supercronic-supervisor.js +282 -0
- package/dist/heart/daemon/task-scheduler.js +117 -39
- 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/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/habits/habit-cancel.js +810 -0
- package/dist/heart/habits/habit-lifecycle.js +1324 -0
- package/dist/heart/habits/habit-migration.js +194 -0
- package/dist/heart/habits/habit-parser.js +278 -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 +643 -0
- package/dist/heart/{daemon → hatch}/hatch-flow.js +68 -62
- 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 +363 -60
- package/dist/heart/kept-notes.js +289 -0
- package/dist/heart/machine-identity.js +175 -0
- package/dist/heart/mail-import-discovery.js +356 -0
- package/dist/heart/mailbox/mailbox-http-hooks.js +99 -0
- package/dist/heart/mailbox/mailbox-http-response.js +7 -0
- package/dist/heart/mailbox/mailbox-http-routes.js +406 -0
- package/dist/heart/mailbox/mailbox-http-static.js +103 -0
- package/dist/heart/mailbox/mailbox-http-transport.js +272 -0
- package/dist/heart/mailbox/mailbox-http.js +99 -0
- package/dist/heart/mailbox/mailbox-read.js +41 -0
- package/dist/heart/mailbox/mailbox-supervision.js +131 -0
- package/dist/heart/mailbox/mailbox-types.js +27 -0
- package/dist/heart/mailbox/mailbox-view.js +197 -0
- package/dist/heart/mailbox/readers/agent-machine.js +428 -0
- package/dist/heart/mailbox/readers/continuity-readers.js +329 -0
- package/dist/heart/mailbox/readers/mail.js +375 -0
- package/dist/heart/mailbox/readers/runtime-readers.js +823 -0
- package/dist/heart/mailbox/readers/sessions.js +231 -0
- package/dist/heart/mailbox/readers/shared.js +111 -0
- package/dist/heart/mcp/mcp-server.js +872 -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 +295 -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/session-activity.js +89 -23
- package/dist/heart/session-events.js +1602 -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 +124 -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.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 +620 -192
- 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 +1580 -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 +59 -0
- package/dist/heart/tool-approval.js +382 -0
- package/dist/heart/tool-description.js +155 -0
- 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/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 +424 -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 +150 -0
- package/dist/heart/versioning/version-intent.js +114 -0
- package/dist/heart/work-card.js +380 -0
- package/dist/mailbox-ui/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/mailbox-ui/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/mailbox-ui/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/mailbox-ui/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/mailbox-ui/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/mailbox-ui/assets/index-LsKHQe6c.js +1 -0
- package/dist/mailbox-ui/assets/index-UZ85Lvxp.css +1 -0
- package/dist/mailbox-ui/assets/vendor-BfcLUM_P.js +65 -0
- package/dist/mailbox-ui/index.html +18 -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 +974 -0
- package/dist/mailroom/body-cache.js +61 -0
- package/dist/mailroom/cache-sync-cli.js +58 -0
- package/dist/mailroom/core.js +805 -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 +291 -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 +342 -0
- package/dist/mind/diary-integrity.js +60 -0
- package/dist/mind/diary.js +31 -53
- 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 +976 -358
- 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 +147 -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 +164 -5
- package/dist/nerves/coverage/run-artifacts.js +55 -35
- package/dist/nerves/coverage/source-scanner.js +4 -4
- package/dist/nerves/event-buffer.js +111 -0
- package/dist/nerves/index.js +293 -9
- package/dist/nerves/observation.js +20 -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 +12 -0
- 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 +26 -5
- package/dist/repertoire/coding/index.js +15 -3
- package/dist/repertoire/coding/manager.js +19 -11
- package/dist/repertoire/coding/spawner.js +3 -2
- package/dist/repertoire/coding/tools.js +151 -27
- package/dist/repertoire/coding/workbench-client.js +272 -0
- package/dist/repertoire/coding/workbench-manager.js +346 -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/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 -70
- package/dist/repertoire/house-sweep.js +471 -0
- package/dist/repertoire/in-turn-tools-door.js +54 -0
- package/dist/repertoire/mcp-client.js +58 -5
- package/dist/repertoire/mcp-declared-tools.js +156 -0
- package/dist/repertoire/mcp-manager.js +435 -141
- package/dist/repertoire/mcp-tools.js +195 -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 -1420
- 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 +567 -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 +1190 -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 +553 -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 +604 -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 +110 -0
- package/dist/rsvp/habit-stage.js +123 -0
- package/dist/rsvp/incident-bundle.js +97 -0
- package/dist/rsvp/migration.js +204 -0
- package/dist/rsvp/native-habit-runner.js +630 -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 +187 -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 +252 -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 +4641 -0
- package/dist/senses/bluebubbles/latest-turn.js +342 -0
- package/dist/senses/bluebubbles/media.js +256 -0
- package/dist/senses/{bluebubbles-model.js → bluebubbles/model.js} +147 -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 +627 -350
- package/dist/senses/commands.js +66 -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 +160 -0
- 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 +1216 -289
- package/dist/senses/private-runtime-worker.js +857 -0
- package/dist/senses/private-runtime.js +1692 -0
- package/dist/senses/proactive-content-guard.js +51 -0
- package/dist/senses/program-status.js +155 -0
- package/dist/senses/repeat-while.js +36 -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 +242 -0
- package/dist/senses/teams.js +1356 -331
- 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 +95 -13
- 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/dist/heart/daemon/auth-flow.js +0 -457
- package/dist/heart/daemon/heartbeat-timer.js +0 -132
- package/dist/heart/daemon/mcp-server.js +0 -591
- package/dist/heart/daemon/ouro-path-installer.js +0 -220
- 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 -134
- package/dist/repertoire/tasks/index.js +0 -224
- package/dist/repertoire/tasks/lifecycle.js +0 -80
- package/dist/repertoire/tasks/middleware.js +0 -65
- package/dist/repertoire/tasks/parser.js +0 -173
- package/dist/repertoire/tasks/scanner.js +0 -132
- package/dist/repertoire/tasks/transitions.js +0 -144
- 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 -1247
- package/dist/senses/contextual-heartbeat.js +0 -102
- package/dist/senses/debug-activity.js +0 -154
- package/dist/senses/inner-dialog-worker.js +0 -90
- package/dist/senses/inner-dialog.js +0 -662
- 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,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
/**
|
|
7
|
+
* `npm run eval -- <flags>` (see `run-command.ts` for the flags and the refusals): runs eval cases on one model target
|
|
8
|
+
* and writes the private report. With `--sandbox-ssh <host>:<folder>` the sandbox runs on that Docker host, whose
|
|
9
|
+
* harness checkout is synced to `<folder>/harness`; `--bundle`, `--seed-bundle` and `--oracle-books` are then paths
|
|
10
|
+
* on that host. `--sandbox-images <agent>,<household>` names the image tags to run (on that host, when remote), built
|
|
11
|
+
* beforehand with `docker build --file deploy/eval/Dockerfile --target agent|household --tag <tag> .`; the remote
|
|
12
|
+
* checkout must be synced and built from this version for the books oracle to use them too. `--host-lock <holder>`
|
|
13
|
+
* holds that host's lock (deploy/unraid/ouro-host-lock.mjs) for the whole command, so the Butler's upgrade and
|
|
14
|
+
* rollback wait for it, and the sandbox runs on the Butler's host only while it does. Model calls and credentials
|
|
15
|
+
* stay on this machine.
|
|
16
|
+
*/
|
|
17
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
18
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
19
|
+
const runtime_1 = require("../nerves/runtime");
|
|
20
|
+
const run_command_1 = require("./run-command");
|
|
21
|
+
const report_1 = require("./report");
|
|
22
|
+
const docker_1 = require("./sandbox/docker");
|
|
23
|
+
const oracle_1 = require("./sandbox/oracle");
|
|
24
|
+
const host_lock_1 = require("./sandbox/host-lock");
|
|
25
|
+
const remote_1 = require("./sandbox/remote");
|
|
26
|
+
const targets_1 = require("./targets");
|
|
27
|
+
const REPO = node_path_1.default.resolve(__dirname, "../..");
|
|
28
|
+
function sshTarget(spec) {
|
|
29
|
+
const split = spec.indexOf(":");
|
|
30
|
+
if (split < 1)
|
|
31
|
+
throw new Error("--sandbox-ssh must be <host>:<folder>");
|
|
32
|
+
return { host: spec.slice(0, split), root: spec.slice(split + 1) };
|
|
33
|
+
}
|
|
34
|
+
function runCaseFor(args, hostLockToken) {
|
|
35
|
+
if (args.sandboxSsh) {
|
|
36
|
+
const { host, root } = sshTarget(args.sandboxSsh);
|
|
37
|
+
return (0, remote_1.remoteRunCase)({
|
|
38
|
+
start: (0, remote_1.sshStart)(host, `${root}/harness/dist/eval/remote-entry.js`),
|
|
39
|
+
paths: {
|
|
40
|
+
bundleDir: args.bundle, seedBundleDir: args.seedBundle ?? `${root}/harness/deploy/unraid/sanctuary.ouro`, workRoot: `${root}/work`,
|
|
41
|
+
...(args.oracleBooks ? { oracleBooks: args.oracleBooks } : {}),
|
|
42
|
+
...(args.sandboxImages ? { images: args.sandboxImages } : {}),
|
|
43
|
+
...(hostLockToken ? { hostLockToken } : {}),
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const docker = (0, docker_1.dockerCli)();
|
|
48
|
+
const oracle = args.oracleBooks ? (0, oracle_1.dockerOracle)({ docker, image: args.sandboxImages?.household ?? docker_1.HOUSEHOLD_IMAGE, booksLib: args.oracleBooks }) : undefined;
|
|
49
|
+
return ({ case: c, host, budget }) => (0, docker_1.runSandboxed)({
|
|
50
|
+
case: c, bundleDir: args.bundle, seedBundleDir: args.seedBundle ?? node_path_1.default.join(REPO, "deploy/unraid/sanctuary.ouro"), host, budget, docker,
|
|
51
|
+
...(oracle ? { oracle } : {}),
|
|
52
|
+
...(args.sandboxImages ? { images: args.sandboxImages } : {}),
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
async function main() {
|
|
56
|
+
const args = (0, run_command_1.parseEvalArgs)(process.argv.slice(2));
|
|
57
|
+
let lock;
|
|
58
|
+
if (args.hostLock && args.sandboxSsh) {
|
|
59
|
+
const { host, root } = sshTarget(args.sandboxSsh);
|
|
60
|
+
lock = await (0, host_lock_1.holdHostLock)((0, remote_1.sshNode)(host, [`${root}/harness/deploy/unraid/ouro-host-lock.mjs`, "hold", "--holder", args.hostLock, "--ttl", String(host_lock_1.HOST_LOCK_TTL_S), "--wait", String(host_lock_1.HOST_LOCK_WAIT_S)]));
|
|
61
|
+
}
|
|
62
|
+
try {
|
|
63
|
+
const { exitCode } = await (0, run_command_1.runEvalCommand)(args, {
|
|
64
|
+
resolveTarget: (spec, creds) => (0, targets_1.resolveTarget)(spec, creds),
|
|
65
|
+
runCase: (parsed) => runCaseFor(parsed, lock?.token),
|
|
66
|
+
outputExists: (file) => node_fs_1.default.existsSync(file),
|
|
67
|
+
writeReport: report_1.writePrivateReport,
|
|
68
|
+
print: (text) => { process.stdout.write(`${text}\n`); },
|
|
69
|
+
});
|
|
70
|
+
return exitCode;
|
|
71
|
+
}
|
|
72
|
+
finally {
|
|
73
|
+
await lock?.release();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
// stderr's last line names the failure its Ouro AX card lists (cli-commands/entry-points.ts): 2 a run the budget or
|
|
77
|
+
// the provider stopped, 1 a refusal or a failure. process.exitCode, not process.exit, which can drop the line on a pipe.
|
|
78
|
+
const STOPPED = "budget-stopped";
|
|
79
|
+
const FAILED = "eval-error";
|
|
80
|
+
main().then((code) => {
|
|
81
|
+
if (code === 2)
|
|
82
|
+
process.stderr.write(`code: ${STOPPED}\n`);
|
|
83
|
+
process.exitCode = code;
|
|
84
|
+
}).catch((error) => {
|
|
85
|
+
(0, runtime_1.emitNervesEvent)({ component: "eval", level: "error", event: "eval.run_entry_error", message: "the eval command failed", meta: { error: error instanceof Error ? error.message : String(error) } });
|
|
86
|
+
process.stderr.write(`eval: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
87
|
+
process.stderr.write(`code: ${FAILED}\n`);
|
|
88
|
+
process.exitCode = 1;
|
|
89
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DECLARED_GAPS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* What the sandbox fakes or leaves out of a real Butler turn, beside what the bundle projection leaves out. Every
|
|
6
|
+
* sandboxed run returns these with its projection gaps, so each report lists them.
|
|
7
|
+
*/
|
|
8
|
+
exports.DECLARED_GAPS = [
|
|
9
|
+
"synthetic Sanctuary: the Unraid, service, install state, download-queue, media optimisation and media-catalog reads return fixed data; a container restart and a download-queue resume are not simulated",
|
|
10
|
+
"no MCP server starts, so the media MCP tools (media_*) are not in the turn's tool list",
|
|
11
|
+
"the agent container is on an internal network with no route off the host, so web_search and fetch_url fail",
|
|
12
|
+
"house/house.json is not projected: the turn runs with the generic house config (no owner name, no public endpoints, no books container)",
|
|
13
|
+
"no root host binding, so sanctuary_host_execute is not offered",
|
|
14
|
+
"the owner's message goes straight to the Telegram sense's message handler, skipping the long poll's update parsing, its user and chat filter and the inbox",
|
|
15
|
+
"the owner's prompt does not list skills/: a skill file reaches the model only when the agent reads it with a tool",
|
|
16
|
+
"replies are read back as text: Telegram's HTML is decoded, a message's buttons are not part of the answer, and a send_file shows only as the tool call",
|
|
17
|
+
];
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.WRITABLE = exports.POCKETBOOK_ADDRESS = exports.LIBGEN_MIRRORS = exports.BUTLER_CONTAINERS = exports.EVAL_LABEL = exports.EVAL_RUN_PREFIX = exports.HOUSEHOLD_IMAGE = exports.SANDBOX_IMAGE = void 0;
|
|
7
|
+
exports.dockerCli = dockerCli;
|
|
8
|
+
exports.buildSandboxImage = buildSandboxImage;
|
|
9
|
+
exports.splitTurns = splitTurns;
|
|
10
|
+
exports.runSandboxed = runSandboxed;
|
|
11
|
+
/**
|
|
12
|
+
* Runs one case in the two-container sandbox and reads back what happened.
|
|
13
|
+
*
|
|
14
|
+
* Each run makes a fresh `docker network create --internal` network (no route off the host) and two containers on
|
|
15
|
+
* it, both `--rm --log-driver none --read-only --cap-drop ALL` with capped memory, CPU, processes and file size, each
|
|
16
|
+
* from its own image (deploy/eval/Dockerfile) so the agent's holds none of the eval's grading code:
|
|
17
|
+
* - the household sidecar (`household.py`, uid 10002), answering as `calibre-web`, `smtp` and the libgen mirror
|
|
18
|
+
* names over TLS signed by a test authority made for the run, whose key is deleted once it has signed. Its state
|
|
19
|
+
* folder is a host folder the agent container never mounts, and its admin port listens on its own loopback only.
|
|
20
|
+
* - the agent container (uid 10001, `HOME=/home/ouro`, `--agent sanctuary`), running the real Telegram turn
|
|
21
|
+
* (`guest-entry.js`) on the projected bundle at the production path. The bundle is mounted read-only except the
|
|
22
|
+
* places the turn and the books CLI write: `books/work`, `books/removed`, `books/ledger.ndjson`, `state`,
|
|
23
|
+
* `friends` and `arc`. The test authority replaces the system trust store, and `books/credentials.json` is
|
|
24
|
+
* synthetic. Its provider is the host's runtime, served over the container's stdin and stdout, so no credential
|
|
25
|
+
* enters the container. Its `node` is execute-only, which leaves the guest undumpable: the shell the model runs
|
|
26
|
+
* cannot reach the guest's stdio, memory or trace, so it cannot speak on that channel.
|
|
27
|
+
*
|
|
28
|
+
* When the guest reports its turn done (or the deadline passes, or it exits), the host removes the agent container,
|
|
29
|
+
* which ends every process the turn started, then the household, and only then reads the household's state file and
|
|
30
|
+
* hashes the files that appeared in the writable mounts. A run whose files cannot be read back within the limits ends
|
|
31
|
+
* as a sandbox error, which fails it. The containers, the network and the run's folder are removed afterwards,
|
|
32
|
+
* whatever happened. Every name the run creates starts with `eval-sandbox-`, outside the `ouro-` names the Butler's
|
|
33
|
+
* tooling owns, and every container and network it creates carries the labels `ouro.eval=1` and `ouro.eval.run=<run>`.
|
|
34
|
+
*
|
|
35
|
+
* It refuses to run on a host that has any of the live Butler's containers unless the caller holds a host lock
|
|
36
|
+
* that the Butler's lifecycle honours: on 2026-11-23 an eval container vanishing mid-upgrade broke the Butler's
|
|
37
|
+
* upgrade and its rollback on the host they shared (#1760).
|
|
38
|
+
*/
|
|
39
|
+
const node_child_process_1 = require("node:child_process");
|
|
40
|
+
const node_crypto_1 = __importDefault(require("node:crypto"));
|
|
41
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
42
|
+
const node_os_1 = __importDefault(require("node:os"));
|
|
43
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
44
|
+
const runtime_1 = require("../../nerves/runtime");
|
|
45
|
+
const provider_proxy_1 = require("../transport/provider-proxy");
|
|
46
|
+
const telegram_turn_1 = require("../transport/telegram-turn");
|
|
47
|
+
const declared_gaps_1 = require("./declared-gaps");
|
|
48
|
+
const projection_1 = require("./projection");
|
|
49
|
+
const readback_1 = require("./readback");
|
|
50
|
+
exports.SANDBOX_IMAGE = "ouro-eval-sandbox:local";
|
|
51
|
+
exports.HOUSEHOLD_IMAGE = "ouro-eval-household:local";
|
|
52
|
+
/** What every container, network and folder a sandboxed run creates is named after. */
|
|
53
|
+
exports.EVAL_RUN_PREFIX = "eval-sandbox-";
|
|
54
|
+
/** The label on everything an eval run creates, so other tooling on the host can tell it is not its own. */
|
|
55
|
+
exports.EVAL_LABEL = "ouro.eval=1";
|
|
56
|
+
/** The live Butler's containers (sanctuary-deployment-target.mjs CANONICAL_NAMES); a host that has any of them is the Butler's. */
|
|
57
|
+
exports.BUTLER_CONTAINERS = "^/?ouro-butler(-staging|-rollback)?$";
|
|
58
|
+
exports.LIBGEN_MIRRORS = ["libgen.li", "libgen.bz", "libgen.gl", "libgen.la", "libgen.vg"];
|
|
59
|
+
exports.POCKETBOOK_ADDRESS = "pocketbook@example.invalid";
|
|
60
|
+
const ALIASES = ["calibre-web", "smtp", ...exports.LIBGEN_MIRRORS];
|
|
61
|
+
const BUNDLE = "/home/ouro/AgentBundles/sanctuary.ouro";
|
|
62
|
+
/** What the turn and the books CLI write; everything else in the bundle is read-only. */
|
|
63
|
+
exports.WRITABLE = ["books/work", "books/removed", "books/ledger.ndjson", "state", "friends", "arc", "desk/_record"];
|
|
64
|
+
const HARDENING = [
|
|
65
|
+
"--log-driver", "none", "--read-only", "--cap-drop", "ALL", "--security-opt", "no-new-privileges", "--pids-limit", "512",
|
|
66
|
+
"--memory", "2g", "--memory-swap", "2g", "--cpus", "2", "--ulimit", `fsize=${readback_1.SNAPSHOT_LIMITS.bytes}`,
|
|
67
|
+
];
|
|
68
|
+
const STDERR_TAIL = 4000;
|
|
69
|
+
function dockerCli(command = "docker") {
|
|
70
|
+
return {
|
|
71
|
+
run: (args) => new Promise((resolve, reject) => {
|
|
72
|
+
const child = (0, node_child_process_1.spawn)(command, args, { stdio: ["ignore", "pipe", "pipe"] });
|
|
73
|
+
let out = "";
|
|
74
|
+
let err = "";
|
|
75
|
+
child.stdout.setEncoding("utf8").on("data", (chunk) => { out += chunk; });
|
|
76
|
+
child.stderr.setEncoding("utf8").on("data", (chunk) => { err = (err + chunk).slice(-STDERR_TAIL); });
|
|
77
|
+
child.on("error", reject);
|
|
78
|
+
child.on("close", (code) => code === 0 ? resolve(out) : reject(new Error(`docker ${args[0]} exited ${code}: ${err.trim()}`)));
|
|
79
|
+
}),
|
|
80
|
+
start: (args) => {
|
|
81
|
+
const child = (0, node_child_process_1.spawn)(command, args, { stdio: ["pipe", "pipe", "pipe"] });
|
|
82
|
+
let err = "";
|
|
83
|
+
child.stderr.setEncoding("utf8").on("data", (chunk) => { err = (err + chunk).slice(-STDERR_TAIL); });
|
|
84
|
+
const exited = new Promise((resolve) => {
|
|
85
|
+
child.on("error", () => resolve(-1));
|
|
86
|
+
child.on("close", (code) => resolve(code ?? -1));
|
|
87
|
+
});
|
|
88
|
+
return { stdin: child.stdin, stdout: child.stdout, exited, stderr: () => err };
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
/** Builds both eval images from a built checkout (`npm run build` first): the agent's (the harness `dist/` and its runtime dependencies) and the household's (the fakes). */
|
|
93
|
+
async function buildSandboxImage(input) {
|
|
94
|
+
const images = input.images ?? { agent: exports.SANDBOX_IMAGE, household: exports.HOUSEHOLD_IMAGE };
|
|
95
|
+
(0, runtime_1.emitNervesEvent)({ component: "eval", event: "eval.sandbox_image_start", message: "building the eval sandbox images", meta: images });
|
|
96
|
+
for (const target of ["agent", "household"]) {
|
|
97
|
+
await input.docker.run(["build", "--file", node_path_1.default.join(input.repoRoot, "deploy/eval/Dockerfile"), "--target", target, "--tag", images[target], input.repoRoot]);
|
|
98
|
+
}
|
|
99
|
+
(0, runtime_1.emitNervesEvent)({ component: "eval", event: "eval.sandbox_image_end", message: "built the eval sandbox images", meta: images });
|
|
100
|
+
}
|
|
101
|
+
/** Synthetic settings for the books CLI, pointing at the fake household and nothing else. */
|
|
102
|
+
function booksSettings() {
|
|
103
|
+
return {
|
|
104
|
+
calibre_web: { url: "http://calibre-web:8083", username: "butler", password: "eval-password" },
|
|
105
|
+
smtp: { host: "smtp", port: 2525, user: "eval", password: "eval-password" },
|
|
106
|
+
pocketbook: { from: "butler@example.invalid", to: exports.POCKETBOOK_ADDRESS },
|
|
107
|
+
libgen: { mirrors: exports.LIBGEN_MIRRORS.map((host) => `https://${host}`) },
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/** A test authority and a server certificate for every alias; the authority's key is deleted once it has signed. */
|
|
111
|
+
function tlsScript() {
|
|
112
|
+
const names = ALIASES.map((name) => `DNS:${name}`).join(",");
|
|
113
|
+
return [
|
|
114
|
+
"set -eu",
|
|
115
|
+
"cd /out",
|
|
116
|
+
"openssl req -x509 -newkey rsa:2048 -nodes -days 2 -subj '/CN=ouro-eval test authority' -keyout ca.key -out ca.pem 2>/dev/null",
|
|
117
|
+
"openssl req -newkey rsa:2048 -nodes -subj '/CN=ouro-eval household' -keyout server.key -out server.csr 2>/dev/null",
|
|
118
|
+
`printf 'subjectAltName=${names}\\nbasicConstraints=critical,CA:FALSE\\nkeyUsage=critical,digitalSignature,keyEncipherment\\nextendedKeyUsage=serverAuth\\n' > server.ext`,
|
|
119
|
+
"openssl x509 -req -in server.csr -CA ca.pem -CAkey ca.key -CAcreateserial -days 2 -extfile server.ext -out server.pem 2>/dev/null",
|
|
120
|
+
"rm -f ca.key ca.srl server.csr server.ext",
|
|
121
|
+
].join("\n");
|
|
122
|
+
}
|
|
123
|
+
/** Makes every folder under `target` writable by the containers' users, which are not the host's. */
|
|
124
|
+
function openUp(target) {
|
|
125
|
+
const stat = node_fs_1.default.lstatSync(target);
|
|
126
|
+
if (stat.isDirectory()) {
|
|
127
|
+
node_fs_1.default.chmodSync(target, 0o777);
|
|
128
|
+
for (const name of node_fs_1.default.readdirSync(target))
|
|
129
|
+
openUp(node_path_1.default.join(target, name));
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
node_fs_1.default.chmodSync(target, 0o666);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
function waitForReady(sidecar, timeoutMs) {
|
|
136
|
+
return new Promise((resolve, reject) => {
|
|
137
|
+
let buffered = "";
|
|
138
|
+
const timer = setTimeout(() => reject(new Error(`the household was not ready within ${timeoutMs} ms`)), timeoutMs);
|
|
139
|
+
sidecar.stdout.setEncoding("utf8");
|
|
140
|
+
sidecar.stdout.on("data", (chunk) => {
|
|
141
|
+
buffered += chunk;
|
|
142
|
+
if (buffered.split("\n").some((line) => line.includes("\"ready\": true"))) {
|
|
143
|
+
clearTimeout(timer);
|
|
144
|
+
resolve();
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
void sidecar.exited.then((code) => {
|
|
148
|
+
clearTimeout(timer);
|
|
149
|
+
reject(new Error(`the household exited (${code}) before it was ready: ${sidecar.stderr().trim()}`));
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
/** The guest's `done` message, or why there is none: the container exited first, or the deadline passed. */
|
|
154
|
+
function waitForGuest(agent, onDone, timeoutMs) {
|
|
155
|
+
return new Promise((resolve) => {
|
|
156
|
+
const timer = setTimeout(() => resolve({ ok: false, error: `the turn did not finish within ${timeoutMs} ms` }), timeoutMs);
|
|
157
|
+
onDone((outcome) => { clearTimeout(timer); resolve(outcome); });
|
|
158
|
+
void agent.exited.then((code) => {
|
|
159
|
+
clearTimeout(timer);
|
|
160
|
+
resolve({ ok: false, error: `the agent container exited (${code}) before the turn finished: ${agent.stderr().trim()}` });
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
/** Whether a removed container's `docker run` ended within the grace period. */
|
|
165
|
+
const settle = (exited, graceMs) => new Promise((resolve) => {
|
|
166
|
+
const timer = setTimeout(() => resolve(false), graceMs);
|
|
167
|
+
void exited.then(() => { clearTimeout(timer); resolve(true); });
|
|
168
|
+
});
|
|
169
|
+
const isTurns = (value) => Array.isArray(value) && value.every((turn) => typeof turn === "object" && turn !== null
|
|
170
|
+
&& Number.isInteger(turn.start) && typeof turn.finalReply === "string" && typeof turn.outcome === "string" && Number.isInteger(turn.calls));
|
|
171
|
+
function guestTurn(outcome) {
|
|
172
|
+
if (!outcome.ok)
|
|
173
|
+
return { timeline: [], finalReply: "", outcome: `sandbox-error: ${outcome.error}` };
|
|
174
|
+
const result = outcome.result;
|
|
175
|
+
if (!result || !Array.isArray(result.timeline) || typeof result.finalReply !== "string" || typeof result.outcome !== "string" || (result.turns !== undefined && !isTurns(result.turns))) {
|
|
176
|
+
return { timeline: [], finalReply: "", outcome: "sandbox-error: the guest's result is malformed" };
|
|
177
|
+
}
|
|
178
|
+
return { timeline: result.timeline, finalReply: result.finalReply, outcome: result.outcome, ...(result.turns ? { turns: result.turns } : {}) };
|
|
179
|
+
}
|
|
180
|
+
/** The job's part of a merged timeline and the later turns, by where the guest said each turn starts. */
|
|
181
|
+
function splitTurns(observation, turns) {
|
|
182
|
+
// After a trace mismatch the timeline is the host's calls, not the guest's, so the guest's turn starts don't index it.
|
|
183
|
+
if (!turns || turns.length < 2 || observation.outcome === "trace-mismatch")
|
|
184
|
+
return { observation, followUps: [] };
|
|
185
|
+
const end = turns[1].start;
|
|
186
|
+
return {
|
|
187
|
+
observation: { ...observation, timeline: observation.timeline.slice(0, end) },
|
|
188
|
+
followUps: turns.slice(1).map(({ start, finalReply, outcome, calls }, i) => ({
|
|
189
|
+
finalReply, outcome, calls, toolCalls: observation.timeline.slice(start, turns[i + 2]?.start).filter((entry) => entry.kind === "call").length,
|
|
190
|
+
})),
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
async function runSandboxed(input) {
|
|
194
|
+
const docker = input.docker ?? dockerCli();
|
|
195
|
+
const images = input.images ?? { agent: exports.SANDBOX_IMAGE, household: exports.HOUSEHOLD_IMAGE };
|
|
196
|
+
const runId = `${exports.EVAL_RUN_PREFIX}${node_crypto_1.default.randomBytes(4).toString("hex")}`;
|
|
197
|
+
const runLabels = ["--label", exports.EVAL_LABEL, "--label", `ouro.eval.run=${runId}`];
|
|
198
|
+
const last = input.case.prefix.at(-1);
|
|
199
|
+
if (last?.role !== "user")
|
|
200
|
+
throw new Error(`case ${input.case.id}: the prefix must end with the owner's message`);
|
|
201
|
+
// Docker matches the filter against the name with its leading slash; any container it lists makes this the Butler's host.
|
|
202
|
+
const butler = (await docker.run(["ps", "--all", "--filter", `name=${exports.BUTLER_CONTAINERS}`, "--format", "{{.Names}}"])).trim();
|
|
203
|
+
if (butler !== "" && !(await input.hostLock?.held())) {
|
|
204
|
+
throw new Error(`refusing to run the eval sandbox on this host: it runs the live Butler (${butler.split("\n").join(", ")}), and no host lock that the Butler's upgrade and rollback honour is held`);
|
|
205
|
+
}
|
|
206
|
+
(0, runtime_1.emitNervesEvent)({ component: "eval", event: "eval.sandbox_run_start", message: "starting a sandboxed eval run", meta: { caseId: input.case.id, runId } });
|
|
207
|
+
const work = node_fs_1.default.mkdtempSync(node_path_1.default.join(input.workRoot ?? node_os_1.default.tmpdir(), exports.EVAL_RUN_PREFIX));
|
|
208
|
+
node_fs_1.default.chmodSync(work, 0o700);
|
|
209
|
+
const bundle = node_path_1.default.join(work, "bundle");
|
|
210
|
+
const fixtures = node_path_1.default.join(work, "fixtures");
|
|
211
|
+
const tls = node_path_1.default.join(work, "tls");
|
|
212
|
+
const household = node_path_1.default.join(work, "household");
|
|
213
|
+
const agentName = `${runId}-agent`;
|
|
214
|
+
const sidecarName = `${runId}-household`;
|
|
215
|
+
const started = [];
|
|
216
|
+
let networkMade = false;
|
|
217
|
+
let reclaimed = true;
|
|
218
|
+
const self = `${process.getuid()}:${process.getgid()}`;
|
|
219
|
+
// The containers' users own what they wrote, and may have locked it; hand it all back before reading or deleting.
|
|
220
|
+
const reclaim = async () => {
|
|
221
|
+
reclaimed = true;
|
|
222
|
+
await docker.run([
|
|
223
|
+
"run", "--rm", ...runLabels, "--network", "none", "--log-driver", "none", "--cap-drop", "ALL", "--cap-add", "CHOWN", "--cap-add", "FOWNER", "--cap-add", "DAC_OVERRIDE",
|
|
224
|
+
"--user", "0:0", "-v", `${work}:/work`, images.household, "sh", "-c", `chown -R ${self} /work && chmod -R u+rwX /work`,
|
|
225
|
+
]);
|
|
226
|
+
};
|
|
227
|
+
try {
|
|
228
|
+
const { gaps } = (0, projection_1.projectBundle)({ bundleDir: input.bundleDir, seedBundleDir: input.seedBundleDir, include: input.case.bundle.include, out: bundle });
|
|
229
|
+
node_fs_1.default.writeFileSync(node_path_1.default.join(bundle, "books/credentials.json"), `${JSON.stringify(booksSettings(), null, 1)}\n`);
|
|
230
|
+
for (const dir of [fixtures, tls, household])
|
|
231
|
+
node_fs_1.default.mkdirSync(dir);
|
|
232
|
+
const helper = ["run", "--rm", ...runLabels, "--network", "none", "--user", self, ...HARDENING];
|
|
233
|
+
const labels = JSON.parse(await docker.run([...helper, "-v", `${fixtures}:/out`, images.household, "python3", "/opt/eval/fakes/fixtures.py", "build", "/out"]));
|
|
234
|
+
// A seeded file sits where an earlier `books get` would have left it, so its place does not mark it as seeded.
|
|
235
|
+
const earlier = Math.floor(Date.now() / 1000) - 86_400;
|
|
236
|
+
input.case.seed.disk.forEach((sha256, index) => {
|
|
237
|
+
const name = Object.keys(labels).find((label) => labels[label] === sha256);
|
|
238
|
+
if (!name)
|
|
239
|
+
throw new Error(`case ${input.case.id} seeds ${sha256} on disk, which is no fixture`);
|
|
240
|
+
const work = input.case.seed.labels.find((label) => label.sha256 === sha256)?.work ?? "book";
|
|
241
|
+
const folder = node_path_1.default.join(bundle, "books/work", `${earlier + index}-${node_crypto_1.default.randomBytes(4).toString("hex")}`);
|
|
242
|
+
node_fs_1.default.mkdirSync(folder);
|
|
243
|
+
node_fs_1.default.copyFileSync(node_path_1.default.join(fixtures, `${name}.epub`), node_path_1.default.join(folder, `${work}.epub`));
|
|
244
|
+
});
|
|
245
|
+
await docker.run([...helper, "-v", `${tls}:/out`, images.household, "sh", "-c", tlsScript()]);
|
|
246
|
+
node_fs_1.default.chmodSync(node_path_1.default.join(tls, "server.key"), 0o644);
|
|
247
|
+
const seedFile = node_path_1.default.join(work, "seed.json");
|
|
248
|
+
node_fs_1.default.writeFileSync(seedFile, JSON.stringify({ ...input.case.seed, calibreWeb: { username: "butler", password: "eval-password" }, smtp: { user: "eval", password: "eval-password" } }));
|
|
249
|
+
const turnFile = node_path_1.default.join(work, "turn.json");
|
|
250
|
+
node_fs_1.default.writeFileSync(turnFile, JSON.stringify(input.guest ? input.guest.turn : { prefix: input.case.prefix.slice(0, -1), userText: last.content }));
|
|
251
|
+
node_fs_1.default.chmodSync(household, 0o777);
|
|
252
|
+
for (const entry of exports.WRITABLE)
|
|
253
|
+
openUp(node_path_1.default.join(bundle, entry));
|
|
254
|
+
await docker.run(["network", "create", "--internal", ...runLabels, runId]);
|
|
255
|
+
networkMade = true;
|
|
256
|
+
started.push(sidecarName);
|
|
257
|
+
// From here a container's user may own files in the run's folder.
|
|
258
|
+
reclaimed = false;
|
|
259
|
+
const sidecar = docker.start([
|
|
260
|
+
"run", "--rm", "--name", sidecarName, ...runLabels, "--network", runId, ...ALIASES.flatMap((alias) => ["--network-alias", alias]),
|
|
261
|
+
"--user", "10002:10002", ...HARDENING, "--tmpfs", "/tmp:rw,size=64m",
|
|
262
|
+
"-v", `${fixtures}:/eval/fixtures:ro`, "-v", `${seedFile}:/eval/seed.json:ro`,
|
|
263
|
+
"-v", `${tls}/server.pem:/eval/tls/server.pem:ro`, "-v", `${tls}/server.key:/eval/tls/server.key:ro`, "-v", `${household}:/eval/state`,
|
|
264
|
+
images.household, "python3", "/opt/eval/fakes/household.py", "--seed", "/eval/seed.json", "--fixtures", "/eval/fixtures", "--state", "/eval/state",
|
|
265
|
+
"--tls-cert", "/eval/tls/server.pem", "--tls-key", "/eval/tls/server.key",
|
|
266
|
+
]);
|
|
267
|
+
await waitForReady(sidecar, input.readyTimeoutMs ?? 60_000);
|
|
268
|
+
const before = (0, readback_1.snapshotFiles)(bundle, exports.WRITABLE);
|
|
269
|
+
started.push(agentName);
|
|
270
|
+
const agent = docker.start([
|
|
271
|
+
"run", "-i", "--rm", "--name", agentName, ...runLabels, "--network", runId, "--user", "10001:10001", ...HARDENING,
|
|
272
|
+
"--tmpfs", "/tmp:rw,mode=1777,size=256m", "--tmpfs", "/home/ouro:rw,uid=10001,gid=10001,mode=0700,size=256m", "--env", "HOME=/home/ouro",
|
|
273
|
+
"-v", `${bundle}:${BUNDLE}:ro`, ...exports.WRITABLE.flatMap((entry) => ["-v", `${node_path_1.default.join(bundle, entry)}:${BUNDLE}/${entry}`]),
|
|
274
|
+
"-v", `${tls}/ca.pem:/etc/ssl/certs/ca-certificates.crt:ro`, "-v", `${turnFile}:/eval/turn.json:ro`,
|
|
275
|
+
images.agent, "node", ...(input.guest ? [`/opt/ouro/dist/eval/${input.guest.entry}`] : ["/opt/ouro/dist/eval/guest-entry.js", "--agent", "sanctuary"]),
|
|
276
|
+
]);
|
|
277
|
+
const hostCalls = [];
|
|
278
|
+
const recorded = (0, telegram_turn_1.recordModelTraffic)(input.host, hostCalls);
|
|
279
|
+
const channel = (0, provider_proxy_1.createStreamChannel)(agent.stdout, agent.stdin);
|
|
280
|
+
(0, provider_proxy_1.serveProxyRuntime)(channel, recorded.runtime, input.budget);
|
|
281
|
+
const outcome = await waitForGuest(agent, (listen) => channel.onMessage((msg) => { if (msg.type === "done")
|
|
282
|
+
listen(msg.outcome); }), input.turnTimeoutMs ?? 600_000);
|
|
283
|
+
// Ends every process the turn started, then the household, before anything is read back.
|
|
284
|
+
await docker.run(["rm", "--force", agentName]).catch(() => "");
|
|
285
|
+
const graceMs = input.exitGraceMs ?? 30_000;
|
|
286
|
+
const agentStopped = await settle(agent.exited, graceMs);
|
|
287
|
+
await docker.run(["rm", "--force", sidecarName]).catch(() => "");
|
|
288
|
+
const householdStopped = await settle(sidecar.exited, graceMs);
|
|
289
|
+
await reclaim();
|
|
290
|
+
let turn = guestTurn(outcome);
|
|
291
|
+
let created = [];
|
|
292
|
+
let state = { library: [], mail: [], events: 0 };
|
|
293
|
+
const bytes = new Map();
|
|
294
|
+
// A container that may still be running could change what is read, so nothing is read back from such a run.
|
|
295
|
+
const stuck = !agentStopped ? "the agent container" : !householdStopped ? "the household" : undefined;
|
|
296
|
+
if (stuck) {
|
|
297
|
+
turn = { timeline: [], finalReply: "", outcome: `sandbox-error: ${stuck} did not stop within ${graceMs} ms of its removal` };
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
try {
|
|
301
|
+
created = (0, readback_1.createdSince)(before, (0, readback_1.snapshotFiles)(bundle, exports.WRITABLE));
|
|
302
|
+
}
|
|
303
|
+
catch (error) {
|
|
304
|
+
turn = { timeline: [], finalReply: "", outcome: `sandbox-error: ${error.message}` };
|
|
305
|
+
}
|
|
306
|
+
state = (0, readback_1.readHouseholdState)(node_path_1.default.join(household, "state.json"));
|
|
307
|
+
for (const file of created)
|
|
308
|
+
bytes.set(file.sha256, node_path_1.default.join(bundle, file.path));
|
|
309
|
+
for (const book of state.library)
|
|
310
|
+
bytes.set(book.sha256, node_path_1.default.join(household, "library", `${book.id}.epub`));
|
|
311
|
+
}
|
|
312
|
+
const assembled = await (0, readback_1.assembleObservation)({
|
|
313
|
+
seed: input.case.seed, turn, hostCalls, steps: recorded.steps(), household: state, created, bytes,
|
|
314
|
+
...(input.oracle ? { oracle: input.oracle } : {}),
|
|
315
|
+
});
|
|
316
|
+
const { observation, followUps } = splitTurns(assembled, turn.turns);
|
|
317
|
+
(0, runtime_1.emitNervesEvent)({ component: "eval", event: "eval.sandbox_run_end", message: "finished a sandboxed eval run", meta: { caseId: input.case.id, runId, outcome: observation.outcome } });
|
|
318
|
+
return { ...observation, gaps: [...gaps, ...(input.guest ? [] : declared_gaps_1.DECLARED_GAPS)], ...(input.guest ? { followUps } : {}) };
|
|
319
|
+
}
|
|
320
|
+
catch (error) {
|
|
321
|
+
(0, runtime_1.emitNervesEvent)({ component: "eval", level: "error", event: "eval.sandbox_run_error", message: "a sandboxed eval run failed", meta: { caseId: input.case.id, runId, error: error.message } });
|
|
322
|
+
throw error;
|
|
323
|
+
}
|
|
324
|
+
finally {
|
|
325
|
+
for (const name of started.reverse())
|
|
326
|
+
await docker.run(["rm", "--force", name]).catch(() => "");
|
|
327
|
+
if (networkMade)
|
|
328
|
+
await docker.run(["network", "rm", runId]).catch(() => "");
|
|
329
|
+
if (!reclaimed)
|
|
330
|
+
await reclaim().catch(() => undefined);
|
|
331
|
+
try {
|
|
332
|
+
node_fs_1.default.rmSync(work, { recursive: true, force: true });
|
|
333
|
+
}
|
|
334
|
+
catch (error) {
|
|
335
|
+
(0, runtime_1.emitNervesEvent)({ component: "eval", level: "error", event: "eval.sandbox_cleanup_error", message: "a sandboxed run's folder could not be removed", meta: { work, error: error.message } });
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.runGuest = runGuest;
|
|
7
|
+
/**
|
|
8
|
+
* What runs inside the agent container: one Telegram turn whose provider is served by the host over the container's
|
|
9
|
+
* stdin and stdout. The turn's input (the case prefix and the owner's last message) is a read-only file the sandbox
|
|
10
|
+
* mounts. The guest's last line on stdout is a `done` message with the turn's result, or why it could not run; the
|
|
11
|
+
* host builds the scored observation from its own sources and uses this result only for the replies and their order.
|
|
12
|
+
*/
|
|
13
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
14
|
+
const identity_1 = require("../../heart/identity");
|
|
15
|
+
const runtime_1 = require("../../nerves/runtime");
|
|
16
|
+
const provider_proxy_1 = require("../transport/provider-proxy");
|
|
17
|
+
function readTurnFile(file) {
|
|
18
|
+
const value = JSON.parse(node_fs_1.default.readFileSync(file, "utf8"));
|
|
19
|
+
if (!Array.isArray(value.prefix) || typeof value.userText !== "string")
|
|
20
|
+
throw new Error(`${file} needs a prefix list and a userText string`);
|
|
21
|
+
return { prefix: value.prefix, userText: value.userText };
|
|
22
|
+
}
|
|
23
|
+
async function runGuest(input) {
|
|
24
|
+
(0, runtime_1.emitNervesEvent)({ component: "eval", event: "eval.guest_start", message: "sandbox guest starting a turn", meta: {} });
|
|
25
|
+
const channel = (0, provider_proxy_1.createStreamChannel)(input.stdin, input.stdout);
|
|
26
|
+
let outcome;
|
|
27
|
+
try {
|
|
28
|
+
const turn = readTurnFile(input.turnFile);
|
|
29
|
+
const providerRuntime = await (0, provider_proxy_1.createProxyRuntime)(channel);
|
|
30
|
+
const result = await input.runTurn({ agentRoot: (0, identity_1.getAgentRoot)("sanctuary"), prefix: turn.prefix, userText: turn.userText, providerRuntime });
|
|
31
|
+
outcome = { ok: true, result };
|
|
32
|
+
(0, runtime_1.emitNervesEvent)({ component: "eval", event: "eval.guest_end", message: "sandbox guest finished its turn", meta: { outcome: result.outcome } });
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
outcome = { ok: false, error: error instanceof Error ? error.message : String(error) };
|
|
36
|
+
(0, runtime_1.emitNervesEvent)({ component: "eval", level: "error", event: "eval.guest_error", message: "sandbox guest could not run its turn", meta: { error: outcome.error } });
|
|
37
|
+
}
|
|
38
|
+
channel.send({ type: "done", outcome });
|
|
39
|
+
await new Promise((resolve) => input.stdout.write("", () => resolve()));
|
|
40
|
+
return outcome;
|
|
41
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.HOST_LOCK_WAIT_S = exports.HOST_LOCK_TTL_S = exports.HOST_LOCK_SCRIPT = void 0;
|
|
7
|
+
exports.holdHostLock = holdHostLock;
|
|
8
|
+
exports.localHostLock = localHostLock;
|
|
9
|
+
/**
|
|
10
|
+
* The eval's side of the host lock (deploy/unraid/ouro-host-lock.mjs, #1760). With `--host-lock`, the command holds the
|
|
11
|
+
* remote host's lock for its whole run over one ssh session (`hold`), so a dropped session frees it, and sends the
|
|
12
|
+
* token with every job. On the host, `runSandboxed` checks that the token still holds a live lock before it creates
|
|
13
|
+
* anything; the Butler's upgrade and rollback wait while anyone else holds it.
|
|
14
|
+
*/
|
|
15
|
+
const node_child_process_1 = require("node:child_process");
|
|
16
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
17
|
+
const runtime_1 = require("../../nerves/runtime");
|
|
18
|
+
/** The lock script, beside this file's package root, in a checkout and in the synced harness on the host alike. */
|
|
19
|
+
exports.HOST_LOCK_SCRIPT = node_path_1.default.resolve(__dirname, "../../../deploy/unraid/ouro-host-lock.mjs");
|
|
20
|
+
/** How long the lock lasts if the holder hangs without its session dropping: a whole replay fits well inside. */
|
|
21
|
+
exports.HOST_LOCK_TTL_S = 6 * 60 * 60;
|
|
22
|
+
/** How long to wait for a Butler ship that holds the lock before giving up. */
|
|
23
|
+
exports.HOST_LOCK_WAIT_S = 30 * 60;
|
|
24
|
+
/** Starts the remote `hold`, waits for its token, and returns it with a release that ends the session. */
|
|
25
|
+
async function holdHostLock(start) {
|
|
26
|
+
const proc = start();
|
|
27
|
+
let out = "";
|
|
28
|
+
const token = await new Promise((resolve) => {
|
|
29
|
+
proc.stdout.setEncoding("utf8");
|
|
30
|
+
proc.stdout.on("data", (chunk) => {
|
|
31
|
+
out += chunk;
|
|
32
|
+
const acquired = /^@@LOCK acquired ([0-9a-f]{32})$/m.exec(out);
|
|
33
|
+
if (acquired)
|
|
34
|
+
resolve(acquired[1]);
|
|
35
|
+
});
|
|
36
|
+
void proc.exited.then(() => resolve(undefined));
|
|
37
|
+
});
|
|
38
|
+
if (!token) {
|
|
39
|
+
const held = /^@@LOCK held (.+)$/m.exec(out);
|
|
40
|
+
const code = await proc.exited;
|
|
41
|
+
const error = held ? `the host lock is held by ${held[1]}` : `could not take the host lock: ${proc.stderr().trim().split("\n").at(-1) || `exit ${code}`}`;
|
|
42
|
+
(0, runtime_1.emitNervesEvent)({ component: "eval", level: "error", event: "eval.host_lock_refused", message: "the eval could not take the host lock", meta: { error } });
|
|
43
|
+
throw new Error(error);
|
|
44
|
+
}
|
|
45
|
+
(0, runtime_1.emitNervesEvent)({ component: "eval", event: "eval.host_lock_held", message: "the eval holds the host lock", meta: {} });
|
|
46
|
+
return {
|
|
47
|
+
token,
|
|
48
|
+
release: async () => {
|
|
49
|
+
proc.stdin.end();
|
|
50
|
+
await proc.exited;
|
|
51
|
+
(0, runtime_1.emitNervesEvent)({ component: "eval", event: "eval.host_lock_released", message: "the eval released the host lock", meta: {} });
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/** On the host: held while this token holds a live lock there. */
|
|
56
|
+
function localHostLock(token, env = process.env) {
|
|
57
|
+
return {
|
|
58
|
+
held: () => new Promise((resolve) => {
|
|
59
|
+
(0, node_child_process_1.execFile)(process.execPath, [exports.HOST_LOCK_SCRIPT, "check", "--token", token], { env }, (error) => resolve(!error));
|
|
60
|
+
}),
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dockerOracle = dockerOracle;
|
|
4
|
+
/**
|
|
5
|
+
* The oracle for a file no fixture label covers (the agent built or edited an EPUB): the books CLI's own
|
|
6
|
+
* `quality.check` from the pinned oracle ref, run on the host side in a throwaway container with no network, a
|
|
7
|
+
* read-only root and every capability dropped. `booksLib` is the folder holding that ref's `booklib` package. A
|
|
8
|
+
* checker that cannot run, or answers anything but true or false, grades the file as not readable.
|
|
9
|
+
*/
|
|
10
|
+
const runtime_1 = require("../../nerves/runtime");
|
|
11
|
+
const docker_1 = require("./docker");
|
|
12
|
+
const CHECK = "import json, sys; sys.path.insert(0, '/oracle'); from booklib import quality; print(json.dumps(bool(quality.check('/book.epub')['ok'])))";
|
|
13
|
+
function dockerOracle(input) {
|
|
14
|
+
return async (file) => {
|
|
15
|
+
try {
|
|
16
|
+
const out = await input.docker.run([
|
|
17
|
+
"run", "--rm", "--label", docker_1.EVAL_LABEL, "--network", "none", "--log-driver", "none", "--read-only", "--cap-drop", "ALL", "--security-opt", "no-new-privileges",
|
|
18
|
+
"--tmpfs", "/tmp:rw,size=64m", "-v", `${input.booksLib}:/oracle:ro`, "-v", `${file}:/book.epub:ro`, input.image, "python3", "-I", "-c", CHECK,
|
|
19
|
+
]);
|
|
20
|
+
const verdict = out.trim();
|
|
21
|
+
if (verdict === "true" || verdict === "false") {
|
|
22
|
+
(0, runtime_1.emitNervesEvent)({ component: "eval", event: "eval.oracle_graded", message: "graded an unlabelled file with the pinned checker", meta: { readable: verdict === "true" } });
|
|
23
|
+
return verdict === "true";
|
|
24
|
+
}
|
|
25
|
+
throw new Error(`the checker answered ${verdict.slice(0, 80)}`);
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
(0, runtime_1.emitNervesEvent)({ component: "eval", level: "error", event: "eval.oracle_error", message: "the pinned checker could not grade a file", meta: { error: error.message } });
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|