@fourier-labs/harbour-contracts 0.10.0 → 0.12.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 (36) hide show
  1. package/README.md +1 -1
  2. package/contract-release.json +32 -31
  3. package/dist/gen-ts/ai-budget-ledger-event.d.ts +4 -0
  4. package/dist/gen-ts/ai-metering-policy.d.ts +14 -0
  5. package/dist/gen-ts/ai-policy-snapshot.d.ts +21 -2
  6. package/dist/gen-ts/ai-pricing-revision.d.ts +1 -1
  7. package/dist/gen-ts/ai-trace-event-v2.d.ts +6 -1
  8. package/dist/gen-ts/contract-release.d.ts +7 -7
  9. package/dist/gen-ts/contract-release.js +7 -7
  10. package/dist/gen-ts/promotion-request.d.ts +2 -2
  11. package/dist/gen-ts/sanitized-binding-evidence.d.ts +2 -2
  12. package/fixtures/ai/adversarial-sanitized-binding-relabel.json +6 -2
  13. package/fixtures/ai/valid-binding-classification-subject.json +5 -1
  14. package/fixtures/ai/valid-budget-ledger-event.json +4 -0
  15. package/fixtures/ai/valid-metering-policy.json +5 -0
  16. package/fixtures/ai/valid-policy-snapshot.json +14 -3
  17. package/fixtures/ai/valid-pricing-revision.json +5 -2
  18. package/fixtures/ai/valid-sanitized-binding-evidence-byo-source.json +36 -0
  19. package/fixtures/ai/valid-sanitized-binding-evidence.json +6 -2
  20. package/fixtures/ai/valid-trace-event-v2.json +44 -3
  21. package/gen-ts/ai-budget-ledger-event.ts +4 -0
  22. package/gen-ts/ai-metering-policy.ts +14 -0
  23. package/gen-ts/ai-policy-snapshot.ts +21 -2
  24. package/gen-ts/ai-pricing-revision.ts +1 -1
  25. package/gen-ts/ai-trace-event-v2.ts +6 -1
  26. package/gen-ts/contract-release.ts +7 -7
  27. package/gen-ts/promotion-request.ts +2 -2
  28. package/gen-ts/sanitized-binding-evidence.ts +2 -2
  29. package/package.json +1 -1
  30. package/schema/ai-budget-ledger-event.schema.json +4 -0
  31. package/schema/ai-metering-policy.schema.json +17 -1
  32. package/schema/ai-policy-snapshot.schema.json +31 -4
  33. package/schema/ai-pricing-revision.schema.json +1 -1
  34. package/schema/ai-trace-event-v2.schema.json +6 -1
  35. package/schema/promotion-request.schema.json +3 -3
  36. package/schema/sanitized-binding-evidence.schema.json +2 -2
package/README.md CHANGED
@@ -35,7 +35,7 @@ exist here first.
35
35
  | `ai-runtime-binding.schema.json` | Platform-neutral workload identity/secret binding | AI governance §5.8 |
36
36
  | `binding-classification-subject.schema.json` | Complete value-free binding-name classification before version allocation | AI governance §5.7 / SEC-UP-01 |
37
37
  | `sanitized-binding-evidence.schema.json` | Exact-version sanitized runtime-binding allocation receipt | AI governance §5.7 / SEC-UP-02 |
38
- | `ai-pricing-revision`, `ai-metering-policy`, `ai-budget-ledger-event`, `ai-trace-event-v2` | Additive metering v2 records; v1 records remain readable | AI governance §9 |
38
+ | `ai-pricing-revision`, `ai-metering-policy`, `ai-budget-ledger-event`, `ai-trace-event-v2` | Additive metering v2 records, including media dimensions and P5 trace attribution; v1 records remain readable | AI governance §9 |
39
39
 
40
40
  Two schemas carry logic beyond structural types, generated into helpers:
41
41
 
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "schema": "harbour.contract-release/1.0",
3
- "repositoryVersion": "0.10.0.0",
4
- "publishVersion": "0.10.0",
5
- "publishTag": "v0.10.0",
6
- "schemasDigest": "sha256:e22fd6329b9064a3d653dbc6bc3ee0c2033ee6d8d279f06532a355c9285aa7fe",
7
- "aiFixturesDigest": "sha256:8355039f14457087d36aee52ae1a0a93096bf12f34bd8af0d948c605b6dff226",
8
- "generatedGoDigest": "sha256:d1a57e9b7b414bc239af4dd897c444bfac08e3bfbb24426d525faad6878d6a26",
9
- "generatedTypeScriptDigest": "sha256:e455c76468808b1191a3d2d774786bb18dc435785d9fa31a559f6b93f3e160c9",
3
+ "repositoryVersion": "0.12.0.0",
4
+ "publishVersion": "0.12.0",
5
+ "publishTag": "v0.12.0",
6
+ "schemasDigest": "sha256:0e90bbd74c5b1df2e0123ec75d8bec1296e9647b95c4aa88a9e9bb2452872bf4",
7
+ "aiFixturesDigest": "sha256:8c406c269e909c028e35eca1321c18de95457ddd6731db8f3fb4cd90726758a8",
8
+ "generatedGoDigest": "sha256:b42e736e80decef8ac00823a1e9a2e6ffe21dc9de43c5c9e1c53ebf467d34e2c",
9
+ "generatedTypeScriptDigest": "sha256:03ed593ff19141cb265436d6d069b86e0a75f3290d74b76689d48c5b37a52e5b",
10
10
  "generatedExclusions": {
11
11
  "gen-go/contract_release.go": "contains the generated aggregate digests (self-reference)",
12
12
  "gen-ts/contract-release.ts": "contains the generated aggregate digests (self-reference)"
13
13
  },
14
14
  "schemas": {
15
- "schema/ai-budget-ledger-event.schema.json": "sha256:8396a1b3457bed3496dc7b60fb7fb30f76bbe3c60a20501823a61c75f2fdbafa",
15
+ "schema/ai-budget-ledger-event.schema.json": "sha256:92770bc5358e03a3aae6cd261dad02dfcbbb06a6203566da2c6c7a5e63dd671c",
16
16
  "schema/ai-callsite-inventory.schema.json": "sha256:b15899a97cf108e4cd1bfd31ec40c57b341590ddb9c118fdaa904215dbe01859",
17
17
  "schema/ai-classification-stamp.schema.json": "sha256:ad7f01dc8bb9a1cd619fce470227914aa3ef2ad57d34bfeaa0c6ef753aa6781d",
18
18
  "schema/ai-composite-policy-digest.schema.json": "sha256:3efccc249327e59f67a37fd954b524ee727a3e28a3c557a46d6ec1f15d69b34e",
@@ -20,12 +20,12 @@
20
20
  "schema/ai-gateway-key-lifecycle-event.schema.json": "sha256:ba5cb862abe73227bee714b25247b4cacb34f11fdd1476bb5f920923fd75e2a9",
21
21
  "schema/ai-gateway-key-lookup.schema.json": "sha256:e994d4782c9bc4f14d3a1c35c9ac1e7a5ec84284cde5b3af7e3e6022130ddbb3",
22
22
  "schema/ai-governance-decision.schema.json": "sha256:4d45c8540908bebb68456c45077c0cd453b416a3b955cc710de270950e090f50",
23
- "schema/ai-metering-policy.schema.json": "sha256:e036885c170ce654740353aaaa01b2a7bcff714e73629123d7865af98c1cf303",
24
- "schema/ai-policy-snapshot.schema.json": "sha256:dde70f30f4a501cfa65fc4d8da954d902e1c4cc966573fbe654eaea7bdeefca9",
25
- "schema/ai-pricing-revision.schema.json": "sha256:75ccb847ac090821d817e92dc98dff49e29620018f8dc465b47f3617585d5b21",
23
+ "schema/ai-metering-policy.schema.json": "sha256:044115938d254d914feac162219d20ee48f741cd7ad32df4613b45f9c862fe8c",
24
+ "schema/ai-policy-snapshot.schema.json": "sha256:1778de5f1a5f6b034e2e767bd8189ad50daa03194107a05e090efafb5dce0cc1",
25
+ "schema/ai-pricing-revision.schema.json": "sha256:847fc3abf93ace82a188b028b067f3c3c1e7452e02a3c9ebba9bfbf3af749fd6",
26
26
  "schema/ai-runtime-binding.schema.json": "sha256:e86cac2f70a474997bdef1577ca15f22982ec0ce866921df3f763c4d7f7fa191",
27
27
  "schema/ai-runtime-contract.schema.json": "sha256:694cf8900ebe07a37ba0f12f50d2eed76e6608dc809e2b65969043e548dc4bba",
28
- "schema/ai-trace-event-v2.schema.json": "sha256:946489fe9d58de5acf4a265d250800b4ad7b08aaacc50b00ef39feabe7aae94e",
28
+ "schema/ai-trace-event-v2.schema.json": "sha256:b479199bb6e44ea23a1da53f69943cb8f3886c433914fdb9bf9e9bdbc3dd767d",
29
29
  "schema/ai-trace-event.schema.json": "sha256:47c2268c9b8dbcf6e7908aeef43e71210f8a309bf4be4acc02139f9b59e7c717",
30
30
  "schema/ai-transform-event.schema.json": "sha256:b845762e653b19afdaf959f7bd1624db490cd10c760daa9aaa61fb83f2a86b6e",
31
31
  "schema/ai-transform-result.schema.json": "sha256:244e380a36957ab2dcb526ea22aaecb56b53664ce1fda6934d0021c084c99133",
@@ -47,19 +47,19 @@
47
47
  "schema/error-category.enum.json": "sha256:e215fe3dc254cf7fca6785f3a12aaeee9d28811b6625916630adda1ed5fc1a14",
48
48
  "schema/error-envelope.schema.json": "sha256:75dccda7dd16fdf8435deda53fc7dbcdc109b65114617a17f11763010c656f90",
49
49
  "schema/kvs-routing-entry.schema.json": "sha256:b75f3a5dfa93a428b2764e03222b66b6ef2bed980f8bac8ffac54afdf3526bc5",
50
- "schema/promotion-request.schema.json": "sha256:6efb55d2b3af8de70829ff9945a2dda6312ff23ce3474fce2fa33ed846681aa6",
50
+ "schema/promotion-request.schema.json": "sha256:560460b57fc639d248fa657a2a1e3d88d27ab9139faf17ee58633b671f8b5072",
51
51
  "schema/promotion-response.schema.json": "sha256:4129712d2e29d6ef21d93d4bd0bacfd60ada3f2ee0ade852824e64346b817634",
52
- "schema/sanitized-binding-evidence.schema.json": "sha256:ddd9c35fc7b9e74f6683e241e4f1fe13bd681143161e1fb3d3011827ecb8809b",
52
+ "schema/sanitized-binding-evidence.schema.json": "sha256:e5ae90ea18950deaefb21c2f05cc28af705cbab447b784dbaf7235b8bcfc9fd6",
53
53
  "schema/secret-reference.schema.json": "sha256:966f7a6d2575b46a4b54804d06dc05c6229ebbcbd9200fe6a6c8d3b4ffb90f9f",
54
54
  "schema/transform-report.schema.json": "sha256:10ba5faa915b3a9327909b0444a163f8e31f51b9f1b3d049ea341e8cedc521e1",
55
55
  "schema/version-state.schema.json": "sha256:e7c4b2e7b615ebb07f36d0df22ded51b2c9688ef9e9bfe79de1d5cd94de9ae40"
56
56
  },
57
57
  "aiFixtures": {
58
58
  "fixtures/ai/adversarial-binding-classification-value.json": "sha256:ca009f3f6162a9d93b4ab416d52c1fba12a8a15aca5aed956c5fdcf2171b1e28",
59
- "fixtures/ai/adversarial-sanitized-binding-relabel.json": "sha256:adee92ca1ed009dd2107bcf66551b5d525b960a12d23251d3b4521a103ea8c40",
60
- "fixtures/ai/valid-binding-classification-subject.json": "sha256:19e9a2ae9496471e2c25c0b210d7ed1e6d3d65286bbf25df0feaab1430ab2172",
59
+ "fixtures/ai/adversarial-sanitized-binding-relabel.json": "sha256:5deba053e91be027588e0a921bc7fcd75363044587b651b9fbb3f986b3a8bc85",
60
+ "fixtures/ai/valid-binding-classification-subject.json": "sha256:ca40d605f3351d44a4b37b598d033d129861443b65044fc056ca4406f07717c6",
61
61
  "fixtures/ai/valid-blocked-trace-event.json": "sha256:c72e753f5ed805d97b47af5cc57ea2fe9034f27b133bf0f5c6565fbc0c6693c1",
62
- "fixtures/ai/valid-budget-ledger-event.json": "sha256:f56ee5339e549da44be1a30ac9ab08e209ff06749910bedfd66f47ef37c92877",
62
+ "fixtures/ai/valid-budget-ledger-event.json": "sha256:a2c1aea4f96fb28c61aa522bd5f5dfb2e1321b003f40fbcbac162d5404685760",
63
63
  "fixtures/ai/valid-classification-stamp.json": "sha256:bf8256cec5626031b4cf5acfe9ffde73100150ba19259c36b274e1be0820bb73",
64
64
  "fixtures/ai/valid-composite-policy-digest.json": "sha256:d13f2d022f9a29230103845b8af42b4f90c0d818ee64e6efaa31f5a547d9eeb7",
65
65
  "fixtures/ai/valid-deployment-gate-decision.json": "sha256:cf070be5b6b4b4363d72aba448c1f23c1eef288e930a7f0a2807598a30a7e0af",
@@ -68,14 +68,15 @@
68
68
  "fixtures/ai/valid-gateway-key-lookup.json": "sha256:a577cbdd019a7f39631e7efdb12dccb4377e3184d626a79979bfc426d04a50f4",
69
69
  "fixtures/ai/valid-governance-decision.json": "sha256:0cd3ffc5244e177af00670c6d839814a93048157cf11ccb738ed13b10d875c55",
70
70
  "fixtures/ai/valid-inventory.json": "sha256:3bb29df5525c3a69f6c13c203fbd08bb3d493ae5416fdd2f99125c74bbc11759",
71
- "fixtures/ai/valid-metering-policy.json": "sha256:791892d2b70b999b6b4eb37ba0db6df579bb4a7dc31411c1edd5fc41f9f10600",
72
- "fixtures/ai/valid-policy-snapshot.json": "sha256:862fb81b2a77f152c5f0d9f04542b8a93e5d0a3d88a518263a550c4ca0047f60",
73
- "fixtures/ai/valid-pricing-revision.json": "sha256:ff7bfdccc1fd4173cf0cf0800fb953e60de55286b0bba557fac9c6a4e5984f81",
71
+ "fixtures/ai/valid-metering-policy.json": "sha256:73d10929f0232a09d31b263c5bf61f8985c9c629e1e78ea5c867dd919ff95c96",
72
+ "fixtures/ai/valid-policy-snapshot.json": "sha256:5ce6df9c261989f7a279eb772ead47d19e425a3e1df78d3a3eeb9043dee04318",
73
+ "fixtures/ai/valid-pricing-revision.json": "sha256:b8a89816a332397257fa0c40e5142ad9f05c9c6cbb92c37ae700f9b61c31fbce",
74
74
  "fixtures/ai/valid-runtime-binding.json": "sha256:df971a518b8e680bb5260e801e7a0b03dd05076aeb11258205ec5ec205719f53",
75
75
  "fixtures/ai/valid-runtime-contract.json": "sha256:a6af61297f2612679112675e9d401685966e58b891720014e3a5176426850006",
76
- "fixtures/ai/valid-sanitized-binding-evidence.json": "sha256:04d4cf233e3ba4d364bdc8a9a191629ff420924947bc4e4509c835e3b263f64a",
76
+ "fixtures/ai/valid-sanitized-binding-evidence-byo-source.json": "sha256:77f258fdb6cb7232b78a62fc035e293c6d604bed438ca35c54ab398064bc053a",
77
+ "fixtures/ai/valid-sanitized-binding-evidence.json": "sha256:19a4994b9a562305854945643a588f4f7c098db4bc3653da26df6e4284b00190",
77
78
  "fixtures/ai/valid-source-revision-digest.json": "sha256:ec32021dbb636de9a1e47d560bfe59c21451e88f67d647387968aba48691409d",
78
- "fixtures/ai/valid-trace-event-v2.json": "sha256:001bc0bfb64bb2c161e10e49347727887302fba067c7a1ced511f17457867451",
79
+ "fixtures/ai/valid-trace-event-v2.json": "sha256:cdf33ae74b9113f0525fc6702aa3f8070605ce0d6352f82040f5bd354ff3c0f3",
79
80
  "fixtures/ai/valid-trace-event.json": "sha256:42451ebfb0dc0c475baf6bc1acc3d1006cc2294df37174764e936519b7d64100",
80
81
  "fixtures/ai/valid-transform-event.json": "sha256:6d99d5f34c010b39b194ff49a4c279d88bc7f05c697bacf088791352ca2d6330",
81
82
  "fixtures/ai/valid-transform-result.json": "sha256:406f6deae648837f7610fda38f6b4c1a1a73b83b7a96f9f427fcf4e2061dee50",
@@ -83,18 +84,18 @@
83
84
  },
84
85
  "generatedGo": {
85
86
  "gen-go/ai_composite_policy_digest_helper.go": "sha256:31b4d9b4afd965b9869acbd3a58527949402f6711f624f2a4f02b3c6e406f71f",
86
- "gen-go/ai_contracts_test.go": "sha256:36da010f3bda80b4c17e8529bc2ae60ff1c44fe6e86411c591ccb14cf899cd2f",
87
+ "gen-go/ai_contracts_test.go": "sha256:5b5aaa331155958ce21d540e9c77a9ef4ca7d072c4ef6f7d9061add1449a7541",
87
88
  "gen-go/ai_gateway_key_token.go": "sha256:859c34383955f21c22589158214df074b74de6907a54bee7c781acfa9dad8679",
88
89
  "gen-go/binding_digest_helpers.go": "sha256:50462ba2beb16c7931dfc7e10302c12c90bf8111788991f74f08a718125dfbfb",
89
90
  "gen-go/contracts_test.go": "sha256:f15c34da8758ab4f81c4ea3f03382010a1a5a83159dd0dc18abc9c543d77951e",
90
91
  "gen-go/doc.go": "sha256:c17bc2d39ed175ce7105c68305f8ae7152f659eb7cd187ecceee7698eb3a65dd",
91
92
  "gen-go/error_category.go": "sha256:e36745796e32f753cf153a76c5f77c4bdf37a6a228e6607abcf95cac6f4a934b",
92
93
  "gen-go/schema_documents.go": "sha256:c0399930c719b93d850847b257186f08d69a527f3ac1286ed0c49b66327b315a",
93
- "gen-go/types.go": "sha256:5e96b744017a6c084e331828c143f1c824e573bca919564ea96d96f78a4fb1d5",
94
+ "gen-go/types.go": "sha256:6e5c65527e748482a9fa44ebdcd4c8122dbb503d8c006b58baa0c18c360dfed7",
94
95
  "gen-go/version_state.go": "sha256:827f8768359998409b86ea02d9ba1a149981928bae7161e4dc95fe0520ce7410"
95
96
  },
96
97
  "generatedTypeScript": {
97
- "gen-ts/ai-budget-ledger-event.ts": "sha256:26454e6adc34b7c202cfb2888753b164b22dcd2d9f7a0b10c835a0db9132f36f",
98
+ "gen-ts/ai-budget-ledger-event.ts": "sha256:64448d98a394e6eb103927cd35ce8a33e30176c0d5ee5afcdd8444f8aa051809",
98
99
  "gen-ts/ai-callsite-inventory.ts": "sha256:2665ffe965056b85a7f03db22071d56ce6d21d306a82a876908d0727ef2315dc",
99
100
  "gen-ts/ai-classification-stamp.ts": "sha256:dce78efba03df86a0986a16fd54c52066d322ff515d2463dbc45cafad82ecb44",
100
101
  "gen-ts/ai-composite-policy-digest-helper.ts": "sha256:d6c51d0c35599ee4f81d605b71773f4fff41a0bb46499ff0c6185072fedf53ce",
@@ -104,12 +105,12 @@
104
105
  "gen-ts/ai-gateway-key-lookup.ts": "sha256:e55fc9a2252d5e7e1a383a58c8b92f22d8147ee4862a893a6cfe815b4225fc00",
105
106
  "gen-ts/ai-gateway-key-token.ts": "sha256:ff6551ad3332cc665878d7ec93f42ce185c375e637531b2fbc82c697b877e784",
106
107
  "gen-ts/ai-governance-decision.ts": "sha256:efc422971a06d741e048c81f299ce258d7fdd4b7f036a2b9dda7aaca0679e950",
107
- "gen-ts/ai-metering-policy.ts": "sha256:7dc951dbc208721de6c881219524c6075c92523e7884e31d934899c36b43f24e",
108
- "gen-ts/ai-policy-snapshot.ts": "sha256:58e53c5468e65b6a229905c21cd05a34935242c4c55564cf292da675a44b3afa",
109
- "gen-ts/ai-pricing-revision.ts": "sha256:87ee18e16ae5fa10f64ceed52e07bb05a4860f4b6303ad678cb0d35d23fdb1d5",
108
+ "gen-ts/ai-metering-policy.ts": "sha256:dd261d57646a509cd46efaefac4aad58d018c7f7da98326dd8859e4ce951c56a",
109
+ "gen-ts/ai-policy-snapshot.ts": "sha256:9a8c65936674a957979048a2a0c6d08c887c87f2c4d5e7e8127dcf31d33eccbc",
110
+ "gen-ts/ai-pricing-revision.ts": "sha256:6e09e8354025dc859023295753ecc3674b5bc198b77317413654f1b7d2327a39",
110
111
  "gen-ts/ai-runtime-binding.ts": "sha256:176c830d400ce44c508f8d249bb3c9724b2d595b78262615487cdafc4790263e",
111
112
  "gen-ts/ai-runtime-contract.ts": "sha256:fc60f5c45edfee7d6f37e99ed9a60e4e5c22bba5793593aa259f028e1c7d0c6e",
112
- "gen-ts/ai-trace-event-v2.ts": "sha256:9c453805316d471eb8acac04f33f931d5a441560a249bef990ec8451606d86b8",
113
+ "gen-ts/ai-trace-event-v2.ts": "sha256:8c994355f290864da1cf42850c3eceb0e4a1567b45ed989de865213430d3ce0e",
113
114
  "gen-ts/ai-trace-event.ts": "sha256:1e714996dc4622e94c6ae144a7bdb09147306940db47ae788aafd6f7f8311b0c",
114
115
  "gen-ts/ai-transform-event.ts": "sha256:c8b520e01ce12b0e3a5ebe03a3ca63cc83368f26e1eef933de732c4fc1c504f9",
115
116
  "gen-ts/ai-transform-result.ts": "sha256:208c66b2aeb425c0cbcc18b7191f6e8989443f2b2c1690648e0e06cc1448ce25",
@@ -134,10 +135,10 @@
134
135
  "gen-ts/error-envelope.ts": "sha256:4457309be794f9d4fc0cf62530cc2d442c007bac9ae84aff66df099cc9e40310",
135
136
  "gen-ts/index.ts": "sha256:cf2c63faf3af73a0b4fb7bac7f51f18b4c72d854a78aef8e4c7625dfc96a27f7",
136
137
  "gen-ts/kvs-routing-entry.ts": "sha256:d92e85ee9f257d77850d1d3aac9438e2055f38084ff84a48fcedae239d47d4ca",
137
- "gen-ts/promotion-request.ts": "sha256:1088cc4244b83a48d9f87c38a63f13ca084ef794f0e9424134c642d82394cd57",
138
+ "gen-ts/promotion-request.ts": "sha256:d0f08925341c4a36d8b049be95682037cb6ee6daaf589a191f6731af4eca17ae",
138
139
  "gen-ts/promotion-response.ts": "sha256:f1c9cafac96faeb02a443a31786f67714e818f38d90108e7af41958396524d6f",
139
140
  "gen-ts/sanitized-binding-digest-helper.ts": "sha256:c47d7fdc20500e2e72c23fe39ecdd610fc397c47fcba51335ebec3c380fe6872",
140
- "gen-ts/sanitized-binding-evidence.ts": "sha256:60744d3377aa336ea7b641e8b2790c25aee7d8e557b7273f57201c6fc4acac18",
141
+ "gen-ts/sanitized-binding-evidence.ts": "sha256:f4b6c31dd9454350da00f443a8a4563e28d21cab6507fbc647cb33118155224c",
141
142
  "gen-ts/secret-reference.ts": "sha256:a8b65de72705b6f51f57cd8ca58881483108005b1fa4d19106c3e9cf1fa877e7",
142
143
  "gen-ts/transform-report.ts": "sha256:154617c0bc4b8e36d7edd07640454c89fad8ec34b02aa85c904c9acd9855a6c3",
143
144
  "gen-ts/version-state-machine.ts": "sha256:4371bc7e2bde86b0447f5242104c576cc160dfd7dae1885acbfb63540f230bdd",
@@ -14,6 +14,10 @@ export interface AiBudgetLedgerEvent {
14
14
  requestId?: AiBudgetIdentifier;
15
15
  amountMicroUsd: number;
16
16
  committedMicroUsdAfter: number;
17
+ holdMicroUsd?: number;
18
+ actualMicroUsd?: number;
19
+ expiresAt?: string;
20
+ pricingRevision?: AiBudgetIdentifier;
17
21
  pricingRevisionDigest?: AiBudgetDigest;
18
22
  supersedesEventId?: AiBudgetIdentifier;
19
23
  eventDigest: AiBudgetDigest;
@@ -1,4 +1,14 @@
1
1
  export type AiMeteringPolicyDigest = string;
2
+ export type AiDimensionLimit = AiDimensionLimit1 & {
3
+ dimension: AiMeteringIdentifier;
4
+ unit: AiMeteringIdentifier;
5
+ maxPerRequest?: number;
6
+ maxPerMinute?: number;
7
+ };
8
+ export type AiDimensionLimit1 = {
9
+ [k: string]: unknown;
10
+ };
11
+ export type AiMeteringIdentifier = string;
2
12
  /**
3
13
  * Additive v2 metering-policy binding. It binds a composite policy to immutable pricing revisions without changing the v1 policy snapshot.
4
14
  */
@@ -11,6 +21,10 @@ export interface AiMeteringPolicy {
11
21
  */
12
22
  pricingRevisionDigests: AiMeteringPolicyDigest[];
13
23
  reservationMode: 'committed_exposure';
24
+ /**
25
+ * @maxItems 64
26
+ */
27
+ dimensionLimits?: AiDimensionLimit[];
14
28
  policyDigestV2: AiMeteringPolicyDigest;
15
29
  publishedAt: string;
16
30
  }
@@ -41,6 +41,15 @@ export type AiPolicyEmbeddedJsonSchema = {
41
41
  minItems?: number;
42
42
  maxItems?: number;
43
43
  };
44
+ export type AiPolicyDimensionLimit = AiPolicyDimensionLimit1 & {
45
+ dimension: AiPolicyIdentifier;
46
+ unit: AiPolicyIdentifier;
47
+ maxPerRequest?: number;
48
+ maxPerMinute?: number;
49
+ };
50
+ export type AiPolicyDimensionLimit1 = {
51
+ [k: string]: unknown;
52
+ };
44
53
  /**
45
54
  * Immutable, content-addressed AI policy snapshot consumed by the Harbour AI Gateway. Provider credentials are represented only by Secrets Manager references.
46
55
  */
@@ -93,19 +102,25 @@ export interface AiPolicyModel {
93
102
  * @minItems 1
94
103
  * @maxItems 2
95
104
  */
96
- capabilities: ('generation' | 'embeddings')[];
105
+ capabilities: ('generation' | 'embeddings' | 'transcription' | 'translation' | 'speech' | 'image' | 'realtime')[];
97
106
  approved: boolean;
98
107
  pricing: AiPolicyPricing;
99
108
  }
100
109
  export interface AiPolicyPricing {
101
110
  revision: AiPolicyIdentifier;
111
+ revisionDigest?: AiPolicyDigest;
102
112
  inputMicroUsdPerMillion: number;
103
113
  outputMicroUsdPerMillion: number;
114
+ mediaMicroUsdPerUnit?: {
115
+ audio_seconds?: number;
116
+ image_count?: number;
117
+ video_seconds?: number;
118
+ };
104
119
  }
105
120
  export interface AiPolicyRoute {
106
121
  alias: AiPolicyIdentifier;
107
122
  version: number;
108
- capability: 'generation' | 'embeddings';
123
+ capability: 'generation' | 'embeddings' | 'transcription' | 'translation' | 'speech' | 'image' | 'realtime';
109
124
  /**
110
125
  * @minItems 1
111
126
  * @maxItems 16
@@ -154,6 +169,10 @@ export interface AiPolicyLimit {
154
169
  requestsPerMinute: number;
155
170
  tokensPerMinute: number;
156
171
  monthlyBudgetMicroUsd: number;
172
+ /**
173
+ * @maxItems 64
174
+ */
175
+ dimensionLimits?: AiPolicyDimensionLimit[];
157
176
  }
158
177
  export interface AiPolicyRetention {
159
178
  captureMode: 'OFF' | 'BEST_EFFORT' | 'REQUIRED';
@@ -1,7 +1,7 @@
1
1
  export type AiPricingIdentifier = string;
2
2
  export type AiPricingDigest = string;
3
3
  /**
4
- * Immutable v2 line-item pricing revision. A correction is a new revision; published records are never edited.
4
+ * Immutable v2 line-item pricing revision for token and media dimensions. A correction is a new revision; published records are never edited.
5
5
  */
6
6
  export interface AiPricingRevision {
7
7
  schema: 'harbour.ai-pricing-revision/2.0';
@@ -1,7 +1,7 @@
1
1
  export type AiTraceV2Digest = string;
2
2
  export type AiTraceV2Identifier = string;
3
3
  /**
4
- * Additive metering projection linked to a readable v1 trace. It carries dimension-level reported or estimated usage without changing the v1 event.
4
+ * Additive metering projection linked to a readable v1 trace. It carries dimension-level reported or estimated usage (including audio, image and input-video media) without changing the v1 event.
5
5
  */
6
6
  export interface AiTraceEventV2 {
7
7
  schema: 'harbour.ai-trace-event/2.0';
@@ -16,6 +16,10 @@ export interface AiTraceEventV2 {
16
16
  totalCostMicroUsd: number;
17
17
  reservationId?: string;
18
18
  meteringStatus: 'settled' | 'reserved' | 'unknown' | 'repaired';
19
+ servedModel?: string;
20
+ ingressFormat?: 'openai' | 'gemini';
21
+ identityFastPath?: boolean;
22
+ versionOrdinalVerified?: boolean;
19
23
  occurredAt: string;
20
24
  }
21
25
  export interface UsageLineItem {
@@ -24,6 +28,7 @@ export interface UsageLineItem {
24
28
  direction: 'input' | 'output';
25
29
  quantity: number;
26
30
  unit: AiTraceV2Identifier;
31
+ priceRevision?: AiTraceV2Identifier;
27
32
  priceRevisionDigest: AiTraceV2Digest;
28
33
  scale: number;
29
34
  costMicroUsd: number;
@@ -1,7 +1,7 @@
1
- export declare const ContractRepositoryVersion: "0.10.0.0";
2
- export declare const ContractPublishVersion: "0.10.0";
3
- export declare const ContractPublishTag: "v0.10.0";
4
- export declare const ContractSchemasDigest: "sha256:e22fd6329b9064a3d653dbc6bc3ee0c2033ee6d8d279f06532a355c9285aa7fe";
5
- export declare const ContractAiFixturesDigest: "sha256:8355039f14457087d36aee52ae1a0a93096bf12f34bd8af0d948c605b6dff226";
6
- export declare const ContractGeneratedGoDigest: "sha256:d1a57e9b7b414bc239af4dd897c444bfac08e3bfbb24426d525faad6878d6a26";
7
- export declare const ContractGeneratedTypeScriptDigest: "sha256:e455c76468808b1191a3d2d774786bb18dc435785d9fa31a559f6b93f3e160c9";
1
+ export declare const ContractRepositoryVersion: "0.12.0.0";
2
+ export declare const ContractPublishVersion: "0.12.0";
3
+ export declare const ContractPublishTag: "v0.12.0";
4
+ export declare const ContractSchemasDigest: "sha256:0e90bbd74c5b1df2e0123ec75d8bec1296e9647b95c4aa88a9e9bb2452872bf4";
5
+ export declare const ContractAiFixturesDigest: "sha256:8c406c269e909c028e35eca1321c18de95457ddd6731db8f3fb4cd90726758a8";
6
+ export declare const ContractGeneratedGoDigest: "sha256:b42e736e80decef8ac00823a1e9a2e6ffe21dc9de43c5c9e1c53ebf467d34e2c";
7
+ export declare const ContractGeneratedTypeScriptDigest: "sha256:03ed593ff19141cb265436d6d069b86e0a75f3290d74b76689d48c5b37a52e5b";
@@ -1,9 +1,9 @@
1
1
  /* eslint-disable */
2
2
  // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
- export const ContractRepositoryVersion = "0.10.0.0";
4
- export const ContractPublishVersion = "0.10.0";
5
- export const ContractPublishTag = "v0.10.0";
6
- export const ContractSchemasDigest = "sha256:e22fd6329b9064a3d653dbc6bc3ee0c2033ee6d8d279f06532a355c9285aa7fe";
7
- export const ContractAiFixturesDigest = "sha256:8355039f14457087d36aee52ae1a0a93096bf12f34bd8af0d948c605b6dff226";
8
- export const ContractGeneratedGoDigest = "sha256:d1a57e9b7b414bc239af4dd897c444bfac08e3bfbb24426d525faad6878d6a26";
9
- export const ContractGeneratedTypeScriptDigest = "sha256:e455c76468808b1191a3d2d774786bb18dc435785d9fa31a559f6b93f3e160c9";
3
+ export const ContractRepositoryVersion = "0.12.0.0";
4
+ export const ContractPublishVersion = "0.12.0";
5
+ export const ContractPublishTag = "v0.12.0";
6
+ export const ContractSchemasDigest = "sha256:0e90bbd74c5b1df2e0123ec75d8bec1296e9647b95c4aa88a9e9bb2452872bf4";
7
+ export const ContractAiFixturesDigest = "sha256:8c406c269e909c028e35eca1321c18de95457ddd6731db8f3fb4cd90726758a8";
8
+ export const ContractGeneratedGoDigest = "sha256:b42e736e80decef8ac00823a1e9a2e6ffe21dc9de43c5c9e1c53ebf467d34e2c";
9
+ export const ContractGeneratedTypeScriptDigest = "sha256:03ed593ff19141cb265436d6d069b86e0a75f3290d74b76689d48c5b37a52e5b";
@@ -37,7 +37,7 @@ export interface PromotionRequestEnvironmentBindings {
37
37
  bindings: PromotionRequestSecretBinding[];
38
38
  }
39
39
  /**
40
- * One secret binding. Unlike the preview counterpart there is no `value` member and `secretRef` is required, so a plain literal is unrepresentable on the promotion path rather than merely refused by the handler. The secretRef pattern admits only the app-secret shape, which is what keeps a promotion from naming a tenant integration credential.
40
+ * One secret binding. Unlike the preview counterpart there is no `value` member and `secretRef` is required, so a plain literal is unrepresentable on the promotion path rather than merely refused by the handler. The secretRef pattern admits only app secrets, app-scoped minted data-source credentials and tenant-scoped source credentials from an approved BYO grant; integration and provider credentials remain unrepresentable.
41
41
  */
42
42
  export interface PromotionRequestSecretBinding {
43
43
  /**
@@ -45,7 +45,7 @@ export interface PromotionRequestSecretBinding {
45
45
  */
46
46
  name: string;
47
47
  /**
48
- * Governance reference the deployment plane resolves. The value never appears in the request, in this schema, or in any record derived from it.
48
+ * Governance app secret, app-scoped minted data-source credential, or approved tenant-source credential reference the deployment plane resolves. The value never appears in the request, in this schema, or in any record derived from it.
49
49
  */
50
50
  secretRef: string;
51
51
  }
@@ -9,13 +9,13 @@ export type SanitizedRuntimeBinding = {
9
9
  */
10
10
  value?: string;
11
11
  /**
12
- * Value-free app-secret reference; tenant integration and provider credential references are outside this contract.
12
+ * Value-free app secret, app-scoped minted data-source credential, or approved tenant-source credential reference. Integration and provider credential references are outside this contract.
13
13
  */
14
14
  secretRef?: string;
15
15
  };
16
16
  export type SanitizedBindingProviderId = 'openai' | 'anthropic' | 'gemini' | 'openrouter';
17
17
  /**
18
- * Immutable DCP allocation receipt and sanitized runtime-binding set for one exact allocated version and normalized source revision. DCP persists this evidence atomically with version admission before publish or provisioning. classificationDigest chains to the caller's pre-allocation BindingClassificationSubject; bindings contain only approved configuration or app-secret bindings and never an AI-mapping-owned provider credential.
18
+ * Immutable DCP allocation receipt and sanitized runtime-binding set for one exact allocated version and normalized source revision. DCP persists this evidence atomically with version admission before publish or provisioning. classificationDigest chains to the caller's pre-allocation BindingClassificationSubject; bindings contain only approved configuration, app secrets or approved data-source credential references and never an AI-mapping-owned provider credential.
19
19
  */
20
20
  export interface SanitizedBindingEvidence {
21
21
  schema: 'harbour.sanitized-binding-evidence/1.0';
@@ -7,8 +7,12 @@
7
7
  "sourceRef": "https://github.com/Fourier-Labs-AI/support-copilot",
8
8
  "sourceRevision": "git-sha1:0123456789abcdef0123456789abcdef01234567",
9
9
  "sourceRevisionDigest": "sha256:79520355eb30e88bb0c6656008dd301d8f3d7cef6c14a96882557f13f7c512d9",
10
- "classificationDigest": "sha256:43622df1d8bc3660a160a120f9af896cfc9c98009547869895b47d4c61a29688",
10
+ "classificationDigest": "sha256:7964fa768ff21ffa49336ee7a205efd6fdb72b6a888e165e1facbff24dfd8b24",
11
11
  "bindings": {
12
+ "DATABASE_URL": {
13
+ "kind": "secret",
14
+ "secretRef": "secretref://tenant/fourier/app/support-copilot/source/warehouse"
15
+ },
12
16
  "LOG_LEVEL": {
13
17
  "kind": "configuration",
14
18
  "value": "debug"
@@ -28,5 +32,5 @@
28
32
  "providerId": "openai"
29
33
  }
30
34
  },
31
- "sanitizedBindingDigest": "sha256:2cc57565f45a645f96060c046d27e313531f34ff7d8dc24732b5f85572ca12a8"
35
+ "sanitizedBindingDigest": "sha256:c5e6463a88949e6693a2c398a27e4eb48434654d9136f9a8c589d244102ec600"
32
36
  }
@@ -16,6 +16,10 @@
16
16
  "category": "api_key",
17
17
  "requestedAiMappingId": "anthropic-messages-v1"
18
18
  },
19
+ "DATABASE_URL": {
20
+ "kind": "secret",
21
+ "confidence": "high"
22
+ },
19
23
  "LOG_LEVEL": {
20
24
  "kind": "configuration",
21
25
  "confidence": "high"
@@ -42,5 +46,5 @@
42
46
  "providerId": "openai"
43
47
  }
44
48
  },
45
- "classificationDigest": "sha256:43622df1d8bc3660a160a120f9af896cfc9c98009547869895b47d4c61a29688"
49
+ "classificationDigest": "sha256:7964fa768ff21ffa49336ee7a205efd6fdb72b6a888e165e1facbff24dfd8b24"
46
50
  }
@@ -9,6 +9,10 @@
9
9
  "requestId": "req_example123",
10
10
  "amountMicroUsd": 500,
11
11
  "committedMicroUsdAfter": 10500,
12
+ "holdMicroUsd": 500,
13
+ "actualMicroUsd": 0,
14
+ "expiresAt": "2026-08-10T10:15:00Z",
15
+ "pricingRevision": "gemini-flash-2026-08-10",
12
16
  "pricingRevisionDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
13
17
  "eventDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
14
18
  "occurredAt": "2026-08-10T10:00:00Z"
@@ -3,6 +3,11 @@
3
3
  "policyDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
4
  "pricingRevisionDigests": ["sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"],
5
5
  "reservationMode": "committed_exposure",
6
+ "dimensionLimits": [
7
+ { "dimension": "audio_in", "unit": "seconds", "maxPerRequest": 3600, "maxPerMinute": 7200 },
8
+ { "dimension": "image_in", "unit": "count", "maxPerRequest": 16 },
9
+ { "dimension": "video_in", "unit": "seconds", "maxPerRequest": 300 }
10
+ ],
6
11
  "policyDigestV2": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
7
12
  "publishedAt": "2026-08-10T09:00:00Z"
8
13
  }
@@ -28,12 +28,18 @@
28
28
  "id": "openai-gpt-4.1-mini",
29
29
  "providerId": "openai-primary",
30
30
  "providerModel": "gpt-4.1-mini",
31
- "capabilities": ["generation"],
31
+ "capabilities": ["generation", "image"],
32
32
  "approved": true,
33
33
  "pricing": {
34
34
  "revision": "openai-gpt-4.1-mini-2026-08-01",
35
+ "revisionDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
35
36
  "inputMicroUsdPerMillion": 400000,
36
- "outputMicroUsdPerMillion": 1600000
37
+ "outputMicroUsdPerMillion": 1600000,
38
+ "mediaMicroUsdPerUnit": {
39
+ "audio_seconds": 4,
40
+ "image_count": 40,
41
+ "video_seconds": 5
42
+ }
37
43
  }
38
44
  }
39
45
  ],
@@ -106,7 +112,12 @@
106
112
  "scope": "application",
107
113
  "requestsPerMinute": 60,
108
114
  "tokensPerMinute": 100000,
109
- "monthlyBudgetMicroUsd": 100000000
115
+ "monthlyBudgetMicroUsd": 100000000,
116
+ "dimensionLimits": [
117
+ { "dimension": "audio_in", "unit": "seconds", "maxPerRequest": 3600 },
118
+ { "dimension": "image_in", "unit": "count", "maxPerRequest": 16 },
119
+ { "dimension": "video_in", "unit": "seconds", "maxPerRequest": 300 }
120
+ ]
110
121
  }
111
122
  ],
112
123
  "retention": {
@@ -5,8 +5,11 @@
5
5
  "providerModel": "gpt-test",
6
6
  "currency": "USD",
7
7
  "dimensions": [
8
- { "dimension": "tokens", "direction": "input", "unit": "token", "scale": 1000000, "microUsdPerScale": 100000 },
9
- { "dimension": "tokens", "direction": "output", "unit": "token", "scale": 1000000, "microUsdPerScale": 200000 }
8
+ { "dimension": "input_tokens", "direction": "input", "unit": "tokens", "scale": 1000000, "microUsdPerScale": 100000 },
9
+ { "dimension": "output_tokens", "direction": "output", "unit": "tokens", "scale": 1000000, "microUsdPerScale": 200000 },
10
+ { "dimension": "audio_in", "direction": "input", "unit": "seconds", "scale": 1, "microUsdPerScale": 4 },
11
+ { "dimension": "image_in", "direction": "input", "unit": "count", "scale": 1, "microUsdPerScale": 40 },
12
+ { "dimension": "video_in", "direction": "input", "unit": "seconds", "scale": 1, "microUsdPerScale": 5 }
10
13
  ],
11
14
  "revisionDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
12
15
  "effectiveAt": "2026-08-10T00:00:00Z",
@@ -0,0 +1,36 @@
1
+ {
2
+ "schema": "harbour.sanitized-binding-evidence/1.0",
3
+ "tenantId": "fourier",
4
+ "appId": "support-copilot",
5
+ "environment": "preview",
6
+ "versionId": "fourier#support-copilot#preview#123456",
7
+ "sourceRef": "https://github.com/Fourier-Labs-AI/support-copilot",
8
+ "sourceRevision": "git-sha1:0123456789abcdef0123456789abcdef01234567",
9
+ "sourceRevisionDigest": "sha256:79520355eb30e88bb0c6656008dd301d8f3d7cef6c14a96882557f13f7c512d9",
10
+ "classificationDigest": "sha256:7964fa768ff21ffa49336ee7a205efd6fdb72b6a888e165e1facbff24dfd8b24",
11
+ "bindings": {
12
+ "DATABASE_URL": {
13
+ "kind": "secret",
14
+ "secretRef": "secretref://tenant/fourier/source/warehouse"
15
+ },
16
+ "LOG_LEVEL": {
17
+ "kind": "configuration",
18
+ "value": "debug"
19
+ },
20
+ "STRIPE_API_KEY": {
21
+ "kind": "secret",
22
+ "secretRef": "secretref://tenant/fourier/app/support-copilot/secret/STRIPE_API_KEY"
23
+ }
24
+ },
25
+ "requiredAiMappings": {
26
+ "anthropic-messages-v1": {
27
+ "mappingVersion": "1.0.0",
28
+ "providerId": "anthropic"
29
+ },
30
+ "openai-responses-v1": {
31
+ "mappingVersion": "1.0.0",
32
+ "providerId": "openai"
33
+ }
34
+ },
35
+ "sanitizedBindingDigest": "sha256:181ecf7a3bab337755da186c04a3d5dcacb47efb8a01559f53242a3c66132aa5"
36
+ }
@@ -7,8 +7,12 @@
7
7
  "sourceRef": "https://github.com/Fourier-Labs-AI/support-copilot",
8
8
  "sourceRevision": "git-sha1:0123456789abcdef0123456789abcdef01234567",
9
9
  "sourceRevisionDigest": "sha256:79520355eb30e88bb0c6656008dd301d8f3d7cef6c14a96882557f13f7c512d9",
10
- "classificationDigest": "sha256:43622df1d8bc3660a160a120f9af896cfc9c98009547869895b47d4c61a29688",
10
+ "classificationDigest": "sha256:7964fa768ff21ffa49336ee7a205efd6fdb72b6a888e165e1facbff24dfd8b24",
11
11
  "bindings": {
12
+ "DATABASE_URL": {
13
+ "kind": "secret",
14
+ "secretRef": "secretref://tenant/fourier/app/support-copilot/source/warehouse"
15
+ },
12
16
  "LOG_LEVEL": {
13
17
  "kind": "configuration",
14
18
  "value": "debug"
@@ -28,5 +32,5 @@
28
32
  "providerId": "openai"
29
33
  }
30
34
  },
31
- "sanitizedBindingDigest": "sha256:2cc57565f45a645f96060c046d27e313531f34ff7d8dc24732b5f85572ca12a8"
35
+ "sanitizedBindingDigest": "sha256:c5e6463a88949e6693a2c398a27e4eb48434654d9136f9a8c589d244102ec600"
32
36
  }
@@ -7,18 +7,59 @@
7
7
  "usageLineItems": [
8
8
  {
9
9
  "attempt": 1,
10
- "dimension": "tokens",
10
+ "dimension": "input_tokens",
11
11
  "direction": "input",
12
12
  "quantity": 120,
13
- "unit": "token",
13
+ "unit": "tokens",
14
+ "priceRevision": "gemini-flash-2026-08-10",
14
15
  "priceRevisionDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
15
16
  "scale": 1000000,
16
17
  "costMicroUsd": 12,
17
18
  "provenance": "reported"
19
+ },
20
+ {
21
+ "attempt": 1,
22
+ "dimension": "audio_in",
23
+ "direction": "input",
24
+ "quantity": 30,
25
+ "unit": "seconds",
26
+ "priceRevision": "gemini-flash-2026-08-10",
27
+ "priceRevisionDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
28
+ "scale": 1,
29
+ "costMicroUsd": 120,
30
+ "provenance": "reported"
31
+ },
32
+ {
33
+ "attempt": 1,
34
+ "dimension": "image_in",
35
+ "direction": "input",
36
+ "quantity": 2,
37
+ "unit": "count",
38
+ "priceRevision": "gemini-flash-2026-08-10",
39
+ "priceRevisionDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
40
+ "scale": 1,
41
+ "costMicroUsd": 80,
42
+ "provenance": "reported"
43
+ },
44
+ {
45
+ "attempt": 1,
46
+ "dimension": "video_in",
47
+ "direction": "input",
48
+ "quantity": 12,
49
+ "unit": "seconds",
50
+ "priceRevision": "gemini-flash-2026-08-10",
51
+ "priceRevisionDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
52
+ "scale": 1,
53
+ "costMicroUsd": 60,
54
+ "provenance": "estimated"
18
55
  }
19
56
  ],
20
- "totalCostMicroUsd": 12,
57
+ "totalCostMicroUsd": 272,
21
58
  "reservationId": "req_example123#budget",
22
59
  "meteringStatus": "settled",
60
+ "servedModel": "gemini-2.5-flash",
61
+ "ingressFormat": "gemini",
62
+ "identityFastPath": true,
63
+ "versionOrdinalVerified": true,
23
64
  "occurredAt": "2026-08-10T10:00:00Z"
24
65
  }
@@ -18,6 +18,10 @@ export interface AiBudgetLedgerEvent {
18
18
  requestId?: AiBudgetIdentifier;
19
19
  amountMicroUsd: number;
20
20
  committedMicroUsdAfter: number;
21
+ holdMicroUsd?: number;
22
+ actualMicroUsd?: number;
23
+ expiresAt?: string;
24
+ pricingRevision?: AiBudgetIdentifier;
21
25
  pricingRevisionDigest?: AiBudgetDigest;
22
26
  supersedesEventId?: AiBudgetIdentifier;
23
27
  eventDigest: AiBudgetDigest;
@@ -2,6 +2,16 @@
2
2
  // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
3
 
4
4
  export type AiMeteringPolicyDigest = string;
5
+ export type AiDimensionLimit = AiDimensionLimit1 & {
6
+ dimension: AiMeteringIdentifier;
7
+ unit: AiMeteringIdentifier;
8
+ maxPerRequest?: number;
9
+ maxPerMinute?: number;
10
+ };
11
+ export type AiDimensionLimit1 = {
12
+ [k: string]: unknown;
13
+ };
14
+ export type AiMeteringIdentifier = string;
5
15
 
6
16
  /**
7
17
  * Additive v2 metering-policy binding. It binds a composite policy to immutable pricing revisions without changing the v1 policy snapshot.
@@ -15,6 +25,10 @@ export interface AiMeteringPolicy {
15
25
  */
16
26
  pricingRevisionDigests: AiMeteringPolicyDigest[];
17
27
  reservationMode: 'committed_exposure';
28
+ /**
29
+ * @maxItems 64
30
+ */
31
+ dimensionLimits?: AiDimensionLimit[];
18
32
  policyDigestV2: AiMeteringPolicyDigest;
19
33
  publishedAt: string;
20
34
  }
@@ -44,6 +44,15 @@ export type AiPolicyEmbeddedJsonSchema = {
44
44
  minItems?: number;
45
45
  maxItems?: number;
46
46
  };
47
+ export type AiPolicyDimensionLimit = AiPolicyDimensionLimit1 & {
48
+ dimension: AiPolicyIdentifier;
49
+ unit: AiPolicyIdentifier;
50
+ maxPerRequest?: number;
51
+ maxPerMinute?: number;
52
+ };
53
+ export type AiPolicyDimensionLimit1 = {
54
+ [k: string]: unknown;
55
+ };
47
56
 
48
57
  /**
49
58
  * Immutable, content-addressed AI policy snapshot consumed by the Harbour AI Gateway. Provider credentials are represented only by Secrets Manager references.
@@ -97,19 +106,25 @@ export interface AiPolicyModel {
97
106
  * @minItems 1
98
107
  * @maxItems 2
99
108
  */
100
- capabilities: ('generation' | 'embeddings')[];
109
+ capabilities: ('generation' | 'embeddings' | 'transcription' | 'translation' | 'speech' | 'image' | 'realtime')[];
101
110
  approved: boolean;
102
111
  pricing: AiPolicyPricing;
103
112
  }
104
113
  export interface AiPolicyPricing {
105
114
  revision: AiPolicyIdentifier;
115
+ revisionDigest?: AiPolicyDigest;
106
116
  inputMicroUsdPerMillion: number;
107
117
  outputMicroUsdPerMillion: number;
118
+ mediaMicroUsdPerUnit?: {
119
+ audio_seconds?: number;
120
+ image_count?: number;
121
+ video_seconds?: number;
122
+ };
108
123
  }
109
124
  export interface AiPolicyRoute {
110
125
  alias: AiPolicyIdentifier;
111
126
  version: number;
112
- capability: 'generation' | 'embeddings';
127
+ capability: 'generation' | 'embeddings' | 'transcription' | 'translation' | 'speech' | 'image' | 'realtime';
113
128
  /**
114
129
  * @minItems 1
115
130
  * @maxItems 16
@@ -158,6 +173,10 @@ export interface AiPolicyLimit {
158
173
  requestsPerMinute: number;
159
174
  tokensPerMinute: number;
160
175
  monthlyBudgetMicroUsd: number;
176
+ /**
177
+ * @maxItems 64
178
+ */
179
+ dimensionLimits?: AiPolicyDimensionLimit[];
161
180
  }
162
181
  export interface AiPolicyRetention {
163
182
  captureMode: 'OFF' | 'BEST_EFFORT' | 'REQUIRED';
@@ -5,7 +5,7 @@ export type AiPricingIdentifier = string;
5
5
  export type AiPricingDigest = string;
6
6
 
7
7
  /**
8
- * Immutable v2 line-item pricing revision. A correction is a new revision; published records are never edited.
8
+ * Immutable v2 line-item pricing revision for token and media dimensions. A correction is a new revision; published records are never edited.
9
9
  */
10
10
  export interface AiPricingRevision {
11
11
  schema: 'harbour.ai-pricing-revision/2.0';
@@ -5,7 +5,7 @@ export type AiTraceV2Digest = string;
5
5
  export type AiTraceV2Identifier = string;
6
6
 
7
7
  /**
8
- * Additive metering projection linked to a readable v1 trace. It carries dimension-level reported or estimated usage without changing the v1 event.
8
+ * Additive metering projection linked to a readable v1 trace. It carries dimension-level reported or estimated usage (including audio, image and input-video media) without changing the v1 event.
9
9
  */
10
10
  export interface AiTraceEventV2 {
11
11
  schema: 'harbour.ai-trace-event/2.0';
@@ -20,6 +20,10 @@ export interface AiTraceEventV2 {
20
20
  totalCostMicroUsd: number;
21
21
  reservationId?: string;
22
22
  meteringStatus: 'settled' | 'reserved' | 'unknown' | 'repaired';
23
+ servedModel?: string;
24
+ ingressFormat?: 'openai' | 'gemini';
25
+ identityFastPath?: boolean;
26
+ versionOrdinalVerified?: boolean;
23
27
  occurredAt: string;
24
28
  }
25
29
  export interface UsageLineItem {
@@ -28,6 +32,7 @@ export interface UsageLineItem {
28
32
  direction: 'input' | 'output';
29
33
  quantity: number;
30
34
  unit: AiTraceV2Identifier;
35
+ priceRevision?: AiTraceV2Identifier;
31
36
  priceRevisionDigest: AiTraceV2Digest;
32
37
  scale: number;
33
38
  costMicroUsd: number;
@@ -1,10 +1,10 @@
1
1
  /* eslint-disable */
2
2
  // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
3
 
4
- export const ContractRepositoryVersion = "0.10.0.0" as const;
5
- export const ContractPublishVersion = "0.10.0" as const;
6
- export const ContractPublishTag = "v0.10.0" as const;
7
- export const ContractSchemasDigest = "sha256:e22fd6329b9064a3d653dbc6bc3ee0c2033ee6d8d279f06532a355c9285aa7fe" as const;
8
- export const ContractAiFixturesDigest = "sha256:8355039f14457087d36aee52ae1a0a93096bf12f34bd8af0d948c605b6dff226" as const;
9
- export const ContractGeneratedGoDigest = "sha256:d1a57e9b7b414bc239af4dd897c444bfac08e3bfbb24426d525faad6878d6a26" as const;
10
- export const ContractGeneratedTypeScriptDigest = "sha256:e455c76468808b1191a3d2d774786bb18dc435785d9fa31a559f6b93f3e160c9" as const;
4
+ export const ContractRepositoryVersion = "0.12.0.0" as const;
5
+ export const ContractPublishVersion = "0.12.0" as const;
6
+ export const ContractPublishTag = "v0.12.0" as const;
7
+ export const ContractSchemasDigest = "sha256:0e90bbd74c5b1df2e0123ec75d8bec1296e9647b95c4aa88a9e9bb2452872bf4" as const;
8
+ export const ContractAiFixturesDigest = "sha256:8c406c269e909c028e35eca1321c18de95457ddd6731db8f3fb4cd90726758a8" as const;
9
+ export const ContractGeneratedGoDigest = "sha256:b42e736e80decef8ac00823a1e9a2e6ffe21dc9de43c5c9e1c53ebf467d34e2c" as const;
10
+ export const ContractGeneratedTypeScriptDigest = "sha256:03ed593ff19141cb265436d6d069b86e0a75f3290d74b76689d48c5b37a52e5b" as const;
@@ -41,7 +41,7 @@ export interface PromotionRequestEnvironmentBindings {
41
41
  bindings: PromotionRequestSecretBinding[];
42
42
  }
43
43
  /**
44
- * One secret binding. Unlike the preview counterpart there is no `value` member and `secretRef` is required, so a plain literal is unrepresentable on the promotion path rather than merely refused by the handler. The secretRef pattern admits only the app-secret shape, which is what keeps a promotion from naming a tenant integration credential.
44
+ * One secret binding. Unlike the preview counterpart there is no `value` member and `secretRef` is required, so a plain literal is unrepresentable on the promotion path rather than merely refused by the handler. The secretRef pattern admits only app secrets, app-scoped minted data-source credentials and tenant-scoped source credentials from an approved BYO grant; integration and provider credentials remain unrepresentable.
45
45
  */
46
46
  export interface PromotionRequestSecretBinding {
47
47
  /**
@@ -49,7 +49,7 @@ export interface PromotionRequestSecretBinding {
49
49
  */
50
50
  name: string;
51
51
  /**
52
- * Governance reference the deployment plane resolves. The value never appears in the request, in this schema, or in any record derived from it.
52
+ * Governance app secret, app-scoped minted data-source credential, or approved tenant-source credential reference the deployment plane resolves. The value never appears in the request, in this schema, or in any record derived from it.
53
53
  */
54
54
  secretRef: string;
55
55
  }
@@ -12,14 +12,14 @@ export type SanitizedRuntimeBinding = {
12
12
  */
13
13
  value?: string;
14
14
  /**
15
- * Value-free app-secret reference; tenant integration and provider credential references are outside this contract.
15
+ * Value-free app secret, app-scoped minted data-source credential, or approved tenant-source credential reference. Integration and provider credential references are outside this contract.
16
16
  */
17
17
  secretRef?: string;
18
18
  };
19
19
  export type SanitizedBindingProviderId = 'openai' | 'anthropic' | 'gemini' | 'openrouter';
20
20
 
21
21
  /**
22
- * Immutable DCP allocation receipt and sanitized runtime-binding set for one exact allocated version and normalized source revision. DCP persists this evidence atomically with version admission before publish or provisioning. classificationDigest chains to the caller's pre-allocation BindingClassificationSubject; bindings contain only approved configuration or app-secret bindings and never an AI-mapping-owned provider credential.
22
+ * Immutable DCP allocation receipt and sanitized runtime-binding set for one exact allocated version and normalized source revision. DCP persists this evidence atomically with version admission before publish or provisioning. classificationDigest chains to the caller's pre-allocation BindingClassificationSubject; bindings contain only approved configuration, app secrets or approved data-source credential references and never an AI-mapping-owned provider credential.
23
23
  */
24
24
  export interface SanitizedBindingEvidence {
25
25
  schema: 'harbour.sanitized-binding-evidence/1.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fourier-labs/harbour-contracts",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "description": "Single source of truth for every data shape that crosses a boundary between Harbour components.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -17,6 +17,10 @@
17
17
  "requestId": { "$ref": "#/definitions/AiBudgetIdentifier" },
18
18
  "amountMicroUsd": { "type": "integer" },
19
19
  "committedMicroUsdAfter": { "type": "integer", "minimum": 0 },
20
+ "holdMicroUsd": { "type": "integer", "minimum": 0 },
21
+ "actualMicroUsd": { "type": "integer", "minimum": 0 },
22
+ "expiresAt": { "type": "string", "format": "date-time" },
23
+ "pricingRevision": { "$ref": "#/definitions/AiBudgetIdentifier" },
20
24
  "pricingRevisionDigest": { "$ref": "#/definitions/AiBudgetDigest" },
21
25
  "supersedesEventId": { "$ref": "#/definitions/AiBudgetIdentifier" },
22
26
  "eventDigest": { "$ref": "#/definitions/AiBudgetDigest" },
@@ -11,8 +11,24 @@
11
11
  "policyDigest": { "$ref": "#/definitions/AiMeteringPolicyDigest" },
12
12
  "pricingRevisionDigests": { "type": "array", "minItems": 1, "maxItems": 512, "uniqueItems": true, "items": { "$ref": "#/definitions/AiMeteringPolicyDigest" } },
13
13
  "reservationMode": { "type": "string", "const": "committed_exposure" },
14
+ "dimensionLimits": { "type": "array", "maxItems": 64, "items": { "$ref": "#/definitions/AiDimensionLimit" } },
14
15
  "policyDigestV2": { "$ref": "#/definitions/AiMeteringPolicyDigest" },
15
16
  "publishedAt": { "type": "string", "format": "date-time" }
16
17
  },
17
- "definitions": { "AiMeteringPolicyDigest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" } }
18
+ "definitions": {
19
+ "AiMeteringPolicyDigest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
20
+ "AiMeteringIdentifier": { "type": "string", "minLength": 1, "maxLength": 160, "pattern": "^[A-Za-z0-9][A-Za-z0-9_.@/-]*$" },
21
+ "AiDimensionLimit": {
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": ["dimension", "unit"],
25
+ "properties": {
26
+ "dimension": { "$ref": "#/definitions/AiMeteringIdentifier" },
27
+ "unit": { "$ref": "#/definitions/AiMeteringIdentifier" },
28
+ "maxPerRequest": { "type": "integer", "minimum": 0 },
29
+ "maxPerMinute": { "type": "integer", "minimum": 0 }
30
+ },
31
+ "anyOf": [{ "required": ["maxPerRequest"] }, { "required": ["maxPerMinute"] }]
32
+ }
33
+ }
18
34
  }
@@ -124,8 +124,18 @@
124
124
  "required": ["revision", "inputMicroUsdPerMillion", "outputMicroUsdPerMillion"],
125
125
  "properties": {
126
126
  "revision": { "$ref": "#/definitions/AiPolicyIdentifier" },
127
+ "revisionDigest": { "$ref": "#/definitions/AiPolicyDigest" },
127
128
  "inputMicroUsdPerMillion": { "type": "integer", "minimum": 0 },
128
- "outputMicroUsdPerMillion": { "type": "integer", "minimum": 0 }
129
+ "outputMicroUsdPerMillion": { "type": "integer", "minimum": 0 },
130
+ "mediaMicroUsdPerUnit": {
131
+ "type": "object",
132
+ "additionalProperties": false,
133
+ "properties": {
134
+ "audio_seconds": { "type": "integer", "minimum": 0 },
135
+ "image_count": { "type": "integer", "minimum": 0 },
136
+ "video_seconds": { "type": "integer", "minimum": 0 }
137
+ }
138
+ }
129
139
  }
130
140
  },
131
141
  "AiPolicyModel": {
@@ -141,7 +151,7 @@
141
151
  "minItems": 1,
142
152
  "maxItems": 2,
143
153
  "uniqueItems": true,
144
- "items": { "type": "string", "enum": ["generation", "embeddings"] }
154
+ "items": { "type": "string", "enum": ["generation", "embeddings", "transcription", "translation", "speech", "image", "realtime"] }
145
155
  },
146
156
  "approved": { "type": "boolean" },
147
157
  "pricing": { "$ref": "#/definitions/AiPolicyPricing" }
@@ -164,7 +174,7 @@
164
174
  "properties": {
165
175
  "alias": { "$ref": "#/definitions/AiPolicyIdentifier" },
166
176
  "version": { "type": "integer", "minimum": 1 },
167
- "capability": { "type": "string", "enum": ["generation", "embeddings"] },
177
+ "capability": { "type": "string", "enum": ["generation", "embeddings", "transcription", "translation", "speech", "image", "realtime"] },
168
178
  "targets": {
169
179
  "type": "array",
170
180
  "minItems": 1,
@@ -318,9 +328,26 @@
318
328
  "scope": { "type": "string", "enum": ["tenant", "application"] },
319
329
  "requestsPerMinute": { "type": "integer", "minimum": 1 },
320
330
  "tokensPerMinute": { "type": "integer", "minimum": 1 },
321
- "monthlyBudgetMicroUsd": { "type": "integer", "minimum": 0 }
331
+ "monthlyBudgetMicroUsd": { "type": "integer", "minimum": 0 },
332
+ "dimensionLimits": {
333
+ "type": "array",
334
+ "maxItems": 64,
335
+ "items": { "$ref": "#/definitions/AiPolicyDimensionLimit" }
336
+ }
322
337
  }
323
338
  },
339
+ "AiPolicyDimensionLimit": {
340
+ "type": "object",
341
+ "additionalProperties": false,
342
+ "required": ["dimension", "unit"],
343
+ "properties": {
344
+ "dimension": { "$ref": "#/definitions/AiPolicyIdentifier" },
345
+ "unit": { "$ref": "#/definitions/AiPolicyIdentifier" },
346
+ "maxPerRequest": { "type": "integer", "minimum": 0 },
347
+ "maxPerMinute": { "type": "integer", "minimum": 0 }
348
+ },
349
+ "anyOf": [{ "required": ["maxPerRequest"] }, { "required": ["maxPerMinute"] }]
350
+ },
324
351
  "AiPolicyRetention": {
325
352
  "type": "object",
326
353
  "additionalProperties": false,
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://schemas.harbour.dev/ai-pricing-revision.schema.json",
4
4
  "title": "AiPricingRevision",
5
- "description": "Immutable v2 line-item pricing revision. A correction is a new revision; published records are never edited.",
5
+ "description": "Immutable v2 line-item pricing revision for token and media dimensions. A correction is a new revision; published records are never edited.",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
8
  "required": ["schema", "revisionId", "provider", "providerModel", "currency", "dimensions", "revisionDigest", "effectiveAt", "publishedAt"],
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://schemas.harbour.dev/ai-trace-event-v2.schema.json",
4
4
  "title": "AiTraceEventV2",
5
- "description": "Additive metering projection linked to a readable v1 trace. It carries dimension-level reported or estimated usage without changing the v1 event.",
5
+ "description": "Additive metering projection linked to a readable v1 trace. It carries dimension-level reported or estimated usage (including audio, image and input-video media) without changing the v1 event.",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
8
  "required": ["schema", "traceId", "requestId", "policyDigest", "outcome", "usageLineItems", "totalCostMicroUsd", "meteringStatus", "occurredAt"],
@@ -16,6 +16,10 @@
16
16
  "totalCostMicroUsd": { "type": "integer", "minimum": 0 },
17
17
  "reservationId": { "type": "string", "minLength": 1, "maxLength": 256 },
18
18
  "meteringStatus": { "type": "string", "enum": ["settled", "reserved", "unknown", "repaired"] },
19
+ "servedModel": { "type": "string", "minLength": 1, "maxLength": 256 },
20
+ "ingressFormat": { "type": "string", "enum": ["openai", "gemini"] },
21
+ "identityFastPath": { "type": "boolean" },
22
+ "versionOrdinalVerified": { "type": "boolean" },
19
23
  "occurredAt": { "type": "string", "format": "date-time" }
20
24
  },
21
25
  "definitions": {
@@ -31,6 +35,7 @@
31
35
  "direction": { "type": "string", "enum": ["input", "output"] },
32
36
  "quantity": { "type": "integer", "minimum": 0 },
33
37
  "unit": { "$ref": "#/definitions/AiTraceV2Identifier" },
38
+ "priceRevision": { "$ref": "#/definitions/AiTraceV2Identifier" },
34
39
  "priceRevisionDigest": { "$ref": "#/definitions/AiTraceV2Digest" },
35
40
  "scale": { "type": "integer", "minimum": 1 },
36
41
  "costMicroUsd": { "type": "integer", "minimum": 0 },
@@ -58,11 +58,11 @@
58
58
  },
59
59
  "secretRef": {
60
60
  "type": "string",
61
- "pattern": "^secretref://tenant/[A-Za-z0-9._-]+/app/[A-Za-z0-9._-]+/secret/[A-Z][A-Z0-9_]{0,127}$",
62
- "description": "Governance reference the deployment plane resolves. The value never appears in the request, in this schema, or in any record derived from it."
61
+ "pattern": "^secretref://tenant/[A-Za-z0-9._-]+/(?:app/[A-Za-z0-9._-]+/(?:secret/[A-Z][A-Z0-9_]{0,127}|source/[a-z0-9][a-z0-9._-]{0,63})|source/[a-z0-9][a-z0-9._-]{0,63})$",
62
+ "description": "Governance app secret, app-scoped minted data-source credential, or approved tenant-source credential reference the deployment plane resolves. The value never appears in the request, in this schema, or in any record derived from it."
63
63
  }
64
64
  },
65
- "description": "One secret binding. Unlike the preview counterpart there is no `value` member and `secretRef` is required, so a plain literal is unrepresentable on the promotion path rather than merely refused by the handler. The secretRef pattern admits only the app-secret shape, which is what keeps a promotion from naming a tenant integration credential."
65
+ "description": "One secret binding. Unlike the preview counterpart there is no `value` member and `secretRef` is required, so a plain literal is unrepresentable on the promotion path rather than merely refused by the handler. The secretRef pattern admits only app secrets, app-scoped minted data-source credentials and tenant-scoped source credentials from an approved BYO grant; integration and provider credentials remain unrepresentable."
66
66
  }
67
67
  }
68
68
  }
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://schemas.harbour.dev/sanitized-binding-evidence.schema.json",
4
4
  "title": "SanitizedBindingEvidence",
5
- "description": "Immutable DCP allocation receipt and sanitized runtime-binding set for one exact allocated version and normalized source revision. DCP persists this evidence atomically with version admission before publish or provisioning. classificationDigest chains to the caller's pre-allocation BindingClassificationSubject; bindings contain only approved configuration or app-secret bindings and never an AI-mapping-owned provider credential.",
5
+ "description": "Immutable DCP allocation receipt and sanitized runtime-binding set for one exact allocated version and normalized source revision. DCP persists this evidence atomically with version admission before publish or provisioning. classificationDigest chains to the caller's pre-allocation BindingClassificationSubject; bindings contain only approved configuration, app secrets or approved data-source credential references and never an AI-mapping-owned provider credential.",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
8
  "required": ["schema", "tenantId", "appId", "environment", "versionId", "sourceRef", "sourceRevision", "sourceRevisionDigest", "classificationDigest", "bindings", "requiredAiMappings", "sanitizedBindingDigest"],
@@ -80,7 +80,7 @@
80
80
  "properties": {
81
81
  "kind": { "type": "string", "enum": ["configuration", "secret"] },
82
82
  "value": { "type": "string", "minLength": 1, "maxLength": 4096, "description": "Approved non-secret configuration literal. Provider-credential values are never approved or persisted here." },
83
- "secretRef": { "type": "string", "pattern": "^secretref://tenant/[A-Za-z0-9._-]+/app/[A-Za-z0-9._-]+/secret/[A-Z][A-Z0-9_]{0,127}$", "description": "Value-free app-secret reference; tenant integration and provider credential references are outside this contract." }
83
+ "secretRef": { "type": "string", "pattern": "^secretref://tenant/[A-Za-z0-9._-]+/(?:app/[A-Za-z0-9._-]+/(?:secret/[A-Z][A-Z0-9_]{0,127}|source/[a-z0-9][a-z0-9._-]{0,63})|source/[a-z0-9][a-z0-9._-]{0,63})$", "description": "Value-free app secret, app-scoped minted data-source credential, or approved tenant-source credential reference. Integration and provider credential references are outside this contract." }
84
84
  },
85
85
  "allOf": [
86
86
  {