@ego-z/contracts 0.15.29 → 0.15.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ego-z/contracts",
3
- "version": "0.15.29",
3
+ "version": "0.15.30",
4
4
  "description": "Wire-format type contracts shared between EgoZ backend, SDK, MCP and console. Type-only — no runtime artifacts.",
5
5
  "types": "./src/index.d.ts",
6
6
  "exports": {
@@ -145,7 +145,7 @@ export interface ProjectFileConfig {
145
145
  * The project's cap on the tokens one model call's prompt may use,
146
146
  * 1,000..2,000,000. `null` = no cap: the answering model's window sets
147
147
  * the budget. Absent from files made before it existed; an import then
148
- * keeps the project's own.
148
+ * gives the project a new project's value, no cap.
149
149
  */
150
150
  contextBudgetTokens?: number | null;
151
151
  orchestrationMode: OrchestrationMode;
package/src/thread.d.ts CHANGED
@@ -18,6 +18,7 @@
18
18
  * `formatThread` and `formatMessage` now emit ISO to match.
19
19
  */
20
20
 
21
+ import type { AskContextUsage } from './ask';
21
22
  import type { Intent } from './envelope';
22
23
 
23
24
  // ============================================================================
@@ -39,8 +40,10 @@ export type MessageFailureReason =
39
40
  | 'iteration_cap'
40
41
  | 'max_calls_per_turn'
41
42
  | 'unrecoverable_error'
42
- /** The prompt didn't fit the answering model's context, even after
43
- * EgoZ shortened it and retried once (migration 074). */
43
+ /** The turn ran out of room in the answering model's context, so EgoZ
44
+ * stopped offering tools and the model answered from what it had
45
+ * (migration 074). A prompt that can't be sent at all is not stored:
46
+ * the turn fails with `ContextBudgetExceeded` (`EGX_ERR-LLM04`). */
44
47
  | 'context_budget';
45
48
 
46
49
  /**
@@ -187,6 +190,13 @@ export interface MessageWire {
187
190
  model: string | null;
188
191
  /** Echo of `AskRequestBody.metadata` for audit. */
189
192
  metadata: Record<string, unknown> | null;
193
+ /**
194
+ * On an assistant row, how much of the answering model's context the
195
+ * turn used: the same value as that turn's `AskResponseData.context`
196
+ * (migration 074). `null` on other rows and on turns made before it
197
+ * existed. Absent from servers that predate it.
198
+ */
199
+ context?: AskContextUsage | null;
190
200
  /**
191
201
  * `true` when this row's `content` was deliberately dropped under
192
202
  * no-store (metadata-only) persistence — see