@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.
- package/AGENTAGENCIES.md +39 -0
- package/LICENSE +21 -0
- package/README.md +90 -0
- package/dist/capacity-98VwY285.d.ts +862 -0
- package/dist/chunk-DYQ4A5HV.mjs +649 -0
- package/dist/chunk-DYQ4A5HV.mjs.map +1 -0
- package/dist/chunk-GAJQ5ZC2.mjs +149 -0
- package/dist/chunk-GAJQ5ZC2.mjs.map +1 -0
- package/dist/chunk-SOJ4GQR7.mjs +3 -0
- package/dist/chunk-SOJ4GQR7.mjs.map +1 -0
- package/dist/composition/index.d.ts +61 -0
- package/dist/composition/index.mjs +75 -0
- package/dist/composition/index.mjs.map +1 -0
- package/dist/doctypes/index.d.ts +61 -0
- package/dist/doctypes/index.mjs +4 -0
- package/dist/doctypes/index.mjs.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.mjs +17 -0
- package/dist/index.mjs.map +1 -0
- package/dist/renderers/index.d.ts +288 -0
- package/dist/renderers/index.mjs +321 -0
- package/dist/renderers/index.mjs.map +1 -0
- package/dist/validators/index.d.ts +70 -0
- package/dist/validators/index.mjs +4 -0
- package/dist/validators/index.mjs.map +1 -0
- package/package.json +94 -0
- package/src/spec/canvakit-templates/agency.agency-overview/template.canvakit.html +173 -0
- package/src/spec/canvakit-templates/agency.agency-profile/template.canvakit.html +121 -0
- package/src/spec/canvakit-templates/agency.agreement-signing/template.canvakit.html +164 -0
- package/src/spec/canvakit-templates/agency.deliverable-review/template.canvakit.html +148 -0
- package/src/spec/canvakit-templates/agency.engagement-dashboard/template.canvakit.html +191 -0
- package/src/spec/canvakit-templates/agency.invoice-pdf/template.canvakit.html +142 -0
- package/src/spec/canvakit-templates/agency.procedure-card/template.canvakit.html +93 -0
- package/src/spec/snippets/agency-overview-rollup/procedures/compute-agency-overview/PROCEDURE.md +88 -0
- package/src/spec/snippets/agency-overview-rollup/routines/agency-overview-rollup/ROUTINE.md +58 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import './chunk-SOJ4GQR7.mjs';
|
|
2
|
+
export { checkAgenciesConsistency, validateAgency, validateAgreement, validateCapacity, validateCounterparty, validateDeliverable, validateEngagement, validateInvoice, validateOperations, validatePricingModel, validateProcedure, validateRoutine, validateService } from './chunk-GAJQ5ZC2.mjs';
|
|
3
|
+
export { AGENCY_FILENAME, AGREEMENT_FILENAME, AGREEMENT_KIND, AGREEMENT_STATUS, AUTONOMY_POSTURE, CAPACITY_FILENAME, COUNTERPARTY_FILENAME, COUNTERPARTY_KIND, COUNTERPARTY_SOURCE, DELIVERABLE_FILENAME, DELIVERABLE_STATUS, ENGAGEMENT_FILENAME, ENGAGEMENT_KIND, ENGAGEMENT_STATUS, INVOICE_FILENAME, INVOICE_STATUS, OPERATIONS_FILENAME, PRICING_KIND, PRICING_MODEL_FILENAME, PROCEDURE_FILENAME, ROUTINE_FILENAME, SCHEMA_NAME, SERVICE_FILENAME, agencyFrontmatterSchema, agreementFrontmatterSchema, agreementKindSchema, agreementStatusSchema, authorshipFields, autonomyPostureSchema, capacityFrontmatterSchema, counterpartyFrontmatterSchema, counterpartyKindSchema, counterpartySourceSchema, countryIsoSchema, currencyIsoSchema, deliverableFrontmatterSchema, deliverableStatusSchema, engagementFrontmatterSchema, engagementKindSchema, engagementStatusSchema, envelope, invoiceFrontmatterSchema, invoiceStatusSchema, isoDateOrDateSchema, isoDatetimeOrDateSchema, isoDurationSchema, kebabSlugSchema, metadataSchema, operationsFrontmatterSchema, partyRefSchema, partyRefStrictSchema, pricingDetailsSchema, pricingKindSchema, pricingModelFrontmatterSchema, procedureBranchStepSchema, procedureFrontmatterSchema, procedureSimpleStepSchema, procedureStepSchema, procedureTriggerSchema, routineFrontmatterSchema, routineTriggerSchema, serviceFrontmatterSchema, sha256HexSchema, timezoneSchema, workspacePathSchema } from './chunk-DYQ4A5HV.mjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @agentproto/agencies v0.1.0-alpha
|
|
7
|
+
* agentagencies/v1 — operating layer for entities that exercise agency.
|
|
8
|
+
* Vendor-neutral. Filesystem-first. Extends agentcompanies/v1 + agentgovernance/v1.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
// src/index.ts
|
|
12
|
+
var SPEC_NAME = "agentagencies/v1";
|
|
13
|
+
var SPEC_VERSION = "1.0.0-alpha";
|
|
14
|
+
|
|
15
|
+
export { SPEC_NAME, SPEC_VERSION };
|
|
16
|
+
//# sourceMappingURL=index.mjs.map
|
|
17
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAwBO,IAAM,SAAA,GAAY;AAClB,IAAM,YAAA,GAAe","file":"index.mjs","sourcesContent":["/**\n * @agentproto/agencies — agentagencies/v1 spec implementation.\n *\n * Operating layer for entities that exercise *agency* — both in the business\n * sense (service businesses, consultancies, freelancers) and the philosophical\n * sense (any system that acts with intention, autonomy, decision-making).\n *\n * Extends agentcompanies/v1 (org structure) + agentgovernance/v1 (audit + signing)\n * with operations doctypes: AGENCY, OPERATIONS, SERVICE, PROCEDURE, PRICING-MODEL,\n * COUNTERPARTY, ENGAGEMENT, AGREEMENT, DELIVERABLE, INVOICE, ROUTINE, CAPACITY.\n *\n * Subpath exports:\n * - \"./doctypes\" — zod schemas + inferred types for all operations doctypes\n * - \"./validators\" — per-doctype + cross-doctype validators\n * - \"./composition\" — resolver for the 4 composition patterns\n * - \"./renderers\" — canvakit template ids + variable schemas + bundled HTML\n *\n * Reference runtime (workspace walkers like `computeAgencyOverview`,\n * snapshot index helpers, FS-only orchestrators) lives in the sibling package\n * `@agentproto/agencies-engine`. Spec stays pure: zero I/O, zero filesystem deps.\n *\n * Spec doc: ./AGENTAGENCIES.md (canonical, included in npm publish)\n */\n\nexport const SPEC_NAME = \"agentagencies/v1\" as const\nexport const SPEC_VERSION = \"1.0.0-alpha\" as const\n\nexport * from \"./spec/doctypes/index.js\"\nexport * from \"./spec/validators/index.js\"\n"]}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Renderer wrapper for the `agency.engagement-dashboard` canvakit template.
|
|
5
|
+
*
|
|
6
|
+
* The template is a self-contained dashboard that re-reads workspace files on
|
|
7
|
+
* every refresh tick. The host application substitutes `{{engagementSlug}}`
|
|
8
|
+
* in the data-source paths before calling canvakit's resolver — variables
|
|
9
|
+
* here are template-time values, NOT runtime data (which comes from the
|
|
10
|
+
* declared data sources).
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
declare const ENGAGEMENT_DASHBOARD_TEMPLATE_ID: "agency.engagement-dashboard";
|
|
14
|
+
/** Path to the bundled .canvakit.html template (relative to the package root). */
|
|
15
|
+
declare const ENGAGEMENT_DASHBOARD_TEMPLATE_PATH: "src/spec/canvakit-templates/agency.engagement-dashboard/template.canvakit.html";
|
|
16
|
+
declare const engagementDashboardVariablesSchema: z.ZodObject<{
|
|
17
|
+
engagementSlug: z.ZodString;
|
|
18
|
+
agencyName: z.ZodString;
|
|
19
|
+
signUrlBase: z.ZodDefault<z.ZodString>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
type EngagementDashboardVariables = z.infer<typeof engagementDashboardVariablesSchema>;
|
|
22
|
+
declare function engagementDashboardVariables(input: EngagementDashboardVariables): Record<string, string>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Renderer wrapper for the `agency.agency-overview` canvakit template.
|
|
26
|
+
*
|
|
27
|
+
* The overview is a routine-populated rollup. The template's only data
|
|
28
|
+
* source is `_snapshots/agency-overview.json`, written by a procedure that
|
|
29
|
+
* walks the workspace and computes aggregates. The shape of that snapshot
|
|
30
|
+
* is documented here as `AgencyOverviewSnapshot` so writers + readers
|
|
31
|
+
* stay in sync.
|
|
32
|
+
*
|
|
33
|
+
* Why a snapshot rather than live globs:
|
|
34
|
+
* - Counting + summing 50 engagements on every page-view is expensive.
|
|
35
|
+
* - Per-engagement parsing of frontmatter is the bottleneck (no DB index).
|
|
36
|
+
* - Snapshots invert the cost: compute once per cron tick, render cheap.
|
|
37
|
+
*
|
|
38
|
+
* Trade-off: the dashboard shows up-to-`refreshEvery` stale data. The
|
|
39
|
+
* snapshot's `generatedAt` field plus the staleness banner make that
|
|
40
|
+
* visible to the operator.
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
declare const AGENCY_OVERVIEW_TEMPLATE_ID: "agency.agency-overview";
|
|
44
|
+
declare const AGENCY_OVERVIEW_TEMPLATE_PATH: "src/spec/canvakit-templates/agency.agency-overview/template.canvakit.html";
|
|
45
|
+
/** Snapshot shape — the procedure writes `_snapshots/agency-overview.json` matching this. */
|
|
46
|
+
declare const agencyOverviewSnapshotSchema: z.ZodObject<{
|
|
47
|
+
generatedAt: z.ZodString;
|
|
48
|
+
isStale: z.ZodDefault<z.ZodBoolean>;
|
|
49
|
+
activeEngagementsCount: z.ZodNumber;
|
|
50
|
+
activeEngagementsDelta: z.ZodDefault<z.ZodNumber>;
|
|
51
|
+
pipelineValueFormatted: z.ZodString;
|
|
52
|
+
mrrFormatted: z.ZodString;
|
|
53
|
+
pendingSignaturesCount: z.ZodNumber;
|
|
54
|
+
byStatus: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
55
|
+
status: z.ZodString;
|
|
56
|
+
pillClass: z.ZodDefault<z.ZodEnum<{
|
|
57
|
+
"": "";
|
|
58
|
+
ok: "ok";
|
|
59
|
+
warn: "warn";
|
|
60
|
+
danger: "danger";
|
|
61
|
+
muted: "muted";
|
|
62
|
+
}>>;
|
|
63
|
+
count: z.ZodNumber;
|
|
64
|
+
valueFormatted: z.ZodString;
|
|
65
|
+
}, z.core.$strip>>>;
|
|
66
|
+
recentPayments: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
67
|
+
invoiceNumber: z.ZodString;
|
|
68
|
+
counterpartyDisplayName: z.ZodString;
|
|
69
|
+
amountFormatted: z.ZodString;
|
|
70
|
+
paidAt: z.ZodString;
|
|
71
|
+
}, z.core.$strip>>>;
|
|
72
|
+
pendingByEngagement: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
73
|
+
slug: z.ZodString;
|
|
74
|
+
name: z.ZodString;
|
|
75
|
+
requiredSigners: z.ZodString;
|
|
76
|
+
oldestPendingAt: z.ZodString;
|
|
77
|
+
stalenessLabel: z.ZodDefault<z.ZodString>;
|
|
78
|
+
stalenessPillClass: z.ZodDefault<z.ZodEnum<{
|
|
79
|
+
"": "";
|
|
80
|
+
ok: "ok";
|
|
81
|
+
warn: "warn";
|
|
82
|
+
danger: "danger";
|
|
83
|
+
muted: "muted";
|
|
84
|
+
}>>;
|
|
85
|
+
}, z.core.$strip>>>;
|
|
86
|
+
}, z.core.$strip>;
|
|
87
|
+
type AgencyOverviewSnapshot = z.infer<typeof agencyOverviewSnapshotSchema>;
|
|
88
|
+
/** Default freshness threshold (ms): how long a snapshot is considered "fresh". */
|
|
89
|
+
declare const AGENCY_OVERVIEW_FRESHNESS_MS: number;
|
|
90
|
+
/**
|
|
91
|
+
* Compute `isStale` from a snapshot's `generatedAt` timestamp. Pure helper —
|
|
92
|
+
* the writing procedure can call it before persisting, the reader can call
|
|
93
|
+
* it on load to refresh the flag.
|
|
94
|
+
*/
|
|
95
|
+
declare function isAgencyOverviewSnapshotStale(snapshot: {
|
|
96
|
+
generatedAt: string;
|
|
97
|
+
}, thresholdMs?: number, now?: Date): boolean;
|
|
98
|
+
declare const agencyOverviewVariablesSchema: z.ZodObject<{
|
|
99
|
+
agencyName: z.ZodString;
|
|
100
|
+
agencySlug: z.ZodString;
|
|
101
|
+
currency: z.ZodDefault<z.ZodString>;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
type AgencyOverviewVariables = z.infer<typeof agencyOverviewVariablesSchema>;
|
|
104
|
+
declare function agencyOverviewVariables(input: AgencyOverviewVariables): Record<string, string>;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Renderer wrapper for the `agency.invoice-pdf` canvakit template.
|
|
108
|
+
*
|
|
109
|
+
* Unlike the engagement dashboard, this template has no live data sources —
|
|
110
|
+
* the host application reads INVOICE.md (+ ENGAGEMENT.md / AGENCY.md /
|
|
111
|
+
* COUNTERPARTY.md) and passes a flattened variable bag in. The result is
|
|
112
|
+
* print-ready HTML; downstream PDF tooling (Chromium / wkhtmltopdf) renders
|
|
113
|
+
* it. The frozen PDF is archived alongside the .md and signed.
|
|
114
|
+
*/
|
|
115
|
+
|
|
116
|
+
declare const INVOICE_PDF_TEMPLATE_ID: "agency.invoice-pdf";
|
|
117
|
+
declare const INVOICE_PDF_TEMPLATE_PATH: "src/spec/canvakit-templates/agency.invoice-pdf/template.canvakit.html";
|
|
118
|
+
declare const invoicePdfVariablesSchema: z.ZodObject<{
|
|
119
|
+
agencyName: z.ZodString;
|
|
120
|
+
agencyAddressHtml: z.ZodOptional<z.ZodString>;
|
|
121
|
+
agencyTaxId: z.ZodOptional<z.ZodString>;
|
|
122
|
+
invoiceNumber: z.ZodString;
|
|
123
|
+
issuedAt: z.ZodString;
|
|
124
|
+
dueAt: z.ZodString;
|
|
125
|
+
status: z.ZodString;
|
|
126
|
+
counterpartyDisplayName: z.ZodString;
|
|
127
|
+
counterpartyAddressHtml: z.ZodOptional<z.ZodString>;
|
|
128
|
+
counterpartyTaxId: z.ZodOptional<z.ZodString>;
|
|
129
|
+
currency: z.ZodString;
|
|
130
|
+
subtotalFormatted: z.ZodString;
|
|
131
|
+
taxLines: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
132
|
+
label: z.ZodString;
|
|
133
|
+
amountFormatted: z.ZodString;
|
|
134
|
+
}, z.core.$strip>>>;
|
|
135
|
+
totalFormatted: z.ZodString;
|
|
136
|
+
amountDueFormatted: z.ZodString;
|
|
137
|
+
paymentTermsHtml: z.ZodOptional<z.ZodString>;
|
|
138
|
+
notesHtml: z.ZodOptional<z.ZodString>;
|
|
139
|
+
paymentLinkUrl: z.ZodOptional<z.ZodString>;
|
|
140
|
+
lineItems: z.ZodArray<z.ZodObject<{
|
|
141
|
+
description: z.ZodString;
|
|
142
|
+
quantity: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
143
|
+
unitPriceFormatted: z.ZodString;
|
|
144
|
+
totalFormatted: z.ZodString;
|
|
145
|
+
}, z.core.$strip>>;
|
|
146
|
+
}, z.core.$strip>;
|
|
147
|
+
type InvoicePdfVariables = z.infer<typeof invoicePdfVariablesSchema>;
|
|
148
|
+
declare function invoicePdfVariables(input: InvoicePdfVariables): Record<string, unknown>;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Renderer wrapper for the `agency.agreement-signing` canvakit template.
|
|
152
|
+
*
|
|
153
|
+
* Multi-party signing portal for AGREEMENT.md. Differs from
|
|
154
|
+
* governance.signing-portal by rendering the agreement body, line items, and
|
|
155
|
+
* the multi-party signature status alongside the typed-name form.
|
|
156
|
+
*/
|
|
157
|
+
|
|
158
|
+
declare const AGREEMENT_SIGNING_TEMPLATE_ID: "agency.agreement-signing";
|
|
159
|
+
declare const AGREEMENT_SIGNING_TEMPLATE_PATH: "src/spec/canvakit-templates/agency.agreement-signing/template.canvakit.html";
|
|
160
|
+
declare const agreementSigningVariablesSchema: z.ZodObject<{
|
|
161
|
+
agencyName: z.ZodString;
|
|
162
|
+
agreementTitle: z.ZodString;
|
|
163
|
+
agreementPath: z.ZodString;
|
|
164
|
+
agreementBodyHtml: z.ZodOptional<z.ZodString>;
|
|
165
|
+
documentHash: z.ZodString;
|
|
166
|
+
signerKind: z.ZodEnum<{
|
|
167
|
+
operator: "operator";
|
|
168
|
+
user: "user";
|
|
169
|
+
counterparty: "counterparty";
|
|
170
|
+
agent: "agent";
|
|
171
|
+
external: "external";
|
|
172
|
+
}>;
|
|
173
|
+
signerSlug: z.ZodString;
|
|
174
|
+
signerName: z.ZodOptional<z.ZodString>;
|
|
175
|
+
signerEmail: z.ZodOptional<z.ZodEmail>;
|
|
176
|
+
nonce: z.ZodString;
|
|
177
|
+
signUrl: z.ZodString;
|
|
178
|
+
alreadySignedParties: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
179
|
+
label: z.ZodString;
|
|
180
|
+
signedAt: z.ZodOptional<z.ZodString>;
|
|
181
|
+
deadline: z.ZodOptional<z.ZodString>;
|
|
182
|
+
}, z.core.$strip>>>;
|
|
183
|
+
pendingParties: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
184
|
+
label: z.ZodString;
|
|
185
|
+
signedAt: z.ZodOptional<z.ZodString>;
|
|
186
|
+
deadline: z.ZodOptional<z.ZodString>;
|
|
187
|
+
}, z.core.$strip>>>;
|
|
188
|
+
lineItems: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
189
|
+
description: z.ZodString;
|
|
190
|
+
quantity: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
191
|
+
totalFormatted: z.ZodString;
|
|
192
|
+
}, z.core.$strip>>>;
|
|
193
|
+
totalFormatted: z.ZodDefault<z.ZodString>;
|
|
194
|
+
currency: z.ZodDefault<z.ZodString>;
|
|
195
|
+
paymentTermsHtml: z.ZodOptional<z.ZodString>;
|
|
196
|
+
}, z.core.$strip>;
|
|
197
|
+
type AgreementSigningVariables = z.infer<typeof agreementSigningVariablesSchema>;
|
|
198
|
+
declare function agreementSigningVariables(input: AgreementSigningVariables): Record<string, unknown>;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Renderer wrapper for the `agency.deliverable-review` canvakit template.
|
|
202
|
+
*
|
|
203
|
+
* Counterparty validation page — approve (typed-name signature) or request
|
|
204
|
+
* revisions. Approval signs DELIVERABLE.md; revision request appends a
|
|
205
|
+
* feedback comment + flips the engagement workflow back to `revise`.
|
|
206
|
+
*/
|
|
207
|
+
|
|
208
|
+
declare const DELIVERABLE_REVIEW_TEMPLATE_ID: "agency.deliverable-review";
|
|
209
|
+
declare const DELIVERABLE_REVIEW_TEMPLATE_PATH: "src/spec/canvakit-templates/agency.deliverable-review/template.canvakit.html";
|
|
210
|
+
declare const deliverableReviewVariablesSchema: z.ZodObject<{
|
|
211
|
+
agencyName: z.ZodString;
|
|
212
|
+
engagementName: z.ZodOptional<z.ZodString>;
|
|
213
|
+
deliverableTitle: z.ZodString;
|
|
214
|
+
deliverablePath: z.ZodString;
|
|
215
|
+
deliverableBodyHtml: z.ZodOptional<z.ZodString>;
|
|
216
|
+
context: z.ZodOptional<z.ZodString>;
|
|
217
|
+
documentHash: z.ZodString;
|
|
218
|
+
signerKind: z.ZodEnum<{
|
|
219
|
+
operator: "operator";
|
|
220
|
+
user: "user";
|
|
221
|
+
counterparty: "counterparty";
|
|
222
|
+
agent: "agent";
|
|
223
|
+
external: "external";
|
|
224
|
+
}>;
|
|
225
|
+
signerSlug: z.ZodString;
|
|
226
|
+
signerName: z.ZodOptional<z.ZodString>;
|
|
227
|
+
signerEmail: z.ZodOptional<z.ZodEmail>;
|
|
228
|
+
nonce: z.ZodString;
|
|
229
|
+
signUrl: z.ZodString;
|
|
230
|
+
reviseUrl: z.ZodString;
|
|
231
|
+
attachments: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
232
|
+
name: z.ZodString;
|
|
233
|
+
sizeFormatted: z.ZodString;
|
|
234
|
+
kind: z.ZodOptional<z.ZodString>;
|
|
235
|
+
url: z.ZodString;
|
|
236
|
+
icon: z.ZodDefault<z.ZodString>;
|
|
237
|
+
}, z.core.$strip>>>;
|
|
238
|
+
}, z.core.$strip>;
|
|
239
|
+
type DeliverableReviewVariables = z.infer<typeof deliverableReviewVariablesSchema>;
|
|
240
|
+
declare function deliverableReviewVariables(input: DeliverableReviewVariables): Record<string, unknown>;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Renderer wrapper for the `agency.procedure-card` canvakit template.
|
|
244
|
+
*
|
|
245
|
+
* Narrative card view of a PROCEDURE.md — overview + step list. Doubles as
|
|
246
|
+
* an in-product help surface and a public preview on agencies.sh registry
|
|
247
|
+
* pages.
|
|
248
|
+
*
|
|
249
|
+
* The template reads the source PROCEDURE.md via `kind:file` data source.
|
|
250
|
+
* The host can pre-compute step state (`done` / `active` / `pending`) and
|
|
251
|
+
* pass the merged shape under `procedure.steps[].stateClass`.
|
|
252
|
+
*/
|
|
253
|
+
|
|
254
|
+
declare const PROCEDURE_CARD_TEMPLATE_ID: "agency.procedure-card";
|
|
255
|
+
declare const PROCEDURE_CARD_TEMPLATE_PATH: "src/spec/canvakit-templates/agency.procedure-card/template.canvakit.html";
|
|
256
|
+
declare const procedureCardVariablesSchema: z.ZodObject<{
|
|
257
|
+
agencyName: z.ZodOptional<z.ZodString>;
|
|
258
|
+
procedurePath: z.ZodString;
|
|
259
|
+
currentStepId: z.ZodDefault<z.ZodString>;
|
|
260
|
+
}, z.core.$strip>;
|
|
261
|
+
type ProcedureCardVariables = z.infer<typeof procedureCardVariablesSchema>;
|
|
262
|
+
declare function procedureCardVariables(input: ProcedureCardVariables): Record<string, string>;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Renderer wrapper for the `agency.agency-profile` canvakit template.
|
|
266
|
+
*
|
|
267
|
+
* Public-facing profile rendering of AGENCY.md. Reads AGENCY.md plus the
|
|
268
|
+
* services/ and pricing-models/ directories, projects them into a marketing
|
|
269
|
+
* page suitable as `/agency/<slug>` landing or a registry preview.
|
|
270
|
+
*
|
|
271
|
+
* No live tools — pure file + glob. Cacheable via `refreshEvery` set to a
|
|
272
|
+
* long interval; defaults to none (host caches at CDN level).
|
|
273
|
+
*/
|
|
274
|
+
|
|
275
|
+
declare const AGENCY_PROFILE_TEMPLATE_ID: "agency.agency-profile";
|
|
276
|
+
declare const AGENCY_PROFILE_TEMPLATE_PATH: "src/spec/canvakit-templates/agency.agency-profile/template.canvakit.html";
|
|
277
|
+
declare const agencyProfileVariablesSchema: z.ZodObject<{
|
|
278
|
+
agencyName: z.ZodOptional<z.ZodString>;
|
|
279
|
+
agencyTagline: z.ZodOptional<z.ZodString>;
|
|
280
|
+
websiteUrl: z.ZodOptional<z.ZodString>;
|
|
281
|
+
contactUrl: z.ZodDefault<z.ZodString>;
|
|
282
|
+
autonomyPosture: z.ZodOptional<z.ZodString>;
|
|
283
|
+
defaultCurrency: z.ZodDefault<z.ZodString>;
|
|
284
|
+
}, z.core.$strip>;
|
|
285
|
+
type AgencyProfileVariables = z.infer<typeof agencyProfileVariablesSchema>;
|
|
286
|
+
declare function agencyProfileVariables(input: AgencyProfileVariables): Record<string, string>;
|
|
287
|
+
|
|
288
|
+
export { AGENCY_OVERVIEW_FRESHNESS_MS, AGENCY_OVERVIEW_TEMPLATE_ID, AGENCY_OVERVIEW_TEMPLATE_PATH, AGENCY_PROFILE_TEMPLATE_ID, AGENCY_PROFILE_TEMPLATE_PATH, AGREEMENT_SIGNING_TEMPLATE_ID as AGREEMENT_PDF_TEMPLATE_ID, AGREEMENT_SIGNING_TEMPLATE_ID, AGREEMENT_SIGNING_TEMPLATE_PATH, type AgencyOverviewSnapshot, type AgencyOverviewVariables, type AgencyProfileVariables, type AgreementSigningVariables, DELIVERABLE_REVIEW_TEMPLATE_ID, DELIVERABLE_REVIEW_TEMPLATE_PATH, type DeliverableReviewVariables, ENGAGEMENT_DASHBOARD_TEMPLATE_ID, ENGAGEMENT_DASHBOARD_TEMPLATE_PATH, type EngagementDashboardVariables, INVOICE_PDF_TEMPLATE_ID, INVOICE_PDF_TEMPLATE_PATH, type InvoicePdfVariables, PROCEDURE_CARD_TEMPLATE_ID, PROCEDURE_CARD_TEMPLATE_PATH, type ProcedureCardVariables, agencyOverviewSnapshotSchema, agencyOverviewVariables, agencyOverviewVariablesSchema, agencyProfileVariables, agencyProfileVariablesSchema, agreementSigningVariables, agreementSigningVariablesSchema, deliverableReviewVariables, deliverableReviewVariablesSchema, engagementDashboardVariables, engagementDashboardVariablesSchema, invoicePdfVariables, invoicePdfVariablesSchema, isAgencyOverviewSnapshotStale, procedureCardVariables, procedureCardVariablesSchema };
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @agentproto/agencies v0.1.0-alpha
|
|
5
|
+
* agentagencies/v1 — operating layer for entities that exercise agency.
|
|
6
|
+
* Vendor-neutral. Filesystem-first. Extends agentcompanies/v1 + agentgovernance/v1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
var ENGAGEMENT_DASHBOARD_TEMPLATE_ID = "agency.engagement-dashboard";
|
|
10
|
+
var ENGAGEMENT_DASHBOARD_TEMPLATE_PATH = "src/spec/canvakit-templates/agency.engagement-dashboard/template.canvakit.html";
|
|
11
|
+
var engagementDashboardVariablesSchema = z.object({
|
|
12
|
+
/** Slug of the engagement folder under `engagements/` (e.g. `2026-acme-website-redesign`). */
|
|
13
|
+
engagementSlug: z.string().regex(
|
|
14
|
+
/^[a-z0-9][a-z0-9-]*$/,
|
|
15
|
+
"Expected lowercase slug (alphanumeric + hyphens)"
|
|
16
|
+
),
|
|
17
|
+
/** Display name of the agency (header). */
|
|
18
|
+
agencyName: z.string().min(1),
|
|
19
|
+
/**
|
|
20
|
+
* Base URL used when the dashboard renders signing links for pending
|
|
21
|
+
* artifacts. The full link is `${signUrlBase}?artifactPath=...&nonce=...`.
|
|
22
|
+
*/
|
|
23
|
+
signUrlBase: z.string().min(1).default("/sign")
|
|
24
|
+
});
|
|
25
|
+
function engagementDashboardVariables(input) {
|
|
26
|
+
return {
|
|
27
|
+
engagementSlug: input.engagementSlug,
|
|
28
|
+
agencyName: input.agencyName,
|
|
29
|
+
signUrlBase: input.signUrlBase ?? "/sign"
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
var AGENCY_OVERVIEW_TEMPLATE_ID = "agency.agency-overview";
|
|
33
|
+
var AGENCY_OVERVIEW_TEMPLATE_PATH = "src/spec/canvakit-templates/agency.agency-overview/template.canvakit.html";
|
|
34
|
+
var agencyOverviewSnapshotSchema = z.object({
|
|
35
|
+
/** ISO 8601 timestamp of when the snapshot was computed. */
|
|
36
|
+
generatedAt: z.string().min(1),
|
|
37
|
+
/** Set true when `Date.now() - generatedAt` exceeds the freshness threshold (default 30 min). */
|
|
38
|
+
isStale: z.boolean().default(false),
|
|
39
|
+
activeEngagementsCount: z.number().int().nonnegative(),
|
|
40
|
+
activeEngagementsDelta: z.number().int().default(0),
|
|
41
|
+
pipelineValueFormatted: z.string(),
|
|
42
|
+
mrrFormatted: z.string(),
|
|
43
|
+
pendingSignaturesCount: z.number().int().nonnegative(),
|
|
44
|
+
byStatus: z.array(
|
|
45
|
+
z.object({
|
|
46
|
+
status: z.string(),
|
|
47
|
+
pillClass: z.enum(["", "ok", "warn", "danger", "muted"]).default(""),
|
|
48
|
+
count: z.number().int().nonnegative(),
|
|
49
|
+
valueFormatted: z.string()
|
|
50
|
+
})
|
|
51
|
+
).default([]),
|
|
52
|
+
recentPayments: z.array(
|
|
53
|
+
z.object({
|
|
54
|
+
invoiceNumber: z.string(),
|
|
55
|
+
counterpartyDisplayName: z.string(),
|
|
56
|
+
amountFormatted: z.string(),
|
|
57
|
+
paidAt: z.string()
|
|
58
|
+
})
|
|
59
|
+
).default([]),
|
|
60
|
+
pendingByEngagement: z.array(
|
|
61
|
+
z.object({
|
|
62
|
+
slug: z.string(),
|
|
63
|
+
name: z.string(),
|
|
64
|
+
requiredSigners: z.string(),
|
|
65
|
+
oldestPendingAt: z.string(),
|
|
66
|
+
stalenessLabel: z.string().default(""),
|
|
67
|
+
stalenessPillClass: z.enum(["", "ok", "warn", "danger", "muted"]).default("")
|
|
68
|
+
})
|
|
69
|
+
).default([])
|
|
70
|
+
});
|
|
71
|
+
var AGENCY_OVERVIEW_FRESHNESS_MS = 30 * 60 * 1e3;
|
|
72
|
+
function isAgencyOverviewSnapshotStale(snapshot, thresholdMs = AGENCY_OVERVIEW_FRESHNESS_MS, now = /* @__PURE__ */ new Date()) {
|
|
73
|
+
const generated = Date.parse(snapshot.generatedAt);
|
|
74
|
+
if (Number.isNaN(generated)) return true;
|
|
75
|
+
return now.getTime() - generated > thresholdMs;
|
|
76
|
+
}
|
|
77
|
+
var agencyOverviewVariablesSchema = z.object({
|
|
78
|
+
agencyName: z.string().min(1),
|
|
79
|
+
/** Used to construct per-engagement deep-links in the dashboard. */
|
|
80
|
+
agencySlug: z.string().regex(
|
|
81
|
+
/^[a-z0-9][a-z0-9-]*$/,
|
|
82
|
+
"Expected lowercase slug (alphanumeric + hyphens)"
|
|
83
|
+
),
|
|
84
|
+
/** ISO 4217 currency for the headline stats. */
|
|
85
|
+
currency: z.string().regex(/^[A-Z]{3}$/).default("EUR")
|
|
86
|
+
});
|
|
87
|
+
function agencyOverviewVariables(input) {
|
|
88
|
+
return {
|
|
89
|
+
agencyName: input.agencyName,
|
|
90
|
+
agencySlug: input.agencySlug,
|
|
91
|
+
currency: input.currency ?? "EUR"
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
var INVOICE_PDF_TEMPLATE_ID = "agency.invoice-pdf";
|
|
95
|
+
var INVOICE_PDF_TEMPLATE_PATH = "src/spec/canvakit-templates/agency.invoice-pdf/template.canvakit.html";
|
|
96
|
+
var moneyFormattedSchema = z.string().regex(/^-?\d+(\.\d{1,4})?$/, {
|
|
97
|
+
message: "Expected a numeric string (e.g. '1234.56'). Format the locale separately."
|
|
98
|
+
});
|
|
99
|
+
var lineItemSchema = z.object({
|
|
100
|
+
description: z.string().min(1),
|
|
101
|
+
quantity: z.union([z.number(), z.string()]),
|
|
102
|
+
unitPriceFormatted: moneyFormattedSchema,
|
|
103
|
+
totalFormatted: moneyFormattedSchema
|
|
104
|
+
});
|
|
105
|
+
var taxLineSchema = z.object({
|
|
106
|
+
label: z.string().min(1),
|
|
107
|
+
amountFormatted: moneyFormattedSchema
|
|
108
|
+
});
|
|
109
|
+
var invoicePdfVariablesSchema = z.object({
|
|
110
|
+
agencyName: z.string().min(1),
|
|
111
|
+
/** Allowed-HTML block (sender address). The renderer trusts this — sanitize upstream. */
|
|
112
|
+
agencyAddressHtml: z.string().optional(),
|
|
113
|
+
agencyTaxId: z.string().optional(),
|
|
114
|
+
invoiceNumber: z.string().min(1),
|
|
115
|
+
/** ISO date (YYYY-MM-DD). */
|
|
116
|
+
issuedAt: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
117
|
+
dueAt: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
118
|
+
/** "issued" | "paid" | "overdue" | "void" — pill-rendered. */
|
|
119
|
+
status: z.string().min(1),
|
|
120
|
+
counterpartyDisplayName: z.string().min(1),
|
|
121
|
+
counterpartyAddressHtml: z.string().optional(),
|
|
122
|
+
counterpartyTaxId: z.string().optional(),
|
|
123
|
+
/** ISO 4217 (e.g. "EUR", "USD"). */
|
|
124
|
+
currency: z.string().regex(/^[A-Z]{3}$/),
|
|
125
|
+
subtotalFormatted: moneyFormattedSchema,
|
|
126
|
+
taxLines: z.array(taxLineSchema).default([]),
|
|
127
|
+
totalFormatted: moneyFormattedSchema,
|
|
128
|
+
amountDueFormatted: moneyFormattedSchema,
|
|
129
|
+
paymentTermsHtml: z.string().optional(),
|
|
130
|
+
notesHtml: z.string().optional(),
|
|
131
|
+
paymentLinkUrl: z.string().optional(),
|
|
132
|
+
lineItems: z.array(lineItemSchema).min(1)
|
|
133
|
+
});
|
|
134
|
+
function invoicePdfVariables(input) {
|
|
135
|
+
return {
|
|
136
|
+
agencyName: input.agencyName,
|
|
137
|
+
agencyAddressHtml: input.agencyAddressHtml ?? "",
|
|
138
|
+
agencyTaxId: input.agencyTaxId ?? "",
|
|
139
|
+
invoiceNumber: input.invoiceNumber,
|
|
140
|
+
issuedAt: input.issuedAt,
|
|
141
|
+
dueAt: input.dueAt,
|
|
142
|
+
status: input.status,
|
|
143
|
+
counterpartyDisplayName: input.counterpartyDisplayName,
|
|
144
|
+
counterpartyAddressHtml: input.counterpartyAddressHtml ?? "",
|
|
145
|
+
counterpartyTaxId: input.counterpartyTaxId ?? "",
|
|
146
|
+
currency: input.currency,
|
|
147
|
+
subtotalFormatted: input.subtotalFormatted,
|
|
148
|
+
taxLines: input.taxLines,
|
|
149
|
+
totalFormatted: input.totalFormatted,
|
|
150
|
+
amountDueFormatted: input.amountDueFormatted,
|
|
151
|
+
paymentTermsHtml: input.paymentTermsHtml ?? "",
|
|
152
|
+
notesHtml: input.notesHtml ?? "",
|
|
153
|
+
paymentLinkUrl: input.paymentLinkUrl ?? "",
|
|
154
|
+
lineItems: input.lineItems
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
var AGREEMENT_SIGNING_TEMPLATE_ID = "agency.agreement-signing";
|
|
158
|
+
var AGREEMENT_SIGNING_TEMPLATE_PATH = "src/spec/canvakit-templates/agency.agreement-signing/template.canvakit.html";
|
|
159
|
+
var moneyFormattedSchema2 = z.string().regex(/^-?\d+(\.\d{1,4})?$/, "Expected a numeric string (e.g. '1234.56')");
|
|
160
|
+
var lineItemSchema2 = z.object({
|
|
161
|
+
description: z.string().min(1),
|
|
162
|
+
quantity: z.union([z.number(), z.string()]),
|
|
163
|
+
totalFormatted: moneyFormattedSchema2
|
|
164
|
+
});
|
|
165
|
+
var partySchema = z.object({
|
|
166
|
+
/** Display label like "Acme Corp (counterparty)". */
|
|
167
|
+
label: z.string().min(1),
|
|
168
|
+
/** ISO timestamp (already-signed) or ISO deadline (pending). */
|
|
169
|
+
signedAt: z.string().optional(),
|
|
170
|
+
deadline: z.string().optional()
|
|
171
|
+
});
|
|
172
|
+
var agreementSigningVariablesSchema = z.object({
|
|
173
|
+
agencyName: z.string().min(1),
|
|
174
|
+
agreementTitle: z.string().min(1),
|
|
175
|
+
agreementPath: z.string().min(1),
|
|
176
|
+
/** Pre-rendered HTML of the agreement body (markdown → HTML upstream). */
|
|
177
|
+
agreementBodyHtml: z.string().optional(),
|
|
178
|
+
documentHash: z.string().regex(/^[a-f0-9]{64}$/),
|
|
179
|
+
signerKind: z.enum(["operator", "user", "counterparty", "agent", "external"]),
|
|
180
|
+
signerSlug: z.string().min(1),
|
|
181
|
+
signerName: z.string().optional(),
|
|
182
|
+
signerEmail: z.email().optional(),
|
|
183
|
+
nonce: z.string().min(1),
|
|
184
|
+
signUrl: z.string().min(1),
|
|
185
|
+
/** Parties who have already signed (rendered in the "Already signed" panel). */
|
|
186
|
+
alreadySignedParties: z.array(partySchema).default([]),
|
|
187
|
+
/** Parties still pending (rendered in the "Pending signatures" panel). */
|
|
188
|
+
pendingParties: z.array(partySchema).default([]),
|
|
189
|
+
lineItems: z.array(lineItemSchema2).default([]),
|
|
190
|
+
totalFormatted: moneyFormattedSchema2.default("0.00"),
|
|
191
|
+
currency: z.string().regex(/^[A-Z]{3}$/).default("EUR"),
|
|
192
|
+
paymentTermsHtml: z.string().optional()
|
|
193
|
+
});
|
|
194
|
+
function agreementSigningVariables(input) {
|
|
195
|
+
return {
|
|
196
|
+
agencyName: input.agencyName,
|
|
197
|
+
agreementTitle: input.agreementTitle,
|
|
198
|
+
agreementPath: input.agreementPath,
|
|
199
|
+
agreementBodyHtml: input.agreementBodyHtml ?? "",
|
|
200
|
+
documentHash: input.documentHash,
|
|
201
|
+
signerKind: input.signerKind,
|
|
202
|
+
signerSlug: input.signerSlug,
|
|
203
|
+
signerName: input.signerName ?? "",
|
|
204
|
+
signerEmail: input.signerEmail ?? "",
|
|
205
|
+
nonce: input.nonce,
|
|
206
|
+
signUrl: input.signUrl,
|
|
207
|
+
alreadySignedParties: input.alreadySignedParties,
|
|
208
|
+
pendingParties: input.pendingParties,
|
|
209
|
+
lineItems: input.lineItems,
|
|
210
|
+
totalFormatted: input.totalFormatted,
|
|
211
|
+
currency: input.currency,
|
|
212
|
+
paymentTermsHtml: input.paymentTermsHtml ?? ""
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
var DELIVERABLE_REVIEW_TEMPLATE_ID = "agency.deliverable-review";
|
|
216
|
+
var DELIVERABLE_REVIEW_TEMPLATE_PATH = "src/spec/canvakit-templates/agency.deliverable-review/template.canvakit.html";
|
|
217
|
+
var attachmentSchema = z.object({
|
|
218
|
+
name: z.string().min(1),
|
|
219
|
+
/** Human-friendly size like "1.2 MB" — formatted upstream. */
|
|
220
|
+
sizeFormatted: z.string(),
|
|
221
|
+
/** Free-form kind label rendered next to the size ("PDF", "Figma frame", …). */
|
|
222
|
+
kind: z.string().optional(),
|
|
223
|
+
/** URL to view/download the attachment. */
|
|
224
|
+
url: z.string().min(1),
|
|
225
|
+
/** Single-glyph icon (emoji or unicode). The template renders verbatim. */
|
|
226
|
+
icon: z.string().default("\u{1F4CE}")
|
|
227
|
+
});
|
|
228
|
+
var deliverableReviewVariablesSchema = z.object({
|
|
229
|
+
agencyName: z.string().min(1),
|
|
230
|
+
/** Optional engagement display name (rendered in the lead). */
|
|
231
|
+
engagementName: z.string().optional(),
|
|
232
|
+
deliverableTitle: z.string().min(1),
|
|
233
|
+
deliverablePath: z.string().min(1),
|
|
234
|
+
/** Markdown body rendered to HTML upstream (description + acceptance criteria). */
|
|
235
|
+
deliverableBodyHtml: z.string().optional(),
|
|
236
|
+
/** Free-form context shown above the body (e.g., "Phase 1 of 3"). */
|
|
237
|
+
context: z.string().optional(),
|
|
238
|
+
documentHash: z.string().regex(/^[a-f0-9]{64}$/),
|
|
239
|
+
signerKind: z.enum(["operator", "user", "counterparty", "agent", "external"]),
|
|
240
|
+
signerSlug: z.string().min(1),
|
|
241
|
+
signerName: z.string().optional(),
|
|
242
|
+
signerEmail: z.email().optional(),
|
|
243
|
+
nonce: z.string().min(1),
|
|
244
|
+
signUrl: z.string().min(1),
|
|
245
|
+
reviseUrl: z.string().min(1),
|
|
246
|
+
attachments: z.array(attachmentSchema).default([])
|
|
247
|
+
});
|
|
248
|
+
function deliverableReviewVariables(input) {
|
|
249
|
+
return {
|
|
250
|
+
agencyName: input.agencyName,
|
|
251
|
+
engagementName: input.engagementName ?? "",
|
|
252
|
+
deliverableTitle: input.deliverableTitle,
|
|
253
|
+
deliverablePath: input.deliverablePath,
|
|
254
|
+
deliverableBodyHtml: input.deliverableBodyHtml ?? "",
|
|
255
|
+
context: input.context ?? "",
|
|
256
|
+
documentHash: input.documentHash,
|
|
257
|
+
signerKind: input.signerKind,
|
|
258
|
+
signerSlug: input.signerSlug,
|
|
259
|
+
signerName: input.signerName ?? "",
|
|
260
|
+
signerEmail: input.signerEmail ?? "",
|
|
261
|
+
nonce: input.nonce,
|
|
262
|
+
signUrl: input.signUrl,
|
|
263
|
+
reviseUrl: input.reviseUrl,
|
|
264
|
+
attachments: input.attachments
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
var PROCEDURE_CARD_TEMPLATE_ID = "agency.procedure-card";
|
|
268
|
+
var PROCEDURE_CARD_TEMPLATE_PATH = "src/spec/canvakit-templates/agency.procedure-card/template.canvakit.html";
|
|
269
|
+
var procedureCardVariablesSchema = z.object({
|
|
270
|
+
/** Optional agency name shown in the lead label. */
|
|
271
|
+
agencyName: z.string().optional(),
|
|
272
|
+
/** Workspace-relative path to the PROCEDURE.md being rendered. */
|
|
273
|
+
procedurePath: z.string().min(1),
|
|
274
|
+
/**
|
|
275
|
+
* If rendered inside an active engagement, the slug of the step currently
|
|
276
|
+
* executing. The host fills `step.stateClass = active|done|pending` based
|
|
277
|
+
* on this when projecting the procedure data source. Pass `""` for the
|
|
278
|
+
* static documentation view.
|
|
279
|
+
*/
|
|
280
|
+
currentStepId: z.string().default("")
|
|
281
|
+
});
|
|
282
|
+
function procedureCardVariables(input) {
|
|
283
|
+
return {
|
|
284
|
+
agencyName: input.agencyName ?? "",
|
|
285
|
+
procedurePath: input.procedurePath,
|
|
286
|
+
currentStepId: input.currentStepId ?? ""
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
var AGENCY_PROFILE_TEMPLATE_ID = "agency.agency-profile";
|
|
290
|
+
var AGENCY_PROFILE_TEMPLATE_PATH = "src/spec/canvakit-templates/agency.agency-profile/template.canvakit.html";
|
|
291
|
+
var agencyProfileVariablesSchema = z.object({
|
|
292
|
+
/**
|
|
293
|
+
* The primary header. Defaults to `agency.name` resolved from AGENCY.md
|
|
294
|
+
* when omitted (template falls back to the data source).
|
|
295
|
+
*/
|
|
296
|
+
agencyName: z.string().optional(),
|
|
297
|
+
/** Optional one-line tagline shown under the H1. */
|
|
298
|
+
agencyTagline: z.string().optional(),
|
|
299
|
+
/** Optional public website URL shown in the footer. */
|
|
300
|
+
websiteUrl: z.string().optional(),
|
|
301
|
+
/** Where the "Start an engagement" CTA points. */
|
|
302
|
+
contactUrl: z.string().default("/contact"),
|
|
303
|
+
/** Override AGENCY.md.autonomyPosture in the "How we work" panel (rare). */
|
|
304
|
+
autonomyPosture: z.string().optional(),
|
|
305
|
+
/** Override AGENCY.md.defaultCurrency. */
|
|
306
|
+
defaultCurrency: z.string().regex(/^[A-Z]{3}$/).default("EUR")
|
|
307
|
+
});
|
|
308
|
+
function agencyProfileVariables(input) {
|
|
309
|
+
return {
|
|
310
|
+
agencyName: input.agencyName ?? "",
|
|
311
|
+
agencyTagline: input.agencyTagline ?? "",
|
|
312
|
+
websiteUrl: input.websiteUrl ?? "",
|
|
313
|
+
contactUrl: input.contactUrl,
|
|
314
|
+
autonomyPosture: input.autonomyPosture ?? "",
|
|
315
|
+
defaultCurrency: input.defaultCurrency
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export { AGENCY_OVERVIEW_FRESHNESS_MS, AGENCY_OVERVIEW_TEMPLATE_ID, AGENCY_OVERVIEW_TEMPLATE_PATH, AGENCY_PROFILE_TEMPLATE_ID, AGENCY_PROFILE_TEMPLATE_PATH, AGREEMENT_SIGNING_TEMPLATE_ID as AGREEMENT_PDF_TEMPLATE_ID, AGREEMENT_SIGNING_TEMPLATE_ID, AGREEMENT_SIGNING_TEMPLATE_PATH, DELIVERABLE_REVIEW_TEMPLATE_ID, DELIVERABLE_REVIEW_TEMPLATE_PATH, ENGAGEMENT_DASHBOARD_TEMPLATE_ID, ENGAGEMENT_DASHBOARD_TEMPLATE_PATH, INVOICE_PDF_TEMPLATE_ID, INVOICE_PDF_TEMPLATE_PATH, PROCEDURE_CARD_TEMPLATE_ID, PROCEDURE_CARD_TEMPLATE_PATH, agencyOverviewSnapshotSchema, agencyOverviewVariables, agencyOverviewVariablesSchema, agencyProfileVariables, agencyProfileVariablesSchema, agreementSigningVariables, agreementSigningVariablesSchema, deliverableReviewVariables, deliverableReviewVariablesSchema, engagementDashboardVariables, engagementDashboardVariablesSchema, invoicePdfVariables, invoicePdfVariablesSchema, isAgencyOverviewSnapshotStale, procedureCardVariables, procedureCardVariablesSchema };
|
|
320
|
+
//# sourceMappingURL=index.mjs.map
|
|
321
|
+
//# sourceMappingURL=index.mjs.map
|