@contractspec/lib.contracts 1.56.1 → 1.57.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.
Files changed (212) hide show
  1. package/dist/_virtual/{rolldown_runtime.js → _rolldown/runtime.js} +3 -3
  2. package/dist/app-config/app-config.contracts.d.ts +50 -50
  3. package/dist/app-config/events.d.ts +27 -27
  4. package/dist/app-config/lifecycle-contracts.d.ts +54 -54
  5. package/dist/app-config/runtime.js +3 -3
  6. package/dist/app-config/validation.js +3 -3
  7. package/dist/capabilities/capabilities.js +20 -20
  8. package/dist/capabilities/context.d.ts +0 -1
  9. package/dist/capabilities/context.js +1 -1
  10. package/dist/capabilities/guards.d.ts +0 -1
  11. package/dist/capabilities/index.d.ts +2 -1
  12. package/dist/capabilities/index.js +2 -1
  13. package/dist/capabilities/meeting-recorder.d.ts +10 -0
  14. package/dist/capabilities/meeting-recorder.js +82 -0
  15. package/dist/capabilities/validation.d.ts +0 -1
  16. package/dist/client/react/drivers/rn-reusables.d.ts +0 -1
  17. package/dist/client/react/drivers/shadcn.d.ts +0 -1
  18. package/dist/client/react/form-render.js +3 -3
  19. package/dist/contract-registry/schemas.d.ts +2 -2
  20. package/dist/data-views/registry.d.ts +0 -1
  21. package/dist/data-views/spec.d.ts +0 -1
  22. package/dist/docs/commands/docsPublish.command.d.ts +13 -13
  23. package/dist/docs/contracts.d.ts +103 -103
  24. package/dist/docs/events/docsGenerated.event.d.ts +13 -13
  25. package/dist/docs/events/docsPublished.event.d.ts +15 -15
  26. package/dist/docs/forms/docsSearch.form.d.ts +4 -4
  27. package/dist/docs/queries/contractReference.query.d.ts +47 -47
  28. package/dist/docs/queries/docsIndex.query.d.ts +57 -57
  29. package/dist/docs/tech/llm/llm-integration.docblock.d.ts +0 -1
  30. package/dist/docs/tech/mcp-endpoints.docblock.js +5 -0
  31. package/dist/events.d.ts +0 -1
  32. package/dist/examples/index.d.ts +0 -1
  33. package/dist/examples/registry.d.ts +0 -1
  34. package/dist/examples/schema.d.ts +17 -17
  35. package/dist/experiments/spec.d.ts +2 -4
  36. package/dist/features/index.d.ts +0 -1
  37. package/dist/features/types.d.ts +2 -5
  38. package/dist/forms/forms.d.ts +1 -2
  39. package/dist/forms/forms.js +1 -2
  40. package/dist/index.d.ts +42 -1
  41. package/dist/index.js +36 -1
  42. package/dist/install.d.ts +2 -5
  43. package/dist/integrations/docs/integrations.docblock.js +19 -1
  44. package/dist/integrations/index.d.ts +26 -1
  45. package/dist/integrations/index.js +20 -1
  46. package/dist/integrations/meeting-recorder/contracts/index.d.ts +10 -0
  47. package/dist/integrations/meeting-recorder/contracts/index.js +12 -0
  48. package/dist/integrations/meeting-recorder/contracts/meetings.d.ts +458 -0
  49. package/dist/integrations/meeting-recorder/contracts/meetings.js +149 -0
  50. package/dist/integrations/meeting-recorder/contracts/transcripts.d.ts +173 -0
  51. package/dist/integrations/meeting-recorder/contracts/transcripts.js +156 -0
  52. package/dist/integrations/meeting-recorder/contracts/webhooks.d.ts +92 -0
  53. package/dist/integrations/meeting-recorder/contracts/webhooks.js +82 -0
  54. package/dist/integrations/meeting-recorder/meeting-recorder.capability.d.ts +7 -0
  55. package/dist/integrations/meeting-recorder/meeting-recorder.capability.js +21 -0
  56. package/dist/integrations/meeting-recorder/meeting-recorder.feature.d.ts +11 -0
  57. package/dist/integrations/meeting-recorder/meeting-recorder.feature.js +67 -0
  58. package/dist/integrations/meeting-recorder/models.d.ts +407 -0
  59. package/dist/integrations/meeting-recorder/models.js +295 -0
  60. package/dist/integrations/meeting-recorder/telemetry.d.ts +16 -0
  61. package/dist/integrations/meeting-recorder/telemetry.js +42 -0
  62. package/dist/integrations/openbanking/contracts/accounts.d.ts +66 -66
  63. package/dist/integrations/openbanking/contracts/balances.d.ts +34 -34
  64. package/dist/integrations/openbanking/contracts/transactions.d.ts +48 -48
  65. package/dist/integrations/openbanking/models.d.ts +55 -55
  66. package/dist/integrations/operations.d.ts +102 -102
  67. package/dist/integrations/providers/analytics-reader.d.ts +107 -0
  68. package/dist/integrations/providers/analytics-reader.js +0 -0
  69. package/dist/integrations/providers/analytics-writer.d.ts +10 -0
  70. package/dist/integrations/providers/analytics-writer.js +0 -0
  71. package/dist/integrations/providers/analytics.d.ts +49 -0
  72. package/dist/integrations/providers/analytics.js +0 -0
  73. package/dist/integrations/providers/database.d.ts +15 -0
  74. package/dist/integrations/providers/database.js +0 -0
  75. package/dist/integrations/providers/fal.d.ts +8 -0
  76. package/dist/integrations/providers/fal.js +94 -0
  77. package/dist/integrations/providers/fathom.d.ts +8 -0
  78. package/dist/integrations/providers/fathom.js +114 -0
  79. package/dist/integrations/providers/fireflies.d.ts +8 -0
  80. package/dist/integrations/providers/fireflies.js +98 -0
  81. package/dist/integrations/providers/gradium.d.ts +8 -0
  82. package/dist/integrations/providers/gradium.js +92 -0
  83. package/dist/integrations/providers/granola.d.ts +8 -0
  84. package/dist/integrations/providers/granola.js +71 -0
  85. package/dist/integrations/providers/index.d.ts +19 -1
  86. package/dist/integrations/providers/index.js +13 -1
  87. package/dist/integrations/providers/jira.d.ts +8 -0
  88. package/dist/integrations/providers/jira.js +90 -0
  89. package/dist/integrations/providers/linear.d.ts +8 -0
  90. package/dist/integrations/providers/linear.js +85 -0
  91. package/dist/integrations/providers/meeting-recorder.d.ts +132 -0
  92. package/dist/integrations/providers/meeting-recorder.js +0 -0
  93. package/dist/integrations/providers/notion.d.ts +8 -0
  94. package/dist/integrations/providers/notion.js +91 -0
  95. package/dist/integrations/providers/posthog.d.ts +8 -0
  96. package/dist/integrations/providers/posthog.js +107 -0
  97. package/dist/integrations/providers/project-management.d.ts +35 -0
  98. package/dist/integrations/providers/project-management.js +0 -0
  99. package/dist/integrations/providers/registry.d.ts +0 -1
  100. package/dist/integrations/providers/registry.js +24 -0
  101. package/dist/integrations/providers/supabase-postgres.d.ts +8 -0
  102. package/dist/integrations/providers/supabase-postgres.js +73 -0
  103. package/dist/integrations/providers/supabase-vector.d.ts +8 -0
  104. package/dist/integrations/providers/supabase-vector.js +93 -0
  105. package/dist/integrations/providers/tldv.d.ts +8 -0
  106. package/dist/integrations/providers/tldv.js +98 -0
  107. package/dist/integrations/runtime.js +0 -1
  108. package/dist/integrations/spec.d.ts +1 -1
  109. package/dist/jobs/queue.d.ts +0 -1
  110. package/dist/knowledge/binding.d.ts +1 -3
  111. package/dist/knowledge/operations.d.ts +66 -66
  112. package/dist/llm/exporters.d.ts +0 -1
  113. package/dist/llm/exporters.js +0 -1
  114. package/dist/llm/prompts.d.ts +0 -1
  115. package/dist/llm/types.d.ts +0 -1
  116. package/dist/onboarding-base.d.ts +29 -29
  117. package/dist/openapi.d.ts +0 -1
  118. package/dist/operations/operation.d.ts +19 -43
  119. package/dist/operations/registry.d.ts +0 -1
  120. package/dist/operations/registry.js +2 -2
  121. package/dist/operations/report/getContractVerificationStatus.d.ts +10 -10
  122. package/dist/ownership.d.ts +41 -88
  123. package/dist/policy/guards.d.ts +0 -1
  124. package/dist/policy/guards.js +3 -3
  125. package/dist/policy/index.d.ts +0 -1
  126. package/dist/policy/validation.d.ts +0 -1
  127. package/dist/product-intent/contract-patch-intent.d.ts +103 -0
  128. package/dist/product-intent/contract-patch-intent.js +33 -0
  129. package/dist/product-intent/contract-spec-patch.d.ts +89 -0
  130. package/dist/product-intent/contract-spec-patch.js +27 -0
  131. package/dist/product-intent/evidence.d.ts +17 -0
  132. package/dist/product-intent/evidence.js +13 -0
  133. package/dist/product-intent/findings.d.ts +60 -0
  134. package/dist/product-intent/findings.js +17 -0
  135. package/dist/product-intent/impact-report.d.ts +60 -0
  136. package/dist/product-intent/impact-report.js +27 -0
  137. package/dist/product-intent/index.d.ts +16 -0
  138. package/dist/product-intent/index.js +17 -0
  139. package/dist/product-intent/insights.d.ts +65 -0
  140. package/dist/product-intent/insights.js +23 -0
  141. package/dist/product-intent/opportunity-brief.d.ts +195 -0
  142. package/dist/product-intent/opportunity-brief.js +42 -0
  143. package/dist/product-intent/problems.d.ts +62 -0
  144. package/dist/product-intent/problems.js +22 -0
  145. package/dist/product-intent/registry.d.ts +32 -0
  146. package/dist/product-intent/registry.js +49 -0
  147. package/dist/product-intent/runtime.d.ts +103 -0
  148. package/dist/product-intent/runtime.js +101 -0
  149. package/dist/product-intent/spec.d.ts +676 -0
  150. package/dist/product-intent/spec.js +53 -0
  151. package/dist/product-intent/task-pack.d.ts +101 -0
  152. package/dist/product-intent/task-pack.js +34 -0
  153. package/dist/product-intent/tickets.d.ts +70 -0
  154. package/dist/product-intent/tickets.js +24 -0
  155. package/dist/product-intent/types.d.ts +12 -0
  156. package/dist/product-intent/types.js +13 -0
  157. package/dist/product-intent/ui-wireframe.d.ts +103 -0
  158. package/dist/product-intent/ui-wireframe.js +33 -0
  159. package/dist/registry-utils.d.ts +0 -1
  160. package/dist/registry-utils.js +3 -3
  161. package/dist/resources.js +1 -1
  162. package/dist/schema-to-markdown.d.ts +0 -1
  163. package/dist/server/contracts-adapter-input.js +2 -2
  164. package/dist/server/graphql-pothos.d.ts +0 -1
  165. package/dist/server/mcp/createMcpServer.d.ts +0 -1
  166. package/dist/server/rest-express.d.ts +0 -1
  167. package/dist/server/rest-generic.js +3 -3
  168. package/dist/server/rest-next-app.d.ts +0 -1
  169. package/dist/tests/spec.d.ts +0 -1
  170. package/dist/translations/registry.d.ts +0 -1
  171. package/dist/translations/spec.d.ts +0 -1
  172. package/dist/translations/validation.d.ts +0 -1
  173. package/dist/types.d.ts +5 -12
  174. package/dist/versioning/types.d.ts +0 -1
  175. package/dist/versioning/utils.d.ts +0 -1
  176. package/dist/workflow/adapters/memory-store.d.ts +0 -1
  177. package/dist/workflow/context.d.ts +0 -1
  178. package/dist/workflow/context.js +2 -2
  179. package/dist/workflow/runner.d.ts +1 -2
  180. package/dist/workspace-config/contractsrc-schema.d.ts +0 -1
  181. package/dist/workspace-config/contractsrc-types.d.ts +1 -3
  182. package/package.json +110 -32
  183. package/dist/integrations/providers/impls/elevenlabs-voice.d.ts +0 -20
  184. package/dist/integrations/providers/impls/elevenlabs-voice.js +0 -95
  185. package/dist/integrations/providers/impls/gcs-storage.d.ts +0 -24
  186. package/dist/integrations/providers/impls/gcs-storage.js +0 -88
  187. package/dist/integrations/providers/impls/gmail-inbound.d.ts +0 -26
  188. package/dist/integrations/providers/impls/gmail-inbound.js +0 -200
  189. package/dist/integrations/providers/impls/gmail-outbound.d.ts +0 -18
  190. package/dist/integrations/providers/impls/gmail-outbound.js +0 -105
  191. package/dist/integrations/providers/impls/google-calendar.d.ts +0 -23
  192. package/dist/integrations/providers/impls/google-calendar.js +0 -154
  193. package/dist/integrations/providers/impls/index.d.ts +0 -15
  194. package/dist/integrations/providers/impls/index.js +0 -16
  195. package/dist/integrations/providers/impls/mistral-embedding.d.ts +0 -23
  196. package/dist/integrations/providers/impls/mistral-embedding.js +0 -41
  197. package/dist/integrations/providers/impls/mistral-llm.d.ts +0 -31
  198. package/dist/integrations/providers/impls/mistral-llm.js +0 -247
  199. package/dist/integrations/providers/impls/postmark-email.d.ts +0 -19
  200. package/dist/integrations/providers/impls/postmark-email.js +0 -55
  201. package/dist/integrations/providers/impls/powens-client.d.ts +0 -124
  202. package/dist/integrations/providers/impls/powens-client.js +0 -171
  203. package/dist/integrations/providers/impls/powens-openbanking.d.ts +0 -27
  204. package/dist/integrations/providers/impls/powens-openbanking.js +0 -218
  205. package/dist/integrations/providers/impls/provider-factory.d.ts +0 -26
  206. package/dist/integrations/providers/impls/provider-factory.js +0 -146
  207. package/dist/integrations/providers/impls/qdrant-vector.d.ts +0 -24
  208. package/dist/integrations/providers/impls/qdrant-vector.js +0 -69
  209. package/dist/integrations/providers/impls/stripe-payments.d.ts +0 -28
  210. package/dist/integrations/providers/impls/stripe-payments.js +0 -202
  211. package/dist/integrations/providers/impls/twilio-sms.d.ts +0 -20
  212. package/dist/integrations/providers/impls/twilio-sms.js +0 -58
@@ -0,0 +1,676 @@
1
+ import { OwnerShipMeta } from "../ownership.js";
2
+ import { EvidenceFindingExtraction } from "./findings.js";
3
+ import { InsightExtraction } from "./insights.js";
4
+ import { ProblemGrouping } from "./problems.js";
5
+ import { OpportunityBrief } from "./opportunity-brief.js";
6
+ import { ContractPatchIntent } from "./contract-patch-intent.js";
7
+ import { ContractSpecPatch } from "./contract-spec-patch.js";
8
+ import { ImpactReport } from "./impact-report.js";
9
+ import { TaskPack } from "./task-pack.js";
10
+ import { TicketCollection } from "./tickets.js";
11
+ import "./types.js";
12
+ import { ZodSchemaType } from "@contractspec/lib.schema";
13
+ import * as z$2 from "zod";
14
+
15
+ //#region src/product-intent/spec.d.ts
16
+ declare const ProductIntentSpecSchema: z$2.ZodObject<{
17
+ id: z$2.ZodString;
18
+ meta: z$2.ZodObject<{
19
+ key: z$2.ZodString;
20
+ version: z$2.ZodString;
21
+ description: z$2.ZodString;
22
+ stability: z$2.ZodEnum<{
23
+ readonly Idea: "idea";
24
+ readonly InCreation: "in_creation";
25
+ readonly Experimental: "experimental";
26
+ readonly Beta: "beta";
27
+ readonly Stable: "stable";
28
+ readonly Deprecated: "deprecated";
29
+ }>;
30
+ owners: z$2.ZodArray<z$2.ZodString>;
31
+ tags: z$2.ZodArray<z$2.ZodString>;
32
+ title: z$2.ZodOptional<z$2.ZodString>;
33
+ domain: z$2.ZodOptional<z$2.ZodString>;
34
+ docId: z$2.ZodOptional<z$2.ZodArray<z$2.ZodString>>;
35
+ goal: z$2.ZodOptional<z$2.ZodString>;
36
+ context: z$2.ZodOptional<z$2.ZodString>;
37
+ }, z$2.core.$strip>;
38
+ question: z$2.ZodString;
39
+ runtimeContext: z$2.ZodOptional<z$2.ZodUnknown>;
40
+ findings: z$2.ZodOptional<z$2.ZodType<{
41
+ findings: {
42
+ findingId: string;
43
+ summary: string;
44
+ citations: {
45
+ chunkId: string;
46
+ quote: string;
47
+ }[];
48
+ tags?: string[] | undefined;
49
+ }[];
50
+ }, unknown, z$2.core.$ZodTypeInternals<{
51
+ findings: {
52
+ findingId: string;
53
+ summary: string;
54
+ citations: {
55
+ chunkId: string;
56
+ quote: string;
57
+ }[];
58
+ tags?: string[] | undefined;
59
+ }[];
60
+ }, unknown>>>;
61
+ insights: z$2.ZodOptional<z$2.ZodType<{
62
+ insights: {
63
+ insightId: string;
64
+ claim: string;
65
+ citations: {
66
+ chunkId: string;
67
+ quote: string;
68
+ }[];
69
+ tags?: string[] | undefined;
70
+ segment?: string | undefined;
71
+ confidence?: number | undefined;
72
+ }[];
73
+ }, unknown, z$2.core.$ZodTypeInternals<{
74
+ insights: {
75
+ insightId: string;
76
+ claim: string;
77
+ citations: {
78
+ chunkId: string;
79
+ quote: string;
80
+ }[];
81
+ tags?: string[] | undefined;
82
+ segment?: string | undefined;
83
+ confidence?: number | undefined;
84
+ }[];
85
+ }, unknown>>>;
86
+ problems: z$2.ZodOptional<z$2.ZodType<{
87
+ problems: {
88
+ problemId: string;
89
+ statement: string;
90
+ evidenceIds: string[];
91
+ tags?: string[] | undefined;
92
+ severity?: "low" | "medium" | "high" | undefined;
93
+ }[];
94
+ }, unknown, z$2.core.$ZodTypeInternals<{
95
+ problems: {
96
+ problemId: string;
97
+ statement: string;
98
+ evidenceIds: string[];
99
+ tags?: string[] | undefined;
100
+ severity?: "low" | "medium" | "high" | undefined;
101
+ }[];
102
+ }, unknown>>>;
103
+ brief: z$2.ZodOptional<z$2.ZodType<{
104
+ opportunityId: string;
105
+ title: string;
106
+ problem: {
107
+ text: string;
108
+ citations: {
109
+ chunkId: string;
110
+ quote: string;
111
+ }[];
112
+ };
113
+ who: {
114
+ text: string;
115
+ citations: {
116
+ chunkId: string;
117
+ quote: string;
118
+ }[];
119
+ };
120
+ proposedChange: {
121
+ text: string;
122
+ citations: {
123
+ chunkId: string;
124
+ quote: string;
125
+ }[];
126
+ };
127
+ expectedImpact: {
128
+ metric: string;
129
+ direction: "up" | "down";
130
+ magnitudeHint?: string | undefined;
131
+ timeframeHint?: string | undefined;
132
+ };
133
+ confidence: "low" | "medium" | "high";
134
+ risks?: {
135
+ text: string;
136
+ citations?: {
137
+ chunkId: string;
138
+ quote: string;
139
+ }[] | undefined;
140
+ }[] | undefined;
141
+ }, unknown, z$2.core.$ZodTypeInternals<{
142
+ opportunityId: string;
143
+ title: string;
144
+ problem: {
145
+ text: string;
146
+ citations: {
147
+ chunkId: string;
148
+ quote: string;
149
+ }[];
150
+ };
151
+ who: {
152
+ text: string;
153
+ citations: {
154
+ chunkId: string;
155
+ quote: string;
156
+ }[];
157
+ };
158
+ proposedChange: {
159
+ text: string;
160
+ citations: {
161
+ chunkId: string;
162
+ quote: string;
163
+ }[];
164
+ };
165
+ expectedImpact: {
166
+ metric: string;
167
+ direction: "up" | "down";
168
+ magnitudeHint?: string | undefined;
169
+ timeframeHint?: string | undefined;
170
+ };
171
+ confidence: "low" | "medium" | "high";
172
+ risks?: {
173
+ text: string;
174
+ citations?: {
175
+ chunkId: string;
176
+ quote: string;
177
+ }[] | undefined;
178
+ }[] | undefined;
179
+ }, unknown>>>;
180
+ tickets: z$2.ZodOptional<z$2.ZodType<{
181
+ tickets: {
182
+ ticketId: string;
183
+ title: string;
184
+ summary: string;
185
+ evidenceIds: string[];
186
+ acceptanceCriteria: string[];
187
+ priority?: "low" | "medium" | "high" | undefined;
188
+ tags?: string[] | undefined;
189
+ }[];
190
+ }, unknown, z$2.core.$ZodTypeInternals<{
191
+ tickets: {
192
+ ticketId: string;
193
+ title: string;
194
+ summary: string;
195
+ evidenceIds: string[];
196
+ acceptanceCriteria: string[];
197
+ priority?: "low" | "medium" | "high" | undefined;
198
+ tags?: string[] | undefined;
199
+ }[];
200
+ }, unknown>>>;
201
+ patchIntent: z$2.ZodOptional<z$2.ZodType<{
202
+ featureKey: string;
203
+ changes: {
204
+ type: "other" | "add_field" | "remove_field" | "rename_field" | "add_event" | "update_event" | "add_operation" | "update_operation" | "update_form" | "update_policy" | "add_enum_value" | "remove_enum_value";
205
+ target: string;
206
+ detail: string;
207
+ }[];
208
+ acceptanceCriteria: string[];
209
+ }, unknown, z$2.core.$ZodTypeInternals<{
210
+ featureKey: string;
211
+ changes: {
212
+ type: "other" | "add_field" | "remove_field" | "rename_field" | "add_event" | "update_event" | "add_operation" | "update_operation" | "update_form" | "update_policy" | "add_enum_value" | "remove_enum_value";
213
+ target: string;
214
+ detail: string;
215
+ }[];
216
+ acceptanceCriteria: string[];
217
+ }, unknown>>>;
218
+ patch: z$2.ZodOptional<z$2.ZodType<{
219
+ overlay: {
220
+ adds?: {
221
+ path: string;
222
+ value: unknown;
223
+ }[] | undefined;
224
+ updates?: {
225
+ path: string;
226
+ value: unknown;
227
+ }[] | undefined;
228
+ removes?: {
229
+ path: string;
230
+ }[] | undefined;
231
+ };
232
+ }, unknown, z$2.core.$ZodTypeInternals<{
233
+ overlay: {
234
+ adds?: {
235
+ path: string;
236
+ value: unknown;
237
+ }[] | undefined;
238
+ updates?: {
239
+ path: string;
240
+ value: unknown;
241
+ }[] | undefined;
242
+ removes?: {
243
+ path: string;
244
+ }[] | undefined;
245
+ };
246
+ }, unknown>>>;
247
+ impact: z$2.ZodOptional<z$2.ZodType<{
248
+ reportId: string;
249
+ patchId: string;
250
+ summary: string;
251
+ surfaces: {
252
+ api?: string[] | undefined;
253
+ db?: string[] | undefined;
254
+ ui?: string[] | undefined;
255
+ workflows?: string[] | undefined;
256
+ policy?: string[] | undefined;
257
+ docs?: string[] | undefined;
258
+ tests?: string[] | undefined;
259
+ };
260
+ breaks?: string[] | undefined;
261
+ mustChange?: string[] | undefined;
262
+ risky?: string[] | undefined;
263
+ }, unknown, z$2.core.$ZodTypeInternals<{
264
+ reportId: string;
265
+ patchId: string;
266
+ summary: string;
267
+ surfaces: {
268
+ api?: string[] | undefined;
269
+ db?: string[] | undefined;
270
+ ui?: string[] | undefined;
271
+ workflows?: string[] | undefined;
272
+ policy?: string[] | undefined;
273
+ docs?: string[] | undefined;
274
+ tests?: string[] | undefined;
275
+ };
276
+ breaks?: string[] | undefined;
277
+ mustChange?: string[] | undefined;
278
+ risky?: string[] | undefined;
279
+ }, unknown>>>;
280
+ tasks: z$2.ZodOptional<z$2.ZodType<{
281
+ packId: string;
282
+ patchId: string;
283
+ overview: string;
284
+ tasks: {
285
+ id: string;
286
+ title: string;
287
+ surface: ("policy" | "tests" | "docs" | "api" | "db" | "ui" | "workflows" | "other")[];
288
+ why: string;
289
+ acceptance: string[];
290
+ agentPrompt: string;
291
+ dependsOn?: string[] | undefined;
292
+ }[];
293
+ }, unknown, z$2.core.$ZodTypeInternals<{
294
+ packId: string;
295
+ patchId: string;
296
+ overview: string;
297
+ tasks: {
298
+ id: string;
299
+ title: string;
300
+ surface: ("policy" | "tests" | "docs" | "api" | "db" | "ui" | "workflows" | "other")[];
301
+ why: string;
302
+ acceptance: string[];
303
+ agentPrompt: string;
304
+ dependsOn?: string[] | undefined;
305
+ }[];
306
+ }, unknown>>>;
307
+ }, z$2.core.$strip>;
308
+ declare const ProductIntentSpecModel: ZodSchemaType<z$2.ZodObject<{
309
+ id: z$2.ZodString;
310
+ meta: z$2.ZodObject<{
311
+ key: z$2.ZodString;
312
+ version: z$2.ZodString;
313
+ description: z$2.ZodString;
314
+ stability: z$2.ZodEnum<{
315
+ readonly Idea: "idea";
316
+ readonly InCreation: "in_creation";
317
+ readonly Experimental: "experimental";
318
+ readonly Beta: "beta";
319
+ readonly Stable: "stable";
320
+ readonly Deprecated: "deprecated";
321
+ }>;
322
+ owners: z$2.ZodArray<z$2.ZodString>;
323
+ tags: z$2.ZodArray<z$2.ZodString>;
324
+ title: z$2.ZodOptional<z$2.ZodString>;
325
+ domain: z$2.ZodOptional<z$2.ZodString>;
326
+ docId: z$2.ZodOptional<z$2.ZodArray<z$2.ZodString>>;
327
+ goal: z$2.ZodOptional<z$2.ZodString>;
328
+ context: z$2.ZodOptional<z$2.ZodString>;
329
+ }, z$2.core.$strip>;
330
+ question: z$2.ZodString;
331
+ runtimeContext: z$2.ZodOptional<z$2.ZodUnknown>;
332
+ findings: z$2.ZodOptional<z$2.ZodType<{
333
+ findings: {
334
+ findingId: string;
335
+ summary: string;
336
+ citations: {
337
+ chunkId: string;
338
+ quote: string;
339
+ }[];
340
+ tags?: string[] | undefined;
341
+ }[];
342
+ }, unknown, z$2.core.$ZodTypeInternals<{
343
+ findings: {
344
+ findingId: string;
345
+ summary: string;
346
+ citations: {
347
+ chunkId: string;
348
+ quote: string;
349
+ }[];
350
+ tags?: string[] | undefined;
351
+ }[];
352
+ }, unknown>>>;
353
+ insights: z$2.ZodOptional<z$2.ZodType<{
354
+ insights: {
355
+ insightId: string;
356
+ claim: string;
357
+ citations: {
358
+ chunkId: string;
359
+ quote: string;
360
+ }[];
361
+ tags?: string[] | undefined;
362
+ segment?: string | undefined;
363
+ confidence?: number | undefined;
364
+ }[];
365
+ }, unknown, z$2.core.$ZodTypeInternals<{
366
+ insights: {
367
+ insightId: string;
368
+ claim: string;
369
+ citations: {
370
+ chunkId: string;
371
+ quote: string;
372
+ }[];
373
+ tags?: string[] | undefined;
374
+ segment?: string | undefined;
375
+ confidence?: number | undefined;
376
+ }[];
377
+ }, unknown>>>;
378
+ problems: z$2.ZodOptional<z$2.ZodType<{
379
+ problems: {
380
+ problemId: string;
381
+ statement: string;
382
+ evidenceIds: string[];
383
+ tags?: string[] | undefined;
384
+ severity?: "low" | "medium" | "high" | undefined;
385
+ }[];
386
+ }, unknown, z$2.core.$ZodTypeInternals<{
387
+ problems: {
388
+ problemId: string;
389
+ statement: string;
390
+ evidenceIds: string[];
391
+ tags?: string[] | undefined;
392
+ severity?: "low" | "medium" | "high" | undefined;
393
+ }[];
394
+ }, unknown>>>;
395
+ brief: z$2.ZodOptional<z$2.ZodType<{
396
+ opportunityId: string;
397
+ title: string;
398
+ problem: {
399
+ text: string;
400
+ citations: {
401
+ chunkId: string;
402
+ quote: string;
403
+ }[];
404
+ };
405
+ who: {
406
+ text: string;
407
+ citations: {
408
+ chunkId: string;
409
+ quote: string;
410
+ }[];
411
+ };
412
+ proposedChange: {
413
+ text: string;
414
+ citations: {
415
+ chunkId: string;
416
+ quote: string;
417
+ }[];
418
+ };
419
+ expectedImpact: {
420
+ metric: string;
421
+ direction: "up" | "down";
422
+ magnitudeHint?: string | undefined;
423
+ timeframeHint?: string | undefined;
424
+ };
425
+ confidence: "low" | "medium" | "high";
426
+ risks?: {
427
+ text: string;
428
+ citations?: {
429
+ chunkId: string;
430
+ quote: string;
431
+ }[] | undefined;
432
+ }[] | undefined;
433
+ }, unknown, z$2.core.$ZodTypeInternals<{
434
+ opportunityId: string;
435
+ title: string;
436
+ problem: {
437
+ text: string;
438
+ citations: {
439
+ chunkId: string;
440
+ quote: string;
441
+ }[];
442
+ };
443
+ who: {
444
+ text: string;
445
+ citations: {
446
+ chunkId: string;
447
+ quote: string;
448
+ }[];
449
+ };
450
+ proposedChange: {
451
+ text: string;
452
+ citations: {
453
+ chunkId: string;
454
+ quote: string;
455
+ }[];
456
+ };
457
+ expectedImpact: {
458
+ metric: string;
459
+ direction: "up" | "down";
460
+ magnitudeHint?: string | undefined;
461
+ timeframeHint?: string | undefined;
462
+ };
463
+ confidence: "low" | "medium" | "high";
464
+ risks?: {
465
+ text: string;
466
+ citations?: {
467
+ chunkId: string;
468
+ quote: string;
469
+ }[] | undefined;
470
+ }[] | undefined;
471
+ }, unknown>>>;
472
+ tickets: z$2.ZodOptional<z$2.ZodType<{
473
+ tickets: {
474
+ ticketId: string;
475
+ title: string;
476
+ summary: string;
477
+ evidenceIds: string[];
478
+ acceptanceCriteria: string[];
479
+ priority?: "low" | "medium" | "high" | undefined;
480
+ tags?: string[] | undefined;
481
+ }[];
482
+ }, unknown, z$2.core.$ZodTypeInternals<{
483
+ tickets: {
484
+ ticketId: string;
485
+ title: string;
486
+ summary: string;
487
+ evidenceIds: string[];
488
+ acceptanceCriteria: string[];
489
+ priority?: "low" | "medium" | "high" | undefined;
490
+ tags?: string[] | undefined;
491
+ }[];
492
+ }, unknown>>>;
493
+ patchIntent: z$2.ZodOptional<z$2.ZodType<{
494
+ featureKey: string;
495
+ changes: {
496
+ type: "other" | "add_field" | "remove_field" | "rename_field" | "add_event" | "update_event" | "add_operation" | "update_operation" | "update_form" | "update_policy" | "add_enum_value" | "remove_enum_value";
497
+ target: string;
498
+ detail: string;
499
+ }[];
500
+ acceptanceCriteria: string[];
501
+ }, unknown, z$2.core.$ZodTypeInternals<{
502
+ featureKey: string;
503
+ changes: {
504
+ type: "other" | "add_field" | "remove_field" | "rename_field" | "add_event" | "update_event" | "add_operation" | "update_operation" | "update_form" | "update_policy" | "add_enum_value" | "remove_enum_value";
505
+ target: string;
506
+ detail: string;
507
+ }[];
508
+ acceptanceCriteria: string[];
509
+ }, unknown>>>;
510
+ patch: z$2.ZodOptional<z$2.ZodType<{
511
+ overlay: {
512
+ adds?: {
513
+ path: string;
514
+ value: unknown;
515
+ }[] | undefined;
516
+ updates?: {
517
+ path: string;
518
+ value: unknown;
519
+ }[] | undefined;
520
+ removes?: {
521
+ path: string;
522
+ }[] | undefined;
523
+ };
524
+ }, unknown, z$2.core.$ZodTypeInternals<{
525
+ overlay: {
526
+ adds?: {
527
+ path: string;
528
+ value: unknown;
529
+ }[] | undefined;
530
+ updates?: {
531
+ path: string;
532
+ value: unknown;
533
+ }[] | undefined;
534
+ removes?: {
535
+ path: string;
536
+ }[] | undefined;
537
+ };
538
+ }, unknown>>>;
539
+ impact: z$2.ZodOptional<z$2.ZodType<{
540
+ reportId: string;
541
+ patchId: string;
542
+ summary: string;
543
+ surfaces: {
544
+ api?: string[] | undefined;
545
+ db?: string[] | undefined;
546
+ ui?: string[] | undefined;
547
+ workflows?: string[] | undefined;
548
+ policy?: string[] | undefined;
549
+ docs?: string[] | undefined;
550
+ tests?: string[] | undefined;
551
+ };
552
+ breaks?: string[] | undefined;
553
+ mustChange?: string[] | undefined;
554
+ risky?: string[] | undefined;
555
+ }, unknown, z$2.core.$ZodTypeInternals<{
556
+ reportId: string;
557
+ patchId: string;
558
+ summary: string;
559
+ surfaces: {
560
+ api?: string[] | undefined;
561
+ db?: string[] | undefined;
562
+ ui?: string[] | undefined;
563
+ workflows?: string[] | undefined;
564
+ policy?: string[] | undefined;
565
+ docs?: string[] | undefined;
566
+ tests?: string[] | undefined;
567
+ };
568
+ breaks?: string[] | undefined;
569
+ mustChange?: string[] | undefined;
570
+ risky?: string[] | undefined;
571
+ }, unknown>>>;
572
+ tasks: z$2.ZodOptional<z$2.ZodType<{
573
+ packId: string;
574
+ patchId: string;
575
+ overview: string;
576
+ tasks: {
577
+ id: string;
578
+ title: string;
579
+ surface: ("policy" | "tests" | "docs" | "api" | "db" | "ui" | "workflows" | "other")[];
580
+ why: string;
581
+ acceptance: string[];
582
+ agentPrompt: string;
583
+ dependsOn?: string[] | undefined;
584
+ }[];
585
+ }, unknown, z$2.core.$ZodTypeInternals<{
586
+ packId: string;
587
+ patchId: string;
588
+ overview: string;
589
+ tasks: {
590
+ id: string;
591
+ title: string;
592
+ surface: ("policy" | "tests" | "docs" | "api" | "db" | "ui" | "workflows" | "other")[];
593
+ why: string;
594
+ acceptance: string[];
595
+ agentPrompt: string;
596
+ dependsOn?: string[] | undefined;
597
+ }[];
598
+ }, unknown>>>;
599
+ }, z$2.core.$strip>>;
600
+ type ProductIntentSpecData = z$2.infer<typeof ProductIntentSpecSchema>;
601
+ /**
602
+ * A ProductIntentSpec describes the contract for a single product
603
+ * opportunity. It ties together the question being asked, the
604
+ * resulting brief, the proposed patch intent, the concrete patch, the
605
+ * impact report and the tasks required to implement it. This interface
606
+ * is intentionally flexible so that different implementations can fill
607
+ * in the pieces as they become available.
608
+ */
609
+ interface ProductIntentMeta extends OwnerShipMeta {
610
+ goal?: string;
611
+ context?: string;
612
+ }
613
+ interface ProductIntentSpec<Context = unknown> {
614
+ /**
615
+ * A unique identifier for this product intent. This is used when
616
+ * storing and retrieving specs from a registry or database.
617
+ */
618
+ id: string;
619
+ /**
620
+ * Contract metadata for registry and ownership tracking.
621
+ */
622
+ meta: ProductIntentMeta;
623
+ /**
624
+ * The question or goal that triggered the discovery process. For
625
+ * example: "What should we build next to improve activation?".
626
+ */
627
+ question: string;
628
+ /**
629
+ * Optional runtime context defined by the caller.
630
+ */
631
+ runtimeContext?: Context;
632
+ /**
633
+ * The extracted insights grounded in evidence.
634
+ */
635
+ insights?: InsightExtraction;
636
+ /**
637
+ * The evidence findings extracted from transcripts.
638
+ */
639
+ findings?: EvidenceFindingExtraction;
640
+ /**
641
+ * Grouped problem statements linked to evidence findings.
642
+ */
643
+ problems?: ProblemGrouping;
644
+ /**
645
+ * The synthesized opportunity brief explaining what to build and why.
646
+ */
647
+ brief?: OpportunityBrief;
648
+ /**
649
+ * Tickets derived from the problems and evidence findings.
650
+ */
651
+ tickets?: TicketCollection;
652
+ /**
653
+ * The intermediate patch intent derived from the brief. This is
654
+ * converted into an actual ContractSpec patch by the runtime.
655
+ */
656
+ patchIntent?: ContractPatchIntent;
657
+ /**
658
+ * The concrete patch to apply to the ContractSpec. Produced by
659
+ * translating the patch intent into your spec format.
660
+ */
661
+ patch?: ContractSpecPatch;
662
+ /**
663
+ * The impact report describing consequences of applying the patch.
664
+ */
665
+ impact?: ImpactReport;
666
+ /**
667
+ * The task pack enumerating discrete work items to implement the patch.
668
+ */
669
+ tasks?: TaskPack;
670
+ }
671
+ /**
672
+ * Helper to define a ProductIntentSpec with proper type inference.
673
+ */
674
+ declare function defineProductIntentSpec<Context = unknown>(spec: ProductIntentSpec<Context>): ProductIntentSpec<Context>;
675
+ //#endregion
676
+ export { ProductIntentMeta, ProductIntentSpec, ProductIntentSpecData, ProductIntentSpecModel, defineProductIntentSpec };