@substrat-run/contracts 0.92.0 → 0.93.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.
@@ -740,11 +740,13 @@ export type TenantExport = z.infer<typeof tenantExport>;
740
740
  * **Meter 1** (base fee: per tenant + per active scope) is a `COUNT` over the directory.
741
741
  * **Meter 2** (per-engine licensing) is a `GROUP BY` over the entitlement store, whose
742
742
  * flags *are* the SKUs. Both are free, both come from the directory database, and
743
- * neither needs a data pipeline. **Meters 3 and 4 are absent by construction**, not by
744
- * omission: the outbox is per-scope-database with no cross-tenant fan-in, reads emit
745
- * nothing, and the cross-tenant order flow does not exist. A field here would be a
746
- * number we cannot compute — "a meter you cannot compute is not a pricing decision, it
747
- * is a data-pipeline project" (§5).
743
+ * neither needs a data pipeline. **Meters 3 and 4 are absent from THIS reading by
744
+ * construction**, not by omission: the outbox is per-scope-database with no cross-tenant
745
+ * fan-in, reads emit nothing, and the cross-tenant order flow does not exist. A field here
746
+ * would be a number we cannot compute — "a meter you cannot compute is not a pricing
747
+ * decision, it is a data-pipeline project" (§5). The one slice of meter 3 that IS computable
748
+ * — model usage, because every call is raised as a platform intent and drained into the
749
+ * directory — has its own reading, `modelUsageSummary` (model-usage.ts, #1054).
748
750
  *
749
751
  * Two rules decide every number below, and they are the reason this is a server-side
750
752
  * aggregate rather than arithmetic over `listScopes`:
@@ -1 +1 @@
1
- {"version":3,"file":"control-plane.d.ts","sourceRoot":"","sources":["../src/control-plane.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkCxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkGtB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB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AM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,4EAA4E;AAC5E,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;iBAYzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB;;;;;iBAQ9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqBvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
@@ -553,11 +553,13 @@ export const tenantExport = z.object({
553
553
  * **Meter 1** (base fee: per tenant + per active scope) is a `COUNT` over the directory.
554
554
  * **Meter 2** (per-engine licensing) is a `GROUP BY` over the entitlement store, whose
555
555
  * flags *are* the SKUs. Both are free, both come from the directory database, and
556
- * neither needs a data pipeline. **Meters 3 and 4 are absent by construction**, not by
557
- * omission: the outbox is per-scope-database with no cross-tenant fan-in, reads emit
558
- * nothing, and the cross-tenant order flow does not exist. A field here would be a
559
- * number we cannot compute — "a meter you cannot compute is not a pricing decision, it
560
- * is a data-pipeline project" (§5).
556
+ * neither needs a data pipeline. **Meters 3 and 4 are absent from THIS reading by
557
+ * construction**, not by omission: the outbox is per-scope-database with no cross-tenant
558
+ * fan-in, reads emit nothing, and the cross-tenant order flow does not exist. A field here
559
+ * would be a number we cannot compute — "a meter you cannot compute is not a pricing
560
+ * decision, it is a data-pipeline project" (§5). The one slice of meter 3 that IS computable
561
+ * — model usage, because every call is raised as a platform intent and drained into the
562
+ * directory — has its own reading, `modelUsageSummary` (model-usage.ts, #1054).
561
563
  *
562
564
  * Two rules decide every number below, and they are the reason this is a server-side
563
565
  * aggregate rather than arithmetic over `listScopes`:
@@ -1 +1 @@
1
- {"version":3,"file":"control-plane.js","sourceRoot":"","sources":["../src/control-plane.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,OAAO,EACP,OAAO,EACP,KAAK,EACL,aAAa,EACb,eAAe,EACf,WAAW,EACX,OAAO,EACP,IAAI,EACJ,QAAQ,GACT,MAAM,UAAU,CAAC;AAClB,wFAAwF;AACxF,mFAAmF;AACnF,uDAAuD;AACvD,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EACL,UAAU,EACV,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,gFAAgF;AAChF,+EAA+E;AAC/E,iFAAiF;AACjF,4CAA4C;AAE5C,2EAA2E;AAC3E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC;IAChC,YAAY;IACZ,YAAY;IACZ,cAAc,EAAE,+DAA+D;IAC/E,OAAO;IACP,YAAY;IACZ,WAAW;IACX,cAAc,EAAE,2DAA2D;IAC3E,WAAW,EAAE,wDAAwD;IACrE,sBAAsB;IACtB,kBAAkB,EAAE,wCAAwC;IAC5D,gBAAgB;IAChB,cAAc;IACd,eAAe;IACf,mBAAmB,EAAE,0EAA0E;IAC/F,gBAAgB,EAAE,iFAAiF;IACnG,4BAA4B,EAAE,mEAAmE;IACjG,8BAA8B,EAAE,4EAA4E;IAC5G,wBAAwB,EA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6 @@
1
1
  import { z } from 'zod';
2
2
  /**
3
- * The ONE error model for every surface on the platform (`docs/rfc/error-model.md`,
3
+ * The ONE error model for every surface on the platform (`docs/architecture/error-model.md`,
4
4
  * issue #113): RFC 9457 `application/problem+json`, a CLOSED code taxonomy, and one
5
5
  * mapper — replacing the seven hand-rolled `onError` handlers that today choose a
6
6
  * status by matching on error message TEXT.
@@ -299,7 +299,7 @@ export declare function problemForStatus(status: number, detail?: string, instan
299
299
  export declare const DOCUMENTED_ERROR_CODES: readonly ErrorCode[];
300
300
  /**
301
301
  * An error flattened for a boundary that carries only data — the DO↔coordinator wire
302
- * (#113 phase 3, `docs/rfc/error-model.md` §3).
302
+ * (#113 phase 3, `docs/architecture/error-model.md` §3).
303
303
  *
304
304
  * This exists because a THROW cannot carry structure across the ScopeDO hop: workerd
305
305
  * delivers a thrown error's message and nothing else, folding `name` into it and
package/dist/errors.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { entityRef } from './events.js';
3
3
  /**
4
- * The ONE error model for every surface on the platform (`docs/rfc/error-model.md`,
4
+ * The ONE error model for every surface on the platform (`docs/architecture/error-model.md`,
5
5
  * issue #113): RFC 9457 `application/problem+json`, a CLOSED code taxonomy, and one
6
6
  * mapper — replacing the seven hand-rolled `onError` handlers that today choose a
7
7
  * status by matching on error message TEXT.
@@ -429,7 +429,7 @@ export const DOCUMENTED_ERROR_CODES = [
429
429
  ];
430
430
  /**
431
431
  * An error flattened for a boundary that carries only data — the DO↔coordinator wire
432
- * (#113 phase 3, `docs/rfc/error-model.md` §3).
432
+ * (#113 phase 3, `docs/architecture/error-model.md` §3).
433
433
  *
434
434
  * This exists because a THROW cannot carry structure across the ScopeDO hop: workerd
435
435
  * delivers a thrown error's message and nothing else, folding `name` into it and
package/dist/index.d.ts CHANGED
@@ -43,4 +43,5 @@ export * from './model.js';
43
43
  export * from './operations.js';
44
44
  export * from './lifecycle.js';
45
45
  export * from './client-context.js';
46
+ export * from './model-usage.js';
46
47
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -43,4 +43,5 @@ export * from './model.js';
43
43
  export * from './operations.js';
44
44
  export * from './lifecycle.js';
45
45
  export * from './client-context.js';
46
+ export * from './model-usage.js';
46
47
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,172 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Model usage — the kernel-owned half of "the governance is kernel, the model is not"
4
+ * (master plan §5.7 / D-18, built as #1054).
5
+ *
6
+ * Every call a host makes to a language model on the platform's behalf yields exactly one
7
+ * of these. It is provider-neutral by construction: quantities come from the AI SDK usage
8
+ * shape whichever provider ran, and `listUsd` is computed on OUR side from the generated
9
+ * rate card — a provider's own cost field is a reconciliation source, never the ledger.
10
+ *
11
+ * `attribution` is FIXED at five keys, because the smallest per-request metadata limit
12
+ * among the providers we route through is five. Pick once, never drift: a sixth key
13
+ * silently drops on the wire and the reconciliation join breaks for that provider only.
14
+ */
15
+ export declare const modelAttribution: z.ZodObject<{
16
+ tenant: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
17
+ scope: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
18
+ vertical: z.ZodString;
19
+ version: z.ZodString;
20
+ operation: z.ZodString;
21
+ }, z.core.$strict>;
22
+ export type ModelAttribution = z.infer<typeof modelAttribution>;
23
+ declare const modelUsageLineFields: z.ZodObject<{
24
+ attribution: z.ZodObject<{
25
+ tenant: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
26
+ scope: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
27
+ vertical: z.ZodString;
28
+ version: z.ZodString;
29
+ operation: z.ZodString;
30
+ }, z.core.$strict>;
31
+ model: z.ZodString;
32
+ provider: z.ZodString;
33
+ modelId: z.ZodString;
34
+ reported: z.ZodBoolean;
35
+ inputTokens: z.ZodNumber;
36
+ outputTokens: z.ZodNumber;
37
+ cachedInputTokens: z.ZodNumber;
38
+ cacheWriteTokens: z.ZodNumber;
39
+ listUsd: z.ZodNullable<z.ZodString>;
40
+ at: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
41
+ elapsedMs: z.ZodNumber;
42
+ }, z.core.$strip>;
43
+ /**
44
+ * `reported: false` means the provider reported NO usage — so the counts are zero and
45
+ * there is nothing to price.
46
+ *
47
+ * Enforced rather than merely documented because this payload is parsed from a VERTICAL
48
+ * at the platform boundary: without the check, `{ reported: false, inputTokens: 9_000_000 }`
49
+ * is a well-formed line and the ledger would take it. That is an estimate becoming a
50
+ * bill, which is the single thing the `reported` flag exists to prevent.
51
+ */
52
+ export declare const unreportedIsEmpty: (line: z.infer<typeof modelUsageLineFields>) => boolean;
53
+ export declare const UNREPORTED_MESSAGE = "reported: false means the provider reported no usage \u2014 every token count must be 0 and listUsd null";
54
+ /** The line's own fields, unrefined — for schemas that extend it (a refined schema cannot). */
55
+ export { modelUsageLineFields };
56
+ export declare const modelUsageLine: z.ZodObject<{
57
+ attribution: z.ZodObject<{
58
+ tenant: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
59
+ scope: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
60
+ vertical: z.ZodString;
61
+ version: z.ZodString;
62
+ operation: z.ZodString;
63
+ }, z.core.$strict>;
64
+ model: z.ZodString;
65
+ provider: z.ZodString;
66
+ modelId: z.ZodString;
67
+ reported: z.ZodBoolean;
68
+ inputTokens: z.ZodNumber;
69
+ outputTokens: z.ZodNumber;
70
+ cachedInputTokens: z.ZodNumber;
71
+ cacheWriteTokens: z.ZodNumber;
72
+ listUsd: z.ZodNullable<z.ZodString>;
73
+ at: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
74
+ elapsedMs: z.ZodNumber;
75
+ }, z.core.$strip>;
76
+ export type ModelUsageLine = z.infer<typeof modelUsageLine>;
77
+ /**
78
+ * The platform intent a vertical raises to hand a line to the platform's ledger
79
+ * (`ctx.requestPlatform({ kind: MODEL_USAGE_KIND, payload: line })`). The drain parses
80
+ * the payload as `modelUsageLine`, refuses a line whose attribution names a different
81
+ * tenant or scope than the one being drained, and records it under the intent's own id
82
+ * — which is what makes a retried drain write nothing twice.
83
+ */
84
+ export declare const MODEL_USAGE_KIND = "model-usage";
85
+ /** A line as the platform's ledger holds it: the line plus the platform's two stamps. */
86
+ export declare const modelUsageEntry: z.ZodObject<{
87
+ attribution: z.ZodObject<{
88
+ tenant: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
89
+ scope: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
90
+ vertical: z.ZodString;
91
+ version: z.ZodString;
92
+ operation: z.ZodString;
93
+ }, z.core.$strict>;
94
+ model: z.ZodString;
95
+ provider: z.ZodString;
96
+ modelId: z.ZodString;
97
+ reported: z.ZodBoolean;
98
+ inputTokens: z.ZodNumber;
99
+ outputTokens: z.ZodNumber;
100
+ cachedInputTokens: z.ZodNumber;
101
+ cacheWriteTokens: z.ZodNumber;
102
+ listUsd: z.ZodNullable<z.ZodString>;
103
+ at: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
104
+ elapsedMs: z.ZodNumber;
105
+ id: z.ZodString;
106
+ requestId: z.ZodString;
107
+ }, z.core.$strip>;
108
+ export type ModelUsageEntry = z.infer<typeof modelUsageEntry>;
109
+ /**
110
+ * Meter 3, at last computable — for model usage. D-30 said meters 3 and 4 were
111
+ * uncomputable because the outbox has no cross-tenant fan-in; a line drained into the
112
+ * directory is exactly that fan-in, for this one kind of usage.
113
+ *
114
+ * One row per (tenant, vertical, model). Token sums are integers; money is folded with
115
+ * `addDecimal`, never floated, and `billedUsd` is `listUsd × marginFactor(marginPercent)`
116
+ * — the platform's rate applied at READ time, so a margin change re-prices history
117
+ * consistently rather than leaving two rates in one table. `unpriced` counts calls whose
118
+ * model the rate card did not know: shown beside the money, never folded into it as $0.
119
+ */
120
+ export declare const modelUsageSummaryRow: z.ZodObject<{
121
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
122
+ vertical: z.ZodString;
123
+ model: z.ZodString;
124
+ provider: z.ZodString;
125
+ modelId: z.ZodString;
126
+ calls: z.ZodNumber;
127
+ unpriced: z.ZodNumber;
128
+ inputTokens: z.ZodNumber;
129
+ outputTokens: z.ZodNumber;
130
+ cachedInputTokens: z.ZodNumber;
131
+ cacheWriteTokens: z.ZodNumber;
132
+ listUsd: z.ZodString;
133
+ billedUsd: z.ZodString;
134
+ }, z.core.$strip>;
135
+ export type ModelUsageSummaryRow = z.infer<typeof modelUsageSummaryRow>;
136
+ export declare const modelUsageSummary: z.ZodObject<{
137
+ readAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
138
+ since: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
139
+ until: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
140
+ marginPercent: z.ZodNumber;
141
+ rows: z.ZodArray<z.ZodObject<{
142
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
143
+ vertical: z.ZodString;
144
+ model: z.ZodString;
145
+ provider: z.ZodString;
146
+ modelId: z.ZodString;
147
+ calls: z.ZodNumber;
148
+ unpriced: z.ZodNumber;
149
+ inputTokens: z.ZodNumber;
150
+ outputTokens: z.ZodNumber;
151
+ cachedInputTokens: z.ZodNumber;
152
+ cacheWriteTokens: z.ZodNumber;
153
+ listUsd: z.ZodString;
154
+ billedUsd: z.ZodString;
155
+ }, z.core.$strip>>;
156
+ totals: z.ZodObject<{
157
+ calls: z.ZodNumber;
158
+ unpriced: z.ZodNumber;
159
+ inputTokens: z.ZodNumber;
160
+ outputTokens: z.ZodNumber;
161
+ listUsd: z.ZodString;
162
+ billedUsd: z.ZodString;
163
+ }, z.core.$strip>;
164
+ }, z.core.$strip>;
165
+ export type ModelUsageSummary = z.infer<typeof modelUsageSummary>;
166
+ /**
167
+ * `20` → `'1.2'`, `7` → `'1.07'`, `125` → `'2.25'`: a whole-percent margin as the exact
168
+ * decimal factor `mulDecimal` takes. Whole percents only — a fractional margin would need
169
+ * a factor the 6-dp decimal scale cannot always carry, and nobody prices at 12.5%.
170
+ */
171
+ export declare function marginFactor(percent: number): string;
172
+ //# sourceMappingURL=model-usage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-usage.d.ts","sourceRoot":"","sources":["../src/model-usage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB;;;;;;kBAWlB,CAAC;AACZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;iBA6BxB,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,SAAU,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,KAAG,OAMrD,CAAC;AAE3B,eAAO,MAAM,kBAAkB,6GACwE,CAAC;AAExG,+FAA+F;AAC/F,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;iBAEzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAE9C,yFAAyF;AACzF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;iBAUiC,CAAC;AAC9D,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;iBAc/B,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAe5B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CASpD"}
@@ -0,0 +1,156 @@
1
+ import { z } from 'zod';
2
+ import { instant, scopeId, tenantId } from './ids.js';
3
+ /**
4
+ * Model usage — the kernel-owned half of "the governance is kernel, the model is not"
5
+ * (master plan §5.7 / D-18, built as #1054).
6
+ *
7
+ * Every call a host makes to a language model on the platform's behalf yields exactly one
8
+ * of these. It is provider-neutral by construction: quantities come from the AI SDK usage
9
+ * shape whichever provider ran, and `listUsd` is computed on OUR side from the generated
10
+ * rate card — a provider's own cost field is a reconciliation source, never the ledger.
11
+ *
12
+ * `attribution` is FIXED at five keys, because the smallest per-request metadata limit
13
+ * among the providers we route through is five. Pick once, never drift: a sixth key
14
+ * silently drops on the wire and the reconciliation join breaks for that provider only.
15
+ */
16
+ export const modelAttribution = z
17
+ .object({
18
+ tenant: tenantId,
19
+ scope: scopeId,
20
+ /** The vertical's package name — `@substrat-run/demo-ticket0`. */
21
+ vertical: z.string().min(1),
22
+ /** The vertical version that made the call — what a cost change correlates with. */
23
+ version: z.string().min(1),
24
+ /** The operation or job on whose behalf the model ran — `ticket0/answer`. */
25
+ operation: z.string().min(1),
26
+ })
27
+ .strict();
28
+ const modelUsageLineFields = z.object({
29
+ attribution: modelAttribution,
30
+ /** Normalized `provider:modelId`. */
31
+ model: z.string().min(1),
32
+ provider: z.string().min(1),
33
+ modelId: z.string().min(1),
34
+ /**
35
+ * Token counts as the provider REPORTED them. `reported: false` means it reported
36
+ * none and the counts are zero — never an estimate that quietly became a bill.
37
+ */
38
+ reported: z.boolean(),
39
+ inputTokens: z.number().int().nonnegative(),
40
+ outputTokens: z.number().int().nonnegative(),
41
+ cachedInputTokens: z.number().int().nonnegative(),
42
+ cacheWriteTokens: z.number().int().nonnegative(),
43
+ /**
44
+ * USD list price from the rate card; null = the card does not know this model.
45
+ *
46
+ * Shaped like `moneyAmount` (6 dp, K-14) because it IS money: the fold adds it with
47
+ * `addDecimal`, and an empty string or a stray word would survive a bare `z.string()`
48
+ * and land in the ledger as a price.
49
+ */
50
+ listUsd: z
51
+ .string()
52
+ .regex(/^-?\d+(\.\d{1,6})?$/, 'listUsd must be a decimal string with at most 6 decimal places')
53
+ .nullable(),
54
+ /** ISO 8601, from the host's clock. */
55
+ at: instant,
56
+ elapsedMs: z.number().int().nonnegative(),
57
+ });
58
+ /**
59
+ * `reported: false` means the provider reported NO usage — so the counts are zero and
60
+ * there is nothing to price.
61
+ *
62
+ * Enforced rather than merely documented because this payload is parsed from a VERTICAL
63
+ * at the platform boundary: without the check, `{ reported: false, inputTokens: 9_000_000 }`
64
+ * is a well-formed line and the ledger would take it. That is an estimate becoming a
65
+ * bill, which is the single thing the `reported` flag exists to prevent.
66
+ */
67
+ export const unreportedIsEmpty = (line) => line.reported ||
68
+ (line.inputTokens === 0 &&
69
+ line.outputTokens === 0 &&
70
+ line.cachedInputTokens === 0 &&
71
+ line.cacheWriteTokens === 0 &&
72
+ line.listUsd === null);
73
+ export const UNREPORTED_MESSAGE = 'reported: false means the provider reported no usage — every token count must be 0 and listUsd null';
74
+ /** The line's own fields, unrefined — for schemas that extend it (a refined schema cannot). */
75
+ export { modelUsageLineFields };
76
+ export const modelUsageLine = modelUsageLineFields.refine(unreportedIsEmpty, {
77
+ message: UNREPORTED_MESSAGE,
78
+ });
79
+ /**
80
+ * The platform intent a vertical raises to hand a line to the platform's ledger
81
+ * (`ctx.requestPlatform({ kind: MODEL_USAGE_KIND, payload: line })`). The drain parses
82
+ * the payload as `modelUsageLine`, refuses a line whose attribution names a different
83
+ * tenant or scope than the one being drained, and records it under the intent's own id
84
+ * — which is what makes a retried drain write nothing twice.
85
+ */
86
+ export const MODEL_USAGE_KIND = 'model-usage';
87
+ /** A line as the platform's ledger holds it: the line plus the platform's two stamps. */
88
+ export const modelUsageEntry = modelUsageLineFields
89
+ .extend({
90
+ /** ULID, stamped platform-side; sortable = chronological in ledger order. */
91
+ id: z.string().min(1),
92
+ /** The intent it arrived as — the dedupe key. */
93
+ requestId: z.string().min(1),
94
+ })
95
+ // Extends the FIELDS, not `modelUsageLine`: a refined schema cannot be extended. The
96
+ // same invariant is re-applied so it also holds on the way back OUT of the ledger —
97
+ // a row written before the check existed cannot be read as a priced one.
98
+ .refine(unreportedIsEmpty, { message: UNREPORTED_MESSAGE });
99
+ /**
100
+ * Meter 3, at last computable — for model usage. D-30 said meters 3 and 4 were
101
+ * uncomputable because the outbox has no cross-tenant fan-in; a line drained into the
102
+ * directory is exactly that fan-in, for this one kind of usage.
103
+ *
104
+ * One row per (tenant, vertical, model). Token sums are integers; money is folded with
105
+ * `addDecimal`, never floated, and `billedUsd` is `listUsd × marginFactor(marginPercent)`
106
+ * — the platform's rate applied at READ time, so a margin change re-prices history
107
+ * consistently rather than leaving two rates in one table. `unpriced` counts calls whose
108
+ * model the rate card did not know: shown beside the money, never folded into it as $0.
109
+ */
110
+ export const modelUsageSummaryRow = z.object({
111
+ tenantId,
112
+ vertical: z.string().min(1),
113
+ model: z.string().min(1),
114
+ provider: z.string().min(1),
115
+ modelId: z.string().min(1),
116
+ calls: z.number().int().nonnegative(),
117
+ unpriced: z.number().int().nonnegative(),
118
+ inputTokens: z.number().int().nonnegative(),
119
+ outputTokens: z.number().int().nonnegative(),
120
+ cachedInputTokens: z.number().int().nonnegative(),
121
+ cacheWriteTokens: z.number().int().nonnegative(),
122
+ listUsd: z.string(),
123
+ billedUsd: z.string(),
124
+ });
125
+ export const modelUsageSummary = z.object({
126
+ readAt: instant,
127
+ since: instant,
128
+ until: instant,
129
+ /** The platform's margin over list, whole percent. */
130
+ marginPercent: z.number().int().nonnegative(),
131
+ rows: z.array(modelUsageSummaryRow),
132
+ totals: z.object({
133
+ calls: z.number().int().nonnegative(),
134
+ unpriced: z.number().int().nonnegative(),
135
+ inputTokens: z.number().int().nonnegative(),
136
+ outputTokens: z.number().int().nonnegative(),
137
+ listUsd: z.string(),
138
+ billedUsd: z.string(),
139
+ }),
140
+ });
141
+ /**
142
+ * `20` → `'1.2'`, `7` → `'1.07'`, `125` → `'2.25'`: a whole-percent margin as the exact
143
+ * decimal factor `mulDecimal` takes. Whole percents only — a fractional margin would need
144
+ * a factor the 6-dp decimal scale cannot always carry, and nobody prices at 12.5%.
145
+ */
146
+ export function marginFactor(percent) {
147
+ if (!Number.isInteger(percent) || percent < 0) {
148
+ throw new RangeError(`margin percent must be a non-negative integer, got ${percent}`);
149
+ }
150
+ const whole = 1 + Math.floor(percent / 100);
151
+ const frac = String(percent % 100)
152
+ .padStart(2, '0')
153
+ .replace(/0+$/, '');
154
+ return frac ? `${whole}.${frac}` : String(whole);
155
+ }
156
+ //# sourceMappingURL=model-usage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-usage.js","sourceRoot":"","sources":["../src/model-usage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEtD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC;KAC9B,MAAM,CAAC;IACN,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,kEAAkE;IAClE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,oFAAoF;IACpF,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,6EAA6E;IAC7E,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC7B,CAAC;KACD,MAAM,EAAE,CAAC;AAGZ,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,WAAW,EAAE,gBAAgB;IAC7B,qCAAqC;IACrC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B;;;OAGG;IACH,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;IACrB,WAAW,EAAE,CAAC,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OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACtB,OAAO,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACnD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@substrat-run/contracts",
3
- "version": "0.92.0",
3
+ "version": "0.93.0",
4
4
  "description": "Substrat kernel contract schemas — Zod is the source of truth (master plan D-22); OAS/JSON Schema are emitted artifacts",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {