@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,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agents Plugin - Spawn tools for child agent creation + agent management methods
|
|
3
|
+
*
|
|
4
|
+
* Generates `start_<agent_name>` tools for each spawnable agent defined in the agent config.
|
|
5
|
+
* Tool executors delegate to the plugin's own `spawn` method via ctx.self.spawn().
|
|
6
|
+
*
|
|
7
|
+
* Also provides session-level methods for agent management:
|
|
8
|
+
* - agents.spawn — spawn agent manually
|
|
9
|
+
* - agents.resume — resume paused agent
|
|
10
|
+
* - agents.pause — pause agent
|
|
11
|
+
*/
|
|
12
|
+
import z from 'zod/v4';
|
|
13
|
+
/**
|
|
14
|
+
* Information about a spawnable agent, used to generate typed start_<name> tools.
|
|
15
|
+
*/
|
|
16
|
+
export interface SpawnableAgentInfo {
|
|
17
|
+
name: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
inputSchema?: z.ZodType<unknown>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Session-wide agents plugin configuration.
|
|
23
|
+
* Maps agent name to its spawn info (description, input schema).
|
|
24
|
+
*/
|
|
25
|
+
export interface AgentsPluginConfig {
|
|
26
|
+
/** Map of agent name → spawn info for generating typed tools */
|
|
27
|
+
agentDefinitions: Map<string, SpawnableAgentInfo>;
|
|
28
|
+
}
|
|
29
|
+
export declare const agentsPlugin: import("../../core/plugins/index.js").PluginDefinition<"agents", AgentsPluginConfig, void, {}, Record<"spawn", {
|
|
30
|
+
input: {
|
|
31
|
+
definitionName: string;
|
|
32
|
+
parentId: string & z.core.$brand<"AgentId">;
|
|
33
|
+
message?: string | undefined;
|
|
34
|
+
typedInput?: unknown;
|
|
35
|
+
};
|
|
36
|
+
output: {
|
|
37
|
+
agentId: string & z.core.$brand<"AgentId">;
|
|
38
|
+
};
|
|
39
|
+
}> & Record<"resume", {
|
|
40
|
+
input: {
|
|
41
|
+
agentId: string & z.core.$brand<"AgentId">;
|
|
42
|
+
};
|
|
43
|
+
output: {};
|
|
44
|
+
}> & Record<"pause", {
|
|
45
|
+
input: {
|
|
46
|
+
agentId: string & z.core.$brand<"AgentId">;
|
|
47
|
+
message?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
output: {};
|
|
50
|
+
}> & Record<"rewind", {
|
|
51
|
+
input: {
|
|
52
|
+
agentId: string & z.core.$brand<"AgentId">;
|
|
53
|
+
messageIndex: number;
|
|
54
|
+
};
|
|
55
|
+
output: {};
|
|
56
|
+
}>>;
|
|
57
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/agents/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,CAAC,MAAM,QAAQ,CAAA;AAUtB;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;CAChC;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAClC,gEAAgE;IAChE,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAA;CACjD;AAkBD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyLhB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-compact.integration.test.d.ts","sourceRoot":"","sources":["../../../src/plugins/context-compact/context-compact.integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { AgentId } from '../../core/agents/schema.js';
|
|
2
|
+
import type { ContextCompactedEvent } from '../../core/context/state.js';
|
|
3
|
+
import type { LLMMessage, LLMProvider } from '../../core/llm/provider.js';
|
|
4
|
+
import type { ModelId } from '../../core/llm/schema.js';
|
|
5
|
+
import type { SessionId } from '../../core/sessions/schema.js';
|
|
6
|
+
import type { Result } from '../../lib/utils/result.js';
|
|
7
|
+
import type { Logger } from '../../lib/logger/logger.js';
|
|
8
|
+
/**
|
|
9
|
+
* Format a single message for summarization.
|
|
10
|
+
* Handles all message types including tool calls and tool results.
|
|
11
|
+
*/
|
|
12
|
+
export declare function formatMessageForSummary(msg: LLMMessage): string;
|
|
13
|
+
export interface CompactionConfig {
|
|
14
|
+
/** Model ID to use for summarization (required) */
|
|
15
|
+
model: ModelId;
|
|
16
|
+
/** Token threshold to trigger compaction */
|
|
17
|
+
maxTokens: number;
|
|
18
|
+
/** Number of recent messages to keep uncompacted */
|
|
19
|
+
keepRecentMessages: number;
|
|
20
|
+
/** Max tokens for kept recent messages (whichever limit is hit first) */
|
|
21
|
+
keepRecentTokens?: number;
|
|
22
|
+
/** Target token count after compaction (informational) */
|
|
23
|
+
targetTokens?: number;
|
|
24
|
+
/** System prompt for summarization */
|
|
25
|
+
summaryPrompt?: string;
|
|
26
|
+
/** Enable history offloading before compaction */
|
|
27
|
+
offloadHistory?: boolean;
|
|
28
|
+
/** Path prefix for offloaded history (default: /session/.history/) */
|
|
29
|
+
historyPathPrefix?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface CompactionResult {
|
|
32
|
+
/** New messages to use (summary + kept messages) */
|
|
33
|
+
compactedMessages: LLMMessage[];
|
|
34
|
+
/** Generated summary text */
|
|
35
|
+
summary: string;
|
|
36
|
+
/** Token count before compaction */
|
|
37
|
+
originalTokens: number;
|
|
38
|
+
/** Token count after compaction */
|
|
39
|
+
compactedTokens: number;
|
|
40
|
+
/** Number of messages that were removed/summarized */
|
|
41
|
+
messagesRemoved: number;
|
|
42
|
+
/** Path to offloaded full history (if enabled) */
|
|
43
|
+
historyPath?: string;
|
|
44
|
+
}
|
|
45
|
+
/** Default path prefix for offloaded history */
|
|
46
|
+
export declare const DEFAULT_HISTORY_PATH_PREFIX = "/session/.history/";
|
|
47
|
+
/**
|
|
48
|
+
* Interface for offloading conversation history to files.
|
|
49
|
+
* This is optional - if not provided, history offloading is disabled.
|
|
50
|
+
*/
|
|
51
|
+
export interface HistoryOffloader {
|
|
52
|
+
/**
|
|
53
|
+
* Offload conversation history to a file.
|
|
54
|
+
* @param agentId - ID of the agent whose history is being offloaded
|
|
55
|
+
* @param content - Formatted conversation content
|
|
56
|
+
* @param pathPrefix - Path prefix for history files
|
|
57
|
+
* @returns Path to the offloaded history file
|
|
58
|
+
*/
|
|
59
|
+
offload(agentId: AgentId, content: string, pathPrefix: string): Promise<string>;
|
|
60
|
+
}
|
|
61
|
+
export declare class ContextCompactor {
|
|
62
|
+
private readonly llmProvider;
|
|
63
|
+
private readonly logger;
|
|
64
|
+
private readonly config;
|
|
65
|
+
private readonly historyOffloader?;
|
|
66
|
+
constructor(llmProvider: LLMProvider, logger: Logger, config: CompactionConfig, historyOffloader?: HistoryOffloader | undefined);
|
|
67
|
+
/**
|
|
68
|
+
* Compute how many recent messages to keep, respecting both count and token limits.
|
|
69
|
+
* Ensures the kept portion never starts with orphaned tool results (tool messages
|
|
70
|
+
* without their preceding assistant tool-call message).
|
|
71
|
+
*/
|
|
72
|
+
private computeKeepCount;
|
|
73
|
+
/**
|
|
74
|
+
* Check if compaction is needed based on token count.
|
|
75
|
+
*/
|
|
76
|
+
needsCompaction(messages: LLMMessage[]): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Compact conversation history if needed.
|
|
79
|
+
* Returns null if compaction was not needed.
|
|
80
|
+
*/
|
|
81
|
+
compactIfNeeded(sessionId: SessionId, agentId: AgentId, messages: LLMMessage[]): Promise<Result<CompactionResult | null, Error>>;
|
|
82
|
+
/**
|
|
83
|
+
* Compact conversation history by summarizing older messages.
|
|
84
|
+
*/
|
|
85
|
+
compact(sessionId: SessionId, agentId: AgentId, messages: LLMMessage[]): Promise<Result<CompactionResult, Error>>;
|
|
86
|
+
}
|
|
87
|
+
export declare function createContextCompactedEvent(sessionId: SessionId, agentId: AgentId, result: CompactionResult): ContextCompactedEvent;
|
|
88
|
+
//# sourceMappingURL=context-compactor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-compactor.d.ts","sourceRoot":"","sources":["../../../src/plugins/context-compact/context-compactor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,KAAK,EAAgC,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAGlG,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAEnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAWxD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,CAoC/D;AAgBD,MAAM,WAAW,gBAAgB;IAChC,mDAAmD;IACnD,KAAK,EAAE,OAAO,CAAA;IACd,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAA;IACjB,oDAAoD;IACpD,kBAAkB,EAAE,MAAM,CAAA;IAC1B,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,0DAA0D;IAC1D,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,sCAAsC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,kDAAkD;IAClD,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAMD,MAAM,WAAW,gBAAgB;IAChC,oDAAoD;IACpD,iBAAiB,EAAE,UAAU,EAAE,CAAA;IAC/B,6BAA6B;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,oCAAoC;IACpC,cAAc,EAAE,MAAM,CAAA;IACtB,mCAAmC;IACnC,eAAe,EAAE,MAAM,CAAA;IACvB,sDAAsD;IACtD,eAAe,EAAE,MAAM,CAAA;IACvB,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAA;CACpB;AAMD,gDAAgD;AAChD,eAAO,MAAM,2BAA2B,uBAAuB,CAAA;AAE/D;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAChC;;;;;;OAMG;IACH,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;CAC/E;AAMD,qBAAa,gBAAgB;IAE3B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC;gBAHjB,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,gBAAgB,EACxB,gBAAgB,CAAC,EAAE,gBAAgB,YAAA;IAGrD;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IA0BxB;;OAEG;IACH,eAAe,CAAC,QAAQ,EAAE,UAAU,EAAE,GAAG,OAAO;IAKhD;;;OAGG;IACG,eAAe,CACpB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,UAAU,EAAE,GACpB,OAAO,CAAC,MAAM,CAAC,gBAAgB,GAAG,IAAI,EAAE,KAAK,CAAC,CAAC;IAQlD;;OAEG;IACG,OAAO,CACZ,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,UAAU,EAAE,GACpB,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;CAsG3C;AAMD,wBAAgB,2BAA2B,CAC1C,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,gBAAgB,GACtB,qBAAqB,CAmBvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-compactor.test.d.ts","sourceRoot":"","sources":["../../../src/plugins/context-compact/context-compactor.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AgentId } from '../../core/agents/schema.js';
|
|
2
|
+
import type { FileSystem } from '../../platform/fs.js';
|
|
3
|
+
import type { HistoryOffloader } from './context-compactor.js';
|
|
4
|
+
/**
|
|
5
|
+
* File-based history offloader.
|
|
6
|
+
* Writes conversation history to files in the session directory.
|
|
7
|
+
*/
|
|
8
|
+
export declare class FileHistoryOffloader implements HistoryOffloader {
|
|
9
|
+
/** Absolute path to the session directory */
|
|
10
|
+
private readonly sessionDir;
|
|
11
|
+
private readonly fs;
|
|
12
|
+
constructor(
|
|
13
|
+
/** Absolute path to the session directory */
|
|
14
|
+
sessionDir: string, fs: FileSystem);
|
|
15
|
+
offload(agentId: AgentId, content: string, pathPrefix: string): Promise<string>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=history-offloader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history-offloader.d.ts","sourceRoot":"","sources":["../../../src/plugins/context-compact/history-offloader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAE9D;;;GAGG;AACH,qBAAa,oBAAqB,YAAW,gBAAgB;IAE3D,6CAA6C;IAC7C,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,EAAE;;IAFnB,6CAA6C;IAC5B,UAAU,EAAE,MAAM,EAClB,EAAE,EAAE,UAAU;IAG1B,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CA8BrF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history-offloader.test.d.ts","sourceRoot":"","sources":["../../../src/plugins/context-compact/history-offloader.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { type CompactionConfig, type CompactionResult, ContextCompactor, type HistoryOffloader } from './context-compactor.js';
|
|
2
|
+
export { FileHistoryOffloader } from './history-offloader.js';
|
|
3
|
+
export { contextCompactPlugin, type ContextCompactPluginConfig } from './plugin.js';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/context-compact/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9H,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,oBAAoB,EAAE,KAAK,0BAA0B,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context Compact Plugin — compacts conversation history before inference
|
|
3
|
+
*
|
|
4
|
+
* Moves the ContextCompactor logic from Agent into a beforeInference hook.
|
|
5
|
+
* The compactor class remains as the internal implementation.
|
|
6
|
+
*/
|
|
7
|
+
import { type CompactionConfig } from './context-compactor.js';
|
|
8
|
+
/**
|
|
9
|
+
* Plugin config — session-level compaction settings.
|
|
10
|
+
*/
|
|
11
|
+
export interface ContextCompactPluginConfig {
|
|
12
|
+
compaction: CompactionConfig;
|
|
13
|
+
}
|
|
14
|
+
export declare const contextCompactPlugin: import("../../core/plugins/plugin-builder.js").PluginDefinition<"context-compact", ContextCompactPluginConfig, void, {}, {}>;
|
|
15
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/context-compact/plugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,KAAK,gBAAgB,EAAwE,MAAM,wBAAwB,CAAA;AAGpI;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C,UAAU,EAAE,gBAAgB,CAAA;CAC5B;AAED,eAAO,MAAM,oBAAoB,0HA2CxB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filesystem.integration.test.d.ts","sourceRoot":"","sources":["../../../src/plugins/filesystem/filesystem.integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type Ignore } from 'ignore';
|
|
2
|
+
import type { FileEntry, FileStore } from '../../core/file-store/types.js';
|
|
3
|
+
import type { ToolError } from '../../core/tools/executor.js';
|
|
4
|
+
import { Result } from '../../lib/utils/result.js';
|
|
5
|
+
export declare const EVENTS_DIR = ".events";
|
|
6
|
+
export declare const CALLS_DIR = "calls";
|
|
7
|
+
export declare function checkDeniedPaths(path: string, deniedPaths: string[]): Result<void, ToolError>;
|
|
8
|
+
/**
|
|
9
|
+
* Load .gitignore patterns from `dir` up to (and including) `rootDir`.
|
|
10
|
+
* Returns an `ignore` instance with all collected rules.
|
|
11
|
+
* Uses FileStore for reading .gitignore files.
|
|
12
|
+
*/
|
|
13
|
+
export declare function loadGitignoreViaStore(dir: string, rootDir: string, fileStore: FileStore): Promise<Ignore>;
|
|
14
|
+
export declare function formatSize(bytes: number): string;
|
|
15
|
+
export interface TreeEntry {
|
|
16
|
+
name: string;
|
|
17
|
+
type: 'file' | 'directory' | 'symlink' | 'other';
|
|
18
|
+
size?: number;
|
|
19
|
+
children?: TreeEntry[];
|
|
20
|
+
}
|
|
21
|
+
export declare function formatTreeRecursive(entries: TreeEntry[], prefix: string): string;
|
|
22
|
+
export declare function formatFlatListing(entries: TreeEntry[]): string;
|
|
23
|
+
export declare function fileEntryToTreeEntry(entry: FileEntry): TreeEntry;
|
|
24
|
+
export declare function collectTreeEntries(fileStore: FileStore, dirPath: string, rootPath: string, options: {
|
|
25
|
+
maxDepth?: number;
|
|
26
|
+
includeHidden?: boolean;
|
|
27
|
+
deniedPaths?: string[];
|
|
28
|
+
ig?: Ignore | null;
|
|
29
|
+
}, depth?: number): Promise<TreeEntry[]>;
|
|
30
|
+
export declare function buildDirectoryListingPreamble(fileStore: FileStore, options?: {
|
|
31
|
+
maxDepth?: number;
|
|
32
|
+
deniedPaths?: string[];
|
|
33
|
+
}): Promise<string>;
|
|
34
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/plugins/filesystem/helpers.ts"],"names":[],"mappings":"AAAA,OAAe,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE5C,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAW,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAM3D,eAAO,MAAM,UAAU,YAAY,CAAA;AACnC,eAAO,MAAM,SAAS,UAAU,CAAA;AAMhC,wBAAgB,gBAAgB,CAC/B,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EAAE,GACnB,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,CAUzB;AAMD;;;;GAIG;AACH,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAqC/G;AAMD,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED,MAAM,WAAW,SAAS;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,CAAA;IAChD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAA;CACtB;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAmBhF;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,MAAM,CAW9D;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAMhE;AAMD,wBAAsB,kBAAkB,CACvC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE;IACR,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IACtB,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAClB,EACD,KAAK,SAAI,GACP,OAAO,CAAC,SAAS,EAAE,CAAC,CAkCtB;AAMD,wBAAsB,6BAA6B,CAClD,SAAS,EAAE,SAAS,EACpB,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GACrD,OAAO,CAAC,MAAM,CAAC,CAkBjB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { buildDirectoryListingPreamble, CALLS_DIR, checkDeniedPaths, collectTreeEntries, EVENTS_DIR, formatSize } from './helpers.js';
|
|
2
|
+
export type { TreeEntry } from './helpers.js';
|
|
3
|
+
export { filesystemPlugin } from './plugin.js';
|
|
4
|
+
export type { FilesystemAgentConfig, FilesystemPresetConfig } from './plugin.js';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/filesystem/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,SAAS,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACrI,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,YAAY,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Directory listing helpers.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from HTTP routes for reuse in RPC methods.
|
|
5
|
+
*/
|
|
6
|
+
import type { FileSystem } from '../../platform/fs.js';
|
|
7
|
+
export interface DirectoryEntry {
|
|
8
|
+
name: string;
|
|
9
|
+
path?: string;
|
|
10
|
+
type: 'file' | 'directory';
|
|
11
|
+
size: number;
|
|
12
|
+
mimeType?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Determine MIME type for a file.
|
|
16
|
+
* Known extensions get their specific MIME type, known binary extensions
|
|
17
|
+
* get `application/octet-stream`, everything else defaults to `text/plain`.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getMimeType(filePath: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Prevent path traversal — returns resolved path if safe, null otherwise.
|
|
22
|
+
*/
|
|
23
|
+
export declare function preventTraversal(baseDir: string, requestedPath: string): string | null;
|
|
24
|
+
/**
|
|
25
|
+
* List a single directory level, returning sorted DirectoryEntry[].
|
|
26
|
+
* Directories first, then alphabetical within each group.
|
|
27
|
+
*/
|
|
28
|
+
export declare function listDirectory(fs: FileSystem, baseDir: string, subPath: string): Promise<DirectoryEntry[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Recursively list all entries under a directory.
|
|
31
|
+
* Skips hidden files and IGNORED_DIRS.
|
|
32
|
+
*/
|
|
33
|
+
export declare function listDirectoryRecursive(fs: FileSystem, baseDir: string): Promise<DirectoryEntry[]>;
|
|
34
|
+
export declare class ListingError extends Error {
|
|
35
|
+
readonly type: 'forbidden' | 'not_found';
|
|
36
|
+
constructor(type: 'forbidden' | 'not_found', message: string);
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=listing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listing.d.ts","sourceRoot":"","sources":["../../../src/plugins/filesystem/listing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAkHlD,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,GAAG,WAAW,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;CACjB;AAMD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKpD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMtF;AAED;;;GAGG;AACH,wBAAsB,aAAa,CAAC,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAgD/G;AAED;;;GAGG;AACH,wBAAsB,sBAAsB,CAAC,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAgDvG;AAMD,qBAAa,YAAa,SAAQ,KAAK;aAErB,IAAI,EAAE,WAAW,GAAG,WAAW;gBAA/B,IAAI,EAAE,WAAW,GAAG,WAAW,EAC/C,OAAO,EAAE,MAAM;CAIhB"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session-wide filesystem configuration.
|
|
3
|
+
*/
|
|
4
|
+
export interface FilesystemPresetConfig {
|
|
5
|
+
/** Maximum file size to read (bytes) - files larger than this are rejected (default: 10MB) */
|
|
6
|
+
maxReadSize?: number;
|
|
7
|
+
/** Allowed file extensions (empty = all allowed) */
|
|
8
|
+
allowedExtensions?: string[];
|
|
9
|
+
/** Denied path segments (e.g. [".events"]) */
|
|
10
|
+
deniedPaths?: string[];
|
|
11
|
+
/** Approximate max tokens before auto-truncating (default: 20000) */
|
|
12
|
+
maxTokens?: number;
|
|
13
|
+
/** Respect .gitignore files when listing directories (default: true) */
|
|
14
|
+
respectGitignore?: boolean;
|
|
15
|
+
/** Default enabled state for agents (default: true). Agents can override via FilesystemAgentConfig.enabled. */
|
|
16
|
+
defaultEnabled?: boolean;
|
|
17
|
+
/** Whether write tools (write_file, replace_in_file) are available by default (default: true). Agents can override via FilesystemAgentConfig.writable. */
|
|
18
|
+
writable?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Agent-specific filesystem configuration.
|
|
22
|
+
*/
|
|
23
|
+
export interface FilesystemAgentConfig {
|
|
24
|
+
/** Whether filesystem is enabled for this agent (default: true) */
|
|
25
|
+
enabled?: boolean;
|
|
26
|
+
/** Whether write tools (write_file, replace_in_file) are available for this agent. Overrides preset-level writable when set. */
|
|
27
|
+
writable?: boolean;
|
|
28
|
+
/** Emit a directory listing preamble when the agent starts. true uses default depth (1), or pass { maxDepth } to override. */
|
|
29
|
+
directoryListing?: boolean | {
|
|
30
|
+
maxDepth?: number;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export declare const filesystemPlugin: import("../../core/plugins/plugin-builder.js").PluginDefinition<"filesystem", FilesystemPresetConfig, FilesystemAgentConfig, {}, Record<"listSession", {
|
|
34
|
+
input: {
|
|
35
|
+
path?: string | undefined;
|
|
36
|
+
};
|
|
37
|
+
output: {
|
|
38
|
+
entries: import("./listing.js").DirectoryEntry[];
|
|
39
|
+
path: string;
|
|
40
|
+
root: string;
|
|
41
|
+
};
|
|
42
|
+
}> & Record<"listWorkspace", {
|
|
43
|
+
input: {
|
|
44
|
+
path?: string | undefined;
|
|
45
|
+
recursive?: boolean | undefined;
|
|
46
|
+
};
|
|
47
|
+
output: {
|
|
48
|
+
entries: import("./listing.js").DirectoryEntry[];
|
|
49
|
+
path: string;
|
|
50
|
+
root: string;
|
|
51
|
+
};
|
|
52
|
+
}>>;
|
|
53
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/filesystem/plugin.ts"],"names":[],"mappings":"AA8BA;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC,8FAA8F;IAC9F,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oDAAoD;IACpD,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC5B,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IACtB,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,wEAAwE;IACxE,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,+GAA+G;IAC/G,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,0JAA0J;IAC1J,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC,mEAAmE;IACnE,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gIAAgI;IAChI,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,8HAA8H;IAC9H,gBAAgB,CAAC,EAAE,OAAO,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAClD;AAkDD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;GAqWpB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/plugins/filesystem/schema.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,CAAA;IAChD,IAAI,CAAC,EAAE,MAAM,CAAA;CACb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/git-status/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git Status Plugin
|
|
3
|
+
*
|
|
4
|
+
* Polls git state (commits ahead of the default branch, uncommitted files,
|
|
5
|
+
* last commit metadata) inside the session's workspace directory every few
|
|
6
|
+
* seconds and emits a `git_status_changed` notification when the snapshot
|
|
7
|
+
* changes. The worker DO persists the last snapshot into its session table so
|
|
8
|
+
* versions sidebar and publish bars can render without reaching into the
|
|
9
|
+
* sandbox on every page view.
|
|
10
|
+
*/
|
|
11
|
+
export declare const gitStatusPlugin: import("../../core/plugins/index.js").PluginDefinition<"git-status", void, void, {}, {}>;
|
|
12
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/git-status/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAwBH,eAAO,MAAM,eAAe,sFAyEnB,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Anti-looping limits for agents.
|
|
3
|
+
* All fields are optional - defaults applied via resolveAgentLimits().
|
|
4
|
+
*/
|
|
5
|
+
export interface AgentLimits {
|
|
6
|
+
/** Maximum number of inference turns. Default: 100 */
|
|
7
|
+
maxTurns?: number;
|
|
8
|
+
/** Maximum total tool calls. Default: 200 */
|
|
9
|
+
maxToolCalls?: number;
|
|
10
|
+
/** Maximum consecutive failures for the same tool before blocking. Default: 3 */
|
|
11
|
+
maxConsecutiveToolFailures?: number;
|
|
12
|
+
/** Maximum child agents this agent can spawn. Default: 10 */
|
|
13
|
+
maxSpawnedAgents?: number;
|
|
14
|
+
/** Maximum messages sent to other agents. Default: 100 */
|
|
15
|
+
maxMessagesSent?: number;
|
|
16
|
+
/** Ratio of hard limit at which soft warning is emitted. Default: 0.8 */
|
|
17
|
+
softLimitRatio?: number;
|
|
18
|
+
/** Maximum consecutive identical tool calls (same name+input hash). Default: 3 */
|
|
19
|
+
maxRepeatedToolCalls?: number;
|
|
20
|
+
/** Maximum consecutive identical text-only responses. Default: 3 */
|
|
21
|
+
maxRepeatedResponses?: number;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/plugins/limits-guard/config.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC3B,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,iFAAiF;IACjF,0BAA0B,CAAC,EAAE,MAAM,CAAA;IACnC,6DAA6D;IAC7D,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,0DAA0D;IAC1D,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,yEAAyE;IACzE,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,kFAAkF;IAClF,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,oEAAoE;IACpE,oBAAoB,CAAC,EAAE,MAAM,CAAA;CAC7B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { AgentLimits } from './config.js';
|
|
2
|
+
export { limitsGuardPlugin } from './plugin.js';
|
|
3
|
+
export type { AgentCounters, LimitsAgentConfig, LimitWarningEvent } from './plugin.js';
|
|
4
|
+
export { createAgentCounters, limitsEvents } from './plugin.js';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/limits-guard/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACtF,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Limit guard - checks agent counters against configured limits.
|
|
3
|
+
*
|
|
4
|
+
* Returns the worst result: hard_limit > soft_warning > ok.
|
|
5
|
+
*/
|
|
6
|
+
import type { AgentLimits } from '../../plugins/limits-guard/config.js';
|
|
7
|
+
import type { AgentCounters } from './plugin.js';
|
|
8
|
+
export interface ResolvedAgentLimits {
|
|
9
|
+
maxTurns: number;
|
|
10
|
+
maxToolCalls: number;
|
|
11
|
+
maxConsecutiveToolFailures: number;
|
|
12
|
+
maxSpawnedAgents: number;
|
|
13
|
+
maxMessagesSent: number;
|
|
14
|
+
softLimitRatio: number;
|
|
15
|
+
maxRepeatedToolCalls: number;
|
|
16
|
+
maxRepeatedResponses: number;
|
|
17
|
+
}
|
|
18
|
+
export declare function resolveAgentLimits(config?: AgentLimits): ResolvedAgentLimits;
|
|
19
|
+
export type LimitCheckResult = {
|
|
20
|
+
status: 'ok';
|
|
21
|
+
} | {
|
|
22
|
+
status: 'soft_warning';
|
|
23
|
+
limitName: string;
|
|
24
|
+
currentValue: number;
|
|
25
|
+
hardLimit: number;
|
|
26
|
+
message: string;
|
|
27
|
+
} | {
|
|
28
|
+
status: 'hard_limit';
|
|
29
|
+
limitName: string;
|
|
30
|
+
currentValue: number;
|
|
31
|
+
hardLimit: number;
|
|
32
|
+
reason: string;
|
|
33
|
+
};
|
|
34
|
+
export declare function checkLimits(counters: AgentCounters, limits: ResolvedAgentLimits): LimitCheckResult;
|
|
35
|
+
/**
|
|
36
|
+
* Count how many consecutive identical items appear at the end of an array.
|
|
37
|
+
* Returns 1 if the last item is unique, 0 if array is empty.
|
|
38
|
+
*/
|
|
39
|
+
export declare function countConsecutiveTailDuplicates(arr: string[]): number;
|
|
40
|
+
//# sourceMappingURL=limit-guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limit-guard.d.ts","sourceRoot":"","sources":["../../../src/plugins/limits-guard/limit-guard.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAMhD,MAAM,WAAW,mBAAmB;IACnC,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;IACpB,0BAA0B,EAAE,MAAM,CAAA;IAClC,gBAAgB,EAAE,MAAM,CAAA;IACxB,eAAe,EAAE,MAAM,CAAA;IACvB,cAAc,EAAE,MAAM,CAAA;IACtB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,oBAAoB,EAAE,MAAM,CAAA;CAC5B;AAaD,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,mBAAmB,CAY5E;AAMD,MAAM,MAAM,gBAAgB,GACzB;IAAE,MAAM,EAAE,IAAI,CAAA;CAAE,GAChB;IAAE,MAAM,EAAE,cAAc,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACvG;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAMvG,wBAAgB,WAAW,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,mBAAmB,GAAG,gBAAgB,CA+ElG;AAMD;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,CAYpE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limit-guard.test.d.ts","sourceRoot":"","sources":["../../../src/plugins/limits-guard/limit-guard.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limits-guard.integration.test.d.ts","sourceRoot":"","sources":["../../../src/plugins/limits-guard/limits-guard.integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { AgentId } from '../../core/agents/schema.js';
|
|
2
|
+
import type { SessionState } from '../../core/sessions/state.js';
|
|
3
|
+
import type { AgentLimits } from './config.js';
|
|
4
|
+
export interface AgentCounters {
|
|
5
|
+
inferenceCount: number;
|
|
6
|
+
toolCallCount: number;
|
|
7
|
+
spawnedAgentCount: number;
|
|
8
|
+
messagesSentCount: number;
|
|
9
|
+
/** Tool name → consecutive failure count + last error message. Reset on success. */
|
|
10
|
+
consecutiveToolFailures: Record<string, {
|
|
11
|
+
count: number;
|
|
12
|
+
lastError: string;
|
|
13
|
+
}>;
|
|
14
|
+
/** Ring buffer of last 20 tool call fingerprints ("toolName:inputHash") */
|
|
15
|
+
recentToolCallHashes: string[];
|
|
16
|
+
/** Ring buffer of last 10 response content hashes (text-only responses without tool calls) */
|
|
17
|
+
recentResponseHashes: string[];
|
|
18
|
+
}
|
|
19
|
+
export declare const createAgentCounters: () => AgentCounters;
|
|
20
|
+
/**
|
|
21
|
+
* Extract agent counters from session state (for external consumers).
|
|
22
|
+
*/
|
|
23
|
+
export declare function selectAgentCounters(sessionState: SessionState, agentId: AgentId): AgentCounters;
|
|
24
|
+
import z from 'zod/v4';
|
|
25
|
+
export declare const limitsEvents: import("../../core/events/types.js").EventsFactory<{
|
|
26
|
+
limit_warning: z.ZodObject<{
|
|
27
|
+
agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
|
|
28
|
+
limitName: z.ZodString;
|
|
29
|
+
currentValue: z.ZodNumber;
|
|
30
|
+
hardLimit: z.ZodNumber;
|
|
31
|
+
message: z.ZodString;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
}>;
|
|
34
|
+
export type LimitWarningEvent = (typeof limitsEvents)['Events']['limit_warning'];
|
|
35
|
+
export interface LimitsAgentConfig {
|
|
36
|
+
limits?: AgentLimits;
|
|
37
|
+
}
|
|
38
|
+
export declare const limitsGuardPlugin: import("../../core/plugins/plugin-builder.js").PluginDefinition<"limits-guard", void, LimitsAgentConfig, {}, {}>;
|
|
39
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/limits-guard/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAKtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAI5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAO9C,MAAM,WAAW,aAAa;IAC7B,cAAc,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;IACrB,iBAAiB,EAAE,MAAM,CAAA;IACzB,iBAAiB,EAAE,MAAM,CAAA;IACzB,oFAAoF;IACpF,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC7E,2EAA2E;IAC3E,oBAAoB,EAAE,MAAM,EAAE,CAAA;IAC9B,8FAA8F;IAC9F,oBAAoB,EAAE,MAAM,EAAE,CAAA;CAC9B;AAED,eAAO,MAAM,mBAAmB,QAAO,aAQrC,CAAA;AAEF;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,aAAa,CAE/F;AAMD,OAAO,CAAC,MAAM,QAAQ,CAAA;AAItB,eAAO,MAAM,YAAY;;;;;;;;EAUvB,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC,CAAA;AA0BhF,MAAM,WAAW,iBAAiB;IACjC,MAAM,CAAC,EAAE,WAAW,CAAA;CACpB;AAED,eAAO,MAAM,iBAAiB,8GAiNrB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/llm-debug/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm-debug.integration.test.d.ts","sourceRoot":"","sources":["../../../src/plugins/llm-debug/llm-debug.integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LLM Debug Plugin
|
|
3
|
+
*
|
|
4
|
+
* Provides session-level methods for querying LLM call logs:
|
|
5
|
+
* - llm.getCalls — list LLM calls for a session
|
|
6
|
+
* - llm.getCall — get single LLM call detail
|
|
7
|
+
* - llm.getCurlCommand — export LLM call as curl command (with resolved images)
|
|
8
|
+
*/
|
|
9
|
+
export declare const llmDebugPlugin: import("../../core/plugins/index.js").PluginDefinition<"llm", void, void, {}, Record<"getCalls", {
|
|
10
|
+
input: {
|
|
11
|
+
limit?: number | undefined;
|
|
12
|
+
offset?: number | undefined;
|
|
13
|
+
};
|
|
14
|
+
output: {
|
|
15
|
+
calls: unknown[];
|
|
16
|
+
total: number;
|
|
17
|
+
};
|
|
18
|
+
}> & Record<"getCall", {
|
|
19
|
+
input: {
|
|
20
|
+
callId: string;
|
|
21
|
+
};
|
|
22
|
+
output: unknown;
|
|
23
|
+
}> & Record<"getCurlCommand", {
|
|
24
|
+
input: {
|
|
25
|
+
callId: string;
|
|
26
|
+
};
|
|
27
|
+
output: {
|
|
28
|
+
curl: string;
|
|
29
|
+
};
|
|
30
|
+
}>>;
|
|
31
|
+
//# sourceMappingURL=plugin.d.ts.map
|