@theoremjs/studio 0.3.4-next.482.g7e608f2 → 0.3.4-next.508.geda6db0

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.
Files changed (79) hide show
  1. package/README.md +3 -3
  2. package/compile.d.ts +1 -1
  3. package/draft.d.ts +1 -1
  4. package/example.js +5 -2
  5. package/map-line.d.ts +12 -0
  6. package/map-line.js +98 -0
  7. package/map.d.ts +1 -1
  8. package/map.js +0 -1
  9. package/package.json +4 -4
  10. package/page/assets/{Banner-CrUhb26_.js → Banner-BcHZFaJb.js} +2 -2
  11. package/page/assets/{ConsoleFrame-6cEEvO4i.js → ConsoleFrame-Byq_hSpu.js} +3 -3
  12. package/page/assets/{ContextMenu-WnsgC14_.js → ContextMenu-C6S-GYrc.js} +2 -2
  13. package/page/assets/{ToolResultCharts-BEhuo0Z4.js → ToolResultCharts-CkEf5ub5.js} +1 -1
  14. package/page/assets/{TraceInspector-k1w1q0XO.js → TraceInspector-BsYHHhGv.js} +1 -1
  15. package/page/assets/{TraceOverview-Crxd-sTS.js → TraceOverview-CMFfbfGM.js} +2 -2
  16. package/page/assets/{_virtual_studio-type-sources-DAabvYbE.js → _virtual_studio-type-sources-CTIGQ210.js} +56 -48
  17. package/page/assets/browser-engine-DjYv346h.js +11 -0
  18. package/page/assets/browser-transport-Bm3uY9Fj.js +47 -0
  19. package/page/assets/{crypto-iT_LZ8Et.js → crypto-DAIn4qnM.js} +1 -1
  20. package/page/assets/{egress-automata-B5ZGE1mT.js → egress-automata-SiHQTP1i.js} +1 -1
  21. package/page/assets/{encode-files-8AFMw7Er.js → encode-files-oYzzs_iG.js} +1 -1
  22. package/page/assets/{export-agent-BedkRp13.js → export-agent-BeUTYowB.js} +3 -3
  23. package/page/assets/{guardrail-tester-XwnZWNsg.js → guardrail-tester-DLT99rnO.js} +2 -2
  24. package/page/assets/index-C9rhrCGT.css +1 -0
  25. package/page/assets/{index-BVHT-9mR.js → index-DNA-Y8Mp.js} +69 -69
  26. package/page/assets/{labels-provider-BSiD6Lrb.js → labels-provider-Gus3heEH.js} +1 -1
  27. package/page/assets/{live-messages-B65rUlNM.js → live-messages-BnBioidx.js} +1 -1
  28. package/page/assets/reader-BFYIhA73.js +7 -0
  29. package/page/assets/shaped-data-1Qn2111E.js +16 -0
  30. package/page/assets/{stub-DG5wxM-A.js → stub-B3GersQP.js} +2 -2
  31. package/page/assets/{studio-code-pane-p4fjtQhL.js → studio-code-pane-CCi7-lyE.js} +3 -3
  32. package/page/assets/{studio-console-BtZY4aUM.js → studio-console-CJT5FkWm.js} +1 -1
  33. package/page/assets/{studio-decision-BovTBIwV.js → studio-decision-DhHdHb7Z.js} +1 -1
  34. package/page/assets/{studio-embedding-BY6UQk0k.js → studio-embedding-B8vBhuZU.js} +1 -1
  35. package/page/assets/studio-host-console-CE_5_tEn.js +2 -0
  36. package/page/assets/{studio-labels-C3yQoEd0.js → studio-labels-C2SI_T2p.js} +1 -1
  37. package/page/assets/{studio-live-B_cVDiqs.js → studio-live-CKSSyYZj.js} +3 -3
  38. package/page/assets/studio-map-CKm_FCd9.js +1 -0
  39. package/page/assets/studio-trace-replay-BRMD6pex.js +2 -0
  40. package/page/assets/{studio-type-checker-Bljo3amv.js → studio-type-checker-DoaPHYNy.js} +1 -1
  41. package/page/assets/tool-schema-DXYwL5aE.js +18 -0
  42. package/page/assets/{trace-record-D4xAUHLZ.js → trace-record-DWxIfO7D.js} +1 -1
  43. package/page/assets/tree-Chi6mqzx.js +3 -0
  44. package/page/assets/{turn-client-CBWNoFgo.js → turn-client-DF0ije7A.js} +2 -2
  45. package/page/assets/types-2I4NfLiS.js +1 -0
  46. package/page/assets/{use-one-call-rh-5EjBB.js → use-one-call-Bhnpve1Y.js} +1 -1
  47. package/page/assets/{workspace-kAEf4Zn4.js → workspace-U3w2ELtN.js} +1 -1
  48. package/page/index.html +17 -17
  49. package/run-payload.d.ts +1 -1
  50. package/runtime.d.ts +1 -1
  51. package/runtime.js +1 -1
  52. package/server/draft-decide.d.ts +1 -4
  53. package/server/draft-decide.js +1 -1
  54. package/server/draft-replies.js +2 -2
  55. package/source.js +1 -1
  56. package/ui/brand-icons.d.ts +2 -2
  57. package/ui/brand-icons.js +6 -4
  58. package/ui/lib/tree-map-layout.d.ts +120 -18
  59. package/ui/lib/tree-map-layout.js +1292 -190
  60. package/ui/map-token.css +25 -0
  61. package/ui/node-icon.js +1 -4
  62. package/ui/profile-editor.js +1 -1
  63. package/ui/read-map.css +1 -24
  64. package/ui/read-map.js +52 -4
  65. package/ui/studio-map.js +1 -3
  66. package/ui/tree-map.css +9 -0
  67. package/ui/tree-map.d.ts +27 -6
  68. package/ui/tree-map.js +215 -75
  69. package/page/assets/browser-engine-C78edv3x.js +0 -11
  70. package/page/assets/browser-transport-mGxdvtBL.js +0 -47
  71. package/page/assets/index-Cbs7B46A.css +0 -1
  72. package/page/assets/reader-XebgyCzF.js +0 -7
  73. package/page/assets/shaped-data-Bc6u4pow.js +0 -16
  74. package/page/assets/studio-host-console-D9NFWXxV.js +0 -2
  75. package/page/assets/studio-map-iN6-MOzK.js +0 -1
  76. package/page/assets/studio-trace-replay-B3k21TSg.js +0 -2
  77. package/page/assets/tool-schema-BmScISma.js +0 -18
  78. package/page/assets/tree-BiZScKs7.js +0 -3
  79. package/page/assets/types-zRlFhC9U.js +0 -1
@@ -4712,7 +4712,7 @@ export { guardrailFromHits, guardrailFromVerdict, guardrailTurnEvent, projectGua
4712
4712
  export { hitFromSpan, projectGuardrailEvent, } from './src/guardrails/hits.js';
4713
4713
  export type { ClientLabelKey, LabelKey, LabelOverrides, LabelParams, } from './src/guardrails/labels.js';
4714
4714
  export { CLIENT_LABEL_KEYS, LABEL_KEYS, labelDefault, labelText, overrideLabels, resetLabels, } from './src/guardrails/labels.js';
4715
- export type { AdvisoryLevel, BlockedReplyOnBlock, BlockedReplySpec, CanaryGateResult, CanaryGateSession, CanaryStreamGate, DestinationGate, DestinationVerdict, Directive, DirectiveSignal, GivenUrls, GuardedToolText, GuardrailAction, GuardrailContext, GuardrailEvent, GuardrailHit, GuardrailStage, HostGuardrailsSpec, InspectedToolArguments, LiveHeldOutput, LiveOutboundBatchResult, LiveOutboundGateSession, NameAllow, NetworkGuardrailSpec, OutboundPayload, ProfileGuardrailsSpec, ProgressiveYieldGate, ProgressiveYieldGateOptions, ProgressiveYieldResult, Provenance, QuotaGuardrailSpec, ResolvedGuardrailPolicy, ScanText, SensitiveGroup, SensitiveSelection, SensitiveSwitches, Severity, TaintGate, TaintGuardrailSpec, ToolOrigin, TrustLevel, TurnDestinations, TurnTaint, UrlAllow, Verdict, } from './src/guardrails/mod.js';
4715
+ export type { AdvisoryLevel, BlockedReplyOnBlock, BlockedReplySpec, CanaryGateResult, CanaryGateSession, CanaryStreamGate, DecisionDisclosureEnforcer, DecisionDisclosureVerdict, DecisionGuardrailsSpec, DestinationGate, DestinationVerdict, Directive, DirectiveSignal, GivenUrls, GuardedToolText, GuardrailAction, GuardrailContext, GuardrailEvent, GuardrailHit, GuardrailStage, HostGuardrailsSpec, InspectedToolArguments, LiveHeldOutput, LiveOutboundBatchResult, LiveOutboundGateSession, NameAllow, NetworkGuardrailSpec, OutboundPayload, ProfileGuardrailsSpec, ProgressiveYieldGate, ProgressiveYieldGateOptions, ProgressiveYieldResult, Provenance, QuotaGuardrailSpec, ResolvedGuardrailPolicy, ScanText, SensitiveGroup, SensitiveSelection, SensitiveSwitches, Severity, TaintGate, TaintGuardrailSpec, ToolOrigin, TrustLevel, TurnDestinations, TurnTaint, UrlAllow, Verdict, } from './src/guardrails/mod.js';
4716
4716
  export { ADVISORY_LEVELS, abortLiveOutboundTurn, addGivenDestinations, addHistoryDestinations, addRequestDestinations, addResultDestinations, BLOCKED_REPLY_ON_BLOCK, bindCanary, checkDestinationGate, checkTaintGate, composeToolText, createCanaryGateSession, createCanaryStreamGate, createLiveOutboundGateSession, createOutboundProgressiveGate, createProgressiveYieldGate, DESTINATION_GATES, DIRECTIVE_SIGNALS, directives, EGRESS_RULES, eventHasCanary, filterCanaryGatedEvents, finalizeLiveOutboundTurn, GUARDRAIL_STAGES, guardToolFailureText, guardToolResult, hitRules, inspectToolArguments, isRemoteOrigin, isSuspicious, isTainted, mintCanary, OMIT_CANARY, processLiveOutboundBatch, recordTaint, redactCanary, resolveGuardrailPolicy, SEVERITIES, scanTextForCanaryLeak, scanTextOf, TAINT_GATES, TOOL_CLOSE, TOOL_ORIGINS, TRUST_LEVELS, textForScan, toolCallEvent, turnDestinations, wrapToolData, wrapUserData, } from './src/guardrails/mod.js';
4717
4717
  export type { DnsOverHttpsOptions, GuardedFetchOptions, ResolveHost, } from './src/guardrails/network.js';
4718
4718
  export { assertSafeUrl, dnsOverHttpsResolver, fetchGuarded, isLocalhostName, isPrivateOrLocalAddress, } from './src/guardrails/network.js';
@@ -4737,7 +4737,7 @@ export type { ProfileGraphEditor, ProfileGraphFacet, ProfileGraphFacetId, Profil
4737
4737
  export { PROFILE_GRAPH, profileGraphFacet, spineFacetsForProfileType, } from './src/kernel/profile-graph.js';
4738
4738
  export type { RuntimeAbilities } from './src/kernel/protocols/binding.js';
4739
4739
  export { checkBinding, commonModelSettingsSchema, decisionModelBindingSchema, keySlotSchema, keySlotsOf, modelBindingSchema, } from './src/kernel/protocols/binding.js';
4740
- export { providerLimitsSchema, resolveProviderLimits } from './src/kernel/protocols/limits.js';
4740
+ export { providerLimitsSchema } from './src/kernel/protocols/limits.js';
4741
4741
  export type { CallSetup, ProtocolCall } from './src/kernel/protocols/runtime.js';
4742
4742
  export { callProtocol, plainWebSocket } from './src/kernel/protocols/runtime.js';
4743
4743
  export type { AttachmentFacts, AttachmentRules } from './src/kernel/registry/attachments.js';
@@ -4795,15 +4795,15 @@ export { bearer, createProviderRegistry, defineProvider, endpointUrlSchema, head
4795
4795
  export type { OpenWebSocket, ProviderHostOptions } from '../kernel/protocols/runtime.js';
4796
4796
  export type { CredentialContext, CredentialResolver, KeyCredential, KeyVault, } from '../kernel/registry/vault.js';
4797
4797
  export { embeddingModelLimits } from './embedding-limits.js';
4798
- export { geminiEmbedding } from './gemini/embedding-protocol.js';
4798
+ export { geminiEmbeddings } from './gemini/embeddings-protocol.js';
4799
4799
  export { geminiInteractions } from './gemini/interactions-protocol.js';
4800
4800
  export { geminiLive } from './gemini/live-protocol.js';
4801
4801
  export { geminiProvider } from './gemini/provider.js';
4802
- export { ollamaEmbedding } from './local/embedding-protocol.js';
4802
+ export { ollamaEmbeddings } from './local/embeddings-protocol.js';
4803
4803
  export { localProvider } from './local/provider.js';
4804
4804
  export { openAi } from './open-ai/protocol.js';
4805
4805
  export { openRouterDecisions } from './openrouter/decisions-protocol.js';
4806
- export { openRouterEmbedding } from './openrouter/embedding-protocol.js';
4806
+ export { openRouterEmbeddings } from './openrouter/embeddings-protocol.js';
4807
4807
  export { openRouterImages } from './openrouter/images-protocol.js';
4808
4808
  export { openRouterOpenAi } from './openrouter/protocol.js';
4809
4809
  export { openRouterProvider } from './openrouter/provider.js';
@@ -5178,20 +5178,19 @@ export declare function extendProtocol<O, S, E = JsonObject>(base: Protocol<O, S
5178
5178
  /** Whether something \`writer\` wrote may go back to \`target\`: the writer is in its lineage. */
5179
5179
  export declare function carriesTo(writer: string, target: Pick<Protocol, 'lineage'>): boolean;
5180
5180
  `,"file:///node_modules/@theoremjs/agents/src/kernel/protocols/limits.d.ts":`import { z } from 'zod';
5181
- /** The budgets every provider call runs under; a host may tighten or loosen each. */
5181
+ /** The budgets a provider call runs under. Each one left out is no limit: the provider's own applies. */
5182
5182
  export interface ProviderLimits {
5183
- operationTimeoutMs: number;
5184
- connectTimeoutMs: number;
5185
- liveStepTimeoutMs: number;
5186
- maxWireRecordBytes: number;
5187
- maxWireResponseBytes: number;
5188
- maxEventBytes: number;
5189
- maxStepBytes: number;
5190
- maxStepEvents: number;
5191
- maxPendingToolCalls: number;
5183
+ operationTimeoutMs?: number;
5184
+ connectTimeoutMs?: number;
5185
+ liveStepTimeoutMs?: number;
5186
+ maxWireRecordBytes?: number;
5187
+ maxWireResponseBytes?: number;
5188
+ maxEventBytes?: number;
5189
+ maxStepBytes?: number;
5190
+ maxStepEvents?: number;
5191
+ maxPendingToolCalls?: number;
5192
5192
  }
5193
5193
  export declare const providerLimitsSchema: z.ZodType<ProviderLimits>;
5194
- export declare function resolveProviderLimits(overrides?: Partial<ProviderLimits>): ProviderLimits;
5195
5194
  `,"file:///node_modules/@theoremjs/agents/src/kernel/types.d.ts":`import type { ProviderCheckpoint, ProviderContinuationPolicy } from './checkpoint.js';
5196
5195
  import type { JsonObject } from './json.js';
5197
5196
  import type { CacheMode, CacheTtl, CompactionMeter, CompactionOutcome, CompactionTiming, ContextSender, ContinueStopKind, FieldMeta, KeySlot, KeyVault, LiveActivityHandling, LiveEndSensitivity, LiveStartSensitivity, MediaInputKind, ProfileType, SpeechAudioFormat, StreamMode, SummaryMode, ThinkingLevel, ToolLoadTier, TurnStage, TurnStopKind } from './schema.js';
@@ -5652,8 +5651,10 @@ export interface DecisionRequest {
5652
5651
  state: Exclude<DecisionJson, null>;
5653
5652
  questions: Record<string, DecisionQuestion>;
5654
5653
  /**
5655
- * Images by reference. Write a reference as a string where its image belongs, in \`state\`, in a
5656
- * question's instructions, or in its criteria; the provider puts the image there.
5654
+ * Images by reference. Write a reference in a string where its image belongs, in \`state\`, in a
5655
+ * question's instructions, or in its criteria, as the whole string or inside it; the model reads
5656
+ * the image in its place, once for each use. Keys are never read. Only the images some string
5657
+ * references are sent, so pick references that cannot occur in your text by accident.
5657
5658
  */
5658
5659
  assets?: Record<string, DecisionAsset>;
5659
5660
  signal?: AbortSignal;
@@ -7898,7 +7899,7 @@ export { applySpans, blobAt, mergeSpans, OMIT_CANARY, OMIT_INJECTION, OMIT_SENSI
7898
7899
  `,"file:///node_modules/@theoremjs/agents/src/guardrails/labels.d.ts":`/** Values that fill a label template's \`{param}\` placeholders. */
7899
7900
  export type LabelParams = Record<string, string | number>;
7900
7901
  /** Keys are stable API. */
7901
- export declare const LABEL_KEYS: readonly ["provider.decision_failed", "provider.decision_unavailable", "provider.decision_model_missing", "provider.decision_ended", "provider.decision_images_off", "provider.decision_box_model", "provider.budget_exhausted", "provider.adapter_version", "provider.adapter_methods", "provider.adapter_schemas", "provider.fallback_slot", "provider.model_fallback_slot", "provider.host_model", "provider.turn_profile", "provider.model_binding_missing", "provider.session_closed", "provider.settled_call", "provider.session_unavailable", "provider.live_input", "provider.tool_cancel_missing", "provider.kernel_gate", "provider.event_invalid", "provider.response_identity", "provider.credential_resolution", "provider.credential_shape", "provider.stored_continuation", "provider.continuation_mismatch", "provider.continuation_contract", "provider.stateless_history", "provider.events_after_completion", "provider.duplicate_call", "provider.tool_cancel_live", "provider.complete_unavailable", "provider.parallel_tools", "provider.binding_identity", "provider.profile_type", "provider.event_type", "provider.feature", "provider.input_kind", "provider.output_kind", "provider.builtin", "provider.credential_missing", "provider.profile_configuration", "continue.instruction", "canary.bind_note", "user_data.note", "context.note", "taint.blocked", "taint.reason_steered", "taint.reason_tainted", "taint.destination_blocked", "taint.destination_confirm", "advisory.notice_elevated", "advisory.notice_high", "advisory.guidance", "attachments.too_many_files", "attachments.too_many_of_kind", "attachments.file_too_large", "attachments.turn_too_large", "attachments.not_accepted", "attachments.mime_not_allowed", "input.too_long", "attachments.limits_unconfigured", "quota.exhausted", "quota.busy", "error.config", "error.request", "error.input", "error.action", "error.auth", "error.rate_limit", "error.busy", "error.unsupported", "error.unavailable", "error.bad_response", "error.network", "error.timeout", "error.safety", "error.blocked", "error.declined", "error.failed", "error.cancelled", "error.internal", "repair.default_guidance", "repair.items_guidance", "repair.prompt_header", "repair.prompt_intro", "repair.prompt_instructions", "repair.history_heading", "repair.section_previous_output", "repair.section_validator_rejection", "repair.section_repair_guidance", "repair.section_instructions", "compaction.request", "compaction.tool_call", "compaction.tool_result", "decision.box_image", "detect.blocked", "detect.call_blocked", "detect.output_blocked", "detect.shown_blocked", "detect.hint.ids", "detect.hint.financial", "detect.hint.network", "detect.hint.credentials", "detect.hint.injection", "detect.hint.tool_instructions", "detect.hint.canary_leak", "detect.hint.prompt_leak", "detect.hint.marker_leak", "detect.hint.ungiven_images", "detect.hint.ungiven_links", "detect.hint.tool_leak", "detect.hint.own", "egress.default_repair_guidance", "egress.refusal", "egress.refusal_cut", "egress.rejection", "egress.rejection_found", "egress.hint_unscannable", "egress.hint_provider_tool_leak", "thought.omitted_image", "thought.omitted_link", "thought.omitted_instructions", "session.abandon_gated", "session.tool_denied", "session.tool_aborted", "session.sign_in", "sign_in.link", "sign_in.pending", "sign_in.done", "sign_in.declined", "sign_in.expired", "sign_in.out_of_scope", "session.gate_expired", "session.provider_state_unowned", "session.conversation_unknown", "session.turn_ended", "session.gate_pending", "session.part_skipped", "live.session_ended", "voice.unsupported", "voice.permission", "voice.unavailable", "voice.failed", "voice.empty", "stop.cancelled", "stop.interrupted", "stop.length", "stop.filtered", "stop.provider_error", "stop.stream_incomplete", "stop.step_limit", "composer.model", "composer.effort", "tool.awaiting_user", "tool.completed_hidden", "tool.t2_loader_needs_snapshot", "tool.t2_loader_shape", "tool.t2_loader_output_invalid", "tool.execution_uncertain", "tool.input_invalid", "tool.input_invalid_after_mutate", "tool.output_invalid_after_mutate", "tool.handler_no_output", "tool.did_not_run", "tool.page_no_answer", "tool.page_timed_out", "tool.output_invalid", "tool.not_loaded_t2", "tool.wait_unknown", "tool.wait_cycle", "tool.not_visible", "tool.builtin_not_enabled", "tool.provider_native", "tool.not_registered", "tool.builtin_needs_snapshot", "tool.not_allowed", "tool.not_eligible", "tool.unsupported_type", "tool.agent_call_limit", "tool.agent_failed", "tool.activity_failed", "protocol.not_served", "protocol.profile_type", "protocol.options", "protocol.option_clash", "protocol.base_options", "protocol.id_clash", "protocol.ws_headers", "protocol.builtin_unwritten", "protocol.provider_missing", "protocol.connection", "protocol.part_schema", "protocol.part_invalid", "protocol.key_invalid", "protocol.no_key", "protocol.reply_shape", "protocol.endpoint_url", "protocol.endpoint_host", "protocol.http", "protocol.no_operation", "protocol.definition", "protocol.provider_id_clash", "protocol.history_needed"];
7902
+ export declare const LABEL_KEYS: readonly ["provider.decision_failed", "provider.decision_unavailable", "provider.decision_model_missing", "provider.decision_ended", "provider.decision_images_off", "provider.decision_box_model", "provider.budget_exhausted", "provider.adapter_version", "provider.adapter_methods", "provider.adapter_schemas", "provider.fallback_slot", "provider.model_fallback_slot", "provider.host_model", "provider.turn_profile", "provider.model_binding_missing", "provider.session_closed", "provider.settled_call", "provider.session_unavailable", "provider.live_input", "provider.tool_cancel_missing", "provider.kernel_gate", "provider.event_invalid", "provider.response_identity", "provider.credential_resolution", "provider.credential_shape", "provider.stored_continuation", "provider.continuation_mismatch", "provider.continuation_contract", "provider.stateless_history", "provider.events_after_completion", "provider.duplicate_call", "provider.tool_cancel_live", "provider.complete_unavailable", "provider.parallel_tools", "provider.binding_identity", "provider.profile_type", "provider.event_type", "provider.feature", "provider.input_kind", "provider.output_kind", "provider.builtin", "provider.credential_missing", "provider.profile_configuration", "continue.instruction", "canary.bind_note", "user_data.note", "context.note", "taint.blocked", "taint.reason_steered", "taint.reason_tainted", "taint.destination_blocked", "taint.destination_confirm", "advisory.notice_elevated", "advisory.notice_high", "advisory.guidance", "attachments.too_many_files", "attachments.too_many_of_kind", "attachments.file_too_large", "attachments.turn_too_large", "attachments.not_accepted", "attachments.mime_not_allowed", "attachments.limits_unconfigured", "quota.exhausted", "quota.busy", "error.config", "error.request", "error.input", "error.action", "error.auth", "error.rate_limit", "error.busy", "error.unsupported", "error.unavailable", "error.bad_response", "error.network", "error.timeout", "error.safety", "error.blocked", "error.declined", "error.failed", "error.cancelled", "error.internal", "repair.default_guidance", "repair.items_guidance", "repair.prompt_header", "repair.prompt_intro", "repair.prompt_instructions", "repair.history_heading", "repair.section_previous_output", "repair.section_validator_rejection", "repair.section_repair_guidance", "repair.section_instructions", "structured.answer_tool", "structured.answer_missing", "compaction.request", "compaction.tool_call", "compaction.tool_result", "decision.box_image", "detect.blocked", "detect.call_blocked", "detect.output_blocked", "detect.shown_blocked", "detect.hint.ids", "detect.hint.financial", "detect.hint.network", "detect.hint.credentials", "detect.hint.injection", "detect.hint.tool_instructions", "detect.hint.canary_leak", "detect.hint.prompt_leak", "detect.hint.marker_leak", "detect.hint.ungiven_images", "detect.hint.ungiven_links", "detect.hint.tool_leak", "detect.hint.own", "egress.default_repair_guidance", "egress.refusal", "egress.refusal_cut", "egress.rejection", "egress.rejection_found", "egress.hint_unscannable", "egress.hint_provider_tool_leak", "thought.omitted_image", "thought.omitted_link", "thought.omitted_instructions", "session.abandon_gated", "session.tool_denied", "session.tool_aborted", "session.sign_in", "sign_in.link", "sign_in.pending", "sign_in.done", "sign_in.declined", "sign_in.expired", "sign_in.out_of_scope", "session.gate_expired", "session.provider_state_unowned", "session.conversation_unknown", "session.turn_ended", "session.gate_pending", "session.part_skipped", "live.session_ended", "voice.unsupported", "voice.permission", "voice.unavailable", "voice.failed", "voice.empty", "stop.cancelled", "stop.interrupted", "stop.length", "stop.filtered", "stop.provider_error", "stop.stream_incomplete", "stop.step_limit", "composer.model", "composer.effort", "tool.awaiting_user", "tool.completed_hidden", "tool.t2_loader_needs_snapshot", "tool.t2_loader_shape", "tool.t2_loader_output_invalid", "tool.execution_uncertain", "tool.input_invalid", "tool.input_invalid_after_mutate", "tool.output_invalid_after_mutate", "tool.handler_no_output", "tool.did_not_run", "tool.page_no_answer", "tool.page_timed_out", "tool.output_invalid", "tool.not_loaded_t2", "tool.wait_unknown", "tool.wait_cycle", "tool.not_visible", "tool.builtin_not_enabled", "tool.provider_native", "tool.not_registered", "tool.builtin_needs_snapshot", "tool.not_allowed", "tool.not_eligible", "tool.unsupported_type", "tool.agent_call_limit", "tool.agent_failed", "tool.activity_failed", "protocol.not_served", "protocol.profile_type", "protocol.options", "protocol.option_clash", "protocol.base_options", "protocol.id_clash", "protocol.ws_headers", "protocol.builtin_unwritten", "protocol.provider_missing", "protocol.connection", "protocol.part_schema", "protocol.part_invalid", "protocol.key_invalid", "protocol.no_key", "protocol.reply_shape", "protocol.endpoint_url", "protocol.endpoint_host", "protocol.http", "protocol.no_operation", "protocol.definition", "protocol.provider_id_clash", "protocol.history_needed"];
7902
7903
  /** One of {@linkcode LABEL_KEYS}. */
7903
7904
  export type LabelKey = (typeof LABEL_KEYS)[number];
7904
7905
  /**
@@ -7907,7 +7908,7 @@ export type LabelKey = (typeof LABEL_KEYS)[number];
7907
7908
  * puts into history. Only these overrides travel to the browser; the rest
7908
7909
  * (repair prompts, canary, taint, egress) stay on the host.
7909
7910
  */
7910
- export declare const CLIENT_LABEL_KEYS: readonly ["attachments.too_many_files", "attachments.too_many_of_kind", "attachments.file_too_large", "attachments.turn_too_large", "attachments.not_accepted", "attachments.mime_not_allowed", "input.too_long", "attachments.limits_unconfigured", "detect.blocked", "error.config", "error.request", "error.input", "error.action", "error.auth", "error.rate_limit", "error.busy", "error.unsupported", "error.unavailable", "error.bad_response", "error.network", "error.timeout", "error.safety", "error.blocked", "error.declined", "error.failed", "error.cancelled", "error.internal", "session.abandon_gated", "session.tool_denied", "session.sign_in", "session.gate_expired", "session.turn_ended", "session.gate_pending", "session.part_skipped", "live.session_ended", "tool.awaiting_user", "tool.completed_hidden", "tool.execution_uncertain", "voice.unsupported", "voice.permission", "voice.unavailable", "voice.failed", "voice.empty", "stop.cancelled", "stop.interrupted", "stop.length", "stop.filtered", "stop.provider_error", "stop.stream_incomplete", "stop.step_limit", "composer.model", "composer.effort"];
7911
+ export declare const CLIENT_LABEL_KEYS: readonly ["attachments.too_many_files", "attachments.too_many_of_kind", "attachments.file_too_large", "attachments.turn_too_large", "attachments.not_accepted", "attachments.mime_not_allowed", "attachments.limits_unconfigured", "detect.blocked", "error.config", "error.request", "error.input", "error.action", "error.auth", "error.rate_limit", "error.busy", "error.unsupported", "error.unavailable", "error.bad_response", "error.network", "error.timeout", "error.safety", "error.blocked", "error.declined", "error.failed", "error.cancelled", "error.internal", "session.abandon_gated", "session.tool_denied", "session.sign_in", "session.gate_expired", "session.turn_ended", "session.gate_pending", "session.part_skipped", "live.session_ended", "tool.awaiting_user", "tool.completed_hidden", "tool.execution_uncertain", "voice.unsupported", "voice.permission", "voice.unavailable", "voice.failed", "voice.empty", "stop.cancelled", "stop.interrupted", "stop.length", "stop.filtered", "stop.provider_error", "stop.stream_incomplete", "stop.step_limit", "composer.model", "composer.effort"];
7911
7912
  /** One of {@linkcode CLIENT_LABEL_KEYS}. */
7912
7913
  export type ClientLabelKey = (typeof CLIENT_LABEL_KEYS)[number];
7913
7914
  /** Host-supplied replacement templates, \`{param}\` placeholders included. */
@@ -8715,6 +8716,7 @@ export { buildRecord, contentOf, inlineContent, TRACE_SCHEMA_URL };
8715
8716
  `,"file:///node_modules/@theoremjs/agents/src/kernel/protocols/binding.d.ts":`import { z } from 'zod';
8716
8717
  import { type JsonObject } from '../json.js';
8717
8718
  import { type KeySlot } from '../schema.js';
8719
+ import { type ProviderLimits } from './limits.js';
8718
8720
  import { type ModelProfileType, type Protocol } from './protocol.js';
8719
8721
  import type { RegisteredProvider } from './provider.js';
8720
8722
  /** A vault slot name. */
@@ -8745,9 +8747,10 @@ export interface ModelBinding extends z.infer<typeof commonModelSettingsSchema>
8745
8747
  keySlot?: string;
8746
8748
  fallbackKeySlot?: string;
8747
8749
  options?: JsonObject;
8750
+ limits?: ProviderLimits;
8748
8751
  }
8749
8752
  /** A decision profile's model: no generation settings, and a time limit. */
8750
- export interface DecisionModelBinding extends Pick<ModelBinding, 'protocol' | 'provider' | 'apiId' | 'keySlot' | 'fallbackKeySlot' | 'options'> {
8753
+ export interface DecisionModelBinding extends Pick<ModelBinding, 'protocol' | 'provider' | 'apiId' | 'keySlot' | 'fallbackKeySlot' | 'options' | 'limits'> {
8751
8754
  timeoutMs?: number;
8752
8755
  }
8753
8756
  export declare const modelBindingSchema: z.ZodType<ModelBinding>;
@@ -9289,7 +9292,7 @@ import { type JsonObject } from '../json.js';
9289
9292
  import type { KeyVault } from '../registry/vault.js';
9290
9293
  import type { DecisionResult, KeySlot } from '../types.js';
9291
9294
  import { type DecisionModelBinding, type ModelBinding } from './binding.js';
9292
- import { type ProviderLimits } from './limits.js';
9295
+ import type { ProviderLimits } from './limits.js';
9293
9296
  import type { DecisionCall, EmbeddingCall, EmbeddingResult, ModelProfileType, ProtocolOperations } from './protocol.js';
9294
9297
  import type { RegisteredProvider } from './provider.js';
9295
9298
  /** Opens a WebSocket with the headers and subprotocols a sign-in put on it. */
@@ -9304,7 +9307,8 @@ export type OpenWebSocket = (url: string, init: {
9304
9307
  export declare function plainWebSocket(provider: string): OpenWebSocket;
9305
9308
  /** What a host lends every provider call: its keys, its network, its clock, and its budgets. */
9306
9309
  export interface ProviderHostOptions {
9307
- limits?: Partial<ProviderLimits>;
9310
+ /** Overrides the model's own \`limits\`, one field at a time. */
9311
+ limits?: ProviderLimits;
9308
9312
  vault?: KeyVault;
9309
9313
  fetch?: typeof fetch;
9310
9314
  wait?: Wait;
@@ -9828,7 +9832,9 @@ export type EstimatedCost = TurnCost & {
9828
9832
  };
9829
9833
  /** The cost of one call from its tokens, or nothing for a model the table doesn't price. */
9830
9834
  export declare function costFromPrices(table: PriceTable, apiId: string, tokens: TurnTokens): EstimatedCost | undefined;
9831
- `,"file:///node_modules/@theoremjs/agents/src/providers/system-one/protocol.d.ts":`import { type Protocol } from '../../kernel/protocols/mod.js';
9835
+ `,"file:///node_modules/@theoremjs/agents/src/providers/system-one/protocol.d.ts":`import { type JsonObject } from '../../kernel/json.js';
9836
+ import { type Protocol } from '../../kernel/protocols/mod.js';
9837
+ import type { DecisionResult } from '../../kernel/types.js';
9832
9838
  /** What a System One binding may set. Both are TypeSafe's opt-in "danger zone" headers. */
9833
9839
  export interface SystemOneOptions {
9834
9840
  images?: boolean;
@@ -9836,6 +9842,8 @@ export interface SystemOneOptions {
9836
9842
  }
9837
9843
  /** TypeSafe's decision API: questions about a state, answered in one call. */
9838
9844
  export declare const systemOne: Protocol<SystemOneOptions>;
9845
+ /** The first decision reply, read into the kernel's result. Shared by every decision API that answers as System One does. */
9846
+ export declare function decisionAnswered(protocol: string, rows: AsyncIterable<JsonObject>): Promise<DecisionResult>;
9839
9847
  `,"file:///node_modules/@theoremjs/agents/src/kernel/protocols/mod.d.ts":`export * from './binding.js';
9840
9848
  export * from './prices.js';
9841
9849
  export * from './protocol.js';
@@ -9862,16 +9870,18 @@ export declare const openRouterOpenAi: Protocol<OpenRouterOptions>;
9862
9870
  `,"file:///node_modules/@theoremjs/agents/src/providers/openrouter/images-protocol.d.ts":`import { type Protocol } from '../../kernel/protocols/mod.js';
9863
9871
  /** OpenRouter's image generation: \`/images\`, or the chat path with its image tool when text is wanted too. */
9864
9872
  export declare const openRouterImages: Protocol<Record<string, never>>;
9865
- `,"file:///node_modules/@theoremjs/agents/src/providers/openrouter/embedding-protocol.d.ts":`import { type Protocol } from '../../kernel/protocols/mod.js';
9866
- /** What an \`openRouterEmbedding\` binding sets in \`options\`. */
9867
- export interface OpenRouterEmbeddingOptions {
9873
+ `,"file:///node_modules/@theoremjs/agents/src/providers/openrouter/embeddings-protocol.d.ts":`import { type Protocol } from '../../kernel/protocols/mod.js';
9874
+ /** What an \`openRouterEmbeddings\` binding sets in \`options\`. */
9875
+ export interface OpenRouterEmbeddingsOptions {
9868
9876
  encodingFormat?: 'float' | 'base64';
9869
9877
  }
9870
- export declare const openRouterEmbedding: Protocol<OpenRouterEmbeddingOptions>;
9878
+ export declare const openRouterEmbeddings: Protocol<OpenRouterEmbeddingsOptions>;
9871
9879
  `,"file:///node_modules/@theoremjs/agents/src/providers/openrouter/decisions-protocol.d.ts":`import { type Protocol } from '../../kernel/protocols/mod.js';
9872
- import { type SystemOneOptions } from '../system-one/protocol.js';
9873
- /** OpenRouter's decision API: System One's questions and answers, at OpenRouter's own endpoint. */
9874
- export declare const openRouterDecisions: Protocol<SystemOneOptions>;
9880
+ /**
9881
+ * OpenRouter's decision API: questions about a state, answered in one call. It takes no options:
9882
+ * images and box questions need no opt-in, and a request with an image runs in long context.
9883
+ */
9884
+ export declare const openRouterDecisions: Protocol<Record<string, never>>;
9875
9885
  `,"file:///node_modules/@theoremjs/agents/src/providers/open-ai/protocol.d.ts":`import { type Protocol } from '../../kernel/protocols/mod.js';
9876
9886
  /** OpenAI Chat Completions: the shape most compatible servers speak. */
9877
9887
  export declare const openAi: Protocol<Record<string, never>>;
@@ -9882,13 +9892,13 @@ export interface LocalConnection {
9882
9892
  }
9883
9893
  /** A server on your machine or network that speaks OpenAI's chat API: Ollama, llama.cpp, vLLM, LM Studio. */
9884
9894
  export declare const localProvider: Provider<LocalConnection, string>;
9885
- `,"file:///node_modules/@theoremjs/agents/src/providers/local/embedding-protocol.d.ts":`import { type Protocol } from '../../kernel/protocols/mod.js';
9886
- /** What an \`ollamaEmbedding\` binding sets in \`options\`. */
9887
- export interface OllamaEmbeddingOptions {
9895
+ `,"file:///node_modules/@theoremjs/agents/src/providers/local/embeddings-protocol.d.ts":`import { type Protocol } from '../../kernel/protocols/mod.js';
9896
+ /** What an \`ollamaEmbeddings\` binding sets in \`options\`. */
9897
+ export interface OllamaEmbeddingsOptions {
9888
9898
  truncate?: boolean;
9889
9899
  dimensions?: number;
9890
9900
  }
9891
- export declare const ollamaEmbedding: Protocol<OllamaEmbeddingOptions>;
9901
+ export declare const ollamaEmbeddings: Protocol<OllamaEmbeddingsOptions>;
9892
9902
  `,"file:///node_modules/@theoremjs/agents/src/providers/gemini/provider.d.ts":`import { type Provider } from '../../kernel/protocols/provider.js';
9893
9903
  /** What registering \`geminiProvider\` takes as \`connection\`. */
9894
9904
  export interface GeminiConnection {
@@ -9907,14 +9917,14 @@ export interface GeminiInteractionsOptions {
9907
9917
  }
9908
9918
  /** Gemini's Interactions API: text, images, and speech, all at \`/interactions\`. */
9909
9919
  export declare const geminiInteractions: Protocol<GeminiInteractionsOptions>;
9910
- `,"file:///node_modules/@theoremjs/agents/src/providers/gemini/embedding-protocol.d.ts":`import type { Protocol } from '../../kernel/protocols/protocol.js';
9911
- /** What a \`geminiEmbedding\` binding sets in \`options\`. */
9912
- export interface GeminiEmbeddingOptions {
9920
+ `,"file:///node_modules/@theoremjs/agents/src/providers/gemini/embeddings-protocol.d.ts":`import type { Protocol } from '../../kernel/protocols/protocol.js';
9921
+ /** What a \`geminiEmbeddings\` binding sets in \`options\`. */
9922
+ export interface GeminiEmbeddingsOptions {
9913
9923
  /** For \`gemini-embedding-001\`; Gemini Embedding 2 refuses it and reads the request's \`task\` from the text. */
9914
9924
  taskType?: 'RETRIEVAL_QUERY' | 'RETRIEVAL_DOCUMENT' | 'SEMANTIC_SIMILARITY' | 'CLASSIFICATION' | 'CLUSTERING' | 'QUESTION_ANSWERING' | 'FACT_VERIFICATION' | 'CODE_RETRIEVAL_QUERY';
9915
9925
  outputDimensionality?: 768 | 1536 | 3072;
9916
9926
  }
9917
- export declare const geminiEmbedding: Protocol<GeminiEmbeddingOptions>;
9927
+ export declare const geminiEmbeddings: Protocol<GeminiEmbeddingsOptions>;
9918
9928
  `,"file:///node_modules/@theoremjs/agents/src/providers/embedding-limits.d.ts":`import type { ModelBinding } from '../kernel/protocols/binding.js';
9919
9929
  import type { EmbeddingModelLimits, Protocol } from '../kernel/protocols/protocol.js';
9920
9930
  /**
@@ -11572,8 +11582,6 @@ declare const SCOPED: readonly ["canary_leak", "prompt_leak"];
11572
11582
  declare function isScoped(detector: Detector): detector is (typeof SCOPED)[number];
11573
11583
  /** The host's own detectors that read \`boundary\`. */
11574
11584
  declare function hostAt(boundary: Boundary, detect: ResolvedDetect): HostDetector[];
11575
- /** Refuses a text the person or host sent that is over \`MAX_INBOUND_CHARS\`; \`where\` names it for the log. */
11576
- declare function refuseOverlong(text: string, where: string): void;
11577
11585
  /** Reads \`text\` as it crosses \`boundary\` under the profile's resolved matrix. */
11578
11586
  declare function detectAt(text: string, boundary: Boundary, detect: ResolvedDetect, scope?: DetectScope): Detection;
11579
11587
  /** The detectors that read \`boundary\`: every one not set to \`ignore\`. */
@@ -11634,7 +11642,7 @@ declare function boundaryReader(boundary: Boundary, detect: ResolvedDetect): Bou
11634
11642
  */
11635
11643
  declare function detectEvent(boundary: Boundary, found: Pick<Detection, 'action' | 'hits'>, provenance?: Provenance, stage?: GuardrailStage): GuardrailEvent | undefined;
11636
11644
  export type { BoundaryReader, Detection, DetectOutcome, DetectScope, Release, StoredSides, StreamRead, Stretch, };
11637
- export { boundaryReader, detectAt, detectEvent, detectorsAt, detectReads, detectRelease, hostAt, isScoped, leakScopeOf, redactDetectors, refuseOverlong, scopeOf, storedHostSpans, storedSpans, stronger, };
11645
+ export { boundaryReader, detectAt, detectEvent, detectorsAt, detectReads, detectRelease, hostAt, isScoped, leakScopeOf, redactDetectors, scopeOf, storedHostSpans, storedSpans, stronger, };
11638
11646
  `,"file:///node_modules/@theoremjs/agents/src/guardrails/egress.d.ts":`import type { ModelEvent } from '../kernel/types.js';
11639
11647
  import type { ResolvedDetect } from './detectors.js';
11640
11648
  import type { GuardrailContext, GuardrailHit } from './types.js';
@@ -11784,7 +11792,7 @@ import type { TraceSink } from '../../observability/trace-sink.js';
11784
11792
  import type { ProviderHostOptions } from '../protocols/runtime.js';
11785
11793
  import type { KernelRegistry } from '../registry/kernel-registry.js';
11786
11794
  import type { DecisionProfile, DecisionRequest, DecisionResult } from '../types.js';
11787
- /** Where the provider takes decision requests, as its preset states. */
11795
+ /** Each decision failure code, and the error kind it reads as. */
11788
11796
  declare const DECISION_ERROR_KINDS: {
11789
11797
  readonly invalid_request: "request";
11790
11798
  readonly authentication: "auth";
@@ -11817,8 +11825,8 @@ export declare function validateDecisionRequest(request: Omit<DecisionRequest, '
11817
11825
  questions: unknown;
11818
11826
  }, profile: DecisionProfile): asserts request is DecisionRequest;
11819
11827
  /**
11820
- * Exactly one decision request, traced however it ends. An ambiguous POST is never retried,
11821
- * and a trace write failure never changes the decision's outcome.
11828
+ * One decision, traced however it ends. A transient failure (408, 429, a 5xx gateway or a network
11829
+ * error) is retried within five seconds; a trace write failure never changes the decision's outcome.
11822
11830
  */
11823
11831
  export declare function runDecisionInRegistry(registry: KernelRegistry, request: DecisionRequest, options: RunDecisionOptions): Promise<DecisionResult>;
11824
11832
  export {};
@@ -12250,7 +12258,7 @@ export type { Directive, DirectiveSignal } from './tool-directives.js';
12250
12258
  export { advisoryLevel, DIRECTIVE_SIGNALS, directives } from './tool-directives.js';
12251
12259
  export type { GuardedToolText, InspectedToolArguments } from './tool-result.js';
12252
12260
  export { checkTaintGate, composeToolText, guardToolFailureText, guardToolResult, inspectToolArguments, isRemoteOrigin, isSuspicious, isTainted, recordTaint, TOOL_CLOSE, toolCallEvent, wrapToolData, } from './tool-result.js';
12253
- export type { AdvisoryLevel, BlockedReplyOnBlock, BlockedReplySpec, DestinationGate, GuardrailAction, GuardrailContext, GuardrailEvent, GuardrailHit, GuardrailStage, HostGuardrailsSpec, NetworkGuardrailSpec, OutboundPayload, ProfileGuardrailsSpec, Provenance, QuotaGuardrailSpec, ResolvedBlockedReply, ResolvedGuardrailPolicy, Severity, TaintGate, TaintGuardrailSpec, ToolOrigin, TrustLevel, TurnTaint, Verdict, } from './types.js';
12261
+ export type { AdvisoryLevel, BlockedReplyOnBlock, BlockedReplySpec, DecisionDisclosureEnforcer, DecisionDisclosureVerdict, DecisionGuardrailsSpec, DestinationGate, GuardrailAction, GuardrailContext, GuardrailEvent, GuardrailHit, GuardrailStage, HostGuardrailsSpec, NetworkGuardrailSpec, OutboundPayload, ProfileGuardrailsSpec, Provenance, QuotaGuardrailSpec, ResolvedBlockedReply, ResolvedGuardrailPolicy, Severity, TaintGate, TaintGuardrailSpec, ToolOrigin, TrustLevel, TurnTaint, Verdict, } from './types.js';
12254
12262
  export { ADVISORY_LEVELS, BLOCKED_REPLY_ON_BLOCK, DESTINATION_GATES, GUARDRAIL_STAGES, SEVERITIES, TAINT_GATES, TOOL_ORIGINS, TRUST_LEVELS, } from './types.js';
12255
12263
  `,"file:///node_modules/@theoremjs/agents/src/guardrails/tool-result.d.ts":`import type { ToolBoundary } from './boundaries.js';
12256
12264
  import { type DetectScope } from './detect-at.js';
@@ -12424,8 +12432,8 @@ declare const CARD_CANDIDATE: RegExp;
12424
12432
  interface SensitivePattern {
12425
12433
  group: SensitiveGroup;
12426
12434
  pattern: RegExp;
12427
- /** Whether a match at \`at\` of \`text\` counts. */
12428
- hit?: (match: string, text: string, at: number) => boolean;
12435
+ /** Whether a match at \`at\` of \`text\` counts; \`lower\` is \`text\` in lower case. */
12436
+ hit?: (match: string, text: string, at: number, lower?: () => string) => boolean;
12429
12437
  }
12430
12438
  /** Every pattern, with its group. */
12431
12439
  declare const SENSITIVE_PATTERNS: readonly SensitivePattern[];