@fourier-labs/harbour-contracts 0.32.0 → 0.35.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/README.md CHANGED
@@ -21,16 +21,18 @@ exist here first.
21
21
 
22
22
  | File | Shape | LLD |
23
23
  |---|---|---|
24
- | `deploy-request.schema.json` | MCP `deploy(app, {commit, branch})` payload | §7 |
24
+ | `deploy-request.schema.json` | MCP `deploy(app, {commit, branch})` payload; new preview deploys default to `branch_select` unless `sequential` is explicit | §7 |
25
25
  | `error-envelope.schema.json` | The failure envelope emitted once per FAILED transition | §2.1 |
26
26
  | `error-category.enum.json` | Closed failure-category enum + per-category `retryable` registry | §2.2 |
27
- | `artifact-contract.schema.json` | Build output contract (the provider-portability seam) | §3 |
27
+ | `artifact-contract.schema.json` | Build output contract (the provider-portability seam), including the digest-pinned well-defined app manifest reference | §3 |
28
+ | `well-defined-app-manifest.schema.json` | Versioned runtime wiring for static, full-stack, and browser-first apps: workloads, schedules, queues, and service bindings | Well-defined apps P0 |
28
29
  | `version-state.schema.json` | State machine T1a — states, legal transitions, versionId format | §1 |
29
30
  | `env-bindings.schema.json` | `EnvBindings` / `Target` / `Binding` (BYOC-complete) | §4.2.2 |
30
31
  | `kvs-routing-entry.schema.json` | CloudFront KVS routing value (`{static, api}`) | §8 |
31
32
  | `ai-composite-policy-digest.schema.json` | Ordered composite-policy digest identity and generated Go/TS helpers | AI governance §5.1 |
32
33
  | `ai-classification-stamp.schema.json` | Immutable exact-version classification evidence | AI governance §5.2 |
33
34
  | `ai-deployment-gate-decision.schema.json` | Append-only explicit deployment gate decision | AI governance §5.2 |
35
+ | `ai-governance-decision.schema.json` | AI governance decision, including value-free descriptors for reviewed OpenAI-compatible client configuration boundaries | AI governance §5 |
34
36
  | `ai-gateway-key-lifecycle-event.schema.json` | Value-free version-key lifecycle evidence | AI governance §7 |
35
37
  | `ai-runtime-binding.schema.json` | Platform-neutral workload identity/secret binding | AI governance §5.8 |
36
38
  | `binding-classification-subject.schema.json` | Complete value-free binding-name classification before version allocation | AI governance §5.7 / SEC-UP-01 |
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "schema": "harbour.contract-release/1.0",
3
- "repositoryVersion": "0.32.0.0",
4
- "publishVersion": "0.32.0",
5
- "publishTag": "v0.32.0",
6
- "schemasDigest": "sha256:0476a253b6fe583fefeca0766502fbdb4f94987265c86268a489eb6ddfab4d29",
3
+ "repositoryVersion": "0.35.0.0",
4
+ "publishVersion": "0.35.0",
5
+ "publishTag": "v0.35.0",
6
+ "schemasDigest": "sha256:e41f180a01ff48eb6580bae1e18b7d03fa33abac5904513785f1d52ab2f93d49",
7
7
  "aiFixturesDigest": "sha256:edac31c92e146ca1c40130f2fb5649db82e24b8cd1ac758153b90612052fddb6",
8
- "generatedGoDigest": "sha256:6bb7567f6e0a753136c8389ce8e3a0f8357d360c94ef6f3da3768e63d6562822",
9
- "generatedTypeScriptDigest": "sha256:1f8c32cbe5fbf605bdcaeb73152977a92c488ebd1ab96fb4234a56eb9fc5cee7",
8
+ "generatedGoDigest": "sha256:97bd42f8e900e8122c92bf955194c82762e55fbfa56ede55b19a00bd60e0e8f4",
9
+ "generatedTypeScriptDigest": "sha256:5a52cca780c16ffcf0676980c47b65f6263991fb18d49d08efd60b7f0132532c",
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)"
@@ -19,7 +19,7 @@
19
19
  "schema/ai-deployment-gate-decision.schema.json": "sha256:bae1bdf91777b9a78f8da5a29f06b5de7f1e235789cf16b1bb507e85ad0243ff",
20
20
  "schema/ai-gateway-key-lifecycle-event.schema.json": "sha256:ba5cb862abe73227bee714b25247b4cacb34f11fdd1476bb5f920923fd75e2a9",
21
21
  "schema/ai-gateway-key-lookup.schema.json": "sha256:e994d4782c9bc4f14d3a1c35c9ac1e7a5ec84284cde5b3af7e3e6022130ddbb3",
22
- "schema/ai-governance-decision.schema.json": "sha256:fab63e1b869b0e821efe9c27ee63f87fc7023a01d99bc810bad12049b968b788",
22
+ "schema/ai-governance-decision.schema.json": "sha256:d650762a428350748deafd6b251cbd4a03ba564650e74204f1a77bbe923e145f",
23
23
  "schema/ai-metering-policy.schema.json": "sha256:044115938d254d914feac162219d20ee48f741cd7ad32df4613b45f9c862fe8c",
24
24
  "schema/ai-policy-snapshot.schema.json": "sha256:8229b855861e029c7792c4c43d42c209055f175af747f437570d42c5008f70d8",
25
25
  "schema/ai-pricing-revision.schema.json": "sha256:5ddb40c23712c0cec37b733678e4bb34811f5db44a233773c21a7dfaec188375",
@@ -31,12 +31,12 @@
31
31
  "schema/ai-transform-result.schema.json": "sha256:244e380a36957ab2dcb526ea22aaecb56b53664ce1fda6934d0021c084c99133",
32
32
  "schema/ai-verification-evidence.schema.json": "sha256:bdbc762df256d2a8dd0bdda60d4d13915ce40034cd756af9515871d145f10ad9",
33
33
  "schema/api-error-response.schema.json": "sha256:3d43d5bdf0b59c944e20509d832e6776c3ecdba4d6c245a9118bbe52062a8304",
34
- "schema/artifact-contract.schema.json": "sha256:4415be59f669bf660f54ab32da68f3b7d95fef567c968501e2eb6afb53bad048",
34
+ "schema/artifact-contract.schema.json": "sha256:bc9683cd5c62c231683906c70307412839458adb6f9273003c37dbab01a1cff3",
35
35
  "schema/binding-classification-subject.schema.json": "sha256:a8825ce652e7e00a18759c4249bd5bcd0cae552dd58440513f867e87f685133c",
36
36
  "schema/data-dependency.schema.json": "sha256:89ba8481ccabc935e7dab5d13871c985839a751ad1586710d8382a15e1f3340c",
37
37
  "schema/data-grant.schema.json": "sha256:e640553831ecc1c01cc9a37fe388b84d0ffeaa0d0050e63712b48f65fa437c8a",
38
38
  "schema/data-source.schema.json": "sha256:5a809171cc97f5778ca37db300d454098ce1c2d9071d2380550707b049899a75",
39
- "schema/deploy-request.schema.json": "sha256:5a1326271f88575719a24f39d14c34959764f6eb8efef71a1f140e30c6c235c7",
39
+ "schema/deploy-request.schema.json": "sha256:971575fa250eaed300337ecd262a5f2ace0fe4c32de5aa51cd6a995fc3f5cb41",
40
40
  "schema/deploy-response.schema.json": "sha256:09064948abdbba7022738285d802ed44648a16ddc2a5b8c2eeb170ae19a66aeb",
41
41
  "schema/deployment-environment.schema.json": "sha256:3f1325d5579b3fc47d02c83b6ac0657108909b1dfb901f68203c9c8b668c2ef4",
42
42
  "schema/deployment-source.schema.json": "sha256:256988b1efbfc90bd0e1ae31a2c5d69b20ef1e4471dc24c9f9aa759278270fbe",
@@ -44,7 +44,7 @@
44
44
  "schema/deployment-status-request.schema.json": "sha256:1f9f87adc947a252b53b61f71ae17f8c1b8fbc1166f31301a043d11ac257dc66",
45
45
  "schema/deployment-status-response.schema.json": "sha256:ce6b4e10a4302dff75c8958a3555f3a323e407e8cd2d2dce58550e7cb6cff1c8",
46
46
  "schema/env-bindings.schema.json": "sha256:ae09bc4ca5508afa698ef854a59153c4c6f99b07017b48cb9b07ce05abad12f2",
47
- "schema/error-category.enum.json": "sha256:693f8ce67d5554358f89b76132024cb8a082216f192d80a66bc4dc64e8983332",
47
+ "schema/error-category.enum.json": "sha256:92b29448d5336797e73a854e134dd6a58c4c03c5f80a3c4e81024144e1f881b8",
48
48
  "schema/error-envelope.schema.json": "sha256:75dccda7dd16fdf8435deda53fc7dbcdc109b65114617a17f11763010c656f90",
49
49
  "schema/kvs-routing-entry.schema.json": "sha256:b75f3a5dfa93a428b2764e03222b66b6ef2bed980f8bac8ffac54afdf3526bc5",
50
50
  "schema/promotion-request.schema.json": "sha256:00e96dfd8ddbdba88ea222941d43f3609ff6c815a79e34f6705cab458101c969",
@@ -53,8 +53,9 @@
53
53
  "schema/secret-reference.schema.json": "sha256:966f7a6d2575b46a4b54804d06dc05c6229ebbcbd9200fe6a6c8d3b4ffb90f9f",
54
54
  "schema/security-scan-input.schema.json": "sha256:83502dffb3c07ac2e0698928e6dc123f454fc667d4aacd336bcad6944ef2ac3d",
55
55
  "schema/security-verdict.schema.json": "sha256:ec3c2d5c9df3601aeed0909b36c7f427469c7f0eeb3295c5809b96d09bf3fc26",
56
- "schema/transform-report.schema.json": "sha256:815e764445fb41b912d0c0468f00621ad61f941fb4c7b9364e3f204ad47cdf7f",
57
- "schema/version-state.schema.json": "sha256:3b190007e2f8e3821c41ef11c6f5b226da7d5a18d34d4077f4618004846fd444"
56
+ "schema/transform-report.schema.json": "sha256:c7f3f359b70101764d4e9b411c9c78bd5b31a27c7de5bda070c1287087f680f1",
57
+ "schema/version-state.schema.json": "sha256:3b190007e2f8e3821c41ef11c6f5b226da7d5a18d34d4077f4618004846fd444",
58
+ "schema/well-defined-app-manifest.schema.json": "sha256:d863433d7b68260a08aa0d33f897526c8f74f5f0ee8d242a6dd6c0bb23e60987"
58
59
  },
59
60
  "aiFixtures": {
60
61
  "fixtures/ai/adversarial-binding-classification-value.json": "sha256:ca009f3f6162a9d93b4ab416d52c1fba12a8a15aca5aed956c5fdcf2171b1e28",
@@ -89,11 +90,11 @@
89
90
  "gen-go/ai_contracts_test.go": "sha256:17ce967139e39c291ee7ebad3f66cc0495324abc4e56885279f7e5cc74994036",
90
91
  "gen-go/ai_gateway_key_token.go": "sha256:859c34383955f21c22589158214df074b74de6907a54bee7c781acfa9dad8679",
91
92
  "gen-go/binding_digest_helpers.go": "sha256:50462ba2beb16c7931dfc7e10302c12c90bf8111788991f74f08a718125dfbfb",
92
- "gen-go/contracts_test.go": "sha256:28d6bf1bdc57eb4297b45d542adbdca420c943f02166c5889824e81f530a8ad4",
93
+ "gen-go/contracts_test.go": "sha256:56376287cb1548be1b35ab4c65d6f0b558c5d34885f7a47cb3d9e8d786607bf5",
93
94
  "gen-go/doc.go": "sha256:c17bc2d39ed175ce7105c68305f8ae7152f659eb7cd187ecceee7698eb3a65dd",
94
- "gen-go/error_category.go": "sha256:a8b64524be3716e62ca6016e56f2332a56fa5e16e42647421e516aa01a7d6806",
95
- "gen-go/schema_documents.go": "sha256:4b9094aaf0acc4bae4b65784954853f0888572a53fa1a1dc354f97c88ded805f",
96
- "gen-go/types.go": "sha256:07642ccb5251d921d801e75b686143ddc23d8e82f03c2f15a175935927a47fc5",
95
+ "gen-go/error_category.go": "sha256:dbbc54e04b988a23b08cc5f6f368555e1b8e9c3633261f593fa9fda8b29a537e",
96
+ "gen-go/schema_documents.go": "sha256:df06963579bc6d5d711d38512c2885add3be6909c6cafa12caeefbc34d840e7e",
97
+ "gen-go/types.go": "sha256:4f1b5374277b99678d70724740afd2cac81bbcf25d0da11e05eb13d8894f9467",
97
98
  "gen-go/version_state.go": "sha256:4ef8abb126414c0025cf2c59bc9c79a74ef4a2ff89e8f316cbf05acc872371c1"
98
99
  },
99
100
  "generatedTypeScript": {
@@ -106,7 +107,7 @@
106
107
  "gen-ts/ai-gateway-key-lifecycle-event.ts": "sha256:8f1ab4774be1959e82c97da20ec8b293f3f10262f95393d2ae57e4c7817353cb",
107
108
  "gen-ts/ai-gateway-key-lookup.ts": "sha256:e55fc9a2252d5e7e1a383a58c8b92f22d8147ee4862a893a6cfe815b4225fc00",
108
109
  "gen-ts/ai-gateway-key-token.ts": "sha256:ff6551ad3332cc665878d7ec93f42ce185c375e637531b2fbc82c697b877e784",
109
- "gen-ts/ai-governance-decision.ts": "sha256:cd9f24d6381cffe73f08532cf556eaa9ecb815b23218f7ac504f3bc26e686b2b",
110
+ "gen-ts/ai-governance-decision.ts": "sha256:4a04e116f2ec281104e616a8ba414f23a9d34d398f850888d27510173e39c5c3",
110
111
  "gen-ts/ai-metering-policy.ts": "sha256:dd261d57646a509cd46efaefac4aad58d018c7f7da98326dd8859e4ce951c56a",
111
112
  "gen-ts/ai-policy-snapshot.ts": "sha256:05f5cea100e43a5cc6c1e8c7c07edea974ea0e6785730f622e824e40128f1ebc",
112
113
  "gen-ts/ai-pricing-revision.ts": "sha256:48afdea7fb09b9a392147a0a62bcee013157a9d536c07e0782ef28781a3000de",
@@ -118,13 +119,13 @@
118
119
  "gen-ts/ai-transform-result.ts": "sha256:208c66b2aeb425c0cbcc18b7191f6e8989443f2b2c1690648e0e06cc1448ce25",
119
120
  "gen-ts/ai-verification-evidence.ts": "sha256:979439d77f8b47631d1eb3b6c3c54ea6fec41089d2a51dc815fd370b1c4917fc",
120
121
  "gen-ts/api-error-response.ts": "sha256:0fd73be282e7a5d72d6c343a4e64d09c232556b16161167f0cffd6278ed7e3d3",
121
- "gen-ts/artifact-contract.ts": "sha256:b9c91d0582993cf1208448f6502cc63a813b17d0aab3d2d4f4ec8bda1d607d37",
122
+ "gen-ts/artifact-contract.ts": "sha256:ad39ac5a2bcc9462e206101c9792e92fd11ef721e26de9a40043a4ba00dd7350",
122
123
  "gen-ts/binding-classification-digest-helper.ts": "sha256:40fc7d85b4c3f3ffc5caf7d7950c62d013c83ee42058c7453b2100d95817f167",
123
124
  "gen-ts/binding-classification-subject.ts": "sha256:c409a3fd7b942b50419632c51d9a79474fb30d6374bdc79c0e25c73618e800c3",
124
125
  "gen-ts/data-dependency.ts": "sha256:0572c31d7ae9088eccc104eee1a205bf176d1d6dacfaf0f290d666024e284966",
125
126
  "gen-ts/data-grant.ts": "sha256:2358579d8aa1e57b01a6f2b0eacce5531e7f21ef226404c9809925365e0d6155",
126
127
  "gen-ts/data-source.ts": "sha256:71be83b050468c2ea8c5830d28f1837c2b5929d23b4fdf6661bc5bfe8999904c",
127
- "gen-ts/deploy-request.ts": "sha256:959fbb7c4c055aed7f5f3201612b5e0bb664883220c47019c101532adb1375fc",
128
+ "gen-ts/deploy-request.ts": "sha256:6bc33531f8d18611dff10f4efd75da56cdd9a773655047db26af9d832a6ac48a",
128
129
  "gen-ts/deploy-response.ts": "sha256:364d9f1acf32e491498237cdd3f402d5f8e102f208db7748034f4ec68c6a6137",
129
130
  "gen-ts/deployment-environment.ts": "sha256:bbd6eec3a1631b13a8de6e6b95081696f7be01d0bd2bf1b7a9e3a1db809a727c",
130
131
  "gen-ts/deployment-source.ts": "sha256:8ccb55aaa7260eb6d19a00987d6a20a4b514e343564da13f27cd7fee8013500a",
@@ -132,10 +133,10 @@
132
133
  "gen-ts/deployment-status-request.ts": "sha256:7ddccd07ab9f6d0821903a291ab35f903bb055727e03a058b99165ec048f6483",
133
134
  "gen-ts/deployment-status-response.ts": "sha256:1a082b43663b9d7e6f2377c91713bf0792d52060beed5f2bad7879d0ac718bd3",
134
135
  "gen-ts/env-bindings.ts": "sha256:a167cfe9842352c9fec6412ff0d82bda9c5f5c3a1af541bd5c27a57f54fd0941",
135
- "gen-ts/error-category-registry.ts": "sha256:280a12aecc8aea8e6e2f2a54d2e968ff7807b522cc0c4036e6e41c065edcf3b7",
136
+ "gen-ts/error-category-registry.ts": "sha256:c28e9a6c532ec326f9832edee1432436e01ff6a7c5a4c066a7a465318dddebe2",
136
137
  "gen-ts/error-category.ts": "sha256:9bda89180c3b740c9aa8be466216592e8ca9d0d368c274333edf6ea5c45afd8e",
137
138
  "gen-ts/error-envelope.ts": "sha256:4457309be794f9d4fc0cf62530cc2d442c007bac9ae84aff66df099cc9e40310",
138
- "gen-ts/index.ts": "sha256:bb37bf7838034dcf410562855582ae3bfbf24ee43d506bbc514ad512557016b5",
139
+ "gen-ts/index.ts": "sha256:4aecbb1044a210bf5813deb645c623eefa7bb6af2a8e2557b76ed9ba1d95eba9",
139
140
  "gen-ts/kvs-routing-entry.ts": "sha256:d92e85ee9f257d77850d1d3aac9438e2055f38084ff84a48fcedae239d47d4ca",
140
141
  "gen-ts/promotion-request.ts": "sha256:9db88cef67f777a16bac628039ec3f582acb9e8cfff6fb592b30d0a0e55abc68",
141
142
  "gen-ts/promotion-response.ts": "sha256:f1c9cafac96faeb02a443a31786f67714e818f38d90108e7af41958396524d6f",
@@ -144,8 +145,9 @@
144
145
  "gen-ts/secret-reference.ts": "sha256:a8b65de72705b6f51f57cd8ca58881483108005b1fa4d19106c3e9cf1fa877e7",
145
146
  "gen-ts/security-scan-input.ts": "sha256:b31f048be04c34b40f49d3b3ba53277e473cd435ae9216ba3a3b4dac69fb5685",
146
147
  "gen-ts/security-verdict.ts": "sha256:fea950cddbd12fe0218e2573c9a29c6748d56612a464559f1e6d688fa97f68c7",
147
- "gen-ts/transform-report.ts": "sha256:6c54b579884d98135d73945d00980820b136f269622db27fa56a1c4c0e57d3b6",
148
+ "gen-ts/transform-report.ts": "sha256:666b7d202be851c2f605fc4db175046c2eabbed454c64e9f8796617a1fd8d518",
148
149
  "gen-ts/version-state-machine.ts": "sha256:c67af3e86ac306743345b850dfd3ae5201c19d10c40e2c149cf8c38258320d5f",
149
- "gen-ts/version-state.ts": "sha256:a835112930299e7b593a1b8810b7414f6c9e809da2092306c743128170a3b702"
150
+ "gen-ts/version-state.ts": "sha256:a835112930299e7b593a1b8810b7414f6c9e809da2092306c743128170a3b702",
151
+ "gen-ts/well-defined-app-manifest.ts": "sha256:0c5c2fed747ad7f4c1034104c1acd9bb2e316f2c0b08a4ff3e2fab486f576a2f"
150
152
  }
151
153
  }
@@ -76,6 +76,13 @@ export interface AiDecisionRuntimeContract {
76
76
  realtime?: string;
77
77
  };
78
78
  policyDigest: AiDecisionDigest;
79
+ /**
80
+ * Optional value-free descriptors for reviewed non-standard client environment boundaries. Mapping IDs are unique within a contract.
81
+ *
82
+ * @minItems 1
83
+ * @maxItems 16
84
+ */
85
+ configurationMappings?: AiDecisionConfigurationMappingDescriptor[];
79
86
  runtimeBinding?: AiDecisionRuntimeBinding;
80
87
  /**
81
88
  * @minItems 1
@@ -83,6 +90,17 @@ export interface AiDecisionRuntimeContract {
83
90
  */
84
91
  requiredStrategies: ('deployment_injection' | 'deterministic_adapter')[];
85
92
  }
93
+ /**
94
+ * Value-free descriptor for one registered OpenAI-compatible client environment boundary. Secret values are never part of this descriptor.
95
+ */
96
+ export interface AiDecisionConfigurationMappingDescriptor {
97
+ mappingId: string;
98
+ version: string;
99
+ protocol: 'openai-chat';
100
+ providerId: string;
101
+ apiKeyEnvironmentName: string;
102
+ baseUrlEnvironmentName: string;
103
+ }
86
104
  export interface AiDecisionRuntimeBinding {
87
105
  schema: 'harbour.ai-runtime-binding/1.0';
88
106
  platform: string;
@@ -22,6 +22,10 @@ export interface ArtifactContract {
22
22
  */
23
23
  runtime_features?: 'chromium'[];
24
24
  };
25
+ /**
26
+ * Optional immutable OCI image used only by auxiliary workloads of a statically served SPA.
27
+ */
28
+ workload_image_ref?: string;
25
29
  static: {
26
30
  /**
27
31
  * e.g. builds/<digest>/
@@ -85,6 +89,22 @@ export interface ArtifactContract {
85
89
  */
86
90
  background_jobs?: 'none' | 'sqs';
87
91
  };
92
+ /**
93
+ * Optional digest-pinned P0 well-defined application manifest. Provisioning reads the referenced document without re-analyzing source.
94
+ */
95
+ well_defined_app?: {
96
+ version: 1;
97
+ path: '.harbour/app-manifest.json';
98
+ sha256: string;
99
+ };
100
+ /**
101
+ * Optional digest-pinned browser capability declaration published only after LIVE cutover.
102
+ */
103
+ app_capabilities?: {
104
+ version: 1;
105
+ path: '.harbour/app-capabilities.json';
106
+ sha256: string;
107
+ };
88
108
  /**
89
109
  * Optional method/path authentication policy compiled by the transformation. The default is SSO; listed routes preserve the application's own token, signature, or callback authorization.
90
110
  */
@@ -1,7 +1,7 @@
1
- export declare const ContractRepositoryVersion: "0.32.0.0";
2
- export declare const ContractPublishVersion: "0.32.0";
3
- export declare const ContractPublishTag: "v0.32.0";
4
- export declare const ContractSchemasDigest: "sha256:0476a253b6fe583fefeca0766502fbdb4f94987265c86268a489eb6ddfab4d29";
1
+ export declare const ContractRepositoryVersion: "0.35.0.0";
2
+ export declare const ContractPublishVersion: "0.35.0";
3
+ export declare const ContractPublishTag: "v0.35.0";
4
+ export declare const ContractSchemasDigest: "sha256:e41f180a01ff48eb6580bae1e18b7d03fa33abac5904513785f1d52ab2f93d49";
5
5
  export declare const ContractAiFixturesDigest: "sha256:edac31c92e146ca1c40130f2fb5649db82e24b8cd1ac758153b90612052fddb6";
6
- export declare const ContractGeneratedGoDigest: "sha256:6bb7567f6e0a753136c8389ce8e3a0f8357d360c94ef6f3da3768e63d6562822";
7
- export declare const ContractGeneratedTypeScriptDigest: "sha256:1f8c32cbe5fbf605bdcaeb73152977a92c488ebd1ab96fb4234a56eb9fc5cee7";
6
+ export declare const ContractGeneratedGoDigest: "sha256:97bd42f8e900e8122c92bf955194c82762e55fbfa56ede55b19a00bd60e0e8f4";
7
+ export declare const ContractGeneratedTypeScriptDigest: "sha256:5a52cca780c16ffcf0676980c47b65f6263991fb18d49d08efd60b7f0132532c";
@@ -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.32.0.0";
4
- export const ContractPublishVersion = "0.32.0";
5
- export const ContractPublishTag = "v0.32.0";
6
- export const ContractSchemasDigest = "sha256:0476a253b6fe583fefeca0766502fbdb4f94987265c86268a489eb6ddfab4d29";
3
+ export const ContractRepositoryVersion = "0.35.0.0";
4
+ export const ContractPublishVersion = "0.35.0";
5
+ export const ContractPublishTag = "v0.35.0";
6
+ export const ContractSchemasDigest = "sha256:e41f180a01ff48eb6580bae1e18b7d03fa33abac5904513785f1d52ab2f93d49";
7
7
  export const ContractAiFixturesDigest = "sha256:edac31c92e146ca1c40130f2fb5649db82e24b8cd1ac758153b90612052fddb6";
8
- export const ContractGeneratedGoDigest = "sha256:6bb7567f6e0a753136c8389ce8e3a0f8357d360c94ef6f3da3768e63d6562822";
9
- export const ContractGeneratedTypeScriptDigest = "sha256:1f8c32cbe5fbf605bdcaeb73152977a92c488ebd1ab96fb4234a56eb9fc5cee7";
8
+ export const ContractGeneratedGoDigest = "sha256:97bd42f8e900e8122c92bf955194c82762e55fbfa56ede55b19a00bd60e0e8f4";
9
+ export const ContractGeneratedTypeScriptDigest = "sha256:5a52cca780c16ffcf0676980c47b65f6263991fb18d49d08efd60b7f0132532c";
@@ -77,11 +77,11 @@ export interface DeployRequestEnvironmentBindings {
77
77
  bindings: DeployRequestEnvironmentBinding[];
78
78
  }
79
79
  /**
80
- * Optional transformation-engine selection. Absence preserves the existing sequential engine.
80
+ * Optional transformation-engine selection. New preview deployments default to branch_select; set sequential explicitly for the legacy engine.
81
81
  */
82
82
  export interface DeployRequestTransform {
83
83
  /**
84
- * Transformation engine. Omit to preserve the existing sequential default.
84
+ * Transformation engine. Omit to use branch_select for a newly admitted preview deployment.
85
85
  */
86
86
  strategy?: 'sequential' | 'branch_select';
87
87
  }
@@ -56,7 +56,7 @@ const retryableExact = {
56
56
  "storage.sqlite-misclassified": false,
57
57
  "storage.mapping-drift": false,
58
58
  "storage.unavailable": true,
59
- "transform.deadline-exceeded": false,
59
+ "transform.deadline-exceeded": true,
60
60
  "transform.validation-failed": true,
61
61
  "frontend.env-inlined-unfixable": false,
62
62
  "build.recipe-failed": false,
@@ -48,3 +48,4 @@ export * from './security-verdict.js';
48
48
  export * from './transform-report.js';
49
49
  export * from './version-state-machine.js';
50
50
  export * from './version-state.js';
51
+ export * from './well-defined-app-manifest.js';
@@ -50,3 +50,4 @@ export * from './security-verdict.js';
50
50
  export * from './transform-report.js';
51
51
  export * from './version-state-machine.js';
52
52
  export * from './version-state.js';
53
+ export * from './well-defined-app-manifest.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Structured output an agent must return from one Harbour transformation attempt. Handed to the agent as its output schema, then decoded and semantically re-validated by the control plane, which remains the authority. The enum on applied_playbooks.items is the one dynamic part: the adapter injects the names of the playbooks supplied for that invocation before writing the document, so the model is structurally prevented from naming a playbook it was not given. Application-secret handling was removed platform-wide, so this document carries no redactions and no secrets fields.
2
+ * Structured output an agent must return from one Harbour transformation attempt. Handed to the agent as its output schema, then decoded and semantically re-validated by the control plane, which remains the authority. The enum on applied_playbooks.items is the one dynamic part: the adapter injects the names of the playbooks supplied for that invocation before writing the document, so the model is structurally prevented from naming a playbook it was not given. Application-secret handling was removed platform-wide, so this document carries no redactions and no secrets fields. A deployable report must also carry preservation_plan: the agent's own grounded smoke tests (one to three happy_path user journeys plus a boundary_check per behaviour its playbooks or edits could regress) that the validation cell executes after transformation, and an uncovered list naming every boundary it could not test and why. An unsupported report carries only application.unsupported and no plan.
3
3
  */
4
4
  export type TransformReport = {
5
5
  /**
@@ -55,6 +55,102 @@ export type TransformReport = {
55
55
  */
56
56
  unsupportedFeatures: string[];
57
57
  };
58
+ /**
59
+ * Agent-authored preservation (smoke) plan for this attempt. Required whenever the report is deployable; forbidden on an unsupported report. Every test must be grounded in files the agent actually read or changed (evidence) and expressed as tenant-relative browser or HTTP steps the validation cell can execute without secrets. Structural bounds live here; per-action required fields, at least one assert* step per test, one to three happy_path tests, unique ids, the {{runId}} substitution and path safety are enforced semantically by the deployment plane.
60
+ */
61
+ preservation_plan?: {
62
+ version: 1;
63
+ /**
64
+ * Ordered smoke tests. happy_path tests cover primary user journeys inferred from routes, APIs, forms and focused tests; boundary_check tests pin the smallest observable behaviour each applied playbook or changed file could regress.
65
+ *
66
+ * @minItems 1
67
+ * @maxItems 8
68
+ */
69
+ tests: {
70
+ id: string;
71
+ kind: 'happy_path' | 'boundary_check';
72
+ name: string;
73
+ /**
74
+ * Transformation boundaries this test claims to cover.
75
+ *
76
+ * @minItems 1
77
+ * @maxItems 8
78
+ */
79
+ boundaries: ('application' | 'routing' | 'database' | 'authentication' | 'runtime_dependency' | 'files' | 'provider' | 'background_work')[];
80
+ /**
81
+ * Files (and optionally lines) in the transformed workspace that ground this test. Paths must exist after transformation.
82
+ *
83
+ * @minItems 1
84
+ * @maxItems 8
85
+ */
86
+ evidence: {
87
+ path: string;
88
+ line?: number;
89
+ reason: string;
90
+ }[];
91
+ confidence: 'high' | 'medium' | 'low';
92
+ /**
93
+ * Executed in order inside the validation cell's authenticated browser context; the test stops at its first failed step. Which optional fields apply depends on action: navigate/request/assertURL use path; click/fill/assertVisible use target; fill uses value; assertVisible uses text; request uses method, body and name; assertResponse uses request, status, jsonKey and jsonValue.
94
+ *
95
+ * @minItems 1
96
+ * @maxItems 20
97
+ */
98
+ steps: {
99
+ action: 'navigate' | 'click' | 'fill' | 'reload' | 'request' | 'assertVisible' | 'assertURL' | 'assertResponse';
100
+ /**
101
+ * Tenant-relative path starting with '/'; never a scheme or host.
102
+ */
103
+ path?: string;
104
+ target?: {
105
+ by: 'role' | 'label' | 'placeholder' | 'text' | 'testId' | 'css';
106
+ role?: string;
107
+ /**
108
+ * Accessible name when by is role.
109
+ */
110
+ name?: string;
111
+ /**
112
+ * Locator value for every by other than role.
113
+ */
114
+ value?: string;
115
+ };
116
+ value?: string;
117
+ text?: string;
118
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
119
+ /**
120
+ * JSON text sent as the request body.
121
+ */
122
+ body?: string;
123
+ /**
124
+ * Names a request's response for a later assertResponse in the same test.
125
+ */
126
+ name?: string;
127
+ /**
128
+ * The named preceding request an assertResponse inspects.
129
+ */
130
+ request?: string;
131
+ status?: number;
132
+ /**
133
+ * Top-level key or dotted path into the JSON response; no brackets.
134
+ */
135
+ jsonKey?: string;
136
+ /**
137
+ * Expected value, compared as a string.
138
+ */
139
+ jsonValue?: string;
140
+ timeoutMs?: number;
141
+ }[];
142
+ }[];
143
+ /**
144
+ * Boundaries the agent deliberately left untested, each with a reviewed reason. An empty array claims full coverage.
145
+ *
146
+ * @maxItems 8
147
+ */
148
+ uncovered: {
149
+ boundary: 'application' | 'routing' | 'database' | 'authentication' | 'runtime_dependency' | 'files' | 'provider' | 'background_work';
150
+ reason: 'not-observable-in-validation-cell' | 'no-safe-fixture' | 'no-grounded-surface';
151
+ detail?: string;
152
+ }[];
153
+ };
58
154
  application: {
59
155
  unsupported?: {
60
156
  capability: string;
@@ -0,0 +1,66 @@
1
+ export type Workload = {
2
+ name: string;
3
+ kind: 'web' | 'action' | 'worker' | 'cron' | 'job';
4
+ command: Command;
5
+ resourceProfile: ResourceProfile;
6
+ port?: number;
7
+ alwaysOn?: boolean;
8
+ queueConsumer?: QueueConsumer;
9
+ schedule?: Schedule;
10
+ runPolicy?: RunPolicy;
11
+ };
12
+ /**
13
+ * @minItems 1
14
+ * @maxItems 32
15
+ */
16
+ export type Command = string[];
17
+ export type ResourceProfile = 'standard' | 'memory-1g';
18
+ /**
19
+ * Versioned provisioning input emitted by Harbour Transform. It describes runtime wiring and workload lifecycle only; PostgreSQL grants and RLS remain the database authorization authority.
20
+ */
21
+ export interface WellDefinedAppManifest {
22
+ version: 1;
23
+ architecture: 'static-v1' | 'fullstack-v1' | 'spa-harbour-data-v1';
24
+ /**
25
+ * Required only when transformed browser code uses @harbour/app-sdk.
26
+ */
27
+ sdkMajor?: 1;
28
+ /**
29
+ * @maxItems 64
30
+ */
31
+ workloads: Workload[];
32
+ /**
33
+ * @maxItems 128
34
+ */
35
+ bindings: WorkloadBinding[];
36
+ }
37
+ export interface QueueConsumer {
38
+ logicalName: string;
39
+ minReplicas: number;
40
+ maxReplicas: number;
41
+ cooldownSeconds: number;
42
+ }
43
+ export interface Schedule {
44
+ cron: string;
45
+ timeZone: string;
46
+ concurrencyPolicy: 'Allow' | 'Forbid' | 'Replace';
47
+ startingDeadlineSeconds: number;
48
+ timeoutSeconds: number;
49
+ retries: number;
50
+ successfulHistoryLimit: number;
51
+ failedHistoryLimit: number;
52
+ }
53
+ export interface RunPolicy {
54
+ timeoutSeconds: number;
55
+ retries: number;
56
+ ttlSecondsAfterFinished: number;
57
+ }
58
+ export interface WorkloadBinding {
59
+ kind: 'database' | 'files' | 'queue' | 'secret' | 'external';
60
+ logicalName: string;
61
+ provider: 'aurora-postgresql' | 's3-private' | 'nats-jetstream' | 'secrets-manager' | 'external-https';
62
+ /**
63
+ * Value-free control-plane identifier. Never a credential or provider URL.
64
+ */
65
+ reference?: string;
66
+ }
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
+ export {};
@@ -80,6 +80,13 @@ export interface AiDecisionRuntimeContract {
80
80
  realtime?: string;
81
81
  };
82
82
  policyDigest: AiDecisionDigest;
83
+ /**
84
+ * Optional value-free descriptors for reviewed non-standard client environment boundaries. Mapping IDs are unique within a contract.
85
+ *
86
+ * @minItems 1
87
+ * @maxItems 16
88
+ */
89
+ configurationMappings?: AiDecisionConfigurationMappingDescriptor[];
83
90
  runtimeBinding?: AiDecisionRuntimeBinding;
84
91
  /**
85
92
  * @minItems 1
@@ -87,6 +94,17 @@ export interface AiDecisionRuntimeContract {
87
94
  */
88
95
  requiredStrategies: ('deployment_injection' | 'deterministic_adapter')[];
89
96
  }
97
+ /**
98
+ * Value-free descriptor for one registered OpenAI-compatible client environment boundary. Secret values are never part of this descriptor.
99
+ */
100
+ export interface AiDecisionConfigurationMappingDescriptor {
101
+ mappingId: string;
102
+ version: string;
103
+ protocol: 'openai-chat';
104
+ providerId: string;
105
+ apiKeyEnvironmentName: string;
106
+ baseUrlEnvironmentName: string;
107
+ }
90
108
  export interface AiDecisionRuntimeBinding {
91
109
  schema: 'harbour.ai-runtime-binding/1.0';
92
110
  platform: string;
@@ -25,6 +25,10 @@ export interface ArtifactContract {
25
25
  */
26
26
  runtime_features?: 'chromium'[];
27
27
  };
28
+ /**
29
+ * Optional immutable OCI image used only by auxiliary workloads of a statically served SPA.
30
+ */
31
+ workload_image_ref?: string;
28
32
  static: {
29
33
  /**
30
34
  * e.g. builds/<digest>/
@@ -88,6 +92,22 @@ export interface ArtifactContract {
88
92
  */
89
93
  background_jobs?: 'none' | 'sqs';
90
94
  };
95
+ /**
96
+ * Optional digest-pinned P0 well-defined application manifest. Provisioning reads the referenced document without re-analyzing source.
97
+ */
98
+ well_defined_app?: {
99
+ version: 1;
100
+ path: '.harbour/app-manifest.json';
101
+ sha256: string;
102
+ };
103
+ /**
104
+ * Optional digest-pinned browser capability declaration published only after LIVE cutover.
105
+ */
106
+ app_capabilities?: {
107
+ version: 1;
108
+ path: '.harbour/app-capabilities.json';
109
+ sha256: string;
110
+ };
91
111
  /**
92
112
  * Optional method/path authentication policy compiled by the transformation. The default is SSO; listed routes preserve the application's own token, signature, or callback authorization.
93
113
  */
@@ -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.32.0.0" as const;
5
- export const ContractPublishVersion = "0.32.0" as const;
6
- export const ContractPublishTag = "v0.32.0" as const;
7
- export const ContractSchemasDigest = "sha256:0476a253b6fe583fefeca0766502fbdb4f94987265c86268a489eb6ddfab4d29" as const;
4
+ export const ContractRepositoryVersion = "0.35.0.0" as const;
5
+ export const ContractPublishVersion = "0.35.0" as const;
6
+ export const ContractPublishTag = "v0.35.0" as const;
7
+ export const ContractSchemasDigest = "sha256:e41f180a01ff48eb6580bae1e18b7d03fa33abac5904513785f1d52ab2f93d49" as const;
8
8
  export const ContractAiFixturesDigest = "sha256:edac31c92e146ca1c40130f2fb5649db82e24b8cd1ac758153b90612052fddb6" as const;
9
- export const ContractGeneratedGoDigest = "sha256:6bb7567f6e0a753136c8389ce8e3a0f8357d360c94ef6f3da3768e63d6562822" as const;
10
- export const ContractGeneratedTypeScriptDigest = "sha256:1f8c32cbe5fbf605bdcaeb73152977a92c488ebd1ab96fb4234a56eb9fc5cee7" as const;
9
+ export const ContractGeneratedGoDigest = "sha256:97bd42f8e900e8122c92bf955194c82762e55fbfa56ede55b19a00bd60e0e8f4" as const;
10
+ export const ContractGeneratedTypeScriptDigest = "sha256:5a52cca780c16ffcf0676980c47b65f6263991fb18d49d08efd60b7f0132532c" as const;
@@ -81,11 +81,11 @@ export interface DeployRequestEnvironmentBindings {
81
81
  bindings: DeployRequestEnvironmentBinding[];
82
82
  }
83
83
  /**
84
- * Optional transformation-engine selection. Absence preserves the existing sequential engine.
84
+ * Optional transformation-engine selection. New preview deployments default to branch_select; set sequential explicitly for the legacy engine.
85
85
  */
86
86
  export interface DeployRequestTransform {
87
87
  /**
88
- * Transformation engine. Omit to preserve the existing sequential default.
88
+ * Transformation engine. Omit to use branch_select for a newly admitted preview deployment.
89
89
  */
90
90
  strategy?: 'sequential' | 'branch_select';
91
91
  }
@@ -58,7 +58,7 @@ const retryableExact: Record<string, boolean> = {
58
58
  "storage.sqlite-misclassified": false,
59
59
  "storage.mapping-drift": false,
60
60
  "storage.unavailable": true,
61
- "transform.deadline-exceeded": false,
61
+ "transform.deadline-exceeded": true,
62
62
  "transform.validation-failed": true,
63
63
  "frontend.env-inlined-unfixable": false,
64
64
  "build.recipe-failed": false,
package/gen-ts/index.ts CHANGED
@@ -51,3 +51,4 @@ export * from './security-verdict.js';
51
51
  export * from './transform-report.js';
52
52
  export * from './version-state-machine.js';
53
53
  export * from './version-state.js';
54
+ export * from './well-defined-app-manifest.js';
@@ -2,7 +2,7 @@
2
2
  // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
3
 
4
4
  /**
5
- * Structured output an agent must return from one Harbour transformation attempt. Handed to the agent as its output schema, then decoded and semantically re-validated by the control plane, which remains the authority. The enum on applied_playbooks.items is the one dynamic part: the adapter injects the names of the playbooks supplied for that invocation before writing the document, so the model is structurally prevented from naming a playbook it was not given. Application-secret handling was removed platform-wide, so this document carries no redactions and no secrets fields.
5
+ * Structured output an agent must return from one Harbour transformation attempt. Handed to the agent as its output schema, then decoded and semantically re-validated by the control plane, which remains the authority. The enum on applied_playbooks.items is the one dynamic part: the adapter injects the names of the playbooks supplied for that invocation before writing the document, so the model is structurally prevented from naming a playbook it was not given. Application-secret handling was removed platform-wide, so this document carries no redactions and no secrets fields. A deployable report must also carry preservation_plan: the agent's own grounded smoke tests (one to three happy_path user journeys plus a boundary_check per behaviour its playbooks or edits could regress) that the validation cell executes after transformation, and an uncovered list naming every boundary it could not test and why. An unsupported report carries only application.unsupported and no plan.
6
6
  */
7
7
  export type TransformReport = {
8
8
  /**
@@ -58,6 +58,119 @@ export type TransformReport = {
58
58
  */
59
59
  unsupportedFeatures: string[];
60
60
  };
61
+ /**
62
+ * Agent-authored preservation (smoke) plan for this attempt. Required whenever the report is deployable; forbidden on an unsupported report. Every test must be grounded in files the agent actually read or changed (evidence) and expressed as tenant-relative browser or HTTP steps the validation cell can execute without secrets. Structural bounds live here; per-action required fields, at least one assert* step per test, one to three happy_path tests, unique ids, the {{runId}} substitution and path safety are enforced semantically by the deployment plane.
63
+ */
64
+ preservation_plan?: {
65
+ version: 1;
66
+ /**
67
+ * Ordered smoke tests. happy_path tests cover primary user journeys inferred from routes, APIs, forms and focused tests; boundary_check tests pin the smallest observable behaviour each applied playbook or changed file could regress.
68
+ *
69
+ * @minItems 1
70
+ * @maxItems 8
71
+ */
72
+ tests: {
73
+ id: string;
74
+ kind: 'happy_path' | 'boundary_check';
75
+ name: string;
76
+ /**
77
+ * Transformation boundaries this test claims to cover.
78
+ *
79
+ * @minItems 1
80
+ * @maxItems 8
81
+ */
82
+ boundaries: (
83
+ | 'application'
84
+ | 'routing'
85
+ | 'database'
86
+ | 'authentication'
87
+ | 'runtime_dependency'
88
+ | 'files'
89
+ | 'provider'
90
+ | 'background_work'
91
+ )[];
92
+ /**
93
+ * Files (and optionally lines) in the transformed workspace that ground this test. Paths must exist after transformation.
94
+ *
95
+ * @minItems 1
96
+ * @maxItems 8
97
+ */
98
+ evidence: {
99
+ path: string;
100
+ line?: number;
101
+ reason: string;
102
+ }[];
103
+ confidence: 'high' | 'medium' | 'low';
104
+ /**
105
+ * Executed in order inside the validation cell's authenticated browser context; the test stops at its first failed step. Which optional fields apply depends on action: navigate/request/assertURL use path; click/fill/assertVisible use target; fill uses value; assertVisible uses text; request uses method, body and name; assertResponse uses request, status, jsonKey and jsonValue.
106
+ *
107
+ * @minItems 1
108
+ * @maxItems 20
109
+ */
110
+ steps: {
111
+ action: 'navigate' | 'click' | 'fill' | 'reload' | 'request' | 'assertVisible' | 'assertURL' | 'assertResponse';
112
+ /**
113
+ * Tenant-relative path starting with '/'; never a scheme or host.
114
+ */
115
+ path?: string;
116
+ target?: {
117
+ by: 'role' | 'label' | 'placeholder' | 'text' | 'testId' | 'css';
118
+ role?: string;
119
+ /**
120
+ * Accessible name when by is role.
121
+ */
122
+ name?: string;
123
+ /**
124
+ * Locator value for every by other than role.
125
+ */
126
+ value?: string;
127
+ };
128
+ value?: string;
129
+ text?: string;
130
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
131
+ /**
132
+ * JSON text sent as the request body.
133
+ */
134
+ body?: string;
135
+ /**
136
+ * Names a request's response for a later assertResponse in the same test.
137
+ */
138
+ name?: string;
139
+ /**
140
+ * The named preceding request an assertResponse inspects.
141
+ */
142
+ request?: string;
143
+ status?: number;
144
+ /**
145
+ * Top-level key or dotted path into the JSON response; no brackets.
146
+ */
147
+ jsonKey?: string;
148
+ /**
149
+ * Expected value, compared as a string.
150
+ */
151
+ jsonValue?: string;
152
+ timeoutMs?: number;
153
+ }[];
154
+ }[];
155
+ /**
156
+ * Boundaries the agent deliberately left untested, each with a reviewed reason. An empty array claims full coverage.
157
+ *
158
+ * @maxItems 8
159
+ */
160
+ uncovered: {
161
+ boundary:
162
+ | 'application'
163
+ | 'routing'
164
+ | 'database'
165
+ | 'authentication'
166
+ | 'runtime_dependency'
167
+ | 'files'
168
+ | 'provider'
169
+ | 'background_work';
170
+ reason: 'not-observable-in-validation-cell' | 'no-safe-fixture' | 'no-grounded-surface';
171
+ detail?: string;
172
+ }[];
173
+ };
61
174
  application: {
62
175
  unsupported?: {
63
176
  capability: string;
@@ -0,0 +1,70 @@
1
+ /* eslint-disable */
2
+ // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
+
4
+ export type Workload = {
5
+ name: string;
6
+ kind: 'web' | 'action' | 'worker' | 'cron' | 'job';
7
+ command: Command;
8
+ resourceProfile: ResourceProfile;
9
+ port?: number;
10
+ alwaysOn?: boolean;
11
+ queueConsumer?: QueueConsumer;
12
+ schedule?: Schedule;
13
+ runPolicy?: RunPolicy;
14
+ };
15
+ /**
16
+ * @minItems 1
17
+ * @maxItems 32
18
+ */
19
+ export type Command = string[];
20
+ export type ResourceProfile = 'standard' | 'memory-1g';
21
+
22
+ /**
23
+ * Versioned provisioning input emitted by Harbour Transform. It describes runtime wiring and workload lifecycle only; PostgreSQL grants and RLS remain the database authorization authority.
24
+ */
25
+ export interface WellDefinedAppManifest {
26
+ version: 1;
27
+ architecture: 'static-v1' | 'fullstack-v1' | 'spa-harbour-data-v1';
28
+ /**
29
+ * Required only when transformed browser code uses @harbour/app-sdk.
30
+ */
31
+ sdkMajor?: 1;
32
+ /**
33
+ * @maxItems 64
34
+ */
35
+ workloads: Workload[];
36
+ /**
37
+ * @maxItems 128
38
+ */
39
+ bindings: WorkloadBinding[];
40
+ }
41
+ export interface QueueConsumer {
42
+ logicalName: string;
43
+ minReplicas: number;
44
+ maxReplicas: number;
45
+ cooldownSeconds: number;
46
+ }
47
+ export interface Schedule {
48
+ cron: string;
49
+ timeZone: string;
50
+ concurrencyPolicy: 'Allow' | 'Forbid' | 'Replace';
51
+ startingDeadlineSeconds: number;
52
+ timeoutSeconds: number;
53
+ retries: number;
54
+ successfulHistoryLimit: number;
55
+ failedHistoryLimit: number;
56
+ }
57
+ export interface RunPolicy {
58
+ timeoutSeconds: number;
59
+ retries: number;
60
+ ttlSecondsAfterFinished: number;
61
+ }
62
+ export interface WorkloadBinding {
63
+ kind: 'database' | 'files' | 'queue' | 'secret' | 'external';
64
+ logicalName: string;
65
+ provider: 'aurora-postgresql' | 's3-private' | 'nats-jetstream' | 'secrets-manager' | 'external-https';
66
+ /**
67
+ * Value-free control-plane identifier. Never a credential or provider URL.
68
+ */
69
+ reference?: string;
70
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fourier-labs/harbour-contracts",
3
- "version": "0.32.0",
3
+ "version": "0.35.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,
@@ -75,10 +75,32 @@
75
75
  }
76
76
  },
77
77
  "policyDigest": { "$ref": "#/definitions/AiDecisionDigest" },
78
+ "configurationMappings": {
79
+ "description": "Optional value-free descriptors for reviewed non-standard client environment boundaries. Mapping IDs are unique within a contract.",
80
+ "type": "array",
81
+ "minItems": 1,
82
+ "maxItems": 16,
83
+ "uniqueItems": true,
84
+ "items": { "$ref": "#/definitions/AiDecisionConfigurationMappingDescriptor" }
85
+ },
78
86
  "runtimeBinding": { "$ref": "#/definitions/AiDecisionRuntimeBinding" },
79
87
  "requiredStrategies": { "type": "array", "minItems": 1, "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": ["deployment_injection", "deterministic_adapter"] } }
80
88
  }
81
89
  },
90
+ "AiDecisionConfigurationMappingDescriptor": {
91
+ "description": "Value-free descriptor for one registered OpenAI-compatible client environment boundary. Secret values are never part of this descriptor.",
92
+ "type": "object",
93
+ "additionalProperties": false,
94
+ "required": ["mappingId", "version", "protocol", "providerId", "apiKeyEnvironmentName", "baseUrlEnvironmentName"],
95
+ "properties": {
96
+ "mappingId": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$" },
97
+ "version": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$" },
98
+ "protocol": { "type": "string", "const": "openai-chat" },
99
+ "providerId": { "type": "string", "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9_.-]{0,63}$" },
100
+ "apiKeyEnvironmentName": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Z][A-Z0-9_]{0,127}$" },
101
+ "baseUrlEnvironmentName": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Z][A-Z0-9_]{0,127}$" }
102
+ }
103
+ },
82
104
  "AiDecisionRuntimeBinding": {
83
105
  "type": "object",
84
106
  "additionalProperties": false,
@@ -48,6 +48,11 @@
48
48
  }
49
49
  }
50
50
  },
51
+ "workload_image_ref": {
52
+ "type": "string",
53
+ "pattern": "^[^\\s@]+@sha256:[0-9a-f]{64}$",
54
+ "description": "Optional immutable OCI image used only by auxiliary workloads of a statically served SPA."
55
+ },
51
56
  "static": {
52
57
  "type": "object",
53
58
  "additionalProperties": false,
@@ -135,6 +140,28 @@
135
140
  }
136
141
  }
137
142
  },
143
+ "well_defined_app": {
144
+ "type": "object",
145
+ "additionalProperties": false,
146
+ "required": ["version", "path", "sha256"],
147
+ "properties": {
148
+ "version": { "type": "integer", "const": 1 },
149
+ "path": { "type": "string", "const": ".harbour/app-manifest.json" },
150
+ "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
151
+ },
152
+ "description": "Optional digest-pinned P0 well-defined application manifest. Provisioning reads the referenced document without re-analyzing source."
153
+ },
154
+ "app_capabilities": {
155
+ "type": "object",
156
+ "additionalProperties": false,
157
+ "required": ["version", "path", "sha256"],
158
+ "properties": {
159
+ "version": { "type": "integer", "const": 1 },
160
+ "path": { "type": "string", "const": ".harbour/app-capabilities.json" },
161
+ "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
162
+ },
163
+ "description": "Optional digest-pinned browser capability declaration published only after LIVE cutover."
164
+ },
138
165
  "route_auth": {
139
166
  "description": "Optional method/path authentication policy compiled by the transformation. The default is SSO; listed routes preserve the application's own token, signature, or callback authorization.",
140
167
  "type": "object",
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "transform": {
43
43
  "$ref": "#/definitions/DeployRequestTransform",
44
- "description": "Optional transformation-engine selection. Absence preserves the existing sequential engine."
44
+ "description": "Optional transformation-engine selection. New preview deployments default to branch_select; set sequential explicitly for the legacy engine."
45
45
  },
46
46
  "bindingClassification": {
47
47
  "$ref": "binding-classification-subject.schema.json",
@@ -56,7 +56,7 @@
56
56
  "strategy": {
57
57
  "type": "string",
58
58
  "enum": ["sequential", "branch_select"],
59
- "description": "Transformation engine. Omit to preserve the existing sequential default."
59
+ "description": "Transformation engine. Omit to use branch_select for a newly admitted preview deployment."
60
60
  }
61
61
  }
62
62
  },
@@ -24,7 +24,7 @@
24
24
  { "id": "storage.unsupported-engine", "retryable": false, "family": true, "description": "Storage engine with no Harbour mapping; concrete token names the engine, e.g. storage.unsupported-engine.mongodb." },
25
25
  { "id": "storage.mapping-drift", "retryable": false, "description": "Declared storage binding diverged from detected usage." },
26
26
  { "id": "storage.unavailable", "retryable": true, "description": "The platform's shared application database could not be reached while preparing or provisioning the deploy — e.g. the Aurora cluster dial timing out during a scale-from-zero cold start. Says nothing about the app, so it IS retryable: the same deploy submitted again is expected to succeed once the database is awake. Previously surfaced as uncategorized.deploy (errorType wrapError)." },
27
- { "id": "transform.deadline-exceeded", "retryable": false, "description": "The 15-minute transform wall deadline was reached." },
27
+ { "id": "transform.deadline-exceeded", "retryable": true, "description": "The transform wall deadline was reached before a passing candidate was found. A fresh deployment attempt is safe and may resume from the latest saved transformation checkpoint." },
28
28
  { "id": "transform.non-retryable", "retryable": false, "family": true, "description": "Agent declared the app unconvertible or hit an unsupported construct; fails immediately without burning remaining budget. Concrete token names the reason." },
29
29
  { "id": "transform.validation-failed", "retryable": true, "description": "Transform candidate failed validation with iterable feedback; re-enters TRANSFORMING while deadline remains." },
30
30
  { "id": "frontend.env-inlined-unfixable", "retryable": false, "description": "Client code inlined build-time env/self-URLs in a way transformation cannot rewrite." },
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://schemas.harbour.dev/transform-report.schema.json",
4
4
  "title": "TransformReport",
5
- "description": "Structured output an agent must return from one Harbour transformation attempt. Handed to the agent as its output schema, then decoded and semantically re-validated by the control plane, which remains the authority. The enum on applied_playbooks.items is the one dynamic part: the adapter injects the names of the playbooks supplied for that invocation before writing the document, so the model is structurally prevented from naming a playbook it was not given. Application-secret handling was removed platform-wide, so this document carries no redactions and no secrets fields.",
5
+ "description": "Structured output an agent must return from one Harbour transformation attempt. Handed to the agent as its output schema, then decoded and semantically re-validated by the control plane, which remains the authority. The enum on applied_playbooks.items is the one dynamic part: the adapter injects the names of the playbooks supplied for that invocation before writing the document, so the model is structurally prevented from naming a playbook it was not given. Application-secret handling was removed platform-wide, so this document carries no redactions and no secrets fields. A deployable report must also carry preservation_plan: the agent's own grounded smoke tests (one to three happy_path user journeys plus a boundary_check per behaviour its playbooks or edits could regress) that the validation cell executes after transformation, and an uncovered list naming every boundary it could not test and why. An unsupported report carries only application.unsupported and no plan.",
6
6
  "x-go-embed": true,
7
7
  "type": "object",
8
8
  "additionalProperties": false,
@@ -102,6 +102,123 @@
102
102
  }
103
103
  }
104
104
  },
105
+ "preservation_plan": {
106
+ "description": "Agent-authored preservation (smoke) plan for this attempt. Required whenever the report is deployable; forbidden on an unsupported report. Every test must be grounded in files the agent actually read or changed (evidence) and expressed as tenant-relative browser or HTTP steps the validation cell can execute without secrets. Structural bounds live here; per-action required fields, at least one assert* step per test, one to three happy_path tests, unique ids, the {{runId}} substitution and path safety are enforced semantically by the deployment plane.",
107
+ "type": "object",
108
+ "additionalProperties": false,
109
+ "required": ["version", "tests", "uncovered"],
110
+ "properties": {
111
+ "version": { "type": "integer", "const": 1 },
112
+ "tests": {
113
+ "description": "Ordered smoke tests. happy_path tests cover primary user journeys inferred from routes, APIs, forms and focused tests; boundary_check tests pin the smallest observable behaviour each applied playbook or changed file could regress.",
114
+ "type": "array",
115
+ "minItems": 1,
116
+ "maxItems": 8,
117
+ "items": {
118
+ "type": "object",
119
+ "additionalProperties": false,
120
+ "required": ["id", "kind", "name", "boundaries", "evidence", "confidence", "steps"],
121
+ "properties": {
122
+ "id": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,63}$" },
123
+ "kind": { "type": "string", "enum": ["happy_path", "boundary_check"] },
124
+ "name": { "type": "string", "minLength": 1, "maxLength": 120 },
125
+ "boundaries": {
126
+ "description": "Transformation boundaries this test claims to cover.",
127
+ "type": "array",
128
+ "minItems": 1,
129
+ "maxItems": 8,
130
+ "uniqueItems": true,
131
+ "items": {
132
+ "type": "string",
133
+ "enum": ["application", "routing", "database", "authentication", "runtime_dependency", "files", "provider", "background_work"]
134
+ }
135
+ },
136
+ "evidence": {
137
+ "description": "Files (and optionally lines) in the transformed workspace that ground this test. Paths must exist after transformation.",
138
+ "type": "array",
139
+ "minItems": 1,
140
+ "maxItems": 8,
141
+ "items": {
142
+ "type": "object",
143
+ "additionalProperties": false,
144
+ "required": ["path", "reason"],
145
+ "properties": {
146
+ "path": { "type": "string", "minLength": 1, "maxLength": 512 },
147
+ "line": { "type": "integer", "minimum": 1 },
148
+ "reason": { "type": "string", "minLength": 1, "maxLength": 512 }
149
+ }
150
+ }
151
+ },
152
+ "confidence": { "type": "string", "enum": ["high", "medium", "low"] },
153
+ "steps": {
154
+ "description": "Executed in order inside the validation cell's authenticated browser context; the test stops at its first failed step. Which optional fields apply depends on action: navigate/request/assertURL use path; click/fill/assertVisible use target; fill uses value; assertVisible uses text; request uses method, body and name; assertResponse uses request, status, jsonKey and jsonValue.",
155
+ "type": "array",
156
+ "minItems": 1,
157
+ "maxItems": 20,
158
+ "items": {
159
+ "type": "object",
160
+ "additionalProperties": false,
161
+ "required": ["action"],
162
+ "properties": {
163
+ "action": {
164
+ "type": "string",
165
+ "enum": ["navigate", "click", "fill", "reload", "request", "assertVisible", "assertURL", "assertResponse"]
166
+ },
167
+ "path": {
168
+ "description": "Tenant-relative path starting with '/'; never a scheme or host.",
169
+ "type": "string",
170
+ "maxLength": 512
171
+ },
172
+ "target": {
173
+ "type": "object",
174
+ "additionalProperties": false,
175
+ "required": ["by"],
176
+ "properties": {
177
+ "by": { "type": "string", "enum": ["role", "label", "placeholder", "text", "testId", "css"] },
178
+ "role": { "type": "string", "maxLength": 64 },
179
+ "name": { "description": "Accessible name when by is role.", "type": "string", "maxLength": 256 },
180
+ "value": { "description": "Locator value for every by other than role.", "type": "string", "maxLength": 512 }
181
+ }
182
+ },
183
+ "value": { "type": "string", "maxLength": 1024 },
184
+ "text": { "type": "string", "maxLength": 512 },
185
+ "method": { "type": "string", "enum": ["GET", "POST", "PUT", "PATCH", "DELETE"] },
186
+ "body": { "description": "JSON text sent as the request body.", "type": "string", "maxLength": 16384 },
187
+ "name": { "description": "Names a request's response for a later assertResponse in the same test.", "type": "string", "pattern": "^[a-z][a-z0-9-]{0,63}$" },
188
+ "request": { "description": "The named preceding request an assertResponse inspects.", "type": "string", "pattern": "^[a-z][a-z0-9-]{0,63}$" },
189
+ "status": { "type": "integer", "minimum": 100, "maximum": 599 },
190
+ "jsonKey": { "description": "Top-level key or dotted path into the JSON response; no brackets.", "type": "string", "maxLength": 128 },
191
+ "jsonValue": { "description": "Expected value, compared as a string.", "type": "string", "maxLength": 512 },
192
+ "timeoutMs": { "type": "integer", "minimum": 1000, "maximum": 30000 }
193
+ }
194
+ }
195
+ }
196
+ }
197
+ }
198
+ },
199
+ "uncovered": {
200
+ "description": "Boundaries the agent deliberately left untested, each with a reviewed reason. An empty array claims full coverage.",
201
+ "type": "array",
202
+ "maxItems": 8,
203
+ "items": {
204
+ "type": "object",
205
+ "additionalProperties": false,
206
+ "required": ["boundary", "reason"],
207
+ "properties": {
208
+ "boundary": {
209
+ "type": "string",
210
+ "enum": ["application", "routing", "database", "authentication", "runtime_dependency", "files", "provider", "background_work"]
211
+ },
212
+ "reason": {
213
+ "type": "string",
214
+ "enum": ["not-observable-in-validation-cell", "no-safe-fixture", "no-grounded-surface"]
215
+ },
216
+ "detail": { "type": "string", "maxLength": 512 }
217
+ }
218
+ }
219
+ }
220
+ }
221
+ },
105
222
  "application": {
106
223
  "type": "object",
107
224
  "additionalProperties": false,
@@ -245,7 +362,7 @@
245
362
  },
246
363
  "oneOf": [
247
364
  {
248
- "required": ["applied_playbooks", "static_rebuild_required", "analysis", "database", "application"],
365
+ "required": ["applied_playbooks", "static_rebuild_required", "analysis", "database", "preservation_plan", "application"],
249
366
  "properties": {
250
367
  "application": {
251
368
  "required": ["runtime", "buildKind", "topology", "entrypoint", "build", "basePath", "evidence", "unsupportedFeatures"],
@@ -0,0 +1,152 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://schemas.harbour.dev/well-defined-app-manifest.schema.json",
4
+ "title": "WellDefinedAppManifest",
5
+ "description": "Versioned provisioning input emitted by Harbour Transform. It describes runtime wiring and workload lifecycle only; PostgreSQL grants and RLS remain the database authorization authority.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["version", "architecture", "workloads", "bindings"],
9
+ "properties": {
10
+ "version": { "type": "integer", "const": 1 },
11
+ "architecture": {
12
+ "type": "string",
13
+ "enum": ["static-v1", "fullstack-v1", "spa-harbour-data-v1"]
14
+ },
15
+ "sdkMajor": {
16
+ "type": "integer",
17
+ "const": 1,
18
+ "description": "Required only when transformed browser code uses @harbour/app-sdk."
19
+ },
20
+ "workloads": {
21
+ "type": "array",
22
+ "maxItems": 64,
23
+ "items": { "$ref": "#/definitions/Workload" }
24
+ },
25
+ "bindings": {
26
+ "type": "array",
27
+ "maxItems": 128,
28
+ "items": { "$ref": "#/definitions/WorkloadBinding" }
29
+ }
30
+ },
31
+ "definitions": {
32
+ "ResourceProfile": {
33
+ "type": "string",
34
+ "enum": ["standard", "memory-1g"]
35
+ },
36
+ "Command": {
37
+ "type": "array",
38
+ "minItems": 1,
39
+ "maxItems": 32,
40
+ "items": { "type": "string", "minLength": 1, "maxLength": 1024 }
41
+ },
42
+ "Workload": {
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "required": ["name", "kind", "command", "resourceProfile"],
46
+ "properties": {
47
+ "name": {
48
+ "type": "string",
49
+ "pattern": "^[a-z][a-z0-9-]{0,62}$"
50
+ },
51
+ "kind": {
52
+ "type": "string",
53
+ "enum": ["web", "action", "worker", "cron", "job"]
54
+ },
55
+ "command": { "$ref": "#/definitions/Command" },
56
+ "resourceProfile": { "$ref": "#/definitions/ResourceProfile" },
57
+ "port": { "type": "integer", "minimum": 1, "maximum": 65535 },
58
+ "alwaysOn": { "type": "boolean" },
59
+ "queueConsumer": { "$ref": "#/definitions/QueueConsumer" },
60
+ "schedule": { "$ref": "#/definitions/Schedule" },
61
+ "runPolicy": { "$ref": "#/definitions/RunPolicy" }
62
+ },
63
+ "allOf": [
64
+ {
65
+ "if": { "properties": { "kind": { "const": "cron" } }, "required": ["kind"] },
66
+ "then": { "required": ["schedule"] },
67
+ "else": { "not": { "required": ["schedule"] } }
68
+ },
69
+ {
70
+ "if": { "required": ["queueConsumer"] },
71
+ "then": { "properties": { "kind": { "enum": ["worker", "job"] } } }
72
+ },
73
+ {
74
+ "if": { "properties": { "kind": { "const": "action" } }, "required": ["kind"] },
75
+ "then": { "properties": { "port": { "const": 8080 } } }
76
+ },
77
+ {
78
+ "if": { "properties": { "kind": { "const": "job" } }, "required": ["kind"] },
79
+ "then": {
80
+ "required": ["queueConsumer", "runPolicy"],
81
+ "properties": {
82
+ "queueConsumer": {
83
+ "allOf": [
84
+ { "$ref": "#/definitions/QueueConsumer" },
85
+ { "properties": { "minReplicas": { "const": 0 } } }
86
+ ]
87
+ }
88
+ }
89
+ },
90
+ "else": { "not": { "required": ["runPolicy"] } }
91
+ }
92
+ ]
93
+ },
94
+ "QueueConsumer": {
95
+ "type": "object",
96
+ "additionalProperties": false,
97
+ "required": ["logicalName", "minReplicas", "maxReplicas", "cooldownSeconds"],
98
+ "properties": {
99
+ "logicalName": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,62}$" },
100
+ "minReplicas": { "type": "integer", "minimum": 0, "maximum": 100 },
101
+ "maxReplicas": { "type": "integer", "minimum": 1, "maximum": 100 },
102
+ "cooldownSeconds": { "type": "integer", "minimum": 0, "maximum": 3600 }
103
+ }
104
+ },
105
+ "Schedule": {
106
+ "type": "object",
107
+ "additionalProperties": false,
108
+ "required": ["cron", "timeZone", "concurrencyPolicy", "startingDeadlineSeconds", "timeoutSeconds", "retries", "successfulHistoryLimit", "failedHistoryLimit"],
109
+ "properties": {
110
+ "cron": { "type": "string", "minLength": 9, "maxLength": 128 },
111
+ "timeZone": { "type": "string", "minLength": 1, "maxLength": 64 },
112
+ "concurrencyPolicy": { "type": "string", "enum": ["Allow", "Forbid", "Replace"] },
113
+ "startingDeadlineSeconds": { "type": "integer", "minimum": 0, "maximum": 86400 },
114
+ "timeoutSeconds": { "type": "integer", "minimum": 1, "maximum": 86400 },
115
+ "retries": { "type": "integer", "minimum": 0, "maximum": 20 },
116
+ "successfulHistoryLimit": { "type": "integer", "minimum": 0, "maximum": 20 },
117
+ "failedHistoryLimit": { "type": "integer", "minimum": 0, "maximum": 20 }
118
+ }
119
+ },
120
+ "RunPolicy": {
121
+ "type": "object",
122
+ "additionalProperties": false,
123
+ "required": ["timeoutSeconds", "retries", "ttlSecondsAfterFinished"],
124
+ "properties": {
125
+ "timeoutSeconds": { "type": "integer", "minimum": 1, "maximum": 86400 },
126
+ "retries": { "type": "integer", "minimum": 0, "maximum": 20 },
127
+ "ttlSecondsAfterFinished": { "type": "integer", "minimum": 60, "maximum": 604800 }
128
+ }
129
+ },
130
+ "WorkloadBinding": {
131
+ "type": "object",
132
+ "additionalProperties": false,
133
+ "required": ["kind", "logicalName", "provider"],
134
+ "properties": {
135
+ "kind": {
136
+ "type": "string",
137
+ "enum": ["database", "files", "queue", "secret", "external"]
138
+ },
139
+ "logicalName": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,62}$" },
140
+ "provider": {
141
+ "type": "string",
142
+ "enum": ["aurora-postgresql", "s3-private", "nats-jetstream", "secrets-manager", "external-https"]
143
+ },
144
+ "reference": {
145
+ "type": "string",
146
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9/_.:-]{0,255}$",
147
+ "description": "Value-free control-plane identifier. Never a credential or provider URL."
148
+ }
149
+ }
150
+ }
151
+ }
152
+ }