@theoremjs/studio 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +1 -0
  2. package/package.json +3 -3
  3. package/page/assets/{Banner-ChigGVCM.js → Banner-BISz3nXA.js} +2 -2
  4. package/page/assets/{ContextMenu-BcXTDSnA.js → ContextMenu-CBu9H-9H.js} +2 -2
  5. package/page/assets/{ToolResultCharts-DsbzvrBK.js → ToolResultCharts-CgshSv9Q.js} +1 -1
  6. package/page/assets/{TraceInspector-B34qMQJH.js → TraceInspector-_yZiz05W.js} +1 -1
  7. package/page/assets/{TraceOverview-Drp2Sl4p.js → TraceOverview-BPO-HIYK.js} +1 -1
  8. package/page/assets/{_virtual_studio-type-sources-B0u0_Vhq.js → _virtual_studio-type-sources-ByxqQaOG.js} +10 -7
  9. package/page/assets/browser-engine-CYq9DQAM.js +9 -0
  10. package/page/assets/{browser-transport-Bn77Eq5d.js → browser-transport-D-2jDYe7.js} +3 -3
  11. package/page/assets/{compile-egress-CGwmX2BX.js → compile-egress-BSxOdX4K.js} +1 -1
  12. package/page/assets/{encode-files-Dq98bb-f.js → encode-files-Bc3HJyAh.js} +1 -1
  13. package/page/assets/{export-agent-wlS68_dE.js → export-agent-C3yyzXH8.js} +1 -1
  14. package/page/assets/{guardrail-tester-BHcoZE5K.js → guardrail-tester-Gut5xK4a.js} +1 -1
  15. package/page/assets/host-patterns-C9RMP16Q.js +1 -0
  16. package/page/assets/{index-BmHkdZXS.js → index-CvvmFKgS.js} +6 -6
  17. package/page/assets/{live-ingress-DsA4_80F.js → live-ingress-lDUGPwth.js} +1 -1
  18. package/page/assets/{live-messages-B19ZuTGI.js → live-messages-CnkL4GWi.js} +1 -1
  19. package/page/assets/{reader-CN15b9m8.js → reader-BOCCYaRp.js} +1 -1
  20. package/page/assets/{shaped-data-BO_JTcQq.js → shaped-data-BcarWqd5.js} +2 -2
  21. package/page/assets/{stub-DDddt29Y.js → stub-DhdcU_Ew.js} +1 -1
  22. package/page/assets/{studio-code-pane-BSXwNg0B.js → studio-code-pane-C_SAbcOa.js} +3 -3
  23. package/page/assets/{studio-console-C1hyAfeb.js → studio-console-DZwlEsvr.js} +1 -1
  24. package/page/assets/{studio-decision-CZDF06ic.js → studio-decision-B0FnCAXA.js} +1 -1
  25. package/page/assets/{studio-embedding-SqSYd_e1.js → studio-embedding-CmA51HVo.js} +1 -1
  26. package/page/assets/{studio-host-console-BlbRUrR_.js → studio-host-console-By7hqu2l.js} +2 -2
  27. package/page/assets/{studio-live-Dd0AEV_k.js → studio-live-BrcVQcyV.js} +1 -1
  28. package/page/assets/{studio-map-BIIZcltt.js → studio-map-B_xSia-z.js} +1 -1
  29. package/page/assets/{studio-type-checker-Cp6IxLBp.js → studio-type-checker-BOvxudki.js} +1 -1
  30. package/page/assets/{tool-schema-BF2BK9h8.js → tool-schema-idaOe2nI.js} +8 -8
  31. package/page/assets/{trace-record-C-XxCjSg.js → trace-record-C3zNksA_.js} +1 -1
  32. package/page/assets/{tree-D1IYOD_9.js → tree-DqyAMsbI.js} +1 -1
  33. package/page/assets/{turn-client-BMBqw-ho.js → turn-client-Du3Um3Mg.js} +1 -1
  34. package/page/assets/types-BhfXQCLx.js +1 -0
  35. package/page/assets/{use-one-call-BtrXMol7.js → use-one-call-Hcs8YBp1.js} +1 -1
  36. package/page/assets/{workspace-BMzjmPeQ.js → workspace-DZALqEDX.js} +1 -1
  37. package/page/index.html +15 -15
  38. package/page/assets/browser-engine-rJc_aHJo.js +0 -9
  39. package/page/assets/host-patterns-DCz9Cmrt.js +0 -1
  40. package/page/assets/types-CBmpjaet.js +0 -1
@@ -4717,7 +4717,7 @@ export { ADVISORY_LEVELS, abortLiveOutboundTurn, addGivenDestinations, addHistor
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';
4719
4719
  export type { QuotaSlotStatus } from './src/guardrails/quota.js';
4720
- export { clientIp, quotaExhausted, releaseSlot, resetSlots, skipQuota, takeSlot, } from './src/guardrails/quota.js';
4720
+ export { clientIp, quotaBusy, quotaExhausted, releaseSlot, resetSlots, skipQuota, takeSlot, } from './src/guardrails/quota.js';
4721
4721
  export type { SanitizedTurnRequest } from './src/guardrails/sanitize.js';
4722
4722
  export { sanitizeProjectId, sanitizeTurnRequest, sanitizeTurnRequestWithEvents, } from './src/guardrails/sanitize.js';
4723
4723
  export type { ProviderStateRebuilt } from './src/kernel/checkpoint.js';
@@ -7880,7 +7880,7 @@ export { applySpans, blobAt, mergeSpans, OMIT_CANARY, OMIT_INJECTION, OMIT_SENSI
7880
7880
  `,"file:///node_modules/@theoremjs/agents/src/guardrails/labels.d.ts":`/** Values that fill a label template's \`{param}\` placeholders. */
7881
7881
  export type LabelParams = Record<string, string | number>;
7882
7882
  /** Keys are stable API. */
7883
- 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", "error.config", "error.request", "error.input", "error.action", "error.auth", "error.rate_limit", "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"];
7883
+ 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"];
7884
7884
  /** One of {@linkcode LABEL_KEYS}. */
7885
7885
  export type LabelKey = (typeof LABEL_KEYS)[number];
7886
7886
  /**
@@ -7889,7 +7889,7 @@ export type LabelKey = (typeof LABEL_KEYS)[number];
7889
7889
  * puts into history. Only these overrides travel to the browser; the rest
7890
7890
  * (repair prompts, canary, taint, egress) stay on the host.
7891
7891
  */
7892
- 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.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"];
7892
+ 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"];
7893
7893
  /** One of {@linkcode CLIENT_LABEL_KEYS}. */
7894
7894
  export type ClientLabelKey = (typeof CLIENT_LABEL_KEYS)[number];
7895
7895
  /** Host-supplied replacement templates, \`{param}\` placeholders included. */
@@ -8024,7 +8024,7 @@ export type { ErrorCopies, ErrorCopy };
8024
8024
  * the builder in code and traces (\`errorKind\`, \`error.type\`), the user through
8025
8025
  * the kind's wording (\`error.<kind>\` in the labels).
8026
8026
  */
8027
- export declare const ERROR_KINDS: readonly ["config", "request", "input", "action", "auth", "rate_limit", "unsupported", "unavailable", "bad_response", "network", "timeout", "safety", "blocked", "declined", "failed", "cancelled", "internal"];
8027
+ 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"];
8028
8028
  /** Why an operation failed; the user's wording and the HTTP status follow from it. */
8029
8029
  export type ErrorKind = (typeof ERROR_KINDS)[number];
8030
8030
  /** Options for a \`TheoremError\`: the cause and, optionally, wording for the user. */
@@ -9312,6 +9312,7 @@ export type Wait = (ms: number, signal?: AbortSignal | null) => Promise<void>;
9312
9312
  export declare const WAIT_BUDGET_MS = 5000;
9313
9313
  export declare const waitDefault: Wait;
9314
9314
  export declare function isTransientHttp(status: number): boolean;
9315
+ /** A rejected send that never got a response: a network failure, by \`networkError\`'s rule. An abort, a timeout, or any other kind is not. */
9315
9316
  export declare function isTransientThrown(err: unknown): boolean;
9316
9317
  export declare function backoffMs(attempt: number): number;
9317
9318
  /** \`retry-after-ms\`, else \`Retry-After\` in seconds or as a date; undefined when absent or unreadable. */
@@ -9601,7 +9602,7 @@ declare function isTimeoutError(err: unknown): boolean;
9601
9602
  declare function throwIfAborted(signal?: AbortSignal): void;
9602
9603
  /** Anything that is not a \`TheoremError\` or an abort escaped every boundary that names kinds: a THEOREM bug. */
9603
9604
  declare function errorKind(err: unknown): ErrorKind;
9604
- /** The error kind for an HTTP status: 401, 402 and 403 are \`auth\`; 408, 504 and 524 \`timeout\`; 429 \`rate_limit\`; 500 and above \`unavailable\`; the rest \`unsupported\`. */
9605
+ /** 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\`. */
9605
9606
  declare function kindOfHttpStatus(status: number): ErrorKind;
9606
9607
  /** The named reasons an error carries, one line each, in the profile's wording. */
9607
9608
  declare function errorCopyText(copy: ErrorCopies, labels?: LabelOverrides): string;
@@ -12128,10 +12129,12 @@ declare function takeSlot(profile: Profile, ip: string, now: number): QuotaSlotS
12128
12129
  declare function releaseSlot(profile: Profile, ip: string): void;
12129
12130
  /** \`undefined\` when the profile has no quota configured. */
12130
12131
  declare function quotaExhausted(profile: Profile): TheoremError | undefined;
12132
+ /** A turn already holds this client's slot (\`takeSlot\` returned \`busy\`): worded by the labels' \`quota.busy\`. */
12133
+ declare function quotaBusy(profile: Profile): TheoremError;
12131
12134
  /** Clears all process-local quota counters; intended for tests or host resets. */
12132
12135
  declare function resetSlots(): void;
12133
12136
  export type { QuotaSlotStatus };
12134
- export { clientIp, quotaExhausted, releaseSlot, resetSlots, skipQuota, takeSlot };
12137
+ export { clientIp, quotaBusy, quotaExhausted, releaseSlot, resetSlots, skipQuota, takeSlot };
12135
12138
  `,"file:///node_modules/@theoremjs/agents/src/guardrails/mod.d.ts":`/**
12136
12139
  * Inbound and outbound guardrail primitives: sanitization, injection, and sensitive detection,
12137
12140
  * canary egress gates, the detectors, and public error mapping. App-specific policy copy stays host-owned.
@@ -12169,7 +12172,7 @@ export type { ProgressiveYieldGate, ProgressiveYieldGateOptions, ProgressiveYiel
12169
12172
  export { createOutboundProgressiveGate, createProgressiveYieldGate } from './progressive-yield.js';
12170
12173
  export { PROMPT_ECHO_WORDS, scanTextForPromptEcho } from './prompt-echo.js';
12171
12174
  export type { QuotaSlotStatus } from './quota.js';
12172
- export { clientIp, quotaExhausted, releaseSlot, resetSlots, skipQuota, takeSlot, } from './quota.js';
12175
+ export { clientIp, quotaBusy, quotaExhausted, releaseSlot, resetSlots, skipQuota, takeSlot, } from './quota.js';
12173
12176
  export type { GuardrailRule } from './rules.js';
12174
12177
  export { DETECT_RULES, detectRule, EGRESS_RULES, NETWORK_RULES, TOOL_RULES, } from './rules.js';
12175
12178
  export type { SanitizedTurnRequest } from './sanitize.js';