@peasant-labs/schema 0.27.2 → 0.29.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.
@@ -21,7 +21,12 @@ export const canonicalSessionGraphCapabilityFixtures = {
21
21
  "earlier-only",
22
22
  "earlier-nested-tool-native-usage-model",
23
23
  "navigation-only-read",
24
- "retained-accumulates-all"
24
+ "retained-accumulates-all",
25
+ "thinking-level-session-seed",
26
+ "thinking-level-raw-only-seed",
27
+ "thinking-level-root-turn",
28
+ "thinking-level-earlier-nested-turn",
29
+ "thinking-level-absent-needs-no-token"
25
30
  ],
26
31
  "reader": [
27
32
  "advertisement-omitted",
@@ -38,7 +43,9 @@ export const canonicalSessionGraphCapabilityFixtures = {
38
43
  "producer-unknown",
39
44
  "producer-canonical-retained",
40
45
  "producer-unsorted-retained",
41
- "producer-duplicate-retained"
46
+ "producer-duplicate-retained",
47
+ "producer-canonical-thinking-level",
48
+ "producer-unsorted-thinking-level"
42
49
  ]
43
50
  },
44
51
  "derivation": {
@@ -54,7 +61,7 @@ export const canonicalSessionGraphCapabilityFixtures = {
54
61
  "description": "Retained evidence accumulates every existing preservation requirement"
55
62
  },
56
63
  "input": {
57
- "detailJSON": "{\"id\":\"fixture-session\",\"harness\":\"pi\",\"startTime\":\"2020-01-01T00:00:00Z\",\"endTime\":\"2020-01-01T00:00:00Z\",\"durationMins\":0,\"totalTokens\":0,\"tokensIn\":0,\"tokensOut\":0,\"turnCount\":1,\"toolCallCount\":1,\"purpose\":\"interaction\",\"turns\":[{\"index\":0,\"role\":\"assistant\",\"depth\":0,\"content\":\"\",\"timestamp\":\"2020-01-01T00:00:00Z\",\"sourceEntryRef\":\"e1\",\"observedModel\":\"provider/model\",\"usage\":{\"ownerId\":\"u1\",\"sourceEntryRef\":\"e1\",\"scope\":\"assistant\",\"completeness\":\"unknown\"},\"toolCalls\":[{\"id\":\"t1\",\"name\":\"tool\",\"namespace\":\"extension\",\"arguments\":\"\",\"result\":\"\"}]}],\"nativeMetadata\":[{\"id\":\"n1\",\"kind\":\"pi.custom.data\",\"source\":{\"entryRef\":\"custom1\",\"sourceType\":\"pi.custom\"},\"customType\":\"extension\",\"data\":{}}],\"diagnostics\":{\"partial\":true},\"retainedUnknown\":[{\"sourceRef\":\"source-0\",\"recordIndex\":2,\"position\":4,\"pointer\":\"\",\"namespace\":\"record\",\"kind\":\"future\",\"payload\":\"{\\\"type\\\":\\\"future\\\"}\"}]}"
64
+ "detailJSON": "{\"id\":\"fixture-session\",\"harness\":\"pi\",\"startTime\":\"2020-01-01T00:00:00Z\",\"endTime\":\"2020-01-01T00:00:00Z\",\"durationMins\":0,\"totalTokens\":0,\"tokensIn\":0,\"tokensOut\":0,\"turnCount\":1,\"toolCallCount\":1,\"purpose\":\"interaction\",\"turns\":[{\"index\":0,\"role\":\"assistant\",\"depth\":0,\"content\":\"\",\"timestamp\":\"2020-01-01T00:00:00Z\",\"sourceEntryRef\":\"e1\",\"observedModel\":\"provider/model\",\"thinkingLevel\":\"ultra\",\"thinkingLevelRaw\":\"custom\",\"usage\":{\"ownerId\":\"u1\",\"sourceEntryRef\":\"e1\",\"scope\":\"assistant\",\"completeness\":\"unknown\"},\"toolCalls\":[{\"id\":\"t1\",\"name\":\"tool\",\"namespace\":\"extension\",\"arguments\":\"\",\"result\":\"\"}]}],\"nativeMetadata\":[{\"id\":\"n1\",\"kind\":\"pi.custom.data\",\"source\":{\"entryRef\":\"custom1\",\"sourceType\":\"pi.custom\"},\"customType\":\"extension\",\"data\":{}}],\"diagnostics\":{\"partial\":true},\"retainedUnknown\":[{\"sourceRef\":\"source-0\",\"recordIndex\":2,\"position\":4,\"pointer\":\"\",\"namespace\":\"record\",\"kind\":\"future\",\"payload\":\"{\\\"type\\\":\\\"future\\\"}\"}]}"
58
65
  },
59
66
  "expected": {
60
67
  "capabilities": [
@@ -63,6 +70,7 @@ export const canonicalSessionGraphCapabilityFixtures = {
63
70
  "observed_model_v1",
64
71
  "retained_unknown_v1",
65
72
  "session_graph_provenance_v1",
73
+ "thinking_level_v1",
66
74
  "tool_namespace_v1"
67
75
  ]
68
76
  }
@@ -408,6 +416,98 @@ export const canonicalSessionGraphCapabilityFixtures = {
408
416
  "rejectedDurableJSON": "{\"id\":\"fixture-session\",\"startTime\":\"2020-01-01T00:00:00Z\",\"endTime\":\"2020-01-01T00:00:00Z\",\"durationMins\":0,\"totalTokens\":0,\"tokensIn\":0,\"tokensOut\":0,\"turnCount\":0,\"toolCallCount\":0,\"harness\":\"claude-code\",\"outcome\":\"resolved\",\"sessionOrigin\":\"unknown\",\"turns\":[],\"relationshipNavigation\":[]}"
409
417
  },
410
418
  "expected": {}
419
+ },
420
+ {
421
+ "name": "thinking-level-session-seed",
422
+ "classification": "must-pass",
423
+ "provenance": {
424
+ "source": "requirement",
425
+ "ref": "content-capability-negotiation thinking_level_v1"
426
+ },
427
+ "mutation": {
428
+ "description": "adds only the session-level thinking level seed"
429
+ },
430
+ "input": {
431
+ "detailJSON": "{\"id\":\"fixture-session\",\"startTime\":\"2020-01-01T00:00:00Z\",\"endTime\":\"2020-01-01T00:00:00Z\",\"durationMins\":0,\"totalTokens\":0,\"tokensIn\":0,\"tokensOut\":0,\"turnCount\":0,\"toolCallCount\":0,\"harness\":\"codex\",\"outcome\":\"resolved\",\"sessionOrigin\":\"unknown\",\"thinkingLevel\":\"high\",\"turns\":[]}"
432
+ },
433
+ "expected": {
434
+ "capabilities": [
435
+ "thinking_level_v1"
436
+ ]
437
+ }
438
+ },
439
+ {
440
+ "name": "thinking-level-raw-only-seed",
441
+ "classification": "must-pass",
442
+ "provenance": {
443
+ "source": "requirement",
444
+ "ref": "content-capability-negotiation thinking_level_v1"
445
+ },
446
+ "mutation": {
447
+ "description": "adds only an unmapped raw session spelling"
448
+ },
449
+ "input": {
450
+ "detailJSON": "{\"id\":\"fixture-session\",\"startTime\":\"2020-01-01T00:00:00Z\",\"endTime\":\"2020-01-01T00:00:00Z\",\"durationMins\":0,\"totalTokens\":0,\"tokensIn\":0,\"tokensOut\":0,\"turnCount\":0,\"toolCallCount\":0,\"harness\":\"codex\",\"outcome\":\"resolved\",\"sessionOrigin\":\"unknown\",\"thinkingLevelRaw\":\"custom\",\"turns\":[]}"
451
+ },
452
+ "expected": {
453
+ "capabilities": [
454
+ "thinking_level_v1"
455
+ ]
456
+ }
457
+ },
458
+ {
459
+ "name": "thinking-level-root-turn",
460
+ "classification": "must-pass",
461
+ "provenance": {
462
+ "source": "requirement",
463
+ "ref": "content-capability-negotiation thinking_level_v1"
464
+ },
465
+ "mutation": {
466
+ "description": "adds a level on a root assistant turn"
467
+ },
468
+ "input": {
469
+ "detailJSON": "{\"id\":\"fixture-session\",\"startTime\":\"2020-01-01T00:00:00Z\",\"endTime\":\"2020-01-01T00:00:00Z\",\"durationMins\":0,\"totalTokens\":0,\"tokensIn\":0,\"tokensOut\":0,\"turnCount\":1,\"toolCallCount\":0,\"harness\":\"codex\",\"outcome\":\"resolved\",\"sessionOrigin\":\"unknown\",\"turns\":[{\"index\":0,\"role\":\"assistant\",\"content\":\"\",\"depth\":0,\"thinkingLevel\":\"off\",\"thinkingLevelRaw\":\"none\",\"timestamp\":\"2020-01-01T00:00:00Z\"}]}"
470
+ },
471
+ "expected": {
472
+ "capabilities": [
473
+ "thinking_level_v1"
474
+ ]
475
+ }
476
+ },
477
+ {
478
+ "name": "thinking-level-earlier-nested-turn",
479
+ "classification": "must-pass",
480
+ "provenance": {
481
+ "source": "requirement",
482
+ "ref": "content-capability-negotiation thinking_level_v1"
483
+ },
484
+ "mutation": {
485
+ "description": "adds a level on a nested earlier-history assistant turn"
486
+ },
487
+ "input": {
488
+ "detailJSON": "{\"id\":\"fixture-session\",\"startTime\":\"2020-01-01T00:00:00Z\",\"endTime\":\"2020-01-01T00:00:00Z\",\"durationMins\":0,\"totalTokens\":0,\"tokensIn\":0,\"tokensOut\":0,\"turnCount\":0,\"toolCallCount\":0,\"harness\":\"codex\",\"outcome\":\"resolved\",\"sessionOrigin\":\"unknown\",\"turns\":[],\"earlierHistory\":[{\"state\":\"uncertain_migrated\",\"turns\":[{\"index\":0,\"role\":\"assistant\",\"content\":\"\",\"depth\":0,\"timestamp\":\"2020-01-01T00:00:00Z\"},{\"index\":1,\"role\":\"assistant\",\"content\":\"\",\"depth\":1,\"parentIndex\":0,\"thinkingLevel\":\"medium\",\"timestamp\":\"2020-01-01T00:00:00Z\"}]}]}"
489
+ },
490
+ "expected": {
491
+ "capabilities": [
492
+ "session_graph_provenance_v1",
493
+ "thinking_level_v1"
494
+ ]
495
+ }
496
+ },
497
+ {
498
+ "name": "thinking-level-absent-needs-no-token",
499
+ "classification": "must-pass",
500
+ "provenance": {
501
+ "source": "requirement",
502
+ "ref": "content-capability-negotiation thinking_level_v1"
503
+ },
504
+ "mutation": {
505
+ "description": "omits every thinking level field"
506
+ },
507
+ "input": {
508
+ "detailJSON": "{\"id\":\"fixture-session\",\"startTime\":\"2020-01-01T00:00:00Z\",\"endTime\":\"2020-01-01T00:00:00Z\",\"durationMins\":0,\"totalTokens\":0,\"tokensIn\":0,\"tokensOut\":0,\"turnCount\":1,\"toolCallCount\":0,\"harness\":\"codex\",\"outcome\":\"resolved\",\"sessionOrigin\":\"unknown\",\"turns\":[{\"index\":0,\"role\":\"assistant\",\"content\":\"\",\"depth\":0,\"timestamp\":\"2020-01-01T00:00:00Z\"}]}"
509
+ },
510
+ "expected": {}
411
511
  }
412
512
  ]
413
513
  },
@@ -677,6 +777,51 @@ export const canonicalSessionGraphCapabilityFixtures = {
677
777
  "expected": {
678
778
  "errorContains": "unknown token"
679
779
  }
780
+ },
781
+ {
782
+ "name": "producer-canonical-thinking-level",
783
+ "classification": "must-pass",
784
+ "provenance": {
785
+ "source": "requirement",
786
+ "ref": "content-capability-negotiation"
787
+ },
788
+ "mutation": {
789
+ "description": "Emits the full sorted inventory including thinking_level_v1"
790
+ },
791
+ "input": {
792
+ "tokens": [
793
+ "detailed_usage_v1",
794
+ "native_metadata_v1",
795
+ "observed_model_v1",
796
+ "retained_unknown_v1",
797
+ "session_graph_provenance_v1",
798
+ "thinking_level_v1",
799
+ "tool_namespace_v1"
800
+ ]
801
+ },
802
+ "expected": {
803
+ "accepted": true
804
+ }
805
+ },
806
+ {
807
+ "name": "producer-unsorted-thinking-level",
808
+ "classification": "must-fail",
809
+ "provenance": {
810
+ "source": "boundary",
811
+ "ref": "content-capability-negotiation"
812
+ },
813
+ "mutation": {
814
+ "description": "Places thinking_level_v1 after tool_namespace_v1"
815
+ },
816
+ "input": {
817
+ "tokens": [
818
+ "tool_namespace_v1",
819
+ "thinking_level_v1"
820
+ ]
821
+ },
822
+ "expected": {
823
+ "errorContains": "canonical lexicographic order"
824
+ }
680
825
  }
681
826
  ]
682
827
  }
@@ -1,4 +1,4 @@
1
- export declare const VillageAPIVersion: "0.24.0";
2
- export declare const PeasantLocalAPIVersion: "0.17.0";
3
- export declare const TypesVersion: "0.28.0";
4
- export declare const MetadataSchemaVersion: 11;
1
+ export declare const VillageAPIVersion: "0.26.0";
2
+ export declare const PeasantLocalAPIVersion: "0.19.0";
3
+ export declare const TypesVersion: "0.30.0";
4
+ export declare const MetadataSchemaVersion: 12;
@@ -1,5 +1,5 @@
1
1
  // Code generated from the canonical Go/OpenAPI contract. DO NOT EDIT.
2
- export const VillageAPIVersion = "0.24.0";
3
- export const PeasantLocalAPIVersion = "0.17.0";
4
- export const TypesVersion = "0.28.0";
5
- export const MetadataSchemaVersion = 11;
2
+ export const VillageAPIVersion = "0.26.0";
3
+ export const PeasantLocalAPIVersion = "0.19.0";
4
+ export const TypesVersion = "0.30.0";
5
+ export const MetadataSchemaVersion = 12;
@@ -420,7 +420,7 @@ export interface paths {
420
420
  path?: never;
421
421
  cookie?: never;
422
422
  };
423
- /** @description List transcripts the authenticated user may pull (own + group-shared; public excluded by the canPullTranscript policy). Offset pagination. */
423
+ /** @description List transcripts the authenticated user may pull (own + group-shared; public excluded by the canPullTranscript policy). Offset pagination. The optional collectives filter narrows the list to the approved shares of the listed collectives the caller belongs to; a collective the caller is not in contributes nothing. */
424
424
  get: operations["listPullableTranscripts"];
425
425
  put?: never;
426
426
  post?: never;
@@ -1242,6 +1242,30 @@ export interface components {
1242
1242
  * @enum {string}
1243
1243
  */
1244
1244
  SchemaTargetKind: Schema.TargetKind;
1245
+ /**
1246
+ * Thinking Level
1247
+ * @description Canonical reasoning-effort level of assistant-generated output: off, minimal, low, medium, high, xhigh, max, ultra, ultracode. off is the single disabled state, ultra is above max, and ultracode is a distinct level. Omit the field when the level is unknown; never infer it from token budgets.
1248
+ * @example off
1249
+ * @example minimal
1250
+ * @example low
1251
+ * @example medium
1252
+ * @example high
1253
+ * @example xhigh
1254
+ * @example max
1255
+ * @example ultra
1256
+ * @example ultracode
1257
+ * @enum {string}
1258
+ */
1259
+ SchemaThinkingLevel: Schema.ThinkingLevel;
1260
+ SchemaThinkingLevelChange: Schema.ThinkingLevelChange;
1261
+ /**
1262
+ * Thinking Level Raw
1263
+ * Format: thinking-level-raw-utf8-128-bytes
1264
+ * @description Exact native thinking-level spelling observed when it differs from the emitted canonical thinkingLevel, including when no canonical level could be mapped. Source evidence, never a canonical value; numeric budgets are never raw. Non-empty, valid UTF-8, at most 128 encoded UTF-8 bytes, and no Unicode White_Space code point at either edge. Omit when nothing was observed or the native spelling is canonical.
1265
+ * @example none
1266
+ * @example custom
1267
+ */
1268
+ SchemaThinkingLevelRaw: Schema.ThinkingLevelRaw;
1245
1269
  SchemaTokenUsageDetail: Schema.TokenUsageDetail;
1246
1270
  SchemaToolCallDetail: Schema.ToolCallDetail;
1247
1271
  /**
@@ -3179,6 +3203,8 @@ export interface operations {
3179
3203
  query?: {
3180
3204
  page?: number;
3181
3205
  limit?: number;
3206
+ /** @description Optional comma-separated collective identifiers. Narrows the list to transcripts with an approved share into any listed collective the caller belongs to. Omission, or only empty elements, lists every pullable transcript. */
3207
+ collectives?: string;
3182
3208
  };
3183
3209
  header?: never;
3184
3210
  path?: never;
@@ -145,6 +145,11 @@ export declare const wireAliasShapes: {
145
145
  readonly source: {};
146
146
  readonly startTime: {};
147
147
  readonly status: {};
148
+ readonly thinkingLevel: "ThinkingLevel";
149
+ readonly thinkingLevelHistory: {
150
+ readonly items: "ThinkingLevelChange";
151
+ };
152
+ readonly thinkingLevelRaw: "ThinkingLevelRaw";
148
153
  readonly tokensIn: {};
149
154
  readonly tokensOut: {};
150
155
  readonly toolCallCount: {};
@@ -190,6 +195,14 @@ export declare const wireAliasShapes: {
190
195
  readonly SourceEntryRef: {};
191
196
  readonly StopReason: {};
192
197
  readonly SubmissionRef: {};
198
+ readonly ThinkingLevel: {};
199
+ readonly ThinkingLevelChange: {
200
+ readonly fields: {
201
+ readonly level: "ThinkingLevel";
202
+ readonly raw: "ThinkingLevelRaw";
203
+ };
204
+ };
205
+ readonly ThinkingLevelRaw: {};
193
206
  readonly TokenUsageDetail: {
194
207
  readonly fields: {
195
208
  readonly cacheRead: {};
@@ -243,6 +256,8 @@ export declare const wireAliasShapes: {
243
256
  readonly role: "Role";
244
257
  readonly sourceEntryRef: "SourceEntryRef";
245
258
  readonly stopReason: "StopReason";
259
+ readonly thinkingLevel: "ThinkingLevel";
260
+ readonly thinkingLevelRaw: "ThinkingLevelRaw";
246
261
  readonly timestamp: {};
247
262
  readonly tokensIn: {};
248
263
  readonly tokensOut: {};
@@ -146,6 +146,11 @@ export const wireAliasShapes = {
146
146
  "source": {},
147
147
  "startTime": {},
148
148
  "status": {},
149
+ "thinkingLevel": "ThinkingLevel",
150
+ "thinkingLevelHistory": {
151
+ "items": "ThinkingLevelChange"
152
+ },
153
+ "thinkingLevelRaw": "ThinkingLevelRaw",
149
154
  "tokensIn": {},
150
155
  "tokensOut": {},
151
156
  "toolCallCount": {},
@@ -191,6 +196,14 @@ export const wireAliasShapes = {
191
196
  "SourceEntryRef": {},
192
197
  "StopReason": {},
193
198
  "SubmissionRef": {},
199
+ "ThinkingLevel": {},
200
+ "ThinkingLevelChange": {
201
+ "fields": {
202
+ "level": "ThinkingLevel",
203
+ "raw": "ThinkingLevelRaw"
204
+ }
205
+ },
206
+ "ThinkingLevelRaw": {},
194
207
  "TokenUsageDetail": {
195
208
  "fields": {
196
209
  "cacheRead": {},
@@ -244,6 +257,8 @@ export const wireAliasShapes = {
244
257
  "role": "Role",
245
258
  "sourceEntryRef": "SourceEntryRef",
246
259
  "stopReason": "StopReason",
260
+ "thinkingLevel": "ThinkingLevel",
261
+ "thinkingLevelRaw": "ThinkingLevelRaw",
247
262
  "timestamp": {},
248
263
  "tokensIn": {},
249
264
  "tokensOut": {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peasant-labs/schema",
3
- "version": "0.27.2",
3
+ "version": "0.29.0",
4
4
  "description": "Generated TypeScript contract bindings for the peasant-labs schema module",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {