@devtrack-solution/codesdd 1.2.3 → 1.2.4
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/.sdd/skills/curated/devtrack-api/SKILL.md +98 -12
- package/.sdd/skills/curated/devtrack-api/agents/claude-code.yaml +10 -0
- package/.sdd/skills/curated/devtrack-api/agents/codex.yaml +10 -0
- package/.sdd/skills/curated/devtrack-api/agents/cursor.yaml +10 -0
- package/.sdd/skills/curated/devtrack-api/agents/gemini.yaml +10 -0
- package/.sdd/skills/curated/devtrack-api/agents/kimi.yaml +10 -0
- package/.sdd/skills/curated/devtrack-api/agents/openai.yaml +5 -3
- package/.sdd/skills/curated/devtrack-api/agents/opencode.yaml +12 -0
- package/.sdd/skills/curated/devtrack-api/references/application-presentation.md +61 -5
- package/.sdd/skills/curated/devtrack-api/references/consumer-sync-policy.md +15 -3
- package/.sdd/skills/curated/devtrack-api/references/contract-pack.yaml +1951 -0
- package/.sdd/skills/curated/devtrack-api/references/domain-modeling.md +16 -14
- package/.sdd/skills/curated/devtrack-api/references/field-validation-protocol.md +40 -0
- package/.sdd/skills/curated/devtrack-api/references/foundation-layout.md +19 -2
- package/.sdd/skills/curated/devtrack-api/references/generated-artifact-invalidation.md +97 -0
- package/.sdd/skills/curated/devtrack-api/references/implementation-checklist.md +30 -1
- package/.sdd/skills/curated/devtrack-api/references/portable-agent-contract.md +42 -0
- package/.sdd/skills/curated/devtrack-api/references/testing-validation.md +22 -1
- package/.sdd/skills/curated/devtrack-api/references/typeorm-infrastructure.md +9 -7
- package/README.md +280 -29
- package/dist/applications/sdd/index.d.ts +16 -0
- package/dist/applications/sdd/index.js +16 -0
- package/dist/cli/program.js +180 -11
- package/dist/commands/config.js +197 -10
- package/dist/commands/sdd/execution.js +408 -16
- package/dist/commands/sdd/plugin.js +5 -0
- package/dist/commands/sdd/shared.d.ts +1 -0
- package/dist/commands/sdd/shared.js +10 -0
- package/dist/commands/sdd.js +157 -7
- package/dist/core/cli/command-matrix.d.ts +18 -0
- package/dist/core/cli/command-matrix.js +157 -0
- package/dist/core/cli-command-quality.js +11 -0
- package/dist/core/completions/command-registry.js +45 -0
- package/dist/core/config-schema.d.ts +31 -1
- package/dist/core/config-schema.js +79 -5
- package/dist/core/config.d.ts +1 -0
- package/dist/core/config.js +11 -0
- package/dist/core/global-config.d.ts +29 -0
- package/dist/core/init.d.ts +2 -2
- package/dist/core/init.js +13 -14
- package/dist/core/sdd/agent-binding.d.ts +19 -19
- package/dist/core/sdd/agent-runtime-contract.d.ts +204 -0
- package/dist/core/sdd/agent-runtime-contract.js +200 -0
- package/dist/core/sdd/allocator-recovery.d.ts +14 -0
- package/dist/core/sdd/allocator-recovery.js +30 -0
- package/dist/core/sdd/allocator-security.d.ts +18 -0
- package/dist/core/sdd/allocator-security.js +36 -0
- package/dist/core/sdd/api-foundation-baseline.d.ts +111 -0
- package/dist/core/sdd/api-foundation-baseline.js +151 -0
- package/dist/core/sdd/api-foundation-parity.d.ts +114 -0
- package/dist/core/sdd/api-foundation-parity.js +131 -0
- package/dist/core/sdd/api-profile-catalog.d.ts +36 -0
- package/dist/core/sdd/api-profile-catalog.js +132 -0
- package/dist/core/sdd/api-profile-dry-run-projection.d.ts +93 -0
- package/dist/core/sdd/api-profile-dry-run-projection.js +370 -0
- package/dist/core/sdd/api-profile-recipes.d.ts +82 -0
- package/dist/core/sdd/api-profile-recipes.js +484 -0
- package/dist/core/sdd/artifact-id-allocator.d.ts +368 -0
- package/dist/core/sdd/artifact-id-allocator.js +510 -0
- package/dist/core/sdd/check.d.ts +52 -1
- package/dist/core/sdd/check.js +326 -11
- package/dist/core/sdd/coordination/coordination-adapters.d.ts +15 -8
- package/dist/core/sdd/coordination/coordination-adapters.js +43 -15
- package/dist/core/sdd/coordination/index.d.ts +1 -0
- package/dist/core/sdd/coordination/index.js +1 -0
- package/dist/core/sdd/coordination/redis-runtime.d.ts +131 -0
- package/dist/core/sdd/coordination/redis-runtime.js +698 -0
- package/dist/core/sdd/deepagent-contracts.d.ts +99 -5
- package/dist/core/sdd/deepagent-contracts.js +62 -0
- package/dist/core/sdd/deepagents/reversa-subagents.d.ts +3 -3
- package/dist/core/sdd/default-bootstrap-files.d.ts +2 -2
- package/dist/core/sdd/default-bootstrap-files.js +14 -10
- package/dist/core/sdd/default-skills.js +115 -9
- package/dist/core/sdd/devtrack-api-appliance.d.ts +42 -1
- package/dist/core/sdd/devtrack-api-appliance.js +159 -32
- package/dist/core/sdd/devtrack-api-architecture.d.ts +16 -0
- package/dist/core/sdd/devtrack-api-architecture.js +86 -0
- package/dist/core/sdd/docs-sync.js +24 -18
- package/dist/core/sdd/domain/capability-diff.d.ts +63 -0
- package/dist/core/sdd/domain/capability-diff.js +200 -0
- package/dist/core/sdd/domain/change-safety-guardrails.d.ts +74 -0
- package/dist/core/sdd/domain/change-safety-guardrails.js +333 -0
- package/dist/core/sdd/domain/semantic-intent-classifier.d.ts +29 -0
- package/dist/core/sdd/domain/semantic-intent-classifier.js +117 -0
- package/dist/core/sdd/enterprise-mutating-command-gate.d.ts +27 -0
- package/dist/core/sdd/enterprise-mutating-command-gate.js +104 -0
- package/dist/core/sdd/enterprise-provenance-gates.d.ts +20 -0
- package/dist/core/sdd/enterprise-provenance-gates.js +63 -0
- package/dist/core/sdd/enterprise-provisioning-policy.d.ts +26 -0
- package/dist/core/sdd/enterprise-provisioning-policy.js +104 -0
- package/dist/core/sdd/foundation-artifact-map-validator.d.ts +16 -0
- package/dist/core/sdd/foundation-artifact-map-validator.js +71 -0
- package/dist/core/sdd/foundation-layer-manifest.d.ts +24 -0
- package/dist/core/sdd/foundation-layer-manifest.js +117 -0
- package/dist/core/sdd/governance-schemas.d.ts +2 -2
- package/dist/core/sdd/governance-schemas.js +11 -2
- package/dist/core/sdd/intent-guard.d.ts +22 -0
- package/dist/core/sdd/intent-guard.js +67 -0
- package/dist/core/sdd/json-schema.js +13 -1
- package/dist/core/sdd/legacy-operations.js +169 -5
- package/dist/core/sdd/migrate-workspace.js +39 -0
- package/dist/core/sdd/package-security-gates.d.ts +21 -0
- package/dist/core/sdd/package-security-gates.js +121 -0
- package/dist/core/sdd/package-structure-gate.d.ts +85 -3
- package/dist/core/sdd/package-structure-gate.js +384 -11
- package/dist/core/sdd/parallel-feat-automation.d.ts +185 -7
- package/dist/core/sdd/parallel-feat-automation.js +212 -0
- package/dist/core/sdd/plugin-broker.d.ts +223 -4
- package/dist/core/sdd/plugin-broker.js +10 -0
- package/dist/core/sdd/plugin-cli.d.ts +30 -0
- package/dist/core/sdd/plugin-cli.js +70 -3
- package/dist/core/sdd/plugin-evidence.d.ts +73 -0
- package/dist/core/sdd/plugin-manifest.d.ts +69 -1
- package/dist/core/sdd/plugin-manifest.js +10 -0
- package/dist/core/sdd/plugin-policy-pack.d.ts +1 -1
- package/dist/core/sdd/plugin-policy.js +6 -1
- package/dist/core/sdd/plugin-registry.d.ts +138 -2
- package/dist/core/sdd/plugin-sdk-contract.d.ts +363 -0
- package/dist/core/sdd/plugin-sdk-contract.js +268 -0
- package/dist/core/sdd/plugin-skill-binding.d.ts +1 -1
- package/dist/core/sdd/quality-validation.d.ts +89 -16
- package/dist/core/sdd/release-readiness.d.ts +68 -0
- package/dist/core/sdd/release-readiness.js +767 -0
- package/dist/core/sdd/reversa-architecture-extractor.d.ts +13 -0
- package/dist/core/sdd/reversa-architecture-extractor.js +89 -0
- package/dist/core/sdd/reversa-artifact-writer.d.ts +18 -0
- package/dist/core/sdd/reversa-artifact-writer.js +40 -0
- package/dist/core/sdd/reversa-command-policy.d.ts +136 -0
- package/dist/core/sdd/reversa-command-policy.js +361 -0
- package/dist/core/sdd/reversa-data-extractor.d.ts +11 -0
- package/dist/core/sdd/reversa-data-extractor.js +73 -0
- package/dist/core/sdd/reversa-equivalence.d.ts +20 -0
- package/dist/core/sdd/reversa-equivalence.js +34 -0
- package/dist/core/sdd/reversa-evidence.d.ts +298 -0
- package/dist/core/sdd/reversa-evidence.js +118 -0
- package/dist/core/sdd/reversa-reconstruction.d.ts +29 -0
- package/dist/core/sdd/reversa-reconstruction.js +32 -0
- package/dist/core/sdd/reversa-rules-extractor.d.ts +12 -0
- package/dist/core/sdd/reversa-rules-extractor.js +86 -0
- package/dist/core/sdd/reversa-source-safety.d.ts +19 -0
- package/dist/core/sdd/reversa-source-safety.js +105 -0
- package/dist/core/sdd/reversa-surface-scout.d.ts +13 -0
- package/dist/core/sdd/reversa-surface-scout.js +85 -0
- package/dist/core/sdd/reversa-ux-mapper.d.ts +11 -0
- package/dist/core/sdd/reversa-ux-mapper.js +73 -0
- package/dist/core/sdd/runtime-boundary-contract.d.ts +45 -0
- package/dist/core/sdd/runtime-boundary-contract.js +90 -0
- package/dist/core/sdd/sdk-agent-plugin-quality-gates.d.ts +150 -0
- package/dist/core/sdd/sdk-agent-plugin-quality-gates.js +258 -0
- package/dist/core/sdd/services/agent-run.service.d.ts +38 -6
- package/dist/core/sdd/services/agent-run.service.js +73 -1
- package/dist/core/sdd/services/archive-quality-coherence.service.d.ts +17 -0
- package/dist/core/sdd/services/archive-quality-coherence.service.js +141 -0
- package/dist/core/sdd/services/capability-diff.service.d.ts +18 -0
- package/dist/core/sdd/services/capability-diff.service.js +26 -0
- package/dist/core/sdd/services/change-safety-preflight.service.d.ts +17 -0
- package/dist/core/sdd/services/change-safety-preflight.service.js +17 -0
- package/dist/core/sdd/services/context.service.d.ts +43 -340
- package/dist/core/sdd/services/context.service.js +323 -9
- package/dist/core/sdd/services/decide.service.js +1 -1
- package/dist/core/sdd/services/finalize.service.d.ts +27 -0
- package/dist/core/sdd/services/finalize.service.js +226 -18
- package/dist/core/sdd/services/frontend-impact.service.d.ts +1 -1
- package/dist/core/sdd/services/historical-quality-regression.service.d.ts +35 -0
- package/dist/core/sdd/services/historical-quality-regression.service.js +228 -0
- package/dist/core/sdd/services/ingest-deposito.service.js +1 -1
- package/dist/core/sdd/services/planning-execution-coherence.service.d.ts +45 -0
- package/dist/core/sdd/services/planning-execution-coherence.service.js +225 -0
- package/dist/core/sdd/services/semantic-intent-classifier.service.d.ts +6 -0
- package/dist/core/sdd/services/semantic-intent-classifier.service.js +7 -0
- package/dist/core/sdd/state.d.ts +1 -0
- package/dist/core/sdd/state.js +266 -34
- package/dist/core/sdd/store/sdd-stores.js +2 -2
- package/dist/core/sdd/structural-health.d.ts +13 -13
- package/dist/core/sdd/types.d.ts +30 -15
- package/dist/core/sdd/types.js +4 -0
- package/dist/core/sdd/views.js +17 -0
- package/dist/core/sdd/workspace-schemas.d.ts +428 -7
- package/dist/core/sdd/workspace-schemas.js +223 -70
- package/dist/core/shared/skill-generation.d.ts +2 -0
- package/dist/core/shared/skill-generation.js +19 -2
- package/dist/core/shared/tool-detection.d.ts +19 -0
- package/dist/core/shared/tool-detection.js +89 -0
- package/dist/domains/sdd/index.d.ts +6 -0
- package/dist/domains/sdd/index.js +6 -0
- package/dist/infrastructures/sdd/index.d.ts +7 -0
- package/dist/infrastructures/sdd/index.js +6 -0
- package/dist/presentations/cli/sdd/index.d.ts +3 -0
- package/dist/presentations/cli/sdd/index.js +3 -0
- package/dist/shared/sdd/index.d.ts +3 -0
- package/dist/shared/sdd/index.js +2 -0
- package/package.json +14 -10
- package/schemas/sdd/2-plan.schema.json +207 -2
- package/schemas/sdd/5-quality.schema.json +324 -25
- package/schemas/sdd/agent-runtime-command-plan.schema.json +212 -0
- package/schemas/sdd/agent-runtime-opencode-run-evidence.schema.json +270 -0
- package/schemas/sdd/codesdd-plugin.schema.json +171 -0
- package/schemas/sdd/deepagent-run-request.schema.json +316 -0
- package/schemas/sdd/parallel-feat-automation-plan.schema.json +89 -0
- package/schemas/sdd/parallel-feat-scheduler-request.schema.json +116 -0
- package/schemas/sdd/parallel-feat-scheduler-result.schema.json +404 -0
- package/schemas/sdd/plugin-artifact-manifest.schema.json +109 -0
- package/schemas/sdd/plugin-artifact-map.schema.json +223 -0
- package/schemas/sdd/plugin-evidence-manifest.schema.json +109 -0
- package/schemas/sdd/plugin-language-runtime.schema.json +103 -0
- package/schemas/sdd/plugin-package-governance.schema.json +74 -0
- package/schemas/sdd/plugin-registry.schema.json +171 -0
- package/schemas/sdd/plugin-runtime-invocation-plan.schema.json +109 -0
- package/schemas/sdd/quality-evidence-bundle.schema.json +109 -0
- package/schemas/sdd/reversa-evidence-bundle.schema.json +466 -0
- package/schemas/sdd/sdk-agent-plugin-quality-gate-input.schema.json +168 -0
- package/schemas/sdd/sdk-agent-plugin-quality-gate-report.schema.json +160 -0
- package/schemas/sdd/workspace-catalog.schema.json +5298 -1409
|
@@ -31,8 +31,8 @@ export declare const pluginInvocationEnvelopeSchema: z.ZodObject<{
|
|
|
31
31
|
env_allowlist: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
32
32
|
network: z.ZodEnum<{
|
|
33
33
|
disabled: "disabled";
|
|
34
|
-
restricted: "restricted";
|
|
35
34
|
enabled: "enabled";
|
|
35
|
+
restricted: "restricted";
|
|
36
36
|
}>;
|
|
37
37
|
process_spawn: z.ZodEnum<{
|
|
38
38
|
forbidden: "forbidden";
|
|
@@ -56,6 +56,79 @@ export declare const pluginArtifactManifestEntrySchema: z.ZodObject<{
|
|
|
56
56
|
checksum_before: z.ZodOptional<z.ZodString>;
|
|
57
57
|
checksum_after: z.ZodOptional<z.ZodString>;
|
|
58
58
|
content_type: z.ZodOptional<z.ZodString>;
|
|
59
|
+
artifact_kind: z.ZodOptional<z.ZodEnum<{
|
|
60
|
+
documentation: "documentation";
|
|
61
|
+
schema: "schema";
|
|
62
|
+
configuration: "configuration";
|
|
63
|
+
source: "source";
|
|
64
|
+
migration: "migration";
|
|
65
|
+
evidence: "evidence";
|
|
66
|
+
test: "test";
|
|
67
|
+
asset: "asset";
|
|
68
|
+
"package-metadata": "package-metadata";
|
|
69
|
+
}>>;
|
|
70
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
71
|
+
documentation: "documentation";
|
|
72
|
+
type: "type";
|
|
73
|
+
validator: "validator";
|
|
74
|
+
evidence: "evidence";
|
|
75
|
+
test: "test";
|
|
76
|
+
interface: "interface";
|
|
77
|
+
implementation: "implementation";
|
|
78
|
+
abstraction: "abstraction";
|
|
79
|
+
"business-object": "business-object";
|
|
80
|
+
"value-object": "value-object";
|
|
81
|
+
entity: "entity";
|
|
82
|
+
"repository-port": "repository-port";
|
|
83
|
+
"use-case": "use-case";
|
|
84
|
+
service: "service";
|
|
85
|
+
handler: "handler";
|
|
86
|
+
adapter: "adapter";
|
|
87
|
+
mapper: "mapper";
|
|
88
|
+
module: "module";
|
|
89
|
+
controller: "controller";
|
|
90
|
+
dto: "dto";
|
|
91
|
+
policy: "policy";
|
|
92
|
+
manifest: "manifest";
|
|
93
|
+
fixture: "fixture";
|
|
94
|
+
}>>;
|
|
95
|
+
layer: z.ZodOptional<z.ZodEnum<{
|
|
96
|
+
sdd: "sdd";
|
|
97
|
+
config: "config";
|
|
98
|
+
domain: "domain";
|
|
99
|
+
docs: "docs";
|
|
100
|
+
root: "root";
|
|
101
|
+
application: "application";
|
|
102
|
+
infrastructure: "infrastructure";
|
|
103
|
+
presentation: "presentation";
|
|
104
|
+
shared: "shared";
|
|
105
|
+
tests: "tests";
|
|
106
|
+
assets: "assets";
|
|
107
|
+
}>>;
|
|
108
|
+
language: z.ZodOptional<z.ZodEnum<{
|
|
109
|
+
shell: "shell";
|
|
110
|
+
other: "other";
|
|
111
|
+
typescript: "typescript";
|
|
112
|
+
javascript: "javascript";
|
|
113
|
+
python: "python";
|
|
114
|
+
java: "java";
|
|
115
|
+
go: "go";
|
|
116
|
+
rust: "rust";
|
|
117
|
+
csharp: "csharp";
|
|
118
|
+
php: "php";
|
|
119
|
+
ruby: "ruby";
|
|
120
|
+
}>>;
|
|
121
|
+
context: z.ZodOptional<z.ZodString>;
|
|
122
|
+
implementation: z.ZodOptional<z.ZodEnum<{
|
|
123
|
+
contract: "contract";
|
|
124
|
+
manual: "manual";
|
|
125
|
+
concrete: "concrete";
|
|
126
|
+
abstract: "abstract";
|
|
127
|
+
generated: "generated";
|
|
128
|
+
}>>;
|
|
129
|
+
decision_refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
130
|
+
source_refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
131
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
59
132
|
}, z.core.$strip>;
|
|
60
133
|
export declare const pluginArtifactManifestSchema: z.ZodObject<{
|
|
61
134
|
schema_version: z.ZodLiteral<1>;
|
|
@@ -92,6 +165,79 @@ export declare const pluginArtifactManifestSchema: z.ZodObject<{
|
|
|
92
165
|
checksum_before: z.ZodOptional<z.ZodString>;
|
|
93
166
|
checksum_after: z.ZodOptional<z.ZodString>;
|
|
94
167
|
content_type: z.ZodOptional<z.ZodString>;
|
|
168
|
+
artifact_kind: z.ZodOptional<z.ZodEnum<{
|
|
169
|
+
documentation: "documentation";
|
|
170
|
+
schema: "schema";
|
|
171
|
+
configuration: "configuration";
|
|
172
|
+
source: "source";
|
|
173
|
+
migration: "migration";
|
|
174
|
+
evidence: "evidence";
|
|
175
|
+
test: "test";
|
|
176
|
+
asset: "asset";
|
|
177
|
+
"package-metadata": "package-metadata";
|
|
178
|
+
}>>;
|
|
179
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
180
|
+
documentation: "documentation";
|
|
181
|
+
type: "type";
|
|
182
|
+
validator: "validator";
|
|
183
|
+
evidence: "evidence";
|
|
184
|
+
test: "test";
|
|
185
|
+
interface: "interface";
|
|
186
|
+
implementation: "implementation";
|
|
187
|
+
abstraction: "abstraction";
|
|
188
|
+
"business-object": "business-object";
|
|
189
|
+
"value-object": "value-object";
|
|
190
|
+
entity: "entity";
|
|
191
|
+
"repository-port": "repository-port";
|
|
192
|
+
"use-case": "use-case";
|
|
193
|
+
service: "service";
|
|
194
|
+
handler: "handler";
|
|
195
|
+
adapter: "adapter";
|
|
196
|
+
mapper: "mapper";
|
|
197
|
+
module: "module";
|
|
198
|
+
controller: "controller";
|
|
199
|
+
dto: "dto";
|
|
200
|
+
policy: "policy";
|
|
201
|
+
manifest: "manifest";
|
|
202
|
+
fixture: "fixture";
|
|
203
|
+
}>>;
|
|
204
|
+
layer: z.ZodOptional<z.ZodEnum<{
|
|
205
|
+
sdd: "sdd";
|
|
206
|
+
config: "config";
|
|
207
|
+
domain: "domain";
|
|
208
|
+
docs: "docs";
|
|
209
|
+
root: "root";
|
|
210
|
+
application: "application";
|
|
211
|
+
infrastructure: "infrastructure";
|
|
212
|
+
presentation: "presentation";
|
|
213
|
+
shared: "shared";
|
|
214
|
+
tests: "tests";
|
|
215
|
+
assets: "assets";
|
|
216
|
+
}>>;
|
|
217
|
+
language: z.ZodOptional<z.ZodEnum<{
|
|
218
|
+
shell: "shell";
|
|
219
|
+
other: "other";
|
|
220
|
+
typescript: "typescript";
|
|
221
|
+
javascript: "javascript";
|
|
222
|
+
python: "python";
|
|
223
|
+
java: "java";
|
|
224
|
+
go: "go";
|
|
225
|
+
rust: "rust";
|
|
226
|
+
csharp: "csharp";
|
|
227
|
+
php: "php";
|
|
228
|
+
ruby: "ruby";
|
|
229
|
+
}>>;
|
|
230
|
+
context: z.ZodOptional<z.ZodString>;
|
|
231
|
+
implementation: z.ZodOptional<z.ZodEnum<{
|
|
232
|
+
contract: "contract";
|
|
233
|
+
manual: "manual";
|
|
234
|
+
concrete: "concrete";
|
|
235
|
+
abstract: "abstract";
|
|
236
|
+
generated: "generated";
|
|
237
|
+
}>>;
|
|
238
|
+
decision_refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
239
|
+
source_refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
240
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
95
241
|
}, z.core.$strip>>>;
|
|
96
242
|
validation_evidence: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
97
243
|
command: z.ZodString;
|
|
@@ -185,8 +331,8 @@ export declare const pluginRuntimeInvocationEnvelopeSchema: z.ZodObject<{
|
|
|
185
331
|
env_allowlist: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
186
332
|
network: z.ZodEnum<{
|
|
187
333
|
disabled: "disabled";
|
|
188
|
-
restricted: "restricted";
|
|
189
334
|
enabled: "enabled";
|
|
335
|
+
restricted: "restricted";
|
|
190
336
|
}>;
|
|
191
337
|
process_spawn: z.ZodEnum<{
|
|
192
338
|
forbidden: "forbidden";
|
|
@@ -345,8 +491,8 @@ export declare const pluginRuntimeInvocationPlanSchema: z.ZodObject<{
|
|
|
345
491
|
env_allowlist: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
346
492
|
network: z.ZodEnum<{
|
|
347
493
|
disabled: "disabled";
|
|
348
|
-
restricted: "restricted";
|
|
349
494
|
enabled: "enabled";
|
|
495
|
+
restricted: "restricted";
|
|
350
496
|
}>;
|
|
351
497
|
process_spawn: z.ZodEnum<{
|
|
352
498
|
forbidden: "forbidden";
|
|
@@ -445,6 +591,79 @@ export declare const pluginRuntimeInvocationPlanSchema: z.ZodObject<{
|
|
|
445
591
|
checksum_before: z.ZodOptional<z.ZodString>;
|
|
446
592
|
checksum_after: z.ZodOptional<z.ZodString>;
|
|
447
593
|
content_type: z.ZodOptional<z.ZodString>;
|
|
594
|
+
artifact_kind: z.ZodOptional<z.ZodEnum<{
|
|
595
|
+
documentation: "documentation";
|
|
596
|
+
schema: "schema";
|
|
597
|
+
configuration: "configuration";
|
|
598
|
+
source: "source";
|
|
599
|
+
migration: "migration";
|
|
600
|
+
evidence: "evidence";
|
|
601
|
+
test: "test";
|
|
602
|
+
asset: "asset";
|
|
603
|
+
"package-metadata": "package-metadata";
|
|
604
|
+
}>>;
|
|
605
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
606
|
+
documentation: "documentation";
|
|
607
|
+
type: "type";
|
|
608
|
+
validator: "validator";
|
|
609
|
+
evidence: "evidence";
|
|
610
|
+
test: "test";
|
|
611
|
+
interface: "interface";
|
|
612
|
+
implementation: "implementation";
|
|
613
|
+
abstraction: "abstraction";
|
|
614
|
+
"business-object": "business-object";
|
|
615
|
+
"value-object": "value-object";
|
|
616
|
+
entity: "entity";
|
|
617
|
+
"repository-port": "repository-port";
|
|
618
|
+
"use-case": "use-case";
|
|
619
|
+
service: "service";
|
|
620
|
+
handler: "handler";
|
|
621
|
+
adapter: "adapter";
|
|
622
|
+
mapper: "mapper";
|
|
623
|
+
module: "module";
|
|
624
|
+
controller: "controller";
|
|
625
|
+
dto: "dto";
|
|
626
|
+
policy: "policy";
|
|
627
|
+
manifest: "manifest";
|
|
628
|
+
fixture: "fixture";
|
|
629
|
+
}>>;
|
|
630
|
+
layer: z.ZodOptional<z.ZodEnum<{
|
|
631
|
+
sdd: "sdd";
|
|
632
|
+
config: "config";
|
|
633
|
+
domain: "domain";
|
|
634
|
+
docs: "docs";
|
|
635
|
+
root: "root";
|
|
636
|
+
application: "application";
|
|
637
|
+
infrastructure: "infrastructure";
|
|
638
|
+
presentation: "presentation";
|
|
639
|
+
shared: "shared";
|
|
640
|
+
tests: "tests";
|
|
641
|
+
assets: "assets";
|
|
642
|
+
}>>;
|
|
643
|
+
language: z.ZodOptional<z.ZodEnum<{
|
|
644
|
+
shell: "shell";
|
|
645
|
+
other: "other";
|
|
646
|
+
typescript: "typescript";
|
|
647
|
+
javascript: "javascript";
|
|
648
|
+
python: "python";
|
|
649
|
+
java: "java";
|
|
650
|
+
go: "go";
|
|
651
|
+
rust: "rust";
|
|
652
|
+
csharp: "csharp";
|
|
653
|
+
php: "php";
|
|
654
|
+
ruby: "ruby";
|
|
655
|
+
}>>;
|
|
656
|
+
context: z.ZodOptional<z.ZodString>;
|
|
657
|
+
implementation: z.ZodOptional<z.ZodEnum<{
|
|
658
|
+
contract: "contract";
|
|
659
|
+
manual: "manual";
|
|
660
|
+
concrete: "concrete";
|
|
661
|
+
abstract: "abstract";
|
|
662
|
+
generated: "generated";
|
|
663
|
+
}>>;
|
|
664
|
+
decision_refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
665
|
+
source_refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
666
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
448
667
|
}, z.core.$strip>>>;
|
|
449
668
|
validation_evidence: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
450
669
|
command: z.ZodString;
|
|
@@ -526,8 +745,8 @@ export declare const pluginDryRunExecutionPlanSchema: z.ZodObject<{
|
|
|
526
745
|
env_allowlist: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
527
746
|
network: z.ZodEnum<{
|
|
528
747
|
disabled: "disabled";
|
|
529
|
-
restricted: "restricted";
|
|
530
748
|
enabled: "enabled";
|
|
749
|
+
restricted: "restricted";
|
|
531
750
|
}>;
|
|
532
751
|
process_spawn: z.ZodEnum<{
|
|
533
752
|
forbidden: "forbidden";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { pluginRegistryStateSchema, resolvePluginCapability, } from './plugin-registry.js';
|
|
3
3
|
import { evaluatePluginTrustPolicy, pluginPolicyEvaluationSchema } from './plugin-policy.js';
|
|
4
|
+
import { pluginArtifactKindSchema, pluginArtifactLayerSchema, pluginArtifactRoleSchema, pluginRuntimeLanguageSchema, } from './plugin-sdk-contract.js';
|
|
4
5
|
const FEATURE_REF_PATTERN = /^FEAT-\d{4}$/;
|
|
5
6
|
const OPERATION_ID_PATTERN = /^[a-z0-9][a-z0-9-]*$/;
|
|
6
7
|
const jsonObjectSchema = z.record(z.string(), z.unknown());
|
|
@@ -51,6 +52,15 @@ export const pluginArtifactManifestEntrySchema = z.object({
|
|
|
51
52
|
checksum_before: z.string().optional(),
|
|
52
53
|
checksum_after: z.string().optional(),
|
|
53
54
|
content_type: z.string().optional(),
|
|
55
|
+
artifact_kind: pluginArtifactKindSchema.optional(),
|
|
56
|
+
role: pluginArtifactRoleSchema.optional(),
|
|
57
|
+
layer: pluginArtifactLayerSchema.optional(),
|
|
58
|
+
language: pluginRuntimeLanguageSchema.optional(),
|
|
59
|
+
context: z.string().min(1).optional(),
|
|
60
|
+
implementation: z.enum(['concrete', 'abstract', 'contract', 'generated', 'manual']).optional(),
|
|
61
|
+
decision_refs: z.array(z.string().regex(/^(?:ADR|DEB|EPIC|FEAT|INS)-\d{4}$/)).optional(),
|
|
62
|
+
source_refs: z.array(z.string().min(1)).optional(),
|
|
63
|
+
tags: z.array(z.string().min(1)).optional(),
|
|
54
64
|
});
|
|
55
65
|
export const pluginArtifactManifestSchema = z.object({
|
|
56
66
|
schema_version: z.literal(1),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type DevTrackApiScaffoldDryRunPlan } from './devtrack-api-appliance.js';
|
|
2
2
|
import { type PluginRuntimeInvocationPlan } from './plugin-broker.js';
|
|
3
3
|
import { type PluginManifest } from './plugin-manifest.js';
|
|
4
|
+
import { type CodesddStorageBoundaryClassification } from './runtime-boundary-contract.js';
|
|
4
5
|
type PluginInvocationMode = 'dry-run' | 'apply' | 'rollback';
|
|
5
6
|
export interface PluginCliInspectResult {
|
|
6
7
|
schema_version: 1;
|
|
@@ -39,6 +40,7 @@ export interface PluginCliPlanOptions {
|
|
|
39
40
|
requested_env?: string[];
|
|
40
41
|
network_domains?: string[];
|
|
41
42
|
process_spawn_requested?: boolean;
|
|
43
|
+
project_root?: string;
|
|
42
44
|
technology?: {
|
|
43
45
|
language?: string;
|
|
44
46
|
framework?: string;
|
|
@@ -88,6 +90,34 @@ export interface PluginCliWorkcellRunner {
|
|
|
88
90
|
rollback: {
|
|
89
91
|
supported: boolean;
|
|
90
92
|
};
|
|
93
|
+
standalone: {
|
|
94
|
+
schema_version: 1;
|
|
95
|
+
status: 'ready' | 'blocked';
|
|
96
|
+
package_governance: {
|
|
97
|
+
status: 'passed' | 'blocked';
|
|
98
|
+
package_name?: string;
|
|
99
|
+
sdk_package?: string;
|
|
100
|
+
versioning?: string;
|
|
101
|
+
registry?: string;
|
|
102
|
+
issues: string[];
|
|
103
|
+
};
|
|
104
|
+
language_runtime: {
|
|
105
|
+
bridge?: string;
|
|
106
|
+
input_transport?: string;
|
|
107
|
+
output_transport?: string;
|
|
108
|
+
command?: string;
|
|
109
|
+
};
|
|
110
|
+
storage_boundary: {
|
|
111
|
+
status: 'passed' | 'blocked';
|
|
112
|
+
project_root: string;
|
|
113
|
+
classifications: CodesddStorageBoundaryClassification[];
|
|
114
|
+
findings: Array<{
|
|
115
|
+
path: string;
|
|
116
|
+
boundary: string;
|
|
117
|
+
message: string;
|
|
118
|
+
}>;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
91
121
|
}
|
|
92
122
|
export interface DevTrackApiScaffoldDryRunCliOptions {
|
|
93
123
|
feature_ref: string;
|
|
@@ -4,6 +4,8 @@ import { FeatureLintService } from './services/feature-lint.service.js';
|
|
|
4
4
|
import { buildPluginRuntimeInvocationPlan, pluginRuntimeInvocationRequestSchema, } from './plugin-broker.js';
|
|
5
5
|
import { loadPluginManifest } from './plugin-manifest.js';
|
|
6
6
|
import { createPluginRegistryState } from './plugin-registry.js';
|
|
7
|
+
import { validatePluginPackageGovernance } from './plugin-sdk-contract.js';
|
|
8
|
+
import { classifyCodesddStoragePath, validateCodesddStoragePaths, } from './runtime-boundary-contract.js';
|
|
7
9
|
export async function inspectPluginManifestFromFile(manifestPath) {
|
|
8
10
|
const manifest = await loadPluginManifest(manifestPath);
|
|
9
11
|
return buildInspectResult(manifest, manifestPath);
|
|
@@ -41,11 +43,20 @@ export async function planPluginInvocationFromFile(manifestPath, options) {
|
|
|
41
43
|
process_spawn_requested: options.process_spawn_requested ?? false,
|
|
42
44
|
});
|
|
43
45
|
const plan = buildPluginRuntimeInvocationPlan(registry, request);
|
|
46
|
+
const projectRoot = path.resolve(options.project_root ?? process.cwd());
|
|
47
|
+
const plannedStoragePaths = [
|
|
48
|
+
...(options.requested_write_scope ?? []),
|
|
49
|
+
...(options.planned_writes ?? []),
|
|
50
|
+
].map((entry) => path.resolve(projectRoot, entry));
|
|
51
|
+
const standalone = buildStandaloneRunnerPolicy(manifest, plan, {
|
|
52
|
+
projectRoot,
|
|
53
|
+
plannedStoragePaths,
|
|
54
|
+
});
|
|
44
55
|
return {
|
|
45
56
|
schema_version: 1,
|
|
46
57
|
manifest_path: normalizeManifestPath(manifestPath),
|
|
47
58
|
plan,
|
|
48
|
-
workcell_runner: buildWorkcellRunner(manifest, plan),
|
|
59
|
+
workcell_runner: buildWorkcellRunner(manifest, plan, standalone),
|
|
49
60
|
};
|
|
50
61
|
}
|
|
51
62
|
export async function planDevTrackApiScaffoldDryRunFromFile(manifestPath, options) {
|
|
@@ -127,7 +138,7 @@ function buildInspectResult(manifest, manifestPath) {
|
|
|
127
138
|
compression: manifest.compression,
|
|
128
139
|
};
|
|
129
140
|
}
|
|
130
|
-
function buildWorkcellRunner(manifest, plan) {
|
|
141
|
+
function buildWorkcellRunner(manifest, plan, standalone) {
|
|
131
142
|
const capability = manifest.capabilities.find((entry) => entry.name === plan.request.capability);
|
|
132
143
|
const envelope = plan.envelope;
|
|
133
144
|
const executable = envelope?.command.executable ?? manifest.execution.command;
|
|
@@ -154,7 +165,7 @@ function buildWorkcellRunner(manifest, plan) {
|
|
|
154
165
|
: null;
|
|
155
166
|
return {
|
|
156
167
|
schema_version: 1,
|
|
157
|
-
status: plan.status,
|
|
168
|
+
status: plan.status === 'ready' && standalone.status === 'blocked' ? 'blocked' : plan.status,
|
|
158
169
|
parameterization: {
|
|
159
170
|
owner: 'llm',
|
|
160
171
|
source: 'runtime-plan-request',
|
|
@@ -186,8 +197,64 @@ function buildWorkcellRunner(manifest, plan) {
|
|
|
186
197
|
rollback: {
|
|
187
198
|
supported: capability?.supports_rollback ?? false,
|
|
188
199
|
},
|
|
200
|
+
standalone,
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
function buildStandaloneRunnerPolicy(manifest, plan, options) {
|
|
204
|
+
const packageGovernance = evaluatePackageGovernance(manifest);
|
|
205
|
+
const storageValidation = validateCodesddStoragePaths(options.plannedStoragePaths, {
|
|
206
|
+
projectRoot: options.projectRoot,
|
|
207
|
+
});
|
|
208
|
+
const status = plan.status === 'ready' &&
|
|
209
|
+
packageGovernance.status === 'passed' &&
|
|
210
|
+
storageValidation.valid
|
|
211
|
+
? 'ready'
|
|
212
|
+
: 'blocked';
|
|
213
|
+
return {
|
|
214
|
+
schema_version: 1,
|
|
215
|
+
status,
|
|
216
|
+
package_governance: packageGovernance,
|
|
217
|
+
language_runtime: {
|
|
218
|
+
bridge: manifest.language_runtime?.bridge,
|
|
219
|
+
input_transport: manifest.language_runtime?.input_transport,
|
|
220
|
+
output_transport: manifest.language_runtime?.output_transport,
|
|
221
|
+
command: manifest.language_runtime?.command ?? manifest.execution.command,
|
|
222
|
+
},
|
|
223
|
+
storage_boundary: {
|
|
224
|
+
status: storageValidation.valid ? 'passed' : 'blocked',
|
|
225
|
+
project_root: options.projectRoot,
|
|
226
|
+
classifications: storageValidation.classifications.length > 0
|
|
227
|
+
? storageValidation.classifications
|
|
228
|
+
: [classifyCodesddStoragePath(options.projectRoot, { projectRoot: options.projectRoot })],
|
|
229
|
+
findings: storageValidation.findings,
|
|
230
|
+
},
|
|
189
231
|
};
|
|
190
232
|
}
|
|
233
|
+
function evaluatePackageGovernance(manifest) {
|
|
234
|
+
if (!manifest.package_governance) {
|
|
235
|
+
return {
|
|
236
|
+
status: 'blocked',
|
|
237
|
+
issues: ['PACKAGE_GOVERNANCE_MISSING: standalone plugins must declare package_governance.'],
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
try {
|
|
241
|
+
const governance = validatePluginPackageGovernance(manifest.package_governance, `${manifest.id} package_governance`);
|
|
242
|
+
return {
|
|
243
|
+
status: 'passed',
|
|
244
|
+
package_name: governance.package_name,
|
|
245
|
+
sdk_package: governance.sdk_package,
|
|
246
|
+
versioning: governance.versioning,
|
|
247
|
+
registry: governance.registry,
|
|
248
|
+
issues: [],
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
catch (error) {
|
|
252
|
+
return {
|
|
253
|
+
status: 'blocked',
|
|
254
|
+
issues: [error instanceof Error ? error.message : String(error)],
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
}
|
|
191
258
|
function isCompressionExcluded(executable, excludes) {
|
|
192
259
|
const baseName = path.basename(executable);
|
|
193
260
|
return excludes.some((entry) => entry === executable || entry === baseName);
|
|
@@ -97,6 +97,79 @@ export declare const pluginEvidenceManifestSchema: z.ZodObject<{
|
|
|
97
97
|
checksum_before: z.ZodOptional<z.ZodString>;
|
|
98
98
|
checksum_after: z.ZodOptional<z.ZodString>;
|
|
99
99
|
content_type: z.ZodOptional<z.ZodString>;
|
|
100
|
+
artifact_kind: z.ZodOptional<z.ZodEnum<{
|
|
101
|
+
documentation: "documentation";
|
|
102
|
+
schema: "schema";
|
|
103
|
+
configuration: "configuration";
|
|
104
|
+
source: "source";
|
|
105
|
+
migration: "migration";
|
|
106
|
+
evidence: "evidence";
|
|
107
|
+
test: "test";
|
|
108
|
+
asset: "asset";
|
|
109
|
+
"package-metadata": "package-metadata";
|
|
110
|
+
}>>;
|
|
111
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
112
|
+
documentation: "documentation";
|
|
113
|
+
type: "type";
|
|
114
|
+
validator: "validator";
|
|
115
|
+
evidence: "evidence";
|
|
116
|
+
test: "test";
|
|
117
|
+
interface: "interface";
|
|
118
|
+
implementation: "implementation";
|
|
119
|
+
abstraction: "abstraction";
|
|
120
|
+
"business-object": "business-object";
|
|
121
|
+
"value-object": "value-object";
|
|
122
|
+
entity: "entity";
|
|
123
|
+
"repository-port": "repository-port";
|
|
124
|
+
"use-case": "use-case";
|
|
125
|
+
service: "service";
|
|
126
|
+
handler: "handler";
|
|
127
|
+
adapter: "adapter";
|
|
128
|
+
mapper: "mapper";
|
|
129
|
+
module: "module";
|
|
130
|
+
controller: "controller";
|
|
131
|
+
dto: "dto";
|
|
132
|
+
policy: "policy";
|
|
133
|
+
manifest: "manifest";
|
|
134
|
+
fixture: "fixture";
|
|
135
|
+
}>>;
|
|
136
|
+
layer: z.ZodOptional<z.ZodEnum<{
|
|
137
|
+
sdd: "sdd";
|
|
138
|
+
config: "config";
|
|
139
|
+
domain: "domain";
|
|
140
|
+
docs: "docs";
|
|
141
|
+
root: "root";
|
|
142
|
+
application: "application";
|
|
143
|
+
infrastructure: "infrastructure";
|
|
144
|
+
presentation: "presentation";
|
|
145
|
+
shared: "shared";
|
|
146
|
+
tests: "tests";
|
|
147
|
+
assets: "assets";
|
|
148
|
+
}>>;
|
|
149
|
+
language: z.ZodOptional<z.ZodEnum<{
|
|
150
|
+
shell: "shell";
|
|
151
|
+
other: "other";
|
|
152
|
+
typescript: "typescript";
|
|
153
|
+
javascript: "javascript";
|
|
154
|
+
python: "python";
|
|
155
|
+
java: "java";
|
|
156
|
+
go: "go";
|
|
157
|
+
rust: "rust";
|
|
158
|
+
csharp: "csharp";
|
|
159
|
+
php: "php";
|
|
160
|
+
ruby: "ruby";
|
|
161
|
+
}>>;
|
|
162
|
+
context: z.ZodOptional<z.ZodString>;
|
|
163
|
+
implementation: z.ZodOptional<z.ZodEnum<{
|
|
164
|
+
contract: "contract";
|
|
165
|
+
manual: "manual";
|
|
166
|
+
concrete: "concrete";
|
|
167
|
+
abstract: "abstract";
|
|
168
|
+
generated: "generated";
|
|
169
|
+
}>>;
|
|
170
|
+
decision_refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
171
|
+
source_refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
172
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
100
173
|
}, z.core.$strip>>>;
|
|
101
174
|
validation_evidence: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
102
175
|
command: z.ZodString;
|
|
@@ -57,6 +57,74 @@ export declare const pluginManifestSchema: z.ZodObject<{
|
|
|
57
57
|
package_manager: z.ZodOptional<z.ZodString>;
|
|
58
58
|
min_versions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
59
59
|
}, z.core.$strip>;
|
|
60
|
+
package_governance: z.ZodOptional<z.ZodObject<{
|
|
61
|
+
package_name: z.ZodString;
|
|
62
|
+
sdk_package: z.ZodDefault<z.ZodString>;
|
|
63
|
+
sdk_version: z.ZodDefault<z.ZodString>;
|
|
64
|
+
package_kind: z.ZodEnum<{
|
|
65
|
+
frontend: "frontend";
|
|
66
|
+
backend: "backend";
|
|
67
|
+
"full-stack": "full-stack";
|
|
68
|
+
generator: "generator";
|
|
69
|
+
validator: "validator";
|
|
70
|
+
evidence: "evidence";
|
|
71
|
+
"agent-adapter": "agent-adapter";
|
|
72
|
+
"policy-pack": "policy-pack";
|
|
73
|
+
}>;
|
|
74
|
+
versioning: z.ZodDefault<z.ZodLiteral<"semver">>;
|
|
75
|
+
registry: z.ZodDefault<z.ZodEnum<{
|
|
76
|
+
custom: "custom";
|
|
77
|
+
workspace: "workspace";
|
|
78
|
+
npm: "npm";
|
|
79
|
+
"private-npm": "private-npm";
|
|
80
|
+
"artifact-registry": "artifact-registry";
|
|
81
|
+
}>>;
|
|
82
|
+
keywords: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
83
|
+
internal_package: z.ZodDefault<z.ZodBoolean>;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
language_runtime: z.ZodOptional<z.ZodObject<{
|
|
86
|
+
language: z.ZodEnum<{
|
|
87
|
+
shell: "shell";
|
|
88
|
+
other: "other";
|
|
89
|
+
typescript: "typescript";
|
|
90
|
+
javascript: "javascript";
|
|
91
|
+
python: "python";
|
|
92
|
+
java: "java";
|
|
93
|
+
go: "go";
|
|
94
|
+
rust: "rust";
|
|
95
|
+
csharp: "csharp";
|
|
96
|
+
php: "php";
|
|
97
|
+
ruby: "ruby";
|
|
98
|
+
}>;
|
|
99
|
+
runtime: z.ZodString;
|
|
100
|
+
bridge: z.ZodEnum<{
|
|
101
|
+
"node-library": "node-library";
|
|
102
|
+
"stdio-json": "stdio-json";
|
|
103
|
+
"process-cli": "process-cli";
|
|
104
|
+
"http-local": "http-local";
|
|
105
|
+
container: "container";
|
|
106
|
+
wasm: "wasm";
|
|
107
|
+
}>;
|
|
108
|
+
input_transport: z.ZodEnum<{
|
|
109
|
+
"sdk-call": "sdk-call";
|
|
110
|
+
"stdin-json": "stdin-json";
|
|
111
|
+
"stdout-json": "stdout-json";
|
|
112
|
+
"file-envelope": "file-envelope";
|
|
113
|
+
"http-json": "http-json";
|
|
114
|
+
}>;
|
|
115
|
+
output_transport: z.ZodEnum<{
|
|
116
|
+
"sdk-call": "sdk-call";
|
|
117
|
+
"stdin-json": "stdin-json";
|
|
118
|
+
"stdout-json": "stdout-json";
|
|
119
|
+
"file-envelope": "file-envelope";
|
|
120
|
+
"http-json": "http-json";
|
|
121
|
+
}>;
|
|
122
|
+
command: z.ZodOptional<z.ZodString>;
|
|
123
|
+
args: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
124
|
+
package_manager: z.ZodOptional<z.ZodString>;
|
|
125
|
+
min_versions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
126
|
+
env_allowlist: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
127
|
+
}, z.core.$strip>>;
|
|
60
128
|
capabilities: z.ZodArray<z.ZodObject<{
|
|
61
129
|
name: z.ZodString;
|
|
62
130
|
description: z.ZodString;
|
|
@@ -88,8 +156,8 @@ export declare const pluginManifestSchema: z.ZodObject<{
|
|
|
88
156
|
env_allowlist: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
89
157
|
network: z.ZodDefault<z.ZodEnum<{
|
|
90
158
|
disabled: "disabled";
|
|
91
|
-
restricted: "restricted";
|
|
92
159
|
enabled: "enabled";
|
|
160
|
+
restricted: "restricted";
|
|
93
161
|
}>>;
|
|
94
162
|
process_spawn: z.ZodDefault<z.ZodEnum<{
|
|
95
163
|
forbidden: "forbidden";
|
|
@@ -2,6 +2,7 @@ import fs from 'node:fs/promises';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { parse as parseYaml } from 'yaml';
|
|
4
4
|
import { toJSONSchema, z } from 'zod';
|
|
5
|
+
import { pluginPackageGovernanceSchema, pluginLanguageRuntimeSchema } from './plugin-sdk-contract.js';
|
|
5
6
|
const JSON_SCHEMA_DRAFT = 'https://json-schema.org/draft/2020-12/schema';
|
|
6
7
|
const PLUGIN_ID_PATTERN = /^codesdd-plugin-[a-z0-9][a-z0-9-]*$/;
|
|
7
8
|
const SEMVER_PATTERN = /^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/;
|
|
@@ -74,6 +75,8 @@ export const pluginManifestSchema = z
|
|
|
74
75
|
package_manager: z.string().optional(),
|
|
75
76
|
min_versions: z.record(z.string(), z.string()).default({}),
|
|
76
77
|
}),
|
|
78
|
+
package_governance: pluginPackageGovernanceSchema.optional(),
|
|
79
|
+
language_runtime: pluginLanguageRuntimeSchema.optional(),
|
|
77
80
|
capabilities: z.array(pluginCapabilitySchema).min(1),
|
|
78
81
|
execution: z.object({
|
|
79
82
|
command: z.string().min(1),
|
|
@@ -120,6 +123,13 @@ export const pluginManifestSchema = z
|
|
|
120
123
|
}),
|
|
121
124
|
})
|
|
122
125
|
.superRefine((manifest, context) => {
|
|
126
|
+
if (manifest.language_runtime && manifest.language_runtime.language !== manifest.technology.language) {
|
|
127
|
+
context.addIssue({
|
|
128
|
+
code: 'custom',
|
|
129
|
+
path: ['language_runtime', 'language'],
|
|
130
|
+
message: 'Language runtime language must match technology.language.',
|
|
131
|
+
});
|
|
132
|
+
}
|
|
123
133
|
const duplicateCapabilityNames = findDuplicates(manifest.capabilities.map((capability) => capability.name));
|
|
124
134
|
for (const duplicateName of duplicateCapabilityNames) {
|
|
125
135
|
context.addIssue({
|
|
@@ -37,8 +37,8 @@ export declare const pluginPolicyPackSchema: z.ZodObject<{
|
|
|
37
37
|
execution: z.ZodDefault<z.ZodObject<{
|
|
38
38
|
network: z.ZodOptional<z.ZodEnum<{
|
|
39
39
|
disabled: "disabled";
|
|
40
|
-
restricted: "restricted";
|
|
41
40
|
enabled: "enabled";
|
|
41
|
+
restricted: "restricted";
|
|
42
42
|
}>>;
|
|
43
43
|
process_spawn: z.ZodOptional<z.ZodEnum<{
|
|
44
44
|
forbidden: "forbidden";
|