@theoremjs/agents 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +277 -995
- package/esm/mod.d.ts +34 -20
- package/esm/mod.js +19 -12
- package/esm/src/cli/commands/bench.js +36 -14
- package/esm/src/cli/commands/detect-compile.d.ts +17 -0
- package/esm/src/cli/commands/detect-compile.js +22 -0
- package/esm/src/cli/commands/eval.d.ts +3 -3
- package/esm/src/cli/commands/fuzz-canary.js +55 -16
- package/esm/src/cli/commands/profile.js +4 -4
- package/esm/src/cli/commands/run.d.ts +2 -2
- package/esm/src/cli/commands/run.js +1 -1
- package/esm/src/cli/commands/test.d.ts +4 -3
- package/esm/src/cli/commands/test.js +2 -2
- package/esm/src/cli/index.js +9 -9
- package/esm/src/cli/matrix/fixtures.js +25 -30
- package/esm/src/evals/attachments.d.ts +1 -0
- package/esm/src/evals/attachments.js +4 -2
- package/esm/src/evals/breakdown.d.ts +2 -0
- package/esm/src/evals/breakdown.js +1 -0
- package/esm/src/evals/graders/answer.d.ts +3 -0
- package/esm/src/evals/graders/answer.js +1 -0
- package/esm/src/evals/graders/code.d.ts +7 -31
- package/esm/src/evals/graders/code.js +4 -25
- package/esm/src/evals/graders/judge.d.ts +4 -0
- package/esm/src/evals/graders/judge.js +7 -5
- package/esm/src/evals/graders/latency.d.ts +1 -0
- package/esm/src/evals/graders/latency.js +3 -2
- package/esm/src/evals/graders/live.d.ts +3 -0
- package/esm/src/evals/graders/live.js +2 -0
- package/esm/src/evals/graders/media.js +1 -2
- package/esm/src/evals/graders/shared.js +1 -1
- package/esm/src/evals/graders/transcript.d.ts +2 -0
- package/esm/src/evals/graders/transcript.js +5 -3
- package/esm/src/evals/mod.d.ts +1 -9
- package/esm/src/evals/mod.js +1 -9
- package/esm/src/evals/record.d.ts +6 -0
- package/esm/src/evals/record.js +4 -2
- package/esm/src/evals/rubrics/mod.d.ts +1 -1
- package/esm/src/evals/rubrics/mod.js +1 -1
- package/esm/src/evals/rubrics/mustache.js +1 -1
- package/esm/src/evals/rubrics/types.js +1 -1
- package/esm/src/evals/run.d.ts +9 -52
- package/esm/src/evals/run.js +12 -46
- package/esm/src/evals/suite.d.ts +12 -3
- package/esm/src/evals/suite.js +9 -4
- package/esm/src/evals/summary.d.ts +3 -0
- package/esm/src/evals/summary.js +1 -0
- package/esm/src/evals/trial.d.ts +3 -16
- package/esm/src/evals/trial.js +7 -30
- package/esm/src/evals/types.d.ts +30 -121
- package/esm/src/evals/types.js +3 -16
- package/esm/src/evals/verdict.d.ts +5 -0
- package/esm/src/evals/verdict.js +4 -1
- package/esm/src/guardrails/boundaries.d.ts +41 -0
- package/esm/src/guardrails/boundaries.js +103 -0
- package/esm/src/guardrails/canary-gate.d.ts +1 -0
- package/esm/src/guardrails/canary.d.ts +49 -15
- package/esm/src/guardrails/canary.js +103 -30
- package/esm/src/guardrails/compile-egress.d.ts +6 -5
- package/esm/src/guardrails/compile-egress.js +6 -5
- package/esm/src/guardrails/corpus/canary-egress-attacks.d.ts +3 -1
- package/esm/src/guardrails/corpus/canary-egress-attacks.js +4 -2
- package/esm/src/guardrails/corpus/fuzz-inbound.js +14 -17
- package/esm/src/guardrails/corpus/inbound-payloads.d.ts +2 -0
- package/esm/src/guardrails/corpus/inbound-payloads.js +4 -2
- package/esm/src/guardrails/corpus/live-attacks.d.ts +2 -0
- package/esm/src/guardrails/corpus/live-attacks.js +6 -1
- package/esm/src/guardrails/corpus/mod.d.ts +1 -1
- package/esm/src/guardrails/corpus/secrets.d.ts +3 -3
- package/esm/src/guardrails/corpus/secrets.js +2 -2
- package/esm/src/guardrails/corpus/strings.d.ts +1 -1
- package/esm/src/guardrails/corpus/strings.js +1 -1
- package/esm/src/guardrails/corpus/types.d.ts +5 -1
- package/esm/src/guardrails/credential-rules.d.ts +36 -0
- package/esm/src/guardrails/credential-rules.js +3001 -0
- package/esm/src/guardrails/credential-scan.d.ts +45 -0
- package/esm/src/guardrails/credential-scan.js +172 -0
- package/esm/src/guardrails/destinations.d.ts +45 -0
- package/esm/src/guardrails/destinations.js +234 -0
- package/esm/src/guardrails/detect-at.d.ts +107 -0
- package/esm/src/guardrails/detect-at.js +434 -0
- package/esm/src/guardrails/detect-reply.d.ts +61 -0
- package/esm/src/guardrails/detect-reply.js +95 -0
- package/esm/src/guardrails/detect-stream.d.ts +33 -0
- package/esm/src/guardrails/detect-stream.js +77 -0
- package/esm/src/guardrails/detectors.d.ts +216 -0
- package/esm/src/guardrails/detectors.js +503 -0
- package/esm/src/guardrails/egress-automata.d.ts +4 -6
- package/esm/src/guardrails/egress-automata.js +24095 -4572
- package/esm/src/guardrails/egress-compiler.d.ts +38 -16
- package/esm/src/guardrails/egress-compiler.js +254 -60
- package/esm/src/guardrails/egress-patterns.d.ts +4 -2
- package/esm/src/guardrails/egress-patterns.js +6 -2
- package/esm/src/guardrails/egress-stream.d.ts +54 -36
- package/esm/src/guardrails/egress-stream.js +253 -124
- package/esm/src/guardrails/egress-urls.d.ts +6 -3
- package/esm/src/guardrails/egress-urls.js +14 -22
- package/esm/src/guardrails/egress.d.ts +26 -86
- package/esm/src/guardrails/egress.js +59 -309
- package/esm/src/guardrails/error.d.ts +13 -8
- package/esm/src/guardrails/error.js +25 -18
- package/esm/src/guardrails/event-schemas.d.ts +46 -3
- package/esm/src/guardrails/event-schemas.js +12 -5
- package/esm/src/guardrails/events.d.ts +5 -1
- package/esm/src/guardrails/events.js +4 -1
- package/esm/src/guardrails/hints.d.ts +14 -0
- package/esm/src/guardrails/hints.js +57 -0
- package/esm/src/guardrails/hits.d.ts +7 -1
- package/esm/src/guardrails/hits.js +12 -1
- package/esm/src/guardrails/host-patterns.d.ts +85 -0
- package/esm/src/guardrails/host-patterns.js +173 -0
- package/esm/src/guardrails/injection-patterns.d.ts +6 -1
- package/esm/src/guardrails/injection-patterns.js +33 -1
- package/esm/src/guardrails/injection-reversed.d.ts +9 -0
- package/esm/src/guardrails/injection-reversed.js +49 -0
- package/esm/src/guardrails/injection.d.ts +17 -1
- package/esm/src/guardrails/injection.js +259 -36
- package/esm/src/guardrails/labels.d.ts +40 -0
- package/esm/src/guardrails/labels.js +881 -0
- package/esm/src/guardrails/live-outbound-gate.d.ts +9 -8
- package/esm/src/guardrails/live-outbound-gate.js +100 -107
- package/esm/src/guardrails/mod.d.ts +30 -22
- package/esm/src/guardrails/mod.js +19 -14
- package/esm/src/guardrails/network.d.ts +4 -0
- package/esm/src/guardrails/network.js +21 -19
- package/esm/src/guardrails/normalize.d.ts +15 -1
- package/esm/src/guardrails/normalize.js +34 -1
- package/esm/src/guardrails/policy.d.ts +2 -17
- package/esm/src/guardrails/policy.js +12 -41
- package/esm/src/guardrails/progressive-yield.d.ts +65 -24
- package/esm/src/guardrails/progressive-yield.js +191 -147
- package/esm/src/guardrails/prompt-echo.d.ts +4 -2
- package/esm/src/guardrails/prompt-echo.js +87 -6
- package/esm/src/guardrails/quota.d.ts +4 -1
- package/esm/src/guardrails/quota.js +7 -2
- package/esm/src/guardrails/rules.d.ts +20 -29
- package/esm/src/guardrails/rules.js +23 -30
- package/esm/src/guardrails/sanitize.d.ts +32 -15
- package/esm/src/guardrails/sanitize.js +100 -124
- package/esm/src/guardrails/sensitive-groups.d.ts +21 -0
- package/esm/src/guardrails/sensitive-groups.js +12 -0
- package/esm/src/guardrails/sensitive.d.ts +16 -23
- package/esm/src/guardrails/sensitive.js +168 -47
- package/esm/src/guardrails/serialize.d.ts +1 -0
- package/esm/src/guardrails/testing.d.ts +4 -2
- package/esm/src/guardrails/testing.js +4 -2
- package/esm/src/guardrails/theorem-error.d.ts +5 -2
- package/esm/src/guardrails/theorem-error.js +6 -3
- package/esm/src/guardrails/thought-guard.d.ts +34 -13
- package/esm/src/guardrails/thought-guard.js +264 -64
- package/esm/src/guardrails/tool-directives.d.ts +29 -10
- package/esm/src/guardrails/tool-directives.js +133 -47
- package/esm/src/guardrails/tool-leak.d.ts +26 -0
- package/esm/src/guardrails/tool-leak.js +45 -0
- package/esm/src/guardrails/tool-result.d.ts +45 -14
- package/esm/src/guardrails/tool-result.js +94 -70
- package/esm/src/guardrails/types.d.ts +79 -71
- package/esm/src/guardrails/types.js +11 -7
- package/esm/src/host/client-turn.d.ts +29 -2
- package/esm/src/host/client-turn.js +46 -4
- package/esm/src/host/mint-trace.d.ts +1 -0
- package/esm/src/host/mint-trace.js +3 -2
- package/esm/src/host/mod.d.ts +2 -2
- package/esm/src/host/mod.js +1 -1
- package/esm/src/host/readStreamingJsonStringField.js +2 -43
- package/esm/src/host/reply.d.ts +6 -0
- package/esm/src/host/reply.js +8 -1
- package/esm/src/interface/blocks.d.ts +3 -0
- package/esm/src/interface/blocks.js +84 -14
- package/esm/src/interface/composer-actions.d.ts +4 -0
- package/esm/src/interface/composer-actions.js +5 -3
- package/esm/src/interface/draft.d.ts +6 -0
- package/esm/src/interface/draft.js +22 -11
- package/esm/src/interface/from-profile.d.ts +13 -1
- package/esm/src/interface/from-profile.js +66 -31
- package/esm/src/interface/history.d.ts +9 -3
- package/esm/src/interface/history.js +33 -24
- package/esm/src/interface/inputs.d.ts +1 -0
- package/esm/src/interface/inputs.js +3 -0
- package/esm/src/interface/mod.d.ts +4 -2
- package/esm/src/interface/mod.js +3 -2
- package/esm/src/interface/models.d.ts +7 -0
- package/esm/src/interface/models.js +5 -0
- package/esm/src/interface/pending.d.ts +9 -0
- package/esm/src/interface/pending.js +9 -3
- package/esm/src/interface/profile-interface.js +54 -40
- package/esm/src/interface/session.d.ts +12 -5
- package/esm/src/interface/session.js +17 -10
- package/esm/src/interface/stop.d.ts +13 -0
- package/esm/src/interface/stop.js +28 -0
- package/esm/src/interface/tool-calls.d.ts +14 -2
- package/esm/src/interface/tool-calls.js +64 -10
- package/esm/src/interface/tool-invoke.d.ts +2 -0
- package/esm/src/interface/tool-invoke.js +3 -1
- package/esm/src/interface/tool-media.d.ts +2 -0
- package/esm/src/interface/tool-media.js +2 -1
- package/esm/src/interface/types.d.ts +105 -40
- package/esm/src/interface/types.js +1 -0
- package/esm/src/kernel/api-catalog.d.ts +85 -0
- package/esm/src/kernel/api-catalog.js +229 -0
- package/esm/src/kernel/auth/crypto.d.ts +7 -2
- package/esm/src/kernel/auth/crypto.js +12 -10
- package/esm/src/kernel/auth/oauth.d.ts +2 -1
- package/esm/src/kernel/auth/oauth.js +23 -22
- package/esm/src/kernel/auth/typed-secret.js +2 -2
- package/esm/src/kernel/auth/types.d.ts +13 -0
- package/esm/src/kernel/checkpoint.d.ts +43 -0
- package/esm/src/kernel/checkpoint.js +58 -0
- package/esm/src/kernel/default-scope.d.ts +43 -5
- package/esm/src/kernel/default-scope.js +54 -5
- package/esm/src/kernel/engine/call-trace.d.ts +19 -0
- package/esm/src/kernel/engine/call-trace.js +29 -0
- package/esm/src/kernel/engine/compaction.d.ts +6 -5
- package/esm/src/kernel/engine/compaction.js +12 -11
- package/esm/src/kernel/engine/decision.d.ts +10 -8
- package/esm/src/kernel/engine/decision.js +174 -146
- package/esm/src/kernel/engine/embedding.d.ts +8 -0
- package/esm/src/kernel/engine/embedding.js +118 -0
- package/esm/src/kernel/engine/live-inbound.d.ts +14 -4
- package/esm/src/kernel/engine/live-inbound.js +36 -11
- package/esm/src/kernel/engine/live-ingress.d.ts +6 -0
- package/esm/src/kernel/engine/live-ingress.js +6 -1
- package/esm/src/kernel/engine/repair.js +12 -12
- package/esm/src/kernel/engine/runner/gates.d.ts +2 -2
- package/esm/src/kernel/engine/runner/gates.js +287 -101
- package/esm/src/kernel/engine/runner/mod.d.ts +19 -5
- package/esm/src/kernel/engine/runner/mod.js +107 -56
- package/esm/src/kernel/engine/runner/nested.d.ts +32 -0
- package/esm/src/kernel/engine/runner/nested.js +134 -0
- package/esm/src/kernel/engine/runner/schema-validation.d.ts +24 -3
- package/esm/src/kernel/engine/runner/schema-validation.js +78 -4
- package/esm/src/kernel/engine/runner/stages.d.ts +1 -1
- package/esm/src/kernel/engine/runner/stages.js +1 -8
- package/esm/src/kernel/engine/runner/state.d.ts +33 -12
- package/esm/src/kernel/engine/runner/state.js +11 -1
- package/esm/src/kernel/engine/runner/step-order.d.ts +27 -0
- package/esm/src/kernel/engine/runner/step-order.js +165 -0
- package/esm/src/kernel/engine/runner/steps.d.ts +2 -2
- package/esm/src/kernel/engine/runner/steps.js +329 -169
- package/esm/src/kernel/engine/runner/stream.d.ts +42 -11
- package/esm/src/kernel/engine/runner/stream.js +197 -46
- package/esm/src/kernel/engine/runner/usage.d.ts +5 -5
- package/esm/src/kernel/engine/runner/usage.js +12 -14
- package/esm/src/kernel/engine/session/mod.d.ts +8 -6
- package/esm/src/kernel/engine/session/mod.js +360 -129
- package/esm/src/kernel/engine/session/session-trace.d.ts +10 -10
- package/esm/src/kernel/engine/session/session-trace.js +41 -30
- package/esm/src/kernel/engine/token-estimate.d.ts +10 -64
- package/esm/src/kernel/engine/token-estimate.js +14 -194
- package/esm/src/kernel/engine/tool-trace.d.ts +3 -3
- package/esm/src/kernel/engine/tool-trace.js +2 -1
- package/esm/src/kernel/engine/turn-trace.d.ts +8 -7
- package/esm/src/kernel/engine/turn-trace.js +28 -36
- package/esm/src/kernel/engine/usage.d.ts +6 -0
- package/esm/src/kernel/engine/usage.js +17 -0
- package/esm/src/kernel/interaction-parts.d.ts +3 -0
- package/esm/src/kernel/interaction-parts.js +18 -0
- package/esm/src/kernel/json.d.ts +10 -0
- package/esm/src/kernel/json.js +3 -0
- package/esm/src/kernel/mod.d.ts +38 -11
- package/esm/src/kernel/mod.js +22 -7
- package/esm/src/kernel/profile-graph.d.ts +11 -6
- package/esm/src/kernel/profile-graph.js +14 -7
- package/esm/src/kernel/profile-presence.d.ts +10 -1
- package/esm/src/kernel/profile-presence.js +90 -75
- package/esm/src/kernel/profile-scope.d.ts +7 -3
- package/esm/src/kernel/profile-scope.js +67 -55
- package/esm/src/kernel/protocols/binding.d.ts +65 -0
- package/esm/src/kernel/protocols/binding.js +125 -0
- package/esm/src/kernel/protocols/limits.d.ts +15 -0
- package/esm/src/kernel/protocols/limits.js +28 -0
- package/esm/src/kernel/protocols/mod.d.ts +5 -0
- package/esm/src/kernel/protocols/mod.js +5 -0
- package/esm/src/kernel/protocols/prices.d.ts +36 -0
- package/esm/src/kernel/protocols/prices.js +37 -0
- package/esm/src/kernel/protocols/protocol.d.ts +253 -0
- package/esm/src/kernel/protocols/protocol.js +253 -0
- package/esm/src/kernel/protocols/provider.d.ts +108 -0
- package/esm/src/kernel/protocols/provider.js +143 -0
- package/esm/src/kernel/protocols/runtime.d.ts +55 -0
- package/esm/src/kernel/protocols/runtime.js +534 -0
- package/esm/src/kernel/provider-budget.d.ts +32 -0
- package/esm/src/kernel/provider-budget.js +262 -0
- package/esm/src/kernel/provider-dispatch.d.ts +13 -0
- package/esm/src/kernel/provider-dispatch.js +36 -0
- package/esm/src/kernel/provider-live.d.ts +7 -0
- package/esm/src/kernel/provider-live.js +189 -0
- package/esm/src/kernel/provider-runtime.d.ts +57 -0
- package/esm/src/kernel/provider-runtime.js +524 -0
- package/esm/src/kernel/registry/attachments.d.ts +15 -4
- package/esm/src/kernel/registry/attachments.js +31 -22
- package/esm/src/kernel/registry/catalog.d.ts +6 -0
- package/esm/src/kernel/registry/catalog.js +9 -2
- package/esm/src/kernel/registry/embedding-rules.d.ts +28 -0
- package/esm/src/kernel/registry/embedding-rules.js +66 -0
- package/esm/src/kernel/registry/ingress.d.ts +6 -2
- package/esm/src/kernel/registry/ingress.js +55 -10
- package/esm/src/kernel/registry/kernel-registry.d.ts +3 -0
- package/esm/src/kernel/registry/kernel-registry.js +9 -2
- package/esm/src/kernel/registry/profile-outputs.js +4 -1
- package/esm/src/kernel/registry/profiles.d.ts +38 -14
- package/esm/src/kernel/registry/profiles.js +280 -205
- package/esm/src/kernel/registry/provider-request.d.ts +3 -3
- package/esm/src/kernel/registry/provider-request.js +5 -13
- package/esm/src/kernel/registry/resolve.d.ts +4 -1
- package/esm/src/kernel/registry/resolve.js +59 -58
- package/esm/src/kernel/registry/schemas.d.ts +3 -0
- package/esm/src/kernel/registry/schemas.js +3 -1
- package/esm/src/kernel/registry/slot-fill.d.ts +7 -0
- package/esm/src/kernel/registry/slot-fill.js +22 -0
- package/esm/src/kernel/registry/system-prompt.js +7 -8
- package/esm/src/kernel/registry/vault.d.ts +14 -13
- package/esm/src/kernel/registry/vault.js +1 -14
- package/esm/src/kernel/schema.d.ts +100 -46
- package/esm/src/kernel/schema.js +499 -257
- package/esm/src/kernel/scope.d.ts +12 -5
- package/esm/src/kernel/scope.js +23 -3
- package/esm/src/kernel/stages.d.ts +38 -3
- package/esm/src/kernel/stages.js +82 -39
- package/esm/src/kernel/stop.d.ts +29 -6
- package/esm/src/kernel/stop.js +16 -4
- package/esm/src/kernel/system-parts.js +6 -6
- package/esm/src/kernel/tools/activity-label.d.ts +12 -6
- package/esm/src/kernel/tools/activity-label.js +258 -32
- package/esm/src/kernel/tools/agent.d.ts +66 -0
- package/esm/src/kernel/tools/agent.js +212 -0
- package/esm/src/kernel/tools/coordinate.d.ts +4 -0
- package/esm/src/kernel/tools/coordinate.js +165 -0
- package/esm/src/kernel/tools/events.d.ts +21 -6
- package/esm/src/kernel/tools/events.js +53 -18
- package/esm/src/kernel/tools/execute.d.ts +47 -11
- package/esm/src/kernel/tools/execute.js +508 -136
- package/esm/src/kernel/tools/gate-answer.d.ts +12 -2
- package/esm/src/kernel/tools/gate-answer.js +17 -6
- package/esm/src/kernel/tools/handler-events.d.ts +45 -0
- package/esm/src/kernel/tools/handler-events.js +106 -0
- package/esm/src/kernel/tools/harness.d.ts +1 -0
- package/esm/src/kernel/tools/harness.js +2 -1
- package/esm/src/kernel/tools/http-limit.d.ts +27 -0
- package/esm/src/kernel/tools/http-limit.js +85 -0
- package/esm/src/kernel/tools/invoke.d.ts +27 -5
- package/esm/src/kernel/tools/invoke.js +223 -70
- package/esm/src/kernel/tools/mcp-sessions.d.ts +4 -1
- package/esm/src/kernel/tools/mcp-sessions.js +13 -8
- package/esm/src/kernel/tools/mod.d.ts +4 -3
- package/esm/src/kernel/tools/mod.js +3 -2
- package/esm/src/kernel/tools/model-text.d.ts +10 -5
- package/esm/src/kernel/tools/model-text.js +18 -12
- package/esm/src/kernel/tools/operation.d.ts +76 -0
- package/esm/src/kernel/tools/operation.js +100 -0
- package/esm/src/kernel/tools/page-answer.d.ts +8 -0
- package/esm/src/kernel/tools/page-answer.js +19 -0
- package/esm/src/kernel/tools/permission.d.ts +11 -2
- package/esm/src/kernel/tools/permission.js +12 -12
- package/esm/src/kernel/tools/project.d.ts +4 -1
- package/esm/src/kernel/tools/project.js +32 -2
- package/esm/src/kernel/tools/registry.d.ts +9 -2
- package/esm/src/kernel/tools/registry.js +69 -10
- package/esm/src/kernel/tools/remote.d.ts +40 -6
- package/esm/src/kernel/tools/remote.js +219 -92
- package/esm/src/kernel/tools/resolve.d.ts +3 -0
- package/esm/src/kernel/tools/resolve.js +12 -4
- package/esm/src/kernel/tools/run.d.ts +28 -0
- package/esm/src/kernel/tools/run.js +86 -0
- package/esm/src/kernel/tools/schema.d.ts +3 -3
- package/esm/src/kernel/tools/schema.js +21 -100
- package/esm/src/kernel/tools/signed-in-fetch.d.ts +2 -1
- package/esm/src/kernel/tools/signed-in-fetch.js +3 -3
- package/esm/src/kernel/tools/stage-run.d.ts +27 -4
- package/esm/src/kernel/tools/stage-run.js +75 -17
- package/esm/src/kernel/tools/types.d.ts +235 -25
- package/esm/src/kernel/tools/unchecked-output.d.ts +14 -0
- package/esm/src/kernel/tools/unchecked-output.js +18 -0
- package/esm/src/kernel/turn-events.d.ts +208 -31
- package/esm/src/kernel/turn-events.js +127 -9
- package/esm/src/kernel/types.d.ts +302 -161
- package/esm/src/kernel/util/base64.d.ts +2 -0
- package/esm/src/kernel/util/base64.js +2 -0
- package/esm/src/kernel/util/partial-json.d.ts +23 -0
- package/esm/src/kernel/util/partial-json.js +128 -0
- package/esm/src/kernel/util/record.d.ts +1 -0
- package/esm/src/kernel/util/record.js +1 -0
- package/esm/src/observability/destinations.d.ts +5 -0
- package/esm/src/observability/destinations.js +7 -2
- package/esm/src/observability/jsonl.d.ts +2 -2
- package/esm/src/observability/jsonl.js +15 -22
- package/esm/src/observability/mod.d.ts +3 -3
- package/esm/src/observability/mod.js +2 -2
- package/esm/src/observability/openinference.d.ts +1 -1
- package/esm/src/observability/openinference.js +3 -3
- package/esm/src/observability/otlp.d.ts +3 -0
- package/esm/src/observability/otlp.js +3 -3
- package/esm/src/observability/phoenix.d.ts +1 -0
- package/esm/src/observability/policy.d.ts +3 -0
- package/esm/src/observability/policy.js +5 -1
- package/esm/src/observability/resolve-policy.js +11 -5
- package/esm/src/observability/spans.d.ts +8 -2
- package/esm/src/observability/spans.js +21 -5
- package/esm/src/observability/trace-catalog.d.ts +19 -2
- package/esm/src/observability/trace-catalog.js +130 -88
- package/esm/src/observability/trace-record.js +22 -17
- package/esm/src/observability/trace-schema.d.ts +3 -0
- package/esm/src/observability/trace-schema.js +1 -1
- package/esm/src/observability/trace-sink.d.ts +1 -0
- package/esm/src/observability/trace-sink.js +1 -1
- package/esm/src/observability/trace-span.d.ts +7 -1
- package/esm/src/observability/trace-span.js +3 -1
- package/esm/src/observability/trace.d.ts +2 -0
- package/esm/src/observability/trace.js +4 -2
- package/esm/src/observability/types.d.ts +35 -11
- package/esm/src/observability/types.js +1 -1
- package/esm/src/presets/google/speech-voices.d.ts +1 -0
- package/esm/src/presets/google-limits.d.ts +1 -0
- package/esm/src/presets/google.d.ts +27 -12
- package/esm/src/presets/google.js +34 -25
- package/esm/src/presets/local.d.ts +26 -0
- package/esm/src/presets/local.js +30 -0
- package/esm/src/presets/mod.d.ts +5 -4
- package/esm/src/presets/mod.js +4 -4
- package/esm/src/presets/openrouter.d.ts +14 -1
- package/esm/src/presets/openrouter.js +19 -1
- package/esm/src/providers/embedding-limits.d.ts +7 -0
- package/esm/src/providers/embedding-limits.js +12 -0
- package/esm/src/providers/gemini/embedding-protocol.d.ts +8 -0
- package/esm/src/providers/gemini/embedding-protocol.js +125 -0
- package/esm/src/providers/gemini/interactions-protocol.d.ts +8 -0
- package/esm/src/providers/gemini/interactions-protocol.js +102 -0
- package/esm/src/providers/gemini/live-protocol.d.ts +3 -0
- package/esm/src/providers/gemini/live-protocol.js +191 -0
- package/esm/src/providers/gemini/prices.d.ts +3 -0
- package/esm/src/providers/gemini/prices.js +63 -0
- package/esm/src/providers/gemini/provider.d.ts +7 -0
- package/esm/src/providers/gemini/provider.js +39 -0
- package/esm/src/providers/google/api-error.d.ts +2 -0
- package/esm/src/providers/google/api-error.js +26 -18
- package/esm/src/providers/google/builtins.d.ts +14 -0
- package/esm/src/providers/google/builtins.js +57 -0
- package/esm/src/providers/google/grounding.d.ts +4 -4
- package/esm/src/providers/google/interactions/framing.d.ts +20 -8
- package/esm/src/providers/google/interactions/framing.js +85 -44
- package/esm/src/providers/google/interactions/steps.d.ts +5 -5
- package/esm/src/providers/google/interactions/steps.js +4 -4
- package/esm/src/providers/google/interactions/stream.d.ts +10 -11
- package/esm/src/providers/google/interactions/stream.js +33 -100
- package/esm/src/providers/google/live/framing.d.ts +15 -5
- package/esm/src/providers/google/live/framing.js +25 -25
- package/esm/src/providers/google/live/stream.d.ts +6 -44
- package/esm/src/providers/google/live/stream.js +4 -210
- package/esm/src/providers/google/urls.d.ts +1 -3
- package/esm/src/providers/google/urls.js +1 -3
- package/esm/src/providers/google/usage.js +2 -2
- package/esm/src/providers/live.d.ts +6 -0
- package/esm/src/providers/live.js +6 -0
- package/esm/src/providers/local/embedding-protocol.d.ts +7 -0
- package/esm/src/providers/local/embedding-protocol.js +60 -0
- package/esm/src/providers/local/provider.d.ts +7 -0
- package/esm/src/providers/local/provider.js +28 -0
- package/esm/src/providers/mod.d.ts +28 -7
- package/esm/src/providers/mod.js +19 -3
- package/esm/src/providers/open-ai/protocol.d.ts +3 -0
- package/esm/src/providers/open-ai/protocol.js +189 -0
- package/esm/src/providers/openrouter/embedding-protocol.d.ts +6 -0
- package/esm/src/providers/openrouter/embedding-protocol.js +86 -0
- package/esm/src/providers/openrouter/image.d.ts +0 -9
- package/esm/src/providers/openrouter/image.js +0 -153
- package/esm/src/providers/openrouter/images-protocol.d.ts +3 -0
- package/esm/src/providers/openrouter/images-protocol.js +82 -0
- package/esm/src/providers/openrouter/openai/compat.d.ts +2 -2
- package/esm/src/providers/openrouter/openai/compat.js +6 -6
- package/esm/src/providers/openrouter/openai/image-payload.d.ts +2 -2
- package/esm/src/providers/openrouter/openai/reasoning-state.d.ts +2 -0
- package/esm/src/providers/openrouter/openai/reasoning-state.js +31 -0
- package/esm/src/providers/openrouter/protocol.d.ts +8 -0
- package/esm/src/providers/openrouter/protocol.js +171 -0
- package/esm/src/providers/openrouter/provider.d.ts +10 -0
- package/esm/src/providers/openrouter/provider.js +50 -0
- package/esm/src/providers/shared/carried-tool-files.d.ts +7 -0
- package/esm/src/providers/shared/carried-tool-files.js +43 -0
- package/esm/src/providers/shared/pcm.js +2 -2
- package/esm/src/providers/shared/protocol-events.d.ts +8 -0
- package/esm/src/providers/shared/protocol-events.js +20 -0
- package/esm/src/providers/shared/response-identity.d.ts +2 -2
- package/esm/src/providers/shared/retry.d.ts +18 -0
- package/esm/src/providers/shared/retry.js +89 -0
- package/esm/src/providers/shared/sse.d.ts +0 -4
- package/esm/src/providers/shared/sse.js +50 -36
- package/esm/src/providers/shared/tool-args.d.ts +6 -7
- package/esm/src/providers/shared/tool-args.js +10 -6
- package/esm/src/providers/shared/tool-draft.d.ts +16 -0
- package/esm/src/providers/shared/tool-draft.js +14 -0
- package/esm/src/providers/shared/upstream-tap.d.ts +2 -2
- package/esm/src/providers/shared/upstream-tape.js +1 -1
- package/esm/src/providers/system-one/protocol.d.ts +8 -0
- package/esm/src/providers/system-one/protocol.js +93 -0
- package/esm/src/providers/types.d.ts +48 -16
- package/esm/src/providers/types.js +2 -1
- package/esm/src/providers/typesafe/provider.d.ts +7 -0
- package/esm/src/providers/typesafe/provider.js +24 -0
- package/esm/src/surface/formats.d.ts +19 -1
- package/esm/src/surface/formats.js +68 -29
- package/esm/src/surface/mod.d.ts +4 -2
- package/esm/src/surface/mod.js +4 -2
- package/esm/src/surface/runtime.d.ts +4 -0
- package/esm/src/surface/runtime.js +2 -0
- package/esm/src/surface/tools.d.ts +2 -8
- package/esm/src/surface/tools.js +4 -22
- package/esm/src/surface/types.d.ts +6 -0
- package/package.json +5 -13
- package/esm/src/cli/commands/egress-compile.d.ts +0 -17
- package/esm/src/cli/commands/egress-compile.js +0 -25
- package/esm/src/guardrails/egress-policy.d.ts +0 -27
- package/esm/src/guardrails/egress-policy.js +0 -76
- package/esm/src/guardrails/egress-rules.d.ts +0 -54
- package/esm/src/guardrails/egress-rules.js +0 -49
- package/esm/src/guardrails/lexicon.d.ts +0 -30
- package/esm/src/guardrails/lexicon.js +0 -478
- package/esm/src/kernel/engine/media-probe/audio.d.ts +0 -7
- package/esm/src/kernel/engine/media-probe/audio.js +0 -342
- package/esm/src/kernel/engine/media-probe/bytes.d.ts +0 -6
- package/esm/src/kernel/engine/media-probe/bytes.js +0 -26
- package/esm/src/kernel/engine/media-probe/image.d.ts +0 -5
- package/esm/src/kernel/engine/media-probe/image.js +0 -171
- package/esm/src/kernel/engine/media-probe/iso-bmff.d.ts +0 -19
- package/esm/src/kernel/engine/media-probe/iso-bmff.js +0 -48
- package/esm/src/kernel/engine/media-probe/matroska.d.ts +0 -35
- package/esm/src/kernel/engine/media-probe/matroska.js +0 -226
- package/esm/src/kernel/engine/media-probe/mp4.d.ts +0 -22
- package/esm/src/kernel/engine/media-probe/mp4.js +0 -279
- package/esm/src/kernel/engine/media-probe/opus.d.ts +0 -4
- package/esm/src/kernel/engine/media-probe/opus.js +0 -23
- package/esm/src/kernel/engine/media-probe/pdf.d.ts +0 -5
- package/esm/src/kernel/engine/media-probe/pdf.js +0 -117
- package/esm/src/kernel/engine/media-probe/video.d.ts +0 -15
- package/esm/src/kernel/engine/media-probe/video.js +0 -49
- package/esm/src/presets/typesafe.d.ts +0 -2
- package/esm/src/presets/typesafe.js +0 -2
- package/esm/src/providers/create-provider.d.ts +0 -21
- package/esm/src/providers/create-provider.js +0 -90
- package/esm/src/providers/decision/usage.d.ts +0 -3
- package/esm/src/providers/decision/usage.js +0 -25
- package/esm/src/providers/google/interactions/mod.d.ts +0 -2
- package/esm/src/providers/google/interactions/mod.js +0 -2
- package/esm/src/providers/google/keys.d.ts +0 -20
- package/esm/src/providers/google/keys.js +0 -87
- package/esm/src/providers/google/live/mod.d.ts +0 -7
- package/esm/src/providers/google/live/mod.js +0 -7
- package/esm/src/providers/google/live/openapi-schema.d.ts +0 -1
- package/esm/src/providers/google/live/openapi-schema.js +0 -42
- package/esm/src/providers/google/live/session.d.ts +0 -14
- package/esm/src/providers/google/live/session.js +0 -150
- package/esm/src/providers/local/local.d.ts +0 -12
- package/esm/src/providers/local/local.js +0 -186
- package/esm/src/providers/local/mod.d.ts +0 -8
- package/esm/src/providers/local/mod.js +0 -8
- package/esm/src/providers/openrouter/cache-control.d.ts +0 -5
- package/esm/src/providers/openrouter/cache-control.js +0 -4
- package/esm/src/providers/openrouter/chat.d.ts +0 -64
- package/esm/src/providers/openrouter/chat.js +0 -490
- package/esm/src/providers/openrouter/openai/sdk-messages.d.ts +0 -10
- package/esm/src/providers/openrouter/openai/sdk-messages.js +0 -99
- package/esm/src/providers/openrouter/resolve-api-key.d.ts +0 -3
- package/esm/src/providers/openrouter/resolve-api-key.js +0 -8
- package/esm/src/providers/openrouter/speech.d.ts +0 -18
- package/esm/src/providers/openrouter/speech.js +0 -109
- package/esm/src/providers/probe.d.ts +0 -5
- package/esm/src/providers/probe.js +0 -15
- package/esm/src/providers/shared/builtin-wire.d.ts +0 -4
- package/esm/src/providers/shared/builtin-wire.js +0 -9
- package/esm/src/providers/shared/vault.d.ts +0 -13
- package/esm/src/providers/shared/vault.js +0 -41
|
@@ -61,19 +61,23 @@ export function historyToolArguments(raw) {
|
|
|
61
61
|
export function toolCallEvents(call, rawArguments) {
|
|
62
62
|
const name = call.name.trim();
|
|
63
63
|
const base = { name, callId: call.id ?? newCallId(name) };
|
|
64
|
+
const request = {
|
|
65
|
+
stepId: call.stepId,
|
|
66
|
+
stepCallCount: call.stepCallCount,
|
|
67
|
+
};
|
|
64
68
|
if (!name) {
|
|
65
|
-
return malformedToolCall(base, 'function call is missing a name', rawArguments,
|
|
69
|
+
return malformedToolCall(base, 'function call is missing a name', rawArguments, request);
|
|
66
70
|
}
|
|
67
71
|
const parsed = parseToolArgumentsObject(rawArguments);
|
|
68
72
|
if (!parsed.ok) {
|
|
69
|
-
return malformedToolCall(base, parsed.error, parsed.raw,
|
|
73
|
+
return malformedToolCall(base, parsed.error, parsed.raw, request);
|
|
70
74
|
}
|
|
71
|
-
return [toolCallRequestEvent(base, parsed.value,
|
|
75
|
+
return [toolCallRequestEvent(base, parsed.value, request)];
|
|
72
76
|
}
|
|
73
|
-
/**
|
|
74
|
-
export function malformedToolCall(base, message, raw,
|
|
77
|
+
/** The model still reads the failed call's result back. */
|
|
78
|
+
export function malformedToolCall(base, message, raw, request = {}) {
|
|
75
79
|
return [
|
|
76
|
-
toolCallRequestEvent(base, {},
|
|
80
|
+
toolCallRequestEvent(base, {}, request),
|
|
77
81
|
failureEvent(base, {
|
|
78
82
|
code: 'malformed_arguments',
|
|
79
83
|
kind: 'bad_response',
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ModelEvent } from '../../kernel/types.js';
|
|
2
|
+
/** A tool call a provider is streaming: its id and name as far as they have come, and its arguments' text. */
|
|
3
|
+
export interface StreamingToolCall {
|
|
4
|
+
id?: string;
|
|
5
|
+
name: string;
|
|
6
|
+
args: string;
|
|
7
|
+
/** How much of `args` has gone out as `tool_draft` events. */
|
|
8
|
+
drafted?: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The `tool_draft` event for what `call.args` has gained since it last drafted, and advances
|
|
12
|
+
* `call.drafted`. Nothing until the call has an id and a name: the call is emitted under that id,
|
|
13
|
+
* and its draft is joined to it by that id alone. Whatever came before then goes out in the first
|
|
14
|
+
* draft.
|
|
15
|
+
*/
|
|
16
|
+
export declare function toolDraftEvents(call: StreamingToolCall): ModelEvent[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `tool_draft` event for what `call.args` has gained since it last drafted, and advances
|
|
3
|
+
* `call.drafted`. Nothing until the call has an id and a name: the call is emitted under that id,
|
|
4
|
+
* and its draft is joined to it by that id alone. Whatever came before then goes out in the first
|
|
5
|
+
* draft.
|
|
6
|
+
*/
|
|
7
|
+
export function toolDraftEvents(call) {
|
|
8
|
+
const name = call.name.trim();
|
|
9
|
+
const from = call.drafted ?? 0;
|
|
10
|
+
if (!(call.id && name) || call.args.length <= from)
|
|
11
|
+
return [];
|
|
12
|
+
call.drafted = call.args.length;
|
|
13
|
+
return [{ type: 'tool_draft', callId: call.id, name, text: call.args.slice(from) }];
|
|
14
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { KeySlot,
|
|
1
|
+
import type { KeySlot, ModelRequest } from '../../kernel/types.js';
|
|
2
2
|
export declare function tapeHeaderValue(key: string, value: string): string;
|
|
3
3
|
export declare function tapeHeaders(headers?: HeadersInit): Record<string, string>;
|
|
4
4
|
export declare function throwRow(err: unknown): Record<string, unknown>;
|
|
5
|
-
export declare function tapFetch(tap:
|
|
5
|
+
export declare function tapFetch(tap: ModelRequest['tapUpstream'], send?: typeof fetch, keySlot?: KeySlot): typeof fetch;
|
|
6
6
|
/** fetch rejects only when no response came back, so any non-abort, non-timeout rejection is `network`. */
|
|
7
7
|
export declare function networkError(err: unknown): unknown;
|
|
8
8
|
export declare function networkFetch(send?: typeof fetch): typeof fetch;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { redactCanaryText } from '../../guardrails/canary.js';
|
|
2
2
|
import { sha256, sha256Base64 } from '../../kernel/engine/hash.js';
|
|
3
3
|
import { mapStrings } from '../../kernel/engine/tree.js';
|
|
4
|
-
/*
|
|
4
|
+
/*invariant:
|
|
5
5
|
* Inline bytes on a taped row are stored as their sha256, never as bytes.
|
|
6
6
|
* The shapes are the ones every taped transport sends (probes 23/09/2026):
|
|
7
7
|
*
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Protocol } from '../../kernel/protocols/mod.js';
|
|
2
|
+
/** What a System One binding may set. Both are TypeSafe's opt-in "danger zone" headers. */
|
|
3
|
+
export interface SystemOneOptions {
|
|
4
|
+
images?: boolean;
|
|
5
|
+
longContext?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** TypeSafe's decision API: questions about a state, answered in one call. */
|
|
8
|
+
export declare const systemOne: Protocol<SystemOneOptions>;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TheoremError } from '../../guardrails/error.js';
|
|
3
|
+
import { labelText } from '../../guardrails/labels.js';
|
|
4
|
+
import { jsonObjectSchema } from '../../kernel/json.js';
|
|
5
|
+
import { defineProtocol } from '../../kernel/protocols/mod.js';
|
|
6
|
+
const count = z.number().int().nonnegative();
|
|
7
|
+
const reply = z.object({
|
|
8
|
+
model: z.string().min(1),
|
|
9
|
+
answers: z.record(z.string(), z.unknown()),
|
|
10
|
+
usage: z
|
|
11
|
+
.object({
|
|
12
|
+
input_tokens: count,
|
|
13
|
+
output_tokens: count,
|
|
14
|
+
cost: z.number().nonnegative().optional(),
|
|
15
|
+
})
|
|
16
|
+
.optional()
|
|
17
|
+
.catch(undefined),
|
|
18
|
+
});
|
|
19
|
+
const options = z.strictObject({
|
|
20
|
+
images: z.boolean().optional().describe(
|
|
21
|
+
// labels-exempt: builder field description, read by the studio and docs
|
|
22
|
+
'Let a decision hold images and box questions. TypeSafe calls this experimental, and a request that uses either is refused without it.'),
|
|
23
|
+
longContext: z.boolean().optional().describe(
|
|
24
|
+
// labels-exempt: builder field description, read by the studio and docs
|
|
25
|
+
'Raise the context window from 64k tokens to 262k. TypeSafe calls this slower and less accurate.'),
|
|
26
|
+
});
|
|
27
|
+
const IMAGES_HEADER = 'TypeSafe-Danger-Zone-Images';
|
|
28
|
+
const LONG_CONTEXT_HEADER = 'TypeSafe-Danger-Zone-Long-Context';
|
|
29
|
+
/** TypeSafe's decision API: questions about a state, answered in one call. */
|
|
30
|
+
export const systemOne = defineProtocol({
|
|
31
|
+
id: 'systemOne',
|
|
32
|
+
name: 'System One',
|
|
33
|
+
description: "TypeSafe's decision API: questions about a state, answered in one call.", // labels-exempt: builder field description, read by the studio and docs
|
|
34
|
+
endpoints: { decision: '/systemone' },
|
|
35
|
+
options,
|
|
36
|
+
create(context) {
|
|
37
|
+
return {
|
|
38
|
+
async decide(request) {
|
|
39
|
+
const asksBox = Object.values(request.questions).some(({ type }) => type === 'box');
|
|
40
|
+
const holdsImages = asksBox || (request.assets && Object.keys(request.assets).length > 0);
|
|
41
|
+
if (holdsImages && !context.options.images)
|
|
42
|
+
throw new TheoremError('unsupported', labelText('provider.decision_images_off'));
|
|
43
|
+
// why: Only a pinned 1.13 is known to refuse a box; aliases such as `jev-latest` move, so they pass.
|
|
44
|
+
if (asksBox && /^jev-1\.13(\.|$)/.test(context.apiId))
|
|
45
|
+
throw new TheoremError('unsupported', labelText('provider.decision_box_model', { apiId: context.apiId }));
|
|
46
|
+
const headers = {};
|
|
47
|
+
if (holdsImages)
|
|
48
|
+
headers[IMAGES_HEADER] = 'true';
|
|
49
|
+
if (context.options.longContext)
|
|
50
|
+
headers[LONG_CONTEXT_HEADER] = 'true';
|
|
51
|
+
const body = jsonObjectSchema.parse({
|
|
52
|
+
model: context.apiId,
|
|
53
|
+
state: request.state,
|
|
54
|
+
questions: request.questions,
|
|
55
|
+
...(request.assets && Object.keys(request.assets).length
|
|
56
|
+
? { assets: assetsOnWire(request.assets) }
|
|
57
|
+
: {}),
|
|
58
|
+
});
|
|
59
|
+
for await (const row of context.send(body, { stream: false, headers })) {
|
|
60
|
+
const parsed = reply.safeParse(row);
|
|
61
|
+
if (!parsed.success)
|
|
62
|
+
throw new TheoremError('bad_response', labelText('protocol.reply_shape', {
|
|
63
|
+
protocol: 'systemOne',
|
|
64
|
+
issues: z.prettifyError(parsed.error),
|
|
65
|
+
}));
|
|
66
|
+
const { model, answers, usage } = parsed.data;
|
|
67
|
+
// invariant: The kernel validates every answer against its question before exposing it.
|
|
68
|
+
return {
|
|
69
|
+
model,
|
|
70
|
+
answers: answers,
|
|
71
|
+
...(usage
|
|
72
|
+
? {
|
|
73
|
+
usage: {
|
|
74
|
+
inputTokens: usage.input_tokens,
|
|
75
|
+
outputTokens: usage.output_tokens,
|
|
76
|
+
...(usage.cost === undefined ? {} : { costUsd: usage.cost }),
|
|
77
|
+
},
|
|
78
|
+
}
|
|
79
|
+
: {}),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
throw new TheoremError('bad_response', labelText('provider.decision_failed'));
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
const FORMATS = { 'image/png': 'png', 'image/jpeg': 'jpeg' };
|
|
88
|
+
function assetsOnWire(assets) {
|
|
89
|
+
return Object.fromEntries(Object.entries(assets).map(([reference, { mimeType, data }]) => [
|
|
90
|
+
reference,
|
|
91
|
+
{ type: 'image', format: FORMATS[mimeType], data_base64: data },
|
|
92
|
+
]));
|
|
93
|
+
}
|
|
@@ -1,19 +1,51 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import type { TheoremError } from '../guardrails/error.js';
|
|
2
|
+
import type { InteractionPart, ModelEvent } from '../kernel/types.js';
|
|
3
|
+
/** Where a live model is in its reply when a frame arrives. */
|
|
4
|
+
export type LiveTurnPhase = 'streaming' | 'complete' | 'abort';
|
|
5
|
+
/** Tape row: the first key was refused for quota, so the call starts again on the fallback slot. */
|
|
6
|
+
export declare const KEY_FALLBACK_ROW = "key_fallback";
|
|
7
|
+
/** The provider's warning before it closed a live socket. */
|
|
8
|
+
export interface LiveGoAway {
|
|
9
|
+
timeLeftMs?: number;
|
|
10
|
+
/** Milliseconds from the last warning to the close. */
|
|
11
|
+
closedAfterMs: number;
|
|
7
12
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
13
|
+
/** One thing a live socket received. `row` is the parsed frame, so the kernel records it beside the events it produced. */
|
|
14
|
+
export type LiveQueueItem = {
|
|
15
|
+
type: 'batch';
|
|
16
|
+
events: ModelEvent[];
|
|
17
|
+
turnPhase: LiveTurnPhase;
|
|
18
|
+
row: Record<string, unknown>;
|
|
19
|
+
} | {
|
|
20
|
+
type: 'row';
|
|
21
|
+
row: Record<string, unknown>;
|
|
22
|
+
} | {
|
|
23
|
+
type: 'error';
|
|
24
|
+
error: Error;
|
|
25
|
+
row?: Record<string, unknown>;
|
|
12
26
|
}
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
27
|
+
/** `error` is set when the close was not normal; `goAway` when the provider warned first. */
|
|
28
|
+
| {
|
|
29
|
+
type: 'closed';
|
|
30
|
+
code: number;
|
|
31
|
+
reason: string;
|
|
32
|
+
error?: TheoremError;
|
|
33
|
+
goAway?: LiveGoAway;
|
|
19
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* An open live socket, in the kernel's terms: the setup the session was opened with, what the
|
|
37
|
+
* session sends the model, `batches` for what it receives, and `close`. A send on a socket that is
|
|
38
|
+
* no longer open is dropped.
|
|
39
|
+
*/
|
|
40
|
+
export interface LiveConnection {
|
|
41
|
+
readonly setup: Record<string, unknown>;
|
|
42
|
+
flush?(): Promise<void>;
|
|
43
|
+
/** Text the model reads without it ending the user's turn. */
|
|
44
|
+
sendContext(text: string): void;
|
|
45
|
+
/** Text, audio, or video from the user, as it arrives. */
|
|
46
|
+
sendInput(input: InteractionPart): void;
|
|
47
|
+
/** The result of a tool call the model made. */
|
|
48
|
+
sendToolResponse(callId: string, name: string, output: unknown, parts?: InteractionPart[]): void;
|
|
49
|
+
batches(): AsyncGenerator<LiveQueueItem>;
|
|
50
|
+
close(code?: number, reason?: string): void;
|
|
51
|
+
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/** Tape row: the first key was refused for quota, so the call starts again on the fallback slot. */
|
|
2
|
+
export const KEY_FALLBACK_ROW = 'key_fallback';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Provider } from '../../kernel/protocols/provider.js';
|
|
2
|
+
/** What registering `typesafeProvider` takes as `connection`. */
|
|
3
|
+
export interface TypesafeConnection {
|
|
4
|
+
baseUrl?: string;
|
|
5
|
+
}
|
|
6
|
+
/** TypeSafe: System One decisions, at TypeSafe's own API. */
|
|
7
|
+
export declare const typesafeProvider: Provider<TypesafeConnection, string>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { bearer, defineProvider, endpointUrlSchema, } from '../../kernel/protocols/provider.js';
|
|
3
|
+
import { systemOne } from '../system-one/protocol.js';
|
|
4
|
+
/** TypeSafe: System One decisions, at TypeSafe's own API. */
|
|
5
|
+
export const typesafeProvider = defineProvider({
|
|
6
|
+
id: 'typesafe',
|
|
7
|
+
name: 'TypeSafe',
|
|
8
|
+
description: "System One decisions, at TypeSafe's own API.", // labels-exempt: builder field description, read by the studio and docs
|
|
9
|
+
connection: z
|
|
10
|
+
.strictObject({
|
|
11
|
+
baseUrl: endpointUrlSchema
|
|
12
|
+
.optional()
|
|
13
|
+
.describe('The API, by default https://api.typesafe.ai/v1.'), // labels-exempt: builder field description, read by the studio and docs
|
|
14
|
+
})
|
|
15
|
+
.default({}),
|
|
16
|
+
key: z.string().trim().min(1),
|
|
17
|
+
authorize: bearer(),
|
|
18
|
+
// why: docs.typesafe.ai/models, read 2026-10-19, prices Jev 1.13 and 1.14 alike at $0.042 per million input tokens, output free. The API reports no cost.
|
|
19
|
+
prices: {
|
|
20
|
+
checked: '2026-10-19',
|
|
21
|
+
models: { 'jev-*': { input: 0.042, output: 0 } },
|
|
22
|
+
},
|
|
23
|
+
serves: (at) => [{ protocol: systemOne, baseUrl: at.baseUrl ?? 'https://api.typesafe.ai/v1' }],
|
|
24
|
+
});
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** What stands in for a credential's value wherever one is shown. */
|
|
2
|
+
export declare const MASK = "\u2022\u2022\u2022\u2022";
|
|
1
3
|
/** What an agent sees of a secret. */
|
|
2
4
|
export interface SecretCard {
|
|
3
5
|
secret: true;
|
|
@@ -9,12 +11,28 @@ export interface SecretCard {
|
|
|
9
11
|
sameAs: string[];
|
|
10
12
|
usedBy: string[];
|
|
11
13
|
}
|
|
14
|
+
/** What an agent sees of a secret instead of its value: whether it is set, what kind it looks like, the mistakes it shows, and the other secrets with the same value and the places that use it. */
|
|
12
15
|
export declare function secretCard(value: unknown, extra?: {
|
|
13
16
|
sameAs?: readonly string[];
|
|
14
17
|
usedBy?: readonly string[];
|
|
15
18
|
}): SecretCard;
|
|
16
|
-
/**
|
|
19
|
+
/** Whether a header or query parameter's name says it carries a credential: what `maskHeaders` masks. */
|
|
20
|
+
export declare function isCredentialName(name: string): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* A URL with its credential query parameters and `user:pass@` masked. The rest stays as written:
|
|
23
|
+
* a `{param}` in a tool's path is not encoded.
|
|
24
|
+
*/
|
|
17
25
|
export declare function maskUrl(raw: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* A masked URL with each masked credential filled in from `held`, the URL it was masked from.
|
|
28
|
+
* A mask `held` has no value for stays a mask.
|
|
29
|
+
*/
|
|
30
|
+
export declare function unmaskUrl(shown: string, held: string): string;
|
|
31
|
+
/**
|
|
32
|
+
* Masked headers with each masked value filled in from `held`, the headers they were masked from.
|
|
33
|
+
* A mask `held` has no header for stays a mask.
|
|
34
|
+
*/
|
|
35
|
+
export declare function unmaskHeaders(shown: Record<string, string>, held: Record<string, string> | undefined): Record<string, string>;
|
|
18
36
|
/**
|
|
19
37
|
* Headers as JSON, credential-named values masked. Text that is not a JSON object is
|
|
20
38
|
* told only by its length: a parse error would quote it.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { redactDetectors } from '../guardrails/detect-at.js';
|
|
2
|
+
import { SENSITIVE_GROUPS } from '../guardrails/sensitive-groups.js';
|
|
3
|
+
/** What stands in for a credential's value wherever one is shown. */
|
|
4
|
+
export const MASK = '••••';
|
|
4
5
|
/** Names that carry a credential, in a URL's query or a header. */
|
|
5
6
|
const CREDENTIAL_NAME = /auth|key|token|secret|passw|pwd|cookie|session|signature|^sig$|credential|^code$|appid/i;
|
|
6
7
|
/** Names a query parameter carries a credential under, in a URL too malformed to parse. */
|
|
@@ -23,6 +24,7 @@ const SHORT = 16;
|
|
|
23
24
|
const SCRUB_MIN = 6;
|
|
24
25
|
const TEXT_CAP = 2000;
|
|
25
26
|
const BYTES_CAP = 200;
|
|
27
|
+
/** What an agent sees of a secret instead of its value: whether it is set, what kind it looks like, the mistakes it shows, and the other secrets with the same value and the places that use it. */
|
|
26
28
|
export function secretCard(value, extra = {}) {
|
|
27
29
|
const text = typeof value === 'string' ? value : '';
|
|
28
30
|
const core = text.trim();
|
|
@@ -52,31 +54,71 @@ export function secretCard(value, extra = {}) {
|
|
|
52
54
|
usedBy: [...(extra.usedBy ?? [])],
|
|
53
55
|
};
|
|
54
56
|
}
|
|
55
|
-
/** A URL
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
/** A URL's `user:pass@`, after its scheme. */
|
|
58
|
+
const USERINFO = /^([a-z][a-z0-9+.-]*:\/\/)([^/?#@]*)@/i;
|
|
59
|
+
/** One `name=value` of a URL, with the separator before it. */
|
|
60
|
+
const PAIR = /([?&;])([^=?&;#\s]*)=([^&;#\s]*)/g;
|
|
61
|
+
/** A `user:pass`, as its two parts. A password keeps its own colons. */
|
|
62
|
+
function userinfo(text) {
|
|
63
|
+
const at = text.indexOf(':');
|
|
64
|
+
return at < 0 ? [text, undefined] : [text.slice(0, at), text.slice(at + 1)];
|
|
65
|
+
}
|
|
66
|
+
function decoded(name) {
|
|
58
67
|
try {
|
|
59
|
-
|
|
68
|
+
return decodeURIComponent(name);
|
|
60
69
|
}
|
|
61
70
|
catch {
|
|
62
|
-
return
|
|
63
|
-
const at = pair.indexOf('=');
|
|
64
|
-
const name = pair.slice(1, at);
|
|
65
|
-
return at > 1 && at < pair.length - 1 && QUERY_CREDENTIAL.test(name)
|
|
66
|
-
? `${pair.slice(0, at + 1)}${MASK}`
|
|
67
|
-
: pair;
|
|
68
|
-
});
|
|
71
|
+
return name;
|
|
69
72
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
}
|
|
74
|
+
/** Whether a header or query parameter's name says it carries a credential: what `maskHeaders` masks. */
|
|
75
|
+
export function isCredentialName(name) {
|
|
76
|
+
return CREDENTIAL_NAME.test(name);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* A URL with its credential query parameters and `user:pass@` masked. The rest stays as written:
|
|
80
|
+
* a `{param}` in a tool's path is not encoded.
|
|
81
|
+
*/
|
|
82
|
+
export function maskUrl(raw) {
|
|
83
|
+
const names = URL.canParse(raw) ? CREDENTIAL_NAME : QUERY_CREDENTIAL;
|
|
84
|
+
return raw
|
|
85
|
+
.replace(USERINFO, (_whole, scheme, info) => {
|
|
86
|
+
const [user, password] = userinfo(info);
|
|
87
|
+
return `${scheme}${user && MASK}${password === undefined ? '' : `:${password && MASK}`}@`;
|
|
88
|
+
})
|
|
89
|
+
.replace(PAIR, (pair, separator, name, value) => value && names.test(decoded(name)) ? `${separator}${name}=${MASK}` : pair);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* A masked URL with each masked credential filled in from `held`, the URL it was masked from.
|
|
93
|
+
* A mask `held` has no value for stays a mask.
|
|
94
|
+
*/
|
|
95
|
+
export function unmaskUrl(shown, held) {
|
|
96
|
+
const [user, password] = userinfo(USERINFO.exec(held)?.[2] ?? '');
|
|
97
|
+
const values = new Map();
|
|
98
|
+
for (const [, , name = '', value = ''] of held.matchAll(PAIR)) {
|
|
99
|
+
values.set(name, [...(values.get(name) ?? []), value]);
|
|
100
|
+
}
|
|
101
|
+
return shown
|
|
102
|
+
.replace(USERINFO, (_whole, scheme, info) => {
|
|
103
|
+
const [shownUser, shownPassword] = userinfo(info);
|
|
104
|
+
const name = shownUser === MASK && user ? user : shownUser;
|
|
105
|
+
const pass = shownPassword === MASK && password ? password : shownPassword;
|
|
106
|
+
return `${scheme}${name}${pass === undefined ? '' : `:${pass}`}@`;
|
|
107
|
+
})
|
|
108
|
+
.replace(PAIR, (pair, separator, name, value) => {
|
|
109
|
+
const real = value === MASK ? values.get(name)?.shift() : undefined;
|
|
110
|
+
return real ? `${separator}${name}=${real}` : pair;
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Masked headers with each masked value filled in from `held`, the headers they were masked from.
|
|
115
|
+
* A mask `held` has no header for stays a mask.
|
|
116
|
+
*/
|
|
117
|
+
export function unmaskHeaders(shown, held) {
|
|
118
|
+
return Object.fromEntries(Object.entries(shown).map(([name, value]) => [
|
|
119
|
+
name,
|
|
120
|
+
value === MASK ? (held?.[name] ?? value) : value,
|
|
121
|
+
]));
|
|
80
122
|
}
|
|
81
123
|
/**
|
|
82
124
|
* Headers as JSON, credential-named values masked. Text that is not a JSON object is
|
|
@@ -97,10 +139,7 @@ export function maskHeaders(raw) {
|
|
|
97
139
|
if (typeof headers !== 'object' || headers === null || Array.isArray(headers)) {
|
|
98
140
|
return '(not a JSON object)';
|
|
99
141
|
}
|
|
100
|
-
const masked = Object.fromEntries(Object.entries(headers).map(([name, value]) => [
|
|
101
|
-
name,
|
|
102
|
-
CREDENTIAL_NAME.test(name) ? MASK : value,
|
|
103
|
-
]));
|
|
142
|
+
const masked = Object.fromEntries(Object.entries(headers).map(([name, value]) => [name, isCredentialName(name) ? MASK : value]));
|
|
104
143
|
return typeof raw === 'string' ? JSON.stringify(masked) : masked;
|
|
105
144
|
}
|
|
106
145
|
/** Scrubs text: each known secret value by name, then the kernel's sensitive patterns. */
|
|
@@ -110,7 +149,7 @@ export function scrubText(text, known) {
|
|
|
110
149
|
if (value.length >= SCRUB_MIN)
|
|
111
150
|
out = out.replaceAll(value, `[secret ${name}]`);
|
|
112
151
|
}
|
|
113
|
-
return
|
|
152
|
+
return redactDetectors(out, SENSITIVE_GROUPS);
|
|
114
153
|
}
|
|
115
154
|
/** Known secret values worth scrubbing: trimmed, long enough, longest first. */
|
|
116
155
|
export function knownSecrets(secrets) {
|
package/esm/src/surface/mod.d.ts
CHANGED
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
* Surfaces: one protocol for an agent to see and work in a client's screen. A page mounts a
|
|
3
3
|
* surface (nodes with fields and actions); the agent uses two tools, `look` and `act`, and the
|
|
4
4
|
* runtime projects every answer so secrets reach it only as cards.
|
|
5
|
+
*
|
|
6
|
+
* @module
|
|
5
7
|
*/
|
|
6
8
|
import "../../_dnt.polyfills.js";
|
|
7
9
|
export type { SecretCard } from './formats.js';
|
|
8
|
-
export { knownSecrets, maskHeaders, maskUrl, scrubDeep, scrubText, secretCard } from './formats.js';
|
|
10
|
+
export { isCredentialName, knownSecrets, MASK, maskHeaders, maskUrl, scrubDeep, scrubText, secretCard, unmaskHeaders, unmaskUrl, } from './formats.js';
|
|
9
11
|
export type { SurfaceLedgerEntry, SurfaceRuntime, SurfaceRuntimeOptions, } from './runtime.js';
|
|
10
12
|
export { createSurfaceRuntime, SURFACE_TOOL_NAMES } from './runtime.js';
|
|
11
13
|
export type { SurfaceToolsOptions } from './tools.js';
|
|
12
|
-
export {
|
|
14
|
+
export { SURFACE_PROMPT, surfaceTools } from './tools.js';
|
|
13
15
|
export type { Surface, SurfaceAction, SurfaceActionContext, SurfaceActionOutcome, SurfaceAuthor, SurfaceChange, SurfaceEffect, SurfaceField, SurfaceFieldFormat, SurfaceIssue, SurfaceNode, SurfaceRejection, } from './types.js';
|
|
14
16
|
export { defineAction } from './types.js';
|
package/esm/src/surface/mod.js
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
* Surfaces: one protocol for an agent to see and work in a client's screen. A page mounts a
|
|
3
3
|
* surface (nodes with fields and actions); the agent uses two tools, `look` and `act`, and the
|
|
4
4
|
* runtime projects every answer so secrets reach it only as cards.
|
|
5
|
+
*
|
|
6
|
+
* @module
|
|
5
7
|
*/
|
|
6
8
|
import "../../_dnt.polyfills.js";
|
|
7
|
-
export { knownSecrets, maskHeaders, maskUrl, scrubDeep, scrubText, secretCard } from './formats.js';
|
|
9
|
+
export { isCredentialName, knownSecrets, MASK, maskHeaders, maskUrl, scrubDeep, scrubText, secretCard, unmaskHeaders, unmaskUrl, } from './formats.js';
|
|
8
10
|
export { createSurfaceRuntime, SURFACE_TOOL_NAMES } from './runtime.js';
|
|
9
|
-
export {
|
|
11
|
+
export { SURFACE_PROMPT, surfaceTools } from './tools.js';
|
|
10
12
|
export { defineAction } from './types.js';
|
|
@@ -10,6 +10,7 @@ export interface SurfaceLedgerEntry {
|
|
|
10
10
|
result: unknown;
|
|
11
11
|
time: number;
|
|
12
12
|
}
|
|
13
|
+
/** Options for a surface runtime: the clock, how to open a declared surface, where notes go and where the ledger is kept. */
|
|
13
14
|
export interface SurfaceRuntimeOptions {
|
|
14
15
|
now?: () => number;
|
|
15
16
|
/** Opens a declared surface that isn't mounted (goes to its page). */
|
|
@@ -23,6 +24,7 @@ export interface SurfaceRuntimeOptions {
|
|
|
23
24
|
save(entries: readonly SurfaceLedgerEntry[]): void;
|
|
24
25
|
};
|
|
25
26
|
}
|
|
27
|
+
/** What the host holds to mount surfaces and answer the agent's `look` and `act` calls. */
|
|
26
28
|
export interface SurfaceRuntime {
|
|
27
29
|
/** Mounts a surface until the returned function is called. */
|
|
28
30
|
mount(surface: Surface): () => void;
|
|
@@ -36,5 +38,7 @@ export interface SurfaceRuntime {
|
|
|
36
38
|
/** Where every mounted surface stands and what the agent last did; `null` when there is nothing. */
|
|
37
39
|
stateLine(): string | null;
|
|
38
40
|
}
|
|
41
|
+
/** The tools the runtime answers: `look` and `act`. */
|
|
39
42
|
export declare const SURFACE_TOOL_NAMES: readonly ["look", "act"];
|
|
43
|
+
/** Creates a runtime that mounts surfaces and answers the agent's `look` and `act` calls. */
|
|
40
44
|
export declare function createSurfaceRuntime(options?: SurfaceRuntimeOptions): SurfaceRuntime;
|
|
@@ -6,6 +6,7 @@ const INTENT_WINDOW_MS = 60_000;
|
|
|
6
6
|
const MOUNT_WAIT_MS = 5000;
|
|
7
7
|
const NODE_LIST_CAP = 80;
|
|
8
8
|
const RECENT_IN_STATE = 5;
|
|
9
|
+
/** The tools the runtime answers: `look` and `act`. */
|
|
9
10
|
export const SURFACE_TOOL_NAMES = ['look', 'act'];
|
|
10
11
|
const lookArgs = z.object({ at: z.string().optional() });
|
|
11
12
|
const actArgs = z.object({
|
|
@@ -47,6 +48,7 @@ function rejectionsFrom(error) {
|
|
|
47
48
|
function errorText(err) {
|
|
48
49
|
return err instanceof Error ? err.message : String(err);
|
|
49
50
|
}
|
|
51
|
+
/** Creates a runtime that mounts surfaces and answers the agent's `look` and `act` calls. */
|
|
50
52
|
export function createSurfaceRuntime(options = {}) {
|
|
51
53
|
const now = options.now ?? Date.now;
|
|
52
54
|
const mounted = new Map();
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
/**
|
|
3
|
-
* The handler for a function tool the client answers: it returns what the client sent back for
|
|
4
|
-
* the call, which the relay bridge hands over as `ctx.host.clientOutput`. With no output the call
|
|
5
|
-
* fails to the model, naming the tool; so does a call the bridge settled because the client never
|
|
6
|
-
* answered (`host.clientTimedOut`).
|
|
7
|
-
*/
|
|
8
|
-
export declare function clientAnsweredHandler(name: string): (input: unknown, ctx: ToolContext) => unknown;
|
|
1
|
+
import type { ToolDefinitionInput } from '../kernel/tools/types.js';
|
|
2
|
+
/** Options for `surfaceTools`: the category the tools are registered under, `surface` by default. */
|
|
9
3
|
export interface SurfaceToolsOptions {
|
|
10
4
|
category?: string;
|
|
11
5
|
}
|
package/esm/src/surface/tools.js
CHANGED
|
@@ -1,27 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* The handler for a function tool the client answers: it returns what the client sent back for
|
|
4
|
-
* the call, which the relay bridge hands over as `ctx.host.clientOutput`. With no output the call
|
|
5
|
-
* fails to the model, naming the tool; so does a call the bridge settled because the client never
|
|
6
|
-
* answered (`host.clientTimedOut`).
|
|
7
|
-
*/
|
|
8
|
-
export function clientAnsweredHandler(name) {
|
|
9
|
-
return (_input, ctx) => {
|
|
10
|
-
const host = ctx.host;
|
|
11
|
-
if (host && 'clientOutput' in host)
|
|
12
|
-
return host.clientOutput;
|
|
13
|
-
if (host?.clientTimedOut) {
|
|
14
|
-
throw new Error("The page didn't answer. Look before trying again.");
|
|
15
|
-
}
|
|
16
|
-
throw new Error(`${name} runs in the client, and the client sent no result.`);
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
2
|
const answer = z.record(z.string(), z.unknown());
|
|
20
3
|
const lookInput = z.object({
|
|
21
4
|
at: z
|
|
22
5
|
.string()
|
|
23
6
|
.optional()
|
|
24
|
-
.describe('A surface ("
|
|
7
|
+
.describe('A surface ("studio") or a node in one ("studio/identity"); leave out to see every surface'),
|
|
25
8
|
});
|
|
26
9
|
const actInput = z.object({
|
|
27
10
|
at: z.string().describe('The node to act on, as look names it'),
|
|
@@ -49,23 +32,22 @@ export function surfaceTools(options = {}) {
|
|
|
49
32
|
loadTier: 'T0',
|
|
50
33
|
permission: 'auto',
|
|
51
34
|
output: answer,
|
|
35
|
+
answeredBy: 'page',
|
|
52
36
|
};
|
|
53
37
|
return [
|
|
54
38
|
{
|
|
55
39
|
...base,
|
|
56
40
|
name: 'look',
|
|
57
|
-
description: "See what is on the person's screen. With no `at`: every surface, its revision, summary, nodes and issue counts. With `at`: that node's fields (secrets only as cards: set, what it looks like, problems), what each means, its issues, its actions with their input schemas, and its children.",
|
|
41
|
+
description: "See what is on the person's screen. With no `at`: every surface, its revision, summary, nodes, and issue counts. With `at`: that node's fields (secrets only as cards: set, what it looks like, problems), what each means, its issues, its actions with their input schemas, and its children.",
|
|
58
42
|
access: 'read-only',
|
|
59
43
|
input: lookInput,
|
|
60
|
-
handler: clientAnsweredHandler('look'),
|
|
61
44
|
},
|
|
62
45
|
{
|
|
63
46
|
...base,
|
|
64
47
|
name: 'act',
|
|
65
|
-
description: "Do one of a node's actions: `set` fields, `point` the person at something, or the node's own (test, send, launch…). Comes back applied, unchanged, done, stale (the page changed: look again), refused or failed, with what was rejected and why.",
|
|
48
|
+
description: "Do one of a node's actions: `set` fields, `point` the person at something, or the node's own (test, send, launch…). Comes back applied, unchanged, done, stale (the page changed: look again), refused, or failed, with what was rejected and why.",
|
|
66
49
|
access: 'read-write',
|
|
67
50
|
input: actInput,
|
|
68
|
-
handler: clientAnsweredHandler('act'),
|
|
69
51
|
},
|
|
70
52
|
];
|
|
71
53
|
}
|