@assemblyline-agents/runtime 1.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/dist/a2a-client.d.ts +22 -0
- package/dist/a2a-client.d.ts.map +1 -0
- package/dist/a2a-client.js +211 -0
- package/dist/a2a-client.js.map +1 -0
- package/dist/agent-capability-snapshot.d.ts +32 -0
- package/dist/agent-capability-snapshot.d.ts.map +1 -0
- package/dist/agent-capability-snapshot.js +77 -0
- package/dist/agent-capability-snapshot.js.map +1 -0
- package/dist/agent-event-handlers.d.ts +21 -0
- package/dist/agent-event-handlers.d.ts.map +1 -0
- package/dist/agent-event-handlers.js +64 -0
- package/dist/agent-event-handlers.js.map +1 -0
- package/dist/agent-hook-context.d.ts +8 -0
- package/dist/agent-hook-context.d.ts.map +1 -0
- package/dist/agent-hook-context.js +29 -0
- package/dist/agent-hook-context.js.map +1 -0
- package/dist/agent-hook-evaluation.d.ts +61 -0
- package/dist/agent-hook-evaluation.d.ts.map +1 -0
- package/dist/agent-hook-evaluation.js +197 -0
- package/dist/agent-hook-evaluation.js.map +1 -0
- package/dist/agent-hook-run-lifecycle.d.ts +44 -0
- package/dist/agent-hook-run-lifecycle.d.ts.map +1 -0
- package/dist/agent-hook-run-lifecycle.js +76 -0
- package/dist/agent-hook-run-lifecycle.js.map +1 -0
- package/dist/agent-state.d.ts +31 -0
- package/dist/agent-state.d.ts.map +1 -0
- package/dist/agent-state.js +80 -0
- package/dist/agent-state.js.map +1 -0
- package/dist/agent-surface.d.ts +32 -0
- package/dist/agent-surface.d.ts.map +1 -0
- package/dist/agent-surface.js +85 -0
- package/dist/agent-surface.js.map +1 -0
- package/dist/attachments.d.ts +5 -1
- package/dist/attachments.d.ts.map +1 -1
- package/dist/attachments.js +58 -32
- package/dist/attachments.js.map +1 -1
- package/dist/audience.d.ts +30 -0
- package/dist/audience.d.ts.map +1 -0
- package/dist/audience.js +68 -0
- package/dist/audience.js.map +1 -0
- package/dist/authored-hooks.d.ts +6 -0
- package/dist/authored-hooks.d.ts.map +1 -0
- package/dist/authored-hooks.js +17 -0
- package/dist/authored-hooks.js.map +1 -0
- package/dist/automation-event-match.d.ts +8 -0
- package/dist/automation-event-match.d.ts.map +1 -0
- package/dist/automation-event-match.js +25 -0
- package/dist/automation-event-match.js.map +1 -0
- package/dist/background-review-trigger.d.ts +9 -0
- package/dist/background-review-trigger.d.ts.map +1 -0
- package/dist/background-review-trigger.js +72 -0
- package/dist/background-review-trigger.js.map +1 -0
- package/dist/background-review-types.d.ts +60 -0
- package/dist/background-review-types.d.ts.map +1 -0
- package/dist/background-review-types.js +2 -0
- package/dist/background-review-types.js.map +1 -0
- package/dist/background-review-worker.d.ts +14 -0
- package/dist/background-review-worker.d.ts.map +1 -0
- package/dist/background-review-worker.js +61 -0
- package/dist/background-review-worker.js.map +1 -0
- package/dist/background-review.d.ts +5 -0
- package/dist/background-review.d.ts.map +1 -0
- package/dist/background-review.js +332 -0
- package/dist/background-review.js.map +1 -0
- package/dist/builtin-tool-executors.d.ts +50 -27
- package/dist/builtin-tool-executors.d.ts.map +1 -1
- package/dist/builtin-tool-executors.js +332 -124
- package/dist/builtin-tool-executors.js.map +1 -1
- package/dist/builtin-tools.d.ts +16 -9
- package/dist/builtin-tools.d.ts.map +1 -1
- package/dist/builtin-tools.js +308 -116
- package/dist/builtin-tools.js.map +1 -1
- package/dist/capability-catalog.d.ts +3 -2
- package/dist/capability-catalog.d.ts.map +1 -1
- package/dist/capability-catalog.js +12 -7
- package/dist/capability-catalog.js.map +1 -1
- package/dist/capability-inspection.d.ts +31 -0
- package/dist/capability-inspection.d.ts.map +1 -0
- package/dist/capability-inspection.js +58 -0
- package/dist/capability-inspection.js.map +1 -0
- package/dist/channel-http-util.d.ts.map +1 -1
- package/dist/channel-http-util.js +6 -5
- package/dist/channel-http-util.js.map +1 -1
- package/dist/channel-ingress.d.ts +16 -1
- package/dist/channel-ingress.d.ts.map +1 -1
- package/dist/channel-ingress.js +152 -14
- package/dist/channel-ingress.js.map +1 -1
- package/dist/channel.d.ts +73 -3
- package/dist/channel.d.ts.map +1 -1
- package/dist/checkpoints.d.ts +1 -1
- package/dist/checkpoints.d.ts.map +1 -1
- package/dist/checkpoints.js +6 -6
- package/dist/checkpoints.js.map +1 -1
- package/dist/child-process-env.d.ts +7 -0
- package/dist/child-process-env.d.ts.map +1 -0
- package/dist/child-process-env.js +41 -0
- package/dist/child-process-env.js.map +1 -0
- package/dist/computer-relay-protocol.d.ts.map +1 -1
- package/dist/computer-relay-protocol.js +4 -4
- package/dist/computer-relay-protocol.js.map +1 -1
- package/dist/concurrency.d.ts +1 -1
- package/dist/concurrency.js +1 -1
- package/dist/connection-auth-util.d.ts +1 -0
- package/dist/connection-auth-util.d.ts.map +1 -1
- package/dist/connection-auth-util.js +3 -1
- package/dist/connection-auth-util.js.map +1 -1
- package/dist/connection-clients.d.ts +11 -3
- package/dist/connection-clients.d.ts.map +1 -1
- package/dist/connection-clients.js +71 -8
- package/dist/connection-clients.js.map +1 -1
- package/dist/connection-event-store.d.ts +98 -0
- package/dist/connection-event-store.d.ts.map +1 -0
- package/dist/connection-event-store.js +162 -0
- package/dist/connection-event-store.js.map +1 -0
- package/dist/connection-events.d.ts +51 -0
- package/dist/connection-events.d.ts.map +1 -0
- package/dist/connection-events.js +343 -0
- package/dist/connection-events.js.map +1 -0
- package/dist/connection-stores.d.ts +6 -0
- package/dist/connection-stores.d.ts.map +1 -1
- package/dist/connection-stores.js +20 -1
- package/dist/connection-stores.js.map +1 -1
- package/dist/connection-util.d.ts +3 -2
- package/dist/connection-util.d.ts.map +1 -1
- package/dist/connection-util.js +18 -1
- package/dist/connection-util.js.map +1 -1
- package/dist/connections.d.ts +60 -5
- package/dist/connections.d.ts.map +1 -1
- package/dist/connections.js +390 -57
- package/dist/connections.js.map +1 -1
- package/dist/context-policy-util.d.ts.map +1 -1
- package/dist/context-policy-util.js +1 -3
- package/dist/context-policy-util.js.map +1 -1
- package/dist/conversation-context.d.ts +9 -4
- package/dist/conversation-context.d.ts.map +1 -1
- package/dist/conversation-context.js +65 -19
- package/dist/conversation-context.js.map +1 -1
- package/dist/conversation-transcript.d.ts +8 -5
- package/dist/conversation-transcript.d.ts.map +1 -1
- package/dist/conversation-transcript.js +24 -5
- package/dist/conversation-transcript.js.map +1 -1
- package/dist/conversation-turn-coalescing.d.ts +22 -0
- package/dist/conversation-turn-coalescing.d.ts.map +1 -0
- package/dist/conversation-turn-coalescing.js +121 -0
- package/dist/conversation-turn-coalescing.js.map +1 -0
- package/dist/conversation-turn-dispatch.d.ts +5 -2
- package/dist/conversation-turn-dispatch.d.ts.map +1 -1
- package/dist/conversation-turn-dispatch.js +59 -22
- package/dist/conversation-turn-dispatch.js.map +1 -1
- package/dist/default-outbound-route.d.ts +29 -0
- package/dist/default-outbound-route.d.ts.map +1 -0
- package/dist/default-outbound-route.js +105 -0
- package/dist/default-outbound-route.js.map +1 -0
- package/dist/delivery-artifacts.d.ts +2 -0
- package/dist/delivery-artifacts.d.ts.map +1 -0
- package/dist/delivery-artifacts.js +34 -0
- package/dist/delivery-artifacts.js.map +1 -0
- package/dist/delivery-files.d.ts +5 -0
- package/dist/delivery-files.d.ts.map +1 -0
- package/dist/delivery-files.js +33 -0
- package/dist/delivery-files.js.map +1 -0
- package/dist/delivery-queue.d.ts +21 -1
- package/dist/delivery-queue.d.ts.map +1 -1
- package/dist/delivery-queue.js +144 -1
- package/dist/delivery-queue.js.map +1 -1
- package/dist/delivery-send.d.ts +2 -2
- package/dist/delivery-send.d.ts.map +1 -1
- package/dist/delivery-send.js +256 -100
- package/dist/delivery-send.js.map +1 -1
- package/dist/durable-files.d.ts +37 -0
- package/dist/durable-files.d.ts.map +1 -0
- package/dist/durable-files.js +63 -0
- package/dist/durable-files.js.map +1 -0
- package/dist/harness-loop.d.ts +18 -9
- package/dist/harness-loop.d.ts.map +1 -1
- package/dist/harness-loop.js +245 -50
- package/dist/harness-loop.js.map +1 -1
- package/dist/heic-transcode-worker.d.ts +2 -0
- package/dist/heic-transcode-worker.d.ts.map +1 -0
- package/dist/heic-transcode-worker.js +59 -0
- package/dist/heic-transcode-worker.js.map +1 -0
- package/dist/heic-transcode.d.ts +18 -0
- package/dist/heic-transcode.d.ts.map +1 -0
- package/dist/heic-transcode.js +99 -0
- package/dist/heic-transcode.js.map +1 -0
- package/dist/human-input-routing.d.ts +22 -0
- package/dist/human-input-routing.d.ts.map +1 -0
- package/dist/human-input-routing.js +26 -0
- package/dist/human-input-routing.js.map +1 -0
- package/dist/in-memory-agent-state-store.d.ts +21 -0
- package/dist/in-memory-agent-state-store.d.ts.map +1 -0
- package/dist/in-memory-agent-state-store.js +97 -0
- package/dist/in-memory-agent-state-store.js.map +1 -0
- package/dist/in-memory-conversation-turn-store.d.ts +3 -1
- package/dist/in-memory-conversation-turn-store.d.ts.map +1 -1
- package/dist/in-memory-conversation-turn-store.js +41 -2
- package/dist/in-memory-conversation-turn-store.js.map +1 -1
- package/dist/in-memory-run-store.d.ts +8 -0
- package/dist/in-memory-run-store.d.ts.map +1 -1
- package/dist/in-memory-run-store.js +28 -5
- package/dist/in-memory-run-store.js.map +1 -1
- package/dist/in-memory-sandbox-session-store.d.ts +2 -1
- package/dist/in-memory-sandbox-session-store.d.ts.map +1 -1
- package/dist/in-memory-sandbox-session-store.js +65 -1
- package/dist/in-memory-sandbox-session-store.js.map +1 -1
- package/dist/in-memory-small-stores.d.ts +18 -1
- package/dist/in-memory-small-stores.d.ts.map +1 -1
- package/dist/in-memory-small-stores.js +107 -1
- package/dist/in-memory-small-stores.js.map +1 -1
- package/dist/in-memory-workspace-store.d.ts +40 -0
- package/dist/in-memory-workspace-store.d.ts.map +1 -0
- package/dist/in-memory-workspace-store.js +370 -0
- package/dist/in-memory-workspace-store.js.map +1 -0
- package/dist/index.d.ts +116 -45
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +637 -566
- package/dist/index.js.map +1 -1
- package/dist/json-util.d.ts +8 -0
- package/dist/json-util.d.ts.map +1 -1
- package/dist/json-util.js +8 -0
- package/dist/json-util.js.map +1 -1
- package/dist/learning-store.d.ts +111 -0
- package/dist/learning-store.d.ts.map +1 -0
- package/dist/learning-store.js +193 -0
- package/dist/learning-store.js.map +1 -0
- package/dist/local-sandbox.d.ts +3 -2
- package/dist/local-sandbox.d.ts.map +1 -1
- package/dist/local-sandbox.js +69 -25
- package/dist/local-sandbox.js.map +1 -1
- package/dist/mcp-client.d.ts.map +1 -1
- package/dist/mcp-client.js +3 -2
- package/dist/mcp-client.js.map +1 -1
- package/dist/media-processor.d.ts +42 -0
- package/dist/media-processor.d.ts.map +1 -0
- package/dist/media-processor.js +2 -0
- package/dist/media-processor.js.map +1 -0
- package/dist/model-media.d.ts +13 -1
- package/dist/model-media.d.ts.map +1 -1
- package/dist/model-media.js +81 -18
- package/dist/model-media.js.map +1 -1
- package/dist/model-visible-interrupts.d.ts +10 -0
- package/dist/model-visible-interrupts.d.ts.map +1 -0
- package/dist/model-visible-interrupts.js +41 -0
- package/dist/model-visible-interrupts.js.map +1 -0
- package/dist/operator-controls.d.ts.map +1 -1
- package/dist/operator-controls.js +16 -3
- package/dist/operator-controls.js.map +1 -1
- package/dist/outbound-http-policy.d.ts +7 -0
- package/dist/outbound-http-policy.d.ts.map +1 -0
- package/dist/outbound-http-policy.js +155 -0
- package/dist/outbound-http-policy.js.map +1 -0
- package/dist/principals.d.ts +18 -0
- package/dist/principals.d.ts.map +1 -0
- package/dist/principals.js +90 -0
- package/dist/principals.js.map +1 -0
- package/dist/public-api.d.ts +21 -0
- package/dist/public-api.d.ts.map +1 -0
- package/dist/public-api.js +19 -0
- package/dist/public-api.js.map +1 -0
- package/dist/replay-resume.d.ts +15 -3
- package/dist/replay-resume.d.ts.map +1 -1
- package/dist/replay-resume.js +256 -24
- package/dist/replay-resume.js.map +1 -1
- package/dist/resource-projection-util.d.ts +1 -1
- package/dist/resource-projection-util.d.ts.map +1 -1
- package/dist/resource-projection-util.js +21 -10
- package/dist/resource-projection-util.js.map +1 -1
- package/dist/resource-projection.d.ts +8 -1
- package/dist/resource-projection.d.ts.map +1 -1
- package/dist/resource-projection.js +230 -26
- package/dist/resource-projection.js.map +1 -1
- package/dist/run-heartbeat.d.ts +12 -2
- package/dist/run-heartbeat.d.ts.map +1 -1
- package/dist/run-heartbeat.js +31 -4
- package/dist/run-heartbeat.js.map +1 -1
- package/dist/run-outcome.d.ts +9 -5
- package/dist/run-outcome.d.ts.map +1 -1
- package/dist/run-outcome.js +16 -5
- package/dist/run-outcome.js.map +1 -1
- package/dist/run-recovery.d.ts +31 -2
- package/dist/run-recovery.d.ts.map +1 -1
- package/dist/run-recovery.js +211 -32
- package/dist/run-recovery.js.map +1 -1
- package/dist/run-replay.d.ts +35 -0
- package/dist/run-replay.d.ts.map +1 -0
- package/dist/run-replay.js +193 -0
- package/dist/run-replay.js.map +1 -0
- package/dist/run-result.d.ts +4 -0
- package/dist/run-result.d.ts.map +1 -0
- package/dist/run-result.js +18 -0
- package/dist/run-result.js.map +1 -0
- package/dist/run-timeline-query.d.ts +38 -0
- package/dist/run-timeline-query.d.ts.map +1 -0
- package/dist/run-timeline-query.js +99 -0
- package/dist/run-timeline-query.js.map +1 -0
- package/dist/runs-query.d.ts.map +1 -1
- package/dist/runs-query.js +12 -4
- package/dist/runs-query.js.map +1 -1
- package/dist/runtime-bundle.d.ts.map +1 -1
- package/dist/runtime-bundle.js +2 -0
- package/dist/runtime-bundle.js.map +1 -1
- package/dist/runtime-learning.d.ts +88 -0
- package/dist/runtime-learning.d.ts.map +1 -0
- package/dist/runtime-learning.js +260 -0
- package/dist/runtime-learning.js.map +1 -0
- package/dist/runtime-types.d.ts +79 -10
- package/dist/runtime-types.d.ts.map +1 -1
- package/dist/sandbox-fs.d.ts +9 -5
- package/dist/sandbox-fs.d.ts.map +1 -1
- package/dist/sandbox-fs.js +50 -33
- package/dist/sandbox-fs.js.map +1 -1
- package/dist/sandbox-handle.d.ts +25 -0
- package/dist/sandbox-handle.d.ts.map +1 -0
- package/dist/sandbox-handle.js +120 -0
- package/dist/sandbox-handle.js.map +1 -0
- package/dist/sandbox-session-identity.d.ts +14 -0
- package/dist/sandbox-session-identity.d.ts.map +1 -0
- package/dist/sandbox-session-identity.js +33 -0
- package/dist/sandbox-session-identity.js.map +1 -0
- package/dist/sandbox-session-key.d.ts.map +1 -1
- package/dist/sandbox-session-key.js +14 -10
- package/dist/sandbox-session-key.js.map +1 -1
- package/dist/sandbox-session-lifecycle.d.ts +12 -0
- package/dist/sandbox-session-lifecycle.d.ts.map +1 -0
- package/dist/sandbox-session-lifecycle.js +261 -0
- package/dist/sandbox-session-lifecycle.js.map +1 -0
- package/dist/sandbox-snapshot-policy.js +3 -3
- package/dist/sandbox-snapshot-policy.js.map +1 -1
- package/dist/sandbox-state-sync.d.ts +22 -0
- package/dist/sandbox-state-sync.d.ts.map +1 -0
- package/dist/sandbox-state-sync.js +147 -0
- package/dist/sandbox-state-sync.js.map +1 -0
- package/dist/sandbox-sync-worker.d.ts +11 -2
- package/dist/sandbox-sync-worker.d.ts.map +1 -1
- package/dist/sandbox-sync-worker.js +143 -31
- package/dist/sandbox-sync-worker.js.map +1 -1
- package/dist/schedule-execution.d.ts.map +1 -1
- package/dist/schedule-execution.js +187 -57
- package/dist/schedule-execution.js.map +1 -1
- package/dist/sdk-api-client.d.ts +17 -0
- package/dist/sdk-api-client.d.ts.map +1 -0
- package/dist/sdk-api-client.js +55 -0
- package/dist/sdk-api-client.js.map +1 -0
- package/dist/security.js +2 -2
- package/dist/security.js.map +1 -1
- package/dist/self-improvement.d.ts +34 -6
- package/dist/self-improvement.d.ts.map +1 -1
- package/dist/self-improvement.js +140 -34
- package/dist/self-improvement.js.map +1 -1
- package/dist/skill-bundles.d.ts +55 -0
- package/dist/skill-bundles.d.ts.map +1 -0
- package/dist/skill-bundles.js +134 -0
- package/dist/skill-bundles.js.map +1 -0
- package/dist/source-loader.d.ts +8 -0
- package/dist/source-loader.d.ts.map +1 -1
- package/dist/source-loader.js +41 -10
- package/dist/source-loader.js.map +1 -1
- package/dist/state-store-helpers.d.ts +2 -0
- package/dist/state-store-helpers.d.ts.map +1 -1
- package/dist/state-store-helpers.js +11 -1
- package/dist/state-store-helpers.js.map +1 -1
- package/dist/state-stores.d.ts +2 -0
- package/dist/state-stores.d.ts.map +1 -1
- package/dist/state-stores.js +40 -7
- package/dist/state-stores.js.map +1 -1
- package/dist/state.d.ts +344 -5
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +44 -2
- package/dist/state.js.map +1 -1
- package/dist/storage.d.ts +59 -2
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +183 -6
- package/dist/storage.js.map +1 -1
- package/dist/subagent-execution.d.ts +7 -6
- package/dist/subagent-execution.d.ts.map +1 -1
- package/dist/subagent-execution.js +58 -19
- package/dist/subagent-execution.js.map +1 -1
- package/dist/target-instructions.d.ts +14 -0
- package/dist/target-instructions.d.ts.map +1 -0
- package/dist/target-instructions.js +18 -0
- package/dist/target-instructions.js.map +1 -0
- package/dist/tool-apis.d.ts.map +1 -1
- package/dist/tool-apis.js +55 -10
- package/dist/tool-apis.js.map +1 -1
- package/dist/tool-execution.d.ts +26 -13
- package/dist/tool-execution.d.ts.map +1 -1
- package/dist/tool-execution.js +368 -239
- package/dist/tool-execution.js.map +1 -1
- package/dist/turn-media.d.ts +29 -0
- package/dist/turn-media.d.ts.map +1 -0
- package/dist/turn-media.js +233 -0
- package/dist/turn-media.js.map +1 -0
- package/dist/usage-reconciliation.d.ts +1 -1
- package/dist/usage-reconciliation.js +1 -1
- package/dist/workspace-id.d.ts +10 -0
- package/dist/workspace-id.d.ts.map +1 -0
- package/dist/workspace-id.js +55 -0
- package/dist/workspace-id.js.map +1 -0
- package/dist/workspace-manifest.d.ts +24 -0
- package/dist/workspace-manifest.d.ts.map +1 -0
- package/dist/workspace-manifest.js +111 -0
- package/dist/workspace-manifest.js.map +1 -0
- package/dist/workspace-operation-limiter.d.ts +16 -0
- package/dist/workspace-operation-limiter.d.ts.map +1 -0
- package/dist/workspace-operation-limiter.js +31 -0
- package/dist/workspace-operation-limiter.js.map +1 -0
- package/dist/workspace-operations.d.ts +145 -0
- package/dist/workspace-operations.d.ts.map +1 -0
- package/dist/workspace-operations.js +420 -0
- package/dist/workspace-operations.js.map +1 -0
- package/dist/workspace-runtime.d.ts +110 -0
- package/dist/workspace-runtime.d.ts.map +1 -0
- package/dist/workspace-runtime.js +240 -0
- package/dist/workspace-runtime.js.map +1 -0
- package/dist/workspace-search.d.ts +55 -0
- package/dist/workspace-search.d.ts.map +1 -0
- package/dist/workspace-search.js +262 -0
- package/dist/workspace-search.js.map +1 -0
- package/dist/workspace-service.d.ts +173 -0
- package/dist/workspace-service.d.ts.map +1 -0
- package/dist/workspace-service.js +619 -0
- package/dist/workspace-service.js.map +1 -0
- package/dist/workspace.d.ts +7 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +7 -0
- package/dist/workspace.js.map +1 -0
- package/package.json +7 -4
- package/dist/agent-harness.d.ts +0 -108
- package/dist/agent-harness.d.ts.map +0 -1
- package/dist/agent-harness.js +0 -2
- package/dist/agent-harness.js.map +0 -1
- package/dist/attachments-legacy.d.ts +0 -17
- package/dist/attachments-legacy.d.ts.map +0 -1
- package/dist/attachments-legacy.js +0 -273
- package/dist/attachments-legacy.js.map +0 -1
- package/dist/code-mode.d.ts +0 -20
- package/dist/code-mode.d.ts.map +0 -1
- package/dist/code-mode.js +0 -658
- package/dist/code-mode.js.map +0 -1
- package/dist/hook-dispatch.d.ts +0 -19
- package/dist/hook-dispatch.d.ts.map +0 -1
- package/dist/hook-dispatch.js +0 -37
- package/dist/hook-dispatch.js.map +0 -1
- package/dist/pi-agent-harness.d.ts +0 -40
- package/dist/pi-agent-harness.d.ts.map +0 -1
- package/dist/pi-agent-harness.js +0 -222
- package/dist/pi-agent-harness.js.map +0 -1
- package/dist/pi-harness.d.ts +0 -42
- package/dist/pi-harness.d.ts.map +0 -1
- package/dist/pi-harness.js +0 -142
- package/dist/pi-harness.js.map +0 -1
- package/dist/run-resolver.d.ts +0 -35
- package/dist/run-resolver.d.ts.map +0 -1
- package/dist/run-resolver.js +0 -84
- package/dist/run-resolver.js.map +0 -1
- package/dist/usage-budget.d.ts +0 -29
- package/dist/usage-budget.d.ts.map +0 -1
- package/dist/usage-budget.js +0 -145
- package/dist/usage-budget.js.map +0 -1
package/dist/builtin-tools.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { approvalNever, approvalRequired, normalizeSandboxPath as normalizeCoreSandboxPath } from "@assemblyline-agents/core";
|
|
3
|
+
import { DEFAULT_DELIVERY_FILE_MAX_BYTES, deliveryFileContentType } from "./delivery-queue.js";
|
|
4
|
+
import { internalDeliveryArtifactReason } from "./delivery-artifacts.js";
|
|
5
|
+
import { boundedPositiveIntEnv } from "./env-config.js";
|
|
6
|
+
import { workspaceContentBlobKey } from "./workspace-service.js";
|
|
2
7
|
export const READ_TOOL_NAME = "read";
|
|
3
8
|
export const WRITE_TOOL_NAME = "write";
|
|
4
9
|
export const EDIT_TOOL_NAME = "edit";
|
|
@@ -6,12 +11,19 @@ export const DELETE_TOOL_NAME = "delete";
|
|
|
6
11
|
export const LIST_TOOL_NAME = "list";
|
|
7
12
|
export const GREP_TOOL_NAME = "grep";
|
|
8
13
|
export const BASH_TOOL_NAME = "bash";
|
|
9
|
-
export const
|
|
10
|
-
export const SPAWN_SUBAGENT_TOOL_NAME = "spawn_subagent";
|
|
14
|
+
export const DELIVER_ARTIFACT_TOOL_NAME = "deliver_artifact";
|
|
11
15
|
export const LOAD_SKILL_TOOL_NAME = "load_skill";
|
|
12
16
|
export const TOOL_SEARCH_TOOL_NAME = "tool_search";
|
|
13
|
-
export const
|
|
14
|
-
export const
|
|
17
|
+
export const PAIR_TOOL_NAME = "pair";
|
|
18
|
+
export const HISTORY_SEARCH_TOOL_NAME = "history_search";
|
|
19
|
+
export const FILES_SEARCH_TOOL_NAME = "files_search";
|
|
20
|
+
export const FILES_MOUNT_TOOL_NAME = "files_mount";
|
|
21
|
+
export const WORKSPACE_SEARCH_TOOL_NAME = "workspace_search";
|
|
22
|
+
export const WORKSPACE_STATUS_TOOL_NAME = "workspace_status";
|
|
23
|
+
export const WORKSPACE_CHECKPOINT_CREATE_TOOL_NAME = "workspace_checkpoint_create";
|
|
24
|
+
export const WORKSPACE_CHECKPOINT_LIST_TOOL_NAME = "workspace_checkpoint_list";
|
|
25
|
+
export const WORKSPACE_CHECKPOINT_RESTORE_TOOL_NAME = "workspace_checkpoint_restore";
|
|
26
|
+
export const WORKSPACE_FORK_TOOL_NAME = "workspace_fork";
|
|
15
27
|
export const CORE_HARNESS_TOOL_NAMES = [
|
|
16
28
|
READ_TOOL_NAME,
|
|
17
29
|
WRITE_TOOL_NAME,
|
|
@@ -20,12 +32,19 @@ export const CORE_HARNESS_TOOL_NAMES = [
|
|
|
20
32
|
LIST_TOOL_NAME,
|
|
21
33
|
GREP_TOOL_NAME,
|
|
22
34
|
BASH_TOOL_NAME,
|
|
23
|
-
|
|
24
|
-
SPAWN_SUBAGENT_TOOL_NAME,
|
|
35
|
+
DELIVER_ARTIFACT_TOOL_NAME,
|
|
25
36
|
LOAD_SKILL_TOOL_NAME,
|
|
26
37
|
TOOL_SEARCH_TOOL_NAME,
|
|
27
|
-
|
|
28
|
-
|
|
38
|
+
PAIR_TOOL_NAME,
|
|
39
|
+
HISTORY_SEARCH_TOOL_NAME,
|
|
40
|
+
FILES_SEARCH_TOOL_NAME,
|
|
41
|
+
FILES_MOUNT_TOOL_NAME,
|
|
42
|
+
WORKSPACE_SEARCH_TOOL_NAME,
|
|
43
|
+
WORKSPACE_STATUS_TOOL_NAME,
|
|
44
|
+
WORKSPACE_CHECKPOINT_CREATE_TOOL_NAME,
|
|
45
|
+
WORKSPACE_CHECKPOINT_LIST_TOOL_NAME,
|
|
46
|
+
WORKSPACE_CHECKPOINT_RESTORE_TOOL_NAME,
|
|
47
|
+
WORKSPACE_FORK_TOOL_NAME
|
|
29
48
|
];
|
|
30
49
|
const CORE_HARNESS_TOOL_NAME_SET = new Set(CORE_HARNESS_TOOL_NAMES);
|
|
31
50
|
const BUILTIN_SOURCE = {
|
|
@@ -38,7 +57,7 @@ const PATH_SCHEMA = {
|
|
|
38
57
|
};
|
|
39
58
|
const READ_COMPILED_TOOL = {
|
|
40
59
|
name: READ_TOOL_NAME,
|
|
41
|
-
description: "Read a file from the sandbox filesystem. Lazily hydrates logical
|
|
60
|
+
description: "Read a file from the sandbox filesystem. Lazily hydrates logical Assembly Line paths before reading.",
|
|
42
61
|
inputSchema: {
|
|
43
62
|
type: "object",
|
|
44
63
|
additionalProperties: false,
|
|
@@ -82,7 +101,7 @@ const WRITE_COMPILED_TOOL = {
|
|
|
82
101
|
};
|
|
83
102
|
const EDIT_COMPILED_TOOL = {
|
|
84
103
|
name: EDIT_TOOL_NAME,
|
|
85
|
-
description: "Edit a sandbox file by replacing exact text. Hydrates the path first when it is a logical
|
|
104
|
+
description: "Edit a sandbox file by replacing exact text. Hydrates the path first when it is a logical Assembly Line resource.",
|
|
86
105
|
inputSchema: {
|
|
87
106
|
type: "object",
|
|
88
107
|
additionalProperties: false,
|
|
@@ -127,7 +146,7 @@ const DELETE_COMPILED_TOOL = {
|
|
|
127
146
|
};
|
|
128
147
|
const LIST_COMPILED_TOOL = {
|
|
129
148
|
name: LIST_TOOL_NAME,
|
|
130
|
-
description: "List files under a sandbox path. Lazily hydrates bounded logical
|
|
149
|
+
description: "List files under a sandbox path. Lazily hydrates bounded logical Assembly Line roots before listing.",
|
|
131
150
|
inputSchema: {
|
|
132
151
|
type: "object",
|
|
133
152
|
additionalProperties: false,
|
|
@@ -191,49 +210,26 @@ const BASH_COMPILED_TOOL = {
|
|
|
191
210
|
hasToModelOutput: true,
|
|
192
211
|
source: BUILTIN_SOURCE
|
|
193
212
|
};
|
|
194
|
-
const
|
|
195
|
-
name:
|
|
196
|
-
description: "
|
|
213
|
+
const DELIVER_ARTIFACT_COMPILED_TOOL = {
|
|
214
|
+
name: DELIVER_ARTIFACT_TOOL_NAME,
|
|
215
|
+
description: "Required for file delivery: select one completed /workspace file for exact attachment to the user. Call once for each file the final answer should attach; a link in the final answer does not attach a file.",
|
|
197
216
|
inputSchema: {
|
|
198
217
|
type: "object",
|
|
199
218
|
additionalProperties: false,
|
|
200
219
|
properties: {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
220
|
+
path: {
|
|
221
|
+
type: "string",
|
|
222
|
+
description: "Exact non-reserved /workspace file path to deliver, such as /workspace/Investment_Memo.xlsx."
|
|
223
|
+
}
|
|
205
224
|
},
|
|
206
|
-
required: ["
|
|
207
|
-
},
|
|
208
|
-
needsApproval: approvalNever(),
|
|
209
|
-
defaultEnabled: true,
|
|
210
|
-
visibility: "always",
|
|
211
|
-
execution: "direct",
|
|
212
|
-
tags: ["human", "question"],
|
|
213
|
-
aliases: ["clarify"],
|
|
214
|
-
hasToModelOutput: true,
|
|
215
|
-
source: BUILTIN_SOURCE
|
|
216
|
-
};
|
|
217
|
-
const SPAWN_SUBAGENT_COMPILED_TOOL = {
|
|
218
|
-
name: SPAWN_SUBAGENT_TOOL_NAME,
|
|
219
|
-
description: "Spawn a configured subagent by name for delegated work.",
|
|
220
|
-
inputSchema: {
|
|
221
|
-
type: "object",
|
|
222
|
-
additionalProperties: true,
|
|
223
|
-
properties: {
|
|
224
|
-
name: { type: "string", description: "Subagent name." },
|
|
225
|
-
task: { type: "string" },
|
|
226
|
-
expectedOutput: { type: "string" },
|
|
227
|
-
constraints: { type: "array", items: { type: "string" } }
|
|
228
|
-
},
|
|
229
|
-
required: ["name", "task"]
|
|
225
|
+
required: ["path"]
|
|
230
226
|
},
|
|
231
227
|
needsApproval: approvalNever(),
|
|
232
228
|
defaultEnabled: true,
|
|
233
229
|
visibility: "always",
|
|
234
230
|
execution: "direct",
|
|
235
|
-
tags: ["
|
|
236
|
-
aliases: ["
|
|
231
|
+
tags: ["artifact", "delivery", "workspace", "file"],
|
|
232
|
+
aliases: ["send_file", "attach_file"],
|
|
237
233
|
hasToModelOutput: true,
|
|
238
234
|
source: BUILTIN_SOURCE
|
|
239
235
|
};
|
|
@@ -259,7 +255,7 @@ const LOAD_SKILL_COMPILED_TOOL = {
|
|
|
259
255
|
};
|
|
260
256
|
const TOOL_SEARCH_COMPILED_TOOL = {
|
|
261
257
|
name: TOOL_SEARCH_TOOL_NAME,
|
|
262
|
-
description: "
|
|
258
|
+
description: "Find and activate deferred framework, authored, and connection tools. Matching tools become directly callable.",
|
|
263
259
|
inputSchema: {
|
|
264
260
|
type: "object",
|
|
265
261
|
additionalProperties: false,
|
|
@@ -280,45 +276,209 @@ const TOOL_SEARCH_COMPILED_TOOL = {
|
|
|
280
276
|
hasToModelOutput: true,
|
|
281
277
|
source: BUILTIN_SOURCE
|
|
282
278
|
};
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
279
|
+
// The universal connection-pairing entry point. Deliberately a default-enabled
|
|
280
|
+
// core tool rather than a discovered connection tool: a pasted binding packet
|
|
281
|
+
// is often the FIRST interaction with a connection, so its landing spot must
|
|
282
|
+
// not depend on the discovery chain (tool_search → connection metadata) that
|
|
283
|
+
// breaks precisely when a connection is misconfigured. It remains visible even
|
|
284
|
+
// when no connection is configured so the model can explain that state.
|
|
285
|
+
const PAIR_COMPILED_TOOL = {
|
|
286
|
+
name: PAIR_TOOL_NAME,
|
|
287
|
+
description: "Pair a connection by redeeming a one-time pairing packet or claim code. When the user pastes binding or pairing instructions for a connection, call this with the FULL pasted text as `secret`; the host exchanges the code and stores the credential durably. Only call this for a supplied packet; the tool's presence does not mean an existing grant is missing. Omit `connection` when only one connection supports pairing.",
|
|
286
288
|
inputSchema: {
|
|
287
289
|
type: "object",
|
|
288
290
|
additionalProperties: false,
|
|
289
291
|
properties: {
|
|
290
|
-
|
|
292
|
+
connection: {
|
|
293
|
+
type: "string",
|
|
294
|
+
description: "Connection name to pair. Optional when exactly one live connection supports pairing."
|
|
295
|
+
},
|
|
296
|
+
secret: {
|
|
297
|
+
type: "string",
|
|
298
|
+
description: "The full pasted pairing packet, binding instructions, or one-time claim code."
|
|
299
|
+
}
|
|
291
300
|
},
|
|
292
|
-
required: ["
|
|
301
|
+
required: ["secret"]
|
|
293
302
|
},
|
|
294
303
|
needsApproval: approvalNever(),
|
|
295
304
|
defaultEnabled: true,
|
|
296
305
|
visibility: "always",
|
|
297
306
|
execution: "direct",
|
|
298
|
-
tags: ["
|
|
299
|
-
aliases: ["
|
|
307
|
+
tags: ["connections", "pairing", "credentials"],
|
|
308
|
+
aliases: ["bind", "pair_connection"],
|
|
300
309
|
hasToModelOutput: true,
|
|
301
310
|
source: BUILTIN_SOURCE
|
|
302
311
|
};
|
|
303
|
-
const
|
|
304
|
-
name:
|
|
305
|
-
description: "
|
|
312
|
+
const HISTORY_SEARCH_COMPILED_TOOL = {
|
|
313
|
+
name: HISTORY_SEARCH_TOOL_NAME,
|
|
314
|
+
description: "Search attributed conversation and channel history without loading the full history into the prompt. Access scope is enforced by the runtime.",
|
|
306
315
|
inputSchema: {
|
|
307
316
|
type: "object",
|
|
308
317
|
additionalProperties: false,
|
|
309
318
|
properties: {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
319
|
+
query: { type: "string", description: "Words or concepts to find." },
|
|
320
|
+
scope: {
|
|
321
|
+
type: "string",
|
|
322
|
+
enum: ["current_conversation", "current_channel", "my_conversations"],
|
|
323
|
+
description: "History boundary. Defaults to the current conversation."
|
|
324
|
+
},
|
|
325
|
+
limit: { type: "number", description: "Maximum results. Defaults to 8 and is capped at 50." }
|
|
313
326
|
},
|
|
314
|
-
required: ["
|
|
327
|
+
required: ["query"]
|
|
328
|
+
},
|
|
329
|
+
needsApproval: approvalNever(),
|
|
330
|
+
defaultEnabled: false,
|
|
331
|
+
visibility: "deferred",
|
|
332
|
+
execution: "direct",
|
|
333
|
+
tags: ["history", "search", "conversations", "channels"],
|
|
334
|
+
aliases: ["conversation_search", "search_history"],
|
|
335
|
+
hasToModelOutput: true,
|
|
336
|
+
source: BUILTIN_SOURCE
|
|
337
|
+
};
|
|
338
|
+
const FILES_SEARCH_COMPILED_TOOL = {
|
|
339
|
+
name: FILES_SEARCH_TOOL_NAME,
|
|
340
|
+
description: "Find files previously shared or created in the current durable workspace. Omit query to list the most recent files.",
|
|
341
|
+
inputSchema: {
|
|
342
|
+
type: "object",
|
|
343
|
+
additionalProperties: false,
|
|
344
|
+
properties: {
|
|
345
|
+
query: { type: "string", description: "Optional filename, path, or file id fragment." },
|
|
346
|
+
limit: { type: "number", description: "Maximum results. Defaults to 50 and is capped at 200." }
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
needsApproval: approvalNever(),
|
|
350
|
+
defaultEnabled: true,
|
|
351
|
+
visibility: "always",
|
|
352
|
+
execution: "direct",
|
|
353
|
+
tags: ["files", "search", "workspace", "durability"],
|
|
354
|
+
aliases: ["files_list", "attachments_search"],
|
|
355
|
+
hasToModelOutput: true,
|
|
356
|
+
source: BUILTIN_SOURCE
|
|
357
|
+
};
|
|
358
|
+
const FILES_MOUNT_COMPILED_TOOL = {
|
|
359
|
+
name: FILES_MOUNT_TOOL_NAME,
|
|
360
|
+
description: "Mount one durable workspace file into the current sandbox at the returned read-only /files/library path.",
|
|
361
|
+
inputSchema: {
|
|
362
|
+
type: "object",
|
|
363
|
+
additionalProperties: false,
|
|
364
|
+
properties: {
|
|
365
|
+
fileId: { type: "string", description: "Exact file id returned by files_search." }
|
|
366
|
+
},
|
|
367
|
+
required: ["fileId"]
|
|
315
368
|
},
|
|
316
369
|
needsApproval: approvalNever(),
|
|
317
370
|
defaultEnabled: true,
|
|
318
371
|
visibility: "always",
|
|
372
|
+
execution: "sandbox",
|
|
373
|
+
tags: ["files", "sandbox", "workspace", "durability"],
|
|
374
|
+
aliases: ["mount_file", "attachment_mount"],
|
|
375
|
+
hasToModelOutput: true,
|
|
376
|
+
source: BUILTIN_SOURCE
|
|
377
|
+
};
|
|
378
|
+
const WORKSPACE_STATUS_COMPILED_TOOL = {
|
|
379
|
+
name: WORKSPACE_STATUS_TOOL_NAME,
|
|
380
|
+
description: "Show the current durable workspace head, size, version count, and named checkpoints.",
|
|
381
|
+
inputSchema: { type: "object", additionalProperties: false, properties: {} },
|
|
382
|
+
needsApproval: approvalNever(),
|
|
383
|
+
defaultEnabled: false,
|
|
384
|
+
visibility: "deferred",
|
|
319
385
|
execution: "direct",
|
|
320
|
-
tags: ["
|
|
321
|
-
aliases: ["
|
|
386
|
+
tags: ["workspace", "versions", "status"],
|
|
387
|
+
aliases: ["workspace_info"],
|
|
388
|
+
hasToModelOutput: true,
|
|
389
|
+
source: BUILTIN_SOURCE
|
|
390
|
+
};
|
|
391
|
+
const WORKSPACE_SEARCH_COMPILED_TOOL = {
|
|
392
|
+
name: WORKSPACE_SEARCH_TOOL_NAME,
|
|
393
|
+
description: "Search a committed durable workspace without hydrating it. Results identify the exact version and ranking source.",
|
|
394
|
+
inputSchema: {
|
|
395
|
+
type: "object",
|
|
396
|
+
additionalProperties: false,
|
|
397
|
+
properties: {
|
|
398
|
+
query: { type: "string", description: "Words or concepts to find." },
|
|
399
|
+
versionId: { type: "string", description: "Optional committed version. Defaults to the current head." },
|
|
400
|
+
limit: { type: "number", description: "Maximum results. Defaults to 8 and is capped at 100." }
|
|
401
|
+
},
|
|
402
|
+
required: ["query"]
|
|
403
|
+
},
|
|
404
|
+
needsApproval: approvalNever(),
|
|
405
|
+
defaultEnabled: false,
|
|
406
|
+
visibility: "deferred",
|
|
407
|
+
execution: "direct",
|
|
408
|
+
tags: ["workspace", "search", "versions"],
|
|
409
|
+
aliases: ["search_workspace"],
|
|
410
|
+
hasToModelOutput: true,
|
|
411
|
+
source: BUILTIN_SOURCE
|
|
412
|
+
};
|
|
413
|
+
const WORKSPACE_CHECKPOINT_CREATE_COMPILED_TOOL = {
|
|
414
|
+
name: WORKSPACE_CHECKPOINT_CREATE_TOOL_NAME,
|
|
415
|
+
description: "Name the current committed workspace version without copying its files.",
|
|
416
|
+
inputSchema: {
|
|
417
|
+
type: "object",
|
|
418
|
+
additionalProperties: false,
|
|
419
|
+
properties: {
|
|
420
|
+
name: { type: "string", description: "Workspace-local checkpoint name." },
|
|
421
|
+
replace: { type: "boolean", description: "Replace an existing name. Defaults to false." }
|
|
422
|
+
},
|
|
423
|
+
required: ["name"]
|
|
424
|
+
},
|
|
425
|
+
needsApproval: approvalNever(),
|
|
426
|
+
defaultEnabled: false,
|
|
427
|
+
visibility: "deferred",
|
|
428
|
+
execution: "direct",
|
|
429
|
+
tags: ["workspace", "checkpoint", "versions"],
|
|
430
|
+
aliases: ["workspace_savepoint"],
|
|
431
|
+
hasToModelOutput: true,
|
|
432
|
+
source: BUILTIN_SOURCE
|
|
433
|
+
};
|
|
434
|
+
const WORKSPACE_CHECKPOINT_LIST_COMPILED_TOOL = {
|
|
435
|
+
name: WORKSPACE_CHECKPOINT_LIST_TOOL_NAME,
|
|
436
|
+
description: "List named checkpoints for the current durable workspace.",
|
|
437
|
+
inputSchema: { type: "object", additionalProperties: false, properties: {} },
|
|
438
|
+
needsApproval: approvalNever(),
|
|
439
|
+
defaultEnabled: false,
|
|
440
|
+
visibility: "deferred",
|
|
441
|
+
execution: "direct",
|
|
442
|
+
tags: ["workspace", "checkpoint", "list"],
|
|
443
|
+
aliases: ["workspace_savepoints"],
|
|
444
|
+
hasToModelOutput: true,
|
|
445
|
+
source: BUILTIN_SOURCE
|
|
446
|
+
};
|
|
447
|
+
const WORKSPACE_CHECKPOINT_RESTORE_COMPILED_TOOL = {
|
|
448
|
+
name: WORKSPACE_CHECKPOINT_RESTORE_TOOL_NAME,
|
|
449
|
+
description: "Restore a named checkpoint as a new workspace head while preserving all later versions.",
|
|
450
|
+
inputSchema: {
|
|
451
|
+
type: "object",
|
|
452
|
+
additionalProperties: false,
|
|
453
|
+
properties: { name: { type: "string", description: "Checkpoint name to restore." } },
|
|
454
|
+
required: ["name"]
|
|
455
|
+
},
|
|
456
|
+
needsApproval: approvalRequired("Restoring replaces the current workspace tree with a prior committed version."),
|
|
457
|
+
defaultEnabled: false,
|
|
458
|
+
visibility: "deferred",
|
|
459
|
+
execution: "direct",
|
|
460
|
+
tags: ["workspace", "checkpoint", "restore"],
|
|
461
|
+
aliases: ["workspace_rollback"],
|
|
462
|
+
hasToModelOutput: true,
|
|
463
|
+
source: BUILTIN_SOURCE
|
|
464
|
+
};
|
|
465
|
+
const WORKSPACE_FORK_COMPILED_TOOL = {
|
|
466
|
+
name: WORKSPACE_FORK_TOOL_NAME,
|
|
467
|
+
description: "Create an independent copy-on-write workspace from the current head or a named checkpoint.",
|
|
468
|
+
inputSchema: {
|
|
469
|
+
type: "object",
|
|
470
|
+
additionalProperties: false,
|
|
471
|
+
properties: {
|
|
472
|
+
name: { type: "string", description: "Optional display name for the new workspace." },
|
|
473
|
+
checkpoint: { type: "string", description: "Optional checkpoint to fork instead of the current head." }
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
needsApproval: approvalNever(),
|
|
477
|
+
defaultEnabled: false,
|
|
478
|
+
visibility: "deferred",
|
|
479
|
+
execution: "direct",
|
|
480
|
+
tags: ["workspace", "fork", "branch"],
|
|
481
|
+
aliases: ["workspace_branch"],
|
|
322
482
|
hasToModelOutput: true,
|
|
323
483
|
source: BUILTIN_SOURCE
|
|
324
484
|
};
|
|
@@ -330,17 +490,24 @@ const BUILT_IN_COMPILED_TOOLS = [
|
|
|
330
490
|
LIST_COMPILED_TOOL,
|
|
331
491
|
GREP_COMPILED_TOOL,
|
|
332
492
|
BASH_COMPILED_TOOL,
|
|
333
|
-
|
|
334
|
-
SPAWN_SUBAGENT_COMPILED_TOOL,
|
|
493
|
+
DELIVER_ARTIFACT_COMPILED_TOOL,
|
|
335
494
|
LOAD_SKILL_COMPILED_TOOL,
|
|
336
495
|
TOOL_SEARCH_COMPILED_TOOL,
|
|
337
|
-
|
|
338
|
-
|
|
496
|
+
PAIR_COMPILED_TOOL,
|
|
497
|
+
HISTORY_SEARCH_COMPILED_TOOL,
|
|
498
|
+
FILES_SEARCH_COMPILED_TOOL,
|
|
499
|
+
FILES_MOUNT_COMPILED_TOOL,
|
|
500
|
+
WORKSPACE_SEARCH_COMPILED_TOOL,
|
|
501
|
+
WORKSPACE_STATUS_COMPILED_TOOL,
|
|
502
|
+
WORKSPACE_CHECKPOINT_CREATE_COMPILED_TOOL,
|
|
503
|
+
WORKSPACE_CHECKPOINT_LIST_COMPILED_TOOL,
|
|
504
|
+
WORKSPACE_CHECKPOINT_RESTORE_COMPILED_TOOL,
|
|
505
|
+
WORKSPACE_FORK_COMPILED_TOOL
|
|
339
506
|
];
|
|
340
|
-
export function
|
|
341
|
-
const builtInNamed = new Map(
|
|
507
|
+
export function runtimeToolsForSurface(authoredTools) {
|
|
508
|
+
const builtInNamed = new Map(authoredTools.filter((tool) => CORE_HARNESS_TOOL_NAME_SET.has(tool.name)).map((tool) => [tool.name, tool]));
|
|
342
509
|
return [
|
|
343
|
-
...
|
|
510
|
+
...authoredTools.filter((tool) => !CORE_HARNESS_TOOL_NAME_SET.has(tool.name) && !tool.disabled),
|
|
344
511
|
...BUILT_IN_COMPILED_TOOLS.flatMap((builtin) => {
|
|
345
512
|
const authored = builtInNamed.get(builtin.name);
|
|
346
513
|
if (!authored)
|
|
@@ -368,18 +535,32 @@ export function builtInToolDefinition(name) {
|
|
|
368
535
|
return grepToolDefinition;
|
|
369
536
|
if (name === BASH_TOOL_NAME)
|
|
370
537
|
return bashToolDefinition;
|
|
371
|
-
if (name ===
|
|
372
|
-
return
|
|
373
|
-
if (name === SPAWN_SUBAGENT_TOOL_NAME)
|
|
374
|
-
return spawnSubagentToolDefinition;
|
|
538
|
+
if (name === DELIVER_ARTIFACT_TOOL_NAME)
|
|
539
|
+
return deliverArtifactToolDefinition;
|
|
375
540
|
if (name === LOAD_SKILL_TOOL_NAME)
|
|
376
541
|
return runtimeHandledToolDefinition(LOAD_SKILL_COMPILED_TOOL);
|
|
377
542
|
if (name === TOOL_SEARCH_TOOL_NAME)
|
|
378
543
|
return runtimeHandledToolDefinition(TOOL_SEARCH_COMPILED_TOOL);
|
|
379
|
-
if (name ===
|
|
380
|
-
return runtimeHandledToolDefinition(
|
|
381
|
-
if (name ===
|
|
382
|
-
return runtimeHandledToolDefinition(
|
|
544
|
+
if (name === PAIR_TOOL_NAME)
|
|
545
|
+
return runtimeHandledToolDefinition(PAIR_COMPILED_TOOL);
|
|
546
|
+
if (name === HISTORY_SEARCH_TOOL_NAME)
|
|
547
|
+
return runtimeHandledToolDefinition(HISTORY_SEARCH_COMPILED_TOOL);
|
|
548
|
+
if (name === FILES_SEARCH_TOOL_NAME)
|
|
549
|
+
return runtimeHandledToolDefinition(FILES_SEARCH_COMPILED_TOOL);
|
|
550
|
+
if (name === FILES_MOUNT_TOOL_NAME)
|
|
551
|
+
return runtimeHandledToolDefinition(FILES_MOUNT_COMPILED_TOOL);
|
|
552
|
+
if (name === WORKSPACE_SEARCH_TOOL_NAME)
|
|
553
|
+
return runtimeHandledToolDefinition(WORKSPACE_SEARCH_COMPILED_TOOL);
|
|
554
|
+
if (name === WORKSPACE_STATUS_TOOL_NAME)
|
|
555
|
+
return runtimeHandledToolDefinition(WORKSPACE_STATUS_COMPILED_TOOL);
|
|
556
|
+
if (name === WORKSPACE_CHECKPOINT_CREATE_TOOL_NAME)
|
|
557
|
+
return runtimeHandledToolDefinition(WORKSPACE_CHECKPOINT_CREATE_COMPILED_TOOL);
|
|
558
|
+
if (name === WORKSPACE_CHECKPOINT_LIST_TOOL_NAME)
|
|
559
|
+
return runtimeHandledToolDefinition(WORKSPACE_CHECKPOINT_LIST_COMPILED_TOOL);
|
|
560
|
+
if (name === WORKSPACE_CHECKPOINT_RESTORE_TOOL_NAME)
|
|
561
|
+
return runtimeHandledToolDefinition(WORKSPACE_CHECKPOINT_RESTORE_COMPILED_TOOL);
|
|
562
|
+
if (name === WORKSPACE_FORK_TOOL_NAME)
|
|
563
|
+
return runtimeHandledToolDefinition(WORKSPACE_FORK_COMPILED_TOOL);
|
|
383
564
|
return undefined;
|
|
384
565
|
}
|
|
385
566
|
export function isBuiltInToolName(name) {
|
|
@@ -513,40 +694,53 @@ const bashToolDefinition = {
|
|
|
513
694
|
return sandbox.shell(command, options);
|
|
514
695
|
}
|
|
515
696
|
};
|
|
516
|
-
const
|
|
517
|
-
...toolDefinitionBase(
|
|
697
|
+
const deliverArtifactToolDefinition = {
|
|
698
|
+
...toolDefinitionBase(DELIVER_ARTIFACT_COMPILED_TOOL),
|
|
518
699
|
async execute(input, ctx) {
|
|
519
700
|
const raw = recordInput(input);
|
|
520
|
-
const
|
|
521
|
-
if (!
|
|
522
|
-
throw new Error("
|
|
523
|
-
const options = {};
|
|
524
|
-
if (Array.isArray(raw.choices))
|
|
525
|
-
options.choices = raw.choices.map(String).filter(Boolean);
|
|
526
|
-
if (typeof raw.allowFreeform === "boolean")
|
|
527
|
-
options.allowFreeform = raw.allowFreeform;
|
|
528
|
-
if (raw.metadata && typeof raw.metadata === "object" && !Array.isArray(raw.metadata)) {
|
|
529
|
-
options.metadata = raw.metadata;
|
|
701
|
+
const path = requiredPath(raw.path);
|
|
702
|
+
if (!path.startsWith("/workspace/") || path === "/workspace/") {
|
|
703
|
+
throw new Error("deliver_artifact requires an exact file path below /workspace.");
|
|
530
704
|
}
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
const
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
705
|
+
const relativePath = path.slice("/workspace/".length);
|
|
706
|
+
const topLevel = relativePath.split("/", 1)[0] ?? "";
|
|
707
|
+
if (["memory", "skills", "history", "files", ".agents", ".assembly-line"].includes(topLevel)) {
|
|
708
|
+
throw new Error(`deliver_artifact cannot deliver reserved workspace path ${path}.`);
|
|
709
|
+
}
|
|
710
|
+
if (internalDeliveryArtifactReason(relativePath)) {
|
|
711
|
+
throw new Error(`deliver_artifact cannot deliver internal or cache path ${path}.`);
|
|
712
|
+
}
|
|
713
|
+
await ctx.hydrateSandboxPath?.(path);
|
|
714
|
+
const sandbox = await ctx.getSandbox();
|
|
715
|
+
if (!sandbox.readFileBytes) {
|
|
716
|
+
throw new Error("deliver_artifact requires a sandbox adapter with byte-preserving exact file reads.");
|
|
717
|
+
}
|
|
718
|
+
const contents = await sandbox.readFileBytes(path);
|
|
719
|
+
const bytes = Buffer.from(contents);
|
|
720
|
+
const sizeBytes = bytes.byteLength;
|
|
721
|
+
const maxBytes = boundedPositiveIntEnv(ctx.channel?.env.ASSEMBLY_LINE_DELIVERY_FILE_MAX_BYTES, DEFAULT_DELIVERY_FILE_MAX_BYTES, 1, 1024 * 1024 * 1024);
|
|
722
|
+
if (sizeBytes > maxBytes) {
|
|
723
|
+
throw new Error(`Selected delivery artifact ${path} is ${sizeBytes} bytes, exceeding the configured limit of ${maxBytes}.`);
|
|
724
|
+
}
|
|
725
|
+
if (!ctx.blob)
|
|
726
|
+
throw new Error("deliver_artifact requires blob storage.");
|
|
727
|
+
const contentType = deliveryFileContentType(relativePath);
|
|
728
|
+
const sha256 = createHash("sha256").update(bytes).digest("hex");
|
|
729
|
+
const blob = await ctx.blob.put(workspaceContentBlobKey(sha256), bytes, { contentType, visibility: "private" });
|
|
730
|
+
await ctx.emit("artifact.delivery_selected", {
|
|
731
|
+
path,
|
|
732
|
+
relativePath,
|
|
733
|
+
sizeBytes: blob.size,
|
|
734
|
+
contentType,
|
|
735
|
+
sha256: blob.sha256,
|
|
736
|
+
blobKey: blob.key
|
|
549
737
|
});
|
|
738
|
+
return {
|
|
739
|
+
path,
|
|
740
|
+
sizeBytes,
|
|
741
|
+
downloadUrl: `sandbox:${path}`,
|
|
742
|
+
selectedForDelivery: true
|
|
743
|
+
};
|
|
550
744
|
}
|
|
551
745
|
};
|
|
552
746
|
function toolDefinitionBase(tool) {
|
|
@@ -554,7 +748,6 @@ function toolDefinitionBase(tool) {
|
|
|
554
748
|
description: tool.description,
|
|
555
749
|
inputSchema: tool.inputSchema,
|
|
556
750
|
needsApproval: false,
|
|
557
|
-
defaultEnabled: tool.defaultEnabled,
|
|
558
751
|
capability: {
|
|
559
752
|
visibility: tool.visibility,
|
|
560
753
|
execution: tool.execution,
|
|
@@ -573,7 +766,7 @@ function runtimeHandledToolDefinition(tool) {
|
|
|
573
766
|
return {
|
|
574
767
|
...toolDefinitionBase(tool),
|
|
575
768
|
async execute() {
|
|
576
|
-
throw new Error(`${tool.name} is handled by the
|
|
769
|
+
throw new Error(`${tool.name} is handled by the Assembly Line runtime dispatcher.`);
|
|
577
770
|
}
|
|
578
771
|
};
|
|
579
772
|
}
|
|
@@ -605,8 +798,8 @@ function boundedNumber(value, fallback, min, max) {
|
|
|
605
798
|
async function listSandboxEntries(sandbox, path, limit) {
|
|
606
799
|
if (!sandbox.listFiles)
|
|
607
800
|
throw new Error("This sandbox adapter does not support file listing.");
|
|
608
|
-
const entries = await sandbox.listFiles(path);
|
|
609
|
-
return entries.
|
|
801
|
+
const entries = await sandbox.listFiles(path, { limit, includeContents: false });
|
|
802
|
+
return entries.map((entry) => {
|
|
610
803
|
const out = { path: entry.path };
|
|
611
804
|
if (entry.size !== undefined)
|
|
612
805
|
out.size = entry.size;
|
|
@@ -616,7 +809,7 @@ async function listSandboxEntries(sandbox, path, limit) {
|
|
|
616
809
|
async function grepSandbox(sandbox, path, pattern, literal, limit) {
|
|
617
810
|
if (!sandbox.listFiles)
|
|
618
811
|
throw new Error("This sandbox adapter does not support grep without file listing.");
|
|
619
|
-
const entries = await sandbox.listFiles(path);
|
|
812
|
+
const entries = await sandbox.listFiles(path, { includeContents: true });
|
|
620
813
|
const matches = [];
|
|
621
814
|
const regexp = literal ? undefined : new RegExp(pattern, "u");
|
|
622
815
|
for (const entry of entries) {
|
|
@@ -673,8 +866,8 @@ export function builtInToolContext(tool) {
|
|
|
673
866
|
*
|
|
674
867
|
* export default defineTool({ ...builtInToolDefaults.write, execute: guarded });
|
|
675
868
|
*
|
|
676
|
-
* The
|
|
677
|
-
*
|
|
869
|
+
* The discovery tools (load_skill and tool_search) are runtime-handled and have
|
|
870
|
+
* no wrappable executor, so they are not listed.
|
|
678
871
|
*/
|
|
679
872
|
export const builtInToolDefaults = Object.freeze({
|
|
680
873
|
read: readToolDefinition,
|
|
@@ -684,7 +877,6 @@ export const builtInToolDefaults = Object.freeze({
|
|
|
684
877
|
list: listToolDefinition,
|
|
685
878
|
grep: grepToolDefinition,
|
|
686
879
|
bash: bashToolDefinition,
|
|
687
|
-
|
|
688
|
-
spawn_subagent: spawnSubagentToolDefinition
|
|
880
|
+
deliver_artifact: deliverArtifactToolDefinition
|
|
689
881
|
});
|
|
690
882
|
//# sourceMappingURL=builtin-tools.js.map
|