@theoremjs/studio 0.3.4-next.522.g9e684cd → 0.3.4-next.526.g51bc66f

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/package.json +4 -4
  2. package/page/assets/{Banner-UZW6WFTG.js → Banner-DcgTcVVW.js} +2 -2
  3. package/page/assets/{ConsoleFrame-C6ZxuLse.js → ConsoleFrame-Dep1lvnm.js} +1 -1
  4. package/page/assets/{ContextMenu-ClIUDzvK.js → ContextMenu-NgzKbTao.js} +2 -2
  5. package/page/assets/{ToolResultCharts-COgqvWEu.js → ToolResultCharts-CFvHRt5v.js} +1 -1
  6. package/page/assets/{TraceInspector-D2unePaa.js → TraceInspector-D92rKzc_.js} +1 -1
  7. package/page/assets/{TraceOverview-CCA1iUNg.js → TraceOverview-m12m2XgM.js} +1 -1
  8. package/page/assets/{_virtual_studio-type-sources-DfyVGpe8.js → _virtual_studio-type-sources-DVbxNwnP.js} +26 -4
  9. package/page/assets/browser-engine-DL-WovTC.js +11 -0
  10. package/page/assets/{browser-transport-CgmN-3Ia.js → browser-transport-CmAIXFia.js} +4 -4
  11. package/page/assets/{crypto-BoqeX_71.js → crypto-BAY2nUlu.js} +1 -1
  12. package/page/assets/{encode-files-DFrbgXms.js → encode-files-BSTfq_Gp.js} +1 -1
  13. package/page/assets/{export-agent-U8qRBuhg.js → export-agent-C8_6CZgy.js} +1 -1
  14. package/page/assets/{guardrail-tester-DASanQyo.js → guardrail-tester-Dk5L25mc.js} +1 -1
  15. package/page/assets/{index-CGN6iWF2.js → index-B95kGH1Q.js} +9 -9
  16. package/page/assets/{live-messages-cl-CI8gZ.js → live-messages-DIf_R-NT.js} +1 -1
  17. package/page/assets/{reader-IkImpzZF.js → reader-BkaAkeh0.js} +5 -5
  18. package/page/assets/{shaped-data-CITXsEfw.js → shaped-data-C4jsvipW.js} +12 -13
  19. package/page/assets/{stub-Ccyi1ZiM.js → stub-4m0tKRlG.js} +1 -1
  20. package/page/assets/{studio-code-pane-AoMu0cGy.js → studio-code-pane-CPyzXehM.js} +3 -3
  21. package/page/assets/{studio-console-JNYkyQ0E.js → studio-console-BV4NlQY-.js} +1 -1
  22. package/page/assets/{studio-decision-BRJuvgS3.js → studio-decision-BT6Ee-kK.js} +1 -1
  23. package/page/assets/{studio-embedding-D-r2kuz3.js → studio-embedding-DVduw2Un.js} +1 -1
  24. package/page/assets/{studio-host-console-HoLSpRVk.js → studio-host-console-CngXS38i.js} +2 -2
  25. package/page/assets/{studio-labels-CBcjlfH4.js → studio-labels--uHJcIbG.js} +1 -1
  26. package/page/assets/{studio-live-DtywUIK2.js → studio-live-DTHgPVFH.js} +2 -2
  27. package/page/assets/{studio-map-BIJ-S7br.js → studio-map-CT0jsRMr.js} +1 -1
  28. package/page/assets/{studio-trace-replay-BuOKQwlj.js → studio-trace-replay-DS9o-VrA.js} +1 -1
  29. package/page/assets/{studio-type-checker-C8qG2W9D.js → studio-type-checker-CHFs7A7H.js} +1 -1
  30. package/page/assets/tool-schema-DpbtSZtQ.js +17 -0
  31. package/page/assets/{trace-record-Dqvj9bhx.js → trace-record-D9wgX8kq.js} +1 -1
  32. package/page/assets/{tree-jmLWUWxQ.js → tree-0OoOeHfS.js} +1 -1
  33. package/page/assets/{turn-client-DSatougR.js → turn-client-BWO4ocVM.js} +1 -1
  34. package/page/assets/types-BRZU5tBz.js +1 -0
  35. package/page/assets/{use-one-call-BcTU9gJ9.js → use-one-call-DOzbF9kQ.js} +1 -1
  36. package/page/assets/{workspace-B2bnm5qv.js → workspace-DJBP4Adw.js} +1 -1
  37. package/page/index.html +15 -15
  38. package/page/assets/browser-engine-CRGnAh9x.js +0 -11
  39. package/page/assets/tool-schema-DDkOMTMz.js +0 -17
  40. package/page/assets/types-4jMDDudJ.js +0 -1
@@ -8032,6 +8032,11 @@ export interface GuardrailEvent {
8032
8032
  provenance?: Provenance;
8033
8033
  /** The block verdict's \`errorInternal\`: builder-only, stripped by \`forClient\`. */
8034
8034
  errorInternal?: string;
8035
+ /**
8036
+ * A failed host detector's \`errorInternal\` in the kernel's words only, with the same error id:
8037
+ * what the trace stores. Builder-only, stripped by \`forClient\`.
8038
+ */
8039
+ errorSummary?: string;
8035
8040
  }
8036
8041
  /** The schema a guardrail event parses against. */
8037
8042
  export declare const guardrailEventSchema: z.ZodType<GuardrailEvent>;
@@ -9659,7 +9664,8 @@ export interface ToolExecutionCoordinator {
9659
9664
  settleNotStarted(operation: ToolOperationIdentity, outcome: ToolOperationOutcome): Promise<void>;
9660
9665
  markUncertain(claim: ToolOperationClaim, reason: ToolOperationUncertainty): Promise<void>;
9661
9666
  }
9662
- export declare function operationUnavailable(): TheoremError;
9667
+ /** A coordinator, a page dispatch or the kernel broke the tool-operation contract. */
9668
+ export declare function operationBroken(reason: string): TheoremError;
9663
9669
  export declare function toolInvocationHash(value: unknown): Promise<string>;
9664
9670
  export declare const toolOperationOutcomeSchema: z.ZodType<ToolOperationOutcome>;
9665
9671
  export declare function operationWireValue(value: unknown): JsonValue;
@@ -9683,6 +9689,10 @@ declare function errorCopyText(copy: ErrorCopies, labels?: LabelOverrides): stri
9683
9689
  declare function publicError(err: unknown, labels?: LabelOverrides): string;
9684
9690
  /** Raw diagnostic for hosts, traces, and logs; never shown to end users. Each cause that says something new follows on its own line. */
9685
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>;
9686
9696
  type ProducedError = TurnEventOf<'error'> & {
9687
9697
  errorInternal: string;
9688
9698
  };
@@ -9693,7 +9703,7 @@ declare function withPublicLabels(event: TurnEvent, labels?: LabelOverrides): Tu
9693
9703
  export type { ErrorCopies, ErrorCopy, ErrorKind, TheoremErrorOptions } from './theorem-error.js';
9694
9704
  export { ERROR_KINDS } from './theorem-error.js';
9695
9705
  export type { ProducedError };
9696
- export { describeError, errorCopyText, errorKind, isAbortError, isTimeoutError, kindOfHttpStatus, publicError, TheoremError, throwIfAborted, toErrorEvent, withPublicLabels, };
9706
+ export { describeError, errorCopyText, errorKind, isAbortError, isTimeoutError, kindOfHttpStatus, networkError, publicError, sendOrNetworkError, TheoremError, throwIfAborted, toErrorEvent, withPublicLabels, };
9697
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. */
9698
9708
  export type LabelTemplate = string | readonly string[];
9699
9709
  /** A tool's name as a label shows it: \`manage_alert\` reads "manage alert". */
@@ -11583,6 +11593,8 @@ interface Detection {
11583
11593
  hits: GuardrailHit[];
11584
11594
  /** Why a host's \`find\` failed, for the builder only: it reaches \`guardrail.errorInternal\`. */
11585
11595
  errorInternal?: string;
11596
+ /** The same failure in the kernel's words only, with no text from the host: what the trace stores. */
11597
+ errorSummary?: string;
11586
11598
  }
11587
11599
  declare function stronger(left: DetectOutcome, right: DetectOutcome | 'ignore'): DetectOutcome;
11588
11600
  /**
@@ -11662,7 +11674,7 @@ declare function storedHostSpans(text: string, detect?: ResolvedDetect): RedactS
11662
11674
  interface BoundaryReader {
11663
11675
  /** The text to let through, or \`''\` once a match blocks: the caller reads \`found().action\`. */
11664
11676
  read(text: string): string;
11665
- found(): Pick<Detection, 'action' | 'hits' | 'errorInternal'>;
11677
+ found(): Pick<Detection, 'action' | 'hits' | 'errorInternal' | 'errorSummary'>;
11666
11678
  }
11667
11679
  /** A reader for everything crossing \`boundary\` in one request. */
11668
11680
  declare function boundaryReader(boundary: Boundary, detect: ResolvedDetect): BoundaryReader;
@@ -11670,7 +11682,7 @@ declare function boundaryReader(boundary: Boundary, detect: ResolvedDetect): Bou
11670
11682
  * The guardrail event for what was found at a boundary, or \`undefined\` when nothing matched.
11671
11683
  * \`stage\` is the boundary's own unless the text was read as it streamed.
11672
11684
  */
11673
- declare function detectEvent(boundary: Boundary, found: Pick<Detection, 'action' | 'hits' | 'errorInternal'>, provenance?: Provenance, stage?: GuardrailStage): GuardrailEvent | undefined;
11685
+ declare function detectEvent(boundary: Boundary, found: Pick<Detection, 'action' | 'hits' | 'errorInternal' | 'errorSummary'>, provenance?: Provenance, stage?: GuardrailStage): GuardrailEvent | undefined;
11674
11686
  export type { BoundaryReader, Detection, DetectOutcome, DetectScope, Release, StoredSides, StreamRead, Stretch, };
11675
11687
  export { boundaryReader, detectAt, detectEvent, detectorsAt, detectReads, detectRelease, hostAt, isScoped, leakScopeOf, redactDetectors, scopeOf, storedHostSpans, storedSpans, stronger, };
11676
11688
  `,"file:///node_modules/@theoremjs/agents/src/guardrails/egress.d.ts":`import type { ModelEvent } from '../kernel/types.js';
@@ -11824,16 +11836,26 @@ import type { KernelRegistry } from '../registry/kernel-registry.js';
11824
11836
  import type { DecisionProfile, DecisionRequest, DecisionResult } from '../types.js';
11825
11837
  /** Each decision failure code, and the error kind it reads as. */
11826
11838
  declare const DECISION_ERROR_KINDS: {
11839
+ readonly invalid_config: "config";
11827
11840
  readonly invalid_request: "request";
11841
+ readonly invalid_input: "input";
11842
+ readonly not_allowed: "action";
11828
11843
  readonly authentication: "auth";
11829
11844
  readonly permission: "auth";
11830
11845
  readonly rate_limited: "rate_limit";
11846
+ readonly busy: "busy";
11847
+ readonly unsupported: "unsupported";
11831
11848
  readonly unavailable: "unavailable";
11832
11849
  readonly network: "network";
11833
11850
  readonly timeout: "timeout";
11834
11851
  readonly cancelled: "cancelled";
11835
11852
  readonly malformed_response: "bad_response";
11853
+ readonly refused: "safety";
11854
+ readonly blocked: "blocked";
11836
11855
  readonly disclosure_blocked: "blocked";
11856
+ readonly declined: "declined";
11857
+ readonly failed: "failed";
11858
+ readonly internal: "internal";
11837
11859
  };
11838
11860
  /**
11839
11861
  * A normalized native-decision failure; response bodies are deliberately omitted. What the