@aria-cli/tools 1.0.8 → 1.0.10
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/package.json +9 -6
- package/dist-cjs/.tsbuildinfo +0 -1
- package/dist-cjs/ask-user-interaction.d.ts +0 -10
- package/dist-cjs/ask-user-interaction.js +0 -28
- package/dist-cjs/ask-user-interaction.js.map +0 -1
- package/dist-cjs/cache/web-cache.d.ts +0 -52
- package/dist-cjs/cache/web-cache.js +0 -71
- package/dist-cjs/cache/web-cache.js.map +0 -1
- package/dist-cjs/definitions/arion.d.ts +0 -8
- package/dist-cjs/definitions/arion.js +0 -108
- package/dist-cjs/definitions/arion.js.map +0 -1
- package/dist-cjs/definitions/browser/browser.d.ts +0 -2
- package/dist-cjs/definitions/browser/browser.js +0 -422
- package/dist-cjs/definitions/browser/browser.js.map +0 -1
- package/dist-cjs/definitions/browser/index.d.ts +0 -1
- package/dist-cjs/definitions/browser/index.js +0 -9
- package/dist-cjs/definitions/browser/index.js.map +0 -1
- package/dist-cjs/definitions/browser/pw-downloads.d.ts +0 -13
- package/dist-cjs/definitions/browser/pw-downloads.js +0 -118
- package/dist-cjs/definitions/browser/pw-downloads.js.map +0 -1
- package/dist-cjs/definitions/browser/pw-interactions.d.ts +0 -78
- package/dist-cjs/definitions/browser/pw-interactions.js +0 -214
- package/dist-cjs/definitions/browser/pw-interactions.js.map +0 -1
- package/dist-cjs/definitions/browser/pw-responses.d.ts +0 -28
- package/dist-cjs/definitions/browser/pw-responses.js +0 -85
- package/dist-cjs/definitions/browser/pw-responses.js.map +0 -1
- package/dist-cjs/definitions/browser/pw-session.d.ts +0 -65
- package/dist-cjs/definitions/browser/pw-session.js +0 -327
- package/dist-cjs/definitions/browser/pw-session.js.map +0 -1
- package/dist-cjs/definitions/browser/pw-shared.d.ts +0 -22
- package/dist-cjs/definitions/browser/pw-shared.js +0 -73
- package/dist-cjs/definitions/browser/pw-shared.js.map +0 -1
- package/dist-cjs/definitions/browser/pw-snapshot.d.ts +0 -34
- package/dist-cjs/definitions/browser/pw-snapshot.js +0 -308
- package/dist-cjs/definitions/browser/pw-snapshot.js.map +0 -1
- package/dist-cjs/definitions/browser/pw-state.d.ts +0 -22
- package/dist-cjs/definitions/browser/pw-state.js +0 -71
- package/dist-cjs/definitions/browser/pw-state.js.map +0 -1
- package/dist-cjs/definitions/browser/types.d.ts +0 -277
- package/dist-cjs/definitions/browser/types.js +0 -6
- package/dist-cjs/definitions/browser/types.js.map +0 -1
- package/dist-cjs/definitions/code-intelligence.d.ts +0 -8
- package/dist-cjs/definitions/code-intelligence.js +0 -474
- package/dist-cjs/definitions/code-intelligence.js.map +0 -1
- package/dist-cjs/definitions/core.d.ts +0 -47
- package/dist-cjs/definitions/core.js +0 -134
- package/dist-cjs/definitions/core.js.map +0 -1
- package/dist-cjs/definitions/delegation.d.ts +0 -11
- package/dist-cjs/definitions/delegation.js +0 -516
- package/dist-cjs/definitions/delegation.js.map +0 -1
- package/dist-cjs/definitions/deploy.d.ts +0 -15
- package/dist-cjs/definitions/deploy.js +0 -69
- package/dist-cjs/definitions/deploy.js.map +0 -1
- package/dist-cjs/definitions/filesystem.d.ts +0 -9
- package/dist-cjs/definitions/filesystem.js +0 -200
- package/dist-cjs/definitions/filesystem.js.map +0 -1
- package/dist-cjs/definitions/frg.d.ts +0 -3
- package/dist-cjs/definitions/frg.js +0 -67
- package/dist-cjs/definitions/frg.js.map +0 -1
- package/dist-cjs/definitions/index.d.ts +0 -19
- package/dist-cjs/definitions/index.js +0 -44
- package/dist-cjs/definitions/index.js.map +0 -1
- package/dist-cjs/definitions/memory.d.ts +0 -8
- package/dist-cjs/definitions/memory.js +0 -127
- package/dist-cjs/definitions/memory.js.map +0 -1
- package/dist-cjs/definitions/messaging.d.ts +0 -11
- package/dist-cjs/definitions/messaging.js +0 -632
- package/dist-cjs/definitions/messaging.js.map +0 -1
- package/dist-cjs/definitions/meta.d.ts +0 -11
- package/dist-cjs/definitions/meta.js +0 -353
- package/dist-cjs/definitions/meta.js.map +0 -1
- package/dist-cjs/definitions/network.d.ts +0 -11
- package/dist-cjs/definitions/network.js +0 -163
- package/dist-cjs/definitions/network.js.map +0 -1
- package/dist-cjs/definitions/outlook.d.ts +0 -2
- package/dist-cjs/definitions/outlook.js +0 -281
- package/dist-cjs/definitions/outlook.js.map +0 -1
- package/dist-cjs/definitions/patch/apply-patch.d.ts +0 -11
- package/dist-cjs/definitions/patch/apply-patch.js +0 -192
- package/dist-cjs/definitions/patch/apply-patch.js.map +0 -1
- package/dist-cjs/definitions/patch/fuzzy-match.d.ts +0 -10
- package/dist-cjs/definitions/patch/fuzzy-match.js +0 -173
- package/dist-cjs/definitions/patch/fuzzy-match.js.map +0 -1
- package/dist-cjs/definitions/patch/index.d.ts +0 -1
- package/dist-cjs/definitions/patch/index.js +0 -6
- package/dist-cjs/definitions/patch/index.js.map +0 -1
- package/dist-cjs/definitions/patch/patch-parser.d.ts +0 -50
- package/dist-cjs/definitions/patch/patch-parser.js +0 -216
- package/dist-cjs/definitions/patch/patch-parser.js.map +0 -1
- package/dist-cjs/definitions/patch/sandbox-paths.d.ts +0 -18
- package/dist-cjs/definitions/patch/sandbox-paths.js +0 -114
- package/dist-cjs/definitions/patch/sandbox-paths.js.map +0 -1
- package/dist-cjs/definitions/process/index.d.ts +0 -1
- package/dist-cjs/definitions/process/index.js +0 -9
- package/dist-cjs/definitions/process/index.js.map +0 -1
- package/dist-cjs/definitions/process/process-registry.d.ts +0 -67
- package/dist-cjs/definitions/process/process-registry.js +0 -232
- package/dist-cjs/definitions/process/process-registry.js.map +0 -1
- package/dist-cjs/definitions/process/process.d.ts +0 -9
- package/dist-cjs/definitions/process/process.js +0 -390
- package/dist-cjs/definitions/process/process.js.map +0 -1
- package/dist-cjs/definitions/process/pty-keys.d.ts +0 -13
- package/dist-cjs/definitions/process/pty-keys.js +0 -260
- package/dist-cjs/definitions/process/pty-keys.js.map +0 -1
- package/dist-cjs/definitions/process/session-slug.d.ts +0 -1
- package/dist-cjs/definitions/process/session-slug.js +0 -146
- package/dist-cjs/definitions/process/session-slug.js.map +0 -1
- package/dist-cjs/definitions/quip.d.ts +0 -2
- package/dist-cjs/definitions/quip.js +0 -199
- package/dist-cjs/definitions/quip.js.map +0 -1
- package/dist-cjs/definitions/search.d.ts +0 -9
- package/dist-cjs/definitions/search.js +0 -64
- package/dist-cjs/definitions/search.js.map +0 -1
- package/dist-cjs/definitions/session-history.d.ts +0 -11
- package/dist-cjs/definitions/session-history.js +0 -73
- package/dist-cjs/definitions/session-history.js.map +0 -1
- package/dist-cjs/definitions/shell.d.ts +0 -8
- package/dist-cjs/definitions/shell.js +0 -185
- package/dist-cjs/definitions/shell.js.map +0 -1
- package/dist-cjs/definitions/slack.d.ts +0 -2
- package/dist-cjs/definitions/slack.js +0 -184
- package/dist-cjs/definitions/slack.js.map +0 -1
- package/dist-cjs/definitions/web.d.ts +0 -8
- package/dist-cjs/definitions/web.js +0 -113
- package/dist-cjs/definitions/web.js.map +0 -1
- package/dist-cjs/executors/apply-patch.d.ts +0 -51
- package/dist-cjs/executors/apply-patch.js +0 -939
- package/dist-cjs/executors/apply-patch.js.map +0 -1
- package/dist-cjs/executors/arion.d.ts +0 -50
- package/dist-cjs/executors/arion.js +0 -126
- package/dist-cjs/executors/arion.js.map +0 -1
- package/dist-cjs/executors/code-intelligence.d.ts +0 -138
- package/dist-cjs/executors/code-intelligence.js +0 -926
- package/dist-cjs/executors/code-intelligence.js.map +0 -1
- package/dist-cjs/executors/deploy.d.ts +0 -169
- package/dist-cjs/executors/deploy.js +0 -870
- package/dist-cjs/executors/deploy.js.map +0 -1
- package/dist-cjs/executors/filesystem.d.ts +0 -150
- package/dist-cjs/executors/filesystem.js +0 -1168
- package/dist-cjs/executors/filesystem.js.map +0 -1
- package/dist-cjs/executors/frg-freshness.d.ts +0 -93
- package/dist-cjs/executors/frg-freshness.js +0 -628
- package/dist-cjs/executors/frg-freshness.js.map +0 -1
- package/dist-cjs/executors/frg.d.ts +0 -27
- package/dist-cjs/executors/frg.js +0 -335
- package/dist-cjs/executors/frg.js.map +0 -1
- package/dist-cjs/executors/index.d.ts +0 -44
- package/dist-cjs/executors/index.js +0 -144
- package/dist-cjs/executors/index.js.map +0 -1
- package/dist-cjs/executors/learning-meta.d.ts +0 -87
- package/dist-cjs/executors/learning-meta.js +0 -1166
- package/dist-cjs/executors/learning-meta.js.map +0 -1
- package/dist-cjs/executors/lsp-client.d.ts +0 -38
- package/dist-cjs/executors/lsp-client.js +0 -311
- package/dist-cjs/executors/lsp-client.js.map +0 -1
- package/dist-cjs/executors/memory.d.ts +0 -203
- package/dist-cjs/executors/memory.js +0 -797
- package/dist-cjs/executors/memory.js.map +0 -1
- package/dist-cjs/executors/meta.d.ts +0 -73
- package/dist-cjs/executors/meta.js +0 -227
- package/dist-cjs/executors/meta.js.map +0 -1
- package/dist-cjs/executors/process-registry.d.ts +0 -98
- package/dist-cjs/executors/process-registry.js +0 -470
- package/dist-cjs/executors/process-registry.js.map +0 -1
- package/dist-cjs/executors/pty-session-store.d.ts +0 -14
- package/dist-cjs/executors/pty-session-store.js +0 -35
- package/dist-cjs/executors/pty-session-store.js.map +0 -1
- package/dist-cjs/executors/pty.d.ts +0 -133
- package/dist-cjs/executors/pty.js +0 -313
- package/dist-cjs/executors/pty.js.map +0 -1
- package/dist-cjs/executors/restart.d.ts +0 -13
- package/dist-cjs/executors/restart.js +0 -156
- package/dist-cjs/executors/restart.js.map +0 -1
- package/dist-cjs/executors/search-freshness.d.ts +0 -50
- package/dist-cjs/executors/search-freshness.js +0 -235
- package/dist-cjs/executors/search-freshness.js.map +0 -1
- package/dist-cjs/executors/search-types.d.ts +0 -52
- package/dist-cjs/executors/search-types.js +0 -57
- package/dist-cjs/executors/search-types.js.map +0 -1
- package/dist-cjs/executors/search.d.ts +0 -11
- package/dist-cjs/executors/search.js +0 -103
- package/dist-cjs/executors/search.js.map +0 -1
- package/dist-cjs/executors/self-diagnose.d.ts +0 -89
- package/dist-cjs/executors/self-diagnose.js +0 -435
- package/dist-cjs/executors/self-diagnose.js.map +0 -1
- package/dist-cjs/executors/session-history.d.ts +0 -75
- package/dist-cjs/executors/session-history.js +0 -321
- package/dist-cjs/executors/session-history.js.map +0 -1
- package/dist-cjs/executors/shell-safety.d.ts +0 -27
- package/dist-cjs/executors/shell-safety.js +0 -479
- package/dist-cjs/executors/shell-safety.js.map +0 -1
- package/dist-cjs/executors/shell.d.ts +0 -168
- package/dist-cjs/executors/shell.js +0 -1002
- package/dist-cjs/executors/shell.js.map +0 -1
- package/dist-cjs/executors/utils.d.ts +0 -20
- package/dist-cjs/executors/utils.js +0 -74
- package/dist-cjs/executors/utils.js.map +0 -1
- package/dist-cjs/executors/web.d.ts +0 -89
- package/dist-cjs/executors/web.js +0 -548
- package/dist-cjs/executors/web.js.map +0 -1
- package/dist-cjs/extraction/content-extraction.d.ts +0 -48
- package/dist-cjs/extraction/content-extraction.js +0 -244
- package/dist-cjs/extraction/content-extraction.js.map +0 -1
- package/dist-cjs/extraction/index.d.ts +0 -4
- package/dist-cjs/extraction/index.js +0 -9
- package/dist-cjs/extraction/index.js.map +0 -1
- package/dist-cjs/headless-control-contract.d.ts +0 -3182
- package/dist-cjs/headless-control-contract.js +0 -973
- package/dist-cjs/headless-control-contract.js.map +0 -1
- package/dist-cjs/index.d.ts +0 -62
- package/dist-cjs/index.js +0 -438
- package/dist-cjs/index.js.map +0 -1
- package/dist-cjs/local-control-http-auth.d.ts +0 -2
- package/dist-cjs/local-control-http-auth.js +0 -6
- package/dist-cjs/local-control-http-auth.js.map +0 -1
- package/dist-cjs/mcp/client.d.ts +0 -68
- package/dist-cjs/mcp/client.js +0 -186
- package/dist-cjs/mcp/client.js.map +0 -1
- package/dist-cjs/mcp/connection.d.ts +0 -54
- package/dist-cjs/mcp/connection.js +0 -485
- package/dist-cjs/mcp/connection.js.map +0 -1
- package/dist-cjs/mcp/index.d.ts +0 -10
- package/dist-cjs/mcp/index.js +0 -31
- package/dist-cjs/mcp/index.js.map +0 -1
- package/dist-cjs/mcp/jsonrpc.d.ts +0 -36
- package/dist-cjs/mcp/jsonrpc.js +0 -149
- package/dist-cjs/mcp/jsonrpc.js.map +0 -1
- package/dist-cjs/mcp/types.d.ts +0 -178
- package/dist-cjs/mcp/types.js +0 -9
- package/dist-cjs/mcp/types.js.map +0 -1
- package/dist-cjs/network-control-adapter.d.ts +0 -4
- package/dist-cjs/network-control-adapter.js +0 -78
- package/dist-cjs/network-control-adapter.js.map +0 -1
- package/dist-cjs/network-runtime/address-types.d.ts +0 -201
- package/dist-cjs/network-runtime/address-types.js +0 -169
- package/dist-cjs/network-runtime/address-types.js.map +0 -1
- package/dist-cjs/network-runtime/db-owner-fencing.d.ts +0 -43
- package/dist-cjs/network-runtime/db-owner-fencing.js +0 -77
- package/dist-cjs/network-runtime/db-owner-fencing.js.map +0 -1
- package/dist-cjs/network-runtime/delivery-receipts.d.ts +0 -117
- package/dist-cjs/network-runtime/delivery-receipts.js +0 -277
- package/dist-cjs/network-runtime/delivery-receipts.js.map +0 -1
- package/dist-cjs/network-runtime/direct-endpoint-authority.d.ts +0 -8
- package/dist-cjs/network-runtime/direct-endpoint-authority.js +0 -30
- package/dist-cjs/network-runtime/direct-endpoint-authority.js.map +0 -1
- package/dist-cjs/network-runtime/index.d.ts +0 -24
- package/dist-cjs/network-runtime/index.js +0 -173
- package/dist-cjs/network-runtime/index.js.map +0 -1
- package/dist-cjs/network-runtime/local-control-contract.d.ts +0 -758
- package/dist-cjs/network-runtime/local-control-contract.js +0 -634
- package/dist-cjs/network-runtime/local-control-contract.js.map +0 -1
- package/dist-cjs/network-runtime/node-store-contract.d.ts +0 -49
- package/dist-cjs/network-runtime/node-store-contract.js +0 -39
- package/dist-cjs/network-runtime/node-store-contract.js.map +0 -1
- package/dist-cjs/network-runtime/pair-route-contract.d.ts +0 -100
- package/dist-cjs/network-runtime/pair-route-contract.js +0 -81
- package/dist-cjs/network-runtime/pair-route-contract.js.map +0 -1
- package/dist-cjs/network-runtime/peer-capabilities.d.ts +0 -10
- package/dist-cjs/network-runtime/peer-capabilities.js +0 -38
- package/dist-cjs/network-runtime/peer-capabilities.js.map +0 -1
- package/dist-cjs/network-runtime/peer-principal-ref.d.ts +0 -9
- package/dist-cjs/network-runtime/peer-principal-ref.js +0 -16
- package/dist-cjs/network-runtime/peer-principal-ref.js.map +0 -1
- package/dist-cjs/network-runtime/peer-state-machine.d.ts +0 -70
- package/dist-cjs/network-runtime/peer-state-machine.js +0 -130
- package/dist-cjs/network-runtime/peer-state-machine.js.map +0 -1
- package/dist-cjs/network-runtime/protocol-schemas.d.ts +0 -328
- package/dist-cjs/network-runtime/protocol-schemas.js +0 -213
- package/dist-cjs/network-runtime/protocol-schemas.js.map +0 -1
- package/dist-cjs/network-runtime/runtime-bootstrap-contract.d.ts +0 -81
- package/dist-cjs/network-runtime/runtime-bootstrap-contract.js +0 -64
- package/dist-cjs/network-runtime/runtime-bootstrap-contract.js.map +0 -1
- package/dist-cjs/outlook/desktop-session.d.ts +0 -68
- package/dist-cjs/outlook/desktop-session.js +0 -319
- package/dist-cjs/outlook/desktop-session.js.map +0 -1
- package/dist-cjs/package.json +0 -3
- package/dist-cjs/policy.d.ts +0 -43
- package/dist-cjs/policy.js +0 -156
- package/dist-cjs/policy.js.map +0 -1
- package/dist-cjs/providers/brave.d.ts +0 -10
- package/dist-cjs/providers/brave.js +0 -67
- package/dist-cjs/providers/brave.js.map +0 -1
- package/dist-cjs/providers/duckduckgo.d.ts +0 -18
- package/dist-cjs/providers/duckduckgo.js +0 -181
- package/dist-cjs/providers/duckduckgo.js.map +0 -1
- package/dist-cjs/providers/exa.d.ts +0 -10
- package/dist-cjs/providers/exa.js +0 -68
- package/dist-cjs/providers/exa.js.map +0 -1
- package/dist-cjs/providers/firecrawl.d.ts +0 -10
- package/dist-cjs/providers/firecrawl.js +0 -60
- package/dist-cjs/providers/firecrawl.js.map +0 -1
- package/dist-cjs/providers/index.d.ts +0 -8
- package/dist-cjs/providers/index.js +0 -18
- package/dist-cjs/providers/index.js.map +0 -1
- package/dist-cjs/providers/jina.d.ts +0 -10
- package/dist-cjs/providers/jina.js +0 -54
- package/dist-cjs/providers/jina.js.map +0 -1
- package/dist-cjs/providers/router.d.ts +0 -21
- package/dist-cjs/providers/router.js +0 -101
- package/dist-cjs/providers/router.js.map +0 -1
- package/dist-cjs/providers/search-provider.d.ts +0 -35
- package/dist-cjs/providers/search-provider.js +0 -37
- package/dist-cjs/providers/search-provider.js.map +0 -1
- package/dist-cjs/providers/tavily.d.ts +0 -10
- package/dist-cjs/providers/tavily.js +0 -59
- package/dist-cjs/providers/tavily.js.map +0 -1
- package/dist-cjs/quip/desktop-session.d.ts +0 -69
- package/dist-cjs/quip/desktop-session.js +0 -354
- package/dist-cjs/quip/desktop-session.js.map +0 -1
- package/dist-cjs/registry/index.d.ts +0 -1
- package/dist-cjs/registry/index.js +0 -7
- package/dist-cjs/registry/index.js.map +0 -1
- package/dist-cjs/registry/registry.d.ts +0 -156
- package/dist-cjs/registry/registry.js +0 -762
- package/dist-cjs/registry/registry.js.map +0 -1
- package/dist-cjs/runtime-socket-local-control-client.d.ts +0 -10
- package/dist-cjs/runtime-socket-local-control-client.js +0 -368
- package/dist-cjs/runtime-socket-local-control-client.js.map +0 -1
- package/dist-cjs/security/dns-normalization.d.ts +0 -6
- package/dist-cjs/security/dns-normalization.js +0 -23
- package/dist-cjs/security/dns-normalization.js.map +0 -1
- package/dist-cjs/security/dns-pinning.d.ts +0 -27
- package/dist-cjs/security/dns-pinning.js +0 -161
- package/dist-cjs/security/dns-pinning.js.map +0 -1
- package/dist-cjs/security/external-content.d.ts +0 -40
- package/dist-cjs/security/external-content.js +0 -96
- package/dist-cjs/security/external-content.js.map +0 -1
- package/dist-cjs/security/ssrf.d.ts +0 -40
- package/dist-cjs/security/ssrf.js +0 -222
- package/dist-cjs/security/ssrf.js.map +0 -1
- package/dist-cjs/slack/desktop-session.d.ts +0 -69
- package/dist-cjs/slack/desktop-session.js +0 -367
- package/dist-cjs/slack/desktop-session.js.map +0 -1
- package/dist-cjs/tool-factory.d.ts +0 -46
- package/dist-cjs/tool-factory.js +0 -51
- package/dist-cjs/tool-factory.js.map +0 -1
- package/dist-cjs/types.d.ts +0 -1192
- package/dist-cjs/types.js +0 -9
- package/dist-cjs/types.js.map +0 -1
- package/dist-cjs/utils/retry.d.ts +0 -11
- package/dist-cjs/utils/retry.js +0 -170
- package/dist-cjs/utils/retry.js.map +0 -1
- package/dist-cjs/utils/safe-parse-json.d.ts +0 -26
- package/dist-cjs/utils/safe-parse-json.js +0 -165
- package/dist-cjs/utils/safe-parse-json.js.map +0 -1
- package/dist-cjs/utils/url.d.ts +0 -10
- package/dist-cjs/utils/url.js +0 -24
- package/dist-cjs/utils/url.js.map +0 -1
- package/src/__tests__/web-fetch-download.test.ts +0 -433
- package/src/__tests__/web-tools.test.ts +0 -619
- package/src/ask-user-interaction.ts +0 -33
- package/src/cache/web-cache.ts +0 -110
- package/src/definitions/arion.ts +0 -118
- package/src/definitions/browser/browser.ts +0 -502
- package/src/definitions/browser/index.ts +0 -5
- package/src/definitions/browser/pw-downloads.ts +0 -142
- package/src/definitions/browser/pw-interactions.ts +0 -282
- package/src/definitions/browser/pw-responses.ts +0 -98
- package/src/definitions/browser/pw-session.ts +0 -405
- package/src/definitions/browser/pw-shared.ts +0 -85
- package/src/definitions/browser/pw-snapshot.ts +0 -383
- package/src/definitions/browser/pw-state.ts +0 -101
- package/src/definitions/browser/types.ts +0 -203
- package/src/definitions/code-intelligence.ts +0 -526
- package/src/definitions/core.ts +0 -118
- package/src/definitions/delegation.ts +0 -567
- package/src/definitions/deploy.ts +0 -73
- package/src/definitions/filesystem.ts +0 -217
- package/src/definitions/frg.ts +0 -67
- package/src/definitions/index.ts +0 -28
- package/src/definitions/memory.ts +0 -150
- package/src/definitions/messaging.ts +0 -734
- package/src/definitions/meta.ts +0 -392
- package/src/definitions/network.ts +0 -179
- package/src/definitions/outlook.ts +0 -318
- package/src/definitions/patch/apply-patch.ts +0 -235
- package/src/definitions/patch/fuzzy-match.ts +0 -217
- package/src/definitions/patch/index.ts +0 -1
- package/src/definitions/patch/patch-parser.ts +0 -297
- package/src/definitions/patch/sandbox-paths.ts +0 -129
- package/src/definitions/process/index.ts +0 -5
- package/src/definitions/process/process-registry.ts +0 -303
- package/src/definitions/process/process.ts +0 -456
- package/src/definitions/process/pty-keys.ts +0 -298
- package/src/definitions/process/session-slug.ts +0 -147
- package/src/definitions/quip.ts +0 -225
- package/src/definitions/search.ts +0 -67
- package/src/definitions/session-history.ts +0 -79
- package/src/definitions/shell.ts +0 -202
- package/src/definitions/slack.ts +0 -211
- package/src/definitions/web.ts +0 -119
- package/src/executors/apply-patch.ts +0 -1035
- package/src/executors/arion.ts +0 -199
- package/src/executors/code-intelligence.ts +0 -1179
- package/src/executors/deploy.ts +0 -1066
- package/src/executors/filesystem.ts +0 -1428
- package/src/executors/frg-freshness.ts +0 -743
- package/src/executors/frg.ts +0 -394
- package/src/executors/index.ts +0 -280
- package/src/executors/learning-meta.ts +0 -1367
- package/src/executors/lsp-client.ts +0 -355
- package/src/executors/memory.ts +0 -978
- package/src/executors/meta.ts +0 -293
- package/src/executors/process-registry.ts +0 -570
- package/src/executors/pty-session-store.ts +0 -43
- package/src/executors/pty.ts +0 -342
- package/src/executors/restart.ts +0 -133
- package/src/executors/search-freshness.ts +0 -249
- package/src/executors/search-types.ts +0 -98
- package/src/executors/search.ts +0 -89
- package/src/executors/self-diagnose.ts +0 -552
- package/src/executors/session-history.ts +0 -435
- package/src/executors/shell-safety.ts +0 -519
- package/src/executors/shell.ts +0 -1243
- package/src/executors/utils.ts +0 -40
- package/src/executors/web.ts +0 -786
- package/src/extraction/content-extraction.ts +0 -281
- package/src/extraction/index.ts +0 -5
- package/src/headless-control-contract.ts +0 -1149
- package/src/index.ts +0 -788
- package/src/local-control-http-auth.ts +0 -2
- package/src/mcp/client.ts +0 -218
- package/src/mcp/connection.ts +0 -568
- package/src/mcp/index.ts +0 -11
- package/src/mcp/jsonrpc.ts +0 -195
- package/src/mcp/types.ts +0 -199
- package/src/network-control-adapter.ts +0 -88
- package/src/network-runtime/address-types.ts +0 -218
- package/src/network-runtime/db-owner-fencing.ts +0 -91
- package/src/network-runtime/delivery-receipts.ts +0 -372
- package/src/network-runtime/direct-endpoint-authority.ts +0 -35
- package/src/network-runtime/index.ts +0 -316
- package/src/network-runtime/local-control-contract.ts +0 -784
- package/src/network-runtime/node-store-contract.ts +0 -46
- package/src/network-runtime/pair-route-contract.ts +0 -97
- package/src/network-runtime/peer-capabilities.ts +0 -48
- package/src/network-runtime/peer-principal-ref.ts +0 -20
- package/src/network-runtime/peer-state-machine.ts +0 -160
- package/src/network-runtime/protocol-schemas.ts +0 -265
- package/src/network-runtime/runtime-bootstrap-contract.ts +0 -83
- package/src/outlook/desktop-session.ts +0 -409
- package/src/policy.ts +0 -171
- package/src/providers/brave.ts +0 -80
- package/src/providers/duckduckgo.ts +0 -199
- package/src/providers/exa.ts +0 -85
- package/src/providers/firecrawl.ts +0 -77
- package/src/providers/index.ts +0 -8
- package/src/providers/jina.ts +0 -70
- package/src/providers/router.ts +0 -121
- package/src/providers/search-provider.ts +0 -74
- package/src/providers/tavily.ts +0 -74
- package/src/quip/desktop-session.ts +0 -435
- package/src/registry/index.ts +0 -1
- package/src/registry/registry.ts +0 -905
- package/src/runtime-socket-local-control-client.ts +0 -632
- package/src/security/dns-normalization.ts +0 -34
- package/src/security/dns-pinning.ts +0 -138
- package/src/security/external-content.ts +0 -129
- package/src/security/ssrf.ts +0 -207
- package/src/slack/desktop-session.ts +0 -493
- package/src/tool-factory.ts +0 -91
- package/src/types.ts +0 -1341
- package/src/utils/retry.ts +0 -163
- package/src/utils/safe-parse-json.ts +0 -176
- package/src/utils/url.ts +0 -20
- package/tests/benchmarks/registry.bench.ts +0 -57
- package/tests/cache/web-cache.test.ts +0 -147
- package/tests/critical-integration.test.ts +0 -1465
- package/tests/definitions/apply-patch.test.ts +0 -586
- package/tests/definitions/browser.test.ts +0 -495
- package/tests/definitions/delegation-pause-resume.test.ts +0 -758
- package/tests/definitions/execution.test.ts +0 -671
- package/tests/definitions/messaging-inbox-scope.test.ts +0 -229
- package/tests/definitions/messaging.test.ts +0 -1468
- package/tests/definitions/outlook.test.ts +0 -30
- package/tests/definitions/process.test.ts +0 -469
- package/tests/definitions/slack.test.ts +0 -28
- package/tests/definitions/tool-inventory.test.ts +0 -218
- package/tests/e2e/delegation-quest-orchestration.e2e.test.ts +0 -433
- package/tests/e2e/memory-tool-discovery-contract.e2e.test.ts +0 -81
- package/tests/executors/apply-patch.test.ts +0 -538
- package/tests/executors/arion.test.ts +0 -309
- package/tests/executors/conversation-primitives.test.ts +0 -250
- package/tests/executors/deploy.test.ts +0 -746
- package/tests/executors/filesystem-tools.test.ts +0 -357
- package/tests/executors/filesystem.test.ts +0 -959
- package/tests/executors/frg-freshness.test.ts +0 -136
- package/tests/executors/frg-merge.test.ts +0 -70
- package/tests/executors/frg-session-content.test.ts +0 -40
- package/tests/executors/frg.test.ts +0 -56
- package/tests/executors/memory-bugfixes.test.ts +0 -257
- package/tests/executors/memory-real-memoria.integration.test.ts +0 -316
- package/tests/executors/memory.test.ts +0 -853
- package/tests/executors/meta-tools.test.ts +0 -411
- package/tests/executors/meta.test.ts +0 -683
- package/tests/executors/path-containment.test.ts +0 -51
- package/tests/executors/process-registry.test.ts +0 -505
- package/tests/executors/pty.test.ts +0 -664
- package/tests/executors/quest-security.test.ts +0 -249
- package/tests/executors/read-file-media.test.ts +0 -230
- package/tests/executors/recall-knowledge-schema.test.ts +0 -209
- package/tests/executors/recall-tags.test.ts +0 -278
- package/tests/executors/remember-null-safety.contract.test.ts +0 -41
- package/tests/executors/restart.test.ts +0 -67
- package/tests/executors/search-unified.test.ts +0 -381
- package/tests/executors/session-history.test.ts +0 -340
- package/tests/executors/session-transcript.test.ts +0 -561
- package/tests/executors/shell-abort.test.ts +0 -416
- package/tests/executors/shell-env-blocklist.test.ts +0 -648
- package/tests/executors/shell-env-process.test.ts +0 -245
- package/tests/executors/shell-process-registry.test.ts +0 -334
- package/tests/executors/shell-tools.test.ts +0 -393
- package/tests/executors/shell.test.ts +0 -690
- package/tests/executors/web-abort-vs-timeout.test.ts +0 -213
- package/tests/executors/web-integration.test.ts +0 -633
- package/tests/executors/web-symlink.test.ts +0 -18
- package/tests/executors/web.test.ts +0 -1400
- package/tests/executors/write-stdin.test.ts +0 -145
- package/tests/extraction/content-extraction.test.ts +0 -153
- package/tests/guards/tools-default-test-lane.integration.test.ts +0 -21
- package/tests/guards/tools-package-test-commands.e2e.test.ts +0 -43
- package/tests/guards/tools-test-lane-manifest.contract.test.ts +0 -76
- package/tests/guards/tools-vitest-workspace-alias.contract.test.ts +0 -63
- package/tests/helpers/async-waits.ts +0 -53
- package/tests/integration/headless-control-contract.integration.test.ts +0 -153
- package/tests/integration/memory-tool-schema-parity.integration.test.ts +0 -67
- package/tests/integration/meta-tools-round-trip.integration.test.ts +0 -506
- package/tests/integration/quest-round-trip.test.ts +0 -303
- package/tests/integration/registry-executor-flow.test.ts +0 -85
- package/tests/integration.test.ts +0 -177
- package/tests/loading-tier.test.ts +0 -126
- package/tests/mcp/client-reconnect.test.ts +0 -267
- package/tests/mcp/connection.test.ts +0 -846
- package/tests/mcp/injectable-logger.test.ts +0 -83
- package/tests/mcp/jsonrpc.test.ts +0 -109
- package/tests/mcp/lifecycle.test.ts +0 -879
- package/tests/network-runtime/address-types.contract.test.ts +0 -143
- package/tests/network-runtime/continuity-bind-schema.contract.test.ts +0 -203
- package/tests/network-runtime/local-control-contract.test.ts +0 -869
- package/tests/network-runtime/local-control-invite-token.contract.test.ts +0 -146
- package/tests/network-runtime/node-store-contract.test.ts +0 -11
- package/tests/network-runtime/pair-protocol-nodeid.contract.test.ts +0 -15
- package/tests/network-runtime/peer-state-machine.contract.test.ts +0 -148
- package/tests/network-runtime/protocol-schemas.contract.test.ts +0 -512
- package/tests/network-runtime/relay-pending-nodeid.contract.test.ts +0 -62
- package/tests/network-runtime/runtime-bootstrap-contract.test.ts +0 -227
- package/tests/network-runtime/runtime-socket-local-control-client.test.ts +0 -621
- package/tests/network-runtime/wait-for-message-script.test.ts +0 -288
- package/tests/parallel.test.ts +0 -71
- package/tests/policy.test.ts +0 -184
- package/tests/print-default-test-lane.ts +0 -14
- package/tests/print-test-lane-manifest.ts +0 -22
- package/tests/providers/brave.test.ts +0 -159
- package/tests/providers/duckduckgo.test.ts +0 -207
- package/tests/providers/exa.test.ts +0 -175
- package/tests/providers/firecrawl.test.ts +0 -168
- package/tests/providers/jina.test.ts +0 -144
- package/tests/providers/router.test.ts +0 -328
- package/tests/providers/tavily.test.ts +0 -165
- package/tests/registry/discovery.test.ts +0 -154
- package/tests/registry/injectable-logger.test.ts +0 -230
- package/tests/registry/input-validation.test.ts +0 -361
- package/tests/registry/interface-completeness.test.ts +0 -85
- package/tests/registry/mcp-integration.test.ts +0 -103
- package/tests/registry/mcp-read-only-hint.test.ts +0 -60
- package/tests/registry/memoria-discovery.test.ts +0 -390
- package/tests/registry/nested-validation.test.ts +0 -283
- package/tests/registry/pseudo-tool-filtering.test.ts +0 -258
- package/tests/registry/registration-lifecycle.test.ts +0 -133
- package/tests/registry-validation.test.ts +0 -424
- package/tests/registry.test.ts +0 -460
- package/tests/security/dns-pinning.test.ts +0 -162
- package/tests/security/external-content.test.ts +0 -144
- package/tests/security/ssrf.test.ts +0 -118
- package/tests/shell-safety-integration.test.ts +0 -32
- package/tests/shell-safety.test.ts +0 -365
- package/tests/slack/desktop-session.test.ts +0 -50
- package/tests/test-lane-manifest.ts +0 -440
- package/tests/test-utils.ts +0 -27
- package/tests/tool-factory.test.ts +0 -188
- package/tests/utils/retry.test.ts +0 -231
- package/tests/utils/url.test.ts +0 -63
- package/tsconfig.cjs.json +0 -24
- package/tsconfig.json +0 -12
- package/vitest.config.ts +0 -55
- package/vitest.e2e.config.ts +0 -24
- package/vitest.integration.config.ts +0 -24
- package/vitest.native.config.ts +0 -24
package/dist-cjs/types.d.ts
DELETED
|
@@ -1,1192 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @aria/tools - Tool system types
|
|
3
|
-
*
|
|
4
|
-
* Unified tool interface for all ARIA tools.
|
|
5
|
-
* All tools are LLM-callable with optional user confirmation.
|
|
6
|
-
*/
|
|
7
|
-
import type { JSONSchema7 } from "json-schema";
|
|
8
|
-
import type { IMemoria } from "@aria-cli/types";
|
|
9
|
-
import type { CanonicalDeliveryReceipt as CanonicalDeliveryReceiptShape, ClientId, ControlEndpointAdvertisement, DeliveryAck, DurableDeliveryHandle, DurableDeliveryResult, DurableSubmitResult, InboxAddress, NodeId, PeerIdentityState, PrincipalFingerprint, PeerTransportId, SigningPublicKey, PeerTransportState, RuntimeEvent, RuntimeId, TlsCaFingerprint, RuntimeBootstrapIdentity as RuntimeBootstrapIdentityShape, RuntimeBootstrapRecord as RuntimeBootstrapRecordShape, RuntimeBootstrapPhase as RuntimeBootstrapPhaseShape } from "./network-runtime/index.js";
|
|
10
|
-
import type { AcceptInviteRequest as AcceptInviteRequestShape, AcceptInviteResponse as AcceptInviteResponseShape, AcceptInviteTokenRequest as AcceptInviteTokenRequestShape, AcceptInviteTokenResponse as AcceptInviteTokenResponseShape, CancelInviteRequest as CancelInviteRequestShape, CancelInviteResponse as CancelInviteResponseShape, CreateInviteRequest as CreateInviteRequestShape, CreateInviteResponse as CreateInviteResponseShape, DirectPairRequest as DirectPairRequestShape, DirectPairResponse as DirectPairResponseShape, InboxCursor as InboxCursorShape, InboxListRequest as InboxListRequestShape, InvitePeerRequest as InvitePeerRequestShape, InvitePeerResult as InvitePeerResultShape, AttachedClientAuth as AttachedClientAuthShape, AttachedClientLeaseGrant as AttachedClientLeaseGrantShape, AttachedClientView as AttachedClientViewShape, LocalControlClientKind as LocalControlClientKindShape, OutboundMessage as OutboundMessageShape, PairRequestDecision as PairRequestDecisionShape, PairRequestResponse as PairRequestResponseShape, NearbyPeerView as NearbyPeerViewShape, PendingInviteView as PendingInviteViewShape, PendingPairRequestView as PendingPairRequestViewShape, PeerViewEvent as PeerViewEventShape, PersistedInboxEvent as PersistedInboxEventShape, RepairPeerRequest as RepairPeerRequestShape, RepairPeerResponse as RepairPeerResponseShape, RevokePeerRequest as RevokePeerRequestShape, RevokePeerResponse as RevokePeerResponseShape, ResumeRunRequest as ResumeRunRequestShape, RuntimeAutonomousLoopCommand as RuntimeAutonomousLoopCommandShape, RuntimeErrorDiagnostic as RuntimeErrorDiagnosticShape, RuntimeEventCursor as RuntimeEventCursorShape, RuntimeRunEvent as RuntimeRunEventShape, RunRequest as RunRequestShape, RunResult as RunResultShape, RuntimeDeliveryReceipt as RuntimeDeliveryReceiptShape, RuntimeQueuedReceipt as RuntimeQueuedReceiptShape, RuntimeStatus as RuntimeStatusShape } from "./network-runtime/local-control-contract.js";
|
|
11
|
-
/** Risk levels for auto-approval decisions */
|
|
12
|
-
export type RiskLevel = "safe" | "moderate" | "dangerous";
|
|
13
|
-
/** Tool loading tier for TTFT optimization */
|
|
14
|
-
export type LoadingTier = "always" | "deferred";
|
|
15
|
-
/** Tool categories */
|
|
16
|
-
export type ToolCategory = "filesystem" | "code" | "shell" | "web" | "data" | "memory" | "arion" | "messaging" | "meta";
|
|
17
|
-
/**
|
|
18
|
-
* Minimal arion interface for tool context.
|
|
19
|
-
* Full Arion type is in @aria/aria to avoid circular deps.
|
|
20
|
-
*/
|
|
21
|
-
export interface ArionRef {
|
|
22
|
-
id: string;
|
|
23
|
-
name: string;
|
|
24
|
-
emoji: string;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Minimal arion manager interface for tool context.
|
|
28
|
-
*/
|
|
29
|
-
export interface ArionManagerRef {
|
|
30
|
-
hatch(config: unknown): Promise<ArionRef>;
|
|
31
|
-
getMemoria?(arion: ArionRef): Promise<IMemoria | null>;
|
|
32
|
-
rest(name: string): Promise<void>;
|
|
33
|
-
wake(name: string): Promise<void>;
|
|
34
|
-
retire(name: string, options: {
|
|
35
|
-
confirm: boolean;
|
|
36
|
-
}): Promise<void>;
|
|
37
|
-
get(name: string): Promise<ArionRef | null>;
|
|
38
|
-
list(): Promise<ArionRef[]>;
|
|
39
|
-
evolveSkills?(name: string, changes: {
|
|
40
|
-
addSkills?: Array<{
|
|
41
|
-
name: string;
|
|
42
|
-
level: "beginner" | "intermediate" | "advanced" | "expert";
|
|
43
|
-
description?: string;
|
|
44
|
-
skillId?: string;
|
|
45
|
-
}>;
|
|
46
|
-
removeSkills?: string[];
|
|
47
|
-
addAgentSkills?: string[];
|
|
48
|
-
removeAgentSkills?: string[];
|
|
49
|
-
upgradeSkillLevel?: {
|
|
50
|
-
name: string;
|
|
51
|
-
level: "beginner" | "intermediate" | "advanced" | "expert";
|
|
52
|
-
};
|
|
53
|
-
}): Promise<ArionRef>;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Minimal interface for tracking spawned process PIDs.
|
|
57
|
-
* The concrete implementation is SpawnedProcessRegistry in executors/process-registry.ts.
|
|
58
|
-
*/
|
|
59
|
-
export interface ProcessMetadataRef {
|
|
60
|
-
command?: string;
|
|
61
|
-
args?: string[];
|
|
62
|
-
cwd?: string;
|
|
63
|
-
interactive?: boolean;
|
|
64
|
-
}
|
|
65
|
-
export interface ProcessExitMetadataRef {
|
|
66
|
-
exitCode?: number | null;
|
|
67
|
-
signal?: string | null;
|
|
68
|
-
}
|
|
69
|
-
export interface ProcessInfoRef {
|
|
70
|
-
pid: number;
|
|
71
|
-
command: string | null;
|
|
72
|
-
args: string[];
|
|
73
|
-
cwd: string | null;
|
|
74
|
-
interactive: boolean;
|
|
75
|
-
startedAt: string;
|
|
76
|
-
runtimeMs: number;
|
|
77
|
-
status: "running" | "exited";
|
|
78
|
-
exitCode: number | null;
|
|
79
|
-
signal: string | null;
|
|
80
|
-
endedAt: string | null;
|
|
81
|
-
}
|
|
82
|
-
export interface WaitProcessResultRef {
|
|
83
|
-
pid: number;
|
|
84
|
-
status: "running" | "exited" | "not_found";
|
|
85
|
-
timedOut: boolean;
|
|
86
|
-
process?: ProcessInfoRef;
|
|
87
|
-
}
|
|
88
|
-
export interface ProcessRegistryRef {
|
|
89
|
-
add(pid: number, metadata?: ProcessMetadataRef): void;
|
|
90
|
-
remove(pid: number, exit?: ProcessExitMetadataRef): void;
|
|
91
|
-
recordExitMetadata?(pid: number, exit?: ProcessExitMetadataRef): void;
|
|
92
|
-
has(pid: number): boolean;
|
|
93
|
-
killAll(): Promise<number[]>;
|
|
94
|
-
listProcesses?(options?: {
|
|
95
|
-
includeExited?: boolean;
|
|
96
|
-
}): ProcessInfoRef[];
|
|
97
|
-
getProcess?(pid: number): ProcessInfoRef | undefined;
|
|
98
|
-
waitForExit?(pid: number, timeoutMs?: number): Promise<WaitProcessResultRef>;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Minimal interface for managing PTY sessions (interactive process I/O).
|
|
102
|
-
* The concrete implementation is PTYSessionStore in executors/pty-session-store.ts.
|
|
103
|
-
* Uses `unknown` return type to avoid circular dependency on PTYSession.
|
|
104
|
-
*/
|
|
105
|
-
export interface PTYSessionStoreRef {
|
|
106
|
-
add(pid: number, session: unknown): void;
|
|
107
|
-
get(pid: number): unknown | undefined;
|
|
108
|
-
has(pid: number): boolean;
|
|
109
|
-
remove(pid: number): void;
|
|
110
|
-
closeAll(): Promise<void>;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Minimal delegation registry interface for tool context.
|
|
114
|
-
* The concrete implementation is DelegationRegistry in @aria/aria.
|
|
115
|
-
*/
|
|
116
|
-
export interface DelegationRegistryRef {
|
|
117
|
-
/** Get entry by ID (accepts both quest_xxx and del_xxx). */
|
|
118
|
-
get(id: string): DelegationEntryRef | undefined;
|
|
119
|
-
await(id: string, timeoutMs?: number): Promise<DelegationEntryRef>;
|
|
120
|
-
list(): DelegationEntryRef[];
|
|
121
|
-
/** Abort a single delegation by ID. Sets status to "aborted" and signals the AbortController. */
|
|
122
|
-
abort(id: string): boolean;
|
|
123
|
-
}
|
|
124
|
-
/** Read-only view of a delegation entry for tools */
|
|
125
|
-
export interface DelegationEntryRef {
|
|
126
|
-
/** Quest ID (quest_xxx) when QuestStore available, otherwise ephemeral del_xxx */
|
|
127
|
-
id: string;
|
|
128
|
-
type: "arion" | "worker" | "cli_agent" | "remote_peer";
|
|
129
|
-
arionName?: string;
|
|
130
|
-
/** Stable remote node identity for remote delegations */
|
|
131
|
-
remoteNodeId?: NodeId;
|
|
132
|
-
/** Display name snapshot of the remote peer for remote delegations */
|
|
133
|
-
remoteDisplayNameSnapshot?: string;
|
|
134
|
-
task: string;
|
|
135
|
-
status: "running" | "completed" | "failed" | "aborted";
|
|
136
|
-
result?: string;
|
|
137
|
-
error?: string;
|
|
138
|
-
metadata?: {
|
|
139
|
-
driver?: string;
|
|
140
|
-
sessionId?: string | null;
|
|
141
|
-
worktreePath?: string | null;
|
|
142
|
-
worktreeBranch?: string | null;
|
|
143
|
-
exitCode?: number | null;
|
|
144
|
-
durationMs?: number;
|
|
145
|
-
filesChanged?: string[];
|
|
146
|
-
tests?: {
|
|
147
|
-
ran?: number;
|
|
148
|
-
passed?: number;
|
|
149
|
-
failed?: number;
|
|
150
|
-
};
|
|
151
|
-
truncatedOutput?: boolean;
|
|
152
|
-
workspace?: "cwd" | "tempdir" | "worktree";
|
|
153
|
-
model?: string;
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Delegation executor interface for tool context.
|
|
158
|
-
* Starts async delegations (arion or worker) and returns delegation IDs.
|
|
159
|
-
* The concrete implementation lives in @aria/aria to avoid circular deps.
|
|
160
|
-
*/
|
|
161
|
-
export interface DelegationExecutorRef {
|
|
162
|
-
/** Delegate a task to a named arion. Returns delegation ID. */
|
|
163
|
-
delegateToArion(arionName: string, task: string, tier?: string): Promise<string>;
|
|
164
|
-
/** Spawn a lightweight worker (no memory/persona). Returns delegation ID. */
|
|
165
|
-
spawnWorker(task: string, tools?: string[], tier?: string): Promise<string>;
|
|
166
|
-
/** Spawn a CLI agent (Claude Code, Codex, etc.) as an external process. Returns delegation ID. */
|
|
167
|
-
spawnCliAgent(params: {
|
|
168
|
-
task: string;
|
|
169
|
-
driver: string;
|
|
170
|
-
workspace?: "cwd" | "tempdir" | "worktree";
|
|
171
|
-
model?: string;
|
|
172
|
-
resume?: string;
|
|
173
|
-
timeout?: number;
|
|
174
|
-
}): Promise<string>;
|
|
175
|
-
/** Delegate a task to a remote peer principal via WireGuard tunnel. Returns delegation ID. */
|
|
176
|
-
delegateToRemote?(nodeId: NodeId, task: string, tier?: string): Promise<string>;
|
|
177
|
-
/** Resolve a pending remote delegation by quest ID. Returns true if a matching pending delegation was found. */
|
|
178
|
-
resolveRemoteDelegation?(questId: string, result: string, senderNodeId?: NodeId): boolean;
|
|
179
|
-
/** Fail a pending remote delegation by quest ID. Returns true if a matching pending delegation was found. */
|
|
180
|
-
failRemoteDelegation?(questId: string, error: string, senderNodeId?: NodeId): boolean;
|
|
181
|
-
/** H3e: Fan out a hard problem to N diverse peers, collect results, synthesize consensus. */
|
|
182
|
-
deliberate?(task: string, config?: {
|
|
183
|
-
peerCount?: number;
|
|
184
|
-
maxBudgetUsd?: number;
|
|
185
|
-
timeoutMs?: number;
|
|
186
|
-
}): Promise<{
|
|
187
|
-
questId: string;
|
|
188
|
-
contributions: Array<{
|
|
189
|
-
nodeId: NodeId;
|
|
190
|
-
displayName: string;
|
|
191
|
-
result: string;
|
|
192
|
-
confidence: number;
|
|
193
|
-
}>;
|
|
194
|
-
consensusFindings: string[];
|
|
195
|
-
conflicts: string[];
|
|
196
|
-
confidence: number;
|
|
197
|
-
consensusReached: boolean;
|
|
198
|
-
selectedResult?: string;
|
|
199
|
-
}>;
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* Minimal model router interface for tool context.
|
|
203
|
-
*/
|
|
204
|
-
export interface ModelRouterRef {
|
|
205
|
-
chat(request: {
|
|
206
|
-
messages: Array<{
|
|
207
|
-
role: string;
|
|
208
|
-
content: string;
|
|
209
|
-
}>;
|
|
210
|
-
temperature?: number;
|
|
211
|
-
/** Hint for model tier — prevents thinking models from exhausting token budget */
|
|
212
|
-
tier?: string;
|
|
213
|
-
}): Promise<{
|
|
214
|
-
content: string;
|
|
215
|
-
}>;
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* Active provider context for tools that need provider-aware behavior.
|
|
219
|
-
*/
|
|
220
|
-
export interface ProviderContext {
|
|
221
|
-
/** Provider name */
|
|
222
|
-
name: string;
|
|
223
|
-
/** Capabilities the provider supports */
|
|
224
|
-
capabilities: import("@aria-cli/types").ProviderCapabilities;
|
|
225
|
-
}
|
|
226
|
-
/** Quest status values — must match QuestStatus in @aria/memoria/storage/quest-store.ts */
|
|
227
|
-
export type QuestStoreStatus = "open" | "active" | "blocked" | "done";
|
|
228
|
-
/** Lightweight quest item — subset of Quest fields used by tool executors */
|
|
229
|
-
export interface QuestStoreItem {
|
|
230
|
-
id: string;
|
|
231
|
-
title: string;
|
|
232
|
-
description?: string;
|
|
233
|
-
priority: number;
|
|
234
|
-
status: QuestStoreStatus;
|
|
235
|
-
progress: string;
|
|
236
|
-
blockedBy?: string;
|
|
237
|
-
attempts: number;
|
|
238
|
-
remoteParentQuestId?: string;
|
|
239
|
-
remoteSenderDisplayName?: string;
|
|
240
|
-
remoteSenderNodeId?: NodeId;
|
|
241
|
-
createdAt: number;
|
|
242
|
-
updatedAt: number;
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* Minimal quest store interface for tool context.
|
|
246
|
-
* The concrete implementation is QuestStore in @aria/memoria.
|
|
247
|
-
*/
|
|
248
|
-
export interface QuestStoreRef {
|
|
249
|
-
createQuest(input: {
|
|
250
|
-
id: string;
|
|
251
|
-
title: string;
|
|
252
|
-
description?: string;
|
|
253
|
-
priority?: number;
|
|
254
|
-
status?: QuestStoreStatus;
|
|
255
|
-
progress?: string;
|
|
256
|
-
blockedBy?: string;
|
|
257
|
-
remoteParentQuestId?: string;
|
|
258
|
-
remoteSenderDisplayName?: string;
|
|
259
|
-
remoteSenderNodeId?: NodeId;
|
|
260
|
-
}): QuestStoreItem;
|
|
261
|
-
updateQuest(id: string, updates: Partial<{
|
|
262
|
-
title: string;
|
|
263
|
-
description: string;
|
|
264
|
-
priority: number;
|
|
265
|
-
status: QuestStoreStatus;
|
|
266
|
-
progress: string;
|
|
267
|
-
blockedBy: string;
|
|
268
|
-
remoteParentQuestId: string;
|
|
269
|
-
remoteSenderDisplayName: string;
|
|
270
|
-
remoteSenderNodeId: NodeId;
|
|
271
|
-
}>): QuestStoreItem;
|
|
272
|
-
getQuest(id: string): QuestStoreItem | null;
|
|
273
|
-
listQuests(filter?: {
|
|
274
|
-
status?: string;
|
|
275
|
-
}): QuestStoreItem[];
|
|
276
|
-
getQuestTree?(rootId: string): QuestStoreItem[];
|
|
277
|
-
getDescendants?(questId: string): QuestStoreItem[];
|
|
278
|
-
getAncestors?(questId: string): QuestStoreItem[];
|
|
279
|
-
rollupStatus?(questId: string): QuestStoreStatus;
|
|
280
|
-
createMilestone?(input: {
|
|
281
|
-
id: string;
|
|
282
|
-
title: string;
|
|
283
|
-
description?: string;
|
|
284
|
-
dueAt?: number;
|
|
285
|
-
}): unknown;
|
|
286
|
-
listMilestones?(filter?: {
|
|
287
|
-
status?: string;
|
|
288
|
-
}): unknown[];
|
|
289
|
-
addDependency?(questId: string, dependsOn: string): void;
|
|
290
|
-
removeDependency?(questId: string, dependsOn: string): void;
|
|
291
|
-
getDependencies?(questId: string): unknown[];
|
|
292
|
-
getChangelog?(questId: string, limit?: number): unknown[];
|
|
293
|
-
/** Create a checkpoint for quest progress tracking */
|
|
294
|
-
createCheckpoint?(input: {
|
|
295
|
-
questId: string;
|
|
296
|
-
turn: number;
|
|
297
|
-
progress?: string;
|
|
298
|
-
filesTouched?: string[];
|
|
299
|
-
decisions?: string[];
|
|
300
|
-
nextSteps?: string[];
|
|
301
|
-
errorsEncountered?: string[];
|
|
302
|
-
}): unknown;
|
|
303
|
-
}
|
|
304
|
-
export interface RunRequest extends RunRequestShape {
|
|
305
|
-
}
|
|
306
|
-
export interface RunResult extends RunResultShape {
|
|
307
|
-
}
|
|
308
|
-
export interface ResumeRunRequest extends ResumeRunRequestShape {
|
|
309
|
-
}
|
|
310
|
-
export interface RuntimeErrorDiagnostic extends RuntimeErrorDiagnosticShape {
|
|
311
|
-
}
|
|
312
|
-
export type RuntimeRunEvent = RuntimeRunEventShape;
|
|
313
|
-
export interface RunHandle {
|
|
314
|
-
runId: string;
|
|
315
|
-
wait(): Promise<RunResult>;
|
|
316
|
-
}
|
|
317
|
-
export interface QueuedReceipt extends RuntimeQueuedReceiptShape {
|
|
318
|
-
}
|
|
319
|
-
export interface RuntimeQueuedReceipt extends QueuedReceipt {
|
|
320
|
-
}
|
|
321
|
-
export interface RuntimeDeliveryReceipt extends RuntimeDeliveryReceiptShape {
|
|
322
|
-
storedAt?: number;
|
|
323
|
-
}
|
|
324
|
-
export interface OutboundMessage extends OutboundMessageShape {
|
|
325
|
-
}
|
|
326
|
-
export interface InboxCursor extends InboxCursorShape {
|
|
327
|
-
}
|
|
328
|
-
export interface InboxListRequest extends InboxListRequestShape {
|
|
329
|
-
}
|
|
330
|
-
export interface PersistedInboxEvent extends PersistedInboxEventShape {
|
|
331
|
-
}
|
|
332
|
-
export interface PeerViewEvent extends PeerViewEventShape {
|
|
333
|
-
nodeId: NodeId;
|
|
334
|
-
transportPublicKey: PeerTransportId;
|
|
335
|
-
identityState: PeerIdentityState;
|
|
336
|
-
transportState: PeerTransportState;
|
|
337
|
-
endpointRevision: number;
|
|
338
|
-
updatedAt: string;
|
|
339
|
-
}
|
|
340
|
-
export interface NearbyPeerView extends NearbyPeerViewShape {
|
|
341
|
-
nodeId: NodeId;
|
|
342
|
-
principalFingerprint: PrincipalFingerprint;
|
|
343
|
-
}
|
|
344
|
-
export interface RuntimeStatus extends RuntimeStatusShape {
|
|
345
|
-
nodeId: NodeId;
|
|
346
|
-
runtimeId: RuntimeId;
|
|
347
|
-
attachedClients?: number;
|
|
348
|
-
}
|
|
349
|
-
export interface AttachedClientView extends AttachedClientViewShape {
|
|
350
|
-
clientId: ClientId;
|
|
351
|
-
clientKind: LocalControlClientKindShape;
|
|
352
|
-
}
|
|
353
|
-
export interface AttachedClientLeaseGrant extends AttachedClientLeaseGrantShape {
|
|
354
|
-
clientId: ClientId;
|
|
355
|
-
}
|
|
356
|
-
export interface AttachedClientAuth extends AttachedClientAuthShape {
|
|
357
|
-
clientId: ClientId;
|
|
358
|
-
}
|
|
359
|
-
export type RuntimeBootstrapPhase = RuntimeBootstrapPhaseShape;
|
|
360
|
-
export interface RuntimeBootstrapIdentity extends RuntimeBootstrapIdentityShape {
|
|
361
|
-
displayNameSnapshot?: string;
|
|
362
|
-
}
|
|
363
|
-
export interface RuntimeBootstrapRecord extends RuntimeBootstrapRecordShape {
|
|
364
|
-
nodeId: NodeId;
|
|
365
|
-
runtimeId: RuntimeId;
|
|
366
|
-
}
|
|
367
|
-
export interface PairRequest extends PendingPairRequestViewShape {
|
|
368
|
-
}
|
|
369
|
-
export interface PairRequestHandle {
|
|
370
|
-
requestId: string;
|
|
371
|
-
wait(): Promise<PairRequestResponse>;
|
|
372
|
-
}
|
|
373
|
-
export interface PairRequestDecision extends PairRequestDecisionShape {
|
|
374
|
-
}
|
|
375
|
-
export interface PairRequestResponse extends PairRequestResponseShape {
|
|
376
|
-
}
|
|
377
|
-
export interface InvitePeerRequest extends InvitePeerRequestShape {
|
|
378
|
-
}
|
|
379
|
-
export type InvitePeerResult = InvitePeerResultShape;
|
|
380
|
-
export interface AcceptInviteRequest extends AcceptInviteRequestShape {
|
|
381
|
-
}
|
|
382
|
-
export interface AcceptInviteResponse extends AcceptInviteResponseShape {
|
|
383
|
-
}
|
|
384
|
-
export interface CreateInviteRequest extends CreateInviteRequestShape {
|
|
385
|
-
}
|
|
386
|
-
export interface CreateInviteResponse extends CreateInviteResponseShape {
|
|
387
|
-
}
|
|
388
|
-
export interface AcceptInviteTokenRequest extends AcceptInviteTokenRequestShape {
|
|
389
|
-
}
|
|
390
|
-
export interface AcceptInviteTokenResponse extends AcceptInviteTokenResponseShape {
|
|
391
|
-
}
|
|
392
|
-
export interface PendingInviteView extends PendingInviteViewShape {
|
|
393
|
-
}
|
|
394
|
-
export interface CancelInviteRequest extends CancelInviteRequestShape {
|
|
395
|
-
}
|
|
396
|
-
export interface CancelInviteResponse extends CancelInviteResponseShape {
|
|
397
|
-
}
|
|
398
|
-
export interface PairCompletionHandle {
|
|
399
|
-
nodeId: NodeId;
|
|
400
|
-
wait(): Promise<AcceptInviteResponse | DirectPairResponse>;
|
|
401
|
-
}
|
|
402
|
-
export interface DirectPairRequest extends DirectPairRequestShape {
|
|
403
|
-
}
|
|
404
|
-
export interface DirectPairResponse extends DirectPairResponseShape {
|
|
405
|
-
}
|
|
406
|
-
export interface RevokePeerRequest extends RevokePeerRequestShape {
|
|
407
|
-
}
|
|
408
|
-
export interface RevokePeerResponse extends RevokePeerResponseShape {
|
|
409
|
-
}
|
|
410
|
-
export interface RepairPeerRequest extends RepairPeerRequestShape {
|
|
411
|
-
}
|
|
412
|
-
export interface RepairPeerResponse extends RepairPeerResponseShape {
|
|
413
|
-
}
|
|
414
|
-
export interface RepairReceipt extends RepairPeerResponse {
|
|
415
|
-
}
|
|
416
|
-
export interface RuntimeAutonomousLoopCommand extends RuntimeAutonomousLoopCommandShape {
|
|
417
|
-
}
|
|
418
|
-
export interface LocalControlApi {
|
|
419
|
-
submitRun(request: RunRequest): Promise<RunHandle>;
|
|
420
|
-
resumeRun(request: ResumeRunRequest): Promise<RunResult>;
|
|
421
|
-
streamRun(request: RunRequest, signal?: AbortSignal): AsyncIterable<RuntimeRunEvent>;
|
|
422
|
-
subscribeRuntimeEvents(cursor?: RuntimeEventCursor): AsyncIterable<RuntimeEvent>;
|
|
423
|
-
sendBestEffort(message: OutboundMessage): Promise<RuntimeQueuedReceipt>;
|
|
424
|
-
sendDurable(message: OutboundMessage): Promise<RuntimeDeliveryReceipt>;
|
|
425
|
-
listInbox(request?: InboxListRequest): Promise<PersistedInboxEvent[]>;
|
|
426
|
-
subscribeInbox(cursor?: InboxCursor): AsyncIterable<PersistedInboxEvent>;
|
|
427
|
-
listPeers(): Promise<PeerViewEvent[]>;
|
|
428
|
-
listNearbyPeers(): Promise<NearbyPeerView[]>;
|
|
429
|
-
subscribePeers(): AsyncIterable<PeerViewEvent>;
|
|
430
|
-
getRuntimeStatus(): Promise<RuntimeStatus>;
|
|
431
|
-
startAutonomousLoop?(input?: RuntimeAutonomousLoopCommand): Promise<RuntimeStatus>;
|
|
432
|
-
stopAutonomousLoop?(): Promise<RuntimeStatus>;
|
|
433
|
-
getRuntimeBootstrap(): Promise<RuntimeBootstrapRecord>;
|
|
434
|
-
listPendingPairRequests(): Promise<PairRequest[]>;
|
|
435
|
-
respondToPairRequest(input: PairRequestDecision): Promise<PairRequestResponse>;
|
|
436
|
-
createInvite(input: CreateInviteRequest): Promise<CreateInviteResponse>;
|
|
437
|
-
listPendingInvites(): Promise<PendingInviteView[]>;
|
|
438
|
-
acceptInviteToken(input: AcceptInviteTokenRequest): Promise<AcceptInviteTokenResponse>;
|
|
439
|
-
cancelInvite(input: CancelInviteRequest): Promise<CancelInviteResponse>;
|
|
440
|
-
invitePeer(input: InvitePeerRequest): Promise<InvitePeerResult>;
|
|
441
|
-
acceptInvite(input: AcceptInviteRequest): Promise<AcceptInviteResponse>;
|
|
442
|
-
directPair(input: DirectPairRequest): Promise<DirectPairResponse>;
|
|
443
|
-
revokePeer(input: RevokePeerRequest): Promise<RevokePeerResponse>;
|
|
444
|
-
repairPeer(input: RepairPeerRequest): Promise<RepairReceipt>;
|
|
445
|
-
}
|
|
446
|
-
export interface AttachedLocalControlApi extends LocalControlApi {
|
|
447
|
-
listAttachedClients(): Promise<AttachedClientView[]>;
|
|
448
|
-
listDirectClientInbox(request?: InboxListRequest): Promise<PersistedInboxEvent[]>;
|
|
449
|
-
subscribeDirectClientInbox(cursor?: InboxCursor): AsyncIterable<PersistedInboxEvent>;
|
|
450
|
-
}
|
|
451
|
-
export interface RuntimeEventCursor extends RuntimeEventCursorShape {
|
|
452
|
-
}
|
|
453
|
-
/**
|
|
454
|
-
* Minimal tool registry interface for runtime refresh after learning/adoption.
|
|
455
|
-
*/
|
|
456
|
-
export interface ToolRegistryRef {
|
|
457
|
-
discoverFromMemoria(memoria: IMemoria): Promise<number>;
|
|
458
|
-
}
|
|
459
|
-
/** Reference to the Mailbox for inter-agent message delivery */
|
|
460
|
-
export interface MailboxMessage {
|
|
461
|
-
id: string;
|
|
462
|
-
version: number;
|
|
463
|
-
sender: {
|
|
464
|
-
id: string;
|
|
465
|
-
name: string;
|
|
466
|
-
type: string;
|
|
467
|
-
host?: string;
|
|
468
|
-
port?: number;
|
|
469
|
-
};
|
|
470
|
-
recipient: {
|
|
471
|
-
id: string;
|
|
472
|
-
name: string;
|
|
473
|
-
host?: string;
|
|
474
|
-
port?: number;
|
|
475
|
-
apiKey?: string;
|
|
476
|
-
};
|
|
477
|
-
recipientInbox?: InboxAddress;
|
|
478
|
-
replyTo?: string;
|
|
479
|
-
correlationId?: string;
|
|
480
|
-
type: string;
|
|
481
|
-
content: string;
|
|
482
|
-
metadata?: Record<string, unknown>;
|
|
483
|
-
timestamp: number;
|
|
484
|
-
ttl?: number;
|
|
485
|
-
priority: number;
|
|
486
|
-
signature?: string;
|
|
487
|
-
}
|
|
488
|
-
export interface MailboxDeliveryReceipt extends CanonicalDeliveryReceiptShape {
|
|
489
|
-
}
|
|
490
|
-
export interface MailboxRef {
|
|
491
|
-
/** Send a message without waiting for remote persistence acknowledgement. */
|
|
492
|
-
sendBestEffort(message: MailboxMessage): Promise<MailboxDeliveryReceipt>;
|
|
493
|
-
/** Send a message and wait for the runtime's durable delivery semantics. */
|
|
494
|
-
sendDurable(message: MailboxMessage): Promise<MailboxDeliveryReceipt>;
|
|
495
|
-
/** Check if a recipient is reachable by agent ID */
|
|
496
|
-
has(agentId: string): boolean;
|
|
497
|
-
/** Check if a recipient is reachable by name */
|
|
498
|
-
hasByName(name: string): boolean;
|
|
499
|
-
/** Resolve a registered local name or alias to its canonical durable recipient ID */
|
|
500
|
-
resolveId(name: string): string | undefined;
|
|
501
|
-
}
|
|
502
|
-
export interface RuntimeOutbox extends Pick<MailboxRef, "sendBestEffort" | "sendDurable"> {
|
|
503
|
-
registerTunnel(nodeId: NodeId, transport: {
|
|
504
|
-
sendPlaintext(data: Buffer): void;
|
|
505
|
-
getState?: () => string;
|
|
506
|
-
isActive?: boolean;
|
|
507
|
-
routeBootstrapOnly?: boolean;
|
|
508
|
-
}): void;
|
|
509
|
-
unregisterTunnel(nodeId: NodeId): void;
|
|
510
|
-
handleDeliveryAck(ack: DeliveryAck): void;
|
|
511
|
-
/**
|
|
512
|
-
* Submit a durable delivery operation. Returns immediately with a branded handle.
|
|
513
|
-
* The caller MUST observe delivery status via `getDurableStatus()`.
|
|
514
|
-
* @deprecated_alternative Use instead of `sendDurable()` for non-blocking delivery.
|
|
515
|
-
*/
|
|
516
|
-
submitDurable(message: MailboxMessage, options?: {
|
|
517
|
-
ttlMs?: number;
|
|
518
|
-
}): Promise<DurableSubmitResult>;
|
|
519
|
-
/**
|
|
520
|
-
* Observe the status of a durable delivery operation by its branded handle.
|
|
521
|
-
* Returns null for unknown handles.
|
|
522
|
-
*/
|
|
523
|
-
getDurableStatus(handle: DurableDeliveryHandle): DurableDeliveryResult | null;
|
|
524
|
-
}
|
|
525
|
-
export interface NetworkManagerPeerInfo {
|
|
526
|
-
nodeId: NodeId | null;
|
|
527
|
-
publicKey: PeerTransportId;
|
|
528
|
-
name: string;
|
|
529
|
-
endpointHost: string | null;
|
|
530
|
-
endpointPort: number | null;
|
|
531
|
-
endpointRevision: number;
|
|
532
|
-
controlEndpoint?: {
|
|
533
|
-
host: string | null;
|
|
534
|
-
port: number | null;
|
|
535
|
-
} | null;
|
|
536
|
-
signingPublicKey?: SigningPublicKey | null;
|
|
537
|
-
status: import("./network-runtime/peer-state-machine.js").LegacyPeerRegistryStatus;
|
|
538
|
-
membershipStatus?: import("./network-runtime/peer-state-machine.js").LegacyPeerRegistryStatus;
|
|
539
|
-
routeOwnership?: "current" | "superseded";
|
|
540
|
-
routeOwnerNodeId?: NodeId | null;
|
|
541
|
-
sessionState?: "none" | "handshaking" | "connected" | "reconnecting" | "dead";
|
|
542
|
-
deliveryReadiness?: "cannot_address" | "can_queue_only" | "can_send_now";
|
|
543
|
-
lastHandshake: number | null;
|
|
544
|
-
createdAt: number;
|
|
545
|
-
updatedAt?: number;
|
|
546
|
-
}
|
|
547
|
-
export interface NetworkPeerView {
|
|
548
|
-
nodeId: NodeId;
|
|
549
|
-
transportPublicKey: PeerTransportId;
|
|
550
|
-
displayNameSnapshot?: string;
|
|
551
|
-
endpointHost: string | null;
|
|
552
|
-
endpointPort: number | null;
|
|
553
|
-
endpointRevision: number;
|
|
554
|
-
controlEndpoint?: {
|
|
555
|
-
host: string | null;
|
|
556
|
-
port: number | null;
|
|
557
|
-
} | null;
|
|
558
|
-
signingPublicKey?: SigningPublicKey | null;
|
|
559
|
-
status: import("./network-runtime/peer-state-machine.js").LegacyPeerRegistryStatus;
|
|
560
|
-
membershipStatus?: import("./network-runtime/peer-state-machine.js").LegacyPeerRegistryStatus;
|
|
561
|
-
routeOwnership?: "current" | "superseded";
|
|
562
|
-
routeOwnerNodeId?: NodeId | null;
|
|
563
|
-
sessionState?: "none" | "handshaking" | "connected" | "reconnecting" | "dead";
|
|
564
|
-
deliveryReadiness?: "cannot_address" | "can_queue_only" | "can_send_now";
|
|
565
|
-
lastHandshake: number | null;
|
|
566
|
-
createdAt: number;
|
|
567
|
-
updatedAt: number;
|
|
568
|
-
}
|
|
569
|
-
export interface NetworkManagerStatusView {
|
|
570
|
-
configured: boolean;
|
|
571
|
-
nodeId: NodeId | null;
|
|
572
|
-
principalFingerprint: PrincipalFingerprint | null;
|
|
573
|
-
publicKey: PeerTransportId | null;
|
|
574
|
-
listenPort: number | null;
|
|
575
|
-
externalEndpoint: {
|
|
576
|
-
address: string;
|
|
577
|
-
port: number;
|
|
578
|
-
} | null;
|
|
579
|
-
activePeers: number;
|
|
580
|
-
totalPeers: number;
|
|
581
|
-
connectedPeers?: number;
|
|
582
|
-
handshakingPeers?: number;
|
|
583
|
-
queueOnlyPeers?: number;
|
|
584
|
-
supersededPeers?: number;
|
|
585
|
-
signingPublicKey?: SigningPublicKey | null;
|
|
586
|
-
}
|
|
587
|
-
export interface NetworkStatusView {
|
|
588
|
-
configured: boolean;
|
|
589
|
-
nodeId: NodeId | null;
|
|
590
|
-
principalFingerprint: PrincipalFingerprint | null;
|
|
591
|
-
transportPublicKey: PeerTransportId | null;
|
|
592
|
-
listenPort: number | null;
|
|
593
|
-
externalEndpoint: {
|
|
594
|
-
address: string;
|
|
595
|
-
port: number;
|
|
596
|
-
} | null;
|
|
597
|
-
activePeers: number;
|
|
598
|
-
totalPeers: number;
|
|
599
|
-
connectedPeers?: number;
|
|
600
|
-
handshakingPeers?: number;
|
|
601
|
-
queueOnlyPeers?: number;
|
|
602
|
-
supersededPeers?: number;
|
|
603
|
-
signingPublicKey?: SigningPublicKey | null;
|
|
604
|
-
}
|
|
605
|
-
/** Public control-plane surface for network-aware tools and runner APIs. */
|
|
606
|
-
export interface NetworkControlRef {
|
|
607
|
-
invite(displayName?: string, options?: number | {
|
|
608
|
-
durationMs?: number;
|
|
609
|
-
nodeId?: NodeId;
|
|
610
|
-
caCert?: string;
|
|
611
|
-
controlEndpoint: import("./network-runtime/address-types.js").ControlEndpointAdvertisement;
|
|
612
|
-
transportHostOverride?: string;
|
|
613
|
-
}): {
|
|
614
|
-
token: string;
|
|
615
|
-
psk: string;
|
|
616
|
-
};
|
|
617
|
-
revokePeer(nodeId: NodeId): boolean;
|
|
618
|
-
listPendingInvites?(): Array<{
|
|
619
|
-
inviteId: string;
|
|
620
|
-
inviteLabel?: string;
|
|
621
|
-
createdAt: number;
|
|
622
|
-
expiresAt: number | null;
|
|
623
|
-
}>;
|
|
624
|
-
cancelInvite?(inviteId: string): boolean;
|
|
625
|
-
listPeers(): NetworkPeerView[];
|
|
626
|
-
status(): NetworkStatusView;
|
|
627
|
-
listAttachedClients?(): AttachedClientView[] | Promise<AttachedClientView[]>;
|
|
628
|
-
}
|
|
629
|
-
export interface NetworkPeerRegistrationResultRef {
|
|
630
|
-
registered: true;
|
|
631
|
-
nodeId: NodeId;
|
|
632
|
-
displayNameSnapshot?: string;
|
|
633
|
-
peerStatus: string;
|
|
634
|
-
lastSeen: number;
|
|
635
|
-
heartbeatUpdated: boolean;
|
|
636
|
-
endpointUpdated: boolean;
|
|
637
|
-
endpointRevision: number;
|
|
638
|
-
}
|
|
639
|
-
export interface NetworkPeerRegistrationFailureRef {
|
|
640
|
-
registered: false;
|
|
641
|
-
errorCode: "not_found" | "node_id_mismatch" | "pending" | "pending_tunnel" | "revoked" | "missing_endpoint_revision" | "stale_revision" | "conflicting_revision";
|
|
642
|
-
}
|
|
643
|
-
export interface NetworkPeerRepairResultRef {
|
|
644
|
-
repaired: true;
|
|
645
|
-
nodeId: NodeId;
|
|
646
|
-
displayNameSnapshot?: string;
|
|
647
|
-
peerStatus: string;
|
|
648
|
-
endpointUpdated: boolean;
|
|
649
|
-
endpointHost: string;
|
|
650
|
-
endpointPort: number;
|
|
651
|
-
endpointRevision: number;
|
|
652
|
-
}
|
|
653
|
-
export interface NetworkPeerRepairFailureRef {
|
|
654
|
-
repaired: false;
|
|
655
|
-
errorCode: "not_found" | "pending" | "pending_tunnel" | "revoked" | "missing_endpoint_revision" | "stale_revision" | "conflicting_revision";
|
|
656
|
-
}
|
|
657
|
-
export interface NetworkPeerRevocationResultRef {
|
|
658
|
-
revoked: true;
|
|
659
|
-
nodeId: NodeId;
|
|
660
|
-
displayNameSnapshot?: string;
|
|
661
|
-
fingerprint: PrincipalFingerprint;
|
|
662
|
-
revokedAt: number;
|
|
663
|
-
}
|
|
664
|
-
export interface NetworkPeerRevocationFailureRef {
|
|
665
|
-
revoked: false;
|
|
666
|
-
errorCode: "not_found" | "principal_unresolved";
|
|
667
|
-
}
|
|
668
|
-
/** Reference to the network manager for WireGuard peer management */
|
|
669
|
-
export interface NetworkManagerRef {
|
|
670
|
-
invite(displayName?: string, options?: number | {
|
|
671
|
-
durationMs?: number;
|
|
672
|
-
nodeId?: NodeId;
|
|
673
|
-
caCert?: string;
|
|
674
|
-
controlEndpoint: import("./network-runtime/address-types.js").ControlEndpointAdvertisement;
|
|
675
|
-
transportHostOverride?: string;
|
|
676
|
-
}): {
|
|
677
|
-
token: string;
|
|
678
|
-
psk: string;
|
|
679
|
-
};
|
|
680
|
-
listPendingInvites?(): Array<{
|
|
681
|
-
inviteId: string;
|
|
682
|
-
inviteLabel?: string;
|
|
683
|
-
createdAt: number;
|
|
684
|
-
expiresAt: number | null;
|
|
685
|
-
}>;
|
|
686
|
-
cancelInvite?(inviteId: string): boolean;
|
|
687
|
-
listPeers(): NetworkManagerPeerInfo[];
|
|
688
|
-
status(): NetworkManagerStatusView;
|
|
689
|
-
/** Revoke a peer by its durable principal identity. */
|
|
690
|
-
revokePeer(nodeId: NodeId): boolean;
|
|
691
|
-
/** Shut down all tunnels and clean up resources */
|
|
692
|
-
shutdown(): Promise<void>;
|
|
693
|
-
/** Subscribe to incoming runtime-owned AriaMessage ingress. */
|
|
694
|
-
addMessageListener(listener: (message: unknown) => boolean | void): () => void;
|
|
695
|
-
/** Subscribe to persisted delivery acknowledgements from runtime transport flows. */
|
|
696
|
-
addDeliveryAckListener(listener: (ack: DeliveryAck) => void): () => void;
|
|
697
|
-
/** Get the current network configuration (includes signing keys) */
|
|
698
|
-
getConfig(): {
|
|
699
|
-
publicKey: PeerTransportId;
|
|
700
|
-
privateKey: string;
|
|
701
|
-
signingPublicKey?: SigningPublicKey;
|
|
702
|
-
signingPrivateKey?: string;
|
|
703
|
-
listenPort: number;
|
|
704
|
-
externalEndpoint?: {
|
|
705
|
-
address: string;
|
|
706
|
-
port: number;
|
|
707
|
-
};
|
|
708
|
-
endpointRevision?: number;
|
|
709
|
-
localEndpointRevision?: number;
|
|
710
|
-
coordinationUrl?: string;
|
|
711
|
-
nodeId?: NodeId;
|
|
712
|
-
createdAt: number;
|
|
713
|
-
} | null;
|
|
714
|
-
/** Read the runtime's local display snapshot without exposing raw config-shape aliases. */
|
|
715
|
-
getLocalDisplayNameSnapshot?(): string | undefined;
|
|
716
|
-
/** Subscribe to verified peer activation events from the runtime network layer. */
|
|
717
|
-
addPeerActivationListener?(listener: (input: {
|
|
718
|
-
nodeId: NodeId;
|
|
719
|
-
displayNameSnapshot: string;
|
|
720
|
-
signingPublicKey: SigningPublicKey;
|
|
721
|
-
}) => void): () => void;
|
|
722
|
-
/** Get a tunnel by durable peer identity (for direct message transport registration) */
|
|
723
|
-
getTunnel?(nodeId: NodeId): {
|
|
724
|
-
sendPlaintext(data: Buffer): void;
|
|
725
|
-
} | undefined;
|
|
726
|
-
/** Stage a peer signing key through the runtime-owned identity boundary. */
|
|
727
|
-
stagePendingPeerSigningKey?(input: {
|
|
728
|
-
nodeId: NodeId;
|
|
729
|
-
peerPublicKey: PeerTransportId;
|
|
730
|
-
displayNameSnapshot: string;
|
|
731
|
-
signingPublicKey: SigningPublicKey;
|
|
732
|
-
}): void;
|
|
733
|
-
/** Apply one runtime-owned pending direct-pair activation transaction. */
|
|
734
|
-
applyPendingDirectPair?(input: {
|
|
735
|
-
nodeId: NodeId;
|
|
736
|
-
peerPublicKey: PeerTransportId;
|
|
737
|
-
displayNameSnapshot: string;
|
|
738
|
-
endpointHost: string;
|
|
739
|
-
endpointPort: number;
|
|
740
|
-
endpointRevision?: number;
|
|
741
|
-
controlEndpointHost: string;
|
|
742
|
-
controlEndpointPort: number;
|
|
743
|
-
controlTlsCaFingerprint: TlsCaFingerprint;
|
|
744
|
-
presharedKey: string;
|
|
745
|
-
signingPublicKey: string;
|
|
746
|
-
}): Promise<void>;
|
|
747
|
-
/** Get all known peer signing keys keyed by durable peer principal. */
|
|
748
|
-
getAllPeerSigningKeysByPrincipal?(): Map<NodeId, SigningPublicKey>;
|
|
749
|
-
/** Promote a pending principal to active after the first verified signed ingress message. */
|
|
750
|
-
activatePendingPeer?(nodeId: NodeId): void;
|
|
751
|
-
/** Record a heartbeat from a peer principal (updates last_handshake timestamp) */
|
|
752
|
-
heartbeat?(nodeId: NodeId): boolean;
|
|
753
|
-
/**
|
|
754
|
-
* Apply a peer registration/heartbeat mutation by durable peer identity.
|
|
755
|
-
* This is the authoritative convergence surface for register/reconcile flows.
|
|
756
|
-
*/
|
|
757
|
-
applyPeerRegistration?(input: {
|
|
758
|
-
nodeId: NodeId;
|
|
759
|
-
endpointHost?: string;
|
|
760
|
-
endpointPort?: number;
|
|
761
|
-
endpointRevision?: number;
|
|
762
|
-
}): NetworkPeerRegistrationResultRef | NetworkPeerRegistrationFailureRef;
|
|
763
|
-
/**
|
|
764
|
-
* Apply a transport-only peer repair mutation by durable peer identity.
|
|
765
|
-
* This is the authoritative convergence surface for operator-driven endpoint repair.
|
|
766
|
-
*/
|
|
767
|
-
applyPeerRepair?(input: {
|
|
768
|
-
nodeId: NodeId;
|
|
769
|
-
endpointHost: string;
|
|
770
|
-
endpointPort: number;
|
|
771
|
-
endpointRevision: number;
|
|
772
|
-
}): NetworkPeerRepairResultRef | NetworkPeerRepairFailureRef;
|
|
773
|
-
/**
|
|
774
|
-
* Apply a peer revocation mutation by durable peer identity.
|
|
775
|
-
* Operator audit authority stays in the runtime/store layer; transport only
|
|
776
|
-
* tears down the target peer by NodeId.
|
|
777
|
-
*/
|
|
778
|
-
applyPeerRevocation?(input: {
|
|
779
|
-
nodeId: NodeId;
|
|
780
|
-
fingerprint?: PrincipalFingerprint;
|
|
781
|
-
}): NetworkPeerRevocationResultRef | NetworkPeerRevocationFailureRef;
|
|
782
|
-
/** Accept an invite token from another peer — registers peer and starts tunnel.
|
|
783
|
-
* Returns PeerInfo with the effective name (may be disambiguated if collision). */
|
|
784
|
-
acceptInvite?(token: string, options?: string | {
|
|
785
|
-
nodeId?: NodeId;
|
|
786
|
-
displayNameSnapshot?: string;
|
|
787
|
-
transportEndpoint?: import("./network-runtime/address-types.js").TransportEndpointAdvertisement;
|
|
788
|
-
controlEndpoint?: ControlEndpointAdvertisement;
|
|
789
|
-
}): Promise<{
|
|
790
|
-
name: string;
|
|
791
|
-
[k: string]: unknown;
|
|
792
|
-
}>;
|
|
793
|
-
/** Complete the join process — upgrade a pending peer with real credentials.
|
|
794
|
-
* Returns the effective name (may be disambiguated if collision with own identity). */
|
|
795
|
-
completeJoin?(params: {
|
|
796
|
-
nodeId: NodeId;
|
|
797
|
-
principalFingerprint: PrincipalFingerprint;
|
|
798
|
-
peerPublicKey: PeerTransportId;
|
|
799
|
-
peerSigningKey: SigningPublicKey;
|
|
800
|
-
peerTransportEndpoint: import("./network-runtime/address-types.js").TransportEndpointAdvertisement;
|
|
801
|
-
peerControlEndpoint: import("./network-runtime/address-types.js").ControlEndpointAdvertisement;
|
|
802
|
-
displayNameSnapshot?: string;
|
|
803
|
-
inviteTokenNonce: string;
|
|
804
|
-
}): Promise<{
|
|
805
|
-
effectiveName: string;
|
|
806
|
-
}>;
|
|
807
|
-
/** Update the external endpoint (STUN refresh) and persist to disk */
|
|
808
|
-
updateExternalEndpoint?(address: string, port: number): void;
|
|
809
|
-
/** Persist coordination server URL */
|
|
810
|
-
setCoordinationUrl?(url: string): void;
|
|
811
|
-
/** Update a peer's endpoint in the registry by durable peer identity */
|
|
812
|
-
updatePeerEndpoint?(nodeId: NodeId, host: string, port: number, endpointRevision: number): void;
|
|
813
|
-
/** Start a tunnel to a peer by durable peer identity */
|
|
814
|
-
startTunnel?(nodeId: NodeId): Promise<void>;
|
|
815
|
-
/** Stop a tunnel for a peer by durable peer identity */
|
|
816
|
-
stopTunnel?(nodeId: NodeId): void;
|
|
817
|
-
/** Number of active tunnels */
|
|
818
|
-
readonly activeTunnelCount?: number;
|
|
819
|
-
/** Our own peer name in the mesh */
|
|
820
|
-
setLocalPeerName?(name: string): void;
|
|
821
|
-
/** Project the authoritative local node identity into the network config when available. */
|
|
822
|
-
setLocalNodeId?(nodeId: NodeId): void;
|
|
823
|
-
/** Reset relay upgrade backoff (call on STUN endpoint change) */
|
|
824
|
-
resetRelayUpgradeBackoff?(): void;
|
|
825
|
-
}
|
|
826
|
-
/** Reference to a message store for inter-agent messaging */
|
|
827
|
-
export interface MessageStoreRef {
|
|
828
|
-
/** Store a message. Returns true if newly inserted, false if duplicate (replay). */
|
|
829
|
-
store(msg: {
|
|
830
|
-
id: string;
|
|
831
|
-
sender: {
|
|
832
|
-
id: string;
|
|
833
|
-
name: string;
|
|
834
|
-
type: string;
|
|
835
|
-
};
|
|
836
|
-
recipient: {
|
|
837
|
-
id: string;
|
|
838
|
-
name: string;
|
|
839
|
-
};
|
|
840
|
-
replyTo?: string;
|
|
841
|
-
correlationId?: string;
|
|
842
|
-
questId?: string;
|
|
843
|
-
type: string;
|
|
844
|
-
content: string;
|
|
845
|
-
metadata?: Record<string, unknown>;
|
|
846
|
-
priority?: number;
|
|
847
|
-
signature?: string;
|
|
848
|
-
timestamp: number;
|
|
849
|
-
}, direction: "sent" | "received", inboxAddress: InboxAddress): boolean;
|
|
850
|
-
/** Get unread received messages for a specific inbox */
|
|
851
|
-
getUnreadForInbox(inboxAddress: InboxAddress, limit?: number): Array<{
|
|
852
|
-
id: string;
|
|
853
|
-
sender_id: string;
|
|
854
|
-
sender_name: string;
|
|
855
|
-
sender_type: string;
|
|
856
|
-
recipient_id: string;
|
|
857
|
-
type: string;
|
|
858
|
-
content: string;
|
|
859
|
-
metadata: string | null;
|
|
860
|
-
priority: number;
|
|
861
|
-
created_at: number;
|
|
862
|
-
correlation_id: string | null;
|
|
863
|
-
reply_to: string | null;
|
|
864
|
-
inbox_address_kind: "client" | "node";
|
|
865
|
-
inbox_address_id: string;
|
|
866
|
-
}>;
|
|
867
|
-
/** Mark messages as read */
|
|
868
|
-
markRead(ids: string[]): void;
|
|
869
|
-
/** Mark messages as read, scoped to one inbox */
|
|
870
|
-
markReadForInbox(inboxAddress: InboxAddress, ids: string[]): void;
|
|
871
|
-
/** Get thread by message ID, scoped to one inbox */
|
|
872
|
-
getThreadForInbox(inboxAddress: InboxAddress, messageId: string): Array<{
|
|
873
|
-
id: string;
|
|
874
|
-
sender_id: string;
|
|
875
|
-
sender_name: string;
|
|
876
|
-
type: string;
|
|
877
|
-
content: string;
|
|
878
|
-
created_at: number;
|
|
879
|
-
reply_to: string | null;
|
|
880
|
-
inbox_address_kind: "client" | "node";
|
|
881
|
-
inbox_address_id: string;
|
|
882
|
-
}>;
|
|
883
|
-
/** Get one message by ID, scoped to one inbox. */
|
|
884
|
-
getMessageForInbox?(inboxAddress: InboxAddress, messageId: string): {
|
|
885
|
-
id: string;
|
|
886
|
-
sender_id: string;
|
|
887
|
-
sender_name: string;
|
|
888
|
-
sender_type: string;
|
|
889
|
-
recipient_id: string;
|
|
890
|
-
recipient_name: string;
|
|
891
|
-
reply_to: string | null;
|
|
892
|
-
correlation_id: string | null;
|
|
893
|
-
quest_id: string | null;
|
|
894
|
-
type: string;
|
|
895
|
-
content: string;
|
|
896
|
-
metadata: string | null;
|
|
897
|
-
priority: number;
|
|
898
|
-
direction: string;
|
|
899
|
-
read_at: number | null;
|
|
900
|
-
signature: string | null;
|
|
901
|
-
created_at: number;
|
|
902
|
-
inbox_address_kind: "client" | "node";
|
|
903
|
-
inbox_address_id: string;
|
|
904
|
-
} | null;
|
|
905
|
-
/** Get messages by correlation ID */
|
|
906
|
-
getByCorrelation(correlationId: string): Array<{
|
|
907
|
-
id: string;
|
|
908
|
-
sender_name: string;
|
|
909
|
-
type: string;
|
|
910
|
-
content: string;
|
|
911
|
-
created_at: number;
|
|
912
|
-
}>;
|
|
913
|
-
/** Search messages within one inbox */
|
|
914
|
-
searchInbox(inboxAddress: InboxAddress, query: string, options?: {
|
|
915
|
-
from?: string;
|
|
916
|
-
type?: string;
|
|
917
|
-
correlationId?: string;
|
|
918
|
-
after?: number;
|
|
919
|
-
limit?: number;
|
|
920
|
-
}): Array<{
|
|
921
|
-
id: string;
|
|
922
|
-
sender_id: string;
|
|
923
|
-
sender_name: string;
|
|
924
|
-
recipient_id: string;
|
|
925
|
-
type: string;
|
|
926
|
-
content: string;
|
|
927
|
-
metadata: string | null;
|
|
928
|
-
created_at: number;
|
|
929
|
-
inbox_address_kind: "client" | "node";
|
|
930
|
-
inbox_address_id: string;
|
|
931
|
-
}>;
|
|
932
|
-
/** Count unread messages for one inbox */
|
|
933
|
-
unreadCountForInbox(inboxAddress: InboxAddress): number;
|
|
934
|
-
/** Delete all rows for one inbox boundary, returning deleted row count. */
|
|
935
|
-
deleteForInbox?(inboxAddress: InboxAddress): number;
|
|
936
|
-
}
|
|
937
|
-
/** Duck-typed session history interface for tools — avoids @aria/cli import. */
|
|
938
|
-
export interface SessionHistoryRef {
|
|
939
|
-
/** List sessions, ordered by most recent first */
|
|
940
|
-
listSessions(limit?: number, offset?: number): SessionSummaryRef[];
|
|
941
|
-
/** Search sessions by message content using FTS5 (falls back to LIKE) */
|
|
942
|
-
searchSessionsFts(query: string, limit?: number, offset?: number): SessionSummaryRef[];
|
|
943
|
-
/** Get full session with all messages */
|
|
944
|
-
getSession(sessionId: string): SessionContextRef | null;
|
|
945
|
-
/** Get incomplete (active) sessions */
|
|
946
|
-
getIncompleteSessions(limit?: number): SessionSummaryRef[];
|
|
947
|
-
/** Delete a session by ID */
|
|
948
|
-
deleteSession(sessionId: string): void;
|
|
949
|
-
/** Mark a session as completed */
|
|
950
|
-
markCompleted(sessionId: string): void;
|
|
951
|
-
/** Set session title */
|
|
952
|
-
setSessionTitle(sessionId: string, title: string): void;
|
|
953
|
-
/** Resolve session by ID prefix (8+ chars) */
|
|
954
|
-
findSessionByPrefix(prefix: string): string | null;
|
|
955
|
-
/** Get total session count */
|
|
956
|
-
getSessionCount(): number;
|
|
957
|
-
/** Get run metrics for a session */
|
|
958
|
-
getRunMetrics(sessionId: string): RunMetricsRef[];
|
|
959
|
-
}
|
|
960
|
-
export interface SessionSummaryRef {
|
|
961
|
-
id: string;
|
|
962
|
-
createdAt: Date;
|
|
963
|
-
updatedAt: Date;
|
|
964
|
-
completedAt?: Date;
|
|
965
|
-
title: string | null;
|
|
966
|
-
arion: string;
|
|
967
|
-
model: string;
|
|
968
|
-
messageCount: number;
|
|
969
|
-
preview: string;
|
|
970
|
-
}
|
|
971
|
-
export interface SessionContextRef {
|
|
972
|
-
id: string;
|
|
973
|
-
arion: string;
|
|
974
|
-
model: string;
|
|
975
|
-
messages: SessionMessageRef[];
|
|
976
|
-
}
|
|
977
|
-
export interface SessionMessageRef {
|
|
978
|
-
id: number;
|
|
979
|
-
role: "user" | "assistant" | "system" | "tool";
|
|
980
|
-
content: string;
|
|
981
|
-
arion?: string;
|
|
982
|
-
toolCallId?: string;
|
|
983
|
-
toolCalls?: Array<{
|
|
984
|
-
id: string;
|
|
985
|
-
name: string;
|
|
986
|
-
arguments: Record<string, unknown>;
|
|
987
|
-
}>;
|
|
988
|
-
createdAt: Date;
|
|
989
|
-
}
|
|
990
|
-
export interface RunMetricsRef {
|
|
991
|
-
id: string;
|
|
992
|
-
sessionId: string;
|
|
993
|
-
turnCount?: number;
|
|
994
|
-
inputTokens?: number;
|
|
995
|
-
outputTokens?: number;
|
|
996
|
-
totalTokens?: number;
|
|
997
|
-
estimatedCost?: number;
|
|
998
|
-
wallTimeMs?: number;
|
|
999
|
-
toolCount?: number;
|
|
1000
|
-
}
|
|
1001
|
-
/** Context provided to tool execution */
|
|
1002
|
-
export interface ToolContext {
|
|
1003
|
-
/** Current working directory */
|
|
1004
|
-
workingDir: string;
|
|
1005
|
-
/** Environment variables */
|
|
1006
|
-
env: Record<string, string>;
|
|
1007
|
-
/** Current arion executing the tool */
|
|
1008
|
-
arion?: ArionRef;
|
|
1009
|
-
/** Manager for arion operations */
|
|
1010
|
-
manager?: ArionManagerRef;
|
|
1011
|
-
/** Memory system */
|
|
1012
|
-
memoria?: IMemoria;
|
|
1013
|
-
/** LLM router for any needed completions */
|
|
1014
|
-
router?: ModelRouterRef;
|
|
1015
|
-
/** Request user confirmation (required for tools with requiresConfirmation) */
|
|
1016
|
-
confirm: (message: string) => Promise<boolean>;
|
|
1017
|
-
/** Signal for cancellation support */
|
|
1018
|
-
abortSignal?: AbortSignal;
|
|
1019
|
-
/** Arbitrary caller-provided context from RunOptions.context */
|
|
1020
|
-
context?: unknown;
|
|
1021
|
-
/** Registry for tracking spawned child process PIDs (cleanup on session close) */
|
|
1022
|
-
processRegistry?: ProcessRegistryRef;
|
|
1023
|
-
/** PTY session store for write_stdin (interactive process I/O) */
|
|
1024
|
-
ptySessionStore?: PTYSessionStoreRef;
|
|
1025
|
-
/** Active provider context for provider-aware tools */
|
|
1026
|
-
providerContext?: ProviderContext;
|
|
1027
|
-
/** Delegation registry for checking delegation status (check_delegation tool) */
|
|
1028
|
-
delegationRegistry?: DelegationRegistryRef;
|
|
1029
|
-
/** Delegation executor for starting delegations (delegate_arion, spawn_worker tools) */
|
|
1030
|
-
delegationExecutor?: DelegationExecutorRef;
|
|
1031
|
-
/** Native search adapter callback for Gemini isolated strategy (wired by runner) */
|
|
1032
|
-
nativeSearchAdapter?: (query: string) => Promise<Array<{
|
|
1033
|
-
title: string;
|
|
1034
|
-
url: string;
|
|
1035
|
-
content: string;
|
|
1036
|
-
score?: number;
|
|
1037
|
-
}>>;
|
|
1038
|
-
/** User interaction handler for ask_user tool. CLI prompts directly, server returns pending state. */
|
|
1039
|
-
userInteraction?: {
|
|
1040
|
-
ask(questions: Array<{
|
|
1041
|
-
question: string;
|
|
1042
|
-
options?: string[];
|
|
1043
|
-
}>): Promise<Array<{
|
|
1044
|
-
answer: string;
|
|
1045
|
-
}>>;
|
|
1046
|
-
};
|
|
1047
|
-
/** Quest store for structured quest persistence (flows from RunSession → QuestStore) */
|
|
1048
|
-
questStore?: QuestStoreRef;
|
|
1049
|
-
/** Per-turn ask_user call counter (reset by runner at turn boundaries) */
|
|
1050
|
-
askUserCallCounter?: {
|
|
1051
|
-
count: number;
|
|
1052
|
-
};
|
|
1053
|
-
/** Active tool registry for wiring learned/adopted tools into the current session */
|
|
1054
|
-
toolRegistry?: ToolRegistryRef;
|
|
1055
|
-
/** Autonomy level — "full" disables filesystem blocklists for unrestricted access */
|
|
1056
|
-
autonomy?: "minimal" | "balanced" | "high" | "full";
|
|
1057
|
-
/** Message store for inter-agent messaging (send, receive, search, thread) */
|
|
1058
|
-
messageStore?: MessageStoreRef;
|
|
1059
|
-
/** Mailbox for inter-agent message delivery (routes messages to recipients) */
|
|
1060
|
-
mailbox?: MailboxRef;
|
|
1061
|
-
/** Public control-plane surface for runtime-owned networking */
|
|
1062
|
-
networkControl?: NetworkControlRef;
|
|
1063
|
-
/** Sender type for messaging — "worker" for child workers, "leader" for parent */
|
|
1064
|
-
senderType?: "worker" | "leader";
|
|
1065
|
-
/** Canonical runtime identity for process-owned messaging. */
|
|
1066
|
-
runtimeId?: RuntimeId;
|
|
1067
|
-
/** Durable local node identity for runtime-owned inbox routing. */
|
|
1068
|
-
nodeId?: NodeId;
|
|
1069
|
-
/** Recipient-scoped local inbox identity for message reads/persistence. */
|
|
1070
|
-
inboxAddress?: InboxAddress;
|
|
1071
|
-
/** Session history for conversation search and management */
|
|
1072
|
-
sessionHistory?: SessionHistoryRef;
|
|
1073
|
-
/** Current session ID (for session_history 'current' action) */
|
|
1074
|
-
currentSessionId?: string;
|
|
1075
|
-
}
|
|
1076
|
-
/** Result of tool execution */
|
|
1077
|
-
export interface ToolResult {
|
|
1078
|
-
/** Whether the tool executed successfully */
|
|
1079
|
-
success: boolean;
|
|
1080
|
-
/** Human-readable result message (for LLM and user feedback) */
|
|
1081
|
-
message: string;
|
|
1082
|
-
/** Optional structured data */
|
|
1083
|
-
data?: unknown;
|
|
1084
|
-
}
|
|
1085
|
-
/** Tool definition */
|
|
1086
|
-
export interface Tool {
|
|
1087
|
-
/** Unique tool name */
|
|
1088
|
-
name: string;
|
|
1089
|
-
/** Human-readable description */
|
|
1090
|
-
description: string;
|
|
1091
|
-
/** Tool category */
|
|
1092
|
-
category: ToolCategory;
|
|
1093
|
-
/** JSON Schema for parameters */
|
|
1094
|
-
parameters: JSONSchema7;
|
|
1095
|
-
/** Risk level for auto-approval */
|
|
1096
|
-
riskLevel: RiskLevel;
|
|
1097
|
-
/**
|
|
1098
|
-
* Optional safety issues discovered during prior review attempts.
|
|
1099
|
-
* Used to provide richer approval prompts for deferred/self-created tools.
|
|
1100
|
-
*/
|
|
1101
|
-
issues?: string[];
|
|
1102
|
-
/**
|
|
1103
|
-
* Whether user confirmation is required before execution.
|
|
1104
|
-
* Defaults based on riskLevel: 'dangerous' = true, others = false
|
|
1105
|
-
*/
|
|
1106
|
-
requiresConfirmation?: boolean;
|
|
1107
|
-
/**
|
|
1108
|
-
* Whether this tool only reads state (safe for parallel execution).
|
|
1109
|
-
* Mutating tools (write, delete, execute) should be false.
|
|
1110
|
-
*/
|
|
1111
|
-
isReadOnly?: boolean;
|
|
1112
|
-
/**
|
|
1113
|
-
* Loading tier for TTFT optimization.
|
|
1114
|
-
* "always" — tool schema sent to model on every request
|
|
1115
|
-
* "deferred" — available via search only, not in initial prompt
|
|
1116
|
-
*/
|
|
1117
|
-
loadingTier: LoadingTier;
|
|
1118
|
-
/**
|
|
1119
|
-
* Optional input-dependent approval override.
|
|
1120
|
-
* When set, called before the static needsApproval check. If returns true,
|
|
1121
|
-
* approval is skipped for this specific invocation. Used by shell tools
|
|
1122
|
-
* to skip approval for read-only commands (e.g. `ls`, `git status`).
|
|
1123
|
-
*/
|
|
1124
|
-
skipApprovalForInput?: (input: unknown) => boolean;
|
|
1125
|
-
/** Execute the tool */
|
|
1126
|
-
execute(input: unknown, context: ToolContext): Promise<ToolResult>;
|
|
1127
|
-
}
|
|
1128
|
-
/** Tool registration options */
|
|
1129
|
-
export interface RegisterOptions {
|
|
1130
|
-
/** Override existing tool with same name */
|
|
1131
|
-
override?: boolean;
|
|
1132
|
-
}
|
|
1133
|
-
/**
|
|
1134
|
-
* Tool info for system prompt (lightweight)
|
|
1135
|
-
*/
|
|
1136
|
-
export interface ToolInfo {
|
|
1137
|
-
name: string;
|
|
1138
|
-
description: string;
|
|
1139
|
-
requiresConfirmation: boolean;
|
|
1140
|
-
parameters: Array<{
|
|
1141
|
-
name: string;
|
|
1142
|
-
type: string;
|
|
1143
|
-
required: boolean;
|
|
1144
|
-
description?: string;
|
|
1145
|
-
}>;
|
|
1146
|
-
}
|
|
1147
|
-
/**
|
|
1148
|
-
* Tool use block from LLM response
|
|
1149
|
-
*/
|
|
1150
|
-
export interface ToolUseBlock {
|
|
1151
|
-
type: "tool_use";
|
|
1152
|
-
id: string;
|
|
1153
|
-
name: string;
|
|
1154
|
-
input: Record<string, unknown>;
|
|
1155
|
-
}
|
|
1156
|
-
/**
|
|
1157
|
-
* Tool result block for LLM continuation
|
|
1158
|
-
*/
|
|
1159
|
-
export interface ToolResultBlock {
|
|
1160
|
-
type: "tool_result";
|
|
1161
|
-
tool_use_id: string;
|
|
1162
|
-
content: string;
|
|
1163
|
-
is_error?: boolean;
|
|
1164
|
-
}
|
|
1165
|
-
/**
|
|
1166
|
-
* Minimal logger interface for suppressing or capturing log output.
|
|
1167
|
-
* Defaults to `console` when not provided, preserving existing behavior.
|
|
1168
|
-
*/
|
|
1169
|
-
export interface Logger {
|
|
1170
|
-
warn(msg: string, ...args: unknown[]): void;
|
|
1171
|
-
error(msg: string, ...args: unknown[]): void;
|
|
1172
|
-
}
|
|
1173
|
-
/**
|
|
1174
|
-
* Middleware function for tool execution.
|
|
1175
|
-
* Wraps tool execution with cross-cutting concerns (logging, abort, confirmation, etc.).
|
|
1176
|
-
*/
|
|
1177
|
-
export type ToolMiddleware = (tool: Tool, input: unknown, context: ToolContext, next: () => Promise<ToolResult>) => Promise<ToolResult>;
|
|
1178
|
-
/**
|
|
1179
|
-
* Registry for managing tools
|
|
1180
|
-
*/
|
|
1181
|
-
export interface ToolRegistry {
|
|
1182
|
-
get(name: string): Tool | undefined;
|
|
1183
|
-
getAll(): Tool[];
|
|
1184
|
-
getToolInfos(): ToolInfo[];
|
|
1185
|
-
register(tool: Tool, options?: RegisterOptions): void;
|
|
1186
|
-
has(name: string): boolean;
|
|
1187
|
-
list(category?: ToolCategory): Tool[];
|
|
1188
|
-
/** Execute a tool by name with input validation against its JSON Schema */
|
|
1189
|
-
execute(name: string, input: unknown, context: ToolContext): Promise<ToolResult>;
|
|
1190
|
-
/** Register a middleware to wrap tool execution (optional — not all implementations support it) */
|
|
1191
|
-
use?(mw: ToolMiddleware): void;
|
|
1192
|
-
}
|