@agentproto/agencies 0.1.0-alpha.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 (35) hide show
  1. package/AGENTAGENCIES.md +39 -0
  2. package/LICENSE +21 -0
  3. package/README.md +90 -0
  4. package/dist/capacity-98VwY285.d.ts +862 -0
  5. package/dist/chunk-DYQ4A5HV.mjs +649 -0
  6. package/dist/chunk-DYQ4A5HV.mjs.map +1 -0
  7. package/dist/chunk-GAJQ5ZC2.mjs +149 -0
  8. package/dist/chunk-GAJQ5ZC2.mjs.map +1 -0
  9. package/dist/chunk-SOJ4GQR7.mjs +3 -0
  10. package/dist/chunk-SOJ4GQR7.mjs.map +1 -0
  11. package/dist/composition/index.d.ts +61 -0
  12. package/dist/composition/index.mjs +75 -0
  13. package/dist/composition/index.mjs.map +1 -0
  14. package/dist/doctypes/index.d.ts +61 -0
  15. package/dist/doctypes/index.mjs +4 -0
  16. package/dist/doctypes/index.mjs.map +1 -0
  17. package/dist/index.d.ts +32 -0
  18. package/dist/index.mjs +17 -0
  19. package/dist/index.mjs.map +1 -0
  20. package/dist/renderers/index.d.ts +288 -0
  21. package/dist/renderers/index.mjs +321 -0
  22. package/dist/renderers/index.mjs.map +1 -0
  23. package/dist/validators/index.d.ts +70 -0
  24. package/dist/validators/index.mjs +4 -0
  25. package/dist/validators/index.mjs.map +1 -0
  26. package/package.json +94 -0
  27. package/src/spec/canvakit-templates/agency.agency-overview/template.canvakit.html +173 -0
  28. package/src/spec/canvakit-templates/agency.agency-profile/template.canvakit.html +121 -0
  29. package/src/spec/canvakit-templates/agency.agreement-signing/template.canvakit.html +164 -0
  30. package/src/spec/canvakit-templates/agency.deliverable-review/template.canvakit.html +148 -0
  31. package/src/spec/canvakit-templates/agency.engagement-dashboard/template.canvakit.html +191 -0
  32. package/src/spec/canvakit-templates/agency.invoice-pdf/template.canvakit.html +142 -0
  33. package/src/spec/canvakit-templates/agency.procedure-card/template.canvakit.html +93 -0
  34. package/src/spec/snippets/agency-overview-rollup/procedures/compute-agency-overview/PROCEDURE.md +88 -0
  35. package/src/spec/snippets/agency-overview-rollup/routines/agency-overview-rollup/ROUTINE.md +58 -0
@@ -0,0 +1,862 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * agentagencies/v1 — `AGENCY.md` doctype.
5
+ *
6
+ * Operational profile of the company when it acts as an agency.
7
+ * Lives at `<workspace-root>/AGENCY.md` alongside (NOT replacing) `COMPANY.md`
8
+ * from agentcompanies/v1. Optional — a workspace is a valid agentagencies
9
+ * package without it as long as the other doctypes are reachable via
10
+ * `COMPANY.md.includes[]` or filesystem convention.
11
+ *
12
+ * Carries operational defaults that would otherwise be sprinkled across
13
+ * services / pricing / policies (verticals, default currency, autonomy posture).
14
+ */
15
+ declare const AUTONOMY_POSTURE: readonly ["full-auto", "hybrid", "manual"];
16
+ declare const autonomyPostureSchema: z.ZodEnum<{
17
+ "full-auto": "full-auto";
18
+ hybrid: "hybrid";
19
+ manual: "manual";
20
+ }>;
21
+ type AutonomyPosture = z.infer<typeof autonomyPostureSchema>;
22
+ declare const agencyFrontmatterSchema: z.ZodObject<{
23
+ verticals: z.ZodDefault<z.ZodArray<z.ZodString>>;
24
+ primaryServices: z.ZodDefault<z.ZodArray<z.ZodString>>;
25
+ defaultPricingModel: z.ZodOptional<z.ZodString>;
26
+ defaultCurrency: z.ZodOptional<z.ZodString>;
27
+ defaultCountry: z.ZodOptional<z.ZodString>;
28
+ billingTimezone: z.ZodOptional<z.ZodString>;
29
+ fiscalYearStart: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODate, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
30
+ autonomyPosture: z.ZodDefault<z.ZodEnum<{
31
+ "full-auto": "full-auto";
32
+ hybrid: "hybrid";
33
+ manual: "manual";
34
+ }>>;
35
+ includes: z.ZodDefault<z.ZodArray<z.ZodString>>;
36
+ schema: z.ZodLiteral<"agentagencies/v1">;
37
+ doctype: z.ZodLiteral<"agency">;
38
+ slug: z.ZodString;
39
+ name: z.ZodString;
40
+ description: z.ZodOptional<z.ZodString>;
41
+ version: z.ZodOptional<z.ZodString>;
42
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
43
+ }, z.core.$strip>;
44
+ type AgencyFrontmatter = z.infer<typeof agencyFrontmatterSchema>;
45
+ interface Agency {
46
+ frontmatter: AgencyFrontmatter;
47
+ body: string;
48
+ }
49
+ declare const AGENCY_FILENAME: "AGENCY.md";
50
+
51
+ /**
52
+ * agentagencies/v1 — `OPERATIONS.md` doctype.
53
+ *
54
+ * Root file for **external** operations packages — used when ops live in a
55
+ * separate package from the company package, referenced via `includes[]`
56
+ * from `COMPANY.md` or `AGENCY.md`. Analog of `COMPANY.md` (companies.sh)
57
+ * but scoped to operations only.
58
+ *
59
+ * A holding company with multiple agency divisions might have:
60
+ * big-corp/COMPANY.md → includes: [../plumbing-ops, ../design-ops]
61
+ * plumbing-ops/OPERATIONS.md
62
+ * design-ops/OPERATIONS.md
63
+ */
64
+ declare const operationsFrontmatterSchema: z.ZodObject<{
65
+ includes: z.ZodDefault<z.ZodArray<z.ZodString>>;
66
+ license: z.ZodOptional<z.ZodString>;
67
+ authors: z.ZodOptional<z.ZodArray<z.ZodObject<{
68
+ name: z.ZodString;
69
+ email: z.ZodOptional<z.ZodEmail>;
70
+ url: z.ZodOptional<z.ZodString>;
71
+ }, z.core.$strip>>>;
72
+ homepage: z.ZodOptional<z.ZodString>;
73
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
74
+ schema: z.ZodLiteral<"agentagencies/v1">;
75
+ doctype: z.ZodLiteral<"operations">;
76
+ slug: z.ZodString;
77
+ name: z.ZodString;
78
+ description: z.ZodOptional<z.ZodString>;
79
+ version: z.ZodOptional<z.ZodString>;
80
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
81
+ }, z.core.$strip>;
82
+ type OperationsFrontmatter = z.infer<typeof operationsFrontmatterSchema>;
83
+ interface Operations {
84
+ frontmatter: OperationsFrontmatter;
85
+ body: string;
86
+ }
87
+ declare const OPERATIONS_FILENAME: "OPERATIONS.md";
88
+
89
+ /**
90
+ * agentagencies/v1 — `SERVICE.md` doctype.
91
+ *
92
+ * Catalog item — what the agency sells. Composes one or more SKILL.md
93
+ * (companies.sh) refs + a default PROCEDURE.md (the playbook to execute when
94
+ * this service is requested) + a default pricing model + scope template.
95
+ */
96
+ declare const serviceFrontmatterSchema: z.ZodObject<{
97
+ requiredSkills: z.ZodDefault<z.ZodArray<z.ZodString>>;
98
+ defaultProcedure: z.ZodOptional<z.ZodString>;
99
+ defaultPricingModel: z.ZodOptional<z.ZodString>;
100
+ estimatedDuration: z.ZodOptional<z.ZodString>;
101
+ prerequisites: z.ZodDefault<z.ZodArray<z.ZodString>>;
102
+ scopeTemplate: z.ZodOptional<z.ZodUnknown>;
103
+ tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
104
+ publishable: z.ZodDefault<z.ZodBoolean>;
105
+ schema: z.ZodLiteral<"agentagencies/v1">;
106
+ doctype: z.ZodLiteral<"service">;
107
+ slug: z.ZodString;
108
+ name: z.ZodString;
109
+ description: z.ZodOptional<z.ZodString>;
110
+ version: z.ZodOptional<z.ZodString>;
111
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
112
+ }, z.core.$strip>;
113
+ type ServiceFrontmatter = z.infer<typeof serviceFrontmatterSchema>;
114
+ interface Service {
115
+ frontmatter: ServiceFrontmatter;
116
+ body: string;
117
+ }
118
+ declare const SERVICE_FILENAME: "SERVICE.md";
119
+
120
+ /**
121
+ * agentagencies/v1 — `PROCEDURE.md` doctype.
122
+ *
123
+ * Vendor-neutral playbook. Step-by-step "how to do X": triggers, required skills,
124
+ * autonomy policy, branching steps with expected outputs.
125
+ *
126
+ * A Mastra workflow.ts is *one possible implementation* of a PROCEDURE.md;
127
+ * other orchestrators (Temporal, n8n, manual humans) can read and follow the
128
+ * same procedure without our infrastructure.
129
+ *
130
+ * Relationship to ROUTINE.md: ROUTINE.md says "when" (cron, triggers); PROCEDURE.md
131
+ * says "what" (steps).
132
+ */
133
+ declare const procedureTriggerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
134
+ kind: z.ZodLiteral<"service">;
135
+ service: z.ZodString;
136
+ }, z.core.$strip>, z.ZodObject<{
137
+ kind: z.ZodLiteral<"routine">;
138
+ routine: z.ZodString;
139
+ }, z.core.$strip>, z.ZodObject<{
140
+ kind: z.ZodLiteral<"manual">;
141
+ description: z.ZodOptional<z.ZodString>;
142
+ }, z.core.$strip>, z.ZodObject<{
143
+ kind: z.ZodLiteral<"event">;
144
+ eventType: z.ZodString;
145
+ }, z.core.$strip>], "kind">;
146
+ type ProcedureTrigger = z.infer<typeof procedureTriggerSchema>;
147
+ /** A simple step without branching. */
148
+ declare const procedureSimpleStepSchema: z.ZodObject<{
149
+ id: z.ZodString;
150
+ description: z.ZodOptional<z.ZodString>;
151
+ requiredSkill: z.ZodOptional<z.ZodString>;
152
+ output: z.ZodOptional<z.ZodString>;
153
+ branch: z.ZodOptional<z.ZodNever>;
154
+ }, z.core.$strip>;
155
+ /** A branching step — picks which step (by id) to run next based on conditions. */
156
+ declare const procedureBranchStepSchema: z.ZodObject<{
157
+ id: z.ZodString;
158
+ description: z.ZodOptional<z.ZodString>;
159
+ requiredSkill: z.ZodOptional<z.ZodString>;
160
+ output: z.ZodOptional<z.ZodString>;
161
+ branch: z.ZodArray<z.ZodObject<{
162
+ if: z.ZodOptional<z.ZodString>;
163
+ else: z.ZodOptional<z.ZodBoolean>;
164
+ action: z.ZodString;
165
+ }, z.core.$strip>>;
166
+ }, z.core.$strip>;
167
+ declare const procedureStepSchema: z.ZodUnion<readonly [z.ZodObject<{
168
+ id: z.ZodString;
169
+ description: z.ZodOptional<z.ZodString>;
170
+ requiredSkill: z.ZodOptional<z.ZodString>;
171
+ output: z.ZodOptional<z.ZodString>;
172
+ branch: z.ZodOptional<z.ZodNever>;
173
+ }, z.core.$strip>, z.ZodObject<{
174
+ id: z.ZodString;
175
+ description: z.ZodOptional<z.ZodString>;
176
+ requiredSkill: z.ZodOptional<z.ZodString>;
177
+ output: z.ZodOptional<z.ZodString>;
178
+ branch: z.ZodArray<z.ZodObject<{
179
+ if: z.ZodOptional<z.ZodString>;
180
+ else: z.ZodOptional<z.ZodBoolean>;
181
+ action: z.ZodString;
182
+ }, z.core.$strip>>;
183
+ }, z.core.$strip>]>;
184
+ type ProcedureStep = z.infer<typeof procedureStepSchema>;
185
+ declare const procedureFrontmatterSchema: z.ZodObject<{
186
+ triggers: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
187
+ kind: z.ZodLiteral<"service">;
188
+ service: z.ZodString;
189
+ }, z.core.$strip>, z.ZodObject<{
190
+ kind: z.ZodLiteral<"routine">;
191
+ routine: z.ZodString;
192
+ }, z.core.$strip>, z.ZodObject<{
193
+ kind: z.ZodLiteral<"manual">;
194
+ description: z.ZodOptional<z.ZodString>;
195
+ }, z.core.$strip>, z.ZodObject<{
196
+ kind: z.ZodLiteral<"event">;
197
+ eventType: z.ZodString;
198
+ }, z.core.$strip>], "kind">>>;
199
+ requiredSkills: z.ZodDefault<z.ZodArray<z.ZodString>>;
200
+ estimatedDuration: z.ZodOptional<z.ZodString>;
201
+ autonomyPolicy: z.ZodOptional<z.ZodString>;
202
+ steps: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
203
+ id: z.ZodString;
204
+ description: z.ZodOptional<z.ZodString>;
205
+ requiredSkill: z.ZodOptional<z.ZodString>;
206
+ output: z.ZodOptional<z.ZodString>;
207
+ branch: z.ZodOptional<z.ZodNever>;
208
+ }, z.core.$strip>, z.ZodObject<{
209
+ id: z.ZodString;
210
+ description: z.ZodOptional<z.ZodString>;
211
+ requiredSkill: z.ZodOptional<z.ZodString>;
212
+ output: z.ZodOptional<z.ZodString>;
213
+ branch: z.ZodArray<z.ZodObject<{
214
+ if: z.ZodOptional<z.ZodString>;
215
+ else: z.ZodOptional<z.ZodBoolean>;
216
+ action: z.ZodString;
217
+ }, z.core.$strip>>;
218
+ }, z.core.$strip>]>>;
219
+ defaultApprovers: z.ZodDefault<z.ZodArray<z.ZodString>>;
220
+ schema: z.ZodLiteral<"agentagencies/v1">;
221
+ doctype: z.ZodLiteral<"procedure">;
222
+ slug: z.ZodString;
223
+ name: z.ZodString;
224
+ description: z.ZodOptional<z.ZodString>;
225
+ version: z.ZodOptional<z.ZodString>;
226
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
227
+ }, z.core.$strip>;
228
+ type ProcedureFrontmatter = z.infer<typeof procedureFrontmatterSchema>;
229
+ interface Procedure {
230
+ frontmatter: ProcedureFrontmatter;
231
+ body: string;
232
+ }
233
+ declare const PROCEDURE_FILENAME: "PROCEDURE.md";
234
+
235
+ /**
236
+ * agentagencies/v1 — `PRICING-MODEL.md` doctype.
237
+ *
238
+ * Pricing rule. Determines how a service is priced + how it gets billed.
239
+ * Six kinds for v1:
240
+ * - fixed — single price for the whole engagement
241
+ * - hourly — billed per hour worked (with optional cap)
242
+ * - retainer — recurring monthly/period fee
243
+ * - milestone — scheduled payments at defined milestones
244
+ * - value — outcome-based (e.g., % of revenue impact)
245
+ * - usage_metered — Stripe-style usage billing
246
+ */
247
+ declare const PRICING_KIND: readonly ["fixed", "hourly", "retainer", "milestone", "value", "usage_metered"];
248
+ declare const pricingKindSchema: z.ZodEnum<{
249
+ value: "value";
250
+ fixed: "fixed";
251
+ hourly: "hourly";
252
+ retainer: "retainer";
253
+ milestone: "milestone";
254
+ usage_metered: "usage_metered";
255
+ }>;
256
+ type PricingKind = z.infer<typeof pricingKindSchema>;
257
+ declare const pricingDetailsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
258
+ kind: z.ZodLiteral<"fixed">;
259
+ amount: z.ZodNumber;
260
+ currency: z.ZodString;
261
+ }, z.core.$strip>, z.ZodObject<{
262
+ kind: z.ZodLiteral<"hourly">;
263
+ rate: z.ZodNumber;
264
+ currency: z.ZodString;
265
+ capHours: z.ZodOptional<z.ZodNumber>;
266
+ }, z.core.$strip>, z.ZodObject<{
267
+ kind: z.ZodLiteral<"retainer">;
268
+ amount: z.ZodNumber;
269
+ currency: z.ZodString;
270
+ period: z.ZodString;
271
+ minCommitment: z.ZodOptional<z.ZodString>;
272
+ }, z.core.$strip>, z.ZodObject<{
273
+ kind: z.ZodLiteral<"milestone">;
274
+ currency: z.ZodString;
275
+ milestones: z.ZodArray<z.ZodObject<{
276
+ slug: z.ZodString;
277
+ description: z.ZodOptional<z.ZodString>;
278
+ amount: z.ZodNumber;
279
+ dueAt: z.ZodOptional<z.ZodString>;
280
+ }, z.core.$strip>>;
281
+ }, z.core.$strip>, z.ZodObject<{
282
+ kind: z.ZodLiteral<"value">;
283
+ currency: z.ZodString;
284
+ formula: z.ZodString;
285
+ baseFee: z.ZodOptional<z.ZodNumber>;
286
+ capAmount: z.ZodOptional<z.ZodNumber>;
287
+ }, z.core.$strip>, z.ZodObject<{
288
+ kind: z.ZodLiteral<"usage_metered">;
289
+ currency: z.ZodString;
290
+ unit: z.ZodString;
291
+ ratePerUnit: z.ZodNumber;
292
+ includedUnits: z.ZodOptional<z.ZodNumber>;
293
+ externalMeterId: z.ZodOptional<z.ZodString>;
294
+ }, z.core.$strip>], "kind">;
295
+ type PricingDetails = z.infer<typeof pricingDetailsSchema>;
296
+ declare const pricingModelFrontmatterSchema: z.ZodObject<{
297
+ details: z.ZodDiscriminatedUnion<[z.ZodObject<{
298
+ kind: z.ZodLiteral<"fixed">;
299
+ amount: z.ZodNumber;
300
+ currency: z.ZodString;
301
+ }, z.core.$strip>, z.ZodObject<{
302
+ kind: z.ZodLiteral<"hourly">;
303
+ rate: z.ZodNumber;
304
+ currency: z.ZodString;
305
+ capHours: z.ZodOptional<z.ZodNumber>;
306
+ }, z.core.$strip>, z.ZodObject<{
307
+ kind: z.ZodLiteral<"retainer">;
308
+ amount: z.ZodNumber;
309
+ currency: z.ZodString;
310
+ period: z.ZodString;
311
+ minCommitment: z.ZodOptional<z.ZodString>;
312
+ }, z.core.$strip>, z.ZodObject<{
313
+ kind: z.ZodLiteral<"milestone">;
314
+ currency: z.ZodString;
315
+ milestones: z.ZodArray<z.ZodObject<{
316
+ slug: z.ZodString;
317
+ description: z.ZodOptional<z.ZodString>;
318
+ amount: z.ZodNumber;
319
+ dueAt: z.ZodOptional<z.ZodString>;
320
+ }, z.core.$strip>>;
321
+ }, z.core.$strip>, z.ZodObject<{
322
+ kind: z.ZodLiteral<"value">;
323
+ currency: z.ZodString;
324
+ formula: z.ZodString;
325
+ baseFee: z.ZodOptional<z.ZodNumber>;
326
+ capAmount: z.ZodOptional<z.ZodNumber>;
327
+ }, z.core.$strip>, z.ZodObject<{
328
+ kind: z.ZodLiteral<"usage_metered">;
329
+ currency: z.ZodString;
330
+ unit: z.ZodString;
331
+ ratePerUnit: z.ZodNumber;
332
+ includedUnits: z.ZodOptional<z.ZodNumber>;
333
+ externalMeterId: z.ZodOptional<z.ZodString>;
334
+ }, z.core.$strip>], "kind">;
335
+ taxIncluded: z.ZodOptional<z.ZodBoolean>;
336
+ schema: z.ZodLiteral<"agentagencies/v1">;
337
+ doctype: z.ZodLiteral<"pricing-model">;
338
+ slug: z.ZodString;
339
+ name: z.ZodString;
340
+ description: z.ZodOptional<z.ZodString>;
341
+ version: z.ZodOptional<z.ZodString>;
342
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
343
+ }, z.core.$strip>;
344
+ type PricingModelFrontmatter = z.infer<typeof pricingModelFrontmatterSchema>;
345
+ interface PricingModel {
346
+ frontmatter: PricingModelFrontmatter;
347
+ body: string;
348
+ }
349
+ declare const PRICING_MODEL_FILENAME: "PRICING-MODEL.md";
350
+
351
+ /**
352
+ * agentagencies/v1 — `COUNTERPARTY.md` doctype.
353
+ *
354
+ * External party (client) — display name, primary channels, country/currency/timezone,
355
+ * references to encrypted PII blob, mergedIntoId for dedup.
356
+ *
357
+ * Counterparties are NOT users / operators / agents. They live outside the
358
+ * platform; all interactions are via channels (email, WhatsApp, SMS).
359
+ */
360
+ declare const COUNTERPARTY_KIND: readonly ["individual", "organization"];
361
+ declare const counterpartyKindSchema: z.ZodEnum<{
362
+ individual: "individual";
363
+ organization: "organization";
364
+ }>;
365
+ declare const COUNTERPARTY_SOURCE: readonly ["manual", "inbound_email", "imported", "api"];
366
+ declare const counterpartySourceSchema: z.ZodEnum<{
367
+ manual: "manual";
368
+ inbound_email: "inbound_email";
369
+ imported: "imported";
370
+ api: "api";
371
+ }>;
372
+ declare const counterpartyFrontmatterSchema: z.ZodObject<{
373
+ kind: z.ZodEnum<{
374
+ individual: "individual";
375
+ organization: "organization";
376
+ }>;
377
+ displayName: z.ZodString;
378
+ primaryEmail: z.ZodOptional<z.ZodEmail>;
379
+ primaryPhone: z.ZodOptional<z.ZodString>;
380
+ channels: z.ZodDefault<z.ZodArray<z.ZodObject<{
381
+ kind: z.ZodEnum<{
382
+ email: "email";
383
+ whatsapp: "whatsapp";
384
+ sms: "sms";
385
+ }>;
386
+ address: z.ZodString;
387
+ isPrimary: z.ZodDefault<z.ZodBoolean>;
388
+ verifiedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
389
+ optInAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
390
+ optOutAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
391
+ optOutReason: z.ZodOptional<z.ZodString>;
392
+ bouncedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
393
+ bounceReason: z.ZodOptional<z.ZodString>;
394
+ }, z.core.$strip>>>;
395
+ country: z.ZodOptional<z.ZodString>;
396
+ currency: z.ZodOptional<z.ZodString>;
397
+ timezone: z.ZodOptional<z.ZodString>;
398
+ source: z.ZodDefault<z.ZodEnum<{
399
+ manual: "manual";
400
+ inbound_email: "inbound_email";
401
+ imported: "imported";
402
+ api: "api";
403
+ }>>;
404
+ piiBlobRef: z.ZodOptional<z.ZodString>;
405
+ mergedIntoId: z.ZodOptional<z.ZodString>;
406
+ tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
407
+ schema: z.ZodLiteral<"agentagencies/v1">;
408
+ doctype: z.ZodLiteral<"counterparty">;
409
+ slug: z.ZodString;
410
+ name: z.ZodString;
411
+ description: z.ZodOptional<z.ZodString>;
412
+ version: z.ZodOptional<z.ZodString>;
413
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
414
+ }, z.core.$strip>;
415
+ type CounterpartyFrontmatter = z.infer<typeof counterpartyFrontmatterSchema>;
416
+ interface Counterparty {
417
+ frontmatter: CounterpartyFrontmatter;
418
+ body: string;
419
+ }
420
+ declare const COUNTERPARTY_FILENAME: "COUNTERPARTY.md";
421
+
422
+ /**
423
+ * agentagencies/v1 — `ENGAGEMENT.md` doctype.
424
+ *
425
+ * Commercial instance of a service for a counterparty. Aggregates the work
426
+ * (PROJECT.md), the contract (AGREEMENT.md), the deliverables, the invoices,
427
+ * and the active procedure being executed.
428
+ *
429
+ * Lifecycle = the workflow's current step. ENGAGEMENT.md `status` is a
430
+ * denormalization for filesystem-scan filtering, NOT the source of truth.
431
+ */
432
+ declare const ENGAGEMENT_KIND: readonly ["one_shot", "milestone", "retainer", "usage_metered"];
433
+ declare const engagementKindSchema: z.ZodEnum<{
434
+ retainer: "retainer";
435
+ milestone: "milestone";
436
+ usage_metered: "usage_metered";
437
+ one_shot: "one_shot";
438
+ }>;
439
+ type EngagementKind = z.infer<typeof engagementKindSchema>;
440
+ /**
441
+ * Wide engagement status enum for denormalized filesystem-scan filtering.
442
+ * The authoritative state is the workflow's current step.
443
+ */
444
+ declare const ENGAGEMENT_STATUS: readonly ["scoping", "quoted", "signed", "in_progress", "review_requested", "revision", "validated", "invoiced", "paid", "closed", "cancelled", "disputed"];
445
+ declare const engagementStatusSchema: z.ZodEnum<{
446
+ scoping: "scoping";
447
+ quoted: "quoted";
448
+ signed: "signed";
449
+ in_progress: "in_progress";
450
+ review_requested: "review_requested";
451
+ revision: "revision";
452
+ validated: "validated";
453
+ invoiced: "invoiced";
454
+ paid: "paid";
455
+ closed: "closed";
456
+ cancelled: "cancelled";
457
+ disputed: "disputed";
458
+ }>;
459
+ type EngagementStatus = z.infer<typeof engagementStatusSchema>;
460
+ declare const engagementFrontmatterSchema: z.ZodObject<{
461
+ kind: z.ZodEnum<{
462
+ retainer: "retainer";
463
+ milestone: "milestone";
464
+ usage_metered: "usage_metered";
465
+ one_shot: "one_shot";
466
+ }>;
467
+ status: z.ZodEnum<{
468
+ scoping: "scoping";
469
+ quoted: "quoted";
470
+ signed: "signed";
471
+ in_progress: "in_progress";
472
+ review_requested: "review_requested";
473
+ revision: "revision";
474
+ validated: "validated";
475
+ invoiced: "invoiced";
476
+ paid: "paid";
477
+ closed: "closed";
478
+ cancelled: "cancelled";
479
+ disputed: "disputed";
480
+ }>;
481
+ parties: z.ZodArray<z.ZodObject<{
482
+ role: z.ZodString;
483
+ party: z.ZodString;
484
+ share: z.ZodOptional<z.ZodNumber>;
485
+ }, z.core.$strip>>;
486
+ primaryCounterpartyId: z.ZodString;
487
+ serviceSlug: z.ZodOptional<z.ZodString>;
488
+ activeProcedure: z.ZodOptional<z.ZodString>;
489
+ activeStep: z.ZodOptional<z.ZodString>;
490
+ agreementPath: z.ZodDefault<z.ZodString>;
491
+ projectPath: z.ZodOptional<z.ZodString>;
492
+ pricingModelSlug: z.ZodOptional<z.ZodString>;
493
+ totalContractValue: z.ZodOptional<z.ZodNumber>;
494
+ currency: z.ZodOptional<z.ZodString>;
495
+ referredByAffiliateId: z.ZodOptional<z.ZodString>;
496
+ scopedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
497
+ signedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
498
+ startedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
499
+ validatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
500
+ paidAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
501
+ closedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
502
+ schema: z.ZodLiteral<"agentagencies/v1">;
503
+ doctype: z.ZodLiteral<"engagement">;
504
+ slug: z.ZodString;
505
+ name: z.ZodString;
506
+ description: z.ZodOptional<z.ZodString>;
507
+ version: z.ZodOptional<z.ZodString>;
508
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
509
+ }, z.core.$strip>;
510
+ type EngagementFrontmatter = z.infer<typeof engagementFrontmatterSchema>;
511
+ interface Engagement {
512
+ frontmatter: EngagementFrontmatter;
513
+ body: string;
514
+ }
515
+ declare const ENGAGEMENT_FILENAME: "ENGAGEMENT.md";
516
+
517
+ /**
518
+ * agentagencies/v1 — `AGREEMENT.md` doctype.
519
+ *
520
+ * Contract for an engagement. Carries parties, line items, payment terms,
521
+ * deliverable spec, governing law, and a `requiredSignatures` field that
522
+ * defers to agentgovernance/v1.
523
+ *
524
+ * Once `status === "signed"`, the artifact is effectively immutable — the
525
+ * runtime layer enforces this via "create new version, supersede" semantics.
526
+ */
527
+ declare const AGREEMENT_KIND: readonly ["quote", "agreement"];
528
+ declare const agreementKindSchema: z.ZodEnum<{
529
+ quote: "quote";
530
+ agreement: "agreement";
531
+ }>;
532
+ type AgreementKind = z.infer<typeof agreementKindSchema>;
533
+ declare const AGREEMENT_STATUS: readonly ["draft", "proposed", "signed", "superseded", "expired", "void", "cancelled"];
534
+ declare const agreementStatusSchema: z.ZodEnum<{
535
+ void: "void";
536
+ signed: "signed";
537
+ cancelled: "cancelled";
538
+ draft: "draft";
539
+ proposed: "proposed";
540
+ superseded: "superseded";
541
+ expired: "expired";
542
+ }>;
543
+ type AgreementStatus = z.infer<typeof agreementStatusSchema>;
544
+ declare const agreementFrontmatterSchema: z.ZodObject<{
545
+ kind: z.ZodEnum<{
546
+ quote: "quote";
547
+ agreement: "agreement";
548
+ }>;
549
+ status: z.ZodDefault<z.ZodEnum<{
550
+ void: "void";
551
+ signed: "signed";
552
+ cancelled: "cancelled";
553
+ draft: "draft";
554
+ proposed: "proposed";
555
+ superseded: "superseded";
556
+ expired: "expired";
557
+ }>>;
558
+ parties: z.ZodArray<z.ZodObject<{
559
+ role: z.ZodString;
560
+ party: z.ZodString;
561
+ share: z.ZodOptional<z.ZodNumber>;
562
+ }, z.core.$strip>>;
563
+ primaryCounterpartyId: z.ZodString;
564
+ lineItems: z.ZodDefault<z.ZodArray<z.ZodObject<{
565
+ lineItemId: z.ZodUUID;
566
+ description: z.ZodString;
567
+ quantity: z.ZodDefault<z.ZodNumber>;
568
+ unitAmount: z.ZodNumber;
569
+ currency: z.ZodString;
570
+ paymentTrigger: z.ZodOptional<z.ZodString>;
571
+ }, z.core.$strip>>>;
572
+ currency: z.ZodString;
573
+ totalAmount: z.ZodOptional<z.ZodNumber>;
574
+ paymentTerms: z.ZodDefault<z.ZodObject<{
575
+ netDuration: z.ZodDefault<z.ZodString>;
576
+ schedule: z.ZodDefault<z.ZodEnum<{
577
+ custom: "custom";
578
+ retainer: "retainer";
579
+ milestone: "milestone";
580
+ at_signature: "at_signature";
581
+ on_completion: "on_completion";
582
+ }>>;
583
+ latePolicy: z.ZodOptional<z.ZodString>;
584
+ }, z.core.$strip>>;
585
+ deliverableSpec: z.ZodOptional<z.ZodUnknown>;
586
+ requiredSignatures: z.ZodDefault<z.ZodArray<z.ZodObject<{
587
+ signer: z.ZodString;
588
+ method: z.ZodEnum<{
589
+ typed_name: "typed_name";
590
+ agent_confirm: "agent_confirm";
591
+ click_through: "click_through";
592
+ esign_external: "esign_external";
593
+ }>;
594
+ weight: z.ZodOptional<z.ZodNumber>;
595
+ }, z.core.$strip>>>;
596
+ governingLaw: z.ZodOptional<z.ZodString>;
597
+ jurisdiction: z.ZodOptional<z.ZodString>;
598
+ documentHash: z.ZodOptional<z.ZodString>;
599
+ documentBlobRef: z.ZodOptional<z.ZodString>;
600
+ version: z.ZodDefault<z.ZodString>;
601
+ parentAgreement: z.ZodOptional<z.ZodString>;
602
+ effectiveAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
603
+ expiresAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
604
+ signedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
605
+ schema: z.ZodLiteral<"agentagencies/v1">;
606
+ doctype: z.ZodLiteral<"agreement">;
607
+ slug: z.ZodString;
608
+ name: z.ZodString;
609
+ description: z.ZodOptional<z.ZodString>;
610
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
611
+ }, z.core.$strip>;
612
+ type AgreementFrontmatter = z.infer<typeof agreementFrontmatterSchema>;
613
+ interface Agreement {
614
+ frontmatter: AgreementFrontmatter;
615
+ body: string;
616
+ }
617
+ declare const AGREEMENT_FILENAME: "AGREEMENT.md";
618
+
619
+ /**
620
+ * agentagencies/v1 — `DELIVERABLE.md` doctype.
621
+ *
622
+ * Submitted work product. Extends companies.sh `TASK.md` semantics with
623
+ * attachments and deferment to agentgovernance/v1 for client validation
624
+ * (typically `requiredSignatures: [counterparty:<id>]`).
625
+ */
626
+ declare const DELIVERABLE_STATUS: readonly ["draft", "submitted", "under_review", "validated", "rejected", "revised", "superseded"];
627
+ declare const deliverableStatusSchema: z.ZodEnum<{
628
+ validated: "validated";
629
+ draft: "draft";
630
+ superseded: "superseded";
631
+ submitted: "submitted";
632
+ under_review: "under_review";
633
+ rejected: "rejected";
634
+ revised: "revised";
635
+ }>;
636
+ type DeliverableStatus = z.infer<typeof deliverableStatusSchema>;
637
+ declare const deliverableFrontmatterSchema: z.ZodObject<{
638
+ status: z.ZodDefault<z.ZodEnum<{
639
+ validated: "validated";
640
+ draft: "draft";
641
+ superseded: "superseded";
642
+ submitted: "submitted";
643
+ under_review: "under_review";
644
+ rejected: "rejected";
645
+ revised: "revised";
646
+ }>>;
647
+ taskPath: z.ZodOptional<z.ZodString>;
648
+ attachments: z.ZodDefault<z.ZodArray<z.ZodObject<{
649
+ path: z.ZodString;
650
+ contentHash: z.ZodOptional<z.ZodString>;
651
+ kind: z.ZodOptional<z.ZodString>;
652
+ }, z.core.$strip>>>;
653
+ requiredSignatures: z.ZodDefault<z.ZodArray<z.ZodObject<{
654
+ signer: z.ZodString;
655
+ method: z.ZodEnum<{
656
+ typed_name: "typed_name";
657
+ agent_confirm: "agent_confirm";
658
+ click_through: "click_through";
659
+ esign_external: "esign_external";
660
+ }>;
661
+ weight: z.ZodOptional<z.ZodNumber>;
662
+ }, z.core.$strip>>>;
663
+ documentHash: z.ZodOptional<z.ZodString>;
664
+ parentDeliverable: z.ZodOptional<z.ZodString>;
665
+ version: z.ZodDefault<z.ZodString>;
666
+ submittedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
667
+ validatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
668
+ rejectedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
669
+ rejectionReason: z.ZodOptional<z.ZodString>;
670
+ schema: z.ZodLiteral<"agentagencies/v1">;
671
+ doctype: z.ZodLiteral<"deliverable">;
672
+ slug: z.ZodString;
673
+ name: z.ZodString;
674
+ description: z.ZodOptional<z.ZodString>;
675
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
676
+ }, z.core.$strip>;
677
+ type DeliverableFrontmatter = z.infer<typeof deliverableFrontmatterSchema>;
678
+ interface Deliverable {
679
+ frontmatter: DeliverableFrontmatter;
680
+ body: string;
681
+ }
682
+ declare const DELIVERABLE_FILENAME: "DELIVERABLE.md";
683
+
684
+ /**
685
+ * agentagencies/v1 — `INVOICE.md` doctype.
686
+ *
687
+ * Invoice issued to a counterparty. Carries line items, tax lines, totals,
688
+ * FX (when invoice currency differs from billing-account base), payment status,
689
+ * and `externalRefs.<provider>` for payment provider linkage (Stripe checkout
690
+ * sessions, payment intents, etc.).
691
+ *
692
+ * Invoice numbering is per-tenant gapless (driven by `_state/invoice-sequence.json`
693
+ * file-lock pattern in the runtime layer; format like `INV-YYYY-NNNNN`).
694
+ */
695
+ declare const INVOICE_STATUS: readonly ["draft", "issued", "paid", "void", "uncollectible"];
696
+ declare const invoiceStatusSchema: z.ZodEnum<{
697
+ void: "void";
698
+ paid: "paid";
699
+ draft: "draft";
700
+ issued: "issued";
701
+ uncollectible: "uncollectible";
702
+ }>;
703
+ type InvoiceStatus = z.infer<typeof invoiceStatusSchema>;
704
+ declare const invoiceFrontmatterSchema: z.ZodObject<{
705
+ status: z.ZodDefault<z.ZodEnum<{
706
+ void: "void";
707
+ paid: "paid";
708
+ draft: "draft";
709
+ issued: "issued";
710
+ uncollectible: "uncollectible";
711
+ }>>;
712
+ invoiceNumber: z.ZodString;
713
+ engagementSlug: z.ZodOptional<z.ZodString>;
714
+ agreementSlug: z.ZodOptional<z.ZodString>;
715
+ counterpartyId: z.ZodString;
716
+ billingAccountId: z.ZodOptional<z.ZodString>;
717
+ lineItems: z.ZodArray<z.ZodObject<{
718
+ lineItemId: z.ZodUUID;
719
+ description: z.ZodString;
720
+ quantity: z.ZodDefault<z.ZodNumber>;
721
+ unitAmount: z.ZodNumber;
722
+ sourceRef: z.ZodOptional<z.ZodString>;
723
+ }, z.core.$strip>>;
724
+ taxLines: z.ZodDefault<z.ZodArray<z.ZodObject<{
725
+ rate: z.ZodNumber;
726
+ base: z.ZodNumber;
727
+ amount: z.ZodNumber;
728
+ jurisdiction: z.ZodString;
729
+ }, z.core.$strip>>>;
730
+ subtotal: z.ZodNumber;
731
+ taxTotal: z.ZodDefault<z.ZodNumber>;
732
+ total: z.ZodNumber;
733
+ currency: z.ZodString;
734
+ fxRate: z.ZodOptional<z.ZodNumber>;
735
+ fxBaseCurrency: z.ZodOptional<z.ZodString>;
736
+ fxAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
737
+ dueAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
738
+ issuedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
739
+ paidAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
740
+ voidedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
741
+ voidReason: z.ZodOptional<z.ZodString>;
742
+ pdfBlobRef: z.ZodOptional<z.ZodString>;
743
+ pdfHash: z.ZodOptional<z.ZodString>;
744
+ externalRefs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>>;
745
+ paymentLinkUrl: z.ZodOptional<z.ZodString>;
746
+ dunningState: z.ZodDefault<z.ZodEnum<{
747
+ none: "none";
748
+ reminder_1: "reminder_1";
749
+ reminder_2: "reminder_2";
750
+ final_notice: "final_notice";
751
+ collections: "collections";
752
+ }>>;
753
+ nextReminderAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
754
+ schema: z.ZodLiteral<"agentagencies/v1">;
755
+ doctype: z.ZodLiteral<"invoice">;
756
+ slug: z.ZodString;
757
+ name: z.ZodString;
758
+ description: z.ZodOptional<z.ZodString>;
759
+ version: z.ZodOptional<z.ZodString>;
760
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
761
+ }, z.core.$strip>;
762
+ type InvoiceFrontmatter = z.infer<typeof invoiceFrontmatterSchema>;
763
+ interface Invoice {
764
+ frontmatter: InvoiceFrontmatter;
765
+ body: string;
766
+ }
767
+ declare const INVOICE_FILENAME: "INVOICE.md";
768
+
769
+ declare const routineTriggerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
770
+ kind: z.ZodLiteral<"schedule">;
771
+ cronExpression: z.ZodString;
772
+ timezone: z.ZodOptional<z.ZodString>;
773
+ }, z.core.$strip>, z.ZodObject<{
774
+ kind: z.ZodLiteral<"event">;
775
+ eventType: z.ZodString;
776
+ }, z.core.$strip>, z.ZodObject<{
777
+ kind: z.ZodLiteral<"webhook">;
778
+ webhookSlug: z.ZodString;
779
+ }, z.core.$strip>], "kind">;
780
+ type RoutineTrigger = z.infer<typeof routineTriggerSchema>;
781
+ declare const routineFrontmatterSchema: z.ZodObject<{
782
+ runs: z.ZodString;
783
+ trigger: z.ZodDiscriminatedUnion<[z.ZodObject<{
784
+ kind: z.ZodLiteral<"schedule">;
785
+ cronExpression: z.ZodString;
786
+ timezone: z.ZodOptional<z.ZodString>;
787
+ }, z.core.$strip>, z.ZodObject<{
788
+ kind: z.ZodLiteral<"event">;
789
+ eventType: z.ZodString;
790
+ }, z.core.$strip>, z.ZodObject<{
791
+ kind: z.ZodLiteral<"webhook">;
792
+ webhookSlug: z.ZodString;
793
+ }, z.core.$strip>], "kind">;
794
+ conditions: z.ZodDefault<z.ZodArray<z.ZodObject<{
795
+ expression: z.ZodOptional<z.ZodString>;
796
+ engagementStatus: z.ZodOptional<z.ZodString>;
797
+ maxPerPeriod: z.ZodOptional<z.ZodObject<{
798
+ count: z.ZodNumber;
799
+ period: z.ZodString;
800
+ }, z.core.$strip>>;
801
+ }, z.core.$strip>>>;
802
+ escalation: z.ZodOptional<z.ZodObject<{
803
+ ifPendingAfter: z.ZodString;
804
+ escalateTo: z.ZodArray<z.ZodString>;
805
+ }, z.core.$strip>>;
806
+ enabled: z.ZodDefault<z.ZodBoolean>;
807
+ schema: z.ZodLiteral<"agentagencies/v1">;
808
+ doctype: z.ZodLiteral<"routine">;
809
+ slug: z.ZodString;
810
+ name: z.ZodString;
811
+ description: z.ZodOptional<z.ZodString>;
812
+ version: z.ZodOptional<z.ZodString>;
813
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
814
+ }, z.core.$strip>;
815
+ type RoutineFrontmatter = z.infer<typeof routineFrontmatterSchema>;
816
+ interface Routine {
817
+ frontmatter: RoutineFrontmatter;
818
+ body: string;
819
+ }
820
+ declare const ROUTINE_FILENAME: "ROUTINE.md";
821
+
822
+ declare const capacityFrontmatterSchema: z.ZodObject<{
823
+ for: z.ZodString;
824
+ availability: z.ZodDefault<z.ZodArray<z.ZodObject<{
825
+ weekday: z.ZodUnion<readonly [z.ZodNumber, z.ZodEnum<{
826
+ mon: "mon";
827
+ tue: "tue";
828
+ wed: "wed";
829
+ thu: "thu";
830
+ fri: "fri";
831
+ sat: "sat";
832
+ sun: "sun";
833
+ }>]>;
834
+ start: z.ZodString;
835
+ end: z.ZodString;
836
+ }, z.core.$strip>>>;
837
+ maxConcurrentEngagements: z.ZodOptional<z.ZodNumber>;
838
+ maxBillableHoursPerWeek: z.ZodOptional<z.ZodNumber>;
839
+ specializations: z.ZodDefault<z.ZodArray<z.ZodString>>;
840
+ currentEngagementCount: z.ZodOptional<z.ZodNumber>;
841
+ currentBillableHoursThisWeek: z.ZodOptional<z.ZodNumber>;
842
+ blockedWindows: z.ZodDefault<z.ZodArray<z.ZodObject<{
843
+ from: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>;
844
+ until: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>;
845
+ reason: z.ZodOptional<z.ZodString>;
846
+ }, z.core.$strip>>>;
847
+ schema: z.ZodLiteral<"agentagencies/v1">;
848
+ doctype: z.ZodLiteral<"capacity">;
849
+ slug: z.ZodString;
850
+ name: z.ZodString;
851
+ description: z.ZodOptional<z.ZodString>;
852
+ version: z.ZodOptional<z.ZodString>;
853
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
854
+ }, z.core.$strip>;
855
+ type CapacityFrontmatter = z.infer<typeof capacityFrontmatterSchema>;
856
+ interface Capacity {
857
+ frontmatter: CapacityFrontmatter;
858
+ body: string;
859
+ }
860
+ declare const CAPACITY_FILENAME: "CAPACITY.md";
861
+
862
+ export { type RoutineFrontmatter as $, AGENCY_FILENAME as A, type EngagementKind as B, CAPACITY_FILENAME as C, DELIVERABLE_FILENAME as D, ENGAGEMENT_FILENAME as E, type EngagementStatus as F, INVOICE_STATUS as G, type Invoice as H, INVOICE_FILENAME as I, type InvoiceFrontmatter as J, type InvoiceStatus as K, type Operations as L, type OperationsFrontmatter as M, PRICING_MODEL_FILENAME as N, OPERATIONS_FILENAME as O, PRICING_KIND as P, PROCEDURE_FILENAME as Q, type PricingDetails as R, type PricingKind as S, type PricingModel as T, type PricingModelFrontmatter as U, type Procedure as V, type ProcedureFrontmatter as W, type ProcedureStep as X, type ProcedureTrigger as Y, ROUTINE_FILENAME as Z, type Routine as _, AGREEMENT_FILENAME as a, type RoutineTrigger as a0, SERVICE_FILENAME as a1, type Service as a2, type ServiceFrontmatter as a3, agencyFrontmatterSchema as a4, agreementFrontmatterSchema as a5, agreementKindSchema as a6, agreementStatusSchema as a7, autonomyPostureSchema as a8, capacityFrontmatterSchema as a9, counterpartyFrontmatterSchema as aa, counterpartyKindSchema as ab, counterpartySourceSchema as ac, deliverableFrontmatterSchema as ad, deliverableStatusSchema as ae, engagementFrontmatterSchema as af, engagementKindSchema as ag, engagementStatusSchema as ah, invoiceFrontmatterSchema as ai, invoiceStatusSchema as aj, operationsFrontmatterSchema as ak, pricingDetailsSchema as al, pricingKindSchema as am, pricingModelFrontmatterSchema as an, procedureBranchStepSchema as ao, procedureFrontmatterSchema as ap, procedureSimpleStepSchema as aq, procedureStepSchema as ar, procedureTriggerSchema as as, routineFrontmatterSchema as at, routineTriggerSchema as au, serviceFrontmatterSchema as av, AGREEMENT_KIND as b, AGREEMENT_STATUS as c, AUTONOMY_POSTURE as d, type Agency as e, type AgencyFrontmatter as f, type Agreement as g, type AgreementFrontmatter as h, type AgreementKind as i, type AgreementStatus as j, type AutonomyPosture as k, COUNTERPARTY_FILENAME as l, COUNTERPARTY_KIND as m, COUNTERPARTY_SOURCE as n, type Capacity as o, type CapacityFrontmatter as p, type Counterparty as q, type CounterpartyFrontmatter as r, DELIVERABLE_STATUS as s, type Deliverable as t, type DeliverableFrontmatter as u, type DeliverableStatus as v, ENGAGEMENT_KIND as w, ENGAGEMENT_STATUS as x, type Engagement as y, type EngagementFrontmatter as z };