rookery-agent 0.1.0 → 0.3.0
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/README.md +467 -367
- package/docs/migration.md +88 -88
- package/docs/updates.md +112 -0
- package/package.json +13 -3
- package/packages/cli/dist/commands/config.js +2 -2
- package/packages/cli/dist/commands/doctor.d.ts.map +1 -1
- package/packages/cli/dist/commands/doctor.js +13 -9
- package/packages/cli/dist/commands/doctor.js.map +1 -1
- package/packages/cli/dist/commands/memory.js +1 -1
- package/packages/cli/dist/commands/org.d.ts +2 -2
- package/packages/cli/dist/commands/org.d.ts.map +1 -1
- package/packages/cli/dist/commands/org.js +19 -17
- package/packages/cli/dist/commands/org.js.map +1 -1
- package/packages/cli/dist/commands/serve.js +1 -1
- package/packages/cli/dist/commands/serve.js.map +1 -1
- package/packages/cli/dist/commands/shared.d.ts.map +1 -1
- package/packages/cli/dist/commands/shared.js +2 -1
- package/packages/cli/dist/commands/shared.js.map +1 -1
- package/packages/cli/dist/commands/tasks.d.ts.map +1 -1
- package/packages/cli/dist/commands/tasks.js +25 -11
- package/packages/cli/dist/commands/tasks.js.map +1 -1
- package/packages/cli/dist/commands/tools.js +1 -1
- package/packages/cli/dist/commands/tools.js.map +1 -1
- package/packages/cli/dist/index.js +13 -13
- package/packages/cli/dist/index.js.map +1 -1
- package/packages/cli/dist/repl.d.ts +12 -0
- package/packages/cli/dist/repl.d.ts.map +1 -1
- package/packages/cli/dist/repl.js +170 -16
- package/packages/cli/dist/repl.js.map +1 -1
- package/packages/cli/dist/tui/App.d.ts +7 -3
- package/packages/cli/dist/tui/App.d.ts.map +1 -1
- package/packages/cli/dist/tui/App.js +182 -16
- package/packages/cli/dist/tui/App.js.map +1 -1
- package/packages/cli/dist/tui/commands.d.ts +7 -0
- package/packages/cli/dist/tui/commands.d.ts.map +1 -1
- package/packages/cli/dist/tui/commands.js +70 -8
- package/packages/cli/dist/tui/commands.js.map +1 -1
- package/packages/cli/dist/tui/components/AssignmentsView.js +4 -4
- package/packages/cli/dist/tui/components/AssignmentsView.js.map +1 -1
- package/packages/cli/dist/tui/components/Banner.d.ts +11 -2
- package/packages/cli/dist/tui/components/Banner.d.ts.map +1 -1
- package/packages/cli/dist/tui/components/Banner.js +7 -10
- package/packages/cli/dist/tui/components/Banner.js.map +1 -1
- package/packages/cli/dist/tui/components/CodeBlock.js +2 -2
- package/packages/cli/dist/tui/components/CodeBlock.js.map +1 -1
- package/packages/cli/dist/tui/components/InputBox.d.ts.map +1 -1
- package/packages/cli/dist/tui/components/InputBox.js +4 -4
- package/packages/cli/dist/tui/components/InputBox.js.map +1 -1
- package/packages/cli/dist/tui/components/Logo.d.ts +56 -0
- package/packages/cli/dist/tui/components/Logo.d.ts.map +1 -0
- package/packages/cli/dist/tui/components/Logo.js +50 -0
- package/packages/cli/dist/tui/components/Logo.js.map +1 -0
- package/packages/cli/dist/tui/components/Markdown.js +8 -8
- package/packages/cli/dist/tui/components/Markdown.js.map +1 -1
- package/packages/cli/dist/tui/components/Message.d.ts +1 -1
- package/packages/cli/dist/tui/components/Message.d.ts.map +1 -1
- package/packages/cli/dist/tui/components/Message.js +5 -4
- package/packages/cli/dist/tui/components/Message.js.map +1 -1
- package/packages/cli/dist/tui/components/QuestionView.d.ts +29 -0
- package/packages/cli/dist/tui/components/QuestionView.d.ts.map +1 -0
- package/packages/cli/dist/tui/components/QuestionView.js +53 -0
- package/packages/cli/dist/tui/components/QuestionView.js.map +1 -0
- package/packages/cli/dist/tui/components/SlashPalette.d.ts +5 -2
- package/packages/cli/dist/tui/components/SlashPalette.d.ts.map +1 -1
- package/packages/cli/dist/tui/components/SlashPalette.js +2 -2
- package/packages/cli/dist/tui/components/SlashPalette.js.map +1 -1
- package/packages/cli/dist/tui/components/StatusLine.d.ts +0 -2
- package/packages/cli/dist/tui/components/StatusLine.d.ts.map +1 -1
- package/packages/cli/dist/tui/components/StatusLine.js +8 -5
- package/packages/cli/dist/tui/components/StatusLine.js.map +1 -1
- package/packages/cli/dist/tui/components/ToolGroup.js +2 -2
- package/packages/cli/dist/tui/components/ToolGroup.js.map +1 -1
- package/packages/cli/dist/tui/components/WatchView.d.ts +21 -0
- package/packages/cli/dist/tui/components/WatchView.d.ts.map +1 -0
- package/packages/cli/dist/tui/components/WatchView.js +36 -0
- package/packages/cli/dist/tui/components/WatchView.js.map +1 -0
- package/packages/cli/dist/tui/history.d.ts +20 -0
- package/packages/cli/dist/tui/history.d.ts.map +1 -0
- package/packages/cli/dist/tui/history.js +105 -0
- package/packages/cli/dist/tui/history.js.map +1 -0
- package/packages/cli/dist/tui/hooks/useSlash.d.ts.map +1 -1
- package/packages/cli/dist/tui/hooks/useSlash.js +3 -2
- package/packages/cli/dist/tui/hooks/useSlash.js.map +1 -1
- package/packages/cli/dist/tui/hooks/useTurn.d.ts +58 -1
- package/packages/cli/dist/tui/hooks/useTurn.d.ts.map +1 -1
- package/packages/cli/dist/tui/hooks/useTurn.js +214 -36
- package/packages/cli/dist/tui/hooks/useTurn.js.map +1 -1
- package/packages/cli/dist/tui/hooks/useWatch.d.ts +52 -0
- package/packages/cli/dist/tui/hooks/useWatch.d.ts.map +1 -0
- package/packages/cli/dist/tui/hooks/useWatch.js +145 -0
- package/packages/cli/dist/tui/hooks/useWatch.js.map +1 -0
- package/packages/cli/dist/tui/inkTheme.d.ts +19 -0
- package/packages/cli/dist/tui/inkTheme.d.ts.map +1 -0
- package/packages/cli/dist/tui/inkTheme.js +81 -0
- package/packages/cli/dist/tui/inkTheme.js.map +1 -0
- package/packages/cli/dist/tui/theme.d.ts +39 -29
- package/packages/cli/dist/tui/theme.d.ts.map +1 -1
- package/packages/cli/dist/tui/theme.js +35 -25
- package/packages/cli/dist/tui/theme.js.map +1 -1
- package/packages/cli/dist/tui/types.d.ts +56 -3
- package/packages/cli/dist/tui/types.d.ts.map +1 -1
- package/packages/cli/dist/tui/types.js +85 -0
- package/packages/cli/dist/tui/types.js.map +1 -1
- package/packages/cli/dist/ui/modelNames.d.ts +51 -0
- package/packages/cli/dist/ui/modelNames.d.ts.map +1 -0
- package/packages/cli/dist/ui/modelNames.js +134 -0
- package/packages/cli/dist/ui/modelNames.js.map +1 -0
- package/packages/cli/dist/ui/render.d.ts.map +1 -1
- package/packages/cli/dist/ui/render.js +17 -8
- package/packages/cli/dist/ui/render.js.map +1 -1
- package/packages/cli/dist/ui/speech.js +5 -0
- package/packages/cli/dist/ui/speech.js.map +1 -1
- package/packages/cli/dist/ui/theme.d.ts +33 -9
- package/packages/cli/dist/ui/theme.d.ts.map +1 -1
- package/packages/cli/dist/ui/theme.js +33 -9
- package/packages/cli/dist/ui/theme.js.map +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/core/dist/agents/persona.d.ts.map +1 -1
- package/packages/core/dist/agents/persona.js +5 -2
- package/packages/core/dist/agents/persona.js.map +1 -1
- package/packages/core/dist/computer/accessibility.d.ts +78 -0
- package/packages/core/dist/computer/accessibility.d.ts.map +1 -0
- package/packages/core/dist/computer/accessibility.js +270 -0
- package/packages/core/dist/computer/accessibility.js.map +1 -0
- package/packages/core/dist/computer/assemblies.d.ts +17 -0
- package/packages/core/dist/computer/assemblies.d.ts.map +1 -0
- package/packages/core/dist/computer/assemblies.js +55 -0
- package/packages/core/dist/computer/assemblies.js.map +1 -0
- package/packages/core/dist/computer/browser-init.d.ts +9 -0
- package/packages/core/dist/computer/browser-init.d.ts.map +1 -0
- package/packages/core/dist/computer/browser-init.js +133 -0
- package/packages/core/dist/computer/browser-init.js.map +1 -0
- package/packages/core/dist/computer/cursor.d.ts +30 -0
- package/packages/core/dist/computer/cursor.d.ts.map +1 -0
- package/packages/core/dist/computer/cursor.js +30 -0
- package/packages/core/dist/computer/cursor.js.map +1 -0
- package/packages/core/dist/computer/mcp-server.js +524 -82
- package/packages/core/dist/computer/mcp-server.js.map +1 -1
- package/packages/core/dist/computer/powershell.d.ts +4 -0
- package/packages/core/dist/computer/powershell.d.ts.map +1 -1
- package/packages/core/dist/computer/powershell.js +471 -81
- package/packages/core/dist/computer/powershell.js.map +1 -1
- package/packages/core/dist/computer/screen-text.d.ts +82 -0
- package/packages/core/dist/computer/screen-text.d.ts.map +1 -0
- package/packages/core/dist/computer/screen-text.js +243 -0
- package/packages/core/dist/computer/screen-text.js.map +1 -0
- package/packages/core/dist/computer/sketch.d.ts +66 -0
- package/packages/core/dist/computer/sketch.d.ts.map +1 -0
- package/packages/core/dist/computer/sketch.js +540 -0
- package/packages/core/dist/computer/sketch.js.map +1 -0
- package/packages/core/dist/computer/tools.d.ts +8 -8
- package/packages/core/dist/computer/tools.d.ts.map +1 -1
- package/packages/core/dist/computer/tools.js +186 -31
- package/packages/core/dist/computer/tools.js.map +1 -1
- package/packages/core/dist/computer/validation.d.ts +555 -0
- package/packages/core/dist/computer/validation.d.ts.map +1 -0
- package/packages/core/dist/computer/validation.js +111 -0
- package/packages/core/dist/computer/validation.js.map +1 -0
- package/packages/core/dist/computer/windows-cursor.d.ts +14 -0
- package/packages/core/dist/computer/windows-cursor.d.ts.map +1 -0
- package/packages/core/dist/computer/windows-cursor.js +713 -0
- package/packages/core/dist/computer/windows-cursor.js.map +1 -0
- package/packages/core/dist/config.d.ts +34 -1
- package/packages/core/dist/config.d.ts.map +1 -1
- package/packages/core/dist/config.js +362 -11
- package/packages/core/dist/config.js.map +1 -1
- package/packages/core/dist/cron/scheduler.d.ts +59 -6
- package/packages/core/dist/cron/scheduler.d.ts.map +1 -1
- package/packages/core/dist/cron/scheduler.js +295 -27
- package/packages/core/dist/cron/scheduler.js.map +1 -1
- package/packages/core/dist/cron/store.d.ts +19 -1
- package/packages/core/dist/cron/store.d.ts.map +1 -1
- package/packages/core/dist/cron/store.js +36 -8
- package/packages/core/dist/cron/store.js.map +1 -1
- package/packages/core/dist/external/claude-code.d.ts +4 -0
- package/packages/core/dist/external/claude-code.d.ts.map +1 -0
- package/packages/core/dist/external/claude-code.js +111 -0
- package/packages/core/dist/external/claude-code.js.map +1 -0
- package/packages/core/dist/external/discovery.d.ts +33 -0
- package/packages/core/dist/external/discovery.d.ts.map +1 -0
- package/packages/core/dist/external/discovery.js +144 -0
- package/packages/core/dist/external/discovery.js.map +1 -0
- package/packages/core/dist/external/homes.d.ts +26 -0
- package/packages/core/dist/external/homes.d.ts.map +1 -0
- package/packages/core/dist/external/homes.js +49 -0
- package/packages/core/dist/external/homes.js.map +1 -0
- package/packages/core/dist/external/shared.d.ts +201 -0
- package/packages/core/dist/external/shared.d.ts.map +1 -0
- package/packages/core/dist/external/shared.js +308 -0
- package/packages/core/dist/external/shared.js.map +1 -0
- package/packages/core/dist/gateway/policy.d.ts +117 -2
- package/packages/core/dist/gateway/policy.d.ts.map +1 -1
- package/packages/core/dist/gateway/policy.js +286 -6
- package/packages/core/dist/gateway/policy.js.map +1 -1
- package/packages/core/dist/index.d.ts +38 -12
- package/packages/core/dist/index.d.ts.map +1 -1
- package/packages/core/dist/index.js +66 -12
- package/packages/core/dist/index.js.map +1 -1
- package/packages/core/dist/memory/db.d.ts +1 -1
- package/packages/core/dist/memory/db.d.ts.map +1 -1
- package/packages/core/dist/memory/db.js +878 -1
- package/packages/core/dist/memory/db.js.map +1 -1
- package/packages/core/dist/memory/dream/admission.d.ts +124 -0
- package/packages/core/dist/memory/dream/admission.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/admission.js +116 -0
- package/packages/core/dist/memory/dream/admission.js.map +1 -0
- package/packages/core/dist/memory/dream/candidate.d.ts +152 -0
- package/packages/core/dist/memory/dream/candidate.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/candidate.js +547 -0
- package/packages/core/dist/memory/dream/candidate.js.map +1 -0
- package/packages/core/dist/memory/dream/evaluate.d.ts +394 -0
- package/packages/core/dist/memory/dream/evaluate.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/evaluate.js +1032 -0
- package/packages/core/dist/memory/dream/evaluate.js.map +1 -0
- package/packages/core/dist/memory/dream/frame.d.ts +61 -0
- package/packages/core/dist/memory/dream/frame.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/frame.js +292 -0
- package/packages/core/dist/memory/dream/frame.js.map +1 -0
- package/packages/core/dist/memory/dream/label.d.ts +370 -0
- package/packages/core/dist/memory/dream/label.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/label.js +439 -0
- package/packages/core/dist/memory/dream/label.js.map +1 -0
- package/packages/core/dist/memory/dream/measure.d.ts +114 -0
- package/packages/core/dist/memory/dream/measure.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/measure.js +205 -0
- package/packages/core/dist/memory/dream/measure.js.map +1 -0
- package/packages/core/dist/memory/dream/policy.d.ts +21 -0
- package/packages/core/dist/memory/dream/policy.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/policy.js +157 -0
- package/packages/core/dist/memory/dream/policy.js.map +1 -0
- package/packages/core/dist/memory/dream/probe.d.ts +202 -0
- package/packages/core/dist/memory/dream/probe.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/probe.js +671 -0
- package/packages/core/dist/memory/dream/probe.js.map +1 -0
- package/packages/core/dist/memory/dream/promote.d.ts +312 -0
- package/packages/core/dist/memory/dream/promote.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/promote.js +528 -0
- package/packages/core/dist/memory/dream/promote.js.map +1 -0
- package/packages/core/dist/memory/dream/score.d.ts +103 -0
- package/packages/core/dist/memory/dream/score.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/score.js +334 -0
- package/packages/core/dist/memory/dream/score.js.map +1 -0
- package/packages/core/dist/memory/dream/slots.d.ts +193 -0
- package/packages/core/dist/memory/dream/slots.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/slots.js +0 -0
- package/packages/core/dist/memory/dream/slots.js.map +1 -0
- package/packages/core/dist/memory/dream/trajectory.d.ts +262 -0
- package/packages/core/dist/memory/dream/trajectory.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/trajectory.js +366 -0
- package/packages/core/dist/memory/dream/trajectory.js.map +1 -0
- package/packages/core/dist/memory/extractor.d.ts +7 -0
- package/packages/core/dist/memory/extractor.d.ts.map +1 -1
- package/packages/core/dist/memory/extractor.js +35 -12
- package/packages/core/dist/memory/extractor.js.map +1 -1
- package/packages/core/dist/memory/gate.d.ts +43 -7
- package/packages/core/dist/memory/gate.d.ts.map +1 -1
- package/packages/core/dist/memory/gate.js +91 -4
- package/packages/core/dist/memory/gate.js.map +1 -1
- package/packages/core/dist/memory/recall.d.ts +57 -0
- package/packages/core/dist/memory/recall.d.ts.map +1 -1
- package/packages/core/dist/memory/recall.js +60 -123
- package/packages/core/dist/memory/recall.js.map +1 -1
- package/packages/core/dist/memory/sleep.d.ts +131 -4
- package/packages/core/dist/memory/sleep.d.ts.map +1 -1
- package/packages/core/dist/memory/sleep.js +2384 -65
- package/packages/core/dist/memory/sleep.js.map +1 -1
- package/packages/core/dist/memory/store.d.ts +564 -10
- package/packages/core/dist/memory/store.d.ts.map +1 -1
- package/packages/core/dist/memory/store.js +1673 -102
- package/packages/core/dist/memory/store.js.map +1 -1
- package/packages/core/dist/org/controller.d.ts +268 -4
- package/packages/core/dist/org/controller.d.ts.map +1 -1
- package/packages/core/dist/org/controller.js +2298 -248
- package/packages/core/dist/org/controller.js.map +1 -1
- package/packages/core/dist/org/ponytail.d.ts +1 -1
- package/packages/core/dist/org/ponytail.js +1 -1
- package/packages/core/dist/org/project-mcp.d.ts +3 -3
- package/packages/core/dist/org/prompts.d.ts +44 -30
- package/packages/core/dist/org/prompts.d.ts.map +1 -1
- package/packages/core/dist/org/prompts.js +209 -92
- package/packages/core/dist/org/prompts.js.map +1 -1
- package/packages/core/dist/org/questions.d.ts +104 -0
- package/packages/core/dist/org/questions.d.ts.map +1 -0
- package/packages/core/dist/org/questions.js +136 -0
- package/packages/core/dist/org/questions.js.map +1 -0
- package/packages/core/dist/org/review.d.ts +100 -0
- package/packages/core/dist/org/review.d.ts.map +1 -0
- package/packages/core/dist/org/review.js +256 -0
- package/packages/core/dist/org/review.js.map +1 -0
- package/packages/core/dist/org/store.d.ts +311 -2
- package/packages/core/dist/org/store.d.ts.map +1 -1
- package/packages/core/dist/org/store.js +981 -13
- package/packages/core/dist/org/store.js.map +1 -1
- package/packages/core/dist/org/tools.d.ts +33 -3
- package/packages/core/dist/org/tools.d.ts.map +1 -1
- package/packages/core/dist/org/tools.js +380 -67
- package/packages/core/dist/org/tools.js.map +1 -1
- package/packages/core/dist/providers/catalogue.d.ts +1 -1
- package/packages/core/dist/providers/catalogue.d.ts.map +1 -1
- package/packages/core/dist/providers/catalogue.js +2 -2
- package/packages/core/dist/providers/catalogue.js.map +1 -1
- package/packages/core/dist/providers/claude-code.d.ts +19 -3
- package/packages/core/dist/providers/claude-code.d.ts.map +1 -1
- package/packages/core/dist/providers/claude-code.js +501 -40
- package/packages/core/dist/providers/claude-code.js.map +1 -1
- package/packages/core/dist/providers/claude-tui.d.ts +288 -0
- package/packages/core/dist/providers/claude-tui.d.ts.map +1 -0
- package/packages/core/dist/providers/claude-tui.js +1118 -0
- package/packages/core/dist/providers/claude-tui.js.map +1 -0
- package/packages/core/dist/providers/codex-auth.d.ts +15 -0
- package/packages/core/dist/providers/codex-auth.d.ts.map +1 -0
- package/packages/core/dist/providers/codex-auth.js +127 -0
- package/packages/core/dist/providers/codex-auth.js.map +1 -0
- package/packages/core/dist/providers/codex-bridge.d.ts +58 -0
- package/packages/core/dist/providers/codex-bridge.d.ts.map +1 -0
- package/packages/core/dist/providers/codex-bridge.js +375 -0
- package/packages/core/dist/providers/codex-bridge.js.map +1 -0
- package/packages/core/dist/providers/codex-translate.d.ts +75 -0
- package/packages/core/dist/providers/codex-translate.d.ts.map +1 -0
- package/packages/core/dist/providers/codex-translate.js +383 -0
- package/packages/core/dist/providers/codex-translate.js.map +1 -0
- package/packages/core/dist/providers/model-gateway.d.ts +56 -0
- package/packages/core/dist/providers/model-gateway.d.ts.map +1 -0
- package/packages/core/dist/providers/model-gateway.js +119 -0
- package/packages/core/dist/providers/model-gateway.js.map +1 -0
- package/packages/core/dist/providers/process.d.ts +3 -1
- package/packages/core/dist/providers/process.d.ts.map +1 -1
- package/packages/core/dist/providers/process.js +3 -3
- package/packages/core/dist/providers/process.js.map +1 -1
- package/packages/core/dist/providers/profiles.d.ts +11 -0
- package/packages/core/dist/providers/profiles.d.ts.map +1 -0
- package/packages/core/dist/providers/profiles.js +28 -0
- package/packages/core/dist/providers/profiles.js.map +1 -0
- package/packages/core/dist/providers/provider-catalog.d.ts +72 -0
- package/packages/core/dist/providers/provider-catalog.d.ts.map +1 -0
- package/packages/core/dist/providers/provider-catalog.js +144 -0
- package/packages/core/dist/providers/provider-catalog.js.map +1 -0
- package/packages/core/dist/providers/quota.d.ts +40 -1
- package/packages/core/dist/providers/quota.d.ts.map +1 -1
- package/packages/core/dist/providers/quota.js +288 -25
- package/packages/core/dist/providers/quota.js.map +1 -1
- package/packages/core/dist/providers/registry.d.ts +46 -3
- package/packages/core/dist/providers/registry.d.ts.map +1 -1
- package/packages/core/dist/providers/registry.js +148 -13
- package/packages/core/dist/providers/registry.js.map +1 -1
- package/packages/core/dist/providers/router.d.ts +28 -0
- package/packages/core/dist/providers/router.d.ts.map +1 -0
- package/packages/core/dist/providers/router.js +88 -0
- package/packages/core/dist/providers/router.js.map +1 -0
- package/packages/core/dist/providers/user-settings-guard.d.ts +12 -0
- package/packages/core/dist/providers/user-settings-guard.d.ts.map +1 -0
- package/packages/core/dist/providers/user-settings-guard.js +130 -0
- package/packages/core/dist/providers/user-settings-guard.js.map +1 -0
- package/packages/core/dist/runtime.d.ts +193 -7
- package/packages/core/dist/runtime.d.ts.map +1 -1
- package/packages/core/dist/runtime.js +1676 -219
- package/packages/core/dist/runtime.js.map +1 -1
- package/packages/core/dist/skills/builtin.d.ts +34 -0
- package/packages/core/dist/skills/builtin.d.ts.map +1 -0
- package/packages/core/dist/skills/builtin.js +305 -0
- package/packages/core/dist/skills/builtin.js.map +1 -0
- package/packages/core/dist/skills/shelf.d.ts +30 -0
- package/packages/core/dist/skills/shelf.d.ts.map +1 -0
- package/packages/core/dist/skills/shelf.js +159 -0
- package/packages/core/dist/skills/shelf.js.map +1 -0
- package/packages/core/dist/skills/store.d.ts +66 -4
- package/packages/core/dist/skills/store.d.ts.map +1 -1
- package/packages/core/dist/skills/store.js +105 -18
- package/packages/core/dist/skills/store.js.map +1 -1
- package/packages/core/dist/skills/suggest.d.ts +21 -0
- package/packages/core/dist/skills/suggest.d.ts.map +1 -0
- package/packages/core/dist/skills/suggest.js +150 -0
- package/packages/core/dist/skills/suggest.js.map +1 -0
- package/packages/core/dist/tools/catalog.d.ts +1 -3
- package/packages/core/dist/tools/catalog.d.ts.map +1 -1
- package/packages/core/dist/tools/catalog.js +38 -26
- package/packages/core/dist/tools/catalog.js.map +1 -1
- package/packages/core/dist/tools/hub.d.ts +136 -10
- package/packages/core/dist/tools/hub.d.ts.map +1 -1
- package/packages/core/dist/tools/hub.js +418 -24
- package/packages/core/dist/tools/hub.js.map +1 -1
- package/packages/core/dist/turns/journal.d.ts +78 -0
- package/packages/core/dist/turns/journal.d.ts.map +1 -0
- package/packages/core/dist/turns/journal.js +104 -0
- package/packages/core/dist/turns/journal.js.map +1 -0
- package/packages/core/dist/types.d.ts +1776 -12
- package/packages/core/dist/types.d.ts.map +1 -1
- package/packages/core/dist/types.js.map +1 -1
- package/packages/core/dist/util/blocks.d.ts +41 -0
- package/packages/core/dist/util/blocks.d.ts.map +1 -0
- package/packages/core/dist/util/blocks.js +175 -0
- package/packages/core/dist/util/blocks.js.map +1 -0
- package/packages/core/dist/util/queue.d.ts +12 -0
- package/packages/core/dist/util/queue.d.ts.map +1 -1
- package/packages/core/dist/util/queue.js +16 -0
- package/packages/core/dist/util/queue.js.map +1 -1
- package/packages/core/dist/util/time.d.ts +39 -0
- package/packages/core/dist/util/time.d.ts.map +1 -0
- package/packages/core/dist/util/time.js +71 -0
- package/packages/core/dist/util/time.js.map +1 -0
- package/packages/core/package.json +1 -1
- package/packages/server/dist/auth.d.ts +14 -1
- package/packages/server/dist/auth.d.ts.map +1 -1
- package/packages/server/dist/auth.js +19 -0
- package/packages/server/dist/auth.js.map +1 -1
- package/packages/server/dist/context.d.ts +35 -1
- package/packages/server/dist/context.d.ts.map +1 -1
- package/packages/server/dist/context.js +39 -10
- package/packages/server/dist/context.js.map +1 -1
- package/packages/server/dist/gateways/attachments.d.ts +32 -0
- package/packages/server/dist/gateways/attachments.d.ts.map +1 -0
- package/packages/server/dist/gateways/attachments.js +167 -0
- package/packages/server/dist/gateways/attachments.js.map +1 -0
- package/packages/server/dist/gateways/markdown.d.ts +9 -0
- package/packages/server/dist/gateways/markdown.d.ts.map +1 -0
- package/packages/server/dist/gateways/markdown.js +170 -0
- package/packages/server/dist/gateways/markdown.js.map +1 -0
- package/packages/server/dist/gateways/push.d.ts +1 -1
- package/packages/server/dist/gateways/push.d.ts.map +1 -1
- package/packages/server/dist/gateways/push.js +420 -13
- package/packages/server/dist/gateways/push.js.map +1 -1
- package/packages/server/dist/gateways/telegram-api.d.ts +70 -1
- package/packages/server/dist/gateways/telegram-api.d.ts.map +1 -1
- package/packages/server/dist/gateways/telegram-api.js +140 -1
- package/packages/server/dist/gateways/telegram-api.js.map +1 -1
- package/packages/server/dist/gateways/telegram.d.ts +181 -1
- package/packages/server/dist/gateways/telegram.d.ts.map +1 -1
- package/packages/server/dist/gateways/telegram.js +1572 -78
- package/packages/server/dist/gateways/telegram.js.map +1 -1
- package/packages/server/dist/gateways/threads.d.ts +84 -0
- package/packages/server/dist/gateways/threads.d.ts.map +1 -0
- package/packages/server/dist/gateways/threads.js +289 -0
- package/packages/server/dist/gateways/threads.js.map +1 -0
- package/packages/server/dist/index.d.ts +2 -1
- package/packages/server/dist/index.d.ts.map +1 -1
- package/packages/server/dist/index.js +2 -1
- package/packages/server/dist/index.js.map +1 -1
- package/packages/server/dist/listeners/imap.d.ts +13 -0
- package/packages/server/dist/listeners/imap.d.ts.map +1 -0
- package/packages/server/dist/listeners/imap.js +0 -0
- package/packages/server/dist/listeners/imap.js.map +1 -0
- package/packages/server/dist/listeners/registry.d.ts +18 -0
- package/packages/server/dist/listeners/registry.d.ts.map +1 -0
- package/packages/server/dist/listeners/registry.js +88 -0
- package/packages/server/dist/listeners/registry.js.map +1 -0
- package/packages/server/dist/listeners/types.d.ts +55 -0
- package/packages/server/dist/listeners/types.d.ts.map +1 -0
- package/packages/server/dist/listeners/types.js +2 -0
- package/packages/server/dist/listeners/types.js.map +1 -0
- package/packages/server/dist/main.js +15 -1
- package/packages/server/dist/main.js.map +1 -1
- package/packages/server/dist/routes/chat.d.ts +7 -3
- package/packages/server/dist/routes/chat.d.ts.map +1 -1
- package/packages/server/dist/routes/chat.js +8 -17
- package/packages/server/dist/routes/chat.js.map +1 -1
- package/packages/server/dist/routes/config.d.ts.map +1 -1
- package/packages/server/dist/routes/config.js +66 -7
- package/packages/server/dist/routes/config.js.map +1 -1
- package/packages/server/dist/routes/cron.d.ts.map +1 -1
- package/packages/server/dist/routes/cron.js +65 -8
- package/packages/server/dist/routes/cron.js.map +1 -1
- package/packages/server/dist/routes/dream.d.ts +22 -0
- package/packages/server/dist/routes/dream.d.ts.map +1 -0
- package/packages/server/dist/routes/dream.js +152 -0
- package/packages/server/dist/routes/dream.js.map +1 -0
- package/packages/server/dist/routes/hooks.d.ts +18 -0
- package/packages/server/dist/routes/hooks.d.ts.map +1 -0
- package/packages/server/dist/routes/hooks.js +62 -0
- package/packages/server/dist/routes/hooks.js.map +1 -0
- package/packages/server/dist/routes/listeners.d.ts +10 -0
- package/packages/server/dist/routes/listeners.d.ts.map +1 -0
- package/packages/server/dist/routes/listeners.js +12 -0
- package/packages/server/dist/routes/listeners.js.map +1 -0
- package/packages/server/dist/routes/memories.d.ts.map +1 -1
- package/packages/server/dist/routes/memories.js +55 -3
- package/packages/server/dist/routes/memories.js.map +1 -1
- package/packages/server/dist/routes/org.d.ts.map +1 -1
- package/packages/server/dist/routes/org.js +289 -49
- package/packages/server/dist/routes/org.js.map +1 -1
- package/packages/server/dist/routes/profile.d.ts.map +1 -1
- package/packages/server/dist/routes/profile.js +6 -3
- package/packages/server/dist/routes/profile.js.map +1 -1
- package/packages/server/dist/routes/providers.d.ts.map +1 -1
- package/packages/server/dist/routes/providers.js +66 -7
- package/packages/server/dist/routes/providers.js.map +1 -1
- package/packages/server/dist/routes/questions.d.ts +45 -0
- package/packages/server/dist/routes/questions.d.ts.map +1 -0
- package/packages/server/dist/routes/questions.js +73 -0
- package/packages/server/dist/routes/questions.js.map +1 -0
- package/packages/server/dist/routes/sessions.d.ts.map +1 -1
- package/packages/server/dist/routes/sessions.js +26 -6
- package/packages/server/dist/routes/sessions.js.map +1 -1
- package/packages/server/dist/routes/sleep.d.ts.map +1 -1
- package/packages/server/dist/routes/sleep.js +71 -2
- package/packages/server/dist/routes/sleep.js.map +1 -1
- package/packages/server/dist/routes/terminals.d.ts +25 -0
- package/packages/server/dist/routes/terminals.d.ts.map +1 -0
- package/packages/server/dist/routes/terminals.js +35 -0
- package/packages/server/dist/routes/terminals.js.map +1 -0
- package/packages/server/dist/routes/tools.d.ts.map +1 -1
- package/packages/server/dist/routes/tools.js +140 -6
- package/packages/server/dist/routes/tools.js.map +1 -1
- package/packages/server/dist/routes/updates.d.ts +10 -0
- package/packages/server/dist/routes/updates.d.ts.map +1 -0
- package/packages/server/dist/routes/updates.js +22 -0
- package/packages/server/dist/routes/updates.js.map +1 -0
- package/packages/server/dist/routes/ws.d.ts +11 -5
- package/packages/server/dist/routes/ws.d.ts.map +1 -1
- package/packages/server/dist/routes/ws.js +168 -28
- package/packages/server/dist/routes/ws.js.map +1 -1
- package/packages/server/dist/schemas.d.ts +1177 -215
- package/packages/server/dist/schemas.d.ts.map +1 -1
- package/packages/server/dist/schemas.js +317 -12
- package/packages/server/dist/schemas.js.map +1 -1
- package/packages/server/dist/server.d.ts +7 -1
- package/packages/server/dist/server.d.ts.map +1 -1
- package/packages/server/dist/server.js +210 -3
- package/packages/server/dist/server.js.map +1 -1
- package/packages/server/dist/services/stream.d.ts +94 -5
- package/packages/server/dist/services/stream.d.ts.map +1 -1
- package/packages/server/dist/services/stream.js +9 -20
- package/packages/server/dist/services/stream.js.map +1 -1
- package/packages/server/dist/services/stt.d.ts +65 -0
- package/packages/server/dist/services/stt.d.ts.map +1 -0
- package/packages/server/dist/services/stt.js +306 -0
- package/packages/server/dist/services/stt.js.map +1 -0
- package/packages/server/dist/services/turns.d.ts +54 -0
- package/packages/server/dist/services/turns.d.ts.map +1 -0
- package/packages/server/dist/services/turns.js +186 -0
- package/packages/server/dist/services/turns.js.map +1 -0
- package/packages/server/dist/services/updates.d.ts +99 -0
- package/packages/server/dist/services/updates.d.ts.map +1 -0
- package/packages/server/dist/services/updates.js +316 -0
- package/packages/server/dist/services/updates.js.map +1 -0
- package/packages/server/package.json +1 -1
- package/packages/web/dist/app-icon.svg +2 -0
- package/packages/web/dist/apple-touch-icon.png +0 -0
- package/packages/web/dist/assets/abnfDiagram-O67JEVCF-D7YyFndQ.js +1 -0
- package/packages/web/dist/assets/arc-C_Zgk2dJ.js +1 -0
- package/packages/web/dist/assets/architectureDiagram-NJMV4G6O-eI0adu1B.js +36 -0
- package/packages/web/dist/assets/blockDiagram-BEXU5L5S-WAoOFUA9.js +140 -0
- package/packages/web/dist/assets/c4Diagram-YGBWAQC7-DE8Zyhng.js +38 -0
- package/packages/web/dist/assets/channel-egZxcyUK.js +1 -0
- package/packages/web/dist/assets/chunk-2Q5K7J3B-bnqLP2XD.js +1 -0
- package/packages/web/dist/assets/chunk-3FUC2YCW-Ck1_SVe0.js +2 -0
- package/packages/web/dist/assets/chunk-5VM5RSS4-hDmC41gD.js +15 -0
- package/packages/web/dist/assets/chunk-GTNCS2PH-PoWvfCrT.js +88 -0
- package/packages/web/dist/assets/chunk-GWA4HPMP-D3V0IG43.js +1 -0
- package/packages/web/dist/assets/chunk-JWPE2WC7-BryfpHM5.js +1 -0
- package/packages/web/dist/assets/chunk-NETBCI7D-8ic1iEdT.js +1 -0
- package/packages/web/dist/assets/chunk-WEXAMYUT-nM8tmQT2.js +1 -0
- package/packages/web/dist/assets/chunk-XXDRQBXY-Do28F482.js +1 -0
- package/packages/web/dist/assets/classDiagram-v2-NBCMYWYE-Bop9oNNO.js +217 -0
- package/packages/web/dist/assets/cose-bilkent-JH36ORCC-a7f_bpnt.js +1 -0
- package/packages/web/dist/assets/cynefin-OW5HDTMX-DnArcis_.js +178 -0
- package/packages/web/dist/assets/cynefinDiagram-VND7K2PF-vEuTb1GD.js +62 -0
- package/packages/web/dist/assets/cytoscape.esm-Ix0LnXOy.js +331 -0
- package/packages/web/dist/assets/dagre-6A5THRUB-BgG4MynJ.js +4 -0
- package/packages/web/dist/assets/diagram-22UHCM2B-DRCQpafv.js +200 -0
- package/packages/web/dist/assets/diagram-3UASUU5V-BKgmAXde.js +24 -0
- package/packages/web/dist/assets/diagram-ATOU4E4O-B6Hsy36X.js +3 -0
- package/packages/web/dist/assets/diagram-CDSNMT55-JflyfyoB.js +30 -0
- package/packages/web/dist/assets/diagram-MLGK6HIB-Dd2QPJjT.js +24 -0
- package/packages/web/dist/assets/diagram-MPIPVDR6-DE5QU60x.js +41 -0
- package/packages/web/dist/assets/draco_decoder-C32yEggz.wasm +0 -0
- package/packages/web/dist/assets/draco_decoder-Z1_iN-Ht.wasm +0 -0
- package/packages/web/dist/assets/draco_decoder-fzg4nYZr.js +34 -0
- package/packages/web/dist/assets/draco_wasm_wrapper-DxJM36Ib.js +117 -0
- package/packages/web/dist/assets/draco_wasm_wrapper-fZCQGLGb.js +116 -0
- package/packages/web/dist/assets/ebnfDiagram-ZINNZB2B-D7AQ741b.js +1 -0
- package/packages/web/dist/assets/elk-276RUBZZ-CeewBVLF.js +27 -0
- package/packages/web/dist/assets/erDiagram-OPXOYQCR-mLLYkZ5c.js +99 -0
- package/packages/web/dist/assets/flowDiagram-KWPJA3E3-DtpSpsQN.js +213 -0
- package/packages/web/dist/assets/ganttDiagram-FUAMR5RP-1_lh-3ky.js +292 -0
- package/packages/web/dist/assets/gitGraphDiagram-X574FWY7-DoPXZuT5.js +106 -0
- package/packages/web/dist/assets/graph-Bn3Yngep.js +1 -0
- package/packages/web/dist/assets/index-Cw2Opmx7.js +648 -0
- package/packages/web/dist/assets/index-j0zBRCgT.css +32 -0
- package/packages/web/dist/assets/infoDiagram-VRGFBTTK-DQpRGGiD.js +2 -0
- package/packages/web/dist/assets/ishikawaDiagram-OU5B5YK6-gH5C9Q2e.js +70 -0
- package/packages/web/dist/assets/journeyDiagram-ZHPQQLJL-Bg-oeFjb.js +139 -0
- package/packages/web/dist/assets/kanban-definition-PNTS6WVX-BnpI4VH8.js +89 -0
- package/packages/web/dist/assets/katex-C5jXJg4s.js +257 -0
- package/packages/web/dist/assets/mermaid.core-BwBKxlRA.js +313 -0
- package/packages/web/dist/assets/mindmap-definition-NLK3R4M7-NBnnxEoO.js +96 -0
- package/packages/web/dist/assets/pegDiagram-GJSIUBJH-RrXXbIvO.js +1 -0
- package/packages/web/dist/assets/pieDiagram-5QR66LMP-B27q6Gso.js +39 -0
- package/packages/web/dist/assets/quadrantDiagram-O4NWA36T-DGDsdur2.js +7 -0
- package/packages/web/dist/assets/railroadDiagram-XR7U4H2S-GdjkE3mI.js +1 -0
- package/packages/web/dist/assets/requirementDiagram-PLB6GJNP-DjK0GfgO.js +84 -0
- package/packages/web/dist/assets/sankeyDiagram-IPEJSGJF-BG_AIkwF.js +40 -0
- package/packages/web/dist/assets/scene-D4LPicHk.js +4620 -0
- package/packages/web/dist/assets/sequenceDiagram-PO4LG4MO-CIQwUb4y.js +169 -0
- package/packages/web/dist/assets/sizeCapture-INFHLROL-bpIoPxdJ.js +1 -0
- package/packages/web/dist/assets/stateDiagram-v2-GCMORJYK-8hYXvPPv.js +291 -0
- package/packages/web/dist/assets/swimlanes-2SLR337P-gfflUMF9.js +1 -0
- package/packages/web/dist/assets/swimlanesDiagram-TC7HE7FX-9wdzGXU-.js +8 -0
- package/packages/web/dist/assets/timeline-definition-EJHVYXUP-PHMNoGTZ.js +120 -0
- package/packages/web/dist/assets/usecaseDiagram-POWQR4AR-B2j5iteO.js +370 -0
- package/packages/web/dist/assets/vennDiagram-UO4OBE2U-BzxtZ-_2.js +34 -0
- package/packages/web/dist/assets/wardleyDiagram-VNRHLVJA-DL7YbMpY.js +78 -0
- package/packages/web/dist/assets/xychartDiagram-PMCCYNJV-CisgP1cT.js +7 -0
- package/packages/web/dist/draco/draco_decoder.js +33 -0
- package/packages/web/dist/draco/draco_decoder.wasm +0 -0
- package/packages/web/dist/draco/draco_wasm_wrapper.js +116 -0
- package/packages/web/dist/favicon-16.png +0 -0
- package/packages/web/dist/favicon-32.png +0 -0
- package/packages/web/dist/favicon-48.png +0 -0
- package/packages/web/dist/favicon.ico +0 -0
- package/packages/web/dist/favicon.svg +1 -1
- package/packages/web/dist/icon-192.png +0 -0
- package/packages/web/dist/icon-512.png +0 -0
- package/packages/web/dist/index.html +12 -4
- package/packages/web/dist/logo-light.svg +1 -1
- package/packages/web/dist/logo-mono.svg +2 -0
- package/packages/web/dist/logo-stacked-light.svg +2 -0
- package/packages/web/dist/logo-stacked.svg +2 -0
- package/packages/web/dist/logo-white.svg +2 -0
- package/packages/web/dist/logo.svg +1 -1
- package/packages/web/dist/mark-light.svg +1 -1
- package/packages/web/dist/mark-mono.svg +2 -0
- package/packages/web/dist/mark-small-light.svg +2 -0
- package/packages/web/dist/mark-small.svg +2 -0
- package/packages/web/dist/mark-white.svg +2 -0
- package/packages/web/dist/mark.svg +1 -1
- package/packages/web/dist/models/LICENSE.txt +5 -0
- package/packages/web/dist/models/brain.glb +0 -0
- package/packages/web/dist/site.webmanifest +23 -0
- package/packages/web/dist/wordmark-light.svg +2 -0
- package/packages/web/dist/wordmark.svg +2 -0
- package/packages/web/package.json +1 -1
- package/scripts/rookery.mjs +204 -122
- package/scripts/updater.mjs +227 -0
- package/packages/cli/dist/tui/components/Wordmark.d.ts +0 -35
- package/packages/cli/dist/tui/components/Wordmark.d.ts.map +0 -1
- package/packages/cli/dist/tui/components/Wordmark.js +0 -81
- package/packages/cli/dist/tui/components/Wordmark.js.map +0 -1
- package/packages/core/dist/agents/orchestrator.d.ts +0 -24
- package/packages/core/dist/agents/orchestrator.d.ts.map +0 -1
- package/packages/core/dist/agents/orchestrator.js +0 -88
- package/packages/core/dist/agents/orchestrator.js.map +0 -1
- package/packages/core/dist/agents/roles.d.ts +0 -21
- package/packages/core/dist/agents/roles.d.ts.map +0 -1
- package/packages/core/dist/agents/roles.js +0 -81
- package/packages/core/dist/agents/roles.js.map +0 -1
- package/packages/core/dist/agents/team.d.ts +0 -105
- package/packages/core/dist/agents/team.d.ts.map +0 -1
- package/packages/core/dist/agents/team.js +0 -623
- package/packages/core/dist/agents/team.js.map +0 -1
- package/packages/core/dist/providers/codex.d.ts +0 -10
- package/packages/core/dist/providers/codex.d.ts.map +0 -1
- package/packages/core/dist/providers/codex.js +0 -375
- package/packages/core/dist/providers/codex.js.map +0 -1
- package/packages/core/dist/tools/browser.d.ts +0 -20
- package/packages/core/dist/tools/browser.d.ts.map +0 -1
- package/packages/core/dist/tools/browser.js +0 -72
- package/packages/core/dist/tools/browser.js.map +0 -1
- package/packages/server/dist/routes/agents.d.ts +0 -5
- package/packages/server/dist/routes/agents.d.ts.map +0 -1
- package/packages/server/dist/routes/agents.js +0 -6
- package/packages/server/dist/routes/agents.js.map +0 -1
- package/packages/server/dist/routes/team.d.ts +0 -11
- package/packages/server/dist/routes/team.d.ts.map +0 -1
- package/packages/server/dist/routes/team.js +0 -36
- package/packages/server/dist/routes/team.js.map +0 -1
- package/packages/web/dist/assets/3d-force-graph-BPZmoydi.js +0 -1163
- package/packages/web/dist/assets/index-IBSTzK7-.js +0 -1255
- package/packages/web/dist/assets/index-qUXUui7W.css +0 -1
- package/packages/web/dist/assets/three-spritetext-B9ZIW7c-.js +0 -4
- package/packages/web/dist/assets/three.module-cmFfBtHS.js +0 -4228
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import { type CronTrigger, type EntityKind, type MemoryEdge, type MemoryEntity, type MemoryGraph, type MemoryKind, type MemoryNeighbourhood, type MemoryOrigin, type MemoryRecord, type MemoryRelation, type Message, type ProviderId, type Role, type Session, type SessionKind, type SleepRun, type StatsSnapshot, type TurnUsage } from '../types.js';
|
|
1
|
+
import { type CronTrigger, type DreamEpisode, type DreamEval, type DreamFrame, type DreamLabel, type DreamLabelSource, type DreamSlot, type DreamSlotFreezeReason, type DreamSlotState, type DreamTrace, type DreamTraceInput, type DreamTracePatch, type EntityKind, type FrameCorpus, type MemoryActor, type MemoryEdge, type MemoryEntity, type MemoryGraph, type MemoryKind, type MemoryNeighbourhood, type MemoryOrigin, type MemoryRecord, type MemoryRelation, type Message, type PolicyOrigin, type PolicyVersion, type ProviderId, type RecallFrame, type Role, type Session, type SessionKind, type SleepRun, type StatsSnapshot, type TurnUsage } from '../types.js';
|
|
2
2
|
import { type Db } from './db.js';
|
|
3
3
|
import { OrgStore } from '../org/store.js';
|
|
4
4
|
import { CronStore } from '../cron/store.js';
|
|
5
|
+
import { TurnJournal } from '../turns/journal.js';
|
|
5
6
|
type Row = Record<string, unknown>;
|
|
6
7
|
/** All persistence for sessions, transcripts, long-term memories, the organisation and schedules. */
|
|
7
8
|
export declare class Store {
|
|
9
|
+
#private;
|
|
8
10
|
readonly db: Db;
|
|
9
11
|
/** Companies, teams, agents, assignments and messages. */
|
|
10
12
|
readonly org: OrgStore;
|
|
11
13
|
/** Schedules and their runs. */
|
|
12
14
|
readonly cron: CronStore;
|
|
15
|
+
/** The running-turn journal: every event of a conversation turn, as it happens. */
|
|
16
|
+
readonly turns: TurnJournal;
|
|
13
17
|
constructor(pathOrDb: string | Db);
|
|
14
18
|
close(): void;
|
|
15
19
|
createSession(input: {
|
|
@@ -43,6 +47,13 @@ export declare class Store {
|
|
|
43
47
|
agent?: string;
|
|
44
48
|
usage?: TurnUsage;
|
|
45
49
|
toolCalls?: Message['toolCalls'];
|
|
50
|
+
blocks?: Message['blocks'];
|
|
51
|
+
/**
|
|
52
|
+
* The journal's turn id, when the caller has one. It is what makes a
|
|
53
|
+
* quote locatable to the exact turn it was written in (concept 9.4),
|
|
54
|
+
* instead of to a position counted off the transcript.
|
|
55
|
+
*/
|
|
56
|
+
turnId?: string;
|
|
46
57
|
}): Message;
|
|
47
58
|
/** Transcript in chronological order. `limit` keeps the most recent turns. */
|
|
48
59
|
getMessages(sessionId: string, limit?: number): Message[];
|
|
@@ -59,6 +70,8 @@ export declare class Store {
|
|
|
59
70
|
importance?: number;
|
|
60
71
|
owner?: string;
|
|
61
72
|
sourceSessionId?: string;
|
|
73
|
+
/** The quote this memory stands on, when it was extracted from one. */
|
|
74
|
+
evidence?: string;
|
|
62
75
|
/** Who is writing. `user` marks the record as protected from the night. */
|
|
63
76
|
origin?: MemoryOrigin;
|
|
64
77
|
pinned?: boolean;
|
|
@@ -68,6 +81,12 @@ export declare class Store {
|
|
|
68
81
|
/**
|
|
69
82
|
* Edit a memory in place. Used by the inspector (pin, re-word, change
|
|
70
83
|
* weight, wake it up) and by the sleep run when it retires one.
|
|
84
|
+
*
|
|
85
|
+
* `actor` says who asked for the edit (concept 4.2b, S5). It defaults to
|
|
86
|
+
* `'model'` so no existing call site changes meaning, and only `'user'`
|
|
87
|
+
* leaves a `user` label behind: pinning is the user saying "this was the
|
|
88
|
+
* point", forgetting is the user saying "this was ballast", and neither
|
|
89
|
+
* claim may be manufactured by the model's own tool.
|
|
71
90
|
*/
|
|
72
91
|
updateMemory(id: string, patch: {
|
|
73
92
|
content?: string;
|
|
@@ -80,7 +99,7 @@ export declare class Store {
|
|
|
80
99
|
supersededBy?: string | null;
|
|
81
100
|
forgotten?: boolean;
|
|
82
101
|
sleepRunId?: string | null;
|
|
83
|
-
}): MemoryRecord | null;
|
|
102
|
+
}, actor?: MemoryActor): MemoryRecord | null;
|
|
84
103
|
/**
|
|
85
104
|
* Put a memory to sleep: out of recall, still in the table and in the UI.
|
|
86
105
|
* `sleep_run_id` records the run that did it, which is what undo looks for,
|
|
@@ -124,15 +143,43 @@ export declare class Store {
|
|
|
124
143
|
live: number;
|
|
125
144
|
newest: number;
|
|
126
145
|
}[];
|
|
127
|
-
/**
|
|
128
|
-
|
|
129
|
-
|
|
146
|
+
/**
|
|
147
|
+
* Soft delete, so a wrong memory can be audited rather than vanishing.
|
|
148
|
+
*
|
|
149
|
+
* Frames quote the memories they froze verbatim, so forgetting one must
|
|
150
|
+
* reach them too (R17): never keep a wording longer than the memory it
|
|
151
|
+
* came from. The drop is owner-level because a frame is a snapshot of
|
|
152
|
+
* many rows and cannot be edited piecemeal.
|
|
153
|
+
*
|
|
154
|
+
* `actor` follows `updateMemory`: `'model'` unless the HTTP path says
|
|
155
|
+
* otherwise, and only `'user'` leaves a label (S5).
|
|
156
|
+
*/
|
|
157
|
+
forgetMemory(id: string, actor?: MemoryActor): void;
|
|
158
|
+
/**
|
|
159
|
+
* Retiring an agent (agent-performance-management, phase 4): its whole
|
|
160
|
+
* bank goes out of recall for good, but stays on the record rather than
|
|
161
|
+
* being deleted - unlike `forgetMemory`, there is no path back from this.
|
|
162
|
+
* Returns how many rows it touched, for the report.
|
|
163
|
+
*/
|
|
164
|
+
archiveMemories(owner: string): number;
|
|
165
|
+
/** See `forgetMemory` for `actor`; this path is the hard one (`?hard`). */
|
|
166
|
+
deleteMemory(id: string, actor?: MemoryActor): void;
|
|
130
167
|
/**
|
|
131
168
|
* Record that a memory was actually used. This is the only path that
|
|
132
169
|
* raises `usefulness`, and it is damped so a single busy day cannot make
|
|
133
170
|
* a memory permanent.
|
|
171
|
+
*
|
|
172
|
+
* With `ctx` the same call appends one `memory_touches` row per id as
|
|
173
|
+
* well: the counters it raises are monotone and carry no history, so the
|
|
174
|
+
* append-only record is the only place a later night could ever
|
|
175
|
+
* recompute them from (R4). Without `ctx` nothing extra is written - an
|
|
176
|
+
* unrecorded turn costs exactly what it costs today.
|
|
134
177
|
*/
|
|
135
|
-
touchMemories(ids: string[]
|
|
178
|
+
touchMemories(ids: string[], ctx?: {
|
|
179
|
+
traceId: string;
|
|
180
|
+
owner: string;
|
|
181
|
+
policyId?: string;
|
|
182
|
+
}): void;
|
|
136
183
|
memoryStats(owner?: string): {
|
|
137
184
|
total: number;
|
|
138
185
|
byKind: Record<string, number>;
|
|
@@ -187,12 +234,62 @@ export declare class Store {
|
|
|
187
234
|
recountEntity(entityId: string): void;
|
|
188
235
|
/** Recount every entity of one owner. Cheap enough to run after a night. */
|
|
189
236
|
recountEntities(owner: string): void;
|
|
237
|
+
/**
|
|
238
|
+
* Fold one entity into another: two names that mean the same real thing
|
|
239
|
+
* become one node, links and all.
|
|
240
|
+
*
|
|
241
|
+
* Links the surviving entity already holds must go first - the pair table
|
|
242
|
+
* has no room for a second row for the same memory - and memories that
|
|
243
|
+
* were covered on both sides simply keep the one link. Everything runs in
|
|
244
|
+
* one transaction, so a half-merged entity can never exist; the mention
|
|
245
|
+
* recount afterwards is the only thing that can still lag, and it is
|
|
246
|
+
* rebuilt from scratch anyway. Returns false (and changes nothing) when
|
|
247
|
+
* either side is unknown or both names are the same entity; a merge that
|
|
248
|
+
* would not hold must not cost the caller anything.
|
|
249
|
+
*/
|
|
250
|
+
mergeEntities(owner: string, fromName: string, intoName: string): boolean;
|
|
251
|
+
/**
|
|
252
|
+
* Entities of one memory, most-mentioned first. `e.id` breaks ties in
|
|
253
|
+
* `mentions`: `groupByEntity` in recall.ts keeps the first of the equal
|
|
254
|
+
* minima, so which entity that is must never depend on SQLite's internal
|
|
255
|
+
* row order.
|
|
256
|
+
*/
|
|
190
257
|
entitiesFor(memoryId: string): MemoryEntity[];
|
|
191
|
-
/**
|
|
258
|
+
/**
|
|
259
|
+
* Entities of many memories, in one query instead of one per memory. The
|
|
260
|
+
* dream recorder needs the entities of every row a frame can reach, and a
|
|
261
|
+
* per-memory call would turn one frame into dozens of statements. Per
|
|
262
|
+
* memory the order matches `entitiesFor` (mentions DESC, id ASC); a memory
|
|
263
|
+
* with no entities maps to an empty list rather than to a missing key.
|
|
264
|
+
*/
|
|
265
|
+
entitiesForMany(memoryIds: string[]): Map<string, MemoryEntity[]>;
|
|
266
|
+
/**
|
|
267
|
+
* Live memories linked to any of these entities, excluding the ones given.
|
|
268
|
+
* `owner` keeps the result inside one bank: the link table has no owner
|
|
269
|
+
* column, so without the filter a cross-owner link would read across banks.
|
|
270
|
+
*
|
|
271
|
+
* The filter lets `superseded_by` through while it drops archived rows, and
|
|
272
|
+
* that asymmetry is deliberate: `offer` in recall.ts drops superseded rows
|
|
273
|
+
* only after the LIMIT has bitten, so a caller that replays this query must
|
|
274
|
+
* see them too. This is not the gate's form - `similarMemories` there
|
|
275
|
+
* filters neither column.
|
|
276
|
+
*
|
|
277
|
+
* With `perEntity: true` the limit applies per entity instead of over the
|
|
278
|
+
* union, which is the shape the live second hop uses (one call per entity,
|
|
279
|
+
* limit 8); a single LIMIT over a bundled IN (...) call would keep the
|
|
280
|
+
* union's top N instead. In that mode a memory linked to several of the
|
|
281
|
+
* queried entities comes back once per entity, on a row carrying
|
|
282
|
+
* `hopEntityId` - that duplication is wanted, the recorder buckets the rows
|
|
283
|
+
* by entity, so do not "repair" it away with DISTINCT.
|
|
284
|
+
*/
|
|
192
285
|
memoriesForEntities(entityIds: string[], options?: {
|
|
286
|
+
owner?: string;
|
|
193
287
|
exclude?: string[];
|
|
194
288
|
limit?: number;
|
|
195
|
-
|
|
289
|
+
perEntity?: boolean;
|
|
290
|
+
}): (MemoryRecord & {
|
|
291
|
+
hopEntityId?: string;
|
|
292
|
+
})[];
|
|
196
293
|
/**
|
|
197
294
|
* Draw a relation between two memories. The same triple is never stored
|
|
198
295
|
* twice; a repeat raises the weight instead.
|
|
@@ -224,6 +321,135 @@ export declare class Store {
|
|
|
224
321
|
includeDormant?: boolean;
|
|
225
322
|
limit?: number;
|
|
226
323
|
}): MemoryGraph;
|
|
324
|
+
/**
|
|
325
|
+
* Conversations that moved since `since`, newest first.
|
|
326
|
+
*
|
|
327
|
+
* Mail and cron-run sessions are left out on purpose: those are the
|
|
328
|
+
* assistant answering a mail or carrying out a schedule with nobody on the
|
|
329
|
+
* other end, so there is no user in them to quote, and the evidence rule
|
|
330
|
+
* would throw away everything they yielded anyway. Archived ones are out
|
|
331
|
+
* for the same reason they are out of the list - the user put them away.
|
|
332
|
+
*/
|
|
333
|
+
sessionsActiveSince(since: number, limit?: number): Session[];
|
|
334
|
+
/**
|
|
335
|
+
* Record that the user put something right.
|
|
336
|
+
*
|
|
337
|
+
* Kept apart from memories because it is not a fact about the user, it is
|
|
338
|
+
* evidence about the system: something written down is wrong. The revision
|
|
339
|
+
* pass consumes these; nothing else reads them.
|
|
340
|
+
*
|
|
341
|
+
* `turnId` is what the correction label hangs on (concept 4.2a, S3): the
|
|
342
|
+
* turn the quote was located in, or absent when the quote could not be
|
|
343
|
+
* pinned to exactly one turn. Absent is a real answer here - a guessed
|
|
344
|
+
* turn is worse than no turn, because the label would then claim
|
|
345
|
+
* something about a turn that never carried the quote.
|
|
346
|
+
*/
|
|
347
|
+
addCorrection(input: {
|
|
348
|
+
owner: string;
|
|
349
|
+
text: string;
|
|
350
|
+
quote: string;
|
|
351
|
+
sessionId?: string;
|
|
352
|
+
turnId?: string;
|
|
353
|
+
}): void;
|
|
354
|
+
/** Corrections no revision pass has looked at yet, oldest first. */
|
|
355
|
+
openCorrections(owner: string, limit?: number): {
|
|
356
|
+
id: string;
|
|
357
|
+
text: string;
|
|
358
|
+
quote: string;
|
|
359
|
+
}[];
|
|
360
|
+
/**
|
|
361
|
+
* Mark corrections as looked at. Not removed: a correction is a fact about
|
|
362
|
+
* what happened, and the record of it outlives the repair it caused.
|
|
363
|
+
*/
|
|
364
|
+
consumeCorrections(ids: string[]): void;
|
|
365
|
+
/**
|
|
366
|
+
* Corrections of one owner written since `since`, consumed or not.
|
|
367
|
+
*
|
|
368
|
+
* `openCorrections` is the revision pass's reader and deliberately hides
|
|
369
|
+
* everything a pass has already looked at. The label writer needs the
|
|
370
|
+
* other view: a correction stays evidence about its turn long after the
|
|
371
|
+
* repair it caused, and the night that writes labels is not the night
|
|
372
|
+
* that consumed it.
|
|
373
|
+
*/
|
|
374
|
+
correctionsSince(owner: string, since: number, limit?: number): {
|
|
375
|
+
id: string;
|
|
376
|
+
text: string;
|
|
377
|
+
quote: string;
|
|
378
|
+
sessionId?: string;
|
|
379
|
+
turnId?: string;
|
|
380
|
+
createdAt: number;
|
|
381
|
+
}[];
|
|
382
|
+
/**
|
|
383
|
+
* Note that a skill was opened.
|
|
384
|
+
*
|
|
385
|
+
* On its own this is a usage counter. Joined against the assignment it was
|
|
386
|
+
* opened in, it becomes the only thing that can say a written procedure is
|
|
387
|
+
* actually wrong: the run that followed it failed, and the error text is
|
|
388
|
+
* right there to hand to the rewrite.
|
|
389
|
+
*/
|
|
390
|
+
recordSkillUse(input: {
|
|
391
|
+
skill: string;
|
|
392
|
+
owner: string;
|
|
393
|
+
assignmentId?: string;
|
|
394
|
+
sessionId?: string;
|
|
395
|
+
}): void;
|
|
396
|
+
/** The memories a distilled skill stands on. Replaces whatever was there. */
|
|
397
|
+
setSkillSources(skill: string, owner: string, memoryIds: string[]): void;
|
|
398
|
+
/** The memory ids a skill currently stands on. */
|
|
399
|
+
skillSourceIds(skill: string): string[];
|
|
400
|
+
/**
|
|
401
|
+
* The ground under a skill, where it has moved since `since`.
|
|
402
|
+
*
|
|
403
|
+
* Three ways a source memory stops supporting what stands on it: the night
|
|
404
|
+
* put it to sleep, the night decided a contradiction against it and filed
|
|
405
|
+
* it away behind a winner, or somebody edited it. All three mean the same
|
|
406
|
+
* thing to the skill above - what it was written from no longer reads the
|
|
407
|
+
* way it did.
|
|
408
|
+
*/
|
|
409
|
+
changedSkillSources(skill: string, since: number): {
|
|
410
|
+
memory: MemoryRecord;
|
|
411
|
+
replacement: MemoryRecord | null;
|
|
412
|
+
}[];
|
|
413
|
+
/**
|
|
414
|
+
* Runs that failed with this skill open, newest first.
|
|
415
|
+
*
|
|
416
|
+
* The error text matters more than the count. "That the run failed" says
|
|
417
|
+
* only that something is wrong somewhere; "npm run build:core: no such
|
|
418
|
+
* script" says which line of the skill is lying.
|
|
419
|
+
*/
|
|
420
|
+
failedRunsForSkill(skill: string, since: number, limit?: number): {
|
|
421
|
+
task: string;
|
|
422
|
+
error: string;
|
|
423
|
+
}[];
|
|
424
|
+
/**
|
|
425
|
+
* Keep the file as it reads right now, before something unattended
|
|
426
|
+
* overwrites it. `content` is null when the skill does not exist yet, which
|
|
427
|
+
* is how undo knows to delete the folder rather than restore text.
|
|
428
|
+
*/
|
|
429
|
+
snapshotSkill(input: {
|
|
430
|
+
skill: string;
|
|
431
|
+
content: string | null;
|
|
432
|
+
sleepRunId?: string;
|
|
433
|
+
}): void;
|
|
434
|
+
/**
|
|
435
|
+
* When the night last looked at this skill, revision or not.
|
|
436
|
+
*
|
|
437
|
+
* Without it a trigger never clears. A source memory that went dormant
|
|
438
|
+
* stays dormant, so a skill standing on it would be dragged in front of the
|
|
439
|
+
* model every single night, and a night that decided "this still reads
|
|
440
|
+
* fine" would decide it again tomorrow at the same cost. Looking counts,
|
|
441
|
+
* which is why a review that changed nothing still leaves a snapshot.
|
|
442
|
+
*/
|
|
443
|
+
lastSkillReviewAt(skill: string): number;
|
|
444
|
+
/**
|
|
445
|
+
* What the skills of one night looked like before it touched them, oldest
|
|
446
|
+
* snapshot first - so a caller that keeps the first entry per name gets the
|
|
447
|
+
* state as it stood before the night began, even if a run wrote twice.
|
|
448
|
+
*/
|
|
449
|
+
skillVersionsForRun(runId: string): {
|
|
450
|
+
skill: string;
|
|
451
|
+
content: string | null;
|
|
452
|
+
}[];
|
|
227
453
|
createSleepRun(input: {
|
|
228
454
|
owner: string;
|
|
229
455
|
trigger: CronTrigger;
|
|
@@ -234,18 +460,346 @@ export declare class Store {
|
|
|
234
460
|
owner?: string;
|
|
235
461
|
limit?: number;
|
|
236
462
|
}): SleepRun[];
|
|
463
|
+
/**
|
|
464
|
+
* Sleep runs still marked running from a previous process are failed on
|
|
465
|
+
* startup, mirroring `CronStore.failStaleRuns` (cron/store.ts) and
|
|
466
|
+
* `OrgStore.failStaleAssignments`/`failStaleTasks` (org/store.ts). Returns
|
|
467
|
+
* the rows it changed so the caller can announce them.
|
|
468
|
+
*/
|
|
469
|
+
failStaleSleepRuns(reason: string): SleepRun[];
|
|
237
470
|
/** When this owner last finished a night. Drives "what is new since then". */
|
|
238
471
|
lastSleepAt(owner: string): number;
|
|
239
472
|
/**
|
|
240
473
|
* Take back one night, in a single transaction: the memories the run wrote
|
|
241
|
-
* are deleted, everything it put to sleep wakes up, and its edges go.
|
|
242
|
-
*
|
|
474
|
+
* are deleted, everything it put to sleep wakes up, and its edges go. The
|
|
475
|
+
* frames go with them - they quote the deleted rows verbatim, and the drop
|
|
476
|
+
* is the same owner-level mechanics the other memory delete paths use
|
|
477
|
+
* (R17). This is what makes an unattended nightly process acceptable at
|
|
478
|
+
* all.
|
|
479
|
+
*
|
|
480
|
+
* The night's promotions come back with them (concept 10.4, S25): a
|
|
481
|
+
* policy version is as much a product of the night as an insight is, and
|
|
482
|
+
* a night that cannot be taken back in full is not undoable.
|
|
243
483
|
*/
|
|
244
484
|
undoSleepRun(id: string): {
|
|
245
485
|
woken: number;
|
|
246
486
|
removed: number;
|
|
247
487
|
edges: number;
|
|
488
|
+
policies: number;
|
|
248
489
|
} | null;
|
|
490
|
+
/**
|
|
491
|
+
* Every write of one framed turn runs inside this bracket: trace, frame
|
|
492
|
+
* and touches are one transaction, or none of them are.
|
|
493
|
+
*
|
|
494
|
+
* A SAVEPOINT rather than a hand-rolled BEGIN (R9): the store runs its
|
|
495
|
+
* own transactions over raw `exec`, and a bare nested BEGIN throws
|
|
496
|
+
* exactly when the recorder happens to run inside one of them. A
|
|
497
|
+
* savepoint nests by construction, so no "am I inside" flag is needed -
|
|
498
|
+
* that flag is the thing that silently rots the next time someone adds
|
|
499
|
+
* a transactional procedure. A throw inside the bracket rolls the whole
|
|
500
|
+
* turn back and propagates, so the caller still sees the recorder error.
|
|
501
|
+
*/
|
|
502
|
+
recordDreamTurn(write: () => void): void;
|
|
503
|
+
/** Open one trace per recall call; the turn groups them under `turnId` (R19). */
|
|
504
|
+
beginTrace(input: DreamTraceInput): DreamTrace;
|
|
505
|
+
/**
|
|
506
|
+
* Close a trace. `degraded` is the one closable fact, and an explicit
|
|
507
|
+
* `null` is a real value ("the call did not degrade"), never a default:
|
|
508
|
+
* "rows came but all fell below the threshold" is a legitimate miss that
|
|
509
|
+
* must stay scoreable.
|
|
510
|
+
*/
|
|
511
|
+
finishTrace(id: string, patch: DreamTracePatch): void;
|
|
512
|
+
/**
|
|
513
|
+
* Traces still open from a previous process are closed on startup, after
|
|
514
|
+
* the pattern of `failStaleSleepRuns` - deliberately without an owner or
|
|
515
|
+
* PID filter, and with the same reservation. The reason reaches the
|
|
516
|
+
* caller's log line rather than the row: `dream_traces` carries no error
|
|
517
|
+
* column on purpose, because the "unfinished" abstention is derived from
|
|
518
|
+
* `finished_at` itself at scoring time. Returns how many traces closed.
|
|
519
|
+
*/
|
|
520
|
+
failStaleTraces(reason: string): number;
|
|
521
|
+
/** Traces without `finished_at`: what a restart owes its closing pass to. */
|
|
522
|
+
openTraces(): DreamTrace[];
|
|
523
|
+
/**
|
|
524
|
+
* Persist one frame for one slot of a trace. Serialise first, measure
|
|
525
|
+
* second: the cap guards stored bytes, so it is the serialised payload
|
|
526
|
+
* that is measured, and a frame over the cap is refused with `false`
|
|
527
|
+
* rather than thrown at the turn - the trace is closed without a frame
|
|
528
|
+
* and the night simply never scores that turn.
|
|
529
|
+
*
|
|
530
|
+
* The Store holds no config, so the caller reads `dream.maxFrameBytes`
|
|
531
|
+
* (key table, E21: clamped where it is read) and passes it; the default
|
|
532
|
+
* here is the shipped value. A payload that cannot be serialised at all
|
|
533
|
+
* is a recorder error and propagates - the bracket around the turn
|
|
534
|
+
* takes care of the half-written state.
|
|
535
|
+
*/
|
|
536
|
+
saveFrame(traceId: string, slot: string, frame: RecallFrame, options?: {
|
|
537
|
+
maxFrameBytes?: number;
|
|
538
|
+
}): boolean;
|
|
539
|
+
/**
|
|
540
|
+
* Append one touch row per memory id. Deliberately append-only (R4):
|
|
541
|
+
* two touches of the same (trace, memory) are two rows, because the
|
|
542
|
+
* record exists to make the historyless counters reconstructable, not
|
|
543
|
+
* to dedupe them.
|
|
544
|
+
*/
|
|
545
|
+
recordTouches(traceId: string, owner: string, ids: string[], policyId?: string): void;
|
|
546
|
+
/**
|
|
547
|
+
* The night's read path: stored frames of one owner with their traces.
|
|
548
|
+
* Oldest first with (trace, slot) as the tiebreaker, so the probe walks
|
|
549
|
+
* a deterministic order; `since` selects on the frame's own creation.
|
|
550
|
+
*
|
|
551
|
+
* `newest` says WHICH end the limit cuts from, never which order comes
|
|
552
|
+
* back: the rows are handed over oldest first either way, so the last
|
|
553
|
+
* entry is always the newest one and every caller that reads a box or a
|
|
554
|
+
* trailing slice off the tail keeps reading the same thing. Without it a
|
|
555
|
+
* limited pool is the OLDEST rows, and a reader that means "since the
|
|
556
|
+
* last promotion" or "the newest slice" goes structurally dead the moment
|
|
557
|
+
* an owner holds more frames than the cap - it is pinned to a
|
|
558
|
+
* weeks-old slice for good. The default stays oldest, because the grid
|
|
559
|
+
* probe walks and reports exactly that pool.
|
|
560
|
+
*/
|
|
561
|
+
framesFor(owner: string, options?: {
|
|
562
|
+
since?: number;
|
|
563
|
+
limit?: number;
|
|
564
|
+
newest?: boolean;
|
|
565
|
+
}): {
|
|
566
|
+
trace: DreamTrace;
|
|
567
|
+
frame: DreamFrame;
|
|
568
|
+
}[];
|
|
569
|
+
/**
|
|
570
|
+
* How many stored frames one owner has, regardless of any pool limit.
|
|
571
|
+
* `framesFor` walks a capped pool from one end or the other, so every
|
|
572
|
+
* reader that can hit the cap reports this count beside the pool it
|
|
573
|
+
* actually read - a measurement over half the frames must be visible as
|
|
574
|
+
* one, not pass silently.
|
|
575
|
+
*/
|
|
576
|
+
dreamFrameCount(owner: string): number;
|
|
577
|
+
/**
|
|
578
|
+
* Delete frames older than `before`, in batches that each own their
|
|
579
|
+
* transaction. With foreign keys on, deleting a trace cascades its
|
|
580
|
+
* frames and touches inside the same statement, and an unbounded sweep
|
|
581
|
+
* would be one long exclusive write lock on the only connection. The
|
|
582
|
+
* WAL is truncated afterwards so a nightly sweep actually returns space
|
|
583
|
+
* to the filesystem instead of growing the file forever. Night-side by
|
|
584
|
+
* design: the per-batch BEGIN must never run inside another
|
|
585
|
+
* transaction.
|
|
586
|
+
*/
|
|
587
|
+
sweepDreamFrames(before: number): number;
|
|
588
|
+
/**
|
|
589
|
+
* Delete traces older than `before` (their frames and touches cascade),
|
|
590
|
+
* batched like `sweepDreamFrames` and for the same reasons.
|
|
591
|
+
*/
|
|
592
|
+
sweepDreamTraces(before: number): number;
|
|
593
|
+
/**
|
|
594
|
+
* The delete paths of R17: a frame is a verbatim store, so it may never
|
|
595
|
+
* outlive the memories or the session it came from. Owner and session
|
|
596
|
+
* sit on the frame as their own columns precisely so these paths never
|
|
597
|
+
* have to read the payload. `Assistant.deleteSession` calls the session
|
|
598
|
+
* variant; the three memory-retiring methods call the owner one.
|
|
599
|
+
*/
|
|
600
|
+
dropDreamFramesForOwner(owner: string): number;
|
|
601
|
+
/** See `dropDreamFramesForOwner`. */
|
|
602
|
+
dropDreamFramesForSession(sessionId: string): number;
|
|
603
|
+
/**
|
|
604
|
+
* The document-frequency fingerprint of the corpus, over exactly the
|
|
605
|
+
* tokens the frames of one night use (R10). bm25 is frozen in the frame
|
|
606
|
+
* and can never be revalidated, so the corpus is the only observable
|
|
607
|
+
* that correlates with a frame going stale - and the vocabulary scan
|
|
608
|
+
* walks the whole index, which is why this runs once per night in the
|
|
609
|
+
* probe and never inside a turn. The result is cached in `meta` under
|
|
610
|
+
* its own id; turns stamp only that id onto their frames.
|
|
611
|
+
*/
|
|
612
|
+
corpusFingerprint(owner: string, tokens: string[]): FrameCorpus;
|
|
613
|
+
/**
|
|
614
|
+
* Retention for the stamp rows: one is written per night and nothing ever
|
|
615
|
+
* removed them, so `meta` grew a full df map per night without bound. A
|
|
616
|
+
* stamp is only ever read through a frame's `corpus_stamp_id` or the
|
|
617
|
+
* current pointer, so a stamp of this owner that no frame cites and that
|
|
618
|
+
* is not the fresh one is dead the moment the pointer moves. Corrupt rows
|
|
619
|
+
* are left alone - a row nothing can parse certifies nothing either way,
|
|
620
|
+
* and this method never throws into the night.
|
|
621
|
+
*/
|
|
622
|
+
pruneCorpusStamps(owner: string, keepId: string): void;
|
|
623
|
+
/**
|
|
624
|
+
* The stamp a turn should carry: the newest fingerprint of this owner.
|
|
625
|
+
* A meta read and nothing more - computing here would drag the
|
|
626
|
+
* vocabulary scan into the turn. Null until the first night has stamped
|
|
627
|
+
* one, and null for a corrupted row rather than a throw: a stamp that
|
|
628
|
+
* cannot be read simply does not certify anything.
|
|
629
|
+
*/
|
|
630
|
+
currentCorpusStamp(owner: string): FrameCorpus | null;
|
|
631
|
+
/**
|
|
632
|
+
* Write one label; see `putLabels`.
|
|
633
|
+
*/
|
|
634
|
+
putLabel(label: DreamLabel): void;
|
|
635
|
+
/**
|
|
636
|
+
* Write a batch of labels, returning how many rows went in - that count is
|
|
637
|
+
* the run's `dreamLabelsWritten`.
|
|
638
|
+
*
|
|
639
|
+
* `(turn_id, target, source)` is the key, so one source re-stating its
|
|
640
|
+
* claim about the same target in the same turn replaces its own row
|
|
641
|
+
* instead of stacking a second one. A contradiction BETWEEN two sources
|
|
642
|
+
* keeps both rows, which is exactly what makes it countable rather than
|
|
643
|
+
* silently overwritten (concept 4.1, S2).
|
|
644
|
+
*
|
|
645
|
+
* A session-scoped label carries the SESSION id in `turn_id`: the column
|
|
646
|
+
* is NOT NULL and part of the key, and `scope` is what says which of the
|
|
647
|
+
* two a row holds (the comment AP1 left on the table).
|
|
648
|
+
*/
|
|
649
|
+
putLabels(labels: DreamLabel[]): number;
|
|
650
|
+
/**
|
|
651
|
+
* Labels of these turns, oldest first. `owner` is optional because a turn
|
|
652
|
+
* id already belongs to exactly one owner; the paths that have it to hand
|
|
653
|
+
* pass it, so the filter is in the SQL where 10.5 wants it.
|
|
654
|
+
*/
|
|
655
|
+
labelsForTurns(turnIds: string[], owner?: string): DreamLabel[];
|
|
656
|
+
/**
|
|
657
|
+
* The session-scoped labels of these sessions - the unlocatable quote
|
|
658
|
+
* (4.2a) and the user's edits (4.2b) both land here. Selected on
|
|
659
|
+
* `turn_id`, not on `session_id`: for `scope = 'session'` the turn column
|
|
660
|
+
* is where the session id lives, and it is the only one guaranteed to be
|
|
661
|
+
* filled.
|
|
662
|
+
*/
|
|
663
|
+
labelsForSessions(sessionIds: string[], owner?: string): DreamLabel[];
|
|
664
|
+
/**
|
|
665
|
+
* Mark every label about one memory dead (S9). The row stays: what it
|
|
666
|
+
* claims about the turns it was written for is still true, and the label
|
|
667
|
+
* history is calibration material. Without this, a deleted memory would
|
|
668
|
+
* drag `reachable_rate` down for a reason that has nothing to do with
|
|
669
|
+
* labelling and invalidate the evaluation from the wrong end (8.3).
|
|
670
|
+
*/
|
|
671
|
+
markLabelsDead(memoryId: string, at?: number): number;
|
|
672
|
+
/** `markLabelsDead` for a whole bank at once - the archive path (S9). */
|
|
673
|
+
markOwnerLabelsDead(owner: string, at?: number): number;
|
|
674
|
+
/**
|
|
675
|
+
* How many labels of each source this owner gained since `since` - the
|
|
676
|
+
* supply side of 4.5, and what the night reports. Counted on creation, so
|
|
677
|
+
* a label that has since gone dead still counts: it was written, and the
|
|
678
|
+
* question here is how much a window actually produces.
|
|
679
|
+
*/
|
|
680
|
+
labelCounts(owner: string, since: number): Record<DreamLabelSource, number>;
|
|
681
|
+
/** Retention for the label table (`dream.retainDays`), batched like the frames. */
|
|
682
|
+
sweepDreamLabels(before: number): number;
|
|
683
|
+
/**
|
|
684
|
+
* Write a new, unpromoted policy version. The version number is the next
|
|
685
|
+
* one for this `(owner, slot)`; the unique index is what makes that a
|
|
686
|
+
* constraint rather than a hope.
|
|
687
|
+
*/
|
|
688
|
+
createPolicyVersion(input: {
|
|
689
|
+
owner: string;
|
|
690
|
+
slot: DreamSlot;
|
|
691
|
+
params: Record<string, unknown>;
|
|
692
|
+
box: Record<string, unknown>;
|
|
693
|
+
origin: PolicyOrigin;
|
|
694
|
+
parentId?: string;
|
|
695
|
+
sleepRunId?: string;
|
|
696
|
+
rationale?: string;
|
|
697
|
+
replayScore?: number;
|
|
698
|
+
replayN?: number;
|
|
699
|
+
baselineScore?: number;
|
|
700
|
+
auditDelta?: number;
|
|
701
|
+
auditCiLow?: number;
|
|
702
|
+
}): PolicyVersion;
|
|
703
|
+
policyVersion(id: string): PolicyVersion | null;
|
|
704
|
+
/**
|
|
705
|
+
* The version the resolver lays over the defaults: promoted, not retired,
|
|
706
|
+
* highest version. Null until the first promotion, which is the whole of
|
|
707
|
+
* today's behaviour (AP10 reads this).
|
|
708
|
+
*/
|
|
709
|
+
activePolicy(owner: string, slot: DreamSlot): PolicyVersion | null;
|
|
710
|
+
/** Newest version first - the version curve and the history drawer. */
|
|
711
|
+
policyHistory(owner: string, slot: DreamSlot, limit?: number): PolicyVersion[];
|
|
712
|
+
/**
|
|
713
|
+
* Put one version in charge. `prevActiveId` is what was active at that
|
|
714
|
+
* moment (8.5) - it is stored on the new row AND retired in the same
|
|
715
|
+
* breath, because a revert or a night's undo has nothing to bring back
|
|
716
|
+
* otherwise. Undefined means "nothing was active", the way `snapshotSkill`
|
|
717
|
+
* records a skill that did not exist yet.
|
|
718
|
+
*/
|
|
719
|
+
promotePolicyVersion(id: string, options?: {
|
|
720
|
+
prevActiveId?: string;
|
|
721
|
+
sleepRunId?: string;
|
|
722
|
+
at?: number;
|
|
723
|
+
}): PolicyVersion | null;
|
|
724
|
+
retirePolicyVersion(id: string, at?: number): void;
|
|
725
|
+
/** The other half of a revert: the version `prev_active_id` points at. */
|
|
726
|
+
reactivatePolicyVersion(id: string): void;
|
|
727
|
+
/**
|
|
728
|
+
* What the wake test actually read, written back next to what the
|
|
729
|
+
* promotion promised (concept 5.5c).
|
|
730
|
+
*
|
|
731
|
+
* `replay_score` is the claim a version was promoted on; `online_score` is
|
|
732
|
+
* the same quantity measured again, live, once `dream.calibrationTraces`
|
|
733
|
+
* frames have accumulated since the promotion. The night computes that
|
|
734
|
+
* drift and freezes the slot on it, but until this setter existed it had
|
|
735
|
+
* nowhere to put the number it had just read - the column was written by
|
|
736
|
+
* nothing, so the one reading that could tell a person "the promise held"
|
|
737
|
+
* survived only inside the night's own report sentence.
|
|
738
|
+
*/
|
|
739
|
+
setPolicyOnlineScore(id: string, score: number): void;
|
|
740
|
+
/**
|
|
741
|
+
* Freeze state and cooldown clock of one slot. A slot with no row has
|
|
742
|
+
* never been promoted and is not frozen, which is a state, not a gap - so
|
|
743
|
+
* this returns a record rather than null and the callers stay free of a
|
|
744
|
+
* null check that only ever means "the defaults".
|
|
745
|
+
*/
|
|
746
|
+
slotState(owner: string, slot: DreamSlot): DreamSlotState;
|
|
747
|
+
/** One of the four causes of 10.3. A frozen slot keeps measuring, never promotes. */
|
|
748
|
+
freezeSlot(owner: string, slot: DreamSlot, reason: DreamSlotFreezeReason, at?: number): void;
|
|
749
|
+
/** Thawing is a person's decision; nothing in the night calls this. */
|
|
750
|
+
thawSlot(owner: string, slot: DreamSlot): void;
|
|
751
|
+
setSlotCooldown(owner: string, slot: DreamSlot, until: number): void;
|
|
752
|
+
/**
|
|
753
|
+
* Record one candidate evaluation. Written whether or not it promoted:
|
|
754
|
+
* the night that measures and does not promote is the common case, and
|
|
755
|
+
* the record of it is what the calibration and the report stand on.
|
|
756
|
+
*/
|
|
757
|
+
recordDreamEval(input: Omit<DreamEval, 'id' | 'createdAt'> & {
|
|
758
|
+
id?: string;
|
|
759
|
+
createdAt?: number;
|
|
760
|
+
}): DreamEval;
|
|
761
|
+
/**
|
|
762
|
+
* Evaluations, newest first. `dream_evals` carries no owner of its own,
|
|
763
|
+
* so the owner filter goes through the join to `policy_versions` - in SQL
|
|
764
|
+
* and again in JS, because that is exactly the kind of join 10.5 is about.
|
|
765
|
+
*/
|
|
766
|
+
listDreamEvals(filter?: {
|
|
767
|
+
owner?: string;
|
|
768
|
+
slot?: DreamSlot;
|
|
769
|
+
sleepRunId?: string;
|
|
770
|
+
policyId?: string;
|
|
771
|
+
promoted?: boolean;
|
|
772
|
+
limit?: number;
|
|
773
|
+
}): DreamEval[];
|
|
774
|
+
/**
|
|
775
|
+
* The trace set the last promotion of this slot stood on. The promotion
|
|
776
|
+
* gate requires the next one to be disjoint from it, so a candidate cannot
|
|
777
|
+
* be promoted twice off the same evidence.
|
|
778
|
+
*/
|
|
779
|
+
lastPromotedTraceSetHash(owner: string, slot: DreamSlot): string | null;
|
|
780
|
+
/** Retention for the evaluation table (`dream.retainDays`). */
|
|
781
|
+
sweepDreamEvals(before: number): number;
|
|
782
|
+
/**
|
|
783
|
+
* Index one episode over the existing turn journal. `id` is the id of the
|
|
784
|
+
* `turns` or `assignments` row it indexes, so re-indexing the same episode
|
|
785
|
+
* replaces its row instead of doubling it - this table is an index, never
|
|
786
|
+
* a second transcript store.
|
|
787
|
+
*/
|
|
788
|
+
recordDreamEpisode(input: Omit<DreamEpisode, 'createdAt'> & {
|
|
789
|
+
createdAt?: number;
|
|
790
|
+
}): DreamEpisode;
|
|
791
|
+
/** Episodes of one owner, newest first; `holdout`/`audit` select a split. */
|
|
792
|
+
dreamEpisodes(owner: string, options?: {
|
|
793
|
+
holdout?: boolean;
|
|
794
|
+
audit?: boolean;
|
|
795
|
+
limit?: number;
|
|
796
|
+
}): DreamEpisode[];
|
|
797
|
+
/**
|
|
798
|
+
* Retention for the episode index. It follows `dream.frameRetainDays`, not
|
|
799
|
+
* `dream.retainDays`: an episode points straight at journal rows that hold
|
|
800
|
+
* verbatim text, and no wording outlives the memory it came from (S21).
|
|
801
|
+
*/
|
|
802
|
+
sweepDreamEpisodes(before: number): number;
|
|
249
803
|
getMeta(key: string): string | null;
|
|
250
804
|
setMeta(key: string, value: string): void;
|
|
251
805
|
deleteMeta(key: string): void;
|