@roj-ai/sdk 0.0.2
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/dist/bootstrap.d.ts +453 -0
- package/dist/bootstrap.d.ts.map +1 -0
- package/dist/builtin-events.d.ts +16 -0
- package/dist/builtin-events.d.ts.map +1 -0
- package/dist/bun-platform/fs.d.ts +9 -0
- package/dist/bun-platform/fs.d.ts.map +1 -0
- package/dist/bun-platform/index.d.ts +12 -0
- package/dist/bun-platform/index.d.ts.map +1 -0
- package/dist/bun-platform/process.d.ts +6 -0
- package/dist/bun-platform/process.d.ts.map +1 -0
- package/dist/config.d.ts +38 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.test.d.ts +2 -0
- package/dist/config.test.d.ts.map +1 -0
- package/dist/core/agent-loop.integration.test.d.ts +2 -0
- package/dist/core/agent-loop.integration.test.d.ts.map +1 -0
- package/dist/core/agents/agent-config.test.d.ts +2 -0
- package/dist/core/agents/agent-config.test.d.ts.map +1 -0
- package/dist/core/agents/agent-roles.d.ts +33 -0
- package/dist/core/agents/agent-roles.d.ts.map +1 -0
- package/dist/core/agents/agent-shutdown.test.d.ts +6 -0
- package/dist/core/agents/agent-shutdown.test.d.ts.map +1 -0
- package/dist/core/agents/agent.d.ts +234 -0
- package/dist/core/agents/agent.d.ts.map +1 -0
- package/dist/core/agents/agent.test.d.ts +2 -0
- package/dist/core/agents/agent.test.d.ts.map +1 -0
- package/dist/core/agents/communicator.d.ts +3 -0
- package/dist/core/agents/communicator.d.ts.map +1 -0
- package/dist/core/agents/config.d.ts +84 -0
- package/dist/core/agents/config.d.ts.map +1 -0
- package/dist/core/agents/context.d.ts +16 -0
- package/dist/core/agents/context.d.ts.map +1 -0
- package/dist/core/agents/debounce.d.ts +52 -0
- package/dist/core/agents/debounce.d.ts.map +1 -0
- package/dist/core/agents/handler-events.test.d.ts +5 -0
- package/dist/core/agents/handler-events.test.d.ts.map +1 -0
- package/dist/core/agents/index.d.ts +2 -0
- package/dist/core/agents/index.d.ts.map +1 -0
- package/dist/core/agents/response-sanitizer.d.ts +25 -0
- package/dist/core/agents/response-sanitizer.d.ts.map +1 -0
- package/dist/core/agents/response-sanitizer.test.d.ts +2 -0
- package/dist/core/agents/response-sanitizer.test.d.ts.map +1 -0
- package/dist/core/agents/retry.d.ts +40 -0
- package/dist/core/agents/retry.d.ts.map +1 -0
- package/dist/core/agents/schema.d.ts +57 -0
- package/dist/core/agents/schema.d.ts.map +1 -0
- package/dist/core/agents/state.d.ts +255 -0
- package/dist/core/agents/state.d.ts.map +1 -0
- package/dist/core/context/state.d.ts +28 -0
- package/dist/core/context/state.d.ts.map +1 -0
- package/dist/core/errors.d.ts +29 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/event-sourcing.integration.test.d.ts +2 -0
- package/dist/core/event-sourcing.integration.test.d.ts.map +1 -0
- package/dist/core/events/base-event-store.d.ts +55 -0
- package/dist/core/events/base-event-store.d.ts.map +1 -0
- package/dist/core/events/event-store.d.ts +108 -0
- package/dist/core/events/event-store.d.ts.map +1 -0
- package/dist/core/events/file.d.ts +50 -0
- package/dist/core/events/file.d.ts.map +1 -0
- package/dist/core/events/file.test.d.ts +2 -0
- package/dist/core/events/file.test.d.ts.map +1 -0
- package/dist/core/events/index.d.ts +4 -0
- package/dist/core/events/index.d.ts.map +1 -0
- package/dist/core/events/memory.d.ts +43 -0
- package/dist/core/events/memory.d.ts.map +1 -0
- package/dist/core/events/memory.test.d.ts +2 -0
- package/dist/core/events/memory.test.d.ts.map +1 -0
- package/dist/core/events/metadata-utils.d.ts +27 -0
- package/dist/core/events/metadata-utils.d.ts.map +1 -0
- package/dist/core/events/test-helpers.d.ts +28 -0
- package/dist/core/events/test-helpers.d.ts.map +1 -0
- package/dist/core/events/types.d.ts +46 -0
- package/dist/core/events/types.d.ts.map +1 -0
- package/dist/core/file-store/file-store.d.ts +56 -0
- package/dist/core/file-store/file-store.d.ts.map +1 -0
- package/dist/core/file-store/types.d.ts +50 -0
- package/dist/core/file-store/types.d.ts.map +1 -0
- package/dist/core/image/image-processor.d.ts +15 -0
- package/dist/core/image/image-processor.d.ts.map +1 -0
- package/dist/core/image/image-processor.test.d.ts +2 -0
- package/dist/core/image/image-processor.test.d.ts.map +1 -0
- package/dist/core/image/index.d.ts +5 -0
- package/dist/core/image/index.d.ts.map +1 -0
- package/dist/core/image/noop-resizer.d.ts +5 -0
- package/dist/core/image/noop-resizer.d.ts.map +1 -0
- package/dist/core/image/types.d.ts +20 -0
- package/dist/core/image/types.d.ts.map +1 -0
- package/dist/core/image/vips-resizer.d.ts +21 -0
- package/dist/core/image/vips-resizer.d.ts.map +1 -0
- package/dist/core/image/vips-resizer.test.d.ts +2 -0
- package/dist/core/image/vips-resizer.test.d.ts.map +1 -0
- package/dist/core/llm/anthropic.d.ts +51 -0
- package/dist/core/llm/anthropic.d.ts.map +1 -0
- package/dist/core/llm/anthropic.test.d.ts +2 -0
- package/dist/core/llm/anthropic.test.d.ts.map +1 -0
- package/dist/core/llm/cache-breakpoints.d.ts +17 -0
- package/dist/core/llm/cache-breakpoints.d.ts.map +1 -0
- package/dist/core/llm/cache-live.test.d.ts +16 -0
- package/dist/core/llm/cache-live.test.d.ts.map +1 -0
- package/dist/core/llm/index.d.ts +16 -0
- package/dist/core/llm/index.d.ts.map +1 -0
- package/dist/core/llm/llm-log-types.d.ts +148 -0
- package/dist/core/llm/llm-log-types.d.ts.map +1 -0
- package/dist/core/llm/logger.d.ts +74 -0
- package/dist/core/llm/logger.d.ts.map +1 -0
- package/dist/core/llm/logger.test.d.ts +7 -0
- package/dist/core/llm/logger.test.d.ts.map +1 -0
- package/dist/core/llm/logging-provider.d.ts +20 -0
- package/dist/core/llm/logging-provider.d.ts.map +1 -0
- package/dist/core/llm/middleware.d.ts +79 -0
- package/dist/core/llm/middleware.d.ts.map +1 -0
- package/dist/core/llm/mock.d.ts +79 -0
- package/dist/core/llm/mock.d.ts.map +1 -0
- package/dist/core/llm/mock.test.d.ts +2 -0
- package/dist/core/llm/mock.test.d.ts.map +1 -0
- package/dist/core/llm/openrouter-mapping.test.d.ts +2 -0
- package/dist/core/llm/openrouter-mapping.test.d.ts.map +1 -0
- package/dist/core/llm/openrouter.d.ts +37 -0
- package/dist/core/llm/openrouter.d.ts.map +1 -0
- package/dist/core/llm/openrouter.test.d.ts +2 -0
- package/dist/core/llm/openrouter.test.d.ts.map +1 -0
- package/dist/core/llm/provider-integration.test.d.ts +12 -0
- package/dist/core/llm/provider-integration.test.d.ts.map +1 -0
- package/dist/core/llm/provider.d.ts +175 -0
- package/dist/core/llm/provider.d.ts.map +1 -0
- package/dist/core/llm/routing-provider.d.ts +31 -0
- package/dist/core/llm/routing-provider.d.ts.map +1 -0
- package/dist/core/llm/routing-provider.test.d.ts +2 -0
- package/dist/core/llm/routing-provider.test.d.ts.map +1 -0
- package/dist/core/llm/schema.d.ts +24 -0
- package/dist/core/llm/schema.d.ts.map +1 -0
- package/dist/core/llm/snapshot-fetch.d.ts +21 -0
- package/dist/core/llm/snapshot-fetch.d.ts.map +1 -0
- package/dist/core/llm/snapshot-middleware.d.ts +71 -0
- package/dist/core/llm/snapshot-middleware.d.ts.map +1 -0
- package/dist/core/llm/snapshot-middleware.test.d.ts +2 -0
- package/dist/core/llm/snapshot-middleware.test.d.ts.map +1 -0
- package/dist/core/llm/state.d.ts +73 -0
- package/dist/core/llm/state.d.ts.map +1 -0
- package/dist/core/llm/tokens.d.ts +36 -0
- package/dist/core/llm/tokens.d.ts.map +1 -0
- package/dist/core/multi-agent.integration.test.d.ts +2 -0
- package/dist/core/multi-agent.integration.test.d.ts.map +1 -0
- package/dist/core/plugin-hooks.integration.test.d.ts +2 -0
- package/dist/core/plugin-hooks.integration.test.d.ts.map +1 -0
- package/dist/core/plugins/hook-types.d.ts +55 -0
- package/dist/core/plugins/hook-types.d.ts.map +1 -0
- package/dist/core/plugins/index.d.ts +23 -0
- package/dist/core/plugins/index.d.ts.map +1 -0
- package/dist/core/plugins/plugin-builder.d.ts +474 -0
- package/dist/core/plugins/plugin-builder.d.ts.map +1 -0
- package/dist/core/preset/config.d.ts +55 -0
- package/dist/core/preset/config.d.ts.map +1 -0
- package/dist/core/preset/index.d.ts +8 -0
- package/dist/core/preset/index.d.ts.map +1 -0
- package/dist/core/preset/preset-builder.d.ts +44 -0
- package/dist/core/preset/preset-builder.d.ts.map +1 -0
- package/dist/core/session-lifecycle.integration.test.d.ts +2 -0
- package/dist/core/session-lifecycle.integration.test.d.ts.map +1 -0
- package/dist/core/sessions/apply-event.d.ts +19 -0
- package/dist/core/sessions/apply-event.d.ts.map +1 -0
- package/dist/core/sessions/context.d.ts +34 -0
- package/dist/core/sessions/context.d.ts.map +1 -0
- package/dist/core/sessions/fork-utils.d.ts +20 -0
- package/dist/core/sessions/fork-utils.d.ts.map +1 -0
- package/dist/core/sessions/fork-utils.test.d.ts +2 -0
- package/dist/core/sessions/fork-utils.test.d.ts.map +1 -0
- package/dist/core/sessions/reducer.d.ts +50 -0
- package/dist/core/sessions/reducer.d.ts.map +1 -0
- package/dist/core/sessions/schema.d.ts +82 -0
- package/dist/core/sessions/schema.d.ts.map +1 -0
- package/dist/core/sessions/session-environment.d.ts +13 -0
- package/dist/core/sessions/session-environment.d.ts.map +1 -0
- package/dist/core/sessions/session-manager.d.ts +183 -0
- package/dist/core/sessions/session-manager.d.ts.map +1 -0
- package/dist/core/sessions/session-store.d.ts +69 -0
- package/dist/core/sessions/session-store.d.ts.map +1 -0
- package/dist/core/sessions/session.d.ts +212 -0
- package/dist/core/sessions/session.d.ts.map +1 -0
- package/dist/core/sessions/session.test.d.ts +2 -0
- package/dist/core/sessions/session.test.d.ts.map +1 -0
- package/dist/core/sessions/state.d.ts +110 -0
- package/dist/core/sessions/state.d.ts.map +1 -0
- package/dist/core/system.d.ts +97 -0
- package/dist/core/system.d.ts.map +1 -0
- package/dist/core/tools/context.d.ts +3 -0
- package/dist/core/tools/context.d.ts.map +1 -0
- package/dist/core/tools/definition.d.ts +10 -0
- package/dist/core/tools/definition.d.ts.map +1 -0
- package/dist/core/tools/executor.d.ts +28 -0
- package/dist/core/tools/executor.d.ts.map +1 -0
- package/dist/core/tools/executor.test.d.ts +2 -0
- package/dist/core/tools/executor.test.d.ts.map +1 -0
- package/dist/core/tools/index.d.ts +4 -0
- package/dist/core/tools/index.d.ts.map +1 -0
- package/dist/core/tools/schema.d.ts +61 -0
- package/dist/core/tools/schema.d.ts.map +1 -0
- package/dist/core/tools/state.d.ts +28 -0
- package/dist/core/tools/state.d.ts.map +1 -0
- package/dist/index.d.ts +111 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/lib/json/index.d.ts +17 -0
- package/dist/lib/json/index.d.ts.map +1 -0
- package/dist/lib/logger/console.d.ts +35 -0
- package/dist/lib/logger/console.d.ts.map +1 -0
- package/dist/lib/logger/console.test.d.ts +2 -0
- package/dist/lib/logger/console.test.d.ts.map +1 -0
- package/dist/lib/logger/file.d.ts +20 -0
- package/dist/lib/logger/file.d.ts.map +1 -0
- package/dist/lib/logger/index.d.ts +5 -0
- package/dist/lib/logger/index.d.ts.map +1 -0
- package/dist/lib/logger/logger.d.ts +87 -0
- package/dist/lib/logger/logger.d.ts.map +1 -0
- package/dist/lib/logger/ring-buffer.d.ts +33 -0
- package/dist/lib/logger/ring-buffer.d.ts.map +1 -0
- package/dist/lib/logger/tee.d.ts +15 -0
- package/dist/lib/logger/tee.d.ts.map +1 -0
- package/dist/lib/mime.d.ts +9 -0
- package/dist/lib/mime.d.ts.map +1 -0
- package/dist/lib/never.d.ts +2 -0
- package/dist/lib/never.d.ts.map +1 -0
- package/dist/lib/utils/hash.d.ts +19 -0
- package/dist/lib/utils/hash.d.ts.map +1 -0
- package/dist/lib/utils/result.d.ts +26 -0
- package/dist/lib/utils/result.d.ts.map +1 -0
- package/dist/platform/fs.d.ts +39 -0
- package/dist/platform/fs.d.ts.map +1 -0
- package/dist/platform/index.d.ts +21 -0
- package/dist/platform/index.d.ts.map +1 -0
- package/dist/platform/process.d.ts +24 -0
- package/dist/platform/process.d.ts.map +1 -0
- package/dist/plugins/agent-status/plugin.d.ts +8 -0
- package/dist/plugins/agent-status/plugin.d.ts.map +1 -0
- package/dist/plugins/agents/agents.integration.test.d.ts +2 -0
- package/dist/plugins/agents/agents.integration.test.d.ts.map +1 -0
- package/dist/plugins/agents/index.d.ts +3 -0
- package/dist/plugins/agents/index.d.ts.map +1 -0
- package/dist/plugins/agents/plugin.d.ts +57 -0
- package/dist/plugins/agents/plugin.d.ts.map +1 -0
- package/dist/plugins/context-compact/context-compact.integration.test.d.ts +2 -0
- package/dist/plugins/context-compact/context-compact.integration.test.d.ts.map +1 -0
- package/dist/plugins/context-compact/context-compactor.d.ts +88 -0
- package/dist/plugins/context-compact/context-compactor.d.ts.map +1 -0
- package/dist/plugins/context-compact/context-compactor.test.d.ts +2 -0
- package/dist/plugins/context-compact/context-compactor.test.d.ts.map +1 -0
- package/dist/plugins/context-compact/history-offloader.d.ts +17 -0
- package/dist/plugins/context-compact/history-offloader.d.ts.map +1 -0
- package/dist/plugins/context-compact/history-offloader.test.d.ts +2 -0
- package/dist/plugins/context-compact/history-offloader.test.d.ts.map +1 -0
- package/dist/plugins/context-compact/index.d.ts +4 -0
- package/dist/plugins/context-compact/index.d.ts.map +1 -0
- package/dist/plugins/context-compact/plugin.d.ts +15 -0
- package/dist/plugins/context-compact/plugin.d.ts.map +1 -0
- package/dist/plugins/filesystem/filesystem.integration.test.d.ts +2 -0
- package/dist/plugins/filesystem/filesystem.integration.test.d.ts.map +1 -0
- package/dist/plugins/filesystem/helpers.d.ts +34 -0
- package/dist/plugins/filesystem/helpers.d.ts.map +1 -0
- package/dist/plugins/filesystem/index.d.ts +5 -0
- package/dist/plugins/filesystem/index.d.ts.map +1 -0
- package/dist/plugins/filesystem/listing.d.ts +38 -0
- package/dist/plugins/filesystem/listing.d.ts.map +1 -0
- package/dist/plugins/filesystem/plugin.d.ts +53 -0
- package/dist/plugins/filesystem/plugin.d.ts.map +1 -0
- package/dist/plugins/filesystem/schema.d.ts +7 -0
- package/dist/plugins/filesystem/schema.d.ts.map +1 -0
- package/dist/plugins/git-status/index.d.ts +2 -0
- package/dist/plugins/git-status/index.d.ts.map +1 -0
- package/dist/plugins/git-status/plugin.d.ts +12 -0
- package/dist/plugins/git-status/plugin.d.ts.map +1 -0
- package/dist/plugins/limits-guard/config.d.ts +23 -0
- package/dist/plugins/limits-guard/config.d.ts.map +1 -0
- package/dist/plugins/limits-guard/index.d.ts +5 -0
- package/dist/plugins/limits-guard/index.d.ts.map +1 -0
- package/dist/plugins/limits-guard/limit-guard.d.ts +40 -0
- package/dist/plugins/limits-guard/limit-guard.d.ts.map +1 -0
- package/dist/plugins/limits-guard/limit-guard.test.d.ts +2 -0
- package/dist/plugins/limits-guard/limit-guard.test.d.ts.map +1 -0
- package/dist/plugins/limits-guard/limits-guard.integration.test.d.ts +2 -0
- package/dist/plugins/limits-guard/limits-guard.integration.test.d.ts.map +1 -0
- package/dist/plugins/limits-guard/plugin.d.ts +39 -0
- package/dist/plugins/limits-guard/plugin.d.ts.map +1 -0
- package/dist/plugins/llm-debug/index.d.ts +2 -0
- package/dist/plugins/llm-debug/index.d.ts.map +1 -0
- package/dist/plugins/llm-debug/llm-debug.integration.test.d.ts +2 -0
- package/dist/plugins/llm-debug/llm-debug.integration.test.d.ts.map +1 -0
- package/dist/plugins/llm-debug/plugin.d.ts +31 -0
- package/dist/plugins/llm-debug/plugin.d.ts.map +1 -0
- package/dist/plugins/logs/index.d.ts +2 -0
- package/dist/plugins/logs/index.d.ts.map +1 -0
- package/dist/plugins/logs/plugin.d.ts +10 -0
- package/dist/plugins/logs/plugin.d.ts.map +1 -0
- package/dist/plugins/mailbox/helpers.d.ts +20 -0
- package/dist/plugins/mailbox/helpers.d.ts.map +1 -0
- package/dist/plugins/mailbox/index.d.ts +9 -0
- package/dist/plugins/mailbox/index.d.ts.map +1 -0
- package/dist/plugins/mailbox/mailbox.integration.test.d.ts +2 -0
- package/dist/plugins/mailbox/mailbox.integration.test.d.ts.map +1 -0
- package/dist/plugins/mailbox/plugin.d.ts +31 -0
- package/dist/plugins/mailbox/plugin.d.ts.map +1 -0
- package/dist/plugins/mailbox/prompts.d.ts +21 -0
- package/dist/plugins/mailbox/prompts.d.ts.map +1 -0
- package/dist/plugins/mailbox/query.d.ts +33 -0
- package/dist/plugins/mailbox/query.d.ts.map +1 -0
- package/dist/plugins/mailbox/schema.d.ts +54 -0
- package/dist/plugins/mailbox/schema.d.ts.map +1 -0
- package/dist/plugins/mailbox/state.d.ts +40 -0
- package/dist/plugins/mailbox/state.d.ts.map +1 -0
- package/dist/plugins/resources/index.d.ts +7 -0
- package/dist/plugins/resources/index.d.ts.map +1 -0
- package/dist/plugins/resources/manifest.d.ts +23 -0
- package/dist/plugins/resources/manifest.d.ts.map +1 -0
- package/dist/plugins/resources/plugin.d.ts +28 -0
- package/dist/plugins/resources/plugin.d.ts.map +1 -0
- package/dist/plugins/resources/post-inject.d.ts +39 -0
- package/dist/plugins/resources/post-inject.d.ts.map +1 -0
- package/dist/plugins/resources/state.d.ts +25 -0
- package/dist/plugins/resources/state.d.ts.map +1 -0
- package/dist/plugins/result-eviction/index.d.ts +3 -0
- package/dist/plugins/result-eviction/index.d.ts.map +1 -0
- package/dist/plugins/result-eviction/plugin.d.ts +19 -0
- package/dist/plugins/result-eviction/plugin.d.ts.map +1 -0
- package/dist/plugins/result-eviction/result-eviction.integration.test.d.ts +2 -0
- package/dist/plugins/result-eviction/result-eviction.integration.test.d.ts.map +1 -0
- package/dist/plugins/services/plugin.d.ts +85 -0
- package/dist/plugins/services/plugin.d.ts.map +1 -0
- package/dist/plugins/services/port-pool.d.ts +32 -0
- package/dist/plugins/services/port-pool.d.ts.map +1 -0
- package/dist/plugins/services/prompt.d.ts +13 -0
- package/dist/plugins/services/prompt.d.ts.map +1 -0
- package/dist/plugins/services/schema.d.ts +70 -0
- package/dist/plugins/services/schema.d.ts.map +1 -0
- package/dist/plugins/services/service.d.ts +86 -0
- package/dist/plugins/services/service.d.ts.map +1 -0
- package/dist/plugins/services/services.integration.test.d.ts +2 -0
- package/dist/plugins/services/services.integration.test.d.ts.map +1 -0
- package/dist/plugins/session-lifecycle/index.d.ts +2 -0
- package/dist/plugins/session-lifecycle/index.d.ts.map +1 -0
- package/dist/plugins/session-lifecycle/plugin.d.ts +97 -0
- package/dist/plugins/session-lifecycle/plugin.d.ts.map +1 -0
- package/dist/plugins/session-lifecycle/session-lifecycle.integration.test.d.ts +2 -0
- package/dist/plugins/session-lifecycle/session-lifecycle.integration.test.d.ts.map +1 -0
- package/dist/plugins/session-state/plugin.d.ts +48 -0
- package/dist/plugins/session-state/plugin.d.ts.map +1 -0
- package/dist/plugins/session-stats/index.d.ts +4 -0
- package/dist/plugins/session-stats/index.d.ts.map +1 -0
- package/dist/plugins/session-stats/plugin.d.ts +29 -0
- package/dist/plugins/session-stats/plugin.d.ts.map +1 -0
- package/dist/plugins/shell/executor.d.ts +78 -0
- package/dist/plugins/shell/executor.d.ts.map +1 -0
- package/dist/plugins/shell/index.d.ts +6 -0
- package/dist/plugins/shell/index.d.ts.map +1 -0
- package/dist/plugins/shell/plugin.d.ts +51 -0
- package/dist/plugins/shell/plugin.d.ts.map +1 -0
- package/dist/plugins/shell/shell.integration.test.d.ts +2 -0
- package/dist/plugins/shell/shell.integration.test.d.ts.map +1 -0
- package/dist/plugins/shell/shell.test.d.ts +2 -0
- package/dist/plugins/shell/shell.test.d.ts.map +1 -0
- package/dist/plugins/skills/discovery.d.ts +69 -0
- package/dist/plugins/skills/discovery.d.ts.map +1 -0
- package/dist/plugins/skills/discovery.test.d.ts +2 -0
- package/dist/plugins/skills/discovery.test.d.ts.map +1 -0
- package/dist/plugins/skills/index.d.ts +11 -0
- package/dist/plugins/skills/index.d.ts.map +1 -0
- package/dist/plugins/skills/plugin.d.ts +94 -0
- package/dist/plugins/skills/plugin.d.ts.map +1 -0
- package/dist/plugins/skills/prompts.d.ts +29 -0
- package/dist/plugins/skills/prompts.d.ts.map +1 -0
- package/dist/plugins/skills/schema.d.ts +64 -0
- package/dist/plugins/skills/schema.d.ts.map +1 -0
- package/dist/plugins/skills/skills.integration.test.d.ts +2 -0
- package/dist/plugins/skills/skills.integration.test.d.ts.map +1 -0
- package/dist/plugins/snapshotting/index.d.ts +4 -0
- package/dist/plugins/snapshotting/index.d.ts.map +1 -0
- package/dist/plugins/snapshotting/jj-snapshotter.d.ts +27 -0
- package/dist/plugins/snapshotting/jj-snapshotter.d.ts.map +1 -0
- package/dist/plugins/snapshotting/plugin.d.ts +15 -0
- package/dist/plugins/snapshotting/plugin.d.ts.map +1 -0
- package/dist/plugins/snapshotting/snapshotter.d.ts +19 -0
- package/dist/plugins/snapshotting/snapshotter.d.ts.map +1 -0
- package/dist/plugins/todo/index.d.ts +7 -0
- package/dist/plugins/todo/index.d.ts.map +1 -0
- package/dist/plugins/todo/plugin.d.ts +95 -0
- package/dist/plugins/todo/plugin.d.ts.map +1 -0
- package/dist/plugins/todo/prompts.d.ts +13 -0
- package/dist/plugins/todo/prompts.d.ts.map +1 -0
- package/dist/plugins/todo/schema.d.ts +44 -0
- package/dist/plugins/todo/schema.d.ts.map +1 -0
- package/dist/plugins/todo/todo.integration.test.d.ts +2 -0
- package/dist/plugins/todo/todo.integration.test.d.ts.map +1 -0
- package/dist/plugins/uploads/index.d.ts +9 -0
- package/dist/plugins/uploads/index.d.ts.map +1 -0
- package/dist/plugins/uploads/plugin.d.ts +56 -0
- package/dist/plugins/uploads/plugin.d.ts.map +1 -0
- package/dist/plugins/uploads/preprocessor.d.ts +70 -0
- package/dist/plugins/uploads/preprocessor.d.ts.map +1 -0
- package/dist/plugins/uploads/preprocessors/image-classifier.d.ts +49 -0
- package/dist/plugins/uploads/preprocessors/image-classifier.d.ts.map +1 -0
- package/dist/plugins/uploads/preprocessors/index.d.ts +7 -0
- package/dist/plugins/uploads/preprocessors/index.d.ts.map +1 -0
- package/dist/plugins/uploads/preprocessors/markitdown-preprocessor.d.ts +43 -0
- package/dist/plugins/uploads/preprocessors/markitdown-preprocessor.d.ts.map +1 -0
- package/dist/plugins/uploads/preprocessors/zip-preprocessor.d.ts +30 -0
- package/dist/plugins/uploads/preprocessors/zip-preprocessor.d.ts.map +1 -0
- package/dist/plugins/uploads/schema.d.ts +72 -0
- package/dist/plugins/uploads/schema.d.ts.map +1 -0
- package/dist/plugins/uploads/state.d.ts +38 -0
- package/dist/plugins/uploads/state.d.ts.map +1 -0
- package/dist/plugins/uploads/uploads.integration.test.d.ts +2 -0
- package/dist/plugins/uploads/uploads.integration.test.d.ts.map +1 -0
- package/dist/plugins/user-chat/index.d.ts +7 -0
- package/dist/plugins/user-chat/index.d.ts.map +1 -0
- package/dist/plugins/user-chat/plugin.d.ts +221 -0
- package/dist/plugins/user-chat/plugin.d.ts.map +1 -0
- package/dist/plugins/user-chat/prompts.d.ts +13 -0
- package/dist/plugins/user-chat/prompts.d.ts.map +1 -0
- package/dist/plugins/user-chat/schema.d.ts +82 -0
- package/dist/plugins/user-chat/schema.d.ts.map +1 -0
- package/dist/plugins/user-chat/user-chat.integration.test.d.ts +2 -0
- package/dist/plugins/user-chat/user-chat.integration.test.d.ts.map +1 -0
- package/dist/plugins/workers/context.d.ts +159 -0
- package/dist/plugins/workers/context.d.ts.map +1 -0
- package/dist/plugins/workers/definition.d.ts +118 -0
- package/dist/plugins/workers/definition.d.ts.map +1 -0
- package/dist/plugins/workers/index.d.ts +11 -0
- package/dist/plugins/workers/index.d.ts.map +1 -0
- package/dist/plugins/workers/plugin.d.ts +125 -0
- package/dist/plugins/workers/plugin.d.ts.map +1 -0
- package/dist/plugins/workers/worker.d.ts +76 -0
- package/dist/plugins/workers/worker.d.ts.map +1 -0
- package/dist/plugins/workers/workers.integration.test.d.ts +2 -0
- package/dist/plugins/workers/workers.integration.test.d.ts.map +1 -0
- package/dist/prompts/base.d.ts +75 -0
- package/dist/prompts/base.d.ts.map +1 -0
- package/dist/prompts/builder.d.ts +73 -0
- package/dist/prompts/builder.d.ts.map +1 -0
- package/dist/prompts/index.d.ts +10 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/macros.d.ts +15 -0
- package/dist/prompts/macros.d.ts.map +1 -0
- package/dist/prompts/macros.test.d.ts +2 -0
- package/dist/prompts/macros.test.d.ts.map +1 -0
- package/dist/testing/bootstrap-for-testing.d.ts +12 -0
- package/dist/testing/bootstrap-for-testing.d.ts.map +1 -0
- package/dist/testing/index.d.ts +8 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/node-platform.d.ts +12 -0
- package/dist/testing/node-platform.d.ts.map +1 -0
- package/dist/testing/notification-collector.d.ts +46 -0
- package/dist/testing/notification-collector.d.ts.map +1 -0
- package/dist/testing/preset-helpers.d.ts +28 -0
- package/dist/testing/preset-helpers.d.ts.map +1 -0
- package/dist/testing/test-harness.d.ts +117 -0
- package/dist/testing/test-harness.d.ts.map +1 -0
- package/dist/testing/test-harness.test.d.ts +2 -0
- package/dist/testing/test-harness.test.d.ts.map +1 -0
- package/dist/testing/wait-helpers.d.ts +17 -0
- package/dist/testing/wait-helpers.d.ts.map +1 -0
- package/dist/transport/adapter/client-adapter.d.ts +32 -0
- package/dist/transport/adapter/client-adapter.d.ts.map +1 -0
- package/dist/transport/adapter/index.d.ts +23 -0
- package/dist/transport/adapter/index.d.ts.map +1 -0
- package/dist/transport/adapter/server-adapter.d.ts +29 -0
- package/dist/transport/adapter/server-adapter.d.ts.map +1 -0
- package/dist/transport/adapter/types.d.ts +14 -0
- package/dist/transport/adapter/types.d.ts.map +1 -0
- package/dist/transport/http/app.d.ts +41 -0
- package/dist/transport/http/app.d.ts.map +1 -0
- package/dist/transport/http/index.d.ts +7 -0
- package/dist/transport/http/index.d.ts.map +1 -0
- package/dist/transport/http/middleware/bearer-auth.d.ts +16 -0
- package/dist/transport/http/middleware/bearer-auth.d.ts.map +1 -0
- package/dist/transport/http/middleware/error-handler.d.ts +21 -0
- package/dist/transport/http/middleware/error-handler.d.ts.map +1 -0
- package/dist/transport/http/routes/files.d.ts +16 -0
- package/dist/transport/http/routes/files.d.ts.map +1 -0
- package/dist/transport/http/routes/resources.d.ts +12 -0
- package/dist/transport/http/routes/resources.d.ts.map +1 -0
- package/dist/transport/http/routes/rpc.d.ts +22 -0
- package/dist/transport/http/routes/rpc.d.ts.map +1 -0
- package/dist/transport/http/routes/rpc.integration.test.d.ts +2 -0
- package/dist/transport/http/routes/rpc.integration.test.d.ts.map +1 -0
- package/dist/transport/http/routes/rpc.test.d.ts +2 -0
- package/dist/transport/http/routes/rpc.test.d.ts.map +1 -0
- package/dist/transport/http/routes/upload.d.ts +14 -0
- package/dist/transport/http/routes/upload.d.ts.map +1 -0
- package/dist/transport/rpc/index.d.ts +8 -0
- package/dist/transport/rpc/index.d.ts.map +1 -0
- package/dist/transport/rpc/methods.d.ts +25 -0
- package/dist/transport/rpc/methods.d.ts.map +1 -0
- package/dist/user-config.d.ts +29 -0
- package/dist/user-config.d.ts.map +1 -0
- package/package.json +154 -0
- package/src/bootstrap.ts +268 -0
- package/src/builtin-events.ts +25 -0
- package/src/bun-platform/fs.ts +50 -0
- package/src/bun-platform/index.ts +21 -0
- package/src/bun-platform/process.ts +25 -0
- package/src/config.test.ts +174 -0
- package/src/config.ts +103 -0
- package/src/core/agent-loop.integration.test.ts +503 -0
- package/src/core/agents/agent-config.test.ts +240 -0
- package/src/core/agents/agent-roles.ts +41 -0
- package/src/core/agents/agent-shutdown.test.ts +236 -0
- package/src/core/agents/agent.test.ts +387 -0
- package/src/core/agents/agent.ts +1472 -0
- package/src/core/agents/communicator.ts +16 -0
- package/src/core/agents/config.ts +98 -0
- package/src/core/agents/context.ts +19 -0
- package/src/core/agents/debounce.ts +116 -0
- package/src/core/agents/handler-events.test.ts +167 -0
- package/src/core/agents/index.ts +1 -0
- package/src/core/agents/response-sanitizer.test.ts +137 -0
- package/src/core/agents/response-sanitizer.ts +67 -0
- package/src/core/agents/retry.ts +164 -0
- package/src/core/agents/schema.ts +75 -0
- package/src/core/agents/state.ts +272 -0
- package/src/core/context/state.ts +38 -0
- package/src/core/errors.ts +55 -0
- package/src/core/event-sourcing.integration.test.ts +191 -0
- package/src/core/events/base-event-store.ts +264 -0
- package/src/core/events/event-store.ts +143 -0
- package/src/core/events/file.test.ts +436 -0
- package/src/core/events/file.ts +372 -0
- package/src/core/events/index.ts +3 -0
- package/src/core/events/memory.test.ts +741 -0
- package/src/core/events/memory.ts +131 -0
- package/src/core/events/metadata-utils.ts +133 -0
- package/src/core/events/test-helpers.ts +31 -0
- package/src/core/events/types.ts +64 -0
- package/src/core/file-store/file-store.ts +275 -0
- package/src/core/file-store/types.ts +52 -0
- package/src/core/image/image-processor.test.ts +218 -0
- package/src/core/image/image-processor.ts +127 -0
- package/src/core/image/index.ts +4 -0
- package/src/core/image/noop-resizer.ts +7 -0
- package/src/core/image/types.ts +24 -0
- package/src/core/image/vips-resizer.test.ts +377 -0
- package/src/core/image/vips-resizer.ts +124 -0
- package/src/core/llm/__snapshots__/anthropic-assistant-text-with-tool-calls.json +156 -0
- package/src/core/llm/__snapshots__/anthropic-consecutive-tool-results.json +152 -0
- package/src/core/llm/__snapshots__/anthropic-image-data-url.json +105 -0
- package/src/core/llm/__snapshots__/anthropic-image-http-url.json +104 -0
- package/src/core/llm/__snapshots__/anthropic-multiple-images.json +113 -0
- package/src/core/llm/__snapshots__/anthropic-multiple-tool-calls-requested.json +151 -0
- package/src/core/llm/__snapshots__/anthropic-simple-user-message.json +97 -0
- package/src/core/llm/__snapshots__/anthropic-system-message-in-conversation.json +119 -0
- package/src/core/llm/__snapshots__/anthropic-tool-call.json +123 -0
- package/src/core/llm/__snapshots__/anthropic-tool-error-result.json +139 -0
- package/src/core/llm/__snapshots__/anthropic-tool-result-with-image.json +152 -0
- package/src/core/llm/__snapshots__/anthropic-tool-roundtrip.json +139 -0
- package/src/core/llm/__snapshots__/openrouter-assistant-text-with-tool-calls.json +150 -0
- package/src/core/llm/__snapshots__/openrouter-consecutive-tool-results.json +150 -0
- package/src/core/llm/__snapshots__/openrouter-image-data-url.json +107 -0
- package/src/core/llm/__snapshots__/openrouter-image-http-url.json +107 -0
- package/src/core/llm/__snapshots__/openrouter-multiple-images.json +113 -0
- package/src/core/llm/__snapshots__/openrouter-multiple-tool-calls-requested.json +158 -0
- package/src/core/llm/__snapshots__/openrouter-simple-user-message.json +96 -0
- package/src/core/llm/__snapshots__/openrouter-system-message-in-conversation.json +108 -0
- package/src/core/llm/__snapshots__/openrouter-tool-call.json +129 -0
- package/src/core/llm/__snapshots__/openrouter-tool-error-result.json +137 -0
- package/src/core/llm/__snapshots__/openrouter-tool-result-with-image.json +148 -0
- package/src/core/llm/__snapshots__/openrouter-tool-roundtrip.json +137 -0
- package/src/core/llm/anthropic.test.ts +509 -0
- package/src/core/llm/anthropic.ts +578 -0
- package/src/core/llm/cache-breakpoints.ts +38 -0
- package/src/core/llm/cache-live.test.ts +155 -0
- package/src/core/llm/index.ts +30 -0
- package/src/core/llm/llm-log-types.ts +167 -0
- package/src/core/llm/logger.test.ts +270 -0
- package/src/core/llm/logger.ts +306 -0
- package/src/core/llm/logging-provider.ts +73 -0
- package/src/core/llm/middleware.ts +172 -0
- package/src/core/llm/mock.test.ts +402 -0
- package/src/core/llm/mock.ts +234 -0
- package/src/core/llm/openrouter-mapping.test.ts +153 -0
- package/src/core/llm/openrouter.test.ts +499 -0
- package/src/core/llm/openrouter.ts +458 -0
- package/src/core/llm/provider-integration.test.ts +408 -0
- package/src/core/llm/provider.ts +238 -0
- package/src/core/llm/routing-provider.test.ts +113 -0
- package/src/core/llm/routing-provider.ts +86 -0
- package/src/core/llm/schema.ts +47 -0
- package/src/core/llm/snapshot-fetch.ts +158 -0
- package/src/core/llm/snapshot-middleware.test.ts +168 -0
- package/src/core/llm/snapshot-middleware.ts +185 -0
- package/src/core/llm/state.ts +92 -0
- package/src/core/llm/tokens.ts +61 -0
- package/src/core/multi-agent.integration.test.ts +340 -0
- package/src/core/plugin-hooks.integration.test.ts +428 -0
- package/src/core/plugins/hook-types.ts +49 -0
- package/src/core/plugins/index.ts +52 -0
- package/src/core/plugins/plugin-builder.ts +967 -0
- package/src/core/preset/config.ts +110 -0
- package/src/core/preset/index.ts +11 -0
- package/src/core/preset/preset-builder.ts +111 -0
- package/src/core/session-lifecycle.integration.test.ts +202 -0
- package/src/core/sessions/apply-event.ts +46 -0
- package/src/core/sessions/context.ts +36 -0
- package/src/core/sessions/fork-utils.test.ts +158 -0
- package/src/core/sessions/fork-utils.ts +71 -0
- package/src/core/sessions/reducer.ts +95 -0
- package/src/core/sessions/schema.ts +91 -0
- package/src/core/sessions/session-environment.ts +12 -0
- package/src/core/sessions/session-manager.ts +883 -0
- package/src/core/sessions/session-store.ts +141 -0
- package/src/core/sessions/session.test.ts +1730 -0
- package/src/core/sessions/session.ts +833 -0
- package/src/core/sessions/state.ts +520 -0
- package/src/core/system.ts +206 -0
- package/src/core/tools/context.ts +3 -0
- package/src/core/tools/definition.ts +15 -0
- package/src/core/tools/executor.test.ts +160 -0
- package/src/core/tools/executor.ts +117 -0
- package/src/core/tools/index.ts +3 -0
- package/src/core/tools/schema.ts +80 -0
- package/src/core/tools/state.ts +34 -0
- package/src/index.ts +165 -0
- package/src/lib/json/index.ts +20 -0
- package/src/lib/logger/console.test.ts +348 -0
- package/src/lib/logger/console.ts +185 -0
- package/src/lib/logger/file.ts +65 -0
- package/src/lib/logger/index.ts +4 -0
- package/src/lib/logger/logger.ts +114 -0
- package/src/lib/logger/ring-buffer.ts +65 -0
- package/src/lib/logger/tee.ts +51 -0
- package/src/lib/mime.ts +23 -0
- package/src/lib/never.ts +3 -0
- package/src/lib/utils/hash.ts +38 -0
- package/src/lib/utils/result.ts +35 -0
- package/src/platform/fs.ts +38 -0
- package/src/platform/index.ts +23 -0
- package/src/platform/process.ts +28 -0
- package/src/plugins/agent-status/plugin.ts +77 -0
- package/src/plugins/agents/agents.integration.test.ts +808 -0
- package/src/plugins/agents/index.ts +2 -0
- package/src/plugins/agents/plugin.ts +242 -0
- package/src/plugins/context-compact/context-compact.integration.test.ts +207 -0
- package/src/plugins/context-compact/context-compactor.test.ts +923 -0
- package/src/plugins/context-compact/context-compactor.ts +343 -0
- package/src/plugins/context-compact/history-offloader.test.ts +100 -0
- package/src/plugins/context-compact/history-offloader.ts +47 -0
- package/src/plugins/context-compact/index.ts +3 -0
- package/src/plugins/context-compact/plugin.ts +62 -0
- package/src/plugins/filesystem/filesystem.integration.test.ts +485 -0
- package/src/plugins/filesystem/helpers.ts +216 -0
- package/src/plugins/filesystem/index.ts +4 -0
- package/src/plugins/filesystem/listing.ts +276 -0
- package/src/plugins/filesystem/plugin.ts +468 -0
- package/src/plugins/filesystem/schema.ts +6 -0
- package/src/plugins/git-status/index.ts +1 -0
- package/src/plugins/git-status/plugin.ts +166 -0
- package/src/plugins/limits-guard/config.ts +26 -0
- package/src/plugins/limits-guard/index.ts +4 -0
- package/src/plugins/limits-guard/limit-guard.test.ts +161 -0
- package/src/plugins/limits-guard/limit-guard.ts +164 -0
- package/src/plugins/limits-guard/limits-guard.integration.test.ts +437 -0
- package/src/plugins/limits-guard/plugin.ts +306 -0
- package/src/plugins/llm-debug/index.ts +1 -0
- package/src/plugins/llm-debug/llm-debug.integration.test.ts +192 -0
- package/src/plugins/llm-debug/plugin.ts +172 -0
- package/src/plugins/logs/index.ts +1 -0
- package/src/plugins/logs/plugin.ts +39 -0
- package/src/plugins/mailbox/helpers.ts +83 -0
- package/src/plugins/mailbox/index.ts +13 -0
- package/src/plugins/mailbox/mailbox.integration.test.ts +705 -0
- package/src/plugins/mailbox/plugin.ts +270 -0
- package/src/plugins/mailbox/prompts.ts +104 -0
- package/src/plugins/mailbox/query.ts +53 -0
- package/src/plugins/mailbox/schema.ts +81 -0
- package/src/plugins/mailbox/state.ts +52 -0
- package/src/plugins/resources/index.ts +11 -0
- package/src/plugins/resources/manifest.ts +25 -0
- package/src/plugins/resources/plugin.ts +201 -0
- package/src/plugins/resources/post-inject.ts +74 -0
- package/src/plugins/resources/state.ts +30 -0
- package/src/plugins/result-eviction/index.ts +2 -0
- package/src/plugins/result-eviction/plugin.ts +65 -0
- package/src/plugins/result-eviction/result-eviction.integration.test.ts +244 -0
- package/src/plugins/services/plugin.ts +485 -0
- package/src/plugins/services/port-pool.ts +73 -0
- package/src/plugins/services/prompt.ts +53 -0
- package/src/plugins/services/schema.ts +83 -0
- package/src/plugins/services/service.ts +578 -0
- package/src/plugins/services/services.integration.test.ts +595 -0
- package/src/plugins/session-lifecycle/index.ts +1 -0
- package/src/plugins/session-lifecycle/plugin.ts +302 -0
- package/src/plugins/session-lifecycle/session-lifecycle.integration.test.ts +639 -0
- package/src/plugins/session-state/plugin.ts +179 -0
- package/src/plugins/session-stats/index.ts +3 -0
- package/src/plugins/session-stats/plugin.ts +120 -0
- package/src/plugins/shell/executor.ts +462 -0
- package/src/plugins/shell/index.ts +23 -0
- package/src/plugins/shell/plugin.ts +118 -0
- package/src/plugins/shell/shell.integration.test.ts +273 -0
- package/src/plugins/shell/shell.test.ts +314 -0
- package/src/plugins/skills/discovery.test.ts +395 -0
- package/src/plugins/skills/discovery.ts +276 -0
- package/src/plugins/skills/index.ts +32 -0
- package/src/plugins/skills/plugin.ts +381 -0
- package/src/plugins/skills/prompts.ts +84 -0
- package/src/plugins/skills/schema.ts +88 -0
- package/src/plugins/skills/skills.integration.test.ts +580 -0
- package/src/plugins/snapshotting/index.ts +3 -0
- package/src/plugins/snapshotting/jj-snapshotter.ts +122 -0
- package/src/plugins/snapshotting/plugin.ts +36 -0
- package/src/plugins/snapshotting/snapshotter.ts +20 -0
- package/src/plugins/todo/index.ts +11 -0
- package/src/plugins/todo/plugin.ts +363 -0
- package/src/plugins/todo/prompts.ts +63 -0
- package/src/plugins/todo/schema.ts +71 -0
- package/src/plugins/todo/todo.integration.test.ts +687 -0
- package/src/plugins/uploads/index.ts +13 -0
- package/src/plugins/uploads/plugin.ts +406 -0
- package/src/plugins/uploads/preprocessor.ts +111 -0
- package/src/plugins/uploads/preprocessors/image-classifier.ts +176 -0
- package/src/plugins/uploads/preprocessors/index.ts +7 -0
- package/src/plugins/uploads/preprocessors/markitdown-preprocessor.ts +262 -0
- package/src/plugins/uploads/preprocessors/zip-preprocessor.ts +210 -0
- package/src/plugins/uploads/schema.ts +92 -0
- package/src/plugins/uploads/state.ts +42 -0
- package/src/plugins/uploads/uploads.integration.test.ts +654 -0
- package/src/plugins/user-chat/index.ts +17 -0
- package/src/plugins/user-chat/plugin.ts +728 -0
- package/src/plugins/user-chat/prompts.ts +30 -0
- package/src/plugins/user-chat/schema.ts +80 -0
- package/src/plugins/user-chat/user-chat.integration.test.ts +794 -0
- package/src/plugins/workers/context.ts +251 -0
- package/src/plugins/workers/definition.ts +169 -0
- package/src/plugins/workers/index.ts +21 -0
- package/src/plugins/workers/plugin.ts +722 -0
- package/src/plugins/workers/worker.ts +115 -0
- package/src/plugins/workers/workers.integration.test.ts +778 -0
- package/src/prompts/base.ts +266 -0
- package/src/prompts/builder.ts +194 -0
- package/src/prompts/index.ts +36 -0
- package/src/prompts/macros.test.ts +107 -0
- package/src/prompts/macros.ts +27 -0
- package/src/testing/bootstrap-for-testing.ts +39 -0
- package/src/testing/index.ts +7 -0
- package/src/testing/node-platform.ts +80 -0
- package/src/testing/notification-collector.ts +100 -0
- package/src/testing/preset-helpers.ts +57 -0
- package/src/testing/test-harness.test.ts +63 -0
- package/src/testing/test-harness.ts +279 -0
- package/src/testing/wait-helpers.ts +84 -0
- package/src/transport/adapter/client-adapter.ts +81 -0
- package/src/transport/adapter/index.ts +42 -0
- package/src/transport/adapter/server-adapter.ts +93 -0
- package/src/transport/adapter/types.ts +20 -0
- package/src/transport/http/app.ts +129 -0
- package/src/transport/http/index.ts +7 -0
- package/src/transport/http/middleware/bearer-auth.ts +40 -0
- package/src/transport/http/middleware/error-handler.ts +76 -0
- package/src/transport/http/routes/files.ts +274 -0
- package/src/transport/http/routes/resources.ts +115 -0
- package/src/transport/http/routes/rpc.integration.test.ts +243 -0
- package/src/transport/http/routes/rpc.test.ts +372 -0
- package/src/transport/http/routes/rpc.ts +156 -0
- package/src/transport/http/routes/upload.ts +286 -0
- package/src/transport/rpc/index.ts +11 -0
- package/src/transport/rpc/methods.ts +38 -0
- package/src/user-config.ts +33 -0
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bootstrap - Composition Root for Agent Server
|
|
3
|
+
*
|
|
4
|
+
* Creates and wires all services together based on configuration.
|
|
5
|
+
*/
|
|
6
|
+
import type { EventStore } from './core/events/event-store.js';
|
|
7
|
+
import type { FileStore } from './core/file-store/types.js';
|
|
8
|
+
import { LLMLogger } from './core/llm/index.js';
|
|
9
|
+
import type { LLMProvider } from './core/llm/provider.js';
|
|
10
|
+
import type { Preset } from './core/preset/index.js';
|
|
11
|
+
import type { Platform } from './platform/index.js';
|
|
12
|
+
import { PreprocessorRegistry } from './plugins/uploads/preprocessor.js';
|
|
13
|
+
import type { Config } from './config.js';
|
|
14
|
+
import type { SessionManager } from './core/sessions/session-manager.js';
|
|
15
|
+
import type { UserOutputCallback } from './core/sessions/session.js';
|
|
16
|
+
import { type AllMethodSchemas, type System } from './core/system.js';
|
|
17
|
+
import type { ToolExecutor } from './core/tools/executor.js';
|
|
18
|
+
import type { Logger } from './lib/logger/logger.js';
|
|
19
|
+
import { PortPool } from './plugins/services/port-pool.js';
|
|
20
|
+
import type { RojConfig } from './user-config.js';
|
|
21
|
+
/**
|
|
22
|
+
* All built-in plugin definitions passed to createSystem for type inference.
|
|
23
|
+
* These are always registered in every session (see SessionManager.createSessionInstance).
|
|
24
|
+
*/
|
|
25
|
+
declare const builtinPlugins: readonly [import("./index.js").PluginDefinition<"sessions", void, void, Record<"create", {
|
|
26
|
+
input: {
|
|
27
|
+
presetId: string;
|
|
28
|
+
workspaceDir?: string | undefined;
|
|
29
|
+
sessionId?: string | undefined;
|
|
30
|
+
};
|
|
31
|
+
output: {
|
|
32
|
+
sessionId: string & import("zod").$brand<"SessionId">;
|
|
33
|
+
};
|
|
34
|
+
}> & Record<"list", {
|
|
35
|
+
input: {
|
|
36
|
+
status?: "active" | "closed" | "errored" | undefined;
|
|
37
|
+
tags?: string[] | undefined;
|
|
38
|
+
limit?: number | undefined;
|
|
39
|
+
offset?: number | undefined;
|
|
40
|
+
orderBy?: "createdAt" | "lastActivityAt" | undefined;
|
|
41
|
+
order?: "asc" | "desc" | undefined;
|
|
42
|
+
};
|
|
43
|
+
output: {
|
|
44
|
+
sessions: unknown[];
|
|
45
|
+
total: number;
|
|
46
|
+
};
|
|
47
|
+
}> & Record<"fork", {
|
|
48
|
+
input: {
|
|
49
|
+
sessionId: string & import("zod").$brand<"SessionId">;
|
|
50
|
+
eventIndex: number;
|
|
51
|
+
};
|
|
52
|
+
output: {
|
|
53
|
+
sessionId: string & import("zod").$brand<"SessionId">;
|
|
54
|
+
};
|
|
55
|
+
}>, Record<"get", {
|
|
56
|
+
input: Record<string, never>;
|
|
57
|
+
output: {
|
|
58
|
+
sessionId: string & import("zod").$brand<"SessionId">;
|
|
59
|
+
presetId: string;
|
|
60
|
+
status: string;
|
|
61
|
+
createdAt: number;
|
|
62
|
+
agentCount: number;
|
|
63
|
+
entryAgentId: (string & import("zod").$brand<"AgentId">) | null;
|
|
64
|
+
closedAt?: number | undefined;
|
|
65
|
+
};
|
|
66
|
+
}> & Record<"close", {
|
|
67
|
+
input: Record<string, never>;
|
|
68
|
+
output: {};
|
|
69
|
+
}> & Record<"reopen", {
|
|
70
|
+
input: Record<string, never>;
|
|
71
|
+
output: {};
|
|
72
|
+
}> & Record<"updateMetadata", {
|
|
73
|
+
input: {
|
|
74
|
+
name?: string | undefined;
|
|
75
|
+
};
|
|
76
|
+
output: {};
|
|
77
|
+
}> & Record<"getEvents", {
|
|
78
|
+
input: {
|
|
79
|
+
since?: number | undefined;
|
|
80
|
+
limit?: number | undefined;
|
|
81
|
+
offset?: number | undefined;
|
|
82
|
+
type?: string | undefined;
|
|
83
|
+
agentId?: string | undefined;
|
|
84
|
+
};
|
|
85
|
+
output: {
|
|
86
|
+
events: unknown[];
|
|
87
|
+
total: number;
|
|
88
|
+
lastIndex: number;
|
|
89
|
+
};
|
|
90
|
+
}>>, import("./index.js").PluginDefinition<"presets", void, void, Record<"list", {
|
|
91
|
+
input: Record<string, never>;
|
|
92
|
+
output: {
|
|
93
|
+
presets: {
|
|
94
|
+
id: string;
|
|
95
|
+
name: string;
|
|
96
|
+
description?: string;
|
|
97
|
+
defaultResourceSlugs?: string[];
|
|
98
|
+
}[];
|
|
99
|
+
};
|
|
100
|
+
}> & Record<"getAgents", {
|
|
101
|
+
input: {
|
|
102
|
+
sessionId: string & import("zod").$brand<"SessionId">;
|
|
103
|
+
};
|
|
104
|
+
output: {
|
|
105
|
+
agents: {
|
|
106
|
+
name: string;
|
|
107
|
+
spawnableBy: string[];
|
|
108
|
+
hasInputSchema: boolean;
|
|
109
|
+
}[];
|
|
110
|
+
};
|
|
111
|
+
}>, {}>, import("./index.js").PluginDefinition<"mailbox", import("./index.js").MailboxPresetConfig, import("./index.js").MailboxAgentConfig, {}, Record<"send", {
|
|
112
|
+
input: {
|
|
113
|
+
toAgentId: string & import("zod").$brand<"AgentId">;
|
|
114
|
+
content: string;
|
|
115
|
+
fromAgentId?: (string & import("zod").$brand<"AgentId">) | undefined;
|
|
116
|
+
debug?: boolean | undefined;
|
|
117
|
+
};
|
|
118
|
+
output: {
|
|
119
|
+
messageId: string;
|
|
120
|
+
};
|
|
121
|
+
}>>, import("./index.js").PluginDefinition<"agents", import("./index.js").AgentsPluginConfig, void, {}, Record<"spawn", {
|
|
122
|
+
input: {
|
|
123
|
+
definitionName: string;
|
|
124
|
+
parentId: string & import("zod").$brand<"AgentId">;
|
|
125
|
+
message?: string | undefined;
|
|
126
|
+
typedInput?: unknown;
|
|
127
|
+
};
|
|
128
|
+
output: {
|
|
129
|
+
agentId: string & import("zod").$brand<"AgentId">;
|
|
130
|
+
};
|
|
131
|
+
}> & Record<"resume", {
|
|
132
|
+
input: {
|
|
133
|
+
agentId: string & import("zod").$brand<"AgentId">;
|
|
134
|
+
};
|
|
135
|
+
output: {};
|
|
136
|
+
}> & Record<"pause", {
|
|
137
|
+
input: {
|
|
138
|
+
agentId: string & import("zod").$brand<"AgentId">;
|
|
139
|
+
message?: string | undefined;
|
|
140
|
+
};
|
|
141
|
+
output: {};
|
|
142
|
+
}> & Record<"rewind", {
|
|
143
|
+
input: {
|
|
144
|
+
agentId: string & import("zod").$brand<"AgentId">;
|
|
145
|
+
messageIndex: number;
|
|
146
|
+
};
|
|
147
|
+
output: {};
|
|
148
|
+
}>>, import("./index.js").PluginDefinition<"agent-status", void, void, {}, {}>, import("./index.js").PluginDefinition<"user-chat", import("./index.js").UserChatPresetConfig, import("./index.js").UserChatAgentConfig, {}, Record<"askQuestion", {
|
|
149
|
+
input: {
|
|
150
|
+
agentId: string & import("zod").$brand<"AgentId">;
|
|
151
|
+
question: string;
|
|
152
|
+
inputType: {
|
|
153
|
+
type: "text";
|
|
154
|
+
placeholder?: string | undefined;
|
|
155
|
+
multiline?: boolean | undefined;
|
|
156
|
+
} | {
|
|
157
|
+
type: "single_choice";
|
|
158
|
+
options: {
|
|
159
|
+
value: string;
|
|
160
|
+
label: string;
|
|
161
|
+
description?: string | undefined;
|
|
162
|
+
}[];
|
|
163
|
+
} | {
|
|
164
|
+
type: "multi_choice";
|
|
165
|
+
options: {
|
|
166
|
+
value: string;
|
|
167
|
+
label: string;
|
|
168
|
+
description?: string | undefined;
|
|
169
|
+
}[];
|
|
170
|
+
minSelect?: number | undefined;
|
|
171
|
+
maxSelect?: number | undefined;
|
|
172
|
+
} | {
|
|
173
|
+
type: "rating";
|
|
174
|
+
min: number;
|
|
175
|
+
max: number;
|
|
176
|
+
labels?: {
|
|
177
|
+
min?: string | undefined;
|
|
178
|
+
max?: string | undefined;
|
|
179
|
+
} | undefined;
|
|
180
|
+
} | {
|
|
181
|
+
type: "confirm";
|
|
182
|
+
confirmLabel?: string | undefined;
|
|
183
|
+
cancelLabel?: string | undefined;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
output: {
|
|
187
|
+
messageId: string;
|
|
188
|
+
};
|
|
189
|
+
}> & Record<"tellUser", {
|
|
190
|
+
input: {
|
|
191
|
+
agentId: string & import("zod").$brand<"AgentId">;
|
|
192
|
+
message: string;
|
|
193
|
+
format: "text" | "markdown";
|
|
194
|
+
};
|
|
195
|
+
output: {
|
|
196
|
+
messageId: string;
|
|
197
|
+
};
|
|
198
|
+
}> & Record<"sendMessage", {
|
|
199
|
+
input: {
|
|
200
|
+
content: string;
|
|
201
|
+
agentId?: (string & import("zod").$brand<"AgentId">) | undefined;
|
|
202
|
+
};
|
|
203
|
+
output: {
|
|
204
|
+
messageId: string & import("zod").$brand<"ChatMessageId">;
|
|
205
|
+
};
|
|
206
|
+
}> & Record<"answerQuestion", {
|
|
207
|
+
input: {
|
|
208
|
+
agentId: string & import("zod").$brand<"AgentId">;
|
|
209
|
+
questionId: string & import("zod").$brand<"ChatMessageId">;
|
|
210
|
+
answer: unknown;
|
|
211
|
+
};
|
|
212
|
+
output: {};
|
|
213
|
+
}> & Record<"getMessages", {
|
|
214
|
+
input: {
|
|
215
|
+
sessionId: string;
|
|
216
|
+
};
|
|
217
|
+
output: {
|
|
218
|
+
messages: unknown[];
|
|
219
|
+
};
|
|
220
|
+
}>>, import("./index.js").PluginDefinition<"uploads", import("./plugins/uploads/plugin.js").UploadsPluginConfig, void, {}, Record<"listPending", {
|
|
221
|
+
input: {
|
|
222
|
+
sessionId: string;
|
|
223
|
+
};
|
|
224
|
+
output: {
|
|
225
|
+
uploads: {
|
|
226
|
+
uploadId: string;
|
|
227
|
+
filename: string;
|
|
228
|
+
mimeType: string;
|
|
229
|
+
size: number;
|
|
230
|
+
status: "processing" | "ready" | "failed";
|
|
231
|
+
createdAt: number;
|
|
232
|
+
}[];
|
|
233
|
+
};
|
|
234
|
+
}> & Record<"delete", {
|
|
235
|
+
input: {
|
|
236
|
+
sessionId: string;
|
|
237
|
+
uploadId: string;
|
|
238
|
+
};
|
|
239
|
+
output: {};
|
|
240
|
+
}> & Record<"loadAttachments", {
|
|
241
|
+
input: {
|
|
242
|
+
sessionId: string;
|
|
243
|
+
uploadIds: string[];
|
|
244
|
+
};
|
|
245
|
+
output: {
|
|
246
|
+
attachments: unknown[];
|
|
247
|
+
};
|
|
248
|
+
}> & Record<"markUsed", {
|
|
249
|
+
input: {
|
|
250
|
+
sessionId: string;
|
|
251
|
+
uploadIds: string[];
|
|
252
|
+
messageId: string;
|
|
253
|
+
};
|
|
254
|
+
output: {};
|
|
255
|
+
}> & Record<"upload", {
|
|
256
|
+
input: {
|
|
257
|
+
sessionId: string;
|
|
258
|
+
filename: string;
|
|
259
|
+
mimeType: string;
|
|
260
|
+
size: number;
|
|
261
|
+
fileBuffer: Buffer<ArrayBufferLike>;
|
|
262
|
+
};
|
|
263
|
+
output: {
|
|
264
|
+
uploadId: string;
|
|
265
|
+
status: "ready" | "failed";
|
|
266
|
+
extractedContent?: string | undefined;
|
|
267
|
+
};
|
|
268
|
+
}>>, import("./index.js").PluginDefinition<"resources", import("./index.js").ResourcesPluginConfig, void, {}, Record<"inject", {
|
|
269
|
+
input: {
|
|
270
|
+
sessionId: string;
|
|
271
|
+
filename: string;
|
|
272
|
+
mimeType: string;
|
|
273
|
+
size: number;
|
|
274
|
+
fileBuffer: Buffer<ArrayBufferLike>;
|
|
275
|
+
metadata?: {
|
|
276
|
+
slug?: string | undefined;
|
|
277
|
+
name?: string | undefined;
|
|
278
|
+
} | undefined;
|
|
279
|
+
};
|
|
280
|
+
output: {
|
|
281
|
+
resourceId: string;
|
|
282
|
+
paths: string[];
|
|
283
|
+
};
|
|
284
|
+
}>>, import("./index.js").PluginDefinition<"llm", void, void, {}, Record<"getCalls", {
|
|
285
|
+
input: {
|
|
286
|
+
limit?: number | undefined;
|
|
287
|
+
offset?: number | undefined;
|
|
288
|
+
};
|
|
289
|
+
output: {
|
|
290
|
+
calls: unknown[];
|
|
291
|
+
total: number;
|
|
292
|
+
};
|
|
293
|
+
}> & Record<"getCall", {
|
|
294
|
+
input: {
|
|
295
|
+
callId: string;
|
|
296
|
+
};
|
|
297
|
+
output: unknown;
|
|
298
|
+
}> & Record<"getCurlCommand", {
|
|
299
|
+
input: {
|
|
300
|
+
callId: string;
|
|
301
|
+
};
|
|
302
|
+
output: {
|
|
303
|
+
curl: string;
|
|
304
|
+
};
|
|
305
|
+
}>>, import("./index.js").PluginDefinition<"services", import("./plugins/services/plugin.js").ServicePluginConfig, import("./index.js").ServiceAgentConfig, {}, Record<"start", {
|
|
306
|
+
input: {
|
|
307
|
+
serviceType?: string | undefined;
|
|
308
|
+
all?: boolean | undefined;
|
|
309
|
+
waitForReady?: boolean | undefined;
|
|
310
|
+
};
|
|
311
|
+
output: {
|
|
312
|
+
started?: string[] | undefined;
|
|
313
|
+
};
|
|
314
|
+
}> & Record<"stop", {
|
|
315
|
+
input: {
|
|
316
|
+
serviceType: string;
|
|
317
|
+
};
|
|
318
|
+
output: {};
|
|
319
|
+
}> & Record<"restart", {
|
|
320
|
+
input: {
|
|
321
|
+
serviceType: string;
|
|
322
|
+
};
|
|
323
|
+
output: {};
|
|
324
|
+
}> & Record<"list", {
|
|
325
|
+
input: Record<string, never>;
|
|
326
|
+
output: {
|
|
327
|
+
services: {
|
|
328
|
+
serviceType: string;
|
|
329
|
+
status: string;
|
|
330
|
+
port?: number | undefined;
|
|
331
|
+
}[];
|
|
332
|
+
};
|
|
333
|
+
}> & Record<"status", {
|
|
334
|
+
input: {
|
|
335
|
+
serviceType: string;
|
|
336
|
+
logLines?: number | undefined;
|
|
337
|
+
};
|
|
338
|
+
output: {
|
|
339
|
+
serviceType: string;
|
|
340
|
+
status: string;
|
|
341
|
+
recentLogs: string[];
|
|
342
|
+
port?: number | undefined;
|
|
343
|
+
error?: string | undefined;
|
|
344
|
+
};
|
|
345
|
+
}> & Record<"logs", {
|
|
346
|
+
input: {
|
|
347
|
+
serviceType: string;
|
|
348
|
+
lines?: number | undefined;
|
|
349
|
+
};
|
|
350
|
+
output: {
|
|
351
|
+
serviceType: string;
|
|
352
|
+
lines: string[];
|
|
353
|
+
};
|
|
354
|
+
}>>, import("./index.js").PluginDefinition<"filesystem", import("./plugins/filesystem/plugin.js").FilesystemPresetConfig, import("./plugins/filesystem/plugin.js").FilesystemAgentConfig, {}, Record<"listSession", {
|
|
355
|
+
input: {
|
|
356
|
+
path?: string | undefined;
|
|
357
|
+
};
|
|
358
|
+
output: {
|
|
359
|
+
entries: import("./plugins/filesystem/listing.js").DirectoryEntry[];
|
|
360
|
+
path: string;
|
|
361
|
+
root: string;
|
|
362
|
+
};
|
|
363
|
+
}> & Record<"listWorkspace", {
|
|
364
|
+
input: {
|
|
365
|
+
path?: string | undefined;
|
|
366
|
+
recursive?: boolean | undefined;
|
|
367
|
+
};
|
|
368
|
+
output: {
|
|
369
|
+
entries: import("./plugins/filesystem/listing.js").DirectoryEntry[];
|
|
370
|
+
path: string;
|
|
371
|
+
root: string;
|
|
372
|
+
};
|
|
373
|
+
}>>, import("./index.js").PluginDefinition<"logs", void, void, {}, Record<"tail", {
|
|
374
|
+
input: {
|
|
375
|
+
since?: number | undefined;
|
|
376
|
+
};
|
|
377
|
+
output: {
|
|
378
|
+
lines: string[];
|
|
379
|
+
offset: number;
|
|
380
|
+
};
|
|
381
|
+
}>>, import("./index.js").PluginDefinition<"session-stats", void, void, {}, {}>, import("./index.js").PluginDefinition<"sessionState", import("./index.js").SessionStatePluginConfig, void, {}, Record<"get", {
|
|
382
|
+
input: {
|
|
383
|
+
sessionId: string;
|
|
384
|
+
};
|
|
385
|
+
output: {
|
|
386
|
+
state: Record<string, unknown>;
|
|
387
|
+
};
|
|
388
|
+
}> & Record<"update", {
|
|
389
|
+
input: {
|
|
390
|
+
sessionId: string;
|
|
391
|
+
updates: Record<string, unknown>;
|
|
392
|
+
};
|
|
393
|
+
output: {
|
|
394
|
+
state: {
|
|
395
|
+
[x: string]: unknown;
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
}>>, import("./index.js").PluginDefinition<"git-status", void, void, {}, {}>];
|
|
399
|
+
/** Method schemas inferred from all built-in plugins */
|
|
400
|
+
export type BuiltinMethodSchemas = AllMethodSchemas<typeof builtinPlugins>;
|
|
401
|
+
/**
|
|
402
|
+
* Container for all bootstrapped services
|
|
403
|
+
*/
|
|
404
|
+
export interface Services {
|
|
405
|
+
eventStore: EventStore;
|
|
406
|
+
llmProvider: LLMProvider;
|
|
407
|
+
/** Named provider instances for middleware routing (e.g. useProvider('anthropic')) */
|
|
408
|
+
llmProviders: ReadonlyMap<string, LLMProvider>;
|
|
409
|
+
llmLogger?: LLMLogger;
|
|
410
|
+
toolExecutor: ToolExecutor;
|
|
411
|
+
logger: Logger;
|
|
412
|
+
presets: Map<string, Preset>;
|
|
413
|
+
/** FileStore rooted at dataPath for upload/infrastructure file operations */
|
|
414
|
+
dataFileStore: FileStore;
|
|
415
|
+
/** Configuration (needed by upload routes) */
|
|
416
|
+
config: Config;
|
|
417
|
+
/** Global port pool shared across all sessions */
|
|
418
|
+
portPool: PortPool;
|
|
419
|
+
/** Preprocessor registry for upload content extraction */
|
|
420
|
+
preprocessorRegistry: PreprocessorRegistry;
|
|
421
|
+
/** Host-environment adapters (filesystem, process). */
|
|
422
|
+
platform: Platform;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Bootstrap all services based on configuration.
|
|
426
|
+
*
|
|
427
|
+
* `platform` provides runtime adapters (fs, process). Callers pass concrete
|
|
428
|
+
* impls from their runtime package (e.g. `createBunPlatform()` from
|
|
429
|
+
* `@roj-ai/sdk/bun-platform`).
|
|
430
|
+
*/
|
|
431
|
+
export declare function bootstrap(config: Config, userConfig: RojConfig, platform: Platform): Services;
|
|
432
|
+
/**
|
|
433
|
+
* Create a System wired to bootstrapped services.
|
|
434
|
+
* Returns the full System object with SessionManager, typed method schemas, and lifecycle methods.
|
|
435
|
+
*/
|
|
436
|
+
export declare function createSystemFromServices(services: Services, options?: {
|
|
437
|
+
onUserOutput?: UserOutputCallback;
|
|
438
|
+
}): System<BuiltinMethodSchemas, typeof builtinPlugins>;
|
|
439
|
+
/**
|
|
440
|
+
* Create a SessionManager wired to bootstrapped services.
|
|
441
|
+
* @deprecated Use createSystemFromServices() instead for typed method registry.
|
|
442
|
+
*/
|
|
443
|
+
export declare function createSessionManager(services: Services, options?: {
|
|
444
|
+
onUserOutput?: UserOutputCallback;
|
|
445
|
+
}): SessionManager;
|
|
446
|
+
export {};
|
|
447
|
+
/**
|
|
448
|
+
* Bootstrap for testing with memory store and mock LLM.
|
|
449
|
+
*
|
|
450
|
+
* @param mockHandler - Optional custom mock handler for LLM responses
|
|
451
|
+
* @param presets - Optional presets array (defaults to empty)
|
|
452
|
+
*/
|
|
453
|
+
//# sourceMappingURL=bootstrap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAE9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAI3D,OAAO,EAAE,SAAS,EAAuC,MAAM,qBAAqB,CAAA;AAEpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAGzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AAExE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AACpE,OAAO,EAAE,KAAK,gBAAgB,EAAgB,KAAK,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAG5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AASpD,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAO1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAEjD;;;GAGG;AACH,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAgBV,CAAA;AAEV,wDAAwD;AACxD,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,CAAC,OAAO,cAAc,CAAC,CAAA;AAE1E;;GAEG;AACH,MAAM,WAAW,QAAQ;IACxB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,sFAAsF;IACtF,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IAC9C,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,YAAY,EAAE,YAAY,CAAA;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5B,6EAA6E;IAC7E,aAAa,EAAE,SAAS,CAAA;IACxB,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAA;IACd,kDAAkD;IAClD,QAAQ,EAAE,QAAQ,CAAA;IAClB,0DAA0D;IAC1D,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,uDAAuD;IACvD,QAAQ,EAAE,QAAQ,CAAA;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAsC7F;AA8ED;;;GAGG;AACH,wBAAgB,wBAAwB,CACvC,QAAQ,EAAE,QAAQ,EAClB,OAAO,CAAC,EAAE;IACT,YAAY,CAAC,EAAE,kBAAkB,CAAA;CACjC,GACC,MAAM,CAAC,oBAAoB,EAAE,OAAO,cAAc,CAAC,CAiBrD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CACnC,QAAQ,EAAE,QAAQ,EAClB,OAAO,CAAC,EAAE;IACT,YAAY,CAAC,EAAE,kBAAkB,CAAA;CACjC,GACC,cAAc,CAEhB;;AAED;;;;;GAKG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BuiltinEvent — Union of all built-in plugin event types.
|
|
3
|
+
*
|
|
4
|
+
* This type is the client-side equivalent of ProjectionEvent in projections.ts.
|
|
5
|
+
* Use it to narrow DomainEvent to access event-specific properties after type checks.
|
|
6
|
+
*/
|
|
7
|
+
import type { agentEvents } from './core/agents/state.js';
|
|
8
|
+
import type { contextEvents } from './core/context/state.js';
|
|
9
|
+
import type { FactoryEventType } from './core/events/types.js';
|
|
10
|
+
import type { llmEvents } from './core/llm/state.js';
|
|
11
|
+
import type { sessionEvents } from './core/sessions/state.js';
|
|
12
|
+
import type { toolEvents } from './core/tools/state.js';
|
|
13
|
+
import type { mailboxEvents } from './plugins/mailbox/state.js';
|
|
14
|
+
import type { userChatEvents } from './plugins/user-chat/plugin.js';
|
|
15
|
+
export type BuiltinEvent = FactoryEventType<typeof agentEvents | typeof sessionEvents | typeof toolEvents | typeof llmEvents | typeof contextEvents | typeof mailboxEvents | typeof userChatEvents>;
|
|
16
|
+
//# sourceMappingURL=builtin-events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtin-events.d.ts","sourceRoot":"","sources":["../src/builtin-events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAEnE,MAAM,MAAM,YAAY,GAAG,gBAAgB,CACxC,OAAO,WAAW,GAClB,OAAO,aAAa,GACpB,OAAO,UAAU,GACjB,OAAO,SAAS,GAChB,OAAO,aAAa,GACpB,OAAO,aAAa,GACpB,OAAO,cAAc,CACvB,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bun/Node FileSystem adapter — thin wrapper over `node:fs/promises`.
|
|
3
|
+
*
|
|
4
|
+
* Bun's `node:fs/promises` is a full-fidelity polyfill; this module is thus
|
|
5
|
+
* identical under Bun and Node runtimes.
|
|
6
|
+
*/
|
|
7
|
+
import type { FileSystem } from '../platform/index.js';
|
|
8
|
+
export declare function createBunFileSystem(): FileSystem;
|
|
9
|
+
//# sourceMappingURL=fs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/bun-platform/fs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEtD,wBAAgB,mBAAmB,IAAI,UAAU,CAuChD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bun/Node platform adapter factory.
|
|
3
|
+
*
|
|
4
|
+
* Provides concrete implementations of `@roj-ai/sdk`'s Platform interface
|
|
5
|
+
* using `node:fs/promises`, `node:child_process`, and `node:os`.
|
|
6
|
+
*/
|
|
7
|
+
import type { Platform } from '../platform/index.js';
|
|
8
|
+
import { createBunFileSystem } from './fs.js';
|
|
9
|
+
import { createBunProcessRunner } from './process.js';
|
|
10
|
+
export declare function createBunPlatform(): Platform;
|
|
11
|
+
export { createBunFileSystem, createBunProcessRunner };
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bun-platform/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAErD,wBAAgB,iBAAiB,IAAI,QAAQ,CAM5C;AAED,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process.d.ts","sourceRoot":"","sources":["../../src/bun-platform/process.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAIzD,wBAAgB,sBAAsB,IAAI,aAAa,CActD"}
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for the Agent Server
|
|
3
|
+
*/
|
|
4
|
+
import type { MockInferenceHandler } from './core/llm/mock.js';
|
|
5
|
+
import type { LogLevel } from './lib/logger/logger.js';
|
|
6
|
+
/**
|
|
7
|
+
* Server configuration
|
|
8
|
+
*/
|
|
9
|
+
export interface Config {
|
|
10
|
+
port: number;
|
|
11
|
+
host: string;
|
|
12
|
+
dataPath: string;
|
|
13
|
+
persistence: 'file' | 'memory';
|
|
14
|
+
openRouterApiKey?: string;
|
|
15
|
+
anthropicApiKey?: string;
|
|
16
|
+
defaultModel?: string;
|
|
17
|
+
llmMock?: MockInferenceHandler;
|
|
18
|
+
/** Extended thinking token budget (Anthropic only). When set, enables thinking. */
|
|
19
|
+
thinkingBudget?: number;
|
|
20
|
+
llmLoggingEnabled?: boolean;
|
|
21
|
+
logLevel: LogLevel;
|
|
22
|
+
logFormat: 'console' | 'json';
|
|
23
|
+
workerUrl?: string;
|
|
24
|
+
agentToken?: string;
|
|
25
|
+
wsReconnectBaseDelayMs?: number;
|
|
26
|
+
wsReconnectMaxDelayMs?: number;
|
|
27
|
+
wsHeartbeatIntervalMs?: number;
|
|
28
|
+
wsHandshakeTimeoutMs?: number;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Load configuration from environment variables.
|
|
32
|
+
*/
|
|
33
|
+
export declare const loadConfig: () => Config;
|
|
34
|
+
/**
|
|
35
|
+
* Validate configuration and return errors if any.
|
|
36
|
+
*/
|
|
37
|
+
export declare const validateConfig: (config: Config) => string[];
|
|
38
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAEtD;;GAEG;AACH,MAAM,WAAW,MAAM;IAEtB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IAGZ,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,GAAG,QAAQ,CAAA;IAI9B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,oBAAoB,CAAA;IAC9B,mFAAmF;IACnF,cAAc,CAAC,EAAE,MAAM,CAAA;IAGvB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAG3B,QAAQ,EAAE,QAAQ,CAAA;IAClB,SAAS,EAAE,SAAS,GAAG,MAAM,CAAA;IAG7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IAGnB,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,oBAAoB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,QAAO,MAoB7B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,KAAG,MAAM,EA2BrD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.test.d.ts","sourceRoot":"","sources":["../src/config.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-loop.integration.test.d.ts","sourceRoot":"","sources":["../../src/core/agent-loop.integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-config.test.d.ts","sourceRoot":"","sources":["../../../src/core/agents/agent-config.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent role constants.
|
|
3
|
+
*
|
|
4
|
+
* These constants define the special agent roles in the system:
|
|
5
|
+
* - ORCHESTRATOR: The main agent that coordinates work and spawns sub-agents
|
|
6
|
+
* - COMMUNICATOR: Optional agent that handles user communication in communication-agent mode
|
|
7
|
+
*/
|
|
8
|
+
/** Orchestrator agent role - the main coordinating agent */
|
|
9
|
+
export declare const ORCHESTRATOR_ROLE: "orchestrator";
|
|
10
|
+
/** Communicator agent role - handles user communication */
|
|
11
|
+
export declare const COMMUNICATOR_ROLE: "communicator";
|
|
12
|
+
/** Type for special agent roles */
|
|
13
|
+
export type AgentRole = typeof ORCHESTRATOR_ROLE | typeof COMMUNICATOR_ROLE;
|
|
14
|
+
/**
|
|
15
|
+
* Prompt-level role classification for system prompt composition.
|
|
16
|
+
* - 'entry': Orchestrator without communicator (talks to user directly)
|
|
17
|
+
* - 'orchestrator': Orchestrator with communicator (talks to communicator, not user)
|
|
18
|
+
* - 'child': Spawned by parent, reports results back
|
|
19
|
+
* - 'communicator': Handles user communication, relays to orchestrator
|
|
20
|
+
*/
|
|
21
|
+
export type PromptRole = 'entry' | 'orchestrator' | 'child' | 'communicator';
|
|
22
|
+
/**
|
|
23
|
+
* Determine an agent's prompt role from its state and session context.
|
|
24
|
+
*/
|
|
25
|
+
export declare function getAgentRole(agentState: {
|
|
26
|
+
definitionName: string;
|
|
27
|
+
parentId: string | null;
|
|
28
|
+
}, sessionState: {
|
|
29
|
+
agents: Map<string, {
|
|
30
|
+
definitionName: string;
|
|
31
|
+
}>;
|
|
32
|
+
}): PromptRole;
|
|
33
|
+
//# sourceMappingURL=agent-roles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-roles.d.ts","sourceRoot":"","sources":["../../../src/core/agents/agent-roles.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,4DAA4D;AAC5D,eAAO,MAAM,iBAAiB,EAAG,cAAuB,CAAA;AAExD,2DAA2D;AAC3D,eAAO,MAAM,iBAAiB,EAAG,cAAuB,CAAA;AAExD,mCAAmC;AACnC,MAAM,MAAM,SAAS,GAAG,OAAO,iBAAiB,GAAG,OAAO,iBAAiB,CAAA;AAE3E;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,cAAc,GAAG,OAAO,GAAG,cAAc,CAAA;AAE5E;;GAEG;AACH,wBAAgB,YAAY,CAC3B,UAAU,EAAE;IAAE,cAAc,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EAC/D,YAAY,EAAE;IAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,cAAc,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,GAC/D,UAAU,CAQZ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-shutdown.test.d.ts","sourceRoot":"","sources":["../../../src/core/agents/agent-shutdown.test.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|