@fourier-labs/harbour-contracts 0.4.0 → 0.6.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 (91) hide show
  1. package/dist/gen-ts/ai-callsite-inventory.d.ts +49 -0
  2. package/dist/gen-ts/ai-gateway-key-lookup.d.ts +20 -0
  3. package/dist/gen-ts/ai-gateway-key-token.d.ts +4 -0
  4. package/dist/gen-ts/ai-gateway-key-token.js +6 -0
  5. package/dist/gen-ts/ai-governance-decision.d.ts +74 -0
  6. package/dist/gen-ts/ai-policy-snapshot.d.ts +165 -0
  7. package/dist/gen-ts/ai-runtime-contract.d.ts +27 -0
  8. package/dist/gen-ts/ai-trace-event.d.ts +68 -0
  9. package/dist/gen-ts/ai-transform-event.d.ts +47 -0
  10. package/dist/gen-ts/ai-transform-result.d.ts +32 -0
  11. package/dist/gen-ts/ai-verification-evidence.d.ts +49 -0
  12. package/dist/gen-ts/data-dependency.d.ts +42 -0
  13. package/dist/gen-ts/data-grant.d.ts +58 -0
  14. package/dist/gen-ts/data-grant.js +12 -0
  15. package/dist/gen-ts/data-source.d.ts +74 -0
  16. package/dist/{deploy-request.d.ts → gen-ts/deploy-request.d.ts} +30 -0
  17. package/dist/gen-ts/deployment-source.js +3 -0
  18. package/dist/gen-ts/deployment-status-failure.js +3 -0
  19. package/dist/gen-ts/deployment-status-request.js +3 -0
  20. package/dist/gen-ts/deployment-status-response.js +3 -0
  21. package/dist/gen-ts/env-bindings.js +3 -0
  22. package/dist/{error-category-registry.d.ts → gen-ts/error-category-registry.d.ts} +5 -0
  23. package/dist/{error-category-registry.js → gen-ts/error-category-registry.js} +10 -0
  24. package/dist/gen-ts/error-category.js +3 -0
  25. package/dist/gen-ts/error-envelope.js +3 -0
  26. package/dist/{index.d.ts → gen-ts/index.d.ts} +15 -0
  27. package/dist/{index.js → gen-ts/index.js} +15 -0
  28. package/dist/gen-ts/kvs-routing-entry.d.ts +27 -0
  29. package/dist/gen-ts/kvs-routing-entry.js +3 -0
  30. package/dist/gen-ts/promotion-request.d.ts +40 -0
  31. package/dist/gen-ts/promotion-request.js +3 -0
  32. package/dist/gen-ts/promotion-response.js +3 -0
  33. package/dist/gen-ts/secret-reference.d.ts +36 -0
  34. package/dist/gen-ts/secret-reference.js +3 -0
  35. package/dist/gen-ts/transform-report.d.ts +102 -0
  36. package/dist/gen-ts/transform-report.js +3 -0
  37. package/dist/gen-ts/version-state.js +3 -0
  38. package/dist/resolver/index.d.ts +256 -0
  39. package/dist/resolver/index.js +679 -0
  40. package/package.json +14 -4
  41. package/schema/ai-callsite-inventory.schema.json +138 -0
  42. package/schema/ai-gateway-key-lookup.schema.json +53 -0
  43. package/schema/ai-governance-decision.schema.json +105 -0
  44. package/schema/ai-policy-snapshot.schema.json +340 -0
  45. package/schema/ai-runtime-contract.schema.json +85 -0
  46. package/schema/ai-trace-event.schema.json +178 -0
  47. package/schema/ai-transform-event.schema.json +72 -0
  48. package/schema/ai-transform-result.schema.json +46 -0
  49. package/schema/ai-verification-evidence.schema.json +57 -0
  50. package/schema/data-dependency.schema.json +89 -0
  51. package/schema/data-grant.schema.json +107 -0
  52. package/schema/data-source.schema.json +151 -0
  53. package/schema/deploy-request.schema.json +60 -0
  54. package/schema/error-category.enum.json +6 -1
  55. package/schema/kvs-routing-entry.schema.json +28 -8
  56. package/schema/promotion-request.schema.json +38 -0
  57. package/schema/secret-reference.schema.json +70 -0
  58. package/schema/transform-report.schema.json +204 -0
  59. package/dist/kvs-routing-entry.d.ts +0 -13
  60. package/dist/promotion-request.d.ts +0 -17
  61. /package/dist/{api-error-response.js → gen-ts/ai-callsite-inventory.js} +0 -0
  62. /package/dist/{artifact-contract.js → gen-ts/ai-gateway-key-lookup.js} +0 -0
  63. /package/dist/{deploy-request.js → gen-ts/ai-governance-decision.js} +0 -0
  64. /package/dist/{deploy-response.js → gen-ts/ai-policy-snapshot.js} +0 -0
  65. /package/dist/{deployment-environment.js → gen-ts/ai-runtime-contract.js} +0 -0
  66. /package/dist/{deployment-source.js → gen-ts/ai-trace-event.js} +0 -0
  67. /package/dist/{deployment-status-failure.js → gen-ts/ai-transform-event.js} +0 -0
  68. /package/dist/{deployment-status-request.js → gen-ts/ai-transform-result.js} +0 -0
  69. /package/dist/{deployment-status-response.js → gen-ts/ai-verification-evidence.js} +0 -0
  70. /package/dist/{api-error-response.d.ts → gen-ts/api-error-response.d.ts} +0 -0
  71. /package/dist/{env-bindings.js → gen-ts/api-error-response.js} +0 -0
  72. /package/dist/{artifact-contract.d.ts → gen-ts/artifact-contract.d.ts} +0 -0
  73. /package/dist/{error-category.js → gen-ts/artifact-contract.js} +0 -0
  74. /package/dist/{error-envelope.js → gen-ts/data-dependency.js} +0 -0
  75. /package/dist/{kvs-routing-entry.js → gen-ts/data-source.js} +0 -0
  76. /package/dist/{promotion-request.js → gen-ts/deploy-request.js} +0 -0
  77. /package/dist/{deploy-response.d.ts → gen-ts/deploy-response.d.ts} +0 -0
  78. /package/dist/{promotion-response.js → gen-ts/deploy-response.js} +0 -0
  79. /package/dist/{deployment-environment.d.ts → gen-ts/deployment-environment.d.ts} +0 -0
  80. /package/dist/{version-state.js → gen-ts/deployment-environment.js} +0 -0
  81. /package/dist/{deployment-source.d.ts → gen-ts/deployment-source.d.ts} +0 -0
  82. /package/dist/{deployment-status-failure.d.ts → gen-ts/deployment-status-failure.d.ts} +0 -0
  83. /package/dist/{deployment-status-request.d.ts → gen-ts/deployment-status-request.d.ts} +0 -0
  84. /package/dist/{deployment-status-response.d.ts → gen-ts/deployment-status-response.d.ts} +0 -0
  85. /package/dist/{env-bindings.d.ts → gen-ts/env-bindings.d.ts} +0 -0
  86. /package/dist/{error-category.d.ts → gen-ts/error-category.d.ts} +0 -0
  87. /package/dist/{error-envelope.d.ts → gen-ts/error-envelope.d.ts} +0 -0
  88. /package/dist/{promotion-response.d.ts → gen-ts/promotion-response.d.ts} +0 -0
  89. /package/dist/{version-state-machine.d.ts → gen-ts/version-state-machine.d.ts} +0 -0
  90. /package/dist/{version-state-machine.js → gen-ts/version-state-machine.js} +0 -0
  91. /package/dist/{version-state.d.ts → gen-ts/version-state.d.ts} +0 -0
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Closed connector set for the Data-Access MVP.
3
+ */
4
+ export type DataSourceConnector = 'postgres' | 'redshift' | 'bigquery' | 'databricks';
5
+ /**
6
+ * byo = admin brought existing infrastructure; harbour_managed = Harbour provisioned it.
7
+ */
8
+ export type DataSourceProvisioningMode = 'byo' | 'harbour_managed';
9
+ /**
10
+ * DISABLED sources reject new grants and suspend existing access.
11
+ */
12
+ export type DataSourceStatus = 'ACTIVE' | 'DISABLED';
13
+ /**
14
+ * An admin-registered external data source (Data-Access MVP). The credential the platform holds for the source never crosses this boundary — credentialRef is a secretref URI resolved internally. allowedScope is the admin-declared selector allowlist grants are checked against; observedScope is what discovery actually saw and is informational only.
15
+ */
16
+ export interface DataSource {
17
+ /**
18
+ * Owning tenant (org) identifier.
19
+ */
20
+ tenantId: string;
21
+ /**
22
+ * Tenant-unique data-source identifier.
23
+ */
24
+ sourceId: string;
25
+ connector: DataSourceConnector;
26
+ /**
27
+ * Human-readable name shown to admins and builders.
28
+ */
29
+ displayName: string;
30
+ endpoint: DataSourceEndpoint;
31
+ /**
32
+ * secretref URI naming the platform-held credential for this source. The referenced value never crosses this boundary.
33
+ */
34
+ credentialRef: string;
35
+ provisioningMode: DataSourceProvisioningMode;
36
+ /**
37
+ * Admin-declared selector allowlist (e.g. schema.table patterns) that grant scopes are validated against.
38
+ */
39
+ allowedScope: string[];
40
+ /**
41
+ * Selectors discovery actually observed on the source. Informational; never widens allowedScope.
42
+ */
43
+ observedScope?: string[];
44
+ /**
45
+ * Whether builders may request grants against this source.
46
+ */
47
+ requestableByBuilders: boolean;
48
+ status: DataSourceStatus;
49
+ }
50
+ /**
51
+ * Connector endpoint coordinates. host is always present; database vs project/workspace depends on the connector family.
52
+ */
53
+ export interface DataSourceEndpoint {
54
+ /**
55
+ * Network host (or warehouse endpoint) of the source.
56
+ */
57
+ host: string;
58
+ /**
59
+ * TCP port; absent where the connector implies it.
60
+ */
61
+ port?: number;
62
+ /**
63
+ * Database name (postgres/redshift-style connectors).
64
+ */
65
+ database?: string;
66
+ /**
67
+ * Project identifier (bigquery-style connectors).
68
+ */
69
+ project?: string;
70
+ /**
71
+ * Workspace identifier (databricks-style connectors).
72
+ */
73
+ workspace?: string;
74
+ }
@@ -1,3 +1,23 @@
1
+ /**
2
+ * One environment-variable binding: exactly one of secretRef (secret, resolved at runtime) or value (plain literal).
3
+ */
4
+ export type DeployRequestEnvironmentBinding = {
5
+ /**
6
+ * Environment-variable name the app reads.
7
+ */
8
+ name: string;
9
+ /**
10
+ * secretref URI resolved at runtime; the value never appears in the request.
11
+ */
12
+ secretRef?: string;
13
+ /**
14
+ * Plain (non-secret) literal value.
15
+ */
16
+ value?: string;
17
+ } & DeployRequestEnvironmentBinding1;
18
+ export type DeployRequestEnvironmentBinding1 = {
19
+ [k: string]: unknown;
20
+ };
1
21
  /**
2
22
  * JSON body for POST /v1/tenants/{tenant}/apps/{app}/deployments. tenant and app come from path parameters and are not body fields. The preview MVP requires environment=preview. Every accepted POST is a new deployment intent; idempotencyKey is retained only as request correlation.
3
23
  */
@@ -19,6 +39,7 @@ export interface DeployRequest {
19
39
  * Optional legacy request-correlation value returned as requestId. It does not make repeated HTTP POSTs idempotent; versionId is the deployment identity and SQS deduplication key.
20
40
  */
21
41
  idempotencyKey?: string;
42
+ environmentBindings?: DeployRequestEnvironmentBindings;
22
43
  }
23
44
  export interface DeployRequestSource {
24
45
  /**
@@ -30,3 +51,12 @@ export interface DeployRequestSource {
30
51
  */
31
52
  repositoryUrl: string;
32
53
  }
54
+ /**
55
+ * Optional runtime environment configuration (Secret-Manager MVP). Named environmentBindings, not environment — the existing required `environment` property is the deployment-target token and predates this object. Additive: requests without it remain valid.
56
+ */
57
+ export interface DeployRequestEnvironmentBindings {
58
+ /**
59
+ * Environment-variable bindings for this deployment.
60
+ */
61
+ bindings: DeployRequestEnvironmentBinding[];
62
+ }
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
+ export {};
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
+ export {};
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
+ export {};
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
+ export {};
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
+ export {};
@@ -4,6 +4,8 @@ export declare const ErrorCategories: {
4
4
  readonly IntakeAttestationMissing: "intake.attestation-missing";
5
5
  readonly IntakeMultiAppRepo: "intake.multi-app-repo";
6
6
  readonly SecretsUnresolvable: "secrets.unresolvable";
7
+ readonly SecretsReferenceUnresolvable: "secrets.reference-unresolvable";
8
+ readonly SecretsPlaceholderUnresolved: "secrets.placeholder-unresolved";
7
9
  readonly SecretsLeakedInArtifact: "secrets.leaked-in-artifact";
8
10
  readonly StorageSqliteMisclassified: "storage.sqlite-misclassified";
9
11
  readonly StorageMappingDrift: "storage.mapping-drift";
@@ -12,6 +14,8 @@ export declare const ErrorCategories: {
12
14
  readonly FrontendEnvInlinedUnfixable: "frontend.env-inlined-unfixable";
13
15
  readonly BuildRecipeFailed: "build.recipe-failed";
14
16
  readonly BuildImageTooLarge: "build.image-too-large";
17
+ readonly BrowserProbeFailed: "browser.probe-failed";
18
+ readonly BrowserProbeUnavailable: "browser.probe-unavailable";
15
19
  readonly VerifySmokeFailed: "verify.smoke-failed";
16
20
  readonly VerifyCharacterizationDiverged: "verify.characterization-diverged";
17
21
  readonly VerifyMigrationFromZeroFailed: "verify.migration-from-zero-failed";
@@ -27,6 +31,7 @@ export declare const ErrorCategories: {
27
31
  readonly AdmissionAppNotRegistered: "admission.app-not-registered";
28
32
  readonly DeployCommitNotOnBranch: "deploy.commit-not-on-branch";
29
33
  readonly DeployQueuePublicationFailed: "deploy.queue-publication-failed";
34
+ readonly SourceBranchMoved: "source.branch-moved";
30
35
  readonly PromotionPreviewNotPromotable: "promotion.preview-not-promotable";
31
36
  readonly PromotionProductionBranchMoved: "promotion.production-branch-moved";
32
37
  readonly PromotionSourceTreeMismatch: "promotion.source-tree-mismatch";
@@ -6,6 +6,8 @@ export const ErrorCategories = {
6
6
  IntakeAttestationMissing: "intake.attestation-missing",
7
7
  IntakeMultiAppRepo: "intake.multi-app-repo",
8
8
  SecretsUnresolvable: "secrets.unresolvable",
9
+ SecretsReferenceUnresolvable: "secrets.reference-unresolvable",
10
+ SecretsPlaceholderUnresolved: "secrets.placeholder-unresolved",
9
11
  SecretsLeakedInArtifact: "secrets.leaked-in-artifact",
10
12
  StorageSqliteMisclassified: "storage.sqlite-misclassified",
11
13
  StorageMappingDrift: "storage.mapping-drift",
@@ -14,6 +16,8 @@ export const ErrorCategories = {
14
16
  FrontendEnvInlinedUnfixable: "frontend.env-inlined-unfixable",
15
17
  BuildRecipeFailed: "build.recipe-failed",
16
18
  BuildImageTooLarge: "build.image-too-large",
19
+ BrowserProbeFailed: "browser.probe-failed",
20
+ BrowserProbeUnavailable: "browser.probe-unavailable",
17
21
  VerifySmokeFailed: "verify.smoke-failed",
18
22
  VerifyCharacterizationDiverged: "verify.characterization-diverged",
19
23
  VerifyMigrationFromZeroFailed: "verify.migration-from-zero-failed",
@@ -29,6 +33,7 @@ export const ErrorCategories = {
29
33
  AdmissionAppNotRegistered: "admission.app-not-registered",
30
34
  DeployCommitNotOnBranch: "deploy.commit-not-on-branch",
31
35
  DeployQueuePublicationFailed: "deploy.queue-publication-failed",
36
+ SourceBranchMoved: "source.branch-moved",
32
37
  PromotionPreviewNotPromotable: "promotion.preview-not-promotable",
33
38
  PromotionProductionBranchMoved: "promotion.production-branch-moved",
34
39
  PromotionSourceTreeMismatch: "promotion.source-tree-mismatch",
@@ -44,6 +49,8 @@ const retryableExact = {
44
49
  "intake.attestation-missing": false,
45
50
  "intake.multi-app-repo": false,
46
51
  "secrets.unresolvable": false,
52
+ "secrets.reference-unresolvable": false,
53
+ "secrets.placeholder-unresolved": false,
47
54
  "secrets.leaked-in-artifact": false,
48
55
  "storage.sqlite-misclassified": false,
49
56
  "storage.mapping-drift": false,
@@ -52,6 +59,8 @@ const retryableExact = {
52
59
  "frontend.env-inlined-unfixable": false,
53
60
  "build.recipe-failed": false,
54
61
  "build.image-too-large": false,
62
+ "browser.probe-failed": true,
63
+ "browser.probe-unavailable": false,
55
64
  "verify.smoke-failed": false,
56
65
  "verify.characterization-diverged": false,
57
66
  "verify.migration-from-zero-failed": false,
@@ -67,6 +76,7 @@ const retryableExact = {
67
76
  "admission.app-not-registered": false,
68
77
  "deploy.commit-not-on-branch": false,
69
78
  "deploy.queue-publication-failed": true,
79
+ "source.branch-moved": false,
70
80
  "promotion.preview-not-promotable": false,
71
81
  "promotion.production-branch-moved": false,
72
82
  "promotion.source-tree-mismatch": false,
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
+ export {};
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
+ export {};
@@ -1,5 +1,18 @@
1
+ export * from './ai-callsite-inventory.js';
2
+ export * from './ai-gateway-key-lookup.js';
3
+ export * from './ai-gateway-key-token.js';
4
+ export * from './ai-governance-decision.js';
5
+ export * from './ai-policy-snapshot.js';
6
+ export * from './ai-runtime-contract.js';
7
+ export * from './ai-trace-event.js';
8
+ export * from './ai-transform-event.js';
9
+ export * from './ai-transform-result.js';
10
+ export * from './ai-verification-evidence.js';
1
11
  export * from './api-error-response.js';
2
12
  export * from './artifact-contract.js';
13
+ export * from './data-dependency.js';
14
+ export * from './data-grant.js';
15
+ export * from './data-source.js';
3
16
  export * from './deploy-request.js';
4
17
  export * from './deploy-response.js';
5
18
  export * from './deployment-environment.js';
@@ -14,5 +27,7 @@ export * from './error-envelope.js';
14
27
  export * from './kvs-routing-entry.js';
15
28
  export * from './promotion-request.js';
16
29
  export * from './promotion-response.js';
30
+ export * from './secret-reference.js';
31
+ export * from './transform-report.js';
17
32
  export * from './version-state-machine.js';
18
33
  export * from './version-state.js';
@@ -1,7 +1,20 @@
1
1
  /* eslint-disable */
2
2
  // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
+ export * from './ai-callsite-inventory.js';
4
+ export * from './ai-gateway-key-lookup.js';
5
+ export * from './ai-gateway-key-token.js';
6
+ export * from './ai-governance-decision.js';
7
+ export * from './ai-policy-snapshot.js';
8
+ export * from './ai-runtime-contract.js';
9
+ export * from './ai-trace-event.js';
10
+ export * from './ai-transform-event.js';
11
+ export * from './ai-transform-result.js';
12
+ export * from './ai-verification-evidence.js';
3
13
  export * from './api-error-response.js';
4
14
  export * from './artifact-contract.js';
15
+ export * from './data-dependency.js';
16
+ export * from './data-grant.js';
17
+ export * from './data-source.js';
5
18
  export * from './deploy-request.js';
6
19
  export * from './deploy-response.js';
7
20
  export * from './deployment-environment.js';
@@ -16,5 +29,7 @@ export * from './error-envelope.js';
16
29
  export * from './kvs-routing-entry.js';
17
30
  export * from './promotion-request.js';
18
31
  export * from './promotion-response.js';
32
+ export * from './secret-reference.js';
33
+ export * from './transform-report.js';
19
34
  export * from './version-state-machine.js';
20
35
  export * from './version-state.js';
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Value stored in the CloudFront KeyValueStore and read by the viewer-request router on EVERY request. Keyed by `<org>.<app>` — the tenant-qualified app identity, not a host header; slugs are lowercase DNS-label-shaped and cannot contain dots, so the single dot is an unambiguous separator. Two constraints cannot be expressed in JSON Schema and are enforced in the router: the TOTAL length of all `staticAssetPrefixes` must not exceed 512 bytes, and the array must be empty when `routeMode` is `static`. Written by cutover; a request whose entry fails any of these rules is refused at the edge rather than routed on a guess.
3
+ */
4
+ export interface KvsRoutingEntry {
5
+ /**
6
+ * Immutable prefix of the LIVE version's static output: `builds/<org>/<app>/<64-hex-digest>`, with no trailing slash. The digest is what makes a cutover safe — the router rewrites matching requests to this prefix before the cache lookup, so it is also the edge cache key, and a new version therefore cannot serve the previous version's cached bytes.
7
+ */
8
+ staticPath: string;
9
+ /**
10
+ * Whether the app has an application runtime. REQUIRED: an entry without it is refused with 503 rather than guessed at. In `server` mode a path under a declared `staticAssetPrefixes` entry is served from S3 and everything else goes to `apiDomain`; in `static` mode every path is served from S3.
11
+ */
12
+ routeMode: 'server' | 'static';
13
+ /**
14
+ * The version's monotonic sequence number within its lane. Cutover uses it to keep writes one-way: an entry is only replaced by a strictly higher ordinal, so a delayed or replayed write cannot move an app backwards.
15
+ */
16
+ ordinal: number;
17
+ /**
18
+ * The app runtime's AWS_IAM-protected Lambda Function URL host. Required in `server` mode and omitted entirely for a static-only app. The router refuses any other domain shape, so this cannot be pointed at an arbitrary origin.
19
+ */
20
+ apiDomain?: string;
21
+ /**
22
+ * Build-derived prefixes that a `server` app serves from its immutable S3 output rather than from its runtime, e.g. `_next/static/`. Derived from verified build output, never from framework names. Must be strictly ascending, must total at most 512 bytes, and must be absent or empty in `static` mode — the last two are enforced in the router because JSON Schema cannot express them. Omitted when empty: a server app with public build output and no prefixes serves every asset from its Lambda, which is a build-plan defect rather than a routing one.
23
+ *
24
+ * @maxItems 16
25
+ */
26
+ staticAssetPrefixes?: string[];
27
+ }
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
+ export {};
@@ -0,0 +1,40 @@
1
+ /**
2
+ * JSON body for POST /v1/tenants/{tenant}/apps/{app}/promotions. Repository identity is loaded from stored application and preview records, not supplied by the caller.
3
+ */
4
+ export interface PromotionRequest {
5
+ /**
6
+ * Immutable preview version selected by the caller. The API also verifies that its tenant and app match the route.
7
+ */
8
+ previewVersionId: string;
9
+ /**
10
+ * Current commit at the configured production branch head. Its root Git tree must equal the preview tree.
11
+ */
12
+ commit: string;
13
+ /**
14
+ * Durable caller-generated key. Identical replays return the original production version; reuse with a changed request is rejected.
15
+ */
16
+ idempotencyKey: string;
17
+ environmentBindings?: PromotionRequestEnvironmentBindings;
18
+ }
19
+ /**
20
+ * Optional secret bindings for the production version. Additive: promotions without it remain valid, and a deployment plane that ignores the field behaves exactly as before. Named environmentBindings to match deploy-request.schema.json, whose preview counterpart this mirrors.
21
+ */
22
+ export interface PromotionRequestEnvironmentBindings {
23
+ /**
24
+ * Secret bindings for the production version. An empty array is meaningful: it says the caller looked and the app declares no secrets.
25
+ */
26
+ bindings: PromotionRequestSecretBinding[];
27
+ }
28
+ /**
29
+ * 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.
30
+ */
31
+ export interface PromotionRequestSecretBinding {
32
+ /**
33
+ * Environment-variable name the app reads.
34
+ */
35
+ name: string;
36
+ /**
37
+ * Governance reference the deployment plane resolves. The value never appears in the request, in this schema, or in any record derived from it.
38
+ */
39
+ secretRef: string;
40
+ }
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
+ export {};
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
+ export {};
@@ -0,0 +1,36 @@
1
+ /**
2
+ * app = shared by the whole app; personal = owned by a single builder (ownerBuilderId).
3
+ */
4
+ export type SecretReferenceScope = 'app' | 'personal';
5
+ /**
6
+ * UNSET slots block promotion until a human sets a value (secrets.unresolvable).
7
+ */
8
+ export type SecretReferenceStatus = 'SET' | 'UNSET';
9
+ /**
10
+ * builder = created by a builder; minted = created by the platform (e.g. a data-grant credential).
11
+ */
12
+ export type SecretReferenceOrigin = 'builder' | 'minted';
13
+ /**
14
+ * Secret-Manager MVP: a named secret slot an app depends on. Only the reference and its lifecycle cross this boundary — the secret VALUE never appears in any contract. scope=app secrets are shared by the app; scope=personal secrets belong to one builder (ownerBuilderId). origin records whether a builder created the slot or the platform minted it (e.g. for a data grant).
15
+ */
16
+ export interface SecretReference {
17
+ /**
18
+ * App the secret slot belongs to.
19
+ */
20
+ appId: string;
21
+ /**
22
+ * Slot name as the app references it (typically the environment-variable name).
23
+ */
24
+ name: string;
25
+ scope: SecretReferenceScope;
26
+ /**
27
+ * Owning builder; present only when scope is personal.
28
+ */
29
+ ownerBuilderId?: string;
30
+ /**
31
+ * secretref URI of the stored value. The value itself never crosses this boundary.
32
+ */
33
+ secretRef: string;
34
+ status: SecretReferenceStatus;
35
+ origin: SecretReferenceOrigin;
36
+ }
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
+ export {};
@@ -0,0 +1,102 @@
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.
3
+ */
4
+ export interface TransformReport {
5
+ /**
6
+ * @minItems 1
7
+ */
8
+ applied_playbooks: string[];
9
+ static_rebuild_required: boolean;
10
+ analysis: {
11
+ deployable: boolean;
12
+ needsTransformation: boolean;
13
+ /**
14
+ * @maxItems 64
15
+ */
16
+ blockers: string[];
17
+ /**
18
+ * @minItems 1
19
+ * @maxItems 1024
20
+ */
21
+ surfaces: string[];
22
+ /**
23
+ * @maxItems 1024
24
+ */
25
+ evidence: {
26
+ path: string;
27
+ line: number;
28
+ reason: string;
29
+ }[];
30
+ };
31
+ database: {
32
+ mode: 'none' | 'sql' | 'unsupported';
33
+ changeType: 'none' | 'code_only' | 'schema_only' | 'code_and_schema';
34
+ requiresCodeChanges: boolean;
35
+ requiresSchemaMigration: boolean;
36
+ desiredSchemaPath: string;
37
+ /**
38
+ * @maxItems 128
39
+ */
40
+ migrationPaths: string[];
41
+ /**
42
+ * @maxItems 512
43
+ */
44
+ changedFiles: string[];
45
+ /**
46
+ * @maxItems 128
47
+ */
48
+ evidence: {
49
+ path: string;
50
+ line: number;
51
+ reason: string;
52
+ }[];
53
+ /**
54
+ * @maxItems 64
55
+ */
56
+ unsupportedFeatures: string[];
57
+ };
58
+ application: {
59
+ runtime: string;
60
+ buildKind: 'container' | 'static';
61
+ topology: 'static' | 'backend' | 'frontend_and_backend';
62
+ entrypoint: string;
63
+ build: {
64
+ /**
65
+ * @minItems 1
66
+ * @maxItems 64
67
+ */
68
+ installCommand: string[];
69
+ /**
70
+ * @minItems 1
71
+ * @maxItems 64
72
+ */
73
+ buildCommand: string[];
74
+ /**
75
+ * @minItems 1
76
+ * @maxItems 16
77
+ */
78
+ outputs: {
79
+ path: string;
80
+ kind: 'public' | 'backend';
81
+ route: string;
82
+ }[];
83
+ };
84
+ basePath: {
85
+ required: boolean;
86
+ environmentVariable: 'HARBOUR_BASE_PATH';
87
+ };
88
+ /**
89
+ * @minItems 1
90
+ * @maxItems 64
91
+ */
92
+ evidence: {
93
+ path: string;
94
+ line: number;
95
+ reason: string;
96
+ }[];
97
+ /**
98
+ * @maxItems 64
99
+ */
100
+ unsupportedFeatures: string[];
101
+ };
102
+ }
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
+ export {};
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
+ export {};