@theoremjs/studio 0.3.4-next.528.g44c76f9 → 0.3.4-next.540.g67b727f
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 +4 -1
- package/browser-connection.js +1 -1
- package/compile-workspace.js +26 -7
- package/compile.js +13 -2
- package/{example.d.ts → cookbooks/catalog.d.ts} +35 -5
- package/cookbooks/catalog.js +686 -0
- package/cookbooks/checks.d.ts +10 -0
- package/cookbooks/checks.js +93 -0
- package/cookbooks/exchanges.d.ts +11 -0
- package/cookbooks/exchanges.js +13 -0
- package/cookbooks/fixtures/research.trace.json +4455 -0
- package/cookbooks/mod.d.ts +8 -0
- package/cookbooks/mod.js +5 -0
- package/cookbooks/project.d.ts +66 -0
- package/cookbooks/project.js +195 -0
- package/cookbooks/providers.d.ts +165 -0
- package/cookbooks/providers.js +289 -0
- package/cookbooks/sources.d.ts +10 -0
- package/cookbooks/sources.js +125 -0
- package/cookbooks/tools.d.ts +23 -0
- package/{concierge-demo.js → cookbooks/tools.js} +428 -42
- package/map.js +3 -1
- package/mod.d.ts +3 -3
- package/mod.js +2 -3
- package/package.json +4 -4
- package/page/assets/{Banner-BhKnM-76.js → Banner-BwxDeFY1.js} +2 -2
- package/page/assets/{ConsoleFrame-CnGU8SiE.js → ConsoleFrame-Dewh6VXK.js} +1 -1
- package/page/assets/{ContextMenu-G2oYmfwG.js → ContextMenu-0p_1Utr-.js} +2 -2
- package/page/assets/{ToolResultCharts-DpaHoQFj.js → ToolResultCharts-ei_o_wTg.js} +1 -1
- package/page/assets/{TraceInspector-Bo0PzFVf.js → TraceInspector-DyQAWqOG.js} +1 -1
- package/page/assets/{TraceOverview-CM-sd2zM.js → TraceOverview-BawPHDUZ.js} +1 -1
- package/page/assets/{_virtual_studio-type-sources-DVbxNwnP.js → _virtual_studio-type-sources-C1mRXxbj.js} +29 -250
- package/page/assets/browser-engine-BBhaQ73h.js +11 -0
- package/page/assets/browser-transport-BMGb5bKR.js +47 -0
- package/page/assets/{compile-egress-BRGW9qfO.js → compile-egress-C3etX-3o.js} +1 -1
- package/page/assets/{crypto-BAY2nUlu.js → crypto-Dd6XxhqK.js} +1 -1
- package/page/assets/{encode-files-BSTfq_Gp.js → encode-files-CiyHxnUC.js} +1 -1
- package/page/assets/{export-agent-CtklkKZk.js → export-agent-CIOzkXW7.js} +2 -2
- package/page/assets/{guardrail-tester-BXROlU1L.js → guardrail-tester-Vn3HjOBN.js} +1 -1
- package/page/assets/host-patterns-F-KZIzkF.js +1 -0
- package/page/assets/{index-DbHspDC4.js → index-CQx3WisY.js} +120 -72
- package/page/assets/{live-ingress-qi-y5uvH.js → live-ingress-OuSlQ6q7.js} +1 -1
- package/page/assets/{live-messages-DIf_R-NT.js → live-messages-BNhCuiuF.js} +1 -1
- package/page/assets/reader-BT_YeHdq.js +7 -0
- package/page/assets/shaped-data-DYOBdvLJ.js +20 -0
- package/page/assets/{stub-4m0tKRlG.js → stub-DPcZtI0s.js} +78 -40
- package/page/assets/{studio-code-pane-Dt3MWPBE.js → studio-code-pane-CTaPxpwn.js} +3 -3
- package/page/assets/{studio-console-4PMBDYuu.js → studio-console-D2-0qGXG.js} +1 -1
- package/page/assets/{studio-decision-BiN_FO02.js → studio-decision-DjkIYfPm.js} +1 -1
- package/page/assets/{studio-embedding-C7gIUtxM.js → studio-embedding-IRaxgsCF.js} +1 -1
- package/page/assets/{studio-host-console-DOBHkxDj.js → studio-host-console-CpbWUasd.js} +2 -2
- package/page/assets/{studio-labels-Dh_rsQs7.js → studio-labels-7mSwqgwb.js} +1 -1
- package/page/assets/{studio-live-xPsQmJyQ.js → studio-live-DO8aNuBt.js} +1 -1
- package/page/assets/studio-map-GD9XCa23.js +1 -0
- package/page/assets/studio-trace-replay-Bx2YreVs.js +2 -0
- package/page/assets/{studio-type-checker-CHFs7A7H.js → studio-type-checker-B5DVxAZ0.js} +1 -1
- package/page/assets/tool-schema-CxLtS_Zt.js +17 -0
- package/page/assets/{trace-record-D9wgX8kq.js → trace-record-B2MF8flo.js} +1 -1
- package/page/assets/tree-Bi2FOU_h.js +3 -0
- package/page/assets/{turn-client-BWO4ocVM.js → turn-client-BCi5WnI6.js} +2 -2
- package/page/assets/types-s-3wFTyD.js +1 -0
- package/page/assets/{use-one-call-ApIuuZX3.js → use-one-call-OZH6wzzP.js} +1 -1
- package/page/assets/workspace-BiCkglEt.js +1 -0
- package/page/index.html +17 -17
- package/policy.js +1 -1
- package/registrations.d.ts +7 -1
- package/replay.d.ts +11 -0
- package/replay.js +67 -11
- package/runtime-scope.js +27 -3
- package/server/draft-decide.d.ts +1 -1
- package/source.js +2 -1
- package/stub.js +1 -1
- package/surface.js +6 -3
- package/tools.js +12 -6
- package/types.d.ts +2 -0
- package/ui/lib/studio-examples.d.ts +6 -31
- package/ui/lib/studio-examples.js +30 -15
- package/ui/lib/studio-open.d.ts +4 -1
- package/ui/lib/studio-open.js +6 -5
- package/ui/lib/tree-map-layout.js +9 -1
- package/ui/profile-editor.js +9 -8
- package/ui/studio-screen.js +30 -18
- package/workspace.js +8 -2
- package/concierge-demo.d.ts +0 -17
- package/example.js +0 -363
- package/page/assets/browser-engine-BJYQz5d_.js +0 -11
- package/page/assets/browser-transport-YKpXhacP.js +0 -47
- package/page/assets/host-patterns-cSf1U25G.js +0 -1
- package/page/assets/reader-BkaAkeh0.js +0 -7
- package/page/assets/shaped-data-C4jsvipW.js +0 -20
- package/page/assets/studio-map-Cc4_9fe9.js +0 -1
- package/page/assets/studio-trace-replay-D5JoQXyY.js +0 -2
- package/page/assets/tool-schema-DpbtSZtQ.js +0 -17
- package/page/assets/tree-0OoOeHfS.js +0 -3
- package/page/assets/types-BRZU5tBz.js +0 -1
- package/page/assets/workspace-DJBP4Adw.js +0 -1
|
@@ -4772,7 +4772,6 @@ export { awaitingUserInputSchema, type GateReference, gateReferenceSchema, isAwa
|
|
|
4772
4772
|
export type * from './src/kernel/types.js';
|
|
4773
4773
|
export type { OtlpAnyValue, OtlpKeyValue, OtlpSpan, OtlpTraceRequest, ProfileObservabilitySpec, ResolvedObservabilityPolicy, ResolvedScrubSwitch, ResolvedTraceInclude, ResolvedTraceScrub, ScrubSwitch, SpanHandle, SpanLinkInput, SpanOptions, TraceAttributeGroup, TraceAttributeMeta, TraceAttributes, TraceAttributeValue, TraceBytes, TraceClock, TraceContent, TraceEventMeta, TraceIncludeSpec, TraceJson, TraceOptionMeta, TraceRecord, TraceScrubSpec, TraceSink, TraceSpan, TraceSpanEvent, TraceSpanKind, TraceSpanLink, TraceSpanMeta, TraceSpanStatus, TraceSpanType, TraceTree, TraceValueFormat, TraceWriteContext, } from './src/observability/mod.js';
|
|
4774
4774
|
export { buildRecord, clearTraceDestinations, contentOf, getTraceDestination, inlineContent, isTraceSink, listTraceDestinationIds, memorySink, noopSink, readTraceparent, registerTraceDestination, requireTraceDestination, resolveObservabilityPolicy, resolveTraceWriter, startTrace, TRACE_ATTRIBUTE_GROUPS, TRACE_FIELDS, TRACE_SPAN_TYPES, TRACE_STATUS, toOtlpJson, traceAttributeMeta, traceBytes, traceContent, traceEventAttributeMeta, traceEventMeta, traceJson, traceRecordSchema, traceSpanMeta, writeTrace, } from './src/observability/mod.js';
|
|
4775
|
-
export * from './src/presets/mod.js';
|
|
4776
4775
|
export * from './src/providers/mod.js';
|
|
4777
4776
|
`,"file:///node_modules/@theoremjs/agents/src/providers/mod.d.ts":`/**
|
|
4778
4777
|
* Protocols, providers, and what it takes to define either: a protocol owns the wire, a provider is
|
|
@@ -5102,7 +5101,8 @@ export interface ProtocolDefinition<O = unknown, S = unknown> {
|
|
|
5102
5101
|
custom?: Readonly<Record<string, z.ZodType<JsonObject>>>;
|
|
5103
5102
|
/**
|
|
5104
5103
|
* Turns the reply's framing into rows. Absent: SSE for a stream, one JSON row otherwise, and a
|
|
5105
|
-
* body that is not JSON as one \`{ eventType: 'http_body', mime_type, data }\` row, base64
|
|
5104
|
+
* body that is not JSON as one \`{ eventType: 'http_body', mime_type, data }\` row, base64, with
|
|
5105
|
+
* \`id\` when the reply names itself in \`X-Generation-Id\`.
|
|
5106
5106
|
*/
|
|
5107
5107
|
framing?(response: Response, stream: boolean): AsyncIterable<JsonObject>;
|
|
5108
5108
|
/** Types a failed answer. Absent: the kind follows the HTTP status. */
|
|
@@ -7876,6 +7876,7 @@ export { namePatterns, ownToolsWithout, toolLeakSpans };
|
|
|
7876
7876
|
`,"file:///node_modules/@theoremjs/agents/src/observability/spans.d.ts":`declare const OMIT_INJECTION = "[omitted - injection]";
|
|
7877
7877
|
declare const OMIT_SENSITIVE = "[omitted -sensitive]";
|
|
7878
7878
|
declare const OMIT_CANARY = "[omitted - canary]";
|
|
7879
|
+
declare const OMIT_PROMPT = "[omitted - instructions]";
|
|
7879
7880
|
type RedactKind = 'injection' | 'sensitive' | 'canary' | 'prompt' | 'image' | 'link' | 'tool' | 'directive' | 'host';
|
|
7880
7881
|
interface RedactSpan {
|
|
7881
7882
|
start: number;
|
|
@@ -7894,11 +7895,11 @@ declare function mergeSpans(spans: RedactSpan[]): RedactSpan[];
|
|
|
7894
7895
|
declare function applySpans(text: string, spans: RedactSpan[]): string;
|
|
7895
7896
|
declare function spansFromPatterns(text: string, patterns: RegExp[], kind: RedactKind): RedactSpan[];
|
|
7896
7897
|
export type { RedactKind, RedactSpan };
|
|
7897
|
-
export { applySpans, blobAt, mergeSpans, OMIT_CANARY, OMIT_INJECTION, OMIT_SENSITIVE, spansFromPatterns, };
|
|
7898
|
+
export { applySpans, blobAt, mergeSpans, OMIT_CANARY, OMIT_INJECTION, OMIT_PROMPT, OMIT_SENSITIVE, spansFromPatterns, };
|
|
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", "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
|
+
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.conflict", "error.not_found", "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", "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.conflict", "error.not_found", "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. */
|
|
@@ -8047,7 +8048,7 @@ export type { ErrorCopies, ErrorCopy };
|
|
|
8047
8048
|
* the builder in code and traces (\`errorKind\`, \`error.type\`), the user through
|
|
8048
8049
|
* the kind's wording (\`error.<kind>\` in the labels).
|
|
8049
8050
|
*/
|
|
8050
|
-
export declare const ERROR_KINDS: readonly ["config", "request", "input", "action", "auth", "rate_limit", "busy", "unsupported", "unavailable", "bad_response", "network", "timeout", "safety", "blocked", "declined", "failed", "cancelled", "internal"];
|
|
8051
|
+
export declare const ERROR_KINDS: readonly ["config", "request", "conflict", "not_found", "input", "action", "auth", "rate_limit", "busy", "unsupported", "unavailable", "bad_response", "network", "timeout", "safety", "blocked", "declined", "failed", "cancelled", "internal"];
|
|
8051
8052
|
/** Why an operation failed; the user's wording and the HTTP status follow from it. */
|
|
8052
8053
|
export type ErrorKind = (typeof ERROR_KINDS)[number];
|
|
8053
8054
|
/** Options for a \`TheoremError\`: the cause and, optionally, wording for the user. */
|
|
@@ -8391,6 +8392,8 @@ export interface GuardedFetchOptions {
|
|
|
8391
8392
|
fetchFn?: typeof fetch;
|
|
8392
8393
|
/** Told how long each hop's checks took: its address, and its lookup when \`resolveHost\` is set. */
|
|
8393
8394
|
onCheck?: (ms: number) => void;
|
|
8395
|
+
/** Awaited once, after the first hop's checks pass and before anything is sent; what it throws passes unchanged. */
|
|
8396
|
+
beforeSend?: () => Promise<void>;
|
|
8394
8397
|
}
|
|
8395
8398
|
/** A host name's IPv4 and IPv6 addresses; empty when the name does not exist. */
|
|
8396
8399
|
export type ResolveHost = (hostname: string, signal?: AbortSignal) => Promise<readonly string[]>;
|
|
@@ -9596,7 +9599,7 @@ export declare class UncheckedOutput {
|
|
|
9596
9599
|
*/
|
|
9597
9600
|
export declare function uncheckedOutput(value: unknown): UncheckedOutput;
|
|
9598
9601
|
`,"file:///node_modules/@theoremjs/agents/src/kernel/tools/operation.d.ts":`import { z } from 'zod';
|
|
9599
|
-
import { TheoremError } from '../../guardrails/error.js';
|
|
9602
|
+
import { type ErrorKind, TheoremError } from '../../guardrails/error.js';
|
|
9600
9603
|
import { type JsonObject, type JsonValue } from '../json.js';
|
|
9601
9604
|
import type { InjectUnit } from '../stages.js';
|
|
9602
9605
|
import type { GateReference, TurnEventOf } from '../turn-events.js';
|
|
@@ -9666,45 +9669,14 @@ export interface ToolExecutionCoordinator {
|
|
|
9666
9669
|
}
|
|
9667
9670
|
/** A coordinator, a page dispatch or the kernel broke the tool-operation contract. */
|
|
9668
9671
|
export declare function operationBroken(reason: string): TheoremError;
|
|
9672
|
+
/** The user reads that the action is unresolved; the builder reads why, under the kind of what happened. */
|
|
9673
|
+
export declare function unresolvedOperation(kind: ErrorKind, reason: string, cause?: unknown): TheoremError;
|
|
9674
|
+
/** The host asked to run an operation that is still running or uncertain, so the host settles it first. */
|
|
9675
|
+
export declare function heldOperation(state: 'running' | 'uncertain'): TheoremError;
|
|
9669
9676
|
export declare function toolInvocationHash(value: unknown): Promise<string>;
|
|
9670
9677
|
export declare const toolOperationOutcomeSchema: z.ZodType<ToolOperationOutcome>;
|
|
9671
9678
|
export declare function operationWireValue(value: unknown): JsonValue;
|
|
9672
|
-
`,"file:///node_modules/@theoremjs/agents/src/guardrails/error.d.ts"
|
|
9673
|
-
import type { TurnEvent } from '../kernel/types.js';
|
|
9674
|
-
import { type LabelOverrides } from './labels.js';
|
|
9675
|
-
import { type ErrorCopies, type ErrorKind, TheoremError } from './theorem-error.js';
|
|
9676
|
-
/** True when the value is an error named \`AbortError\`. */
|
|
9677
|
-
declare function isAbortError(err: unknown): boolean;
|
|
9678
|
-
/** \`AbortSignal.timeout\` rejects with a \`TimeoutError\`, not an \`AbortError\`. */
|
|
9679
|
-
declare function isTimeoutError(err: unknown): boolean;
|
|
9680
|
-
/** Throws when the signal has aborted: its framework, abort or timeout reason, else an \`AbortError\`. */
|
|
9681
|
-
declare function throwIfAborted(signal?: AbortSignal): void;
|
|
9682
|
-
/** Anything that is not a \`TheoremError\` or an abort escaped every boundary that names kinds: a THEOREM bug. */
|
|
9683
|
-
declare function errorKind(err: unknown): ErrorKind;
|
|
9684
|
-
/** The error kind for an HTTP status: 401, 402 and 403 are \`auth\`; 408, 504 and 524 \`timeout\`; 429 \`rate_limit\`; 503 and 529 (overloaded) \`busy\`; 500 and above \`unavailable\`; the rest \`unsupported\`. */
|
|
9685
|
-
declare function kindOfHttpStatus(status: number): ErrorKind;
|
|
9686
|
-
/** The named reasons an error carries, one line each, in the profile's wording. */
|
|
9687
|
-
declare function errorCopyText(copy: ErrorCopies, labels?: LabelOverrides): string;
|
|
9688
|
-
/** Pass the profile's \`labels\`, or the profile's wording is skipped. */
|
|
9689
|
-
declare function publicError(err: unknown, labels?: LabelOverrides): string;
|
|
9690
|
-
/** Raw diagnostic for hosts, traces, and logs; never shown to end users. Each cause that says something new follows on its own line. */
|
|
9691
|
-
declare function describeError(err: unknown): string;
|
|
9692
|
-
/** fetch rejects only when no response came back, so any non-abort, non-timeout rejection is \`network\`. */
|
|
9693
|
-
declare function networkError(err: unknown): unknown;
|
|
9694
|
-
/** \`send\`, with a failed send or body read named as \`networkError\` names it. */
|
|
9695
|
-
declare function sendOrNetworkError(send: typeof fetch, ...args: Parameters<typeof fetch>): Promise<Response>;
|
|
9696
|
-
type ProducedError = TurnEventOf<'error'> & {
|
|
9697
|
-
errorInternal: string;
|
|
9698
|
-
};
|
|
9699
|
-
/** No user wording yet: \`withPublicLabels\` adds it where the event reaches the host, the one place that knows the profile. */
|
|
9700
|
-
declare function toErrorEvent(err: unknown): ProducedError;
|
|
9701
|
-
/** Wording already set (host copy) is kept. */
|
|
9702
|
-
declare function withPublicLabels(event: TurnEvent, labels?: LabelOverrides): TurnEvent;
|
|
9703
|
-
export type { ErrorCopies, ErrorCopy, ErrorKind, TheoremErrorOptions } from './theorem-error.js';
|
|
9704
|
-
export { ERROR_KINDS } from './theorem-error.js';
|
|
9705
|
-
export type { ProducedError };
|
|
9706
|
-
export { describeError, errorCopyText, errorKind, isAbortError, isTimeoutError, kindOfHttpStatus, networkError, publicError, sendOrNetworkError, TheoremError, throwIfAborted, toErrorEvent, withPublicLabels, };
|
|
9707
|
-
`,"file:///node_modules/@theoremjs/agents/src/kernel/tools/activity-label.d.ts":`/** One line of wording, or a list of lines read top to bottom: the first that fits is shown. */
|
|
9679
|
+
`,"file:///node_modules/@theoremjs/agents/src/guardrails/error.d.ts":"import type { TurnEventOf } from '../kernel/turn-events.js';\nimport type { TurnEvent } from '../kernel/types.js';\nimport { type LabelOverrides } from './labels.js';\nimport { type ErrorCopies, type ErrorKind, TheoremError } from './theorem-error.js';\n/** True when the value is an error named `AbortError`. */\ndeclare function isAbortError(err: unknown): boolean;\n/** `AbortSignal.timeout` rejects with a `TimeoutError`, not an `AbortError`. */\ndeclare function isTimeoutError(err: unknown): boolean;\n/** Throws when the signal has aborted: its framework, abort or timeout reason, else an `AbortError`. */\ndeclare function throwIfAborted(signal?: AbortSignal): void;\n/** Anything that is not a `TheoremError` or an abort escaped every boundary that names kinds: a THEOREM bug. */\ndeclare function errorKind(err: unknown): ErrorKind;\n/** The error kind for an HTTP status: 401, 402 and 403 are `auth`; 408, 504 and 524 `timeout`; 409 `conflict`; 429 `rate_limit`; 503 and 529 (overloaded) `busy`; 500 and above `unavailable`; the rest `unsupported`. */\ndeclare function kindOfHttpStatus(status: number): ErrorKind;\n/** The named reasons an error carries, one line each, in the profile's wording. */\ndeclare function errorCopyText(copy: ErrorCopies, labels?: LabelOverrides): string;\n/** Pass the profile's `labels`, or the profile's wording is skipped. */\ndeclare function publicError(err: unknown, labels?: LabelOverrides): string;\n/** Raw diagnostic for hosts, traces, and logs; never shown to end users. Each cause that says something new follows on its own line. */\ndeclare function describeError(err: unknown): string;\n/** fetch rejects only when no response came back, so any non-abort, non-timeout rejection is `network`. */\ndeclare function networkError(err: unknown): unknown;\n/** `send`, with a failed send or body read named as `networkError` names it. */\ndeclare function sendOrNetworkError(send: typeof fetch, ...args: Parameters<typeof fetch>): Promise<Response>;\ntype ProducedError = TurnEventOf<'error'> & {\n errorInternal: string;\n};\n/** No user wording yet: `withPublicLabels` adds it where the event reaches the host, the one place that knows the profile. */\ndeclare function toErrorEvent(err: unknown): ProducedError;\n/** Wording already set (host copy) is kept. */\ndeclare function withPublicLabels(event: TurnEvent, labels?: LabelOverrides): TurnEvent;\nexport type { ErrorCopies, ErrorCopy, ErrorKind, TheoremErrorOptions } from './theorem-error.js';\nexport { ERROR_KINDS } from './theorem-error.js';\nexport type { ProducedError };\nexport { describeError, errorCopyText, errorKind, isAbortError, isTimeoutError, kindOfHttpStatus, networkError, publicError, sendOrNetworkError, TheoremError, throwIfAborted, toErrorEvent, withPublicLabels, };\n","file:///node_modules/@theoremjs/agents/src/kernel/tools/activity-label.d.ts":`/** One line of wording, or a list of lines read top to bottom: the first that fits is shown. */
|
|
9708
9680
|
export type LabelTemplate = string | readonly string[];
|
|
9709
9681
|
/** A tool's name as a label shows it: \`manage_alert\` reads "manage alert". */
|
|
9710
9682
|
export declare function toolNameInWords(name: string): string;
|
|
@@ -9967,211 +9939,6 @@ import type { EmbeddingModelLimits, Protocol } from '../kernel/protocols/protoco
|
|
|
9967
9939
|
* \`protocols\`. Undefined when neither has it, and the kernel then holds requests to the profile alone.
|
|
9968
9940
|
*/
|
|
9969
9941
|
export declare function embeddingModelLimits(binding: Pick<ModelBinding, 'protocol' | 'apiId'>, protocols?: readonly Protocol[]): EmbeddingModelLimits | undefined;
|
|
9970
|
-
`,"file:///node_modules/@theoremjs/agents/src/presets/mod.d.ts":`/**
|
|
9971
|
-
* Host-convenience catalogs for first-party providers: provider builtins and media vocabularies.
|
|
9972
|
-
*
|
|
9973
|
-
* @module
|
|
9974
|
-
*/
|
|
9975
|
-
export type { GoogleBindingViolation, GoogleFreeTierGrounding, GoogleImageAspectRatio, GoogleImageInputMime, GoogleImageOutputMime, GoogleImagePins, GoogleImageResolution, GoogleSpeechVoice, GoogleThinkingLevel, GoogleVoiceInputMime, } from './google.js';
|
|
9976
|
-
export { GOOGLE_BUILTIN_TOOLS, GOOGLE_FREE_TIER_GROUNDING, GOOGLE_IMAGE_ASPECT_RATIOS, GOOGLE_IMAGE_INPUT_MIMES, GOOGLE_IMAGE_OUTPUT_MIMES, GOOGLE_IMAGE_RESOLUTIONS, GOOGLE_NO_EFFORT_API_IDS, GOOGLE_NO_THINKING_API_IDS, GOOGLE_SINGLE_TURN_API_IDS, GOOGLE_SPEECH_FORMATS, GOOGLE_SPEECH_VOICES, GOOGLE_THINKING_LEVELS, GOOGLE_THINKING_REQUIRED_API_IDS, GOOGLE_VOICE_INPUT_MIMES, googleBindingViolation, googleEfforts, googleFreeTierBuiltins, registerGooglePreset, } from './google.js';
|
|
9977
|
-
export type { LocalBindingViolation } from './local.js';
|
|
9978
|
-
export { localBindingViolation, ollamaModelThinks } from './local.js';
|
|
9979
|
-
export { OPENROUTER_BUILTIN_TOOLS, OPENROUTER_IMAGES_IGNORED_INPUTS, OPENROUTER_IMAGES_INPUT_MIMES, registerOpenRouterPreset, } from './openrouter.js';
|
|
9980
|
-
`,"file:///node_modules/@theoremjs/agents/src/presets/openrouter.d.ts":`/**
|
|
9981
|
-
* OpenRouter convenience preset.
|
|
9982
|
-
*
|
|
9983
|
-
* @module
|
|
9984
|
-
*/
|
|
9985
|
-
/** \`/images\` takes image references only; a profile on it lists nothing wider in \`inputs.attachments.accept\`. */
|
|
9986
|
-
declare const OPENROUTER_IMAGES_INPUT_MIMES: readonly ["image/*"];
|
|
9987
|
-
/**
|
|
9988
|
-
* What \`/images\` never sends the model: it reads the prompt text and the reference images
|
|
9989
|
-
* only. The chat path (\`image.includeText\`) sends the system prompt and history.
|
|
9990
|
-
*/
|
|
9991
|
-
declare const OPENROUTER_IMAGES_IGNORED_INPUTS: readonly ["system", "history"];
|
|
9992
|
-
/** The tools OpenRouter runs itself, as \`builtin\` tool definitions. */
|
|
9993
|
-
declare const OPENROUTER_BUILTIN_TOOLS: {
|
|
9994
|
-
type: "builtin";
|
|
9995
|
-
name: string;
|
|
9996
|
-
description: string;
|
|
9997
|
-
category: string;
|
|
9998
|
-
access: "read-only";
|
|
9999
|
-
paths: string[];
|
|
10000
|
-
loadTier: "T0";
|
|
10001
|
-
permission: "auto";
|
|
10002
|
-
}[];
|
|
10003
|
-
/** Registers into the default scope; a scope of its own takes \`OPENROUTER_BUILTIN_TOOLS\`. */
|
|
10004
|
-
declare function registerOpenRouterPreset(): void;
|
|
10005
|
-
export { OPENROUTER_BUILTIN_TOOLS, OPENROUTER_IMAGES_IGNORED_INPUTS, OPENROUTER_IMAGES_INPUT_MIMES, registerOpenRouterPreset, };
|
|
10006
|
-
`,"file:///node_modules/@theoremjs/agents/src/presets/local.d.ts":`/**
|
|
10007
|
-
* Local model convenience preset.
|
|
10008
|
-
*
|
|
10009
|
-
* @module
|
|
10010
|
-
*/
|
|
10011
|
-
import type { ModelBinding } from '../kernel/types.js';
|
|
10012
|
-
/**
|
|
10013
|
-
* Whether an Ollama model thinks, read from the server's \`POST /api/show\` reply for it:
|
|
10014
|
-
* \`capabilities\` lists \`thinking\` (Ollama 0.34.0, 04/10/2026). The host fetches the reply.
|
|
10015
|
-
*/
|
|
10016
|
-
declare function ollamaModelThinks(show: unknown): boolean;
|
|
10017
|
-
/** A local binding field its model would refuse, and what is wrong with it. */
|
|
10018
|
-
interface LocalBindingViolation {
|
|
10019
|
-
field: 'efforts';
|
|
10020
|
-
message: string;
|
|
10021
|
-
}
|
|
10022
|
-
/**
|
|
10023
|
-
* The first setting a local server would refuse on this binding, or \`undefined\`. A thinking
|
|
10024
|
-
* level goes to the server as \`reasoning_effort\`; Ollama answers HTTP 400 "does not support
|
|
10025
|
-
* thinking" for a model that does not think (04/10/2026).
|
|
10026
|
-
*/
|
|
10027
|
-
declare function localBindingViolation(binding: Pick<ModelBinding, 'apiId' | 'efforts'>, model: {
|
|
10028
|
-
thinks: boolean;
|
|
10029
|
-
}): LocalBindingViolation | undefined;
|
|
10030
|
-
export type { LocalBindingViolation };
|
|
10031
|
-
export { localBindingViolation, ollamaModelThinks };
|
|
10032
|
-
`,"file:///node_modules/@theoremjs/agents/src/presets/google.d.ts":`/**
|
|
10033
|
-
* Google / Gemini convenience preset.
|
|
10034
|
-
*
|
|
10035
|
-
* @module
|
|
10036
|
-
*/
|
|
10037
|
-
import type { ModelBinding, ProfileImageSpec, ProfileLiveSpec, ProfileSpeechSpec } from '../kernel/types.js';
|
|
10038
|
-
import { GOOGLE_SPEECH_VOICES, type GoogleSpeechVoice } from './google/speech-voices.js';
|
|
10039
|
-
import { GOOGLE_SPEECH_FORMATS, GOOGLE_THINKING_LEVELS, type GoogleThinkingLevel, googleEfforts } from './google-limits.js';
|
|
10040
|
-
/** The image MIME types a Gemini profile can take as input. */
|
|
10041
|
-
declare const GOOGLE_IMAGE_INPUT_MIMES: readonly ["image/png", "image/jpeg", "image/webp", "image/heic", "image/heif"];
|
|
10042
|
-
/** The audio MIME types a Gemini profile can take as voice input. */
|
|
10043
|
-
declare const GOOGLE_VOICE_INPUT_MIMES: readonly ["audio/webm", "audio/wav", "audio/mpeg", "audio/mp4"];
|
|
10044
|
-
/**
|
|
10045
|
-
* TTS models that reject any history with a model turn, so compaction's summary fails them
|
|
10046
|
-
* (live, 29/09/2026).
|
|
10047
|
-
*/
|
|
10048
|
-
declare const GOOGLE_SINGLE_TURN_API_IDS: readonly ["gemini-2.5-flash-preview-tts", "gemini-3.1-flash-tts-preview", "gemini-3.8-flash-tts", "gemini-3.8-flash-lite-tts"];
|
|
10049
|
-
/**
|
|
10050
|
-
* Models that reject any thinking setting, \`summaries: false\` included: leave
|
|
10051
|
-
* \`efforts\` and \`summaries\` unset (live, 30/09/2026).
|
|
10052
|
-
*/
|
|
10053
|
-
declare const GOOGLE_NO_THINKING_API_IDS: readonly ["gemini-2.5-flash-image", "antigravity-preview-05-2026", "antigravity-preview-09-2026", "antigravity-preview-latest"];
|
|
10054
|
-
/**
|
|
10055
|
-
* Models that refuse a thinking level and take \`summaries\`: leave \`efforts\` unset
|
|
10056
|
-
* (live, 01/10/2026: Live closes 1007 "Thinking level is not supported for this model";
|
|
10057
|
-
* 04/10/2026: setup takes \`includeThoughts\` either way).
|
|
10058
|
-
*/
|
|
10059
|
-
declare const GOOGLE_NO_EFFORT_API_IDS: readonly ["gemini-3.8-live"];
|
|
10060
|
-
/**
|
|
10061
|
-
* Models that refuse a session without a thinking level: pin \`efforts\`
|
|
10062
|
-
* (live, 01/10/2026: Live closes 1007 "Thinking level must be specified for this model").
|
|
10063
|
-
*/
|
|
10064
|
-
declare const GOOGLE_THINKING_REQUIRED_API_IDS: readonly ["gemini-3.8-live-extended-thinking"];
|
|
10065
|
-
/** Which grounding builtins a model's free-tier quota allows. */
|
|
10066
|
-
interface GoogleFreeTierGrounding {
|
|
10067
|
-
googleSearch: boolean;
|
|
10068
|
-
googleMaps: boolean;
|
|
10069
|
-
}
|
|
10070
|
-
/**
|
|
10071
|
-
* Models with a non-zero free-tier quota, and the grounding each allows (AI Studio, Sep 2026).
|
|
10072
|
-
* No model keeps free Maps quota: 3.5 Flash-Lite turns with Maps are refused as over quota
|
|
10073
|
-
* (live, 13/10/2026).
|
|
10074
|
-
* A builtin with no quota is refused as if over quota: on Live, a close 1011 "You exceeded your
|
|
10075
|
-
* current quota" at setup, whatever the key's usage (live, 01/10/2026).
|
|
10076
|
-
*/
|
|
10077
|
-
declare const GOOGLE_FREE_TIER_GROUNDING: Readonly<Record<string, GoogleFreeTierGrounding>>;
|
|
10078
|
-
/** Grounding builtins the free tier allows on \`apiId\`; none for a model with no free quota. */
|
|
10079
|
-
declare function googleFreeTierBuiltins(apiId: string): Array<'googleSearch' | 'googleMaps'>;
|
|
10080
|
-
/** A Gemini binding field that breaks a Gemini rule, and what is wrong with it. */
|
|
10081
|
-
interface GoogleBindingViolation {
|
|
10082
|
-
field: 'apiId' | 'efforts' | 'summaries' | 'builtInTools';
|
|
10083
|
-
message: string;
|
|
10084
|
-
}
|
|
10085
|
-
/**
|
|
10086
|
-
* The first setting Google would refuse on this binding, or \`undefined\`. With \`freeTier\`, it
|
|
10087
|
-
* also holds the binding to the free-tier table: a listed model, and only the grounding its
|
|
10088
|
-
* quota allows.
|
|
10089
|
-
*/
|
|
10090
|
-
declare function googleBindingViolation(binding: Pick<ModelBinding, 'apiId' | 'efforts' | 'summaries' | 'builtInTools'>, options?: {
|
|
10091
|
-
freeTier?: boolean;
|
|
10092
|
-
}): GoogleBindingViolation | undefined;
|
|
10093
|
-
/** The speech settings a Gemini profile may pin, with the voice narrowed to Gemini's. */
|
|
10094
|
-
type GoogleSpeechPins = Omit<ProfileSpeechSpec, 'voice'> & {
|
|
10095
|
-
voice?: GoogleSpeechVoice;
|
|
10096
|
-
};
|
|
10097
|
-
/** The live settings a Gemini profile may pin, with the voice narrowed to Gemini's. */
|
|
10098
|
-
type GoogleLivePins = Omit<ProfileLiveSpec, 'voice'> & {
|
|
10099
|
-
voice?: GoogleSpeechVoice;
|
|
10100
|
-
};
|
|
10101
|
-
/** The aspect ratios a Gemini image model can return. */
|
|
10102
|
-
declare const GOOGLE_IMAGE_ASPECT_RATIOS: readonly ["1:1", "3:2", "2:3", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9"];
|
|
10103
|
-
/** The resolutions a Gemini image model can return. */
|
|
10104
|
-
declare const GOOGLE_IMAGE_RESOLUTIONS: readonly ["1K", "2K", "4K"];
|
|
10105
|
-
/** What a Gemini image model can be asked to return. */
|
|
10106
|
-
declare const GOOGLE_IMAGE_OUTPUT_MIMES: readonly ["image/png", "image/jpeg"];
|
|
10107
|
-
/** One of {@linkcode GOOGLE_IMAGE_INPUT_MIMES}. */
|
|
10108
|
-
type GoogleImageInputMime = (typeof GOOGLE_IMAGE_INPUT_MIMES)[number];
|
|
10109
|
-
/** One of {@linkcode GOOGLE_VOICE_INPUT_MIMES}. */
|
|
10110
|
-
type GoogleVoiceInputMime = (typeof GOOGLE_VOICE_INPUT_MIMES)[number];
|
|
10111
|
-
/** One of {@linkcode GOOGLE_IMAGE_ASPECT_RATIOS}. */
|
|
10112
|
-
type GoogleImageAspectRatio = (typeof GOOGLE_IMAGE_ASPECT_RATIOS)[number];
|
|
10113
|
-
/** One of {@linkcode GOOGLE_IMAGE_RESOLUTIONS}. */
|
|
10114
|
-
type GoogleImageResolution = (typeof GOOGLE_IMAGE_RESOLUTIONS)[number];
|
|
10115
|
-
/** One of {@linkcode GOOGLE_IMAGE_OUTPUT_MIMES}. */
|
|
10116
|
-
type GoogleImageOutputMime = (typeof GOOGLE_IMAGE_OUTPUT_MIMES)[number];
|
|
10117
|
-
/** The image settings a Gemini profile may pin, narrowed to what Gemini accepts. */
|
|
10118
|
-
type GoogleImagePins = Omit<ProfileImageSpec, 'aspectRatio' | 'resolution' | 'mimeType'> & {
|
|
10119
|
-
aspectRatio?: GoogleImageAspectRatio;
|
|
10120
|
-
resolution?: GoogleImageResolution;
|
|
10121
|
-
mimeType?: GoogleImageOutputMime;
|
|
10122
|
-
};
|
|
10123
|
-
/** The tools Gemini runs itself, as \`builtin\` tool definitions. */
|
|
10124
|
-
declare const GOOGLE_BUILTIN_TOOLS: ({
|
|
10125
|
-
type: "builtin";
|
|
10126
|
-
name: string;
|
|
10127
|
-
description: string;
|
|
10128
|
-
category: string;
|
|
10129
|
-
access: "read-only";
|
|
10130
|
-
paths: string[];
|
|
10131
|
-
loadTier: "T0";
|
|
10132
|
-
permission: "auto";
|
|
10133
|
-
conflictsWith?: undefined;
|
|
10134
|
-
} | {
|
|
10135
|
-
type: "builtin";
|
|
10136
|
-
name: string;
|
|
10137
|
-
description: string;
|
|
10138
|
-
category: string;
|
|
10139
|
-
access: "read-only";
|
|
10140
|
-
paths: string[];
|
|
10141
|
-
loadTier: "T0";
|
|
10142
|
-
permission: "auto";
|
|
10143
|
-
conflictsWith: string[];
|
|
10144
|
-
})[];
|
|
10145
|
-
/** Registers into the default scope; a scope of its own takes \`GOOGLE_BUILTIN_TOOLS\`. */
|
|
10146
|
-
declare function registerGooglePreset(): void;
|
|
10147
|
-
export { GEMINI_MODELS_URL } from '../providers/google/urls.js';
|
|
10148
|
-
export type { GoogleBindingViolation, GoogleFreeTierGrounding, GoogleImageAspectRatio, GoogleImageInputMime, GoogleImageOutputMime, GoogleImagePins, GoogleImageResolution, GoogleLivePins, GoogleSpeechPins, GoogleSpeechVoice, GoogleThinkingLevel, GoogleVoiceInputMime, };
|
|
10149
|
-
export { GOOGLE_BUILTIN_TOOLS, GOOGLE_FREE_TIER_GROUNDING, GOOGLE_IMAGE_ASPECT_RATIOS, GOOGLE_IMAGE_INPUT_MIMES, GOOGLE_IMAGE_OUTPUT_MIMES, GOOGLE_IMAGE_RESOLUTIONS, GOOGLE_NO_EFFORT_API_IDS, GOOGLE_NO_THINKING_API_IDS, GOOGLE_SINGLE_TURN_API_IDS, GOOGLE_SPEECH_FORMATS, GOOGLE_SPEECH_VOICES, GOOGLE_THINKING_LEVELS, GOOGLE_THINKING_REQUIRED_API_IDS, GOOGLE_VOICE_INPUT_MIMES, googleBindingViolation, googleEfforts, googleFreeTierBuiltins, registerGooglePreset, };
|
|
10150
|
-
`,"file:///node_modules/@theoremjs/agents/src/providers/google/urls.d.ts":`/** The models a key's project can call; paged with \`pageToken\`. */
|
|
10151
|
-
declare const GEMINI_MODELS_URL = "https://generativelanguage.googleapis.com/v1beta/models";
|
|
10152
|
-
declare const GEMINI_LIVE_WS_URL = "wss://generativelanguage.googleapis.com/ws/google.ai.generativelanguage.v1beta.GenerativeService.BidiGenerateContent";
|
|
10153
|
-
export { GEMINI_LIVE_WS_URL, GEMINI_MODELS_URL };
|
|
10154
|
-
`,"file:///node_modules/@theoremjs/agents/src/presets/google-limits.d.ts":`/** The thinking levels Gemini's \`thinkingLevel\` takes; OpenRouter models take them all. */
|
|
10155
|
-
declare const GOOGLE_THINKING_LEVELS: readonly ["minimal", "low", "medium", "high"];
|
|
10156
|
-
/** The audio format Gemini speech returns (PCM, wrapped as WAV); OpenRouter speech also takes \`mp3\`. */
|
|
10157
|
-
declare const GOOGLE_SPEECH_FORMATS: readonly ["pcm"];
|
|
10158
|
-
/** A thinking level Gemini takes: minimal, low, medium, or high. */
|
|
10159
|
-
type GoogleThinkingLevel = (typeof GOOGLE_THINKING_LEVELS)[number];
|
|
10160
|
-
/**
|
|
10161
|
-
* A \`geminiInteractions\` or \`geminiLive\` binding's \`efforts\`, typed to the levels Gemini takes.
|
|
10162
|
-
* The runtime check refuses an untyped host's level when the binding is built, not when a turn runs.
|
|
10163
|
-
*/
|
|
10164
|
-
declare function googleEfforts<Efforts extends Record<string, GoogleThinkingLevel>>(efforts: Efforts): Efforts;
|
|
10165
|
-
export type { GoogleThinkingLevel };
|
|
10166
|
-
export { GOOGLE_SPEECH_FORMATS, GOOGLE_THINKING_LEVELS, googleEfforts };
|
|
10167
|
-
`,"file:///node_modules/@theoremjs/agents/src/presets/google/speech-voices.d.ts":`/**
|
|
10168
|
-
* Gemini TTS voice names for \`speech.voice\`. No imports, so docs UIs can load it alone.
|
|
10169
|
-
*
|
|
10170
|
-
* @module
|
|
10171
|
-
*/
|
|
10172
|
-
export declare const GOOGLE_SPEECH_VOICES: readonly ["Zephyr", "Puck", "Charon", "Kore", "Fenrir", "Leda", "Orus", "Aoede", "Callirrhoe", "Autonoe", "Enceladus", "Iapetus", "Umbriel", "Algieba", "Despina", "Erinome", "Algenib", "Rasalgethi", "Laomedeia", "Achernar", "Alnilam", "Schedar", "Gacrux", "Pulcherrima", "Achird", "Zubenelgenubi", "Vindemiatrix", "Sadachbia", "Sadaltager", "Sulafat"];
|
|
10173
|
-
/** The name of a Gemini speech voice. */
|
|
10174
|
-
export type GoogleSpeechVoice = (typeof GOOGLE_SPEECH_VOICES)[number];
|
|
10175
9942
|
`,"file:///node_modules/@theoremjs/agents/src/observability/mod.d.ts":`/**
|
|
10176
9943
|
* Trace sinks, the destination registry, observability policy, the span builder, and the trace
|
|
10177
9944
|
* catalog. THEOREM owns no database: hosts register destinations or pass a sink into \`runTurn\`.
|
|
@@ -11038,9 +10805,19 @@ export declare function newCallId(name: string): string;
|
|
|
11038
10805
|
export declare function toolCallArguments(safeInput: unknown): Record<string, unknown>;
|
|
11039
10806
|
export declare function messageOf(err: unknown): string;
|
|
11040
10807
|
export declare function sourceEvents(base: ToolCallBase, sources: (output: unknown) => Source[], output: unknown): Generator<TurnEvent>;
|
|
10808
|
+
/** A call's claim, taken once at the hand-off: right before the destination is asked. */
|
|
10809
|
+
export declare class HandOff {
|
|
10810
|
+
private begin?;
|
|
10811
|
+
private taken?;
|
|
10812
|
+
private failed?;
|
|
10813
|
+
constructor(begin?: (() => Promise<ToolOperationClaim | undefined>) | undefined);
|
|
10814
|
+
claim(): Promise<ToolOperationClaim | undefined>;
|
|
10815
|
+
/** The claim's own failure is the coordinator's, so no tool catch may turn it into a tool failure. */
|
|
10816
|
+
rethrowClaimFailure(): void;
|
|
10817
|
+
}
|
|
11041
10818
|
export declare function dispatchToolBody(tool: {
|
|
11042
10819
|
labels?: ToolLabels;
|
|
11043
|
-
}, input: unknown, ctx: ToolContext, base: ToolCallBase, beginBody?: (preparedInput: unknown) => Promise<ToolOperationClaim | undefined>): AsyncGenerator<TurnEvent,
|
|
10820
|
+
}, input: unknown, ctx: ToolContext, base: ToolCallBase, beginBody?: (preparedInput: unknown) => Promise<ToolOperationClaim | undefined>): AsyncGenerator<TurnEvent, HandOff>;
|
|
11044
10821
|
export declare function startToolExecution<T>(tool: {
|
|
11045
10822
|
input: z.ZodType<T>;
|
|
11046
10823
|
}, rawInput: unknown, ctx: ToolContext): {
|
|
@@ -11791,7 +11568,7 @@ export { isModelProfile, pickModel, projectProfileInRegistry, projectProfileObje
|
|
|
11791
11568
|
`,"file:///node_modules/@theoremjs/agents/src/kernel/engine/session/mod.d.ts":`import type { TraceSink } from '../../../observability/trace-sink.js';
|
|
11792
11569
|
import type { ProviderHostOptions } from '../../protocols/runtime.js';
|
|
11793
11570
|
import type { KernelRegistry } from '../../registry/kernel-registry.js';
|
|
11794
|
-
import type
|
|
11571
|
+
import { type PageToolExecution, type ToolExecutionCoordinator } from '../../tools/operation.js';
|
|
11795
11572
|
import type { KeyVault, LiveSession, SessionRequest } from '../../types.js';
|
|
11796
11573
|
export type { LiveSession, SessionRequest };
|
|
11797
11574
|
/** Options for opening a live session: the key vault, a provider's own settings, a WebSocket opener, how long a gated call waits for its decision, and the sign-in gate policy. */
|
|
@@ -11838,6 +11615,8 @@ import type { DecisionProfile, DecisionRequest, DecisionResult } from '../types.
|
|
|
11838
11615
|
declare const DECISION_ERROR_KINDS: {
|
|
11839
11616
|
readonly invalid_config: "config";
|
|
11840
11617
|
readonly invalid_request: "request";
|
|
11618
|
+
readonly conflict: "conflict";
|
|
11619
|
+
readonly not_found: "not_found";
|
|
11841
11620
|
readonly invalid_input: "input";
|
|
11842
11621
|
readonly not_allowed: "action";
|
|
11843
11622
|
readonly authentication: "auth";
|