@theoremjs/studio 0.3.4-next.407.gd93ec2c → 0.3.4-next.413.gb7a2b75

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 (65) hide show
  1. package/browser-transport.d.ts +1 -1
  2. package/browser-transport.js +9 -0
  3. package/package.json +4 -4
  4. package/page/assets/Banner-CIcZcE2z.js +2 -0
  5. package/page/assets/CollapsibleGroup-CL8h1IzH.js +1 -0
  6. package/page/assets/ConsoleFrame-Ix0RXm_R.js +3 -0
  7. package/page/assets/{ContextMenu-BreVLY9J.js → ContextMenu-COkl-sLz.js} +2 -2
  8. package/page/assets/{ToolResultCharts-BV2tbzow.js → ToolResultCharts-UmFnfSOp.js} +1 -1
  9. package/page/assets/{TraceInspector-B8NufbVX.js → TraceInspector-DWw6BGA5.js} +1 -1
  10. package/page/assets/{TraceOverview-DoQOfiAe.js → TraceOverview-BiCh-eqR.js} +2 -2
  11. package/page/assets/{_virtual_studio-type-sources-BJMljtdu.js → _virtual_studio-type-sources-Cwv7y4JN.js} +20 -11
  12. package/page/assets/browser-engine-BY6gYiHv.js +11 -0
  13. package/page/assets/browser-transport-B4Or1xM7.js +47 -0
  14. package/page/assets/crypto-Boxudvjl.js +1 -0
  15. package/page/assets/{export-agent-D2Vo-OSL.js → export-agent-D8hLzzFn.js} +3 -3
  16. package/page/assets/{guardrail-tester-CuqamClw.js → guardrail-tester-C04dSfNv.js} +2 -2
  17. package/page/assets/index-Br0mAcH5.js +100 -0
  18. package/page/assets/{live-messages-BZGmMo_v.js → live-messages-CI-oP2dK.js} +1 -1
  19. package/page/assets/reader-CVFKFctz.js +7 -0
  20. package/page/assets/{stub-DpBSP8Ld.js → stub-Bf9DC2iQ.js} +1 -1
  21. package/page/assets/{studio-code-pane-B9bG0xzf.js → studio-code-pane-B0BB_yGF.js} +3 -3
  22. package/page/assets/studio-console-BLHAfqNd.js +1 -0
  23. package/page/assets/studio-decision-Cfc9arc7.js +1 -0
  24. package/page/assets/studio-embedding-CGSaA2dS.js +2 -0
  25. package/page/assets/studio-host-console-BidxEK6_.js +2 -0
  26. package/page/assets/studio-labels-CWLqOvKg.js +3 -0
  27. package/page/assets/studio-live-C8XxDpXT.js +5 -0
  28. package/page/assets/studio-map-C2zIkdcp.js +1 -0
  29. package/page/assets/studio-session-yEqFQo5o.js +1 -0
  30. package/page/assets/studio-trace-replay-CpbB-zpo.js +2 -0
  31. package/page/assets/{studio-type-checker-Cm6RZxV3.js → studio-type-checker-xhy-9-yy.js} +1 -1
  32. package/page/assets/{tool-schema-CgpwKFX7.js → tool-schema-BlUbzOu9.js} +1 -1
  33. package/page/assets/{tree-BxX70aqA.js → tree-6F02tTxC.js} +1 -1
  34. package/page/assets/{turn-client-BZUECwPn.js → turn-client-4GHmGV_4.js} +2 -2
  35. package/page/assets/types-DN_oZAOJ.js +1 -0
  36. package/page/assets/use-one-call-BJhdZLBt.js +1 -0
  37. package/page/assets/use-second-ticker-VX91zrxj.js +1 -0
  38. package/page/assets/{workspace-Bc---F49.js → workspace-SpjcVXbF.js} +1 -1
  39. package/page/index.html +18 -15
  40. package/runtime.d.ts +1 -1
  41. package/runtime.js +5 -2
  42. package/server/draft-handler.js +17 -1
  43. package/transport.d.ts +1 -1
  44. package/transport.js +10 -0
  45. package/ui/lib/send-when-ready.d.ts +1 -1
  46. package/ui/studio-screen.js +4 -6
  47. package/ui/studio-trace-replay.d.ts +8 -5
  48. package/ui/studio-trace-replay.js +139 -83
  49. package/page/assets/Banner-B1Vat7i_.js +0 -2
  50. package/page/assets/CollapsibleGroup-toq0Nedn.js +0 -2
  51. package/page/assets/PaneState-C8jetBGI.js +0 -1
  52. package/page/assets/browser-engine-BvsLwtiv.js +0 -11
  53. package/page/assets/browser-transport-DxpDmXGb.js +0 -47
  54. package/page/assets/index-C3mDKoGG.js +0 -102
  55. package/page/assets/reader-paEmSrWc.js +0 -7
  56. package/page/assets/studio-console-1qIWsDtV.js +0 -3
  57. package/page/assets/studio-decision-BdJR3HSN.js +0 -1
  58. package/page/assets/studio-embedding-CFzitRLj.js +0 -2
  59. package/page/assets/studio-host-console-BzpDE2TK.js +0 -2
  60. package/page/assets/studio-live-BucphGSr.js +0 -5
  61. package/page/assets/studio-map-BfUMbnZK.js +0 -1
  62. package/page/assets/studio-trace-replay-C5cBxYG_.js +0 -2
  63. package/page/assets/types-BoECJ8mE.js +0 -1
  64. package/page/assets/use-one-call-BVmuHLSm.js +0 -1
  65. /package/page/assets/{PaneState-CnxaP3LD.css → use-second-ticker-CnxaP3LD.css} +0 -0
@@ -5198,8 +5198,8 @@ import type { StageHandler } from './stages.js';
5198
5198
  import type { GateDecision } from './tools/gate-answer.js';
5199
5199
  import type { PageToolExecution, ToolExecutionCoordinator } from './tools/operation.js';
5200
5200
  import type { AgentCall, AgentCallHook, AgentCallRequest, AgentToolDef, AgentToolInput, AgentToolOutput, HostProfileToolsSpec, InvokeToolRequest, InvokeToolResume, InvokeToolStepCall, InvokeToolStepRequest, LiveProfileToolsSpec, ModelToolResult, PageAnswer, ProfileToolsSpec, RegisteredTool, ToolCallEvent, ToolFailure, ToolGate, ToolLoadContext, ToolPolicy, TurnToolSnapshot, WireFunctionTool } from './tools/types.js';
5201
- import type { AttemptReason, CallDone, CompactionFailure, CompactionResult, CompactionSignal, DoneFields, GroundingEvent, InteractionMediaPart, InteractionMediaRefPart, InteractionPart, InteractionTextPart, InvalidField, ModelEvent, ProviderEvidence, RemovedItem, SessionEnded, SessionEvent, SessionEventKind, SessionEventOf, Source, TurnCost, TurnEvent, TurnEventOf, TurnEventType, TurnGroundingCount, TurnHistoryMessage, TurnResponse, TurnTokenSide, TurnTokens } from './turn-events.js';
5202
- export type { AgentCall, AgentCallHook, AgentCallRequest, AgentToolDef, AgentToolInput, AgentToolOutput, AttemptReason, CacheMode, CacheTtl, CallDone, CompactionFailure, CompactionMeter, CompactionOutcome, CompactionResult, CompactionSignal, CompactionTiming, ContinueStopKind, DoneFields, FieldMeta, GroundingEvent, HostProfileToolsSpec, InteractionMediaPart, InteractionMediaRefPart, InteractionPart, InteractionTextPart, InvalidField, InvokeToolRequest, InvokeToolResume, InvokeToolStepCall, InvokeToolStepRequest, KeySlot, KeyVault, LiveActivityHandling, LiveEndSensitivity, LiveProfileToolsSpec, LiveStartSensitivity, MediaInputKind, ModelEvent, ProfileToolsSpec, ProfileType, ProviderEvidence, RegisteredTool, RemovedItem, SessionEnded, SessionEvent, SessionEventKind, SessionEventOf, Source, SpeechAudioFormat, StreamMode, SummaryMode, ThinkingLevel, ToolCallEvent, ToolFailure, ToolGate, ToolLoadContext, ToolLoadTier, ToolPolicy, TurnCost, TurnEvent, TurnEventOf, TurnEventType, TurnGroundingCount, TurnHistoryMessage, TurnResponse, TurnStage, TurnStopKind, TurnTokenSide, TurnTokens, TurnToolSnapshot, WireFunctionTool, };
5201
+ import type { AttemptReason, CallDone, CompactionFailure, CompactionResult, CompactionSignal, DoneFields, GroundingEvent, InjectedMessages, InteractionMediaPart, InteractionMediaRefPart, InteractionPart, InteractionTextPart, InvalidField, ModelEvent, ProviderEvidence, RemovedItem, SessionEnded, SessionEvent, SessionEventKind, SessionEventOf, Source, TurnCost, TurnEvent, TurnEventOf, TurnEventType, TurnGroundingCount, TurnHistoryMessage, TurnResponse, TurnTokenSide, TurnTokens } from './turn-events.js';
5202
+ export type { AgentCall, AgentCallHook, AgentCallRequest, AgentToolDef, AgentToolInput, AgentToolOutput, AttemptReason, CacheMode, CacheTtl, CallDone, CompactionFailure, CompactionMeter, CompactionOutcome, CompactionResult, CompactionSignal, CompactionTiming, ContinueStopKind, DoneFields, FieldMeta, GroundingEvent, HostProfileToolsSpec, InjectedMessages, InteractionMediaPart, InteractionMediaRefPart, InteractionPart, InteractionTextPart, InvalidField, InvokeToolRequest, InvokeToolResume, InvokeToolStepCall, InvokeToolStepRequest, KeySlot, KeyVault, LiveActivityHandling, LiveEndSensitivity, LiveProfileToolsSpec, LiveStartSensitivity, MediaInputKind, ModelEvent, ProfileToolsSpec, ProfileType, ProviderEvidence, RegisteredTool, RemovedItem, SessionEnded, SessionEvent, SessionEventKind, SessionEventOf, Source, SpeechAudioFormat, StreamMode, SummaryMode, ThinkingLevel, ToolCallEvent, ToolFailure, ToolGate, ToolLoadContext, ToolLoadTier, ToolPolicy, TurnCost, TurnEvent, TurnEventOf, TurnEventType, TurnGroundingCount, TurnHistoryMessage, TurnResponse, TurnStage, TurnStopKind, TurnTokenSide, TurnTokens, TurnToolSnapshot, WireFunctionTool, };
5203
5203
  /** A host-chosen key naming one model binding in a profile's \`models\`. */
5204
5204
  export type ModelId = string;
5205
5205
  /** The id of a provider-side tool such as web search. */
@@ -6403,6 +6403,14 @@ export interface TurnHistoryMessage {
6403
6403
  }
6404
6404
  /** The schema a history message parses against. */
6405
6405
  export declare const turnHistoryMessageSchema: z.ZodType<TurnHistoryMessage>;
6406
+ /**
6407
+ * A named inject as it landed: the host's id for it and the messages it added to the conversation,
6408
+ * after the \`injected\` guardrails, so a steer reads as the model read it.
6409
+ */
6410
+ export interface InjectedMessages {
6411
+ id: string;
6412
+ messages: TurnHistoryMessage[];
6413
+ }
6406
6414
  /** Why a turn or live utterance ended. */
6407
6415
  export interface TurnStop {
6408
6416
  kind: TurnStopKind;
@@ -7022,10 +7030,8 @@ export type TurnEvent = {
7022
7030
  stop?: TurnStop;
7023
7031
  /** Stage result fields the kernel dropped. */
7024
7032
  stageWarnings?: StageApplyWarning[];
7025
- /** The named injects (\`StageResult.injectId\`) that landed in the conversation at this stage. */
7026
- injected?: {
7027
- id: string;
7028
- }[];
7033
+ /** The named injects (\`StageResult.injectId\`) that landed in the conversation at this stage, each with the messages it added. */
7034
+ injected?: InjectedMessages[];
7029
7035
  /**
7030
7036
  * An inject at this stage dropped a draft the user never got: of the reply text since the
7031
7037
  * turn began or its last \`attempt\`, only the first \`released\` characters stay the reply.
@@ -9349,7 +9355,7 @@ export declare function retryTransient(send: typeof fetch, wait?: Wait, timeLeft
9349
9355
  import type { StageApplyWarningCode, TurnStage } from './schema.js';
9350
9356
  import type { TurnStop } from './stop.js';
9351
9357
  import type { ModelToolResult, ToolFailure, ToolGate } from './tools/types.js';
9352
- import type { AwaitingUserInput, StageApplyWarning, TurnEventOf } from './turn-events.js';
9358
+ import type { AwaitingUserInput, InjectedMessages, StageApplyWarning, TurnEventOf } from './turn-events.js';
9353
9359
  import type { Profile, TurnEvent, TurnHistoryMessage } from './types.js';
9354
9360
  export type { AwaitingUserInput, ToolGate };
9355
9361
  /**
@@ -9384,6 +9390,11 @@ export type StageCallBag = {
9384
9390
  awaiting?: boolean;
9385
9391
  stop?: TurnStop;
9386
9392
  gate?: ToolGate;
9393
+ /**
9394
+ * \`before_end\` on text: the answer the model just wrote, before any guardrail verdict on it and
9395
+ * not yet in \`history\`. Its last step wrote no text when no message here carries any.
9396
+ */
9397
+ reply?: readonly TurnHistoryMessage[];
9387
9398
  };
9388
9399
  /** What a stage handler is given: the stage, the step, and what has happened so far. */
9389
9400
  export interface StageContext extends StageCallBag {
@@ -9492,9 +9503,7 @@ export type StageEventExtra = {
9492
9503
  awaiting?: boolean;
9493
9504
  gate?: ToolGate;
9494
9505
  stop?: TurnStop;
9495
- injected?: {
9496
- id: string;
9497
- }[];
9506
+ injected?: InjectedMessages[];
9498
9507
  released?: number;
9499
9508
  };
9500
9509
  /** Build a stream \`stage\` event. Unknown extra keys are not copied. */
@@ -9502,7 +9511,7 @@ export declare function stageEventFields(stage: TurnStage, extra?: Partial<Stage
9502
9511
  export declare function injectMessages(units: readonly InjectUnit[]): TurnHistoryMessage[];
9503
9512
  /**
9504
9513
  * The \`stage\` event recording that \`units\` landed, naming the ones the host
9505
- * named, and the reply text the user has when they dropped a draft (\`released\`);
9514
+ * named with the messages they put in the conversation, and the reply text the user has when they dropped a draft (\`released\`);
9506
9515
  * \`undefined\` when there is neither. Emit it where the messages land, never
9507
9516
  * before: an inject that never lands is never reported.
9508
9517
  */