@peasant-labs/schema 0.15.0 → 0.17.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.
@@ -320,6 +320,10 @@ export const zChildSessionRef = z.object({
320
320
  project: z.string().optional(),
321
321
  startTime: z.iso.datetime()
322
322
  });
323
+ export const zCommandInvocation = z.object({
324
+ args: z.string().optional(),
325
+ name: z.string()
326
+ });
323
327
  export const zCommitInfo = z.object({
324
328
  authorEmail: z.string(),
325
329
  authorName: z.string(),
@@ -427,6 +431,17 @@ export const zDiffHunk = z.object({
427
431
  sessionId: z.string().optional(),
428
432
  sessionTitle: z.string().optional()
429
433
  });
434
+ /**
435
+ * Digest Item Kind
436
+ *
437
+ * Kind of one item in the prompt digest chain: a session boundary, a human prompt, a skill invocation marker, or a commit anchor
438
+ */
439
+ export const zDigestItemKind = z.enum([
440
+ 'session',
441
+ 'prompt',
442
+ 'skill',
443
+ 'commit'
444
+ ]);
430
445
  /**
431
446
  * Edge Violation Kind
432
447
  *
@@ -519,7 +534,8 @@ export const zHarness = z.enum([
519
534
  'opencode',
520
535
  'cursor',
521
536
  'antigravity',
522
- 'strike'
537
+ 'strike',
538
+ 'pi'
523
539
  ]);
524
540
  export const zHealthResponse = z.object({
525
541
  status: z.string()
@@ -636,6 +652,53 @@ export const zModelInfo = z.object({
636
652
  model: zModelID,
637
653
  version: z.string().optional()
638
654
  });
655
+ export const zNativeAttachmentRef = z.object({
656
+ toolCallId: z.string().optional(),
657
+ turnIndex: z.int().nullish()
658
+ });
659
+ /**
660
+ * Native Metadata Kind
661
+ *
662
+ * Kind of bounded non-conversational native metadata
663
+ */
664
+ export const zNativeMetadataKind = z.enum([
665
+ 'pi.custom.data',
666
+ 'pi.custommessage.details',
667
+ 'pi.toolresult.details',
668
+ 'pi.compaction.details',
669
+ 'pi.branchsummary.details'
670
+ ]);
671
+ /**
672
+ * Native Metadata Source Type
673
+ *
674
+ * Native source category for public metadata
675
+ */
676
+ export const zNativeMetadataSourceType = z.enum([
677
+ 'pi.custom',
678
+ 'pi.custom_message',
679
+ 'pi.message',
680
+ 'pi.compaction',
681
+ 'pi.branch_summary'
682
+ ]);
683
+ /**
684
+ * Native Pi Message Role
685
+ *
686
+ * Pi message role needed for public metadata validation
687
+ */
688
+ export const zNativePiMessageRole = z.enum(['toolResult']);
689
+ export const zNativeSourceRef = z.object({
690
+ entryRef: z.string(),
691
+ messageRole: zNativePiMessageRole.optional(),
692
+ sourceType: zNativeMetadataSourceType
693
+ });
694
+ export const zNativeMetadataRecord = z.object({
695
+ attachment: zNativeAttachmentRef.nullish(),
696
+ customType: z.string().optional(),
697
+ data: z.unknown(),
698
+ id: z.string(),
699
+ kind: zNativeMetadataKind,
700
+ source: zNativeSourceRef
701
+ });
639
702
  /**
640
703
  * Observed Model ID
641
704
  *
@@ -682,6 +745,19 @@ export const zProjectSummary = z.object({
682
745
  export const zProjectSummariesPayload = z.object({
683
746
  projects: z.array(zProjectSummary).nullable()
684
747
  });
748
+ export const zPromptDigestHeader = z.object({
749
+ commitsCovered: z.int(),
750
+ commitsTotal: z.int(),
751
+ harness: zHarness,
752
+ promptCount: z.int(),
753
+ redactionLevel: z.string(),
754
+ sessionCount: z.int(),
755
+ villageUrl: z.string()
756
+ });
757
+ export const zPromptDigestSkill = z.object({
758
+ invocationCount: z.int(),
759
+ name: z.string()
760
+ });
685
761
  export const zProvenance = z.object({
686
762
  details: z.record(z.string(), z.string()).optional(),
687
763
  function: z.string().optional(),
@@ -844,6 +920,15 @@ export const zMapSlice = z.object({
844
920
  nodes: z.array(zMapNode).nullable(),
845
921
  structureEdges: z.array(zMapEdge).nullable()
846
922
  });
923
+ export const zRecordedCostAmount = z.string().nullable();
924
+ export const zRecordedCostDetail = z.object({
925
+ cacheRead: z.string().nullish(),
926
+ cacheWrite: z.string().nullish(),
927
+ input: z.string().nullish(),
928
+ output: z.string().nullish(),
929
+ source: z.string(),
930
+ total: z.string().nullish()
931
+ });
847
932
  export const zRedactionInfo = z.object({
848
933
  applied: z.boolean(),
849
934
  content_hash_at_redact: z.string().optional(),
@@ -1528,6 +1613,15 @@ export const zTimestampInfo = z.object({
1528
1613
  ingested: z.int().nullish(),
1529
1614
  start: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })
1530
1615
  });
1616
+ export const zTokenUsageDetail = z.object({
1617
+ cacheRead: z.int().nullish(),
1618
+ cacheWrite: z.int().nullish(),
1619
+ cacheWrite1h: z.int().nullish(),
1620
+ input: z.int().nullish(),
1621
+ output: z.int().nullish(),
1622
+ reasoning: z.int().nullish(),
1623
+ totalTokens: z.int().nullish()
1624
+ });
1531
1625
  /**
1532
1626
  * Tool Call Kind
1533
1627
  *
@@ -1625,17 +1719,6 @@ export const zPublishRequest = z.object({
1625
1719
  subagents: z.array(zSubagentRef).optional(),
1626
1720
  timestamp: zTimestampInfo
1627
1721
  });
1628
- export const zToolCallDetail = z.object({
1629
- arguments: z.string(),
1630
- durationMs: z.int().nullish(),
1631
- exitCode: z.int().nullish(),
1632
- filePath: z.string().optional(),
1633
- id: z.string(),
1634
- isError: z.boolean().optional(),
1635
- name: z.string(),
1636
- result: z.string(),
1637
- toolKind: zToolCallKind.optional()
1638
- });
1639
1722
  /**
1640
1723
  * Transcript Content Hash
1641
1724
  *
@@ -1654,6 +1737,22 @@ export const zCanonicalPublishOperation = z.object({
1654
1737
  * Village-side transcript identifier (canonical lowercase-hex UUID)
1655
1738
  */
1656
1739
  export const zTranscriptID = z.uuid().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/);
1740
+ export const zPromptDigestItem = z.object({
1741
+ commitCount: z.int().nullish(),
1742
+ commitSha: z.string().optional(),
1743
+ kind: zDigestItemKind,
1744
+ ordinal: z.int().nullish(),
1745
+ promptCount: z.int().nullish(),
1746
+ text: z.string(),
1747
+ timestamp: z.iso.datetime(),
1748
+ transcriptId: zTranscriptID,
1749
+ turnIndex: z.int().nullish()
1750
+ });
1751
+ export const zPromptDigest = z.object({
1752
+ header: zPromptDigestHeader,
1753
+ items: z.array(zPromptDigestItem),
1754
+ skills: z.array(zPromptDigestSkill)
1755
+ });
1657
1756
  export const zPullSkipGateItem = z.object({
1658
1757
  annotationHashes: z.array(z.string()),
1659
1758
  contentHash: z.string(),
@@ -1734,52 +1833,6 @@ export const zTrendsPayload = z.object({
1734
1833
  totalSessions: z.int(),
1735
1834
  totalTokens: z.int()
1736
1835
  });
1737
- export const zTurnDetail = z.object({
1738
- agentName: z.string().optional(),
1739
- content: z.string(),
1740
- depth: z.int(),
1741
- entryType: zEntryType.optional(),
1742
- hasThinking: z.boolean().optional(),
1743
- index: z.int(),
1744
- observedModel: zObservedModelID.optional(),
1745
- parentIndex: z.int().nullish(),
1746
- role: zRole,
1747
- stopReason: zStopReason.nullish(),
1748
- timestamp: z.iso.datetime(),
1749
- tokensIn: z.int().nullish(),
1750
- tokensOut: z.int().nullish(),
1751
- toolCalls: z.array(zToolCallDetail).optional()
1752
- });
1753
- export const zSessionDetailPayload = z.object({
1754
- childSessions: z.array(zChildSessionRef).optional(),
1755
- durationMins: z.number(),
1756
- endTime: z.iso.datetime(),
1757
- gitBranch: z.string().optional(),
1758
- gitRemote: z.string().optional(),
1759
- harness: zHarness,
1760
- id: z.string(),
1761
- model: z.string().optional(),
1762
- outcome: zSessionOutcome.optional(),
1763
- project: z.string().optional(),
1764
- schemaVersion: z.string().optional(),
1765
- scorecard: zSessionScorecard.nullish(),
1766
- sessionOrigin: zSessionOrigin.optional(),
1767
- source: z.string().optional(),
1768
- startTime: z.iso.datetime(),
1769
- status: z.string().optional(),
1770
- tokensIn: z.int(),
1771
- tokensOut: z.int(),
1772
- toolCallCount: z.int(),
1773
- totalTokens: z.int(),
1774
- turnCount: z.int(),
1775
- turns: z.array(zTurnDetail).nullable(),
1776
- workingDirectory: z.string().optional()
1777
- });
1778
- export const zTranscriptContent = z.object({
1779
- contractVersion: z.string(),
1780
- kind: zContentKind,
1781
- sessionDetail: zSessionDetailPayload.nullish()
1782
- });
1783
1836
  /**
1784
1837
  * Type Origin
1785
1838
  *
@@ -1842,6 +1895,99 @@ export const zChangeDetailPayload = z.object({
1842
1895
  violations: z.array(zEdgeViolation).nullable(),
1843
1896
  work: z.array(zChangeSession).nullable()
1844
1897
  });
1898
+ /**
1899
+ * Usage Completeness
1900
+ *
1901
+ * Completeness of the five base token fields
1902
+ */
1903
+ export const zUsageCompleteness = z.enum([
1904
+ 'complete',
1905
+ 'partial',
1906
+ 'unknown'
1907
+ ]);
1908
+ export const zUsageOwnerID = z.string().nullable();
1909
+ /**
1910
+ * Usage Scope
1911
+ *
1912
+ * Native owner scope for detailed token and cost evidence
1913
+ */
1914
+ export const zUsageScope = z.enum([
1915
+ 'assistant',
1916
+ 'tool',
1917
+ 'summary'
1918
+ ]);
1919
+ export const zUsageDetail = z.object({
1920
+ completeness: zUsageCompleteness,
1921
+ cost: zRecordedCostDetail.nullish(),
1922
+ ownerId: z.string(),
1923
+ scope: zUsageScope,
1924
+ sourceEntryRef: z.string(),
1925
+ tokens: zTokenUsageDetail.nullish()
1926
+ });
1927
+ export const zToolCallDetail = z.object({
1928
+ arguments: z.string(),
1929
+ callEntryRef: z.string().optional(),
1930
+ durationMs: z.int().nullish(),
1931
+ exitCode: z.int().nullish(),
1932
+ filePath: z.string().optional(),
1933
+ id: z.string(),
1934
+ isError: z.boolean().optional(),
1935
+ name: z.string(),
1936
+ result: z.string(),
1937
+ resultEntryRef: z.string().optional(),
1938
+ toolKind: zToolCallKind.optional(),
1939
+ usage: zUsageDetail.nullish()
1940
+ });
1941
+ export const zTurnDetail = z.object({
1942
+ agentName: z.string().optional(),
1943
+ command: zCommandInvocation.nullish(),
1944
+ content: z.string(),
1945
+ depth: z.int(),
1946
+ entryType: zEntryType.optional(),
1947
+ hasThinking: z.boolean().optional(),
1948
+ index: z.int(),
1949
+ observedModel: zObservedModelID.optional(),
1950
+ parentIndex: z.int().nullish(),
1951
+ role: zRole,
1952
+ sourceEntryRef: z.string().optional(),
1953
+ stopReason: zStopReason.nullish(),
1954
+ timestamp: z.iso.datetime(),
1955
+ tokensIn: z.int().nullish(),
1956
+ tokensOut: z.int().nullish(),
1957
+ toolCalls: z.array(zToolCallDetail).optional(),
1958
+ usage: zUsageDetail.nullish()
1959
+ });
1960
+ export const zSessionDetailPayload = z.object({
1961
+ childSessions: z.array(zChildSessionRef).optional(),
1962
+ durationMins: z.number(),
1963
+ endTime: z.iso.datetime(),
1964
+ gitBranch: z.string().optional(),
1965
+ gitRemote: z.string().optional(),
1966
+ harness: zHarness,
1967
+ id: z.string(),
1968
+ model: z.string().optional(),
1969
+ nativeMetadata: z.array(zNativeMetadataRecord).optional(),
1970
+ outcome: zSessionOutcome.optional(),
1971
+ project: z.string().optional(),
1972
+ schemaVersion: z.string().optional(),
1973
+ scorecard: zSessionScorecard.nullish(),
1974
+ sessionOrigin: zSessionOrigin.optional(),
1975
+ source: z.string().optional(),
1976
+ startTime: z.iso.datetime(),
1977
+ status: z.string().optional(),
1978
+ tokensIn: z.int(),
1979
+ tokensOut: z.int(),
1980
+ toolCallCount: z.int(),
1981
+ totalTokens: z.int(),
1982
+ turnCount: z.int(),
1983
+ turns: z.array(zTurnDetail).nullable(),
1984
+ workingDirectory: z.string().optional()
1985
+ });
1986
+ export const zTranscriptContent = z.object({
1987
+ contractVersion: z.string(),
1988
+ kind: zContentKind,
1989
+ sessionDetail: zSessionDetailPayload.nullish()
1990
+ });
1845
1991
  /**
1846
1992
  * Value Domain Kind
1847
1993
  *
@@ -1911,6 +2057,12 @@ export const zVillageBatchShareResponse = z.object({
1911
2057
  export const zVillageErrorResponse = z.object({
1912
2058
  error: z.string()
1913
2059
  });
2060
+ /**
2061
+ * GitHub Webhook Payload
2062
+ *
2063
+ * GitHub event payload forwarded verbatim; validated by the X-Hub-Signature-256 HMAC over the raw body, never by shape
2064
+ */
2065
+ export const zVillageGitHubWebhookPayload = z.record(z.string(), z.unknown());
1914
2066
  /**
1915
2067
  * Village Group Acceptance Mode
1916
2068
  *
@@ -1999,6 +2151,35 @@ export const zVillageProjectNameSource = z.enum([
1999
2151
  'path',
2000
2152
  'privacy'
2001
2153
  ]);
2154
+ /**
2155
+ * Village Prompts Check Mode
2156
+ *
2157
+ * Check-run conclusion policy for a collective's linked repositories when no prompts are attached
2158
+ */
2159
+ export const zVillagePromptsCheckMode = z.enum(['informational', 'required']);
2160
+ /**
2161
+ * Village Pull Request Attachment State
2162
+ *
2163
+ * Current lifecycle state of a pull request's prompt attachment
2164
+ */
2165
+ export const zVillagePullRequestAttachmentState = z.enum([
2166
+ 'requested',
2167
+ 'waiting',
2168
+ 'preview',
2169
+ 'attached',
2170
+ 'detached'
2171
+ ]);
2172
+ export const zVillagePromptRequest = z.object({
2173
+ name: z.string(),
2174
+ number: z.int(),
2175
+ owner: z.string(),
2176
+ remote: z.string(),
2177
+ requested_at: z.iso.datetime(),
2178
+ state: zVillagePullRequestAttachmentState
2179
+ });
2180
+ export const zVillagePromptRequestsResponse = z.object({
2181
+ requests: z.array(zVillagePromptRequest)
2182
+ });
2002
2183
  export const zVillageRemoveGroupMemberResponse = z.object({
2003
2184
  retracted: z.boolean(),
2004
2185
  status: z.string()
@@ -2099,6 +2280,13 @@ export const zVillageContributableTranscript = z.object({
2099
2280
  title: z.string().nullable(),
2100
2281
  visibility: zVillageTranscriptVisibility
2101
2282
  });
2283
+ export const zVillagePullRequestAttachedTranscript = z.object({
2284
+ position: z.int(),
2285
+ previous_visibility: zVillageTranscriptVisibility,
2286
+ session_start: z.iso.datetime().nullable(),
2287
+ title: z.string().nullable(),
2288
+ transcript_id: zTranscriptID
2289
+ });
2102
2290
  /**
2103
2291
  * Village UUID
2104
2292
  *
@@ -2151,6 +2339,8 @@ export const zVillageGroup = z.object({
2151
2339
  id: zVillageUUID,
2152
2340
  linked_github_org: z.string().nullable(),
2153
2341
  name: z.string(),
2342
+ post_prompts_check: z.boolean(),
2343
+ prompts_check_mode: zVillagePromptsCheckMode,
2154
2344
  transcript_deletion_policy: zVillageTranscriptDeletionPolicy,
2155
2345
  updated_at: z.iso.datetime()
2156
2346
  });
@@ -2289,6 +2479,29 @@ export const zVillagePublicGroup = z.object({
2289
2479
  name: z.string(),
2290
2480
  transcript_count: z.int().min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })
2291
2481
  });
2482
+ export const zVillagePullRequestAttachment = z.object({
2483
+ author_user_id: zVillageUUID.nullable(),
2484
+ check_run_id: z.int().nullable(),
2485
+ comment_id: z.int().nullable(),
2486
+ confirmed_at: z.iso.datetime().nullable(),
2487
+ created_at: z.iso.datetime(),
2488
+ detached_at: z.iso.datetime().nullable(),
2489
+ head_sha: z.string(),
2490
+ id: zVillageUUID,
2491
+ is_private_repository: z.boolean(),
2492
+ name: z.string(),
2493
+ number: z.int(),
2494
+ owner: z.string(),
2495
+ requested_by_github_id: z.int().nullable(),
2496
+ state: zVillagePullRequestAttachmentState,
2497
+ updated_at: z.iso.datetime()
2498
+ });
2499
+ export const zVillagePullRequestAttachmentResponse = z.object({
2500
+ attachment: zVillagePullRequestAttachment,
2501
+ digest: zPromptDigest.nullable(),
2502
+ transcripts: z.array(zVillagePullRequestAttachedTranscript),
2503
+ viewer_is_author: z.boolean()
2504
+ });
2292
2505
  export const zVillageShareTranscriptRequest = z.object({
2293
2506
  group_ids: z.array(zVillageUUID)
2294
2507
  });
@@ -2381,8 +2594,13 @@ export const zVillageUpdateGroupRequest = z.object({
2381
2594
  display_members: z.boolean().nullish(),
2382
2595
  linked_github_org: z.string().nullish(),
2383
2596
  name: z.string().optional(),
2597
+ post_prompts_check: z.boolean().nullish(),
2598
+ prompts_check_mode: zVillagePromptsCheckMode.optional(),
2384
2599
  transcript_deletion_policy: zVillageTranscriptDeletionPolicy.optional()
2385
2600
  });
2601
+ export const zVillageUpdateUserSettingsRequest = z.object({
2602
+ preview_before_attach: z.boolean().nullish()
2603
+ });
2386
2604
  export const zVillageUserGroup = z.object({
2387
2605
  acceptance_mode: zVillageGroupAcceptanceMode,
2388
2606
  created_at: z.iso.datetime(),
@@ -2416,6 +2634,9 @@ export const zVillageUserGroupShare = z.object({
2416
2634
  turn_count: z.int().nullable(),
2417
2635
  visibility: zVillageTranscriptVisibility
2418
2636
  });
2637
+ export const zVillageUserSettings = z.object({
2638
+ preview_before_attach: z.boolean()
2639
+ });
2419
2640
  export const zVillageVisibleGroup = z.object({
2420
2641
  acceptance_mode: zVillageGroupAcceptanceMode,
2421
2642
  created_at: z.iso.datetime(),
@@ -53,6 +53,14 @@ import { type VillageShareStatus as VillageShareStatusContract } from "./contrac
53
53
  import { type VillageTranscriptDeletionPolicy as VillageTranscriptDeletionPolicyContract } from "./contract/zod.gen.js";
54
54
  import { type VillageTranscriptVisibility as VillageTranscriptVisibilityContract } from "./contract/zod.gen.js";
55
55
  import { type Visibility as VisibilityContract } from "./contract/zod.gen.js";
56
+ import { type UsageScope as UsageScopeContract } from "./contract/zod.gen.js";
57
+ import { type UsageCompleteness as UsageCompletenessContract } from "./contract/zod.gen.js";
58
+ import { type NativeMetadataKind as NativeMetadataKindContract } from "./contract/zod.gen.js";
59
+ import { type NativeMetadataSourceType as NativeMetadataSourceTypeContract } from "./contract/zod.gen.js";
60
+ import { type NativePiMessageRole as NativePiMessageRoleContract } from "./contract/zod.gen.js";
61
+ import { type DigestItemKind as DigestItemKindContract } from "./contract/zod.gen.js";
62
+ import { type VillagePullRequestAttachmentState as VillagePullRequestAttachmentStateContract } from "./contract/zod.gen.js";
63
+ import { type VillagePromptsCheckMode as VillagePromptsCheckModeContract } from "./contract/zod.gen.js";
56
64
  export type PublishOperationKind = PublishOperationKindContract;
57
65
  export declare const PublishOperationKind: Readonly<{
58
66
  readonly Preserve: "replace" | "append" | "preserve";
@@ -238,13 +246,14 @@ export declare const AllFileChangeStatuses: readonly FileChangeStatus[];
238
246
  export declare function isFileChangeStatus(value: unknown): value is FileChangeStatus;
239
247
  export type Harness = HarnessContract;
240
248
  export declare const Harness: Readonly<{
241
- readonly ClaudeCode: "strike" | "cursor" | "claude-code" | "gemini-cli" | "codex" | "opencode" | "antigravity";
242
- readonly GeminiCLI: "strike" | "cursor" | "claude-code" | "gemini-cli" | "codex" | "opencode" | "antigravity";
243
- readonly Codex: "strike" | "cursor" | "claude-code" | "gemini-cli" | "codex" | "opencode" | "antigravity";
244
- readonly OpenCode: "strike" | "cursor" | "claude-code" | "gemini-cli" | "codex" | "opencode" | "antigravity";
245
- readonly Cursor: "strike" | "cursor" | "claude-code" | "gemini-cli" | "codex" | "opencode" | "antigravity";
246
- readonly Antigravity: "strike" | "cursor" | "claude-code" | "gemini-cli" | "codex" | "opencode" | "antigravity";
247
- readonly Strike: "strike" | "cursor" | "claude-code" | "gemini-cli" | "codex" | "opencode" | "antigravity";
249
+ readonly ClaudeCode: "strike" | "cursor" | "claude-code" | "gemini-cli" | "codex" | "opencode" | "antigravity" | "pi";
250
+ readonly GeminiCLI: "strike" | "cursor" | "claude-code" | "gemini-cli" | "codex" | "opencode" | "antigravity" | "pi";
251
+ readonly Codex: "strike" | "cursor" | "claude-code" | "gemini-cli" | "codex" | "opencode" | "antigravity" | "pi";
252
+ readonly OpenCode: "strike" | "cursor" | "claude-code" | "gemini-cli" | "codex" | "opencode" | "antigravity" | "pi";
253
+ readonly Cursor: "strike" | "cursor" | "claude-code" | "gemini-cli" | "codex" | "opencode" | "antigravity" | "pi";
254
+ readonly Antigravity: "strike" | "cursor" | "claude-code" | "gemini-cli" | "codex" | "opencode" | "antigravity" | "pi";
255
+ readonly Strike: "strike" | "cursor" | "claude-code" | "gemini-cli" | "codex" | "opencode" | "antigravity" | "pi";
256
+ readonly Pi: "strike" | "cursor" | "claude-code" | "gemini-cli" | "codex" | "opencode" | "antigravity" | "pi";
248
257
  }>;
249
258
  /**
250
259
  * AllHarnesses is the ingestion-supported subset of Harness, not the full
@@ -560,3 +569,71 @@ export declare const Visibility: Readonly<{
560
569
  }>;
561
570
  export declare const AllVisibilities: readonly Visibility[];
562
571
  export declare function isVisibility(value: unknown): value is Visibility;
572
+ export type UsageScope = UsageScopeContract;
573
+ export declare const UsageScope: Readonly<{
574
+ readonly Assistant: "summary" | "assistant" | "tool";
575
+ readonly Tool: "summary" | "assistant" | "tool";
576
+ readonly Summary: "summary" | "assistant" | "tool";
577
+ }>;
578
+ export declare const AllUsageScopes: readonly UsageScope[];
579
+ export declare function isUsageScope(value: unknown): value is UsageScope;
580
+ export type UsageCompleteness = UsageCompletenessContract;
581
+ export declare const UsageCompleteness: Readonly<{
582
+ readonly Complete: "unknown" | "complete" | "partial";
583
+ readonly Partial: "unknown" | "complete" | "partial";
584
+ readonly Unknown: "unknown" | "complete" | "partial";
585
+ }>;
586
+ export declare const AllUsageCompleteness: readonly UsageCompleteness[];
587
+ export declare function isUsageCompleteness(value: unknown): value is UsageCompleteness;
588
+ export type NativeMetadataKind = NativeMetadataKindContract;
589
+ export declare const NativeMetadataKind: Readonly<{
590
+ readonly PiCustomData: "pi.custom.data" | "pi.custommessage.details" | "pi.toolresult.details" | "pi.compaction.details" | "pi.branchsummary.details";
591
+ readonly PiCustomMessageDetails: "pi.custom.data" | "pi.custommessage.details" | "pi.toolresult.details" | "pi.compaction.details" | "pi.branchsummary.details";
592
+ readonly PiToolResultDetails: "pi.custom.data" | "pi.custommessage.details" | "pi.toolresult.details" | "pi.compaction.details" | "pi.branchsummary.details";
593
+ readonly PiCompactionDetails: "pi.custom.data" | "pi.custommessage.details" | "pi.toolresult.details" | "pi.compaction.details" | "pi.branchsummary.details";
594
+ readonly PiBranchSummaryDetails: "pi.custom.data" | "pi.custommessage.details" | "pi.toolresult.details" | "pi.compaction.details" | "pi.branchsummary.details";
595
+ }>;
596
+ export declare const AllNativeMetadataKinds: readonly NativeMetadataKind[];
597
+ export declare function isNativeMetadataKind(value: unknown): value is NativeMetadataKind;
598
+ export type NativeMetadataSourceType = NativeMetadataSourceTypeContract;
599
+ export declare const NativeMetadataSourceType: Readonly<{
600
+ readonly PiCustom: "pi.custom" | "pi.custom_message" | "pi.message" | "pi.compaction" | "pi.branch_summary";
601
+ readonly PiCustomMessage: "pi.custom" | "pi.custom_message" | "pi.message" | "pi.compaction" | "pi.branch_summary";
602
+ readonly PiMessage: "pi.custom" | "pi.custom_message" | "pi.message" | "pi.compaction" | "pi.branch_summary";
603
+ readonly PiCompaction: "pi.custom" | "pi.custom_message" | "pi.message" | "pi.compaction" | "pi.branch_summary";
604
+ readonly PiBranchSummary: "pi.custom" | "pi.custom_message" | "pi.message" | "pi.compaction" | "pi.branch_summary";
605
+ }>;
606
+ export declare const AllNativeMetadataSourceTypes: readonly NativeMetadataSourceType[];
607
+ export declare function isNativeMetadataSourceType(value: unknown): value is NativeMetadataSourceType;
608
+ export type NativePiMessageRole = NativePiMessageRoleContract;
609
+ export declare const NativePiMessageRole: Readonly<{
610
+ readonly ToolResult: "toolResult";
611
+ }>;
612
+ export declare const AllNativePiMessageRoles: readonly NativePiMessageRole[];
613
+ export declare function isNativePiMessageRole(value: unknown): value is NativePiMessageRole;
614
+ export type DigestItemKind = DigestItemKindContract;
615
+ export declare const DigestItemKind: Readonly<{
616
+ readonly Session: "session" | "prompt" | "skill" | "commit";
617
+ readonly Prompt: "session" | "prompt" | "skill" | "commit";
618
+ readonly Skill: "session" | "prompt" | "skill" | "commit";
619
+ readonly Commit: "session" | "prompt" | "skill" | "commit";
620
+ }>;
621
+ export declare const AllDigestItemKinds: readonly DigestItemKind[];
622
+ export declare function isDigestItemKind(value: unknown): value is DigestItemKind;
623
+ export type VillagePullRequestAttachmentState = VillagePullRequestAttachmentStateContract;
624
+ export declare const VillagePullRequestAttachmentState: Readonly<{
625
+ readonly Requested: "waiting" | "preview" | "requested" | "attached" | "detached";
626
+ readonly Waiting: "waiting" | "preview" | "requested" | "attached" | "detached";
627
+ readonly Preview: "waiting" | "preview" | "requested" | "attached" | "detached";
628
+ readonly Attached: "waiting" | "preview" | "requested" | "attached" | "detached";
629
+ readonly Detached: "waiting" | "preview" | "requested" | "attached" | "detached";
630
+ }>;
631
+ export declare const AllVillagePullRequestAttachmentStates: readonly VillagePullRequestAttachmentState[];
632
+ export declare function isVillagePullRequestAttachmentState(value: unknown): value is VillagePullRequestAttachmentState;
633
+ export type VillagePromptsCheckMode = VillagePromptsCheckModeContract;
634
+ export declare const VillagePromptsCheckMode: Readonly<{
635
+ readonly Informational: "required" | "informational";
636
+ readonly Required: "required" | "informational";
637
+ }>;
638
+ export declare const AllVillagePromptsCheckModes: readonly VillagePromptsCheckMode[];
639
+ export declare function isVillagePromptsCheckMode(value: unknown): value is VillagePromptsCheckMode;
@@ -54,6 +54,14 @@ import { zVillageShareStatus } from "./contract/zod.gen.js";
54
54
  import { zVillageTranscriptDeletionPolicy } from "./contract/zod.gen.js";
55
55
  import { zVillageTranscriptVisibility } from "./contract/zod.gen.js";
56
56
  import { zVisibility } from "./contract/zod.gen.js";
57
+ import { zUsageScope } from "./contract/zod.gen.js";
58
+ import { zUsageCompleteness } from "./contract/zod.gen.js";
59
+ import { zNativeMetadataKind } from "./contract/zod.gen.js";
60
+ import { zNativeMetadataSourceType } from "./contract/zod.gen.js";
61
+ import { zNativePiMessageRole } from "./contract/zod.gen.js";
62
+ import { zDigestItemKind } from "./contract/zod.gen.js";
63
+ import { zVillagePullRequestAttachmentState } from "./contract/zod.gen.js";
64
+ import { zVillagePromptsCheckMode } from "./contract/zod.gen.js";
57
65
  export const PublishOperationKind = Object.freeze({
58
66
  Preserve: zPublishOperationKind.parse("preserve"),
59
67
  Replace: zPublishOperationKind.parse("replace"),
@@ -264,13 +272,14 @@ export const Harness = Object.freeze({
264
272
  Cursor: zHarness.parse("cursor"),
265
273
  Antigravity: zHarness.parse("antigravity"),
266
274
  Strike: zHarness.parse("strike"),
275
+ Pi: zHarness.parse("pi"),
267
276
  });
268
277
  /**
269
278
  * AllHarnesses is the ingestion-supported subset of Harness, not the full
270
279
  * canonical set (mirrors types.go's AllHarnesses doc comment). Every Harness
271
280
  * member remains individually valid and accepted by isHarness.
272
281
  */
273
- export const AllHarnesses = Object.freeze([Harness.ClaudeCode, Harness.GeminiCLI, Harness.Codex, Harness.OpenCode, Harness.Cursor, Harness.Strike]);
282
+ export const AllHarnesses = Object.freeze([Harness.ClaudeCode, Harness.GeminiCLI, Harness.Codex, Harness.OpenCode, Harness.Cursor, Harness.Strike, Harness.Pi]);
274
283
  export function isHarness(value) {
275
284
  return zHarness.safeParse(value).success;
276
285
  }
@@ -616,3 +625,79 @@ export const AllVisibilities = Object.freeze([Visibility.Private, Visibility.Gro
616
625
  export function isVisibility(value) {
617
626
  return zVisibility.safeParse(value).success;
618
627
  }
628
+ export const UsageScope = Object.freeze({
629
+ Assistant: zUsageScope.parse("assistant"),
630
+ Tool: zUsageScope.parse("tool"),
631
+ Summary: zUsageScope.parse("summary"),
632
+ });
633
+ export const AllUsageScopes = Object.freeze([UsageScope.Assistant, UsageScope.Tool, UsageScope.Summary]);
634
+ export function isUsageScope(value) {
635
+ return zUsageScope.safeParse(value).success;
636
+ }
637
+ export const UsageCompleteness = Object.freeze({
638
+ Complete: zUsageCompleteness.parse("complete"),
639
+ Partial: zUsageCompleteness.parse("partial"),
640
+ Unknown: zUsageCompleteness.parse("unknown"),
641
+ });
642
+ export const AllUsageCompleteness = Object.freeze([UsageCompleteness.Complete, UsageCompleteness.Partial, UsageCompleteness.Unknown]);
643
+ export function isUsageCompleteness(value) {
644
+ return zUsageCompleteness.safeParse(value).success;
645
+ }
646
+ export const NativeMetadataKind = Object.freeze({
647
+ PiCustomData: zNativeMetadataKind.parse("pi.custom.data"),
648
+ PiCustomMessageDetails: zNativeMetadataKind.parse("pi.custommessage.details"),
649
+ PiToolResultDetails: zNativeMetadataKind.parse("pi.toolresult.details"),
650
+ PiCompactionDetails: zNativeMetadataKind.parse("pi.compaction.details"),
651
+ PiBranchSummaryDetails: zNativeMetadataKind.parse("pi.branchsummary.details"),
652
+ });
653
+ export const AllNativeMetadataKinds = Object.freeze([NativeMetadataKind.PiCustomData, NativeMetadataKind.PiCustomMessageDetails, NativeMetadataKind.PiToolResultDetails, NativeMetadataKind.PiCompactionDetails, NativeMetadataKind.PiBranchSummaryDetails]);
654
+ export function isNativeMetadataKind(value) {
655
+ return zNativeMetadataKind.safeParse(value).success;
656
+ }
657
+ export const NativeMetadataSourceType = Object.freeze({
658
+ PiCustom: zNativeMetadataSourceType.parse("pi.custom"),
659
+ PiCustomMessage: zNativeMetadataSourceType.parse("pi.custom_message"),
660
+ PiMessage: zNativeMetadataSourceType.parse("pi.message"),
661
+ PiCompaction: zNativeMetadataSourceType.parse("pi.compaction"),
662
+ PiBranchSummary: zNativeMetadataSourceType.parse("pi.branch_summary"),
663
+ });
664
+ export const AllNativeMetadataSourceTypes = Object.freeze([NativeMetadataSourceType.PiCustom, NativeMetadataSourceType.PiCustomMessage, NativeMetadataSourceType.PiMessage, NativeMetadataSourceType.PiCompaction, NativeMetadataSourceType.PiBranchSummary]);
665
+ export function isNativeMetadataSourceType(value) {
666
+ return zNativeMetadataSourceType.safeParse(value).success;
667
+ }
668
+ export const NativePiMessageRole = Object.freeze({
669
+ ToolResult: zNativePiMessageRole.parse("toolResult"),
670
+ });
671
+ export const AllNativePiMessageRoles = Object.freeze([NativePiMessageRole.ToolResult]);
672
+ export function isNativePiMessageRole(value) {
673
+ return zNativePiMessageRole.safeParse(value).success;
674
+ }
675
+ export const DigestItemKind = Object.freeze({
676
+ Session: zDigestItemKind.parse("session"),
677
+ Prompt: zDigestItemKind.parse("prompt"),
678
+ Skill: zDigestItemKind.parse("skill"),
679
+ Commit: zDigestItemKind.parse("commit"),
680
+ });
681
+ export const AllDigestItemKinds = Object.freeze([DigestItemKind.Session, DigestItemKind.Prompt, DigestItemKind.Skill, DigestItemKind.Commit]);
682
+ export function isDigestItemKind(value) {
683
+ return zDigestItemKind.safeParse(value).success;
684
+ }
685
+ export const VillagePullRequestAttachmentState = Object.freeze({
686
+ Requested: zVillagePullRequestAttachmentState.parse("requested"),
687
+ Waiting: zVillagePullRequestAttachmentState.parse("waiting"),
688
+ Preview: zVillagePullRequestAttachmentState.parse("preview"),
689
+ Attached: zVillagePullRequestAttachmentState.parse("attached"),
690
+ Detached: zVillagePullRequestAttachmentState.parse("detached"),
691
+ });
692
+ export const AllVillagePullRequestAttachmentStates = Object.freeze([VillagePullRequestAttachmentState.Requested, VillagePullRequestAttachmentState.Waiting, VillagePullRequestAttachmentState.Preview, VillagePullRequestAttachmentState.Attached, VillagePullRequestAttachmentState.Detached]);
693
+ export function isVillagePullRequestAttachmentState(value) {
694
+ return zVillagePullRequestAttachmentState.safeParse(value).success;
695
+ }
696
+ export const VillagePromptsCheckMode = Object.freeze({
697
+ Informational: zVillagePromptsCheckMode.parse("informational"),
698
+ Required: zVillagePromptsCheckMode.parse("required"),
699
+ });
700
+ export const AllVillagePromptsCheckModes = Object.freeze([VillagePromptsCheckMode.Informational, VillagePromptsCheckMode.Required]);
701
+ export function isVillagePromptsCheckMode(value) {
702
+ return zVillagePromptsCheckMode.safeParse(value).success;
703
+ }