rookery-agent 0.1.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/LICENSE +21 -0
- package/README.md +367 -0
- package/docs/migration.md +88 -0
- package/package.json +39 -0
- package/packages/cli/dist/commands/chat.d.ts +52 -0
- package/packages/cli/dist/commands/chat.d.ts.map +1 -0
- package/packages/cli/dist/commands/chat.js +107 -0
- package/packages/cli/dist/commands/chat.js.map +1 -0
- package/packages/cli/dist/commands/config.d.ts +12 -0
- package/packages/cli/dist/commands/config.d.ts.map +1 -0
- package/packages/cli/dist/commands/config.js +156 -0
- package/packages/cli/dist/commands/config.js.map +1 -0
- package/packages/cli/dist/commands/doctor.d.ts +12 -0
- package/packages/cli/dist/commands/doctor.d.ts.map +1 -0
- package/packages/cli/dist/commands/doctor.js +137 -0
- package/packages/cli/dist/commands/doctor.js.map +1 -0
- package/packages/cli/dist/commands/memory.d.ts +34 -0
- package/packages/cli/dist/commands/memory.d.ts.map +1 -0
- package/packages/cli/dist/commands/memory.js +133 -0
- package/packages/cli/dist/commands/memory.js.map +1 -0
- package/packages/cli/dist/commands/org.d.ts +93 -0
- package/packages/cli/dist/commands/org.d.ts.map +1 -0
- package/packages/cli/dist/commands/org.js +389 -0
- package/packages/cli/dist/commands/org.js.map +1 -0
- package/packages/cli/dist/commands/serve.d.ts +13 -0
- package/packages/cli/dist/commands/serve.d.ts.map +1 -0
- package/packages/cli/dist/commands/serve.js +100 -0
- package/packages/cli/dist/commands/serve.js.map +1 -0
- package/packages/cli/dist/commands/sessions.d.ts +18 -0
- package/packages/cli/dist/commands/sessions.d.ts.map +1 -0
- package/packages/cli/dist/commands/sessions.js +88 -0
- package/packages/cli/dist/commands/sessions.js.map +1 -0
- package/packages/cli/dist/commands/shared.d.ts +59 -0
- package/packages/cli/dist/commands/shared.d.ts.map +1 -0
- package/packages/cli/dist/commands/shared.js +230 -0
- package/packages/cli/dist/commands/shared.js.map +1 -0
- package/packages/cli/dist/commands/tasks.d.ts +62 -0
- package/packages/cli/dist/commands/tasks.d.ts.map +1 -0
- package/packages/cli/dist/commands/tasks.js +262 -0
- package/packages/cli/dist/commands/tasks.js.map +1 -0
- package/packages/cli/dist/commands/tools.d.ts +8 -0
- package/packages/cli/dist/commands/tools.d.ts.map +1 -0
- package/packages/cli/dist/commands/tools.js +65 -0
- package/packages/cli/dist/commands/tools.js.map +1 -0
- package/packages/cli/dist/index.d.ts +15 -0
- package/packages/cli/dist/index.d.ts.map +1 -0
- package/packages/cli/dist/index.js +513 -0
- package/packages/cli/dist/index.js.map +1 -0
- package/packages/cli/dist/repl.d.ts +29 -0
- package/packages/cli/dist/repl.d.ts.map +1 -0
- package/packages/cli/dist/repl.js +634 -0
- package/packages/cli/dist/repl.js.map +1 -0
- package/packages/cli/dist/tui/App.d.ts +51 -0
- package/packages/cli/dist/tui/App.d.ts.map +1 -0
- package/packages/cli/dist/tui/App.js +461 -0
- package/packages/cli/dist/tui/App.js.map +1 -0
- package/packages/cli/dist/tui/commands.d.ts +34 -0
- package/packages/cli/dist/tui/commands.d.ts.map +1 -0
- package/packages/cli/dist/tui/commands.js +367 -0
- package/packages/cli/dist/tui/commands.js.map +1 -0
- package/packages/cli/dist/tui/components/ActivityLine.d.ts +16 -0
- package/packages/cli/dist/tui/components/ActivityLine.d.ts.map +1 -0
- package/packages/cli/dist/tui/components/ActivityLine.js +7 -0
- package/packages/cli/dist/tui/components/ActivityLine.js.map +1 -0
- package/packages/cli/dist/tui/components/AssignmentsView.d.ts +31 -0
- package/packages/cli/dist/tui/components/AssignmentsView.d.ts.map +1 -0
- package/packages/cli/dist/tui/components/AssignmentsView.js +79 -0
- package/packages/cli/dist/tui/components/AssignmentsView.js.map +1 -0
- package/packages/cli/dist/tui/components/Banner.d.ts +18 -0
- package/packages/cli/dist/tui/components/Banner.d.ts.map +1 -0
- package/packages/cli/dist/tui/components/Banner.js +16 -0
- package/packages/cli/dist/tui/components/Banner.js.map +1 -0
- package/packages/cli/dist/tui/components/CodeBlock.d.ts +19 -0
- package/packages/cli/dist/tui/components/CodeBlock.d.ts.map +1 -0
- package/packages/cli/dist/tui/components/CodeBlock.js +21 -0
- package/packages/cli/dist/tui/components/CodeBlock.js.map +1 -0
- package/packages/cli/dist/tui/components/InputBox.d.ts +25 -0
- package/packages/cli/dist/tui/components/InputBox.d.ts.map +1 -0
- package/packages/cli/dist/tui/components/InputBox.js +35 -0
- package/packages/cli/dist/tui/components/InputBox.js.map +1 -0
- package/packages/cli/dist/tui/components/Markdown.d.ts +74 -0
- package/packages/cli/dist/tui/components/Markdown.d.ts.map +1 -0
- package/packages/cli/dist/tui/components/Markdown.js +293 -0
- package/packages/cli/dist/tui/components/Markdown.js.map +1 -0
- package/packages/cli/dist/tui/components/Message.d.ts +29 -0
- package/packages/cli/dist/tui/components/Message.d.ts.map +1 -0
- package/packages/cli/dist/tui/components/Message.js +28 -0
- package/packages/cli/dist/tui/components/Message.js.map +1 -0
- package/packages/cli/dist/tui/components/Scrollback.d.ts +23 -0
- package/packages/cli/dist/tui/components/Scrollback.d.ts.map +1 -0
- package/packages/cli/dist/tui/components/Scrollback.js +36 -0
- package/packages/cli/dist/tui/components/Scrollback.js.map +1 -0
- package/packages/cli/dist/tui/components/SlashPalette.d.ts +17 -0
- package/packages/cli/dist/tui/components/SlashPalette.d.ts.map +1 -0
- package/packages/cli/dist/tui/components/SlashPalette.js +19 -0
- package/packages/cli/dist/tui/components/SlashPalette.js.map +1 -0
- package/packages/cli/dist/tui/components/StatusLine.d.ts +61 -0
- package/packages/cli/dist/tui/components/StatusLine.d.ts.map +1 -0
- package/packages/cli/dist/tui/components/StatusLine.js +55 -0
- package/packages/cli/dist/tui/components/StatusLine.js.map +1 -0
- package/packages/cli/dist/tui/components/ToolGroup.d.ts +33 -0
- package/packages/cli/dist/tui/components/ToolGroup.d.ts.map +1 -0
- package/packages/cli/dist/tui/components/ToolGroup.js +52 -0
- package/packages/cli/dist/tui/components/ToolGroup.js.map +1 -0
- package/packages/cli/dist/tui/components/Wordmark.d.ts +35 -0
- package/packages/cli/dist/tui/components/Wordmark.d.ts.map +1 -0
- package/packages/cli/dist/tui/components/Wordmark.js +81 -0
- package/packages/cli/dist/tui/components/Wordmark.js.map +1 -0
- package/packages/cli/dist/tui/highlight.d.ts +29 -0
- package/packages/cli/dist/tui/highlight.d.ts.map +1 -0
- package/packages/cli/dist/tui/highlight.js +137 -0
- package/packages/cli/dist/tui/highlight.js.map +1 -0
- package/packages/cli/dist/tui/hooks/useColumns.d.ts +20 -0
- package/packages/cli/dist/tui/hooks/useColumns.d.ts.map +1 -0
- package/packages/cli/dist/tui/hooks/useColumns.js +38 -0
- package/packages/cli/dist/tui/hooks/useColumns.js.map +1 -0
- package/packages/cli/dist/tui/hooks/useHistory.d.ts +21 -0
- package/packages/cli/dist/tui/hooks/useHistory.d.ts.map +1 -0
- package/packages/cli/dist/tui/hooks/useHistory.js +57 -0
- package/packages/cli/dist/tui/hooks/useHistory.js.map +1 -0
- package/packages/cli/dist/tui/hooks/useSlash.d.ts +38 -0
- package/packages/cli/dist/tui/hooks/useSlash.d.ts.map +1 -0
- package/packages/cli/dist/tui/hooks/useSlash.js +89 -0
- package/packages/cli/dist/tui/hooks/useSlash.js.map +1 -0
- package/packages/cli/dist/tui/hooks/useTurn.d.ts +75 -0
- package/packages/cli/dist/tui/hooks/useTurn.d.ts.map +1 -0
- package/packages/cli/dist/tui/hooks/useTurn.js +396 -0
- package/packages/cli/dist/tui/hooks/useTurn.js.map +1 -0
- package/packages/cli/dist/tui/theme.d.ts +126 -0
- package/packages/cli/dist/tui/theme.d.ts.map +1 -0
- package/packages/cli/dist/tui/theme.js +127 -0
- package/packages/cli/dist/tui/theme.js.map +1 -0
- package/packages/cli/dist/tui/types.d.ts +205 -0
- package/packages/cli/dist/tui/types.d.ts.map +1 -0
- package/packages/cli/dist/tui/types.js +55 -0
- package/packages/cli/dist/tui/types.js.map +1 -0
- package/packages/cli/dist/ui/render.d.ts +74 -0
- package/packages/cli/dist/ui/render.d.ts.map +1 -0
- package/packages/cli/dist/ui/render.js +349 -0
- package/packages/cli/dist/ui/render.js.map +1 -0
- package/packages/cli/dist/ui/speech.d.ts +42 -0
- package/packages/cli/dist/ui/speech.d.ts.map +1 -0
- package/packages/cli/dist/ui/speech.js +257 -0
- package/packages/cli/dist/ui/speech.js.map +1 -0
- package/packages/cli/dist/ui/spinner.d.ts +17 -0
- package/packages/cli/dist/ui/spinner.d.ts.map +1 -0
- package/packages/cli/dist/ui/spinner.js +61 -0
- package/packages/cli/dist/ui/spinner.js.map +1 -0
- package/packages/cli/dist/ui/theme.d.ts +54 -0
- package/packages/cli/dist/ui/theme.d.ts.map +1 -0
- package/packages/cli/dist/ui/theme.js +74 -0
- package/packages/cli/dist/ui/theme.js.map +1 -0
- package/packages/cli/package.json +1 -0
- package/packages/core/dist/agents/legacy-persona.d.ts +4 -0
- package/packages/core/dist/agents/legacy-persona.d.ts.map +1 -0
- package/packages/core/dist/agents/legacy-persona.js +39 -0
- package/packages/core/dist/agents/legacy-persona.js.map +1 -0
- package/packages/core/dist/agents/orchestrator.d.ts +24 -0
- package/packages/core/dist/agents/orchestrator.d.ts.map +1 -0
- package/packages/core/dist/agents/orchestrator.js +88 -0
- package/packages/core/dist/agents/orchestrator.js.map +1 -0
- package/packages/core/dist/agents/persona.d.ts +56 -0
- package/packages/core/dist/agents/persona.d.ts.map +1 -0
- package/packages/core/dist/agents/persona.js +153 -0
- package/packages/core/dist/agents/persona.js.map +1 -0
- package/packages/core/dist/agents/roles.d.ts +21 -0
- package/packages/core/dist/agents/roles.d.ts.map +1 -0
- package/packages/core/dist/agents/roles.js +81 -0
- package/packages/core/dist/agents/roles.js.map +1 -0
- package/packages/core/dist/agents/team.d.ts +105 -0
- package/packages/core/dist/agents/team.d.ts.map +1 -0
- package/packages/core/dist/agents/team.js +623 -0
- package/packages/core/dist/agents/team.js.map +1 -0
- package/packages/core/dist/computer/keys.d.ts +12 -0
- package/packages/core/dist/computer/keys.d.ts.map +1 -0
- package/packages/core/dist/computer/keys.js +56 -0
- package/packages/core/dist/computer/keys.js.map +1 -0
- package/packages/core/dist/computer/mcp-server.d.ts +11 -0
- package/packages/core/dist/computer/mcp-server.d.ts.map +1 -0
- package/packages/core/dist/computer/mcp-server.js +228 -0
- package/packages/core/dist/computer/mcp-server.js.map +1 -0
- package/packages/core/dist/computer/powershell.d.ts +13 -0
- package/packages/core/dist/computer/powershell.d.ts.map +1 -0
- package/packages/core/dist/computer/powershell.js +359 -0
- package/packages/core/dist/computer/powershell.js.map +1 -0
- package/packages/core/dist/computer/tools.d.ts +43 -0
- package/packages/core/dist/computer/tools.d.ts.map +1 -0
- package/packages/core/dist/computer/tools.js +260 -0
- package/packages/core/dist/computer/tools.js.map +1 -0
- package/packages/core/dist/config.d.ts +32 -0
- package/packages/core/dist/config.d.ts.map +1 -0
- package/packages/core/dist/config.js +329 -0
- package/packages/core/dist/config.js.map +1 -0
- package/packages/core/dist/cron/parse.d.ts +52 -0
- package/packages/core/dist/cron/parse.d.ts.map +1 -0
- package/packages/core/dist/cron/parse.js +277 -0
- package/packages/core/dist/cron/parse.js.map +1 -0
- package/packages/core/dist/cron/scheduler.d.ts +102 -0
- package/packages/core/dist/cron/scheduler.d.ts.map +1 -0
- package/packages/core/dist/cron/scheduler.js +334 -0
- package/packages/core/dist/cron/scheduler.js.map +1 -0
- package/packages/core/dist/cron/script.d.ts +9 -0
- package/packages/core/dist/cron/script.d.ts.map +1 -0
- package/packages/core/dist/cron/script.js +113 -0
- package/packages/core/dist/cron/script.js.map +1 -0
- package/packages/core/dist/cron/store.d.ts +77 -0
- package/packages/core/dist/cron/store.d.ts.map +1 -0
- package/packages/core/dist/cron/store.js +229 -0
- package/packages/core/dist/cron/store.js.map +1 -0
- package/packages/core/dist/gateway/policy.d.ts +113 -0
- package/packages/core/dist/gateway/policy.d.ts.map +1 -0
- package/packages/core/dist/gateway/policy.js +373 -0
- package/packages/core/dist/gateway/policy.js.map +1 -0
- package/packages/core/dist/index.d.ts +45 -0
- package/packages/core/dist/index.d.ts.map +1 -0
- package/packages/core/dist/index.js +52 -0
- package/packages/core/dist/index.js.map +1 -0
- package/packages/core/dist/logger.d.ts +21 -0
- package/packages/core/dist/logger.d.ts.map +1 -0
- package/packages/core/dist/logger.js +61 -0
- package/packages/core/dist/logger.js.map +1 -0
- package/packages/core/dist/memory/db.d.ts +12 -0
- package/packages/core/dist/memory/db.d.ts.map +1 -0
- package/packages/core/dist/memory/db.js +414 -0
- package/packages/core/dist/memory/db.js.map +1 -0
- package/packages/core/dist/memory/extractor.d.ts +35 -0
- package/packages/core/dist/memory/extractor.d.ts.map +1 -0
- package/packages/core/dist/memory/extractor.js +159 -0
- package/packages/core/dist/memory/extractor.js.map +1 -0
- package/packages/core/dist/memory/gate.d.ts +68 -0
- package/packages/core/dist/memory/gate.d.ts.map +1 -0
- package/packages/core/dist/memory/gate.js +163 -0
- package/packages/core/dist/memory/gate.js.map +1 -0
- package/packages/core/dist/memory/recall.d.ts +61 -0
- package/packages/core/dist/memory/recall.d.ts.map +1 -0
- package/packages/core/dist/memory/recall.js +342 -0
- package/packages/core/dist/memory/recall.js.map +1 -0
- package/packages/core/dist/memory/sleep.d.ts +105 -0
- package/packages/core/dist/memory/sleep.d.ts.map +1 -0
- package/packages/core/dist/memory/sleep.js +888 -0
- package/packages/core/dist/memory/sleep.js.map +1 -0
- package/packages/core/dist/memory/store.d.ts +263 -0
- package/packages/core/dist/memory/store.d.ts.map +1 -0
- package/packages/core/dist/memory/store.js +999 -0
- package/packages/core/dist/memory/store.js.map +1 -0
- package/packages/core/dist/migration-cron.d.ts +37 -0
- package/packages/core/dist/migration-cron.d.ts.map +1 -0
- package/packages/core/dist/migration-cron.js +257 -0
- package/packages/core/dist/migration-cron.js.map +1 -0
- package/packages/core/dist/migration-scripts.d.ts +15 -0
- package/packages/core/dist/migration-scripts.d.ts.map +1 -0
- package/packages/core/dist/migration-scripts.js +97 -0
- package/packages/core/dist/migration-scripts.js.map +1 -0
- package/packages/core/dist/migration.d.ts +33 -0
- package/packages/core/dist/migration.d.ts.map +1 -0
- package/packages/core/dist/migration.js +296 -0
- package/packages/core/dist/migration.js.map +1 -0
- package/packages/core/dist/org/bridge.d.ts +42 -0
- package/packages/core/dist/org/bridge.d.ts.map +1 -0
- package/packages/core/dist/org/bridge.js +139 -0
- package/packages/core/dist/org/bridge.js.map +1 -0
- package/packages/core/dist/org/controller.d.ts +118 -0
- package/packages/core/dist/org/controller.d.ts.map +1 -0
- package/packages/core/dist/org/controller.js +1431 -0
- package/packages/core/dist/org/controller.js.map +1 -0
- package/packages/core/dist/org/mcp-bridge.d.ts +11 -0
- package/packages/core/dist/org/mcp-bridge.d.ts.map +1 -0
- package/packages/core/dist/org/mcp-bridge.js +148 -0
- package/packages/core/dist/org/mcp-bridge.js.map +1 -0
- package/packages/core/dist/org/planner.d.ts +60 -0
- package/packages/core/dist/org/planner.d.ts.map +1 -0
- package/packages/core/dist/org/planner.js +175 -0
- package/packages/core/dist/org/planner.js.map +1 -0
- package/packages/core/dist/org/ponytail.d.ts +24 -0
- package/packages/core/dist/org/ponytail.d.ts.map +1 -0
- package/packages/core/dist/org/ponytail.js +53 -0
- package/packages/core/dist/org/ponytail.js.map +1 -0
- package/packages/core/dist/org/project-mcp.d.ts +32 -0
- package/packages/core/dist/org/project-mcp.d.ts.map +1 -0
- package/packages/core/dist/org/project-mcp.js +53 -0
- package/packages/core/dist/org/project-mcp.js.map +1 -0
- package/packages/core/dist/org/prompts.d.ts +71 -0
- package/packages/core/dist/org/prompts.d.ts.map +1 -0
- package/packages/core/dist/org/prompts.js +268 -0
- package/packages/core/dist/org/prompts.js.map +1 -0
- package/packages/core/dist/org/store.d.ts +176 -0
- package/packages/core/dist/org/store.d.ts.map +1 -0
- package/packages/core/dist/org/store.js +594 -0
- package/packages/core/dist/org/store.js.map +1 -0
- package/packages/core/dist/org/tools.d.ts +22 -0
- package/packages/core/dist/org/tools.d.ts.map +1 -0
- package/packages/core/dist/org/tools.js +578 -0
- package/packages/core/dist/org/tools.js.map +1 -0
- package/packages/core/dist/profile.d.ts +16 -0
- package/packages/core/dist/profile.d.ts.map +1 -0
- package/packages/core/dist/profile.js +176 -0
- package/packages/core/dist/profile.js.map +1 -0
- package/packages/core/dist/providers/catalogue.d.ts +6 -0
- package/packages/core/dist/providers/catalogue.d.ts.map +1 -0
- package/packages/core/dist/providers/catalogue.js +104 -0
- package/packages/core/dist/providers/catalogue.js.map +1 -0
- package/packages/core/dist/providers/claude-code.d.ts +10 -0
- package/packages/core/dist/providers/claude-code.d.ts.map +1 -0
- package/packages/core/dist/providers/claude-code.js +321 -0
- package/packages/core/dist/providers/claude-code.js.map +1 -0
- package/packages/core/dist/providers/codex.d.ts +10 -0
- package/packages/core/dist/providers/codex.d.ts.map +1 -0
- package/packages/core/dist/providers/codex.js +375 -0
- package/packages/core/dist/providers/codex.js.map +1 -0
- package/packages/core/dist/providers/process.d.ts +48 -0
- package/packages/core/dist/providers/process.d.ts.map +1 -0
- package/packages/core/dist/providers/process.js +165 -0
- package/packages/core/dist/providers/process.js.map +1 -0
- package/packages/core/dist/providers/quota.d.ts +13 -0
- package/packages/core/dist/providers/quota.d.ts.map +1 -0
- package/packages/core/dist/providers/quota.js +231 -0
- package/packages/core/dist/providers/quota.js.map +1 -0
- package/packages/core/dist/providers/registry.d.ts +27 -0
- package/packages/core/dist/providers/registry.d.ts.map +1 -0
- package/packages/core/dist/providers/registry.js +64 -0
- package/packages/core/dist/providers/registry.js.map +1 -0
- package/packages/core/dist/runtime.d.ts +149 -0
- package/packages/core/dist/runtime.d.ts.map +1 -0
- package/packages/core/dist/runtime.js +778 -0
- package/packages/core/dist/runtime.js.map +1 -0
- package/packages/core/dist/skills/import.d.ts +41 -0
- package/packages/core/dist/skills/import.d.ts.map +1 -0
- package/packages/core/dist/skills/import.js +129 -0
- package/packages/core/dist/skills/import.js.map +1 -0
- package/packages/core/dist/skills/store.d.ts +57 -0
- package/packages/core/dist/skills/store.d.ts.map +1 -0
- package/packages/core/dist/skills/store.js +126 -0
- package/packages/core/dist/skills/store.js.map +1 -0
- package/packages/core/dist/tools/browser.d.ts +20 -0
- package/packages/core/dist/tools/browser.d.ts.map +1 -0
- package/packages/core/dist/tools/browser.js +72 -0
- package/packages/core/dist/tools/browser.js.map +1 -0
- package/packages/core/dist/tools/catalog.d.ts +67 -0
- package/packages/core/dist/tools/catalog.d.ts.map +1 -0
- package/packages/core/dist/tools/catalog.js +233 -0
- package/packages/core/dist/tools/catalog.js.map +1 -0
- package/packages/core/dist/tools/hub.d.ts +68 -0
- package/packages/core/dist/tools/hub.d.ts.map +1 -0
- package/packages/core/dist/tools/hub.js +213 -0
- package/packages/core/dist/tools/hub.js.map +1 -0
- package/packages/core/dist/types.d.ts +1031 -0
- package/packages/core/dist/types.d.ts.map +1 -0
- package/packages/core/dist/types.js +22 -0
- package/packages/core/dist/types.js.map +1 -0
- package/packages/core/dist/util/queue.d.ts +25 -0
- package/packages/core/dist/util/queue.d.ts.map +1 -0
- package/packages/core/dist/util/queue.js +64 -0
- package/packages/core/dist/util/queue.js.map +1 -0
- package/packages/core/package.json +1 -0
- package/packages/server/dist/auth.d.ts +12 -0
- package/packages/server/dist/auth.d.ts.map +1 -0
- package/packages/server/dist/auth.js +61 -0
- package/packages/server/dist/auth.js.map +1 -0
- package/packages/server/dist/context.d.ts +29 -0
- package/packages/server/dist/context.d.ts.map +1 -0
- package/packages/server/dist/context.js +46 -0
- package/packages/server/dist/context.js.map +1 -0
- package/packages/server/dist/env.d.ts +8 -0
- package/packages/server/dist/env.d.ts.map +1 -0
- package/packages/server/dist/env.js +36 -0
- package/packages/server/dist/env.js.map +1 -0
- package/packages/server/dist/gateways/push.d.ts +22 -0
- package/packages/server/dist/gateways/push.d.ts.map +1 -0
- package/packages/server/dist/gateways/push.js +267 -0
- package/packages/server/dist/gateways/push.js.map +1 -0
- package/packages/server/dist/gateways/telegram-api.d.ts +82 -0
- package/packages/server/dist/gateways/telegram-api.d.ts.map +1 -0
- package/packages/server/dist/gateways/telegram-api.js +168 -0
- package/packages/server/dist/gateways/telegram-api.js.map +1 -0
- package/packages/server/dist/gateways/telegram.d.ts +32 -0
- package/packages/server/dist/gateways/telegram.d.ts.map +1 -0
- package/packages/server/dist/gateways/telegram.js +583 -0
- package/packages/server/dist/gateways/telegram.js.map +1 -0
- package/packages/server/dist/index.d.ts +12 -0
- package/packages/server/dist/index.d.ts.map +1 -0
- package/packages/server/dist/index.js +12 -0
- package/packages/server/dist/index.js.map +1 -0
- package/packages/server/dist/main.d.ts +2 -0
- package/packages/server/dist/main.d.ts.map +1 -0
- package/packages/server/dist/main.js +74 -0
- package/packages/server/dist/main.js.map +1 -0
- package/packages/server/dist/routes/agents.d.ts +5 -0
- package/packages/server/dist/routes/agents.d.ts.map +1 -0
- package/packages/server/dist/routes/agents.js +6 -0
- package/packages/server/dist/routes/agents.js.map +1 -0
- package/packages/server/dist/routes/chat.d.ts +10 -0
- package/packages/server/dist/routes/chat.d.ts.map +1 -0
- package/packages/server/dist/routes/chat.js +36 -0
- package/packages/server/dist/routes/chat.js.map +1 -0
- package/packages/server/dist/routes/config.d.ts +4 -0
- package/packages/server/dist/routes/config.d.ts.map +1 -0
- package/packages/server/dist/routes/config.js +58 -0
- package/packages/server/dist/routes/config.js.map +1 -0
- package/packages/server/dist/routes/cron.d.ts +10 -0
- package/packages/server/dist/routes/cron.d.ts.map +1 -0
- package/packages/server/dist/routes/cron.js +128 -0
- package/packages/server/dist/routes/cron.js.map +1 -0
- package/packages/server/dist/routes/gateways.d.ts +10 -0
- package/packages/server/dist/routes/gateways.d.ts.map +1 -0
- package/packages/server/dist/routes/gateways.js +32 -0
- package/packages/server/dist/routes/gateways.js.map +1 -0
- package/packages/server/dist/routes/health.d.ts +8 -0
- package/packages/server/dist/routes/health.d.ts.map +1 -0
- package/packages/server/dist/routes/health.js +12 -0
- package/packages/server/dist/routes/health.js.map +1 -0
- package/packages/server/dist/routes/memories.d.ts +11 -0
- package/packages/server/dist/routes/memories.d.ts.map +1 -0
- package/packages/server/dist/routes/memories.js +134 -0
- package/packages/server/dist/routes/memories.js.map +1 -0
- package/packages/server/dist/routes/org.d.ts +13 -0
- package/packages/server/dist/routes/org.d.ts.map +1 -0
- package/packages/server/dist/routes/org.js +316 -0
- package/packages/server/dist/routes/org.js.map +1 -0
- package/packages/server/dist/routes/profile.d.ts +4 -0
- package/packages/server/dist/routes/profile.d.ts.map +1 -0
- package/packages/server/dist/routes/profile.js +51 -0
- package/packages/server/dist/routes/profile.js.map +1 -0
- package/packages/server/dist/routes/providers.d.ts +9 -0
- package/packages/server/dist/routes/providers.d.ts.map +1 -0
- package/packages/server/dist/routes/providers.js +41 -0
- package/packages/server/dist/routes/providers.js.map +1 -0
- package/packages/server/dist/routes/sessions.d.ts +9 -0
- package/packages/server/dist/routes/sessions.d.ts.map +1 -0
- package/packages/server/dist/routes/sessions.js +72 -0
- package/packages/server/dist/routes/sessions.js.map +1 -0
- package/packages/server/dist/routes/sleep.d.ts +12 -0
- package/packages/server/dist/routes/sleep.d.ts.map +1 -0
- package/packages/server/dist/routes/sleep.js +70 -0
- package/packages/server/dist/routes/sleep.js.map +1 -0
- package/packages/server/dist/routes/stats.d.ts +17 -0
- package/packages/server/dist/routes/stats.d.ts.map +1 -0
- package/packages/server/dist/routes/stats.js +57 -0
- package/packages/server/dist/routes/stats.js.map +1 -0
- package/packages/server/dist/routes/team.d.ts +11 -0
- package/packages/server/dist/routes/team.d.ts.map +1 -0
- package/packages/server/dist/routes/team.js +36 -0
- package/packages/server/dist/routes/team.js.map +1 -0
- package/packages/server/dist/routes/tools.d.ts +10 -0
- package/packages/server/dist/routes/tools.d.ts.map +1 -0
- package/packages/server/dist/routes/tools.js +128 -0
- package/packages/server/dist/routes/tools.js.map +1 -0
- package/packages/server/dist/routes/tts.d.ts +12 -0
- package/packages/server/dist/routes/tts.d.ts.map +1 -0
- package/packages/server/dist/routes/tts.js +38 -0
- package/packages/server/dist/routes/tts.js.map +1 -0
- package/packages/server/dist/routes/ws.d.ts +13 -0
- package/packages/server/dist/routes/ws.d.ts.map +1 -0
- package/packages/server/dist/routes/ws.js +96 -0
- package/packages/server/dist/routes/ws.js.map +1 -0
- package/packages/server/dist/schemas.d.ts +981 -0
- package/packages/server/dist/schemas.d.ts.map +1 -0
- package/packages/server/dist/schemas.js +339 -0
- package/packages/server/dist/schemas.js.map +1 -0
- package/packages/server/dist/server.d.ts +20 -0
- package/packages/server/dist/server.d.ts.map +1 -0
- package/packages/server/dist/server.js +234 -0
- package/packages/server/dist/server.js.map +1 -0
- package/packages/server/dist/services/stream.d.ts +77 -0
- package/packages/server/dist/services/stream.d.ts.map +1 -0
- package/packages/server/dist/services/stream.js +84 -0
- package/packages/server/dist/services/stream.js.map +1 -0
- package/packages/server/dist/services/tts.d.ts +53 -0
- package/packages/server/dist/services/tts.d.ts.map +1 -0
- package/packages/server/dist/services/tts.js +281 -0
- package/packages/server/dist/services/tts.js.map +1 -0
- package/packages/server/dist/services/voice-keys.d.ts +26 -0
- package/packages/server/dist/services/voice-keys.d.ts.map +1 -0
- package/packages/server/dist/services/voice-keys.js +51 -0
- package/packages/server/dist/services/voice-keys.js.map +1 -0
- package/packages/server/dist/static.d.ts +12 -0
- package/packages/server/dist/static.d.ts.map +1 -0
- package/packages/server/dist/static.js +63 -0
- package/packages/server/dist/static.js.map +1 -0
- package/packages/server/package.json +1 -0
- package/packages/web/dist/apple-touch-icon.png +0 -0
- package/packages/web/dist/assets/3d-force-graph-BPZmoydi.js +1163 -0
- package/packages/web/dist/assets/bricolage-grotesque-latin-ext-wght-normal-CcLUaPy7.woff2 +0 -0
- package/packages/web/dist/assets/bricolage-grotesque-latin-wght-normal-DLoelf7F.woff2 +0 -0
- package/packages/web/dist/assets/bricolage-grotesque-vietnamese-wght-normal-BUzh504Q.woff2 +0 -0
- package/packages/web/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/packages/web/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/packages/web/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/packages/web/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/packages/web/dist/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
- package/packages/web/dist/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
- package/packages/web/dist/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
- package/packages/web/dist/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
- package/packages/web/dist/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
- package/packages/web/dist/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
- package/packages/web/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/packages/web/dist/assets/index-IBSTzK7-.js +1255 -0
- package/packages/web/dist/assets/index-qUXUui7W.css +1 -0
- package/packages/web/dist/assets/three-spritetext-B9ZIW7c-.js +4 -0
- package/packages/web/dist/assets/three.module-cmFfBtHS.js +4228 -0
- package/packages/web/dist/favicon.ico +0 -0
- package/packages/web/dist/favicon.svg +2 -0
- package/packages/web/dist/index.html +28 -0
- package/packages/web/dist/logo-light.svg +2 -0
- package/packages/web/dist/logo.svg +2 -0
- package/packages/web/dist/mark-light.svg +2 -0
- package/packages/web/dist/mark.svg +2 -0
- package/packages/web/package.json +1 -0
- package/scripts/rookery.mjs +183 -0
|
@@ -0,0 +1,1031 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rookery Core - shared contracts.
|
|
3
|
+
*
|
|
4
|
+
* Everything in Rookery speaks these types: the CLI, the HTTP/WS server,
|
|
5
|
+
* the web UI and the provider adapters. Changing something here is a
|
|
6
|
+
* cross-package change.
|
|
7
|
+
*/
|
|
8
|
+
/** Which local CLI backs a turn. Auth comes from the CLI's own login, never an API key. */
|
|
9
|
+
export type ProviderId = 'claude' | 'codex';
|
|
10
|
+
export type Role = 'user' | 'assistant' | 'system';
|
|
11
|
+
/** A persisted conversation turn. */
|
|
12
|
+
export interface Message {
|
|
13
|
+
id: string;
|
|
14
|
+
sessionId: string;
|
|
15
|
+
role: Role;
|
|
16
|
+
content: string;
|
|
17
|
+
/** Provider tool events retained with the answer, including interrupted calls. */
|
|
18
|
+
toolCalls?: Extract<AgentEvent, {
|
|
19
|
+
type: 'tool';
|
|
20
|
+
}>[];
|
|
21
|
+
provider?: ProviderId;
|
|
22
|
+
model?: string;
|
|
23
|
+
/** Provenance only, never identity. Unset for an ordinary turn. */
|
|
24
|
+
agent?: string;
|
|
25
|
+
createdAt: number;
|
|
26
|
+
/** Token/cost accounting, when the provider reported it. */
|
|
27
|
+
usage?: TurnUsage;
|
|
28
|
+
}
|
|
29
|
+
export interface TurnUsage {
|
|
30
|
+
inputTokens?: number;
|
|
31
|
+
outputTokens?: number;
|
|
32
|
+
cachedInputTokens?: number;
|
|
33
|
+
reasoningTokens?: number;
|
|
34
|
+
costUsd?: number;
|
|
35
|
+
durationMs?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Tokens the provider's context held on the turn's last request: prompt,
|
|
38
|
+
* history, system prompt and tool definitions together. What a context
|
|
39
|
+
* gauge shows.
|
|
40
|
+
*/
|
|
41
|
+
contextTokens?: number;
|
|
42
|
+
/** Size of the model's context window, when the provider reports it. */
|
|
43
|
+
contextWindow?: number;
|
|
44
|
+
}
|
|
45
|
+
/** One rolling limit window of a subscription, as the vendor reports it. */
|
|
46
|
+
export interface QuotaWindow {
|
|
47
|
+
/** Stable key, e.g. `five_hour`, `seven_day`, `weekly`. */
|
|
48
|
+
kind: string;
|
|
49
|
+
/** Human label, e.g. "5 hours". */
|
|
50
|
+
label: string;
|
|
51
|
+
/** 0..100, how much of the window is used up. */
|
|
52
|
+
percent: number;
|
|
53
|
+
/** ISO timestamp of the reset, when known. */
|
|
54
|
+
resetsAt?: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Subscription usage of one provider: the same numbers the CLIs show in
|
|
58
|
+
* their own `/usage` panels, read with the login they store on disk.
|
|
59
|
+
*/
|
|
60
|
+
export interface ProviderQuota {
|
|
61
|
+
provider: ProviderId;
|
|
62
|
+
/** Plan name as the vendor reports it, e.g. "Max 5×", "Pro Lite". */
|
|
63
|
+
plan?: string;
|
|
64
|
+
windows: QuotaWindow[];
|
|
65
|
+
fetchedAt: number;
|
|
66
|
+
/** Why there are no windows: not logged in, endpoint down, rate limited. */
|
|
67
|
+
error?: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* What a conversation is for. A `voice` session belongs to the hands-free
|
|
71
|
+
* screen: the assistant answers in its spoken register there, whichever
|
|
72
|
+
* surface a turn comes from, and the web UI files it apart from the chats.
|
|
73
|
+
*/
|
|
74
|
+
export type SessionKind = 'chat' | 'voice';
|
|
75
|
+
export interface Session {
|
|
76
|
+
id: string;
|
|
77
|
+
title: string;
|
|
78
|
+
kind: SessionKind;
|
|
79
|
+
provider: ProviderId;
|
|
80
|
+
model?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Working directory the assistant's own provider CLI is spawned in. This is
|
|
83
|
+
* the Rookery workspace, never the directory Rookery was started from.
|
|
84
|
+
*/
|
|
85
|
+
cwd: string;
|
|
86
|
+
/** Project the conversation is about; assignments default to it. */
|
|
87
|
+
projectId?: string;
|
|
88
|
+
/**
|
|
89
|
+
* The agent the user is talking to in this conversation. Unset for the
|
|
90
|
+
* assistant. A direct chat with an agent runs in that agent's voice, with
|
|
91
|
+
* its memory and its provider, like a direct message in a company chat.
|
|
92
|
+
*/
|
|
93
|
+
agentId?: string;
|
|
94
|
+
/** Native session id held by the provider CLI, used to resume its own context. */
|
|
95
|
+
providerSessionId?: string;
|
|
96
|
+
createdAt: number;
|
|
97
|
+
updatedAt: number;
|
|
98
|
+
archived: boolean;
|
|
99
|
+
messageCount: number;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The single event vocabulary Rookery streams to any frontend.
|
|
103
|
+
* Provider adapters normalise their native JSON into exactly these.
|
|
104
|
+
*/
|
|
105
|
+
export type AgentEvent = {
|
|
106
|
+
type: 'session';
|
|
107
|
+
sessionId: string;
|
|
108
|
+
providerSessionId?: string;
|
|
109
|
+
provider: ProviderId;
|
|
110
|
+
model?: string;
|
|
111
|
+
}
|
|
112
|
+
/** Incremental assistant text. Concatenating every delta yields the reply. */
|
|
113
|
+
| {
|
|
114
|
+
type: 'text';
|
|
115
|
+
delta: string;
|
|
116
|
+
}
|
|
117
|
+
/** Model reasoning trace, when the provider exposes it. */
|
|
118
|
+
| {
|
|
119
|
+
type: 'thinking';
|
|
120
|
+
delta: string;
|
|
121
|
+
}
|
|
122
|
+
/** The provider started or finished running one of its own tools. */
|
|
123
|
+
| {
|
|
124
|
+
type: 'tool';
|
|
125
|
+
name: string;
|
|
126
|
+
status: 'start' | 'end';
|
|
127
|
+
detail?: string;
|
|
128
|
+
id?: string;
|
|
129
|
+
result?: string;
|
|
130
|
+
isError?: boolean;
|
|
131
|
+
}
|
|
132
|
+
/** Rookery-level progress: memory recall, delegation, lifecycle. */
|
|
133
|
+
| {
|
|
134
|
+
type: 'status';
|
|
135
|
+
label: string;
|
|
136
|
+
detail?: string;
|
|
137
|
+
}
|
|
138
|
+
/** A memory record was written or recalled. */
|
|
139
|
+
| {
|
|
140
|
+
type: 'memory';
|
|
141
|
+
action: 'recalled' | 'stored';
|
|
142
|
+
count: number;
|
|
143
|
+
items?: MemoryRecord[];
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* An assignment changed state. Sent when an agent is handed a task, while
|
|
147
|
+
* it produces output, and once when it finishes or fails. Assignments a
|
|
148
|
+
* turn started through the `assign` tool ride the turn's own stream.
|
|
149
|
+
*/
|
|
150
|
+
| {
|
|
151
|
+
type: 'assignment';
|
|
152
|
+
assignment: AssignmentView;
|
|
153
|
+
}
|
|
154
|
+
/** A message between agents, their manager or the assistant was posted. */
|
|
155
|
+
| {
|
|
156
|
+
type: 'message';
|
|
157
|
+
message: AgentMessage;
|
|
158
|
+
}
|
|
159
|
+
/** A task on the board was created or changed state. */
|
|
160
|
+
| {
|
|
161
|
+
type: 'task';
|
|
162
|
+
task: Task;
|
|
163
|
+
}
|
|
164
|
+
/** A schedule was created, edited, deleted, or one of its runs changed state. */
|
|
165
|
+
| {
|
|
166
|
+
type: 'cron';
|
|
167
|
+
job: CronJob;
|
|
168
|
+
run?: CronRun;
|
|
169
|
+
deleted?: boolean;
|
|
170
|
+
}
|
|
171
|
+
/** The memory bank started, advanced through or finished a night's clean-up. */
|
|
172
|
+
| {
|
|
173
|
+
type: 'sleep';
|
|
174
|
+
run: SleepRun;
|
|
175
|
+
phase?: string;
|
|
176
|
+
cycle?: number;
|
|
177
|
+
}
|
|
178
|
+
/** The provider reported the account's limit windows during the turn. */
|
|
179
|
+
| {
|
|
180
|
+
type: 'quota';
|
|
181
|
+
quota: ProviderQuota;
|
|
182
|
+
} | {
|
|
183
|
+
type: 'error';
|
|
184
|
+
message: string;
|
|
185
|
+
fatal: boolean;
|
|
186
|
+
} | {
|
|
187
|
+
type: 'done';
|
|
188
|
+
text: string;
|
|
189
|
+
usage?: TurnUsage;
|
|
190
|
+
providerSessionId?: string;
|
|
191
|
+
};
|
|
192
|
+
/**
|
|
193
|
+
* Long-term memory kinds.
|
|
194
|
+
* - fact: stable truth about the user or their world
|
|
195
|
+
* - preference: how the user wants things done
|
|
196
|
+
* - project: ongoing work, goals, constraints
|
|
197
|
+
* - event: something that happened, where the timestamp matters
|
|
198
|
+
* - summary: a compressed digest of an older conversation span
|
|
199
|
+
* - insight: a conclusion drawn across several memories; written only by
|
|
200
|
+
* the sleep run, never by a turn, and always backed by evidence
|
|
201
|
+
*/
|
|
202
|
+
export type MemoryKind = 'fact' | 'preference' | 'project' | 'event' | 'summary' | 'insight';
|
|
203
|
+
/** Who wrote a memory. `user` is protected from everything the night does. */
|
|
204
|
+
export type MemoryOrigin = 'extract' | 'user' | 'sleep';
|
|
205
|
+
/** The assistant's own memory bank. Agents own theirs under their agent id. */
|
|
206
|
+
export declare const ASSISTANT_MEMORY_OWNER = "assistant";
|
|
207
|
+
export interface MemoryRecord {
|
|
208
|
+
id: string;
|
|
209
|
+
kind: MemoryKind;
|
|
210
|
+
/** The memory itself, written as one self-contained sentence. */
|
|
211
|
+
content: string;
|
|
212
|
+
/** Free-form tags used for filtering and for boosting recall. */
|
|
213
|
+
tags: string[];
|
|
214
|
+
/** 0..1 - how much this should outrank other candidates. */
|
|
215
|
+
importance: number;
|
|
216
|
+
/** Whose memory this is: `assistant`, or an agent id. */
|
|
217
|
+
owner: string;
|
|
218
|
+
/** Session this was learned in, when known. */
|
|
219
|
+
sourceSessionId?: string;
|
|
220
|
+
createdAt: number;
|
|
221
|
+
updatedAt: number;
|
|
222
|
+
/** Recall bookkeeping - drives the recency/frequency part of scoring. */
|
|
223
|
+
lastAccessedAt?: number;
|
|
224
|
+
accessCount: number;
|
|
225
|
+
/** Soft delete, so a forgotten memory can still be audited. */
|
|
226
|
+
forgotten: boolean;
|
|
227
|
+
/** Who wrote it. Decides what the sleep run may do with it. */
|
|
228
|
+
origin: MemoryOrigin;
|
|
229
|
+
/** The user pinned this: never dormant, never merged away. */
|
|
230
|
+
pinned: boolean;
|
|
231
|
+
/**
|
|
232
|
+
* Asleep since. A dormant memory is out of recall and out of the core
|
|
233
|
+
* profile, but stays in the table, in search and in the inspector. This is
|
|
234
|
+
* how the night shrinks the bank without ever losing anything.
|
|
235
|
+
*/
|
|
236
|
+
dormantAt?: number;
|
|
237
|
+
/** The condensed memory that took this one's place. */
|
|
238
|
+
supersededBy?: string;
|
|
239
|
+
/** The sleep run that wrote this memory, when one did. */
|
|
240
|
+
sleepRunId?: string;
|
|
241
|
+
/**
|
|
242
|
+
* 0..1 - how often this memory actually got recalled. Separate from
|
|
243
|
+
* `importance` on purpose: importance says how much it should matter,
|
|
244
|
+
* usefulness says how much it demonstrably did.
|
|
245
|
+
*/
|
|
246
|
+
usefulness: number;
|
|
247
|
+
}
|
|
248
|
+
export interface MemoryQuery {
|
|
249
|
+
text: string;
|
|
250
|
+
limit?: number;
|
|
251
|
+
kinds?: MemoryKind[];
|
|
252
|
+
minImportance?: number;
|
|
253
|
+
/** Defaults to the assistant's own bank. */
|
|
254
|
+
owner?: string;
|
|
255
|
+
}
|
|
256
|
+
export interface ScoredMemory extends MemoryRecord {
|
|
257
|
+
score: number;
|
|
258
|
+
/** Why this memory surfaced - shown in the memory inspector. */
|
|
259
|
+
reason: string;
|
|
260
|
+
/** How it was reached: directly, or through an entity or an edge. */
|
|
261
|
+
hop?: MemoryHop;
|
|
262
|
+
}
|
|
263
|
+
/** Whether a recalled memory matched the question itself or a neighbour of a match. */
|
|
264
|
+
export type MemoryHop = 'direct' | 'entity' | 'edge';
|
|
265
|
+
/** What an entity is a name for. */
|
|
266
|
+
export type EntityKind = 'person' | 'project' | 'tool' | 'place' | 'org' | 'topic';
|
|
267
|
+
/**
|
|
268
|
+
* A named thing several memories talk about. Entities are what makes recall
|
|
269
|
+
* work past wording: two sentences about "Rookery" are related even when
|
|
270
|
+
* they share no other word.
|
|
271
|
+
*/
|
|
272
|
+
export interface MemoryEntity {
|
|
273
|
+
id: string;
|
|
274
|
+
owner: string;
|
|
275
|
+
/** Display name, spelled the way the user spells it. */
|
|
276
|
+
name: string;
|
|
277
|
+
/** Normalised key: lower case, no diacritics. Unique per owner. */
|
|
278
|
+
slug: string;
|
|
279
|
+
kind: EntityKind;
|
|
280
|
+
/** How many live memories mention it. Common entities are damped in recall. */
|
|
281
|
+
mentions: number;
|
|
282
|
+
firstSeenAt: number;
|
|
283
|
+
lastSeenAt: number;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* A directed relation between two memories.
|
|
287
|
+
* - refines: the target sharpens the source
|
|
288
|
+
* - supersedes: the source replaces the target, which goes dormant
|
|
289
|
+
* - contradicts: both cannot be true; reported, never decided automatically
|
|
290
|
+
* - caused_by: the source is the way it is because of the target
|
|
291
|
+
* - co_occurs: they turn up together; weakest link, used for clustering
|
|
292
|
+
*/
|
|
293
|
+
export type MemoryRelation = 'refines' | 'supersedes' | 'contradicts' | 'caused_by' | 'co_occurs';
|
|
294
|
+
export interface MemoryEdge {
|
|
295
|
+
id: string;
|
|
296
|
+
owner: string;
|
|
297
|
+
srcId: string;
|
|
298
|
+
dstId: string;
|
|
299
|
+
relation: MemoryRelation;
|
|
300
|
+
/** 0..1 confidence. */
|
|
301
|
+
weight: number;
|
|
302
|
+
origin: 'sleep' | 'user' | 'gate';
|
|
303
|
+
/** The sleep run that drew this edge, for undo. */
|
|
304
|
+
runId?: string;
|
|
305
|
+
createdAt: number;
|
|
306
|
+
}
|
|
307
|
+
/** One memory with everything hanging off it, for the inspector. */
|
|
308
|
+
export interface MemoryNeighbourhood {
|
|
309
|
+
memory: MemoryRecord;
|
|
310
|
+
entities: MemoryEntity[];
|
|
311
|
+
/** Edges where this memory is the source, with the memory at the other end. */
|
|
312
|
+
outgoing: (MemoryEdge & {
|
|
313
|
+
other: MemoryRecord;
|
|
314
|
+
})[];
|
|
315
|
+
incoming: (MemoryEdge & {
|
|
316
|
+
other: MemoryRecord;
|
|
317
|
+
})[];
|
|
318
|
+
}
|
|
319
|
+
/** The graph as the web view wants it: nodes for entities and memories, plus links. */
|
|
320
|
+
export interface MemoryGraph {
|
|
321
|
+
entities: MemoryEntity[];
|
|
322
|
+
memories: MemoryRecord[];
|
|
323
|
+
edges: MemoryEdge[];
|
|
324
|
+
/** memory id -> entity ids, so the client does not need a second request. */
|
|
325
|
+
links: {
|
|
326
|
+
memoryId: string;
|
|
327
|
+
entityId: string;
|
|
328
|
+
}[];
|
|
329
|
+
/** True when the node cap cut the result short. */
|
|
330
|
+
truncated: boolean;
|
|
331
|
+
}
|
|
332
|
+
export type SleepStatus = 'running' | 'done' | 'failed';
|
|
333
|
+
/**
|
|
334
|
+
* The stages of one night, in the order they run.
|
|
335
|
+
*
|
|
336
|
+
* Sleep is not one uniform chore, and modelling it as a flat list of steps
|
|
337
|
+
* was wrong. Light sleep is bookkeeping and costs nothing. Deep sleep is
|
|
338
|
+
* where the filing happens: what says the same thing becomes one sentence,
|
|
339
|
+
* and what cannot both be true gets decided. Dream sleep is the loose,
|
|
340
|
+
* associative part - links across distant subjects, and the conclusions that
|
|
341
|
+
* only surface once the day's noise is gone.
|
|
342
|
+
*
|
|
343
|
+
* A night runs several cycles of the three, because condensing changes what
|
|
344
|
+
* there is to connect: the second pass works on a bank the first one tidied.
|
|
345
|
+
*/
|
|
346
|
+
export type SleepStage = 'light' | 'deep' | 'rem';
|
|
347
|
+
/**
|
|
348
|
+
* One night's work on one memory bank. Every write a run makes carries its
|
|
349
|
+
* id, which is what makes a night undoable in a single transaction.
|
|
350
|
+
*/
|
|
351
|
+
export interface SleepRun {
|
|
352
|
+
id: string;
|
|
353
|
+
owner: string;
|
|
354
|
+
trigger: CronTrigger;
|
|
355
|
+
status: SleepStatus;
|
|
356
|
+
startedAt: number;
|
|
357
|
+
finishedAt?: number;
|
|
358
|
+
durationMs?: number;
|
|
359
|
+
/** How many live memories the run looked at. */
|
|
360
|
+
readCount: number;
|
|
361
|
+
/** How many memories were folded into a condensed one. */
|
|
362
|
+
mergedCount: number;
|
|
363
|
+
/** How many were put to sleep. */
|
|
364
|
+
dormantCount: number;
|
|
365
|
+
edgeCount: number;
|
|
366
|
+
insightCount: number;
|
|
367
|
+
/** Contradictions found. */
|
|
368
|
+
conflictCount: number;
|
|
369
|
+
/** Contradictions actually decided, the loser filed away. */
|
|
370
|
+
resolvedCount: number;
|
|
371
|
+
/** Small-model calls spent. Capped by config. */
|
|
372
|
+
modelCalls: number;
|
|
373
|
+
/** Two or three sentences a person can read. */
|
|
374
|
+
report?: string;
|
|
375
|
+
error?: string;
|
|
376
|
+
/** Set when the run was rolled back. */
|
|
377
|
+
undoneAt?: number;
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* The company the assistant runs.
|
|
381
|
+
*
|
|
382
|
+
* There is still exactly one conversational identity - the assistant - and
|
|
383
|
+
* nothing here can take the conversation over. What changed is that the
|
|
384
|
+
* people the assistant delegates to are durable: an agent is a record with a
|
|
385
|
+
* role, a manager and its own memory, not a process that lives for one step.
|
|
386
|
+
* Every assignment still starts a fresh provider process.
|
|
387
|
+
*/
|
|
388
|
+
export interface Organization {
|
|
389
|
+
id: string;
|
|
390
|
+
name: string;
|
|
391
|
+
/** What the company is for, in one or two sentences. */
|
|
392
|
+
mission?: string;
|
|
393
|
+
createdAt: number;
|
|
394
|
+
updatedAt: number;
|
|
395
|
+
}
|
|
396
|
+
export interface Project {
|
|
397
|
+
id: string;
|
|
398
|
+
orgId: string;
|
|
399
|
+
name: string;
|
|
400
|
+
description?: string;
|
|
401
|
+
/** Directory assignments for this project run in. Unset: the workspace. */
|
|
402
|
+
path?: string;
|
|
403
|
+
/**
|
|
404
|
+
* Whether this project's own `.mcp.json` may start processes for an
|
|
405
|
+
* assignment. Unset: not yet decided, so its servers stay off. The
|
|
406
|
+
* fingerprint is of the file's content, so an edit after approval is
|
|
407
|
+
* noticed and needs approving again.
|
|
408
|
+
*/
|
|
409
|
+
mcpTrust?: {
|
|
410
|
+
fingerprint: string;
|
|
411
|
+
approvedAt: number;
|
|
412
|
+
};
|
|
413
|
+
createdAt: number;
|
|
414
|
+
updatedAt: number;
|
|
415
|
+
archived: boolean;
|
|
416
|
+
}
|
|
417
|
+
export interface Team {
|
|
418
|
+
id: string;
|
|
419
|
+
orgId: string;
|
|
420
|
+
name: string;
|
|
421
|
+
purpose?: string;
|
|
422
|
+
/** Agent leading the team, when one is named. */
|
|
423
|
+
leadId?: string;
|
|
424
|
+
createdAt: number;
|
|
425
|
+
updatedAt: number;
|
|
426
|
+
}
|
|
427
|
+
export interface Agent {
|
|
428
|
+
id: string;
|
|
429
|
+
orgId: string;
|
|
430
|
+
/** Stable handle used in tool calls and the CLI, e.g. `backend-dev`. */
|
|
431
|
+
slug: string;
|
|
432
|
+
name: string;
|
|
433
|
+
/** Job title, e.g. "Backend Engineer". */
|
|
434
|
+
title: string;
|
|
435
|
+
/** The role's standing instructions. Never mixed into the assistant's voice. */
|
|
436
|
+
instructions: string;
|
|
437
|
+
teamId?: string;
|
|
438
|
+
/** Direct manager. Unset: reports to the assistant. */
|
|
439
|
+
managerId?: string;
|
|
440
|
+
provider?: ProviderId;
|
|
441
|
+
model?: string;
|
|
442
|
+
permission?: PermissionLevel;
|
|
443
|
+
createdAt: number;
|
|
444
|
+
updatedAt: number;
|
|
445
|
+
archived: boolean;
|
|
446
|
+
}
|
|
447
|
+
export type AssignmentStatus = 'pending' | 'running' | 'done' | 'failed' | 'cancelled';
|
|
448
|
+
/** Who handed out an assignment. */
|
|
449
|
+
export type RequesterKind = 'user' | 'assistant' | 'agent';
|
|
450
|
+
export interface Assignment {
|
|
451
|
+
id: string;
|
|
452
|
+
orgId: string;
|
|
453
|
+
agentId: string;
|
|
454
|
+
projectId?: string;
|
|
455
|
+
/** Conversation the assignment was started from, when it was. */
|
|
456
|
+
sessionId?: string;
|
|
457
|
+
/** The assignment whose tool call spawned this one, for delegation chains. */
|
|
458
|
+
parentId?: string;
|
|
459
|
+
requesterKind: RequesterKind;
|
|
460
|
+
requesterAgentId?: string;
|
|
461
|
+
task: string;
|
|
462
|
+
status: AssignmentStatus;
|
|
463
|
+
result?: string;
|
|
464
|
+
error?: string;
|
|
465
|
+
provider?: ProviderId;
|
|
466
|
+
model?: string;
|
|
467
|
+
/** Characters of output produced so far, as a cheap progress signal. */
|
|
468
|
+
chars: number;
|
|
469
|
+
/** Nesting depth: 0 when the assistant delegated directly. */
|
|
470
|
+
depth: number;
|
|
471
|
+
createdAt: number;
|
|
472
|
+
startedAt?: number;
|
|
473
|
+
finishedAt?: number;
|
|
474
|
+
durationMs?: number;
|
|
475
|
+
}
|
|
476
|
+
/** An assignment as a client renders it live. */
|
|
477
|
+
export interface AssignmentView {
|
|
478
|
+
id: string;
|
|
479
|
+
agentId: string;
|
|
480
|
+
agentSlug: string;
|
|
481
|
+
agentName: string;
|
|
482
|
+
task: string;
|
|
483
|
+
status: AssignmentStatus;
|
|
484
|
+
projectId?: string;
|
|
485
|
+
parentId?: string;
|
|
486
|
+
depth: number;
|
|
487
|
+
provider?: ProviderId;
|
|
488
|
+
chars?: number;
|
|
489
|
+
/** Tail of the output, for a live preview line. */
|
|
490
|
+
preview?: string;
|
|
491
|
+
durationMs?: number;
|
|
492
|
+
error?: string;
|
|
493
|
+
}
|
|
494
|
+
export interface AgentMessage {
|
|
495
|
+
id: string;
|
|
496
|
+
orgId: string;
|
|
497
|
+
/** Unset: the assistant wrote it. */
|
|
498
|
+
fromAgentId?: string;
|
|
499
|
+
/** Unset: addressed to the assistant. */
|
|
500
|
+
toAgentId?: string;
|
|
501
|
+
assignmentId?: string;
|
|
502
|
+
content: string;
|
|
503
|
+
createdAt: number;
|
|
504
|
+
readAt?: number;
|
|
505
|
+
}
|
|
506
|
+
export type TaskStatus = 'open' | 'planned' | 'running' | 'done' | 'failed' | 'cancelled';
|
|
507
|
+
export type TaskPriority = 'low' | 'normal' | 'high';
|
|
508
|
+
/**
|
|
509
|
+
* A task on the company board.
|
|
510
|
+
*
|
|
511
|
+
* Tasks are how work is tracked before and after it runs; assignments are
|
|
512
|
+
* the runs themselves. A task can be planned into subtasks, each given to
|
|
513
|
+
* one agent, and executed in dependency order. The planning decision - one
|
|
514
|
+
* agent or a split, and who - is made by a cheap model reading the board and
|
|
515
|
+
* the org chart (see org/planner.ts).
|
|
516
|
+
*/
|
|
517
|
+
export interface Task {
|
|
518
|
+
id: string;
|
|
519
|
+
orgId: string;
|
|
520
|
+
projectId?: string;
|
|
521
|
+
/** The task this is a subtask of. */
|
|
522
|
+
parentId?: string;
|
|
523
|
+
title: string;
|
|
524
|
+
description: string;
|
|
525
|
+
status: TaskStatus;
|
|
526
|
+
priority: TaskPriority;
|
|
527
|
+
/** Agent the task is (planned to be) done by. */
|
|
528
|
+
assigneeId?: string;
|
|
529
|
+
/** The assignment that ran it, once it did. */
|
|
530
|
+
assignmentId?: string;
|
|
531
|
+
createdBy: RequesterKind;
|
|
532
|
+
createdByAgentId?: string;
|
|
533
|
+
/** Sibling task ids that must finish first. */
|
|
534
|
+
dependsOn: string[];
|
|
535
|
+
/** Why the planner decided what it decided. */
|
|
536
|
+
planNote?: string;
|
|
537
|
+
result?: string;
|
|
538
|
+
error?: string;
|
|
539
|
+
createdAt: number;
|
|
540
|
+
updatedAt: number;
|
|
541
|
+
startedAt?: number;
|
|
542
|
+
finishedAt?: number;
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Who does the work when a schedule fires: the assistant itself, as a turn
|
|
546
|
+
* of its own in a conversation dedicated to the job, or one agent as an
|
|
547
|
+
* assignment. Either way the outcome lands in the assistant's inbox.
|
|
548
|
+
*/
|
|
549
|
+
export type CronJobKind = 'assistant' | 'agent' | 'sleep' | 'script';
|
|
550
|
+
export interface CronScript {
|
|
551
|
+
/** Absolute path to the reviewed copy under Rookery's imported-scripts directory. */
|
|
552
|
+
path: string;
|
|
553
|
+
runtime: 'python' | 'node' | 'bash' | 'powershell';
|
|
554
|
+
noAgent?: boolean;
|
|
555
|
+
}
|
|
556
|
+
export type CronRunStatus = 'running' | 'done' | 'failed';
|
|
557
|
+
/** Whether the clock started a run or somebody pressed "run now". */
|
|
558
|
+
export type CronTrigger = 'schedule' | 'manual';
|
|
559
|
+
/**
|
|
560
|
+
* A standing order: a prompt that runs on a cron schedule while the server
|
|
561
|
+
* is up. Times are the machine's local time; a five-field expression such as
|
|
562
|
+
* `0 8 * * 1-5` (weekdays at 08:00).
|
|
563
|
+
*/
|
|
564
|
+
export interface CronJob {
|
|
565
|
+
id: string;
|
|
566
|
+
orgId: string;
|
|
567
|
+
name: string;
|
|
568
|
+
/** Five-field cron expression, normalised. */
|
|
569
|
+
schedule: string;
|
|
570
|
+
kind: CronJobKind;
|
|
571
|
+
script?: CronScript;
|
|
572
|
+
/** Remaining attempts for a finite schedule; omitted means unlimited. */
|
|
573
|
+
remainingRuns?: number;
|
|
574
|
+
/** What to do, written for whoever runs it. */
|
|
575
|
+
prompt: string;
|
|
576
|
+
/** The agent, for the `agent` kind. */
|
|
577
|
+
agentId?: string;
|
|
578
|
+
projectId?: string;
|
|
579
|
+
/** The assistant's conversation for this job; one per job, reused across runs. */
|
|
580
|
+
sessionId?: string;
|
|
581
|
+
/** Provider permission for the assistant's own runs; the config default otherwise. */
|
|
582
|
+
permission?: PermissionLevel;
|
|
583
|
+
enabled: boolean;
|
|
584
|
+
/** Fire once, then switch off: "tomorrow at 15:00" rather than "every day". */
|
|
585
|
+
once: boolean;
|
|
586
|
+
createdBy: RequesterKind;
|
|
587
|
+
createdAt: number;
|
|
588
|
+
updatedAt: number;
|
|
589
|
+
/** When the clock will fire next; unset while disabled or unschedulable. */
|
|
590
|
+
nextRunAt?: number;
|
|
591
|
+
lastRunAt?: number;
|
|
592
|
+
lastStatus?: CronRunStatus;
|
|
593
|
+
lastError?: string;
|
|
594
|
+
runCount: number;
|
|
595
|
+
}
|
|
596
|
+
/** One execution of a schedule. */
|
|
597
|
+
export interface CronRun {
|
|
598
|
+
id: string;
|
|
599
|
+
jobId: string;
|
|
600
|
+
orgId: string;
|
|
601
|
+
trigger: CronTrigger;
|
|
602
|
+
status: CronRunStatus;
|
|
603
|
+
startedAt: number;
|
|
604
|
+
finishedAt?: number;
|
|
605
|
+
durationMs?: number;
|
|
606
|
+
result?: string;
|
|
607
|
+
error?: string;
|
|
608
|
+
/** The conversation the assistant ran in, for the `assistant` kind. */
|
|
609
|
+
sessionId?: string;
|
|
610
|
+
/** The assignment that ran, for the `agent` kind. */
|
|
611
|
+
assignmentId?: string;
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* Whole-database counts, every one of them a `COUNT(*)`.
|
|
615
|
+
*
|
|
616
|
+
* They exist because every list endpoint is capped: a total counted from a
|
|
617
|
+
* page of 500 stops being true the moment the cap bites, and a dashboard
|
|
618
|
+
* that quietly rounds down is worse than one that shows nothing. Sessions,
|
|
619
|
+
* messages and memories span the database; the company's numbers belong to
|
|
620
|
+
* the active organisation, the memory numbers to one owner.
|
|
621
|
+
*/
|
|
622
|
+
export interface StatsTotals {
|
|
623
|
+
/** Conversations that are not archived. */
|
|
624
|
+
sessions: number;
|
|
625
|
+
archivedSessions: number;
|
|
626
|
+
/** Transcript rows across every conversation. */
|
|
627
|
+
messages: number;
|
|
628
|
+
assignments: number;
|
|
629
|
+
/** Assignments still pending or running. */
|
|
630
|
+
runningAssignments: number;
|
|
631
|
+
/** Top-level tasks and subtasks together. */
|
|
632
|
+
tasks: number;
|
|
633
|
+
/** Tasks in `open`, `planned` or `running` - what is still ahead. */
|
|
634
|
+
openTasks: number;
|
|
635
|
+
cronJobs: number;
|
|
636
|
+
cronRuns: number;
|
|
637
|
+
/** Live memories of the asked-for owner; the same figure as `memoryStats().total`. */
|
|
638
|
+
memories: number;
|
|
639
|
+
/** Agents that are not archived. */
|
|
640
|
+
agents: number;
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* One local calendar day of the time series.
|
|
644
|
+
*
|
|
645
|
+
* A day only appears once something happened on it. The gaps are left in on
|
|
646
|
+
* purpose: only the client knows which window it means to draw, so filling
|
|
647
|
+
* them is its job, not the database's.
|
|
648
|
+
*
|
|
649
|
+
* Every figure counts what was created that day, whatever became of it
|
|
650
|
+
* since - a conversation archived last week still counts on the day it
|
|
651
|
+
* started. That is why the series and `StatsTotals` answer different
|
|
652
|
+
* questions and need not add up to each other.
|
|
653
|
+
*/
|
|
654
|
+
export interface StatsDay {
|
|
655
|
+
/** Local calendar day, `YYYY-MM-DD`. */
|
|
656
|
+
day: string;
|
|
657
|
+
sessions: number;
|
|
658
|
+
messages: number;
|
|
659
|
+
assignments: number;
|
|
660
|
+
tasks: number;
|
|
661
|
+
cronRuns: number;
|
|
662
|
+
memories: number;
|
|
663
|
+
/** Prompt tokens summed over the day's messages; 0 when none were recorded. */
|
|
664
|
+
inputTokens: number;
|
|
665
|
+
/** Completion tokens, same caveat. */
|
|
666
|
+
outputTokens: number;
|
|
667
|
+
}
|
|
668
|
+
/** What `GET /api/stats` answers with: the counts, and how they came about. */
|
|
669
|
+
export interface StatsSnapshot {
|
|
670
|
+
/** Start of the series window, epoch milliseconds, inclusive. */
|
|
671
|
+
since: number;
|
|
672
|
+
/** End of the window, epoch milliseconds, inclusive - "now" in practice. */
|
|
673
|
+
until: number;
|
|
674
|
+
/** The company the organisation numbers belong to. */
|
|
675
|
+
orgId: string;
|
|
676
|
+
/** The memory bank the memory numbers belong to. */
|
|
677
|
+
owner: string;
|
|
678
|
+
totals: StatsTotals;
|
|
679
|
+
/** Ascending by day, gaps left in. */
|
|
680
|
+
series: StatsDay[];
|
|
681
|
+
/**
|
|
682
|
+
* False when no message in the window carried usage data at all. Then the
|
|
683
|
+
* token figures are zero because nothing was recorded, not because nothing
|
|
684
|
+
* was spent - the difference matters on a chart.
|
|
685
|
+
*/
|
|
686
|
+
tokensAvailable: boolean;
|
|
687
|
+
}
|
|
688
|
+
/** A stdio MCP server the provider CLI should start for this turn. */
|
|
689
|
+
export interface McpServerSpec {
|
|
690
|
+
/** Server name as the CLI sees it; tools become `mcp__<name>__<tool>`. */
|
|
691
|
+
name: string;
|
|
692
|
+
command: string;
|
|
693
|
+
args: string[];
|
|
694
|
+
env: Record<string, string>;
|
|
695
|
+
}
|
|
696
|
+
export interface ProviderTurnOptions {
|
|
697
|
+
prompt: string;
|
|
698
|
+
/** Prepended context: persona, recalled memories, conversation digest. */
|
|
699
|
+
systemPrompt?: string;
|
|
700
|
+
/**
|
|
701
|
+
* `append` adds the system prompt to the CLI's own (a coding agent that
|
|
702
|
+
* knows Rookery); `replace` makes it the whole system prompt (someone who
|
|
703
|
+
* is Rookery). Providers that cannot replace fall back to append.
|
|
704
|
+
*/
|
|
705
|
+
systemPromptMode?: 'append' | 'replace';
|
|
706
|
+
/** Resume the provider's own session rather than starting cold. */
|
|
707
|
+
providerSessionId?: string;
|
|
708
|
+
model?: string;
|
|
709
|
+
/** How hard the model may think. Unset leaves the provider's own default. */
|
|
710
|
+
effort?: EffortLevel;
|
|
711
|
+
cwd?: string;
|
|
712
|
+
/** How much the provider's own tools are allowed to do. */
|
|
713
|
+
permission?: PermissionLevel;
|
|
714
|
+
/** Rookery's own tools, offered to the model through MCP. */
|
|
715
|
+
mcp?: McpServerSpec;
|
|
716
|
+
/** Further MCP servers for this turn, e.g. computer control. */
|
|
717
|
+
mcpExtra?: McpServerSpec[];
|
|
718
|
+
signal?: AbortSignal;
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* - chat: no tools that touch the machine (read-only assistant)
|
|
722
|
+
* - read: may read files and search
|
|
723
|
+
* - write: may edit files inside cwd
|
|
724
|
+
* - full: may run commands, still inside the provider's own sandbox rules
|
|
725
|
+
*/
|
|
726
|
+
export type PermissionLevel = 'chat' | 'read' | 'write' | 'full';
|
|
727
|
+
/**
|
|
728
|
+
* Reasoning effort, the same ladder for every provider. Both CLIs take the
|
|
729
|
+
* value verbatim; whether a given model supports the top levels is theirs to
|
|
730
|
+
* report.
|
|
731
|
+
*/
|
|
732
|
+
export declare const EFFORT_LEVELS: readonly ["low", "medium", "high", "xhigh", "max"];
|
|
733
|
+
export type EffortLevel = (typeof EFFORT_LEVELS)[number];
|
|
734
|
+
export interface ProviderModel {
|
|
735
|
+
id: string;
|
|
736
|
+
name: string;
|
|
737
|
+
description?: string;
|
|
738
|
+
isDefault?: boolean;
|
|
739
|
+
}
|
|
740
|
+
export interface ProviderStatus {
|
|
741
|
+
id: ProviderId;
|
|
742
|
+
available: boolean;
|
|
743
|
+
binary: string;
|
|
744
|
+
version?: string;
|
|
745
|
+
authenticated: boolean;
|
|
746
|
+
/** Human-readable reason when unavailable or logged out. */
|
|
747
|
+
detail?: string;
|
|
748
|
+
}
|
|
749
|
+
export interface Provider {
|
|
750
|
+
readonly id: ProviderId;
|
|
751
|
+
readonly displayName: string;
|
|
752
|
+
/** Probe binary and login state. Cheap enough to call on startup. */
|
|
753
|
+
status(): Promise<ProviderStatus>;
|
|
754
|
+
/** Run one turn, streaming normalised events. */
|
|
755
|
+
run(options: ProviderTurnOptions): AsyncGenerator<AgentEvent, void, unknown>;
|
|
756
|
+
/** Models this provider accepts, for UI pickers. */
|
|
757
|
+
models(): string[] | Promise<ProviderModel[]>;
|
|
758
|
+
}
|
|
759
|
+
export interface RookeryConfig {
|
|
760
|
+
/** Root for db, logs and config. Defaults to ~/.rookery */
|
|
761
|
+
home: string;
|
|
762
|
+
/**
|
|
763
|
+
* Directory the assistant's own provider process runs in. Defaults to
|
|
764
|
+
* `<home>/workspace`, so the assistant never sees the directory Rookery
|
|
765
|
+
* happened to be started from.
|
|
766
|
+
*/
|
|
767
|
+
workspace: string;
|
|
768
|
+
port: number;
|
|
769
|
+
host: string;
|
|
770
|
+
defaultProvider: ProviderId;
|
|
771
|
+
defaultModel?: string;
|
|
772
|
+
/** Unset means each provider's own default effort. */
|
|
773
|
+
defaultEffort?: EffortLevel;
|
|
774
|
+
defaultPermission: PermissionLevel;
|
|
775
|
+
/** Shared secret for non-loopback access. Empty disables remote auth. */
|
|
776
|
+
token: string;
|
|
777
|
+
logLevel: 'debug' | 'info' | 'warn' | 'error' | 'silent';
|
|
778
|
+
memory: MemoryConfig;
|
|
779
|
+
voice: VoiceConfig;
|
|
780
|
+
org: OrgConfig;
|
|
781
|
+
gateways: GatewaysConfig;
|
|
782
|
+
/** The MCP hub: which servers run for whom. */
|
|
783
|
+
tools: ToolsConfig;
|
|
784
|
+
/** Where skills live, one folder per skill. Defaults to `<home>/skills`. */
|
|
785
|
+
skillsDir: string;
|
|
786
|
+
/** Name the assistant answers to, used in the persona and as wake word base. */
|
|
787
|
+
assistantName: string;
|
|
788
|
+
userName?: string;
|
|
789
|
+
/** Address the user formally: German "Sie", never "du"; formal register elsewhere. */
|
|
790
|
+
formalAddress: boolean;
|
|
791
|
+
/** What the assistant calls the user now and then, e.g. "Master" or "Sir". Empty: the name. */
|
|
792
|
+
honorific: string;
|
|
793
|
+
}
|
|
794
|
+
export interface MemoryConfig {
|
|
795
|
+
enabled: boolean;
|
|
796
|
+
/** Max memories injected into a single turn's context. */
|
|
797
|
+
recallLimit: number;
|
|
798
|
+
/** Minimum blended score for a memory to be injected. */
|
|
799
|
+
recallThreshold: number;
|
|
800
|
+
/** Run fact extraction after each turn. */
|
|
801
|
+
autoExtract: boolean;
|
|
802
|
+
/** Turns kept verbatim before older ones get summarised. */
|
|
803
|
+
workingWindow: number;
|
|
804
|
+
/** Rough character budget for the assembled context block. */
|
|
805
|
+
contextBudget: number;
|
|
806
|
+
/** The gate in front of the write path: what may become a memory at all. */
|
|
807
|
+
gate: MemoryGateConfig;
|
|
808
|
+
/** The second hop: how far recall reaches past a literal match. */
|
|
809
|
+
graph: MemoryGraphConfig;
|
|
810
|
+
/** The nightly clean-up. */
|
|
811
|
+
sleep: SleepConfig;
|
|
812
|
+
}
|
|
813
|
+
export interface MemoryGateConfig {
|
|
814
|
+
/** How many candidates one turn may store at most. */
|
|
815
|
+
maxPerTurn: number;
|
|
816
|
+
/** Candidates below this are dropped unless they name a known entity. */
|
|
817
|
+
minImportance: number;
|
|
818
|
+
/** Similarity at or above which a candidate reinforces instead of inserting. */
|
|
819
|
+
duplicateThreshold: number;
|
|
820
|
+
/** Similarity at or above which two memories are queued for the night. */
|
|
821
|
+
clusterThreshold: number;
|
|
822
|
+
}
|
|
823
|
+
export interface MemoryGraphConfig {
|
|
824
|
+
/** Score a memory inherits through a shared entity. */
|
|
825
|
+
hopEntity: number;
|
|
826
|
+
/** Score a memory inherits through a `refines` or `caused_by` edge. */
|
|
827
|
+
hopEdge: number;
|
|
828
|
+
/** Hard cap on nodes handed to the graph view. */
|
|
829
|
+
maxNodes: number;
|
|
830
|
+
}
|
|
831
|
+
export interface SleepConfig {
|
|
832
|
+
enabled: boolean;
|
|
833
|
+
/** Five-field cron expression for the nightly run. */
|
|
834
|
+
schedule: string;
|
|
835
|
+
/** Which banks sleep: only the assistant's, or every agent's too. */
|
|
836
|
+
scope: 'assistant' | 'all';
|
|
837
|
+
/** Upper bound on condensation calls per night. */
|
|
838
|
+
maxMergeCalls: number;
|
|
839
|
+
/** Untouched for this long and weak enough, a memory goes dormant. */
|
|
840
|
+
dormantAfterDays: number;
|
|
841
|
+
/** Blended strength below which a memory may be put to sleep. */
|
|
842
|
+
minStrength: number;
|
|
843
|
+
/** How many insights one night may write. */
|
|
844
|
+
insights: number;
|
|
845
|
+
/**
|
|
846
|
+
* How often the three stages repeat in one night. More than one because
|
|
847
|
+
* deep sleep changes what dream sleep has to work with.
|
|
848
|
+
*/
|
|
849
|
+
cycles: number;
|
|
850
|
+
/** Upper bound on contradiction decisions per night. */
|
|
851
|
+
maxResolveCalls: number;
|
|
852
|
+
/** An agent bank sleeps only after this many new memories. */
|
|
853
|
+
agentThreshold: number;
|
|
854
|
+
/**
|
|
855
|
+
* Model for condensing and linking. Not the cheapest one on purpose:
|
|
856
|
+
* deciding that two sentences mean the same thing, and writing the one
|
|
857
|
+
* sentence that replaces both, is a judgement call. A weak model merges
|
|
858
|
+
* things that do not belong together. Empty falls back to the provider's
|
|
859
|
+
* small default.
|
|
860
|
+
*/
|
|
861
|
+
model: string;
|
|
862
|
+
/**
|
|
863
|
+
* Model for the single nightly insight call. It is the hardest thing the
|
|
864
|
+
* system does and it happens once a night, so it is worth paying for.
|
|
865
|
+
* Empty means "same as `model`".
|
|
866
|
+
*/
|
|
867
|
+
insightModel: string;
|
|
868
|
+
}
|
|
869
|
+
/**
|
|
870
|
+
* Computer control: the assistant sees the screen and works mouse and
|
|
871
|
+
* keyboard through a second MCP server. Off by default; the user switches
|
|
872
|
+
* it on, never the assistant.
|
|
873
|
+
*/
|
|
874
|
+
export declare const COMPUTER_PROFILES: readonly ["core", "ax", "scripting", "windows-admin", "full"];
|
|
875
|
+
/** How much authority the zavora engine gets: observation and input up to scripting and admin. */
|
|
876
|
+
export type ComputerProfile = (typeof COMPUTER_PROFILES)[number];
|
|
877
|
+
/** Who gets a tool server or a skill: the assistant, the agents, or both. */
|
|
878
|
+
export type ToolServerAudience = 'assistant' | 'agents' | 'both';
|
|
879
|
+
/** One MCP server in the hub: a catalogue entry the user configured, or a custom one. */
|
|
880
|
+
export interface ToolServerConfig {
|
|
881
|
+
/** Catalogue id, or `custom-<slug>`. */
|
|
882
|
+
id: string;
|
|
883
|
+
enabled: boolean;
|
|
884
|
+
audience: ToolServerAudience;
|
|
885
|
+
/** Catalogue option values, e.g. the computer profile or the browser. */
|
|
886
|
+
options: Record<string, string>;
|
|
887
|
+
/** Environment for the server process: API keys and the like. */
|
|
888
|
+
env: Record<string, string>;
|
|
889
|
+
/** Custom servers only: how to start it and what to tell the model. */
|
|
890
|
+
custom?: {
|
|
891
|
+
name: string;
|
|
892
|
+
command: string;
|
|
893
|
+
args: string[];
|
|
894
|
+
hint: string;
|
|
895
|
+
};
|
|
896
|
+
/**
|
|
897
|
+
* Project ids this server is limited to. Empty or unset: every project
|
|
898
|
+
* (and the workspace), the behaviour before this field existed.
|
|
899
|
+
*/
|
|
900
|
+
projectIds?: string[];
|
|
901
|
+
}
|
|
902
|
+
export interface ToolsConfig {
|
|
903
|
+
servers: ToolServerConfig[];
|
|
904
|
+
}
|
|
905
|
+
export interface OrgConfig {
|
|
906
|
+
/** Provider processes that may run assignments at the same time. */
|
|
907
|
+
maxConcurrentAssignments: number;
|
|
908
|
+
/** How deep delegation chains may nest below the assistant. */
|
|
909
|
+
maxDelegationDepth: number;
|
|
910
|
+
/** Hard stop for a single assignment, in milliseconds. */
|
|
911
|
+
assignmentTimeoutMs: number;
|
|
912
|
+
/**
|
|
913
|
+
* Put the Ponytail ruleset (org/ponytail.ts) into every agent's system
|
|
914
|
+
* prompt: understand the problem, then stop at the first rung of the
|
|
915
|
+
* laziness ladder that holds. Costs roughly 600 tokens per run and pays for
|
|
916
|
+
* itself on anything that writes code. Off leaves agents to their own
|
|
917
|
+
* judgement.
|
|
918
|
+
*/
|
|
919
|
+
lazyCoding: boolean;
|
|
920
|
+
/** Explicitly chosen company; the newest one otherwise. */
|
|
921
|
+
activeOrganizationId?: string;
|
|
922
|
+
}
|
|
923
|
+
/** Which chat gateway a config section belongs to. Only Telegram for now. */
|
|
924
|
+
export type GatewayId = 'telegram';
|
|
925
|
+
export interface GatewaysConfig {
|
|
926
|
+
telegram: TelegramGatewayConfig;
|
|
927
|
+
}
|
|
928
|
+
export interface TelegramGatewayConfig {
|
|
929
|
+
/** Channel on/off. */
|
|
930
|
+
enabled: boolean;
|
|
931
|
+
/**
|
|
932
|
+
* The bot token from BotFather. It lives here, beside `RookeryConfig.token`
|
|
933
|
+
* and under the same file permissions, rather than in an environment file:
|
|
934
|
+
* both are local user state, and a channel that can only be set up by
|
|
935
|
+
* editing a dotfile and restarting cannot be set up from the page that
|
|
936
|
+
* exists to set it up. `TELEGRAM_BOT_TOKEN` still wins where it is set, for
|
|
937
|
+
* headless installs.
|
|
938
|
+
*
|
|
939
|
+
* It must never reach a browser. `publicConfig` blanks it on the way out,
|
|
940
|
+
* exactly as it drops the bearer token, and `GatewayStatus` reports only
|
|
941
|
+
* whether one is present and where it came from.
|
|
942
|
+
*/
|
|
943
|
+
token: string;
|
|
944
|
+
/**
|
|
945
|
+
* Numeric Telegram user ids allowed to talk to the assistant through this
|
|
946
|
+
* gateway. Empty means off, on purpose: there is no "everyone" option,
|
|
947
|
+
* because a bot token that ends up in the wrong hands must not become an
|
|
948
|
+
* open door into the assistant.
|
|
949
|
+
*/
|
|
950
|
+
allowedUserIds: number[];
|
|
951
|
+
/**
|
|
952
|
+
* Pairing mode: run the poller with an empty allowlist so `/id` can answer.
|
|
953
|
+
*
|
|
954
|
+
* Without it the first setup is a closed loop - the allowlist needs a
|
|
955
|
+
* number, the number comes from asking the bot, and the bot does not listen
|
|
956
|
+
* until the allowlist has a number in it. While this is on, every message
|
|
957
|
+
* still fails the guard as `not_allowed`; the single thing that comes back
|
|
958
|
+
* is the sender's own id, which tells them nothing they did not already
|
|
959
|
+
* know. What it does cost is the silence: a stranger who found the bot
|
|
960
|
+
* learns it is alive. Hence a switch the user throws on purpose, off by
|
|
961
|
+
* default, and cleared again as soon as the first id is allowed.
|
|
962
|
+
*/
|
|
963
|
+
pairing: boolean;
|
|
964
|
+
/** Rights for turns that arrive through this channel. */
|
|
965
|
+
permission: PermissionLevel;
|
|
966
|
+
model?: string;
|
|
967
|
+
push: TelegramPushConfig;
|
|
968
|
+
}
|
|
969
|
+
export interface TelegramPushConfig {
|
|
970
|
+
enabled: boolean;
|
|
971
|
+
assignments: boolean;
|
|
972
|
+
cron: boolean;
|
|
973
|
+
sleep: boolean;
|
|
974
|
+
tasks: boolean;
|
|
975
|
+
/** "22:00"; empty means no quiet hours. */
|
|
976
|
+
quietFrom: string;
|
|
977
|
+
/** "08:00" */
|
|
978
|
+
quietUntil: string;
|
|
979
|
+
maxPerHour: number;
|
|
980
|
+
/** Subset of allowedUserIds; empty falls back to the first allowed id. */
|
|
981
|
+
recipients: number[];
|
|
982
|
+
}
|
|
983
|
+
/**
|
|
984
|
+
* The assistant's own initiative to reach the user: something worth saying
|
|
985
|
+
* without a conversation running. Carried from the `notify` tool through
|
|
986
|
+
* `Assistant`'s event stream to whatever channel is listening - Telegram
|
|
987
|
+
* push, today - which decides how (and whether quiet hours apply); nothing
|
|
988
|
+
* in core ever sends it anywhere itself.
|
|
989
|
+
*/
|
|
990
|
+
export interface NotifyEvent {
|
|
991
|
+
text: string;
|
|
992
|
+
urgency: 'normal' | 'high';
|
|
993
|
+
at: number;
|
|
994
|
+
}
|
|
995
|
+
/**
|
|
996
|
+
* Where spoken answers are synthesised.
|
|
997
|
+
*
|
|
998
|
+
* browser - the browser's own speechSynthesis; no server round trip.
|
|
999
|
+
* edge - Microsoft Edge neural voices, via the server. Free, no key.
|
|
1000
|
+
* elevenlabs - ElevenLabs, needs ELEVENLABS_API_KEY in the server's env.
|
|
1001
|
+
* openai - OpenAI gpt-4o-mini-tts, needs OPENAI_API_KEY in the env.
|
|
1002
|
+
*/
|
|
1003
|
+
export type VoiceEngine = 'browser' | 'edge' | 'elevenlabs' | 'openai';
|
|
1004
|
+
export interface VoiceConfig {
|
|
1005
|
+
enabled: boolean;
|
|
1006
|
+
/** Spoken wake word for hands-free mode in the web UI. */
|
|
1007
|
+
wakeWord: string;
|
|
1008
|
+
/** BCP-47 tag for speech recognition and synthesis. */
|
|
1009
|
+
lang: string;
|
|
1010
|
+
/** Preferred SpeechSynthesis voice name; empty picks the best local match. */
|
|
1011
|
+
voiceName: string;
|
|
1012
|
+
rate: number;
|
|
1013
|
+
pitch: number;
|
|
1014
|
+
/** Strip code blocks and markdown before speaking. */
|
|
1015
|
+
speakCleanText: boolean;
|
|
1016
|
+
/** Which synthesiser produces the voice. */
|
|
1017
|
+
engine: VoiceEngine;
|
|
1018
|
+
/** Edge neural voice short name, e.g. `en-GB-RyanNeural`. */
|
|
1019
|
+
edgeVoice: string;
|
|
1020
|
+
/** ElevenLabs voice id; empty falls back to the library's default voice. */
|
|
1021
|
+
elevenLabsVoiceId: string;
|
|
1022
|
+
/** ElevenLabs model: v2 for quality, flash for latency, v3 for expressiveness. */
|
|
1023
|
+
elevenLabsModel: 'eleven_multilingual_v2' | 'eleven_flash_v2_5' | 'eleven_v3';
|
|
1024
|
+
/** OpenAI voice name, e.g. `onyx`. */
|
|
1025
|
+
openaiVoice: string;
|
|
1026
|
+
/** Light EQ and comms-style slapback on playback, for the Jarvis feel. */
|
|
1027
|
+
jarvisEffect: boolean;
|
|
1028
|
+
/** How spoken answers are phrased: plain, or the composed butler register. */
|
|
1029
|
+
style: 'neutral' | 'jarvis';
|
|
1030
|
+
}
|
|
1031
|
+
//# sourceMappingURL=types.d.ts.map
|