@particle-academy/prism-harness 0.2.0 → 0.3.0

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 CHANGED
@@ -108,7 +108,7 @@ to your provider call (with `prism-ts`, `withProviderOptions()`):
108
108
 
109
109
  ```ts
110
110
  new ModeRegistry({
111
- modes: { overseer: { system_prompt: '...', provider_options: { thinking: { enabled: true } } } },
111
+ modes: { overseer: { system_prompt: '...', provider_options: { thinking: { type: 'adaptive' } } } },
112
112
  });
113
113
  ```
114
114
 
package/dist/runtime.d.ts CHANGED
@@ -41,6 +41,14 @@ export interface LlmResponse {
41
41
  finishReason: string;
42
42
  /** Null when the provider does not report one. NOT zero — see `RunLedger.recordCost`. */
43
43
  costUsd?: number | null;
44
+ /**
45
+ * What the provider needs sent back with this turn on the next request, such
46
+ * as Anthropic's `thinking` and `thinking_signature`. Recorded with the
47
+ * assistant turn as `additional_content`, the key prism's AssistantMessage
48
+ * uses, so a client built on prism-ts can pass `response.additionalContent`
49
+ * straight through and read it back from `messages`.
50
+ */
51
+ additionalContent?: Readonly<JsonObject>;
44
52
  }
45
53
  export type LlmClient = (request: LlmRequest) => Promise<LlmResponse>;
46
54
  export interface AgentResponse {
package/dist/runtime.js CHANGED
@@ -122,11 +122,15 @@ export class AgentRuntime {
122
122
  text = response.text;
123
123
  finishReason = response.finishReason;
124
124
  const toolCalls = response.toolCalls ?? [];
125
+ // The next step's request is built from this row, so it keeps what a
126
+ // provider needs to be sent back: each call's arguments (a tool_use without
127
+ // its input is refused) and the provider state for the turn (G-58).
125
128
  await thread.record([
126
129
  {
127
130
  type: 'assistant',
128
131
  content: response.text,
129
- tool_calls: toolCalls.map((call) => ({ id: call.id, name: call.name })),
132
+ tool_calls: toolCalls.map((call) => ({ id: call.id, name: call.name, arguments: call.arguments })),
133
+ additional_content: { ...(response.additionalContent ?? {}) },
130
134
  },
131
135
  ], runId);
132
136
  if (toolCalls.length === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-academy/prism-harness",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Durable agent sessions for TypeScript — threads, session state and store drivers.",
5
5
  "type": "module",
6
6
  "sideEffects": false,