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,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ponytail: the lazy-senior-dev ruleset for agents that write code.
|
|
3
|
+
*
|
|
4
|
+
* Vendored verbatim from DietrichGebert/ponytail, `AGENTS.md`, MIT licence,
|
|
5
|
+
* pinned at commit b6c04480c03e8db2f035751d7c46289779ec3362. Only the closing
|
|
6
|
+
* line about the ponytail repository itself is dropped, because no agent of
|
|
7
|
+
* ours works on it.
|
|
8
|
+
*
|
|
9
|
+
* Vendored rather than installed: Ponytail ships as a Claude Code / Codex
|
|
10
|
+
* plugin, and our provider processes run with `--setting-sources ''` (see
|
|
11
|
+
* providers/claude-code.ts), so no plugin, hook or settings file of the host
|
|
12
|
+
* ever reaches them. The ruleset is 2.6 KB of prose; carrying the text is far
|
|
13
|
+
* less machinery than teaching the spawn path to load plugins.
|
|
14
|
+
*
|
|
15
|
+
* Pinned on purpose. This text steers how every agent writes code, and that
|
|
16
|
+
* is not something that should change quietly under us when upstream edits
|
|
17
|
+
* its main branch. Re-pin deliberately, and read the diff first.
|
|
18
|
+
*
|
|
19
|
+
* It is prose, not a prompt template: nothing here is interpolated, and the
|
|
20
|
+
* skill of the same name (`skills/import.ts`, the curated shelf) carries the
|
|
21
|
+
* same ladder for agents that want to open it explicitly.
|
|
22
|
+
*/
|
|
23
|
+
export const PONYTAIL_RULESET = `Lazy senior dev mode.
|
|
24
|
+
|
|
25
|
+
You are a lazy senior developer. Lazy means efficient, not careless. The best code is the code never written.
|
|
26
|
+
|
|
27
|
+
Before writing any code, stop at the first rung that holds:
|
|
28
|
+
|
|
29
|
+
1. Does this need to be built at all? (YAGNI)
|
|
30
|
+
2. Does it already exist in this codebase? Reuse the helper, util, or pattern that's already here, don't re-write it.
|
|
31
|
+
3. Does the standard library already do this? Use it.
|
|
32
|
+
4. Does a native platform feature cover it? Use it.
|
|
33
|
+
5. Does an already-installed dependency solve it? Use it.
|
|
34
|
+
6. Can this be one line? Make it one line.
|
|
35
|
+
7. Only then: write the minimum code that works.
|
|
36
|
+
|
|
37
|
+
The ladder runs after you understand the problem, not instead of it: read the task and the code it touches, trace the real flow end to end, then climb.
|
|
38
|
+
|
|
39
|
+
Bug fix = root cause, not symptom: a report names a symptom. Grep every caller of the function you touch and fix the shared function once - one guard there is a smaller diff than one per caller, and patching only the path the ticket names leaves a sibling caller still broken.
|
|
40
|
+
|
|
41
|
+
Rules:
|
|
42
|
+
|
|
43
|
+
- No abstractions that weren't explicitly requested.
|
|
44
|
+
- No new dependency if it can be avoided.
|
|
45
|
+
- No boilerplate nobody asked for.
|
|
46
|
+
- Deletion over addition. Boring over clever. Fewest files possible.
|
|
47
|
+
- Shortest working diff wins, but only once you understand the problem. The smallest change in the wrong place isn't lazy, it's a second bug.
|
|
48
|
+
- Question complex requests: "Do you actually need X, or does Y cover it?"
|
|
49
|
+
- Pick the edge-case-correct option when two stdlib approaches are the same size, lazy means less code, not the flimsier algorithm.
|
|
50
|
+
- Mark deliberate simplifications that cut a real corner with a known ceiling (global lock, O(n^2) scan, naive heuristic) with a \`ponytail:\` comment naming the ceiling and upgrade path.
|
|
51
|
+
|
|
52
|
+
Not lazy about: understanding the problem (read it fully and trace the real flow before picking a rung, a small diff you don't understand is just laziness dressed up as efficiency), input validation at trust boundaries, error handling that prevents data loss, security, accessibility, the calibration real hardware needs (the platform is never the spec ideal, a clock drifts, a sensor reads off), anything explicitly requested. Lazy code without its check is unfinished: non-trivial logic leaves ONE runnable check behind, the smallest thing that fails if the logic breaks (an assert-based demo/self-check or one small test file; no frameworks, no fixtures). Trivial one-liners need no test.`;
|
|
53
|
+
//# sourceMappingURL=ponytail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ponytail.js","sourceRoot":"","sources":["../../src/org/ponytail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;orBA6BopB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { McpServerSpec } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* A project's own `.mcp.json`: the same file a person's own Claude Code
|
|
4
|
+
* session in that folder would already read. Rookery reads it centrally,
|
|
5
|
+
* once, and turns it into the generic `McpServerSpec[]` every provider
|
|
6
|
+
* adapter already accepts (`ProviderTurnOptions.mcpExtra`) - so Codex, a
|
|
7
|
+
* future provider, and Claude Code all get the same servers through their
|
|
8
|
+
* own existing serializer, with nothing provider-specific added here.
|
|
9
|
+
*
|
|
10
|
+
* `.mcp.json` starts real processes, unlike a skill, which is just prose -
|
|
11
|
+
* so a project only gets its servers once a person has approved it (see
|
|
12
|
+
* `projectMcpStatus`), and a later edit to the file is noticed because the
|
|
13
|
+
* fingerprint no longer matches.
|
|
14
|
+
*/
|
|
15
|
+
export interface ProjectMcpFile {
|
|
16
|
+
/** The raw file content, for fingerprinting and for showing the user. */
|
|
17
|
+
raw: string;
|
|
18
|
+
servers: McpServerSpec[];
|
|
19
|
+
}
|
|
20
|
+
export declare function projectMcpPath(projectPath: string): string;
|
|
21
|
+
/** Reads and parses a project's `.mcp.json`; null when there is none or it does not parse. */
|
|
22
|
+
export declare function readProjectMcpFile(projectPath: string): ProjectMcpFile | null;
|
|
23
|
+
/** A short fingerprint of the file's content, so a later edit is noticed. */
|
|
24
|
+
export declare function fingerprintMcpFile(raw: string): string;
|
|
25
|
+
export type ProjectMcpStatus = 'none' | 'pending' | 'trusted' | 'changed';
|
|
26
|
+
/** Where a project stands: no file (or an empty one), never decided, approved and unchanged, or approved but the file moved on since. */
|
|
27
|
+
export declare function projectMcpStatus(file: ProjectMcpFile | null, trust: {
|
|
28
|
+
fingerprint: string;
|
|
29
|
+
} | undefined): ProjectMcpStatus;
|
|
30
|
+
/** One line per server, for a tool result. */
|
|
31
|
+
export declare function renderProjectMcpServers(servers: McpServerSpec[]): string;
|
|
32
|
+
//# sourceMappingURL=project-mcp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-mcp.d.ts","sourceRoot":"","sources":["../../src/org/project-mcp.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,cAAc;IAC7B,yEAAyE;IACzE,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,aAAa,EAAE,CAAC;CAC1B;AAED,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,8FAA8F;AAC9F,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CA2B7E;AAED,6EAA6E;AAC7E,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAE1E,yIAAyI;AACzI,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,cAAc,GAAG,IAAI,EAC3B,KAAK,EAAE;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,GACzC,gBAAgB,CAIlB;AAED,8CAA8C;AAC9C,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,MAAM,CAGxE"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
export function projectMcpPath(projectPath) {
|
|
5
|
+
return join(projectPath, '.mcp.json');
|
|
6
|
+
}
|
|
7
|
+
/** Reads and parses a project's `.mcp.json`; null when there is none or it does not parse. */
|
|
8
|
+
export function readProjectMcpFile(projectPath) {
|
|
9
|
+
const file = projectMcpPath(projectPath);
|
|
10
|
+
if (!existsSync(file))
|
|
11
|
+
return null;
|
|
12
|
+
let raw;
|
|
13
|
+
try {
|
|
14
|
+
raw = readFileSync(file, 'utf8');
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
try {
|
|
20
|
+
const doc = JSON.parse(raw);
|
|
21
|
+
const servers = Object.entries(doc.mcpServers ?? {})
|
|
22
|
+
.filter((entry) => typeof entry[1]?.command === 'string')
|
|
23
|
+
.map(([name, server]) => ({
|
|
24
|
+
name,
|
|
25
|
+
command: server.command,
|
|
26
|
+
args: server.args ?? [],
|
|
27
|
+
env: server.env ?? {},
|
|
28
|
+
}));
|
|
29
|
+
return { raw, servers };
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** A short fingerprint of the file's content, so a later edit is noticed. */
|
|
36
|
+
export function fingerprintMcpFile(raw) {
|
|
37
|
+
return createHash('sha256').update(raw).digest('hex').slice(0, 16);
|
|
38
|
+
}
|
|
39
|
+
/** Where a project stands: no file (or an empty one), never decided, approved and unchanged, or approved but the file moved on since. */
|
|
40
|
+
export function projectMcpStatus(file, trust) {
|
|
41
|
+
if (!file || !file.servers.length)
|
|
42
|
+
return 'none';
|
|
43
|
+
if (!trust)
|
|
44
|
+
return 'pending';
|
|
45
|
+
return trust.fingerprint === fingerprintMcpFile(file.raw) ? 'trusted' : 'changed';
|
|
46
|
+
}
|
|
47
|
+
/** One line per server, for a tool result. */
|
|
48
|
+
export function renderProjectMcpServers(servers) {
|
|
49
|
+
if (!servers.length)
|
|
50
|
+
return "No MCP servers in this project's .mcp.json.";
|
|
51
|
+
return servers.map((server) => '- ' + server.name + ': ' + server.command + ' ' + server.args.join(' ')).join('\n');
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=project-mcp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-mcp.js","sourceRoot":"","sources":["../../src/org/project-mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAuBjC,MAAM,UAAU,cAAc,CAAC,WAAmB;IAChD,OAAO,IAAI,CAAC,WAAW,EAAE,WAAW,CA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AACzI,MAAM,UAAU,gBAAgB,CAC9B,IAA2B,EAC3B,KAA0C;IAE1C,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM;QAAE,OAAO,MAAM,CAAC;IACjD,IAAI,CAAC,KAAK;QAAE,OAAO,SAAS,CAAC;IAC7B,OAAO,KAAK,CAAC,WAAW,KAAK,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;AACpF,CAAC;AAED,8CAA8C;AAC9C,MAAM,UAAU,uBAAuB,CAAC,OAAwB;IAC9D,IAAI,CAAC,OAAO,CAAC,MAAM;QAAE,OAAO,6CAA6C,CAAC;IAC1E,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC,OAAO,GAAG,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACtH,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { Agent, AgentMessage, Assignment, CronJob, Message, Organization, Project, RookeryConfig, ScoredMemory, Task, Team } from '../types.js';
|
|
2
|
+
import type { OrgStore } from './store.js';
|
|
3
|
+
/**
|
|
4
|
+
* Prompt text for the organisation.
|
|
5
|
+
*
|
|
6
|
+
* Two kinds of prompt come out of here. The assistant's turn gets a block
|
|
7
|
+
* describing the company it runs and how to use its tools; it is appended to
|
|
8
|
+
* the ordinary identity prompt. An agent's assignment gets a complete system
|
|
9
|
+
* prompt of its own, pointedly not built on the assistant's identity: an
|
|
10
|
+
* agent is a member of staff, and its notes must never read like the
|
|
11
|
+
* assistant speaking to the user.
|
|
12
|
+
*/
|
|
13
|
+
/** Everything a prompt needs to know about the company. */
|
|
14
|
+
export interface OrgSnapshot {
|
|
15
|
+
organization: Organization;
|
|
16
|
+
teams: Team[];
|
|
17
|
+
agents: Agent[];
|
|
18
|
+
projects: Project[];
|
|
19
|
+
/** Assignments currently pending or running. */
|
|
20
|
+
active: Assignment[];
|
|
21
|
+
}
|
|
22
|
+
/** The org chart as plain text, shared by the overview tool and the prompts. */
|
|
23
|
+
export declare function renderOrgOverview(snapshot: OrgSnapshot): string;
|
|
24
|
+
/** Inbox lines for a prompt; empty string when there is nothing unread. */
|
|
25
|
+
export declare function renderInbox(messages: AgentMessage[], snapshot: OrgSnapshot, heading: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* The block appended to the assistant's identity prompt: what it runs, how
|
|
28
|
+
* to delegate, and what arrived in its inbox since the last turn.
|
|
29
|
+
*/
|
|
30
|
+
export declare function assistantOrgBlock(config: RookeryConfig, snapshot: OrgSnapshot, inbox: AgentMessage[], activeProject?: Project, schedules?: CronJob[]): string;
|
|
31
|
+
/** The schedules, one line each, as the assistant's prompt and the list tool show them. */
|
|
32
|
+
export declare function renderSchedules(schedules: CronJob[], snapshot: OrgSnapshot): string;
|
|
33
|
+
export interface AgentPromptInput {
|
|
34
|
+
config: RookeryConfig;
|
|
35
|
+
agent: Agent;
|
|
36
|
+
snapshot: OrgSnapshot;
|
|
37
|
+
project?: Project;
|
|
38
|
+
memories: ScoredMemory[];
|
|
39
|
+
inbox: AgentMessage[];
|
|
40
|
+
assignmentId: string;
|
|
41
|
+
/** Who gave the assignment, for the prompt's sense of the chain of command. */
|
|
42
|
+
requestedBy: string;
|
|
43
|
+
/** One paragraph per tool server attached to this run, from the hub. */
|
|
44
|
+
toolHints?: string[];
|
|
45
|
+
/** The skills index, when there are skills for agents. */
|
|
46
|
+
skillsIndex?: string;
|
|
47
|
+
}
|
|
48
|
+
/** The complete system prompt for one agent running one assignment. */
|
|
49
|
+
export declare function buildAgentPrompt(input: AgentPromptInput): string;
|
|
50
|
+
/** The board as the assistant reads it. */
|
|
51
|
+
export declare function renderBoard(tasks: Task[], snapshot: OrgSnapshot, store: OrgStore): string;
|
|
52
|
+
export interface AgentChatPromptInput {
|
|
53
|
+
config: RookeryConfig;
|
|
54
|
+
agent: Agent;
|
|
55
|
+
snapshot: OrgSnapshot;
|
|
56
|
+
memories: ScoredMemory[];
|
|
57
|
+
inbox: AgentMessage[];
|
|
58
|
+
history?: Message[];
|
|
59
|
+
resumed: boolean;
|
|
60
|
+
project?: Project;
|
|
61
|
+
toolHints?: string[];
|
|
62
|
+
skillsIndex?: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The system prompt for a direct conversation between the user and one
|
|
66
|
+
* agent - a direct message in the company chat. The agent speaks as itself,
|
|
67
|
+
* knows its place in the company, and may hand work to its reports, but it
|
|
68
|
+
* is not the assistant and does not pretend to be.
|
|
69
|
+
*/
|
|
70
|
+
export declare function buildAgentChatPrompt(input: AgentChatPromptInput): string;
|
|
71
|
+
//# sourceMappingURL=prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/org/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,YAAY,EACZ,UAAU,EACV,OAAO,EACP,OAAO,EACP,YAAY,EACZ,OAAO,EACP,aAAa,EACb,YAAY,EACZ,IAAI,EACJ,IAAI,EACL,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAM3C;;;;;;;;;GASG;AAEH,2DAA2D;AAC3D,MAAM,WAAW,WAAW;IAC1B,YAAY,EAAE,YAAY,CAAC;IAC3B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,gDAAgD;IAChD,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB;AAKD,gFAAgF;AAChF,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,WAAW,GA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,EAAE,CAAC;IACzB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,oBAAoB,GAAG,MAAM,CA4DxE"}
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import { renderMemoryBlock } from '../memory/recall.js';
|
|
2
|
+
import { PONYTAIL_RULESET } from './ponytail.js';
|
|
3
|
+
import { describeCronJob } from '../cron/scheduler.js';
|
|
4
|
+
import { clip, shorten } from '../util/queue.js';
|
|
5
|
+
const agentById = (snapshot) => new Map(snapshot.agents.map((agent) => [agent.id, agent]));
|
|
6
|
+
/** The org chart as plain text, shared by the overview tool and the prompts. */
|
|
7
|
+
export function renderOrgOverview(snapshot) {
|
|
8
|
+
const byId = agentById(snapshot);
|
|
9
|
+
const teamName = new Map(snapshot.teams.map((team) => [team.id, team.name]));
|
|
10
|
+
const lines = [];
|
|
11
|
+
lines.push('Company: ' + snapshot.organization.name);
|
|
12
|
+
if (snapshot.organization.mission)
|
|
13
|
+
lines.push('Mission: ' + snapshot.organization.mission);
|
|
14
|
+
lines.push('');
|
|
15
|
+
lines.push(snapshot.agents.length ? 'Agents:' : 'Agents: none yet. Hire someone before delegating.');
|
|
16
|
+
for (const agent of snapshot.agents) {
|
|
17
|
+
const manager = agent.managerId ? byId.get(agent.managerId) : undefined;
|
|
18
|
+
const bits = [
|
|
19
|
+
'- ' + agent.slug + ' — ' + agent.name + ', ' + agent.title,
|
|
20
|
+
agent.teamId ? 'team: ' + (teamName.get(agent.teamId) ?? '?') : '',
|
|
21
|
+
manager ? 'reports to: ' + manager.slug : 'reports to: the assistant',
|
|
22
|
+
agent.provider ? 'provider: ' + agent.provider : '',
|
|
23
|
+
].filter(Boolean);
|
|
24
|
+
lines.push(bits.join(' · '));
|
|
25
|
+
}
|
|
26
|
+
if (snapshot.teams.length) {
|
|
27
|
+
lines.push('');
|
|
28
|
+
lines.push('Teams:');
|
|
29
|
+
for (const team of snapshot.teams) {
|
|
30
|
+
const lead = team.leadId ? byId.get(team.leadId) : undefined;
|
|
31
|
+
lines.push('- ' + team.name + (team.purpose ? ' — ' + team.purpose : '') + (lead ? ' (lead: ' + lead.slug + ')' : ''));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (snapshot.projects.length) {
|
|
35
|
+
lines.push('');
|
|
36
|
+
lines.push('Projects:');
|
|
37
|
+
for (const project of snapshot.projects) {
|
|
38
|
+
lines.push('- ' + project.name + (project.description ? ' — ' + project.description : '') +
|
|
39
|
+
(project.path ? ' [' + project.path + ']' : ' [no directory]'));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (snapshot.active.length) {
|
|
43
|
+
lines.push('');
|
|
44
|
+
lines.push('Running assignments:');
|
|
45
|
+
for (const assignment of snapshot.active) {
|
|
46
|
+
const agent = byId.get(assignment.agentId);
|
|
47
|
+
lines.push('- ' + assignment.id.slice(0, 8) + ' ' + (agent?.slug ?? '?') + ': ' + clip(assignment.task, 120));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return lines.join('\n');
|
|
51
|
+
}
|
|
52
|
+
/** Inbox lines for a prompt; empty string when there is nothing unread. */
|
|
53
|
+
export function renderInbox(messages, snapshot, heading) {
|
|
54
|
+
if (!messages.length)
|
|
55
|
+
return '';
|
|
56
|
+
const byId = agentById(snapshot);
|
|
57
|
+
const lines = messages.map((message) => {
|
|
58
|
+
const from = message.fromAgentId ? (byId.get(message.fromAgentId)?.slug ?? 'unknown agent') : 'the assistant';
|
|
59
|
+
return '- from ' + from + ': ' + clip(message.content, 600);
|
|
60
|
+
});
|
|
61
|
+
return heading + '\n' + lines.join('\n');
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The block appended to the assistant's identity prompt: what it runs, how
|
|
65
|
+
* to delegate, and what arrived in its inbox since the last turn.
|
|
66
|
+
*/
|
|
67
|
+
export function assistantOrgBlock(config, snapshot, inbox, activeProject, schedules = []) {
|
|
68
|
+
const sections = [];
|
|
69
|
+
sections.push([
|
|
70
|
+
'As the personal assistant described in your saved profile, you run a small company of AI agents on their behalf.',
|
|
71
|
+
'The agents are permanent staff with roles and their own memory; every assignment you give',
|
|
72
|
+
'one runs as a separate process in the background, in the project directory when the project',
|
|
73
|
+
'has one. The rookery tools are yours: `assign` hands a task to one agent and returns the',
|
|
74
|
+
'report (several `assign` calls in one message run in parallel); `create_task`, `plan_task`',
|
|
75
|
+
'and `run_task` put bigger work on the board, decide who does it or how to split it, and',
|
|
76
|
+
'execute it; `hire_agent`, `update_agent`, `create_team`, `update_team`, `create_project` and',
|
|
77
|
+
'`update_project` shape the company when the user asks or when a job clearly needs a role',
|
|
78
|
+
'nobody holds. `list_assignments` is the history of what ran; `cancel_assignment` stops a',
|
|
79
|
+
'stuck or unwanted one, and `update_task` with status "cancelled" stops a running task.',
|
|
80
|
+
'`remember`, `forget` and `search_memory` are your long-term memory of the user;',
|
|
81
|
+
'`get_settings` and `update_settings` are the defaults and limits you work under.',
|
|
82
|
+
'`create_schedule`, `list_schedules`, `update_schedule`, `delete_schedule` and `run_schedule`',
|
|
83
|
+
'are your schedules (cron jobs): standing orders that fire on a timetable without anyone',
|
|
84
|
+
'asking - a turn of your own in a conversation dedicated to the job, or an assignment to an',
|
|
85
|
+
'agent - with the outcome posted to your inbox. Use them whenever the user wants something',
|
|
86
|
+
'regularly ("every morning at 8", "on Fridays") or at a later time ("tomorrow at 15:00", once).',
|
|
87
|
+
'Turn what they say into a cron expression yourself and confirm the time in words.',
|
|
88
|
+
'Nothing here needs permission from anyone: you own the company and its machinery.',
|
|
89
|
+
'Two words to keep apart when you talk to the user: an assignment is',
|
|
90
|
+
'one agent running one brief, with a result; a task is an item on the',
|
|
91
|
+
'board that gets planned and then executed as one or more assignments.',
|
|
92
|
+
'Delegate real work - code, research, analysis, long writing - instead of doing it here;',
|
|
93
|
+
'you have no project files in this conversation.',
|
|
94
|
+
'Most turns are not work at all. Small talk, questions about the user, their day or their',
|
|
95
|
+
'plans, and anything you can answer from memory get a direct, personal reply: talk about',
|
|
96
|
+
'them and what you know of them, never about repositories or tools unless they ask.',
|
|
97
|
+
'When you delegated, report the outcome in your own identity and words; never narrate',
|
|
98
|
+
'tool mechanics.',
|
|
99
|
+
].join(' '));
|
|
100
|
+
sections.push(renderOrgOverview(snapshot));
|
|
101
|
+
if (activeProject) {
|
|
102
|
+
sections.push('Active project for this conversation: ' + activeProject.name +
|
|
103
|
+
(activeProject.path ? ' at ' + activeProject.path : ' (no directory)') +
|
|
104
|
+
'. Assignments default to it.');
|
|
105
|
+
}
|
|
106
|
+
if (schedules.length)
|
|
107
|
+
sections.push(renderSchedules(schedules, snapshot));
|
|
108
|
+
const inboxBlock = renderInbox(inbox, snapshot, 'New messages from your staff since last time:');
|
|
109
|
+
if (inboxBlock)
|
|
110
|
+
sections.push(inboxBlock);
|
|
111
|
+
return sections.join('\n\n');
|
|
112
|
+
}
|
|
113
|
+
/** The schedules, one line each, as the assistant's prompt and the list tool show them. */
|
|
114
|
+
export function renderSchedules(schedules, snapshot) {
|
|
115
|
+
if (!schedules.length)
|
|
116
|
+
return 'No schedules yet.';
|
|
117
|
+
const byId = agentById(snapshot);
|
|
118
|
+
const lines = schedules.map((job) => describeCronJob(job, job.agentId ? byId.get(job.agentId)?.slug : undefined));
|
|
119
|
+
return 'Your schedules (cron jobs, local time):\n' + lines.join('\n');
|
|
120
|
+
}
|
|
121
|
+
/** The complete system prompt for one agent running one assignment. */
|
|
122
|
+
export function buildAgentPrompt(input) {
|
|
123
|
+
const { agent, snapshot, config } = input;
|
|
124
|
+
const byId = agentById(snapshot);
|
|
125
|
+
const team = agent.teamId ? snapshot.teams.find((entry) => entry.id === agent.teamId) : undefined;
|
|
126
|
+
const manager = agent.managerId ? byId.get(agent.managerId) : undefined;
|
|
127
|
+
const reports = snapshot.agents.filter((entry) => entry.managerId === agent.id);
|
|
128
|
+
const sections = [];
|
|
129
|
+
sections.push([
|
|
130
|
+
'You are ' + agent.name + ', ' + agent.title + ' at ' + snapshot.organization.name + ',',
|
|
131
|
+
'a company of AI agents run by the assistant ' + (config.assistantName || 'Rookery') + '.',
|
|
132
|
+
team ? 'You are in the team "' + team.name + '"' + (team.purpose ? ' (' + team.purpose + ')' : '') + '.' : '',
|
|
133
|
+
manager
|
|
134
|
+
? 'Your manager is ' + manager.name + ' (' + manager.slug + ').'
|
|
135
|
+
: 'You report directly to the assistant.',
|
|
136
|
+
reports.length
|
|
137
|
+
? 'Your direct reports: ' + reports.map((entry) => entry.slug + ' (' + entry.title + ')').join(', ') +
|
|
138
|
+
'. You may hand them parts of your work with the assign tool.'
|
|
139
|
+
: 'You have no reports; do the work yourself.',
|
|
140
|
+
'This assignment (' + input.assignmentId.slice(0, 8) + ') was given to you by ' + input.requestedBy + '.',
|
|
141
|
+
]
|
|
142
|
+
.filter(Boolean)
|
|
143
|
+
.join(' '));
|
|
144
|
+
sections.push('Your standing instructions:\n' + agent.instructions);
|
|
145
|
+
// How the work gets done, below the role and above the task: the agent's
|
|
146
|
+
// own instructions still win, because they were written for this job.
|
|
147
|
+
if (config.org.lazyCoding)
|
|
148
|
+
sections.push(PONYTAIL_RULESET);
|
|
149
|
+
if (input.project) {
|
|
150
|
+
sections.push('Project: ' + input.project.name +
|
|
151
|
+
(input.project.description ? ' — ' + input.project.description : '') +
|
|
152
|
+
(input.project.path
|
|
153
|
+
? '. You are working inside its directory: ' + input.project.path + '.'
|
|
154
|
+
: '. It has no directory; you are in a scratch workspace.'));
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
sections.push('You are in a scratch workspace, not a project directory.');
|
|
158
|
+
}
|
|
159
|
+
const memoryBlock = renderMemoryBlock(input.memories, Math.floor(config.memory.contextBudget * 0.4), 'your work');
|
|
160
|
+
if (memoryBlock)
|
|
161
|
+
sections.push(memoryBlock);
|
|
162
|
+
const inboxBlock = renderInbox(input.inbox, snapshot, 'Messages waiting for you:');
|
|
163
|
+
if (inboxBlock)
|
|
164
|
+
sections.push(inboxBlock);
|
|
165
|
+
for (const hint of input.toolHints ?? [])
|
|
166
|
+
sections.push(hint);
|
|
167
|
+
if (input.skillsIndex)
|
|
168
|
+
sections.push(input.skillsIndex);
|
|
169
|
+
// The assistant is told not to accept dead ends; an agent that reports
|
|
170
|
+
// "not possible" after one attempt would hand it one anyway.
|
|
171
|
+
sections.push([
|
|
172
|
+
'Do not come back with a dead end you have not earned. A failed command, a missing file or a',
|
|
173
|
+
'closed door is the first attempt, not the answer: read what the error actually says, change',
|
|
174
|
+
'the approach rather than the parameter, and try a genuinely different route before you report',
|
|
175
|
+
'that something cannot be done. When you do report it, say what you tried and what would',
|
|
176
|
+
'unblock it. Stop short of anything irreversible or consequential the assignment did not ask',
|
|
177
|
+
'for, and never claim a result you have not seen.',
|
|
178
|
+
].join(' '));
|
|
179
|
+
sections.push([
|
|
180
|
+
'Work the assignment and nothing else. Your output is a report to whoever assigned it,',
|
|
181
|
+
'not a chat with the user: lead with the result, then what you changed or found, then open',
|
|
182
|
+
'questions. No preamble, no restating the task. Separate what you verified from what you',
|
|
183
|
+
'assume. Use send_message only for something your manager or the assistant must know',
|
|
184
|
+
'outside this report. Write in the language the assignment is written in.',
|
|
185
|
+
].join(' '));
|
|
186
|
+
sections.push('Today is ' + new Date().toISOString().slice(0, 10) + '.');
|
|
187
|
+
return sections.join('\n\n');
|
|
188
|
+
}
|
|
189
|
+
/** The board as the assistant reads it. */
|
|
190
|
+
export function renderBoard(tasks, snapshot, store) {
|
|
191
|
+
if (!tasks.length)
|
|
192
|
+
return 'The board is empty.';
|
|
193
|
+
const byId = agentById(snapshot);
|
|
194
|
+
const lines = [];
|
|
195
|
+
for (const task of tasks) {
|
|
196
|
+
const assignee = task.assigneeId ? (byId.get(task.assigneeId)?.slug ?? '?') : 'unassigned';
|
|
197
|
+
lines.push('- [' + task.id.slice(0, 8) + '] ' + task.status.toUpperCase() + ' ' + task.priority + ' — ' + task.title +
|
|
198
|
+
' (' + assignee + ')' + (task.planNote ? ' · ' + shorten(task.planNote, 80) : ''));
|
|
199
|
+
for (const child of store.listTasks(task.orgId, { parentId: task.id })) {
|
|
200
|
+
if (child.status === 'cancelled')
|
|
201
|
+
continue;
|
|
202
|
+
const who = child.assigneeId ? (byId.get(child.assigneeId)?.slug ?? '?') : 'unassigned';
|
|
203
|
+
lines.push(' - [' + child.id.slice(0, 8) + '] ' + child.status + ' — ' + child.title + ' (' + who + ')');
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return lines.join('\n');
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* The system prompt for a direct conversation between the user and one
|
|
210
|
+
* agent - a direct message in the company chat. The agent speaks as itself,
|
|
211
|
+
* knows its place in the company, and may hand work to its reports, but it
|
|
212
|
+
* is not the assistant and does not pretend to be.
|
|
213
|
+
*/
|
|
214
|
+
export function buildAgentChatPrompt(input) {
|
|
215
|
+
const { agent, snapshot, config } = input;
|
|
216
|
+
const byId = agentById(snapshot);
|
|
217
|
+
const team = agent.teamId ? snapshot.teams.find((entry) => entry.id === agent.teamId) : undefined;
|
|
218
|
+
const manager = agent.managerId ? byId.get(agent.managerId) : undefined;
|
|
219
|
+
const reports = snapshot.agents.filter((entry) => entry.managerId === agent.id);
|
|
220
|
+
const user = config.userName ? config.userName : 'the owner of the company';
|
|
221
|
+
const sections = [];
|
|
222
|
+
sections.push([
|
|
223
|
+
'You are ' + agent.name + ', ' + agent.title + ' at ' + snapshot.organization.name + ',',
|
|
224
|
+
'a company of AI agents run by the assistant ' + (config.assistantName || 'Rookery') + ' for ' + user + '.',
|
|
225
|
+
'You are talking directly with ' + user + ' in a private chat, the way a colleague would.',
|
|
226
|
+
'Speak as yourself, in your own voice, in the first person. You are not the assistant.',
|
|
227
|
+
team ? 'You are in the team "' + team.name + '"' + (team.purpose ? ' (' + team.purpose + ')' : '') + '.' : '',
|
|
228
|
+
manager ? 'Your manager is ' + manager.name + ' (' + manager.slug + ').' : 'You report directly to the assistant.',
|
|
229
|
+
reports.length
|
|
230
|
+
? 'Your direct reports: ' + reports.map((entry) => entry.slug + ' (' + entry.title + ')').join(', ') +
|
|
231
|
+
'. You may hand them work with the assign tool when the user asks for something done.'
|
|
232
|
+
: '',
|
|
233
|
+
'Be helpful and concrete, keep answers short unless asked for detail, and say plainly when',
|
|
234
|
+
'something is outside your role. Match the language the user writes in.',
|
|
235
|
+
]
|
|
236
|
+
.filter(Boolean)
|
|
237
|
+
.join(' '));
|
|
238
|
+
sections.push('Your standing instructions:\n' + agent.instructions);
|
|
239
|
+
// How the work gets done, below the role and above the task: the agent's
|
|
240
|
+
// own instructions still win, because they were written for this job.
|
|
241
|
+
if (config.org.lazyCoding)
|
|
242
|
+
sections.push(PONYTAIL_RULESET);
|
|
243
|
+
if (input.project) {
|
|
244
|
+
sections.push('Project in focus: ' + input.project.name +
|
|
245
|
+
(input.project.description ? ' — ' + input.project.description : '') +
|
|
246
|
+
(input.project.path ? ' at ' + input.project.path : ''));
|
|
247
|
+
}
|
|
248
|
+
const memoryBlock = renderMemoryBlock(input.memories, Math.floor(config.memory.contextBudget * 0.4), 'your work and this person');
|
|
249
|
+
if (memoryBlock)
|
|
250
|
+
sections.push(memoryBlock);
|
|
251
|
+
if (!input.resumed && input.history?.length) {
|
|
252
|
+
const lines = input.history.slice(-12).map((message) => {
|
|
253
|
+
const speaker = message.role === 'user' ? 'User' : 'You';
|
|
254
|
+
return speaker + ': ' + shorten(message.content, 400);
|
|
255
|
+
});
|
|
256
|
+
sections.push('Earlier in this conversation:\n' + lines.join('\n'));
|
|
257
|
+
}
|
|
258
|
+
const inboxBlock = renderInbox(input.inbox, snapshot, 'Messages waiting for you:');
|
|
259
|
+
if (inboxBlock)
|
|
260
|
+
sections.push(inboxBlock);
|
|
261
|
+
for (const hint of input.toolHints ?? [])
|
|
262
|
+
sections.push(hint);
|
|
263
|
+
if (input.skillsIndex)
|
|
264
|
+
sections.push(input.skillsIndex);
|
|
265
|
+
sections.push('Today is ' + new Date().toISOString().slice(0, 10) + '.');
|
|
266
|
+
return sections.join('\n\n');
|
|
267
|
+
}
|
|
268
|
+
//# sourceMappingURL=prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/org/prompts.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAuBjD,MAAM,SAAS,GAAG,CAAC,QAAqB,EAAsB,EAAE,CAC9D,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;AAE7D,gFAAgF;AAChF,MAAM,UAAU,iBAAiB,CAAC,QAAqB;IACrD,MAAM,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;IACjC,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC7E,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,KAAK,CAAC,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACrD,IAAI,QAAQ,CA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