@agent-teams/engineering-foundation 0.8.0 → 0.10.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 +5 -0
- package/dist/capabilities/contract-json-schema-releases/adapters/outbound/filesystem/ajv-json-schema-release-inspector.d.ts +5 -0
- package/dist/capabilities/contract-json-schema-releases/adapters/outbound/filesystem/ajv-json-schema-release-inspector.d.ts.map +1 -1
- package/dist/capabilities/contract-json-schema-releases/adapters/outbound/filesystem/ajv-json-schema-release-inspector.js +48 -27
- package/dist/capabilities/contract-json-schema-releases/adapters/outbound/filesystem/ajv-json-schema-release-inspector.js.map +1 -1
- package/dist/capabilities/contract-json-schema-releases/application/ports/json-schema-release-inspector.d.ts +1 -0
- package/dist/capabilities/contract-json-schema-releases/application/ports/json-schema-release-inspector.d.ts.map +1 -1
- package/dist/capabilities/contract-protobuf-evolution/adapters/outbound/qualification/filesystem-buf-breaking-qualification-evidence.js +1 -1
- package/dist/capabilities/contract-protobuf-evolution/application/model/buf-breaking-qualification.d.ts +2 -2
- package/dist/capabilities/contract-protobuf-evolution/application/model/buf-breaking-qualification.js +2 -2
- package/dist/capabilities/contract-protobuf-evolution/application/model/protobuf-release-evidence.d.ts +4 -4
- package/dist/capabilities/contract-protobuf-evolution/application/model/protobuf-release-evidence.d.ts.map +1 -1
- package/dist/capabilities/contract-protobuf-evolution/contract/config.d.ts +1 -1
- package/dist/capabilities/contract-protobuf-evolution/contract/config.js +4 -4
- package/dist/capabilities/contract-protobuf-evolution/contract/config.js.map +1 -1
- package/dist/capabilities/executable-specifications/adapters/outbound/filesystem/filesystem-executable-specification-inspector.d.ts +24 -0
- package/dist/capabilities/executable-specifications/adapters/outbound/filesystem/filesystem-executable-specification-inspector.d.ts.map +1 -0
- package/dist/capabilities/executable-specifications/adapters/outbound/filesystem/filesystem-executable-specification-inspector.js +244 -0
- package/dist/capabilities/executable-specifications/adapters/outbound/filesystem/filesystem-executable-specification-inspector.js.map +1 -0
- package/dist/capabilities/executable-specifications/application/model/executable-specification.d.ts +58 -0
- package/dist/capabilities/executable-specifications/application/model/executable-specification.d.ts.map +1 -0
- package/dist/capabilities/executable-specifications/application/model/executable-specification.js +2 -0
- package/dist/capabilities/executable-specifications/application/model/executable-specification.js.map +1 -0
- package/dist/capabilities/executable-specifications/application/policies/evaluate-executable-specifications.d.ts +6 -0
- package/dist/capabilities/executable-specifications/application/policies/evaluate-executable-specifications.d.ts.map +1 -0
- package/dist/capabilities/executable-specifications/application/policies/evaluate-executable-specifications.js +277 -0
- package/dist/capabilities/executable-specifications/application/policies/evaluate-executable-specifications.js.map +1 -0
- package/dist/capabilities/executable-specifications/application/policies/portable-executable-specification-path.d.ts +10 -0
- package/dist/capabilities/executable-specifications/application/policies/portable-executable-specification-path.d.ts.map +1 -0
- package/dist/capabilities/executable-specifications/application/policies/portable-executable-specification-path.js +76 -0
- package/dist/capabilities/executable-specifications/application/policies/portable-executable-specification-path.js.map +1 -0
- package/dist/capabilities/executable-specifications/application/ports/executable-specification-inspector.d.ts +9 -0
- package/dist/capabilities/executable-specifications/application/ports/executable-specification-inspector.d.ts.map +1 -0
- package/dist/capabilities/executable-specifications/application/ports/executable-specification-inspector.js +2 -0
- package/dist/capabilities/executable-specifications/application/ports/executable-specification-inspector.js.map +1 -0
- package/dist/capabilities/executable-specifications/application/rules.d.ts +22 -0
- package/dist/capabilities/executable-specifications/application/rules.d.ts.map +1 -0
- package/dist/capabilities/executable-specifications/application/rules.js +23 -0
- package/dist/capabilities/executable-specifications/application/rules.js.map +1 -0
- package/dist/capabilities/executable-specifications/application/use-cases/analyze-executable-specifications.d.ts +8 -0
- package/dist/capabilities/executable-specifications/application/use-cases/analyze-executable-specifications.d.ts.map +1 -0
- package/dist/capabilities/executable-specifications/application/use-cases/analyze-executable-specifications.js +36 -0
- package/dist/capabilities/executable-specifications/application/use-cases/analyze-executable-specifications.js.map +1 -0
- package/dist/capabilities/executable-specifications/contract/config.d.ts +5 -0
- package/dist/capabilities/executable-specifications/contract/config.d.ts.map +1 -0
- package/dist/capabilities/executable-specifications/contract/config.js +155 -0
- package/dist/capabilities/executable-specifications/contract/config.js.map +1 -0
- package/dist/capabilities/executable-specifications/module.d.ts +10 -0
- package/dist/capabilities/executable-specifications/module.d.ts.map +1 -0
- package/dist/capabilities/executable-specifications/module.js +52 -0
- package/dist/capabilities/executable-specifications/module.js.map +1 -0
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-extractor.d.ts.map +1 -1
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-extractor.js +1 -14
- package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-extractor.js.map +1 -1
- package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/public-api-baseline-mapper.d.ts +4 -4
- package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/public-api-baseline-mapper.d.ts.map +1 -1
- package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/public-api-baseline-mapper.js +34 -46
- package/dist/capabilities/public-api-compatibility/adapters/outbound/filesystem/public-api-baseline-mapper.js.map +1 -1
- package/dist/capabilities/public-api-compatibility/application/model/public-api.d.ts +18 -75
- package/dist/capabilities/public-api-compatibility/application/model/public-api.d.ts.map +1 -1
- package/dist/capabilities/public-api-compatibility/application/model/public-api.js +7 -29
- package/dist/capabilities/public-api-compatibility/application/model/public-api.js.map +1 -1
- package/dist/capabilities/public-api-compatibility/application/policies/accepted-breaking-change.d.ts +1 -5
- package/dist/capabilities/public-api-compatibility/application/policies/accepted-breaking-change.d.ts.map +1 -1
- package/dist/capabilities/public-api-compatibility/application/policies/accepted-breaking-change.js +1 -8
- package/dist/capabilities/public-api-compatibility/application/policies/accepted-breaking-change.js.map +1 -1
- package/dist/capabilities/public-api-compatibility/application/policies/evaluate-public-api-compatibility.d.ts.map +1 -1
- package/dist/capabilities/public-api-compatibility/application/policies/evaluate-public-api-compatibility.js +5 -38
- package/dist/capabilities/public-api-compatibility/application/policies/evaluate-public-api-compatibility.js.map +1 -1
- package/dist/capabilities/public-api-compatibility/application/policies/validate-package-export-coverage.d.ts +1 -1
- package/dist/capabilities/public-api-compatibility/application/policies/validate-package-export-coverage.js +2 -2
- package/dist/capabilities/public-api-compatibility/application/policies/validate-package-export-coverage.js.map +1 -1
- package/dist/capabilities/public-api-compatibility/application/use-cases/analyze-public-api-compatibility.d.ts.map +1 -1
- package/dist/capabilities/public-api-compatibility/application/use-cases/analyze-public-api-compatibility.js +0 -1
- package/dist/capabilities/public-api-compatibility/application/use-cases/analyze-public-api-compatibility.js.map +1 -1
- package/dist/capabilities/public-api-compatibility/application/use-cases/promote-public-api-baselines.d.ts.map +1 -1
- package/dist/capabilities/public-api-compatibility/application/use-cases/promote-public-api-baselines.js +0 -38
- package/dist/capabilities/public-api-compatibility/application/use-cases/promote-public-api-baselines.js.map +1 -1
- package/dist/capabilities/public-api-compatibility/contract/config.d.ts +1 -1
- package/dist/capabilities/public-api-compatibility/contract/config.d.ts.map +1 -1
- package/dist/capabilities/public-api-compatibility/contract/config.js +32 -106
- package/dist/capabilities/public-api-compatibility/contract/config.js.map +1 -1
- package/dist/capabilities/source-dependencies/application/model/source-workspace.d.ts +2 -0
- package/dist/capabilities/source-dependencies/application/model/source-workspace.d.ts.map +1 -1
- package/dist/capabilities/source-dependencies/application/policies/evaluate-resolved-source-dependency.d.ts +1 -0
- package/dist/capabilities/source-dependencies/application/policies/evaluate-resolved-source-dependency.d.ts.map +1 -1
- package/dist/capabilities/source-dependencies/application/policies/evaluate-resolved-source-dependency.js +47 -3
- package/dist/capabilities/source-dependencies/application/policies/evaluate-resolved-source-dependency.js.map +1 -1
- package/dist/capabilities/source-dependencies/application/policies/evaluate-source-dependencies.d.ts.map +1 -1
- package/dist/capabilities/source-dependencies/application/policies/evaluate-source-dependencies.js +14 -1
- package/dist/capabilities/source-dependencies/application/policies/evaluate-source-dependencies.js.map +1 -1
- package/dist/capabilities/source-dependencies/application/rules.d.ts +2 -0
- package/dist/capabilities/source-dependencies/application/rules.d.ts.map +1 -1
- package/dist/capabilities/source-dependencies/application/rules.js +2 -0
- package/dist/capabilities/source-dependencies/application/rules.js.map +1 -1
- package/dist/capabilities/source-dependencies/contract/config.d.ts.map +1 -1
- package/dist/capabilities/source-dependencies/contract/config.js +5 -0
- package/dist/capabilities/source-dependencies/contract/config.js.map +1 -1
- package/dist/composition/capability-registry.d.ts.map +1 -1
- package/dist/composition/capability-registry.js +2 -0
- package/dist/composition/capability-registry.js.map +1 -1
- package/dist/composition/rule-registry.d.ts.map +1 -1
- package/dist/composition/rule-registry.js +2 -0
- package/dist/composition/rule-registry.js.map +1 -1
- package/dist/foundation-config.d.ts +1 -1
- package/dist/foundation-config.d.ts.map +1 -1
- package/dist/foundation-config.js +2 -0
- package/dist/foundation-config.js.map +1 -1
- package/dist/scaffolding/adapters/node/filesystem-authority-workspace.js +1 -1
- package/dist/scaffolding/adapters/node/filesystem-authority-workspace.js.map +1 -1
- package/dist/scaffolding/adapters/node/filesystem-journal-state.js +1 -1
- package/dist/scaffolding/adapters/node/filesystem-journal.js +3 -3
- package/dist/scaffolding/adapters/node/filesystem-journal.js.map +1 -1
- package/dist/scaffolding/adapters/node/filesystem-operation-state.d.ts +4 -11
- package/dist/scaffolding/adapters/node/filesystem-operation-state.d.ts.map +1 -1
- package/dist/scaffolding/adapters/node/filesystem-operation-state.js +0 -24
- package/dist/scaffolding/adapters/node/filesystem-operation-state.js.map +1 -1
- package/dist/scaffolding/adapters/node/filesystem-path-guard.d.ts +1 -1
- package/dist/scaffolding/adapters/node/filesystem-path-guard.d.ts.map +1 -1
- package/dist/scaffolding/adapters/node/node-authority-input-loader.js +7 -7
- package/dist/scaffolding/adapters/node/node-authority-input-loader.js.map +1 -1
- package/dist/scaffolding/adapters/node/node-authority-receipt-validator.js +1 -1
- package/dist/scaffolding/adapters/node/node-authority-receipt-validator.js.map +1 -1
- package/dist/scaffolding/contract/receipt-authority-types.d.ts +2 -2
- package/dist/scaffolding/contract/scaffold-contract.d.ts +8 -8
- package/dist/scaffolding/contract/types.d.ts +9 -214
- package/dist/scaffolding/contract/types.d.ts.map +1 -1
- package/dist/scaffolding/definitions/registry.d.ts +0 -1
- package/dist/scaffolding/definitions/registry.d.ts.map +1 -1
- package/dist/scaffolding/definitions/registry.js +0 -3
- package/dist/scaffolding/definitions/registry.js.map +1 -1
- package/dist/scaffolding/kernel/authority-compiler.js +2 -2
- package/dist/scaffolding/kernel/authority-receipt.js +3 -3
- package/dist/scaffolding/kernel/plan-validation.js +1 -1
- package/dist/schema-catalog.js +3 -3
- package/dist/schema-catalog.js.map +1 -1
- package/dist/schema-ids.d.ts +2 -5
- package/dist/schema-ids.d.ts.map +1 -1
- package/dist/schema-ids.js +6 -15
- package/dist/schema-ids.js.map +1 -1
- package/dist/strict-json.d.ts +7 -0
- package/dist/strict-json.d.ts.map +1 -0
- package/dist/strict-json.js +41 -0
- package/dist/strict-json.js.map +1 -0
- package/dist/workspace-inventory/adapters/outbound/pnpm/pnpm-workspace-inventory-reader.d.ts +1 -0
- package/dist/workspace-inventory/adapters/outbound/pnpm/pnpm-workspace-inventory-reader.d.ts.map +1 -1
- package/dist/workspace-inventory/adapters/outbound/pnpm/pnpm-workspace-inventory-reader.js +7 -0
- package/dist/workspace-inventory/adapters/outbound/pnpm/pnpm-workspace-inventory-reader.js.map +1 -1
- package/package.json +11 -13
- package/schemas/architecture-source-dependencies/v1.schema.json +1 -0
- package/schemas/contract-protobuf-breaking-qualification/v1.schema.json +5 -1
- package/schemas/contract-protobuf-evolution/v1.schema.json +47 -15
- package/schemas/foundation-config/v1.schema.json +10 -0
- package/schemas/package-public-api-baseline/v1.schema.json +49 -12
- package/schemas/package-public-api-compatibility/v1.schema.json +46 -5
- package/schemas/quality-executable-specification-catalog/v1.schema.json +201 -0
- package/schemas/quality-executable-specifications/v1.schema.json +20 -0
- package/schemas/{scaffold-authority-evidence.schema.json → scaffold-authority-evidence/v1.schema.json} +1 -1
- package/schemas/{scaffold-intent.schema.json → scaffold-intent/v1.schema.json} +1 -1
- package/schemas/{scaffold-plan.schema.json → scaffold-plan/v1.schema.json} +3 -3
- package/schemas/{scaffold-receipt.schema.json → scaffold-receipt/v1.schema.json} +3 -3
- package/schemas/{scaffold-recovery-journal.schema.json → scaffold-recovery-journal/v1.schema.json} +3 -3
- package/schemas/{scaffold-target-catalog.schema.json → scaffold-target-catalog/v1.schema.json} +2 -2
- package/schemas/{scaffolding-config.schema.json → scaffolding-config/v1.schema.json} +2 -2
- package/dist/scaffolding/adapters/memory/memory-workspace.d.ts +0 -9
- package/dist/scaffolding/adapters/memory/memory-workspace.d.ts.map +0 -1
- package/dist/scaffolding/adapters/memory/memory-workspace.js +0 -93
- package/dist/scaffolding/adapters/memory/memory-workspace.js.map +0 -1
- package/dist/scaffolding/adapters/node/filesystem-rendering-journal.d.ts +0 -6
- package/dist/scaffolding/adapters/node/filesystem-rendering-journal.d.ts.map +0 -1
- package/dist/scaffolding/adapters/node/filesystem-rendering-journal.js +0 -80
- package/dist/scaffolding/adapters/node/filesystem-rendering-journal.js.map +0 -1
- package/dist/scaffolding/adapters/node/filesystem-workspace.d.ts +0 -14
- package/dist/scaffolding/adapters/node/filesystem-workspace.d.ts.map +0 -1
- package/dist/scaffolding/adapters/node/filesystem-workspace.js +0 -207
- package/dist/scaffolding/adapters/node/filesystem-workspace.js.map +0 -1
- package/dist/scaffolding/adapters/node/node-input-loader.d.ts +0 -17
- package/dist/scaffolding/adapters/node/node-input-loader.d.ts.map +0 -1
- package/dist/scaffolding/adapters/node/node-input-loader.js +0 -107
- package/dist/scaffolding/adapters/node/node-input-loader.js.map +0 -1
- package/dist/scaffolding/adapters/node/node-receipt-validator.d.ts +0 -4
- package/dist/scaffolding/adapters/node/node-receipt-validator.d.ts.map +0 -1
- package/dist/scaffolding/adapters/node/node-receipt-validator.js +0 -10
- package/dist/scaffolding/adapters/node/node-receipt-validator.js.map +0 -1
- package/dist/scaffolding/adapters/node/node-rendering-plan-authority.d.ts +0 -3
- package/dist/scaffolding/adapters/node/node-rendering-plan-authority.d.ts.map +0 -1
- package/dist/scaffolding/adapters/node/node-rendering-plan-authority.js +0 -18
- package/dist/scaffolding/adapters/node/node-rendering-plan-authority.js.map +0 -1
- package/dist/scaffolding/internal-rendering-regression-api.d.ts +0 -8
- package/dist/scaffolding/internal-rendering-regression-api.d.ts.map +0 -1
- package/dist/scaffolding/internal-rendering-regression-api.js +0 -8
- package/dist/scaffolding/internal-rendering-regression-api.js.map +0 -1
- package/dist/scaffolding/kernel/receipt.d.ts +0 -35
- package/dist/scaffolding/kernel/receipt.d.ts.map +0 -1
- package/dist/scaffolding/kernel/receipt.js +0 -206
- package/dist/scaffolding/kernel/receipt.js.map +0 -1
- package/dist/scaffolding/kernel/rendering-plan-compiler.d.ts +0 -4
- package/dist/scaffolding/kernel/rendering-plan-compiler.d.ts.map +0 -1
- package/dist/scaffolding/kernel/rendering-plan-compiler.js +0 -43
- package/dist/scaffolding/kernel/rendering-plan-compiler.js.map +0 -1
- package/dist/scaffolding/kernel/rendering-plan-validation.d.ts +0 -3
- package/dist/scaffolding/kernel/rendering-plan-validation.d.ts.map +0 -1
- package/dist/scaffolding/kernel/rendering-plan-validation.js +0 -10
- package/dist/scaffolding/kernel/rendering-plan-validation.js.map +0 -1
- package/dist/scaffolding/service.d.ts +0 -8
- package/dist/scaffolding/service.d.ts.map +0 -1
- package/dist/scaffolding/service.js +0 -16
- package/dist/scaffolding/service.js.map +0 -1
- package/schemas/contract-protobuf-breaking-qualification/v2.schema.json +0 -93
- package/schemas/contract-protobuf-evolution/v2.schema.json +0 -147
- package/schemas/package-public-api-baseline/v2.schema.json +0 -62
- package/schemas/package-public-api-compatibility/v2.schema.json +0 -113
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.agent-teams.ai/engineering-foundation/quality-executable-specification-catalog/v1",
|
|
4
|
+
"title": "Executable specification catalog",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "specifications"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": 1 },
|
|
10
|
+
"specifications": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"minItems": 1,
|
|
13
|
+
"maxItems": 64,
|
|
14
|
+
"items": { "$ref": "#/$defs/specification" }
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"$defs": {
|
|
18
|
+
"identifier": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"pattern": "^[a-z][a-z0-9.-]{1,119}$"
|
|
21
|
+
},
|
|
22
|
+
"repositoryPath": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"minLength": 1,
|
|
25
|
+
"maxLength": 300,
|
|
26
|
+
"pattern": "^(?!/)(?!.*\\\\)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*//)[^\\u0000]+$"
|
|
27
|
+
},
|
|
28
|
+
"schemaPath": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"minLength": 1,
|
|
31
|
+
"maxLength": 300,
|
|
32
|
+
"pattern": "^(?!/)(?!.*\\\\)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*//)[^\\u0000]+\\.json$"
|
|
33
|
+
},
|
|
34
|
+
"packageName": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1,
|
|
37
|
+
"maxLength": 214,
|
|
38
|
+
"pattern": "^(?:@[a-z0-9][a-z0-9._-]*/)?[a-z0-9][a-z0-9._-]*$"
|
|
39
|
+
},
|
|
40
|
+
"scriptName": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"minLength": 1,
|
|
43
|
+
"maxLength": 120,
|
|
44
|
+
"pattern": "^[a-zA-Z0-9:_-]+$"
|
|
45
|
+
},
|
|
46
|
+
"gateBinding": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"additionalProperties": false,
|
|
49
|
+
"required": ["packageName", "script"],
|
|
50
|
+
"properties": {
|
|
51
|
+
"packageName": { "$ref": "#/$defs/packageName" },
|
|
52
|
+
"script": { "$ref": "#/$defs/scriptName" }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"document": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"required": ["path", "schemaId"],
|
|
59
|
+
"properties": {
|
|
60
|
+
"path": { "$ref": "#/$defs/schemaPath" },
|
|
61
|
+
"schemaId": { "type": "string", "minLength": 1, "maxLength": 500 }
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"generatedType": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"additionalProperties": false,
|
|
67
|
+
"required": ["schemaId", "outputPath"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"schemaId": { "type": "string", "minLength": 1, "maxLength": 500 },
|
|
70
|
+
"outputPath": { "$ref": "#/$defs/repositoryPath" }
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"stateModelNone": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"additionalProperties": false,
|
|
76
|
+
"required": ["kind"],
|
|
77
|
+
"properties": { "kind": { "const": "none" } }
|
|
78
|
+
},
|
|
79
|
+
"stateModelXstate": {
|
|
80
|
+
"type": "object",
|
|
81
|
+
"additionalProperties": false,
|
|
82
|
+
"required": [
|
|
83
|
+
"kind",
|
|
84
|
+
"axes",
|
|
85
|
+
"modelPath",
|
|
86
|
+
"adapterPath",
|
|
87
|
+
"tracesPath",
|
|
88
|
+
"diagramPath",
|
|
89
|
+
"gateBinding"
|
|
90
|
+
],
|
|
91
|
+
"properties": {
|
|
92
|
+
"kind": { "const": "xstate" },
|
|
93
|
+
"axes": {
|
|
94
|
+
"type": "array",
|
|
95
|
+
"minItems": 2,
|
|
96
|
+
"maxItems": 32,
|
|
97
|
+
"uniqueItems": true,
|
|
98
|
+
"items": { "$ref": "#/$defs/identifier" }
|
|
99
|
+
},
|
|
100
|
+
"modelPath": { "$ref": "#/$defs/repositoryPath" },
|
|
101
|
+
"adapterPath": { "$ref": "#/$defs/repositoryPath" },
|
|
102
|
+
"tracesPath": { "$ref": "#/$defs/repositoryPath" },
|
|
103
|
+
"diagramPath": { "$ref": "#/$defs/repositoryPath" },
|
|
104
|
+
"gateBinding": { "$ref": "#/$defs/gateBinding" }
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"specification": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"additionalProperties": false,
|
|
110
|
+
"required": [
|
|
111
|
+
"id",
|
|
112
|
+
"ownerDocs",
|
|
113
|
+
"adrRefs",
|
|
114
|
+
"schemaPaths",
|
|
115
|
+
"documents",
|
|
116
|
+
"generatedTypes",
|
|
117
|
+
"gateBindings",
|
|
118
|
+
"stateModel"
|
|
119
|
+
],
|
|
120
|
+
"properties": {
|
|
121
|
+
"id": { "$ref": "#/$defs/identifier" },
|
|
122
|
+
"ownerDocs": {
|
|
123
|
+
"type": "array",
|
|
124
|
+
"minItems": 1,
|
|
125
|
+
"maxItems": 32,
|
|
126
|
+
"uniqueItems": true,
|
|
127
|
+
"items": { "$ref": "#/$defs/repositoryPath" }
|
|
128
|
+
},
|
|
129
|
+
"adrRefs": {
|
|
130
|
+
"type": "array",
|
|
131
|
+
"maxItems": 32,
|
|
132
|
+
"uniqueItems": true,
|
|
133
|
+
"items": { "$ref": "#/$defs/repositoryPath" }
|
|
134
|
+
},
|
|
135
|
+
"schemaPaths": {
|
|
136
|
+
"type": "array",
|
|
137
|
+
"minItems": 1,
|
|
138
|
+
"maxItems": 32,
|
|
139
|
+
"uniqueItems": true,
|
|
140
|
+
"items": { "$ref": "#/$defs/schemaPath" }
|
|
141
|
+
},
|
|
142
|
+
"documents": {
|
|
143
|
+
"type": "array",
|
|
144
|
+
"minItems": 1,
|
|
145
|
+
"maxItems": 64,
|
|
146
|
+
"items": { "$ref": "#/$defs/document" }
|
|
147
|
+
},
|
|
148
|
+
"generatedTypes": {
|
|
149
|
+
"type": "array",
|
|
150
|
+
"minItems": 0,
|
|
151
|
+
"maxItems": 64,
|
|
152
|
+
"items": { "$ref": "#/$defs/generatedType" }
|
|
153
|
+
},
|
|
154
|
+
"gateBindings": {
|
|
155
|
+
"type": "object",
|
|
156
|
+
"additionalProperties": false,
|
|
157
|
+
"required": ["property", "mutation"],
|
|
158
|
+
"properties": {
|
|
159
|
+
"typeGeneration": { "$ref": "#/$defs/gateBinding" },
|
|
160
|
+
"property": { "$ref": "#/$defs/gateBinding" },
|
|
161
|
+
"mutation": { "$ref": "#/$defs/gateBinding" }
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"stateModel": {
|
|
165
|
+
"oneOf": [
|
|
166
|
+
{ "$ref": "#/$defs/stateModelNone" },
|
|
167
|
+
{ "$ref": "#/$defs/stateModelXstate" }
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"allOf": [
|
|
172
|
+
{
|
|
173
|
+
"if": {
|
|
174
|
+
"properties": {
|
|
175
|
+
"generatedTypes": { "type": "array", "minItems": 1 }
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"then": {
|
|
179
|
+
"properties": {
|
|
180
|
+
"gateBindings": {
|
|
181
|
+
"type": "object",
|
|
182
|
+
"properties": {
|
|
183
|
+
"typeGeneration": { "$ref": "#/$defs/gateBinding" }
|
|
184
|
+
},
|
|
185
|
+
"required": ["typeGeneration"]
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"else": {
|
|
190
|
+
"properties": {
|
|
191
|
+
"gateBindings": {
|
|
192
|
+
"type": "object",
|
|
193
|
+
"properties": { "typeGeneration": false }
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.agent-teams.ai/engineering-foundation/quality-executable-specifications/v1",
|
|
4
|
+
"title": "Executable specifications capability configuration",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "catalogPath"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": 1 },
|
|
10
|
+
"catalogPath": { "$ref": "#/$defs/repositoryJsonPath" }
|
|
11
|
+
},
|
|
12
|
+
"$defs": {
|
|
13
|
+
"repositoryJsonPath": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1,
|
|
16
|
+
"maxLength": 300,
|
|
17
|
+
"pattern": "^(?!/)(?!.*\\\\)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*//)[^\\u0000]+\\.json$"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://agent-teams.ai/schemas/scaffold-authority-evidence",
|
|
3
|
+
"$id": "https://agent-teams.ai/schemas/scaffold-authority-evidence/v1",
|
|
4
4
|
"title": "Scaffold Authority Evidence",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://agent-teams.ai/schemas/scaffold-plan",
|
|
3
|
+
"$id": "https://agent-teams.ai/schemas/scaffold-plan/v1",
|
|
4
4
|
"title": "Scaffold Plan",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"required": ["schemaVersion", "protocolVersion", "compiler", "projectId", "authority", "authorityEvidence", "intent", "intentDigest", "authoritySnapshotDigest", "composition", "definitions", "resolved", "target", "readSet", "requiredAdapterCapabilities", "operations", "diagnostics", "planDigest"],
|
|
8
8
|
"properties": {
|
|
9
|
-
"schemaVersion": { "const":
|
|
10
|
-
"protocolVersion": { "const":
|
|
9
|
+
"schemaVersion": { "const": 1 },
|
|
10
|
+
"protocolVersion": { "const": 1 },
|
|
11
11
|
"compiler": {
|
|
12
12
|
"type": "object",
|
|
13
13
|
"additionalProperties": false,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://agent-teams.ai/schemas/scaffold-receipt",
|
|
3
|
+
"$id": "https://agent-teams.ai/schemas/scaffold-receipt/v1",
|
|
4
4
|
"title": "Scaffold Receipt",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"required": ["schemaVersion", "protocolVersion", "planDigest", "adapter", "outcome", "commit", "operations", "diagnostics", "receiptDigest"],
|
|
8
8
|
"properties": {
|
|
9
|
-
"schemaVersion": { "const":
|
|
10
|
-
"protocolVersion": { "const":
|
|
9
|
+
"schemaVersion": { "const": 1 },
|
|
10
|
+
"protocolVersion": { "const": 1 },
|
|
11
11
|
"planDigest": { "$ref": "#/$defs/digest" },
|
|
12
12
|
"adapter": { "$ref": "#/$defs/filesystemAdapter" },
|
|
13
13
|
"outcome": { "enum": ["already-applied", "applied", "authority-stale", "failed-recovered", "recovery-required", "rejected"] },
|
package/schemas/{scaffold-recovery-journal.schema.json → scaffold-recovery-journal/v1.schema.json}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://agent-teams.ai/schemas/scaffold-recovery-journal",
|
|
3
|
+
"$id": "https://agent-teams.ai/schemas/scaffold-recovery-journal/v1",
|
|
4
4
|
"title": "Scaffold Recovery Journal",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"required": ["schemaVersion", "state", "plan", "operations"],
|
|
8
8
|
"properties": {
|
|
9
|
-
"schemaVersion": { "const":
|
|
9
|
+
"schemaVersion": { "const": 1 },
|
|
10
10
|
"state": { "const": "PREPARED" },
|
|
11
|
-
"plan": { "$ref": "https://agent-teams.ai/schemas/scaffold-plan" },
|
|
11
|
+
"plan": { "$ref": "https://agent-teams.ai/schemas/scaffold-plan/v1" },
|
|
12
12
|
"operations": {
|
|
13
13
|
"type": "array",
|
|
14
14
|
"minItems": 1,
|
package/schemas/{scaffold-target-catalog.schema.json → scaffold-target-catalog/v1.schema.json}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://agent-teams.ai/schemas/scaffold-target-catalog",
|
|
3
|
+
"$id": "https://agent-teams.ai/schemas/scaffold-target-catalog/v1",
|
|
4
4
|
"title": "Scaffold Target Catalog",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"required": ["version", "packages"],
|
|
8
8
|
"properties": {
|
|
9
|
-
"version": { "const":
|
|
9
|
+
"version": { "const": 1 },
|
|
10
10
|
"packages": {
|
|
11
11
|
"type": "array",
|
|
12
12
|
"maxItems": 4096,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://agent-teams.ai/schemas/scaffolding-config",
|
|
3
|
+
"$id": "https://agent-teams.ai/schemas/scaffolding-config/v1",
|
|
4
4
|
"title": "Scaffolding Configuration",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"required": ["schemaVersion", "projectId", "targetCatalogPath", "compositions"],
|
|
8
8
|
"properties": {
|
|
9
|
-
"schemaVersion": { "const":
|
|
9
|
+
"schemaVersion": { "const": 1 },
|
|
10
10
|
"projectId": { "$ref": "#/$defs/id" },
|
|
11
11
|
"targetCatalogPath": { "$ref": "#/$defs/repositoryPath" },
|
|
12
12
|
"compositions": {
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ScaffoldPlanV1, ScaffoldReceiptV1 } from "../../contract/types.js";
|
|
2
|
-
export declare class MemoryScaffoldWorkspace {
|
|
3
|
-
#private;
|
|
4
|
-
constructor(files?: Readonly<Record<string, string | Uint8Array>>);
|
|
5
|
-
read(path: string): Uint8Array | undefined;
|
|
6
|
-
entries(): Readonly<Record<string, Uint8Array>>;
|
|
7
|
-
apply(plan: ScaffoldPlanV1): Promise<ScaffoldReceiptV1>;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=memory-workspace.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memory-workspace.d.ts","sourceRoot":"","sources":["../../../../src/scaffolding/adapters/memory/memory-workspace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,cAAc,EACd,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AAMjC,qBAAa,uBAAuB;;IAGlC,YAAY,KAAK,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC,CAAM,EASpE;IAED,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAGzC;IAED,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAM9C;IAEK,KAAK,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA0E5D;CACF"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { sha256Bytes } from "../../kernel/canonical-json.js";
|
|
2
|
-
import { assertScaffoldPlanDigest } from "../../kernel/rendering-plan-validation.js";
|
|
3
|
-
import { createScaffoldReceipt } from "../../kernel/receipt.js";
|
|
4
|
-
import { assertSchema } from "../../../schema-catalog.js";
|
|
5
|
-
export class MemoryScaffoldWorkspace {
|
|
6
|
-
#files;
|
|
7
|
-
constructor(files = {}) {
|
|
8
|
-
this.#files = new Map(Object.entries(files).map(([path, content]) => [
|
|
9
|
-
path,
|
|
10
|
-
typeof content === "string"
|
|
11
|
-
? Buffer.from(content, "utf8")
|
|
12
|
-
: Uint8Array.from(content)
|
|
13
|
-
]));
|
|
14
|
-
}
|
|
15
|
-
read(path) {
|
|
16
|
-
const value = this.#files.get(path);
|
|
17
|
-
return value === undefined ? undefined : Uint8Array.from(value);
|
|
18
|
-
}
|
|
19
|
-
entries() {
|
|
20
|
-
return Object.fromEntries([...this.#files.entries()]
|
|
21
|
-
.toSorted(([left], [right]) => (left < right ? -1 : left > right ? 1 : 0))
|
|
22
|
-
.map(([path, content]) => [path, Uint8Array.from(content)]));
|
|
23
|
-
}
|
|
24
|
-
async apply(plan) {
|
|
25
|
-
await assertSchema("scaffold-plan/v1", plan, "scaffold-memory-apply-plan");
|
|
26
|
-
assertScaffoldPlanDigest(plan);
|
|
27
|
-
const diagnostics = [];
|
|
28
|
-
const classifications = plan.operations.map((operation) => {
|
|
29
|
-
const current = this.#files.get(operation.path);
|
|
30
|
-
if (current === undefined) {
|
|
31
|
-
return { operation, state: "absent" };
|
|
32
|
-
}
|
|
33
|
-
if (sha256Bytes(current) === operation.after.digest) {
|
|
34
|
-
return { operation, state: "after" };
|
|
35
|
-
}
|
|
36
|
-
diagnostics.push({
|
|
37
|
-
ruleId: "scaffolding.apply.precondition-conflict",
|
|
38
|
-
severity: "error",
|
|
39
|
-
phase: "apply",
|
|
40
|
-
subject: operation.path,
|
|
41
|
-
message: "Workspace content matches neither the Plan precondition nor its desired result.",
|
|
42
|
-
remediation: "Create a new Intent and Plan from the current workspace state."
|
|
43
|
-
});
|
|
44
|
-
return { operation, state: "conflict" };
|
|
45
|
-
});
|
|
46
|
-
if (classifications.some(({ state }) => state === "conflict")) {
|
|
47
|
-
return createScaffoldReceipt({
|
|
48
|
-
plan,
|
|
49
|
-
adapterId: "foundation.memory/v1",
|
|
50
|
-
outcome: "rejected",
|
|
51
|
-
commitState: "rejected",
|
|
52
|
-
atomicity: "memory-atomic",
|
|
53
|
-
operations: classifications.map(({ operation, state }) => ({
|
|
54
|
-
operationId: operation.id,
|
|
55
|
-
path: operation.path,
|
|
56
|
-
outcome: state === "conflict"
|
|
57
|
-
? "conflict"
|
|
58
|
-
: state === "after"
|
|
59
|
-
? "already-satisfied"
|
|
60
|
-
: "not-applied",
|
|
61
|
-
...(state === "after" ? { resultDigest: operation.after.digest } : {})
|
|
62
|
-
})),
|
|
63
|
-
diagnostics
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
const next = new Map(this.#files);
|
|
67
|
-
const receipts = classifications.map(({ operation, state }) => {
|
|
68
|
-
if (state === "absent") {
|
|
69
|
-
next.set(operation.path, Buffer.from(operation.after.contentBase64, "base64"));
|
|
70
|
-
}
|
|
71
|
-
return {
|
|
72
|
-
operationId: operation.id,
|
|
73
|
-
path: operation.path,
|
|
74
|
-
outcome: state === "absent" ? "applied" : "already-satisfied",
|
|
75
|
-
resultDigest: operation.after.digest
|
|
76
|
-
};
|
|
77
|
-
});
|
|
78
|
-
this.#files.clear();
|
|
79
|
-
for (const [path, content] of next) {
|
|
80
|
-
this.#files.set(path, content);
|
|
81
|
-
}
|
|
82
|
-
const changed = classifications.some(({ state }) => state === "absent");
|
|
83
|
-
return createScaffoldReceipt({
|
|
84
|
-
plan,
|
|
85
|
-
adapterId: "foundation.memory/v1",
|
|
86
|
-
outcome: changed ? "applied" : "already-applied",
|
|
87
|
-
commitState: "committed",
|
|
88
|
-
atomicity: "memory-atomic",
|
|
89
|
-
operations: receipts
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
//# sourceMappingURL=memory-workspace.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memory-workspace.js","sourceRoot":"","sources":["../../../../src/scaffolding/adapters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S,CAAC,KAAK,CAAC,MAAM;aACrC,CAAC;QACJ,CAAC,CACF,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACpB,KAAK,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;YACnC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACjC,CAAC;QACD,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC;QACxE,OAAO,qBAAqB,CAAC;YAC3B,IAAI;YACJ,SAAS,EAAE,sBAAsB;YACjC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB;YAChD,WAAW,EAAE,WAAW;YACxB,SAAS,EAAE,eAAe;YAC1B,UAAU,EAAE,QAAQ;SACrB,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ScaffoldPlanV1 } from "../../contract/types.js";
|
|
2
|
-
export declare const SCAFFOLD_JOURNAL_FILE = "scaffolding-transaction.json";
|
|
3
|
-
export declare function writeScaffoldJournal(path: string, plan: ScaffoldPlanV1): Promise<void>;
|
|
4
|
-
export declare function readScaffoldJournal(path: string): Promise<ScaffoldPlanV1 | undefined>;
|
|
5
|
-
export declare function removeScaffoldJournal(path: string, faultInjector?: () => Promise<void> | void): Promise<void>;
|
|
6
|
-
//# sourceMappingURL=filesystem-rendering-journal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filesystem-rendering-journal.d.ts","sourceRoot":"","sources":["../../../../src/scaffolding/adapters/node/filesystem-rendering-journal.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAS9D,eAAO,MAAM,qBAAqB,iCAAiC,CAAC;AAUpE,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,IAAI,CAAC,CAuBf;AAED,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,CAiDrC;AAED,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,MAAM,EACZ,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,GACzC,OAAO,CAAC,IAAI,CAAC,CAIf"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { mkdir, open, rename, rm } from "node:fs/promises";
|
|
2
|
-
import { dirname } from "node:path";
|
|
3
|
-
import { assertScaffoldPlanDigest } from "../../kernel/rendering-plan-validation.js";
|
|
4
|
-
import { ScaffoldError } from "../../scaffold-error.js";
|
|
5
|
-
import { assertSchema } from "../../../schema-catalog.js";
|
|
6
|
-
import { parseStrictYamlSource } from "../../../strict-yaml.js";
|
|
7
|
-
import { readBoundedRegularFile } from "./filesystem-file-identity.js";
|
|
8
|
-
import { syncDirectory } from "./filesystem-path-guard.js";
|
|
9
|
-
import { MAX_SCAFFOLD_PLAN_BYTES } from "./node-scaffold-limits.js";
|
|
10
|
-
export const SCAFFOLD_JOURNAL_FILE = "scaffolding-transaction.json";
|
|
11
|
-
function isMissing(error) {
|
|
12
|
-
return (error instanceof Error &&
|
|
13
|
-
"code" in error &&
|
|
14
|
-
error.code === "ENOENT");
|
|
15
|
-
}
|
|
16
|
-
export async function writeScaffoldJournal(path, plan) {
|
|
17
|
-
const parent = dirname(path);
|
|
18
|
-
await mkdir(parent, { recursive: true });
|
|
19
|
-
const temporary = `${path}.tmp`;
|
|
20
|
-
await rm(temporary, { force: true });
|
|
21
|
-
let renamed = false;
|
|
22
|
-
try {
|
|
23
|
-
const handle = await open(temporary, "wx", 0o600);
|
|
24
|
-
try {
|
|
25
|
-
const journal = { schemaVersion: 1, state: "PREPARED", plan };
|
|
26
|
-
await handle.writeFile(`${JSON.stringify(journal, null, 2)}\n`, "utf8");
|
|
27
|
-
await handle.sync();
|
|
28
|
-
}
|
|
29
|
-
finally {
|
|
30
|
-
await handle.close();
|
|
31
|
-
}
|
|
32
|
-
await rename(temporary, path);
|
|
33
|
-
renamed = true;
|
|
34
|
-
await syncDirectory(parent);
|
|
35
|
-
}
|
|
36
|
-
finally {
|
|
37
|
-
if (!renamed) {
|
|
38
|
-
await rm(temporary, { force: true });
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
export async function readScaffoldJournal(path) {
|
|
43
|
-
try {
|
|
44
|
-
const result = await readBoundedRegularFile(path, MAX_SCAFFOLD_PLAN_BYTES);
|
|
45
|
-
if (result.outcome === "invalid") {
|
|
46
|
-
throw new ScaffoldError("SCAFFOLD_RECOVERY_REQUIRED", "Scaffolding recovery journal is not a bounded regular file.");
|
|
47
|
-
}
|
|
48
|
-
if (result.outcome === "changed") {
|
|
49
|
-
throw new ScaffoldError("SCAFFOLD_RECOVERY_REQUIRED", "Scaffolding recovery journal changed while it was being read.");
|
|
50
|
-
}
|
|
51
|
-
const value = parseStrictYamlSource(result.bytes.toString("utf8"), "rendering-regression-journal");
|
|
52
|
-
if (typeof value !== "object" ||
|
|
53
|
-
value === null ||
|
|
54
|
-
Array.isArray(value) ||
|
|
55
|
-
Object.keys(value).length !== 3 ||
|
|
56
|
-
!("schemaVersion" in value) ||
|
|
57
|
-
value.schemaVersion !== 1 ||
|
|
58
|
-
!("state" in value) ||
|
|
59
|
-
value.state !== "PREPARED" ||
|
|
60
|
-
!("plan" in value)) {
|
|
61
|
-
throw new ScaffoldError("SCAFFOLD_RECOVERY_REQUIRED", "The 0.5 regression adapter cannot recover this scaffolding journal.");
|
|
62
|
-
}
|
|
63
|
-
await assertSchema("scaffold-plan/v1", value.plan, "rendering-regression-journal");
|
|
64
|
-
const plan = value.plan;
|
|
65
|
-
assertScaffoldPlanDigest(plan);
|
|
66
|
-
return plan;
|
|
67
|
-
}
|
|
68
|
-
catch (error) {
|
|
69
|
-
if (isMissing(error)) {
|
|
70
|
-
return undefined;
|
|
71
|
-
}
|
|
72
|
-
throw error;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
export async function removeScaffoldJournal(path, faultInjector) {
|
|
76
|
-
await rm(path, { force: true });
|
|
77
|
-
await faultInjector?.();
|
|
78
|
-
await syncDirectory(dirname(path));
|
|
79
|
-
}
|
|
80
|
-
//# sourceMappingURL=filesystem-rendering-journal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filesystem-rendering-journal.js","sourceRoot":"","sources":["../../../../src/scaffolding/adapters/node/filesystem-rendering-journal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,CAAC,MAAM,qBAAqB,GAAG,8BAA8B,CAAC;AAEpE,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,CACL,KAAK,YAAY,KAAK;QACtB,MAAM,IAAI,KAAK;QACd,KAA+B,CAAC,IAAI,KAAK,QAAQ,CACnD,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBA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U,qBAAqB,CACzC,IAAY,EACZ,aAA0C;IAE1C,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAChC,MAAM,aAAa,EAAE,EAAE,CAAC;IACxB,MAAM,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ScaffoldPlanV1, ScaffoldReceiptV1 } from "../../contract/types.js";
|
|
2
|
-
/** Retains the released 0.5 recovery contract for regression evidence only. */
|
|
3
|
-
export declare function recoverFilesystemScaffold(consumerRoot: string): Promise<ScaffoldReceiptV1 | undefined>;
|
|
4
|
-
export declare function applyFilesystemScaffold(consumerRoot: string, plan: ScaffoldPlanV1): Promise<ScaffoldReceiptV1>;
|
|
5
|
-
interface ScaffoldFilesystemFaultPoint {
|
|
6
|
-
readonly phase: "after-journal-prepared" | "after-hard-link" | "after-operation-published" | "after-temporary-synced" | "after-temporary-written" | "before-journal-removed";
|
|
7
|
-
readonly operationIndex?: number;
|
|
8
|
-
readonly operationPath?: string;
|
|
9
|
-
}
|
|
10
|
-
type ScaffoldFilesystemFaultInjector = (point: ScaffoldFilesystemFaultPoint) => Promise<void> | void;
|
|
11
|
-
/** Internal conformance seam. It is intentionally absent from package exports. */
|
|
12
|
-
export declare function applyFilesystemScaffoldWithFaultInjection(consumerRoot: string, plan: ScaffoldPlanV1, faultInjector?: ScaffoldFilesystemFaultInjector): Promise<ScaffoldReceiptV1>;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=filesystem-workspace.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filesystem-workspace.d.ts","sourceRoot":"","sources":["../../../../src/scaffolding/adapters/node/filesystem-workspace.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAIV,cAAc,EACd,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AAoLjC,+EAA+E;AAC/E,wBAAsB,yBAAyB,CAC7C,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAExC;AAED,wBAAsB,uBAAuB,CAC3C,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,iBAAiB,CAAC,CAE5B;AAGD,UAAU,4BAA4B;IACpC,QAAQ,CAAC,KAAK,EACV,wBAAwB,GACxB,iBAAiB,GACjB,2BAA2B,GAC3B,wBAAwB,GACxB,yBAAyB,GACzB,wBAAwB,CAAC;IAC7B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,KAAK,+BAA+B,GAAG,CACrC,KAAK,EAAE,4BAA4B,KAChC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAE1B,kFAAkF;AAClF,wBAAsB,yCAAyC,CAC7D,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,cAAc,EACpB,aAAa,CAAC,EAAE,+BAA+B,GAC9C,OAAO,CAAC,iBAAiB,CAAC,CAiG5B"}
|