@devtrack-solution/codesdd 1.2.3 → 1.2.4-rc3

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 (139) hide show
  1. package/.sdd/skills/curated/devtrack-api/SKILL.md +12 -5
  2. package/.sdd/skills/curated/devtrack-api/agents/claude-code.yaml +8 -0
  3. package/.sdd/skills/curated/devtrack-api/agents/codex.yaml +8 -0
  4. package/.sdd/skills/curated/devtrack-api/agents/cursor.yaml +8 -0
  5. package/.sdd/skills/curated/devtrack-api/agents/gemini.yaml +8 -0
  6. package/.sdd/skills/curated/devtrack-api/agents/kimi.yaml +8 -0
  7. package/.sdd/skills/curated/devtrack-api/agents/openai.yaml +4 -2
  8. package/.sdd/skills/curated/devtrack-api/agents/opencode.yaml +10 -0
  9. package/.sdd/skills/curated/devtrack-api/references/application-presentation.md +2 -2
  10. package/.sdd/skills/curated/devtrack-api/references/contract-pack.yaml +55 -0
  11. package/.sdd/skills/curated/devtrack-api/references/domain-modeling.md +13 -13
  12. package/.sdd/skills/curated/devtrack-api/references/foundation-layout.md +2 -3
  13. package/.sdd/skills/curated/devtrack-api/references/implementation-checklist.md +1 -1
  14. package/.sdd/skills/curated/devtrack-api/references/portable-agent-contract.md +41 -0
  15. package/.sdd/skills/curated/devtrack-api/references/typeorm-infrastructure.md +7 -9
  16. package/README.md +159 -5
  17. package/dist/applications/sdd/index.d.ts +16 -0
  18. package/dist/applications/sdd/index.js +16 -0
  19. package/dist/commands/config.js +171 -10
  20. package/dist/commands/sdd/execution.js +345 -15
  21. package/dist/commands/sdd/plugin.js +5 -0
  22. package/dist/commands/sdd/shared.d.ts +1 -0
  23. package/dist/commands/sdd/shared.js +10 -0
  24. package/dist/commands/sdd.js +38 -3
  25. package/dist/core/cli/command-matrix.js +9 -0
  26. package/dist/core/cli-command-quality.js +9 -0
  27. package/dist/core/completions/command-registry.js +45 -0
  28. package/dist/core/config-schema.d.ts +18 -1
  29. package/dist/core/config-schema.js +48 -5
  30. package/dist/core/global-config.d.ts +16 -0
  31. package/dist/core/sdd/agent-binding.d.ts +10 -10
  32. package/dist/core/sdd/agent-runtime-contract.d.ts +204 -0
  33. package/dist/core/sdd/agent-runtime-contract.js +200 -0
  34. package/dist/core/sdd/check.d.ts +2 -0
  35. package/dist/core/sdd/check.js +40 -2
  36. package/dist/core/sdd/coordination/coordination-adapters.d.ts +15 -8
  37. package/dist/core/sdd/coordination/coordination-adapters.js +43 -15
  38. package/dist/core/sdd/coordination/index.d.ts +1 -0
  39. package/dist/core/sdd/coordination/index.js +1 -0
  40. package/dist/core/sdd/coordination/redis-runtime.d.ts +131 -0
  41. package/dist/core/sdd/coordination/redis-runtime.js +698 -0
  42. package/dist/core/sdd/deepagent-contracts.d.ts +98 -4
  43. package/dist/core/sdd/deepagent-contracts.js +62 -0
  44. package/dist/core/sdd/default-bootstrap-files.d.ts +2 -2
  45. package/dist/core/sdd/default-bootstrap-files.js +14 -8
  46. package/dist/core/sdd/default-skills.js +108 -4
  47. package/dist/core/sdd/devtrack-api-appliance.d.ts +8 -1
  48. package/dist/core/sdd/devtrack-api-appliance.js +46 -23
  49. package/dist/core/sdd/docs-sync.js +21 -15
  50. package/dist/core/sdd/domain/capability-diff.d.ts +63 -0
  51. package/dist/core/sdd/domain/capability-diff.js +200 -0
  52. package/dist/core/sdd/domain/change-safety-guardrails.d.ts +74 -0
  53. package/dist/core/sdd/domain/change-safety-guardrails.js +333 -0
  54. package/dist/core/sdd/domain/semantic-intent-classifier.d.ts +29 -0
  55. package/dist/core/sdd/domain/semantic-intent-classifier.js +117 -0
  56. package/dist/core/sdd/foundation-artifact-map-validator.d.ts +16 -0
  57. package/dist/core/sdd/foundation-artifact-map-validator.js +71 -0
  58. package/dist/core/sdd/foundation-layer-manifest.d.ts +24 -0
  59. package/dist/core/sdd/foundation-layer-manifest.js +117 -0
  60. package/dist/core/sdd/intent-guard.d.ts +22 -0
  61. package/dist/core/sdd/intent-guard.js +67 -0
  62. package/dist/core/sdd/json-schema.js +9 -1
  63. package/dist/core/sdd/legacy-operations.js +76 -1
  64. package/dist/core/sdd/migrate-workspace.js +39 -0
  65. package/dist/core/sdd/package-security-gates.d.ts +21 -0
  66. package/dist/core/sdd/package-security-gates.js +119 -0
  67. package/dist/core/sdd/package-structure-gate.js +3 -8
  68. package/dist/core/sdd/parallel-feat-automation.d.ts +181 -3
  69. package/dist/core/sdd/parallel-feat-automation.js +212 -0
  70. package/dist/core/sdd/plugin-broker.d.ts +223 -4
  71. package/dist/core/sdd/plugin-broker.js +10 -0
  72. package/dist/core/sdd/plugin-cli.d.ts +30 -0
  73. package/dist/core/sdd/plugin-cli.js +70 -3
  74. package/dist/core/sdd/plugin-evidence.d.ts +73 -0
  75. package/dist/core/sdd/plugin-manifest.d.ts +69 -1
  76. package/dist/core/sdd/plugin-manifest.js +10 -0
  77. package/dist/core/sdd/plugin-policy-pack.d.ts +1 -1
  78. package/dist/core/sdd/plugin-registry.d.ts +141 -5
  79. package/dist/core/sdd/plugin-sdk-contract.d.ts +363 -0
  80. package/dist/core/sdd/plugin-sdk-contract.js +268 -0
  81. package/dist/core/sdd/plugin-skill-binding.d.ts +1 -1
  82. package/dist/core/sdd/quality-validation.d.ts +84 -11
  83. package/dist/core/sdd/release-readiness.d.ts +19 -0
  84. package/dist/core/sdd/release-readiness.js +472 -0
  85. package/dist/core/sdd/runtime-boundary-contract.d.ts +45 -0
  86. package/dist/core/sdd/runtime-boundary-contract.js +90 -0
  87. package/dist/core/sdd/sdk-agent-plugin-quality-gates.d.ts +150 -0
  88. package/dist/core/sdd/sdk-agent-plugin-quality-gates.js +258 -0
  89. package/dist/core/sdd/services/agent-run.service.d.ts +38 -6
  90. package/dist/core/sdd/services/agent-run.service.js +73 -1
  91. package/dist/core/sdd/services/capability-diff.service.d.ts +18 -0
  92. package/dist/core/sdd/services/capability-diff.service.js +26 -0
  93. package/dist/core/sdd/services/change-safety-preflight.service.d.ts +17 -0
  94. package/dist/core/sdd/services/change-safety-preflight.service.js +17 -0
  95. package/dist/core/sdd/services/context.service.d.ts +43 -340
  96. package/dist/core/sdd/services/context.service.js +323 -9
  97. package/dist/core/sdd/services/finalize.service.d.ts +25 -0
  98. package/dist/core/sdd/services/finalize.service.js +178 -16
  99. package/dist/core/sdd/services/frontend-impact.service.d.ts +1 -1
  100. package/dist/core/sdd/services/semantic-intent-classifier.service.d.ts +6 -0
  101. package/dist/core/sdd/services/semantic-intent-classifier.service.js +7 -0
  102. package/dist/core/sdd/state.d.ts +1 -0
  103. package/dist/core/sdd/state.js +251 -29
  104. package/dist/core/sdd/store/sdd-stores.js +2 -2
  105. package/dist/core/sdd/structural-health.d.ts +13 -13
  106. package/dist/core/sdd/types.d.ts +27 -12
  107. package/dist/core/sdd/types.js +4 -0
  108. package/dist/core/sdd/views.js +17 -0
  109. package/dist/core/sdd/workspace-schemas.d.ts +387 -7
  110. package/dist/core/sdd/workspace-schemas.js +196 -64
  111. package/dist/domains/sdd/index.d.ts +6 -0
  112. package/dist/domains/sdd/index.js +6 -0
  113. package/dist/infrastructures/sdd/index.d.ts +7 -0
  114. package/dist/infrastructures/sdd/index.js +6 -0
  115. package/dist/presentations/cli/sdd/index.d.ts +3 -0
  116. package/dist/presentations/cli/sdd/index.js +3 -0
  117. package/dist/shared/sdd/index.d.ts +3 -0
  118. package/dist/shared/sdd/index.js +2 -0
  119. package/package.json +9 -6
  120. package/schemas/sdd/2-plan.schema.json +207 -2
  121. package/schemas/sdd/5-quality.schema.json +281 -25
  122. package/schemas/sdd/agent-runtime-command-plan.schema.json +212 -0
  123. package/schemas/sdd/agent-runtime-opencode-run-evidence.schema.json +270 -0
  124. package/schemas/sdd/codesdd-plugin.schema.json +171 -0
  125. package/schemas/sdd/deepagent-run-request.schema.json +316 -0
  126. package/schemas/sdd/parallel-feat-automation-plan.schema.json +89 -0
  127. package/schemas/sdd/parallel-feat-scheduler-request.schema.json +116 -0
  128. package/schemas/sdd/parallel-feat-scheduler-result.schema.json +404 -0
  129. package/schemas/sdd/plugin-artifact-manifest.schema.json +109 -0
  130. package/schemas/sdd/plugin-artifact-map.schema.json +223 -0
  131. package/schemas/sdd/plugin-evidence-manifest.schema.json +109 -0
  132. package/schemas/sdd/plugin-language-runtime.schema.json +103 -0
  133. package/schemas/sdd/plugin-package-governance.schema.json +74 -0
  134. package/schemas/sdd/plugin-registry.schema.json +171 -0
  135. package/schemas/sdd/plugin-runtime-invocation-plan.schema.json +109 -0
  136. package/schemas/sdd/quality-evidence-bundle.schema.json +109 -0
  137. package/schemas/sdd/sdk-agent-plugin-quality-gate-input.schema.json +168 -0
  138. package/schemas/sdd/sdk-agent-plugin-quality-gate-report.schema.json +160 -0
  139. package/schemas/sdd/workspace-catalog.schema.json +3776 -398
@@ -449,6 +449,51 @@ const COMMAND_METADATA_OVERRIDES = [
449
449
  description: 'Configure workflow profile (interactive picker or preset shortcut)',
450
450
  flags: [],
451
451
  },
452
+ {
453
+ name: 'redis',
454
+ description: 'Inspect and operate the optional Redis runtime backend',
455
+ flags: [],
456
+ subcommands: [
457
+ {
458
+ name: 'status',
459
+ description: 'Show Redis runtime status',
460
+ flags: [
461
+ COMMON_FLAGS.json,
462
+ ],
463
+ },
464
+ {
465
+ name: 'ping',
466
+ description: 'Ping Redis using the effective CodeSDD configuration',
467
+ flags: [
468
+ COMMON_FLAGS.json,
469
+ ],
470
+ },
471
+ {
472
+ name: 'bench',
473
+ description: 'Run a short redacted Redis latency benchmark',
474
+ flags: [
475
+ COMMON_FLAGS.json,
476
+ {
477
+ name: 'iterations',
478
+ description: 'Number of benchmark iterations',
479
+ takesValue: true,
480
+ },
481
+ ],
482
+ },
483
+ {
484
+ name: 'flush-namespace',
485
+ description: 'Delete only keys under the effective CodeSDD Redis namespace',
486
+ flags: [
487
+ COMMON_FLAGS.json,
488
+ {
489
+ name: 'yes',
490
+ short: 'y',
491
+ description: 'Confirm namespace-scoped deletion',
492
+ },
493
+ ],
494
+ },
495
+ ],
496
+ },
452
497
  ],
453
498
  },
454
499
  {
@@ -15,6 +15,23 @@ export declare const GlobalConfigSchema: z.ZodObject<{
15
15
  both: "both";
16
16
  }>>>;
17
17
  workflows: z.ZodOptional<z.ZodArray<z.ZodString>>;
18
+ redis: z.ZodOptional<z.ZodObject<{
19
+ enabled: z.ZodOptional<z.ZodBoolean>;
20
+ url: z.ZodOptional<z.ZodString>;
21
+ url_env: z.ZodOptional<z.ZodString>;
22
+ namespace: z.ZodOptional<z.ZodString>;
23
+ tls: z.ZodOptional<z.ZodBoolean>;
24
+ connect_timeout_ms: z.ZodOptional<z.ZodNumber>;
25
+ command_timeout_ms: z.ZodOptional<z.ZodNumber>;
26
+ max_retries: z.ZodOptional<z.ZodNumber>;
27
+ fallback: z.ZodOptional<z.ZodEnum<{
28
+ filesystem: "filesystem";
29
+ none: "none";
30
+ }>>;
31
+ cache_default_ttl_ms: z.ZodOptional<z.ZodNumber>;
32
+ lock_ttl_ms: z.ZodOptional<z.ZodNumber>;
33
+ stream_max_len: z.ZodOptional<z.ZodNumber>;
34
+ }, z.core.$strip>>;
18
35
  }, z.core.$loose>;
19
36
  export type GlobalConfigType = z.infer<typeof GlobalConfigSchema>;
20
37
  /**
@@ -84,5 +101,5 @@ export declare function validateConfig(config: unknown): {
84
101
  error?: string;
85
102
  };
86
103
  export declare function isSensitiveConfigPath(path: string): boolean;
87
- export declare function redactConfigSecrets(value: unknown): unknown;
104
+ export declare function redactConfigSecrets(value: unknown, parentPath?: string): unknown;
88
105
  //# sourceMappingURL=config-schema.d.ts.map
@@ -20,6 +20,22 @@ export const GlobalConfigSchema = z
20
20
  workflows: z
21
21
  .array(z.string())
22
22
  .optional(),
23
+ redis: z
24
+ .object({
25
+ enabled: z.boolean().optional(),
26
+ url: z.string().min(1).optional(),
27
+ url_env: z.string().min(1).optional(),
28
+ namespace: z.string().min(1).optional(),
29
+ tls: z.boolean().optional(),
30
+ connect_timeout_ms: z.number().int().positive().optional(),
31
+ command_timeout_ms: z.number().int().positive().optional(),
32
+ max_retries: z.number().int().min(0).optional(),
33
+ fallback: z.enum(['filesystem', 'none']).optional(),
34
+ cache_default_ttl_ms: z.number().int().positive().optional(),
35
+ lock_ttl_ms: z.number().int().positive().optional(),
36
+ stream_max_len: z.number().int().positive().optional(),
37
+ })
38
+ .optional(),
23
39
  })
24
40
  .passthrough();
25
41
  /**
@@ -30,7 +46,7 @@ export const DEFAULT_CONFIG = {
30
46
  profile: 'core',
31
47
  delivery: 'both',
32
48
  };
33
- const KNOWN_TOP_LEVEL_KEYS = new Set([...Object.keys(DEFAULT_CONFIG), 'workflows']);
49
+ const KNOWN_TOP_LEVEL_KEYS = new Set([...Object.keys(DEFAULT_CONFIG), 'workflows', 'redis']);
34
50
  const SENSITIVE_KEY_TOKENS = ['key', 'secret', 'token', 'password', 'credential', 'private', 'auth'];
35
51
  /**
36
52
  * Validate a config key path for CLI set operations.
@@ -51,6 +67,29 @@ export function validateConfigKeyPath(path) {
51
67
  }
52
68
  return { valid: true };
53
69
  }
70
+ if (rootKey === 'redis') {
71
+ if (rawKeys.length !== 2) {
72
+ return { valid: false, reason: 'redis settings support one nested key' };
73
+ }
74
+ const redisKeys = new Set([
75
+ 'enabled',
76
+ 'url',
77
+ 'url_env',
78
+ 'namespace',
79
+ 'tls',
80
+ 'connect_timeout_ms',
81
+ 'command_timeout_ms',
82
+ 'max_retries',
83
+ 'fallback',
84
+ 'cache_default_ttl_ms',
85
+ 'lock_ttl_ms',
86
+ 'stream_max_len',
87
+ ]);
88
+ if (!redisKeys.has(rawKeys[1])) {
89
+ return { valid: false, reason: `Unknown redis key "${rawKeys[1]}"` };
90
+ }
91
+ return { valid: true };
92
+ }
54
93
  if (rawKeys.length > 1) {
55
94
  return { valid: false, reason: `"${rootKey}" does not support nested keys` };
56
95
  }
@@ -216,22 +255,26 @@ export function isSensitiveConfigPath(path) {
216
255
  .split('.')
217
256
  .map((segment) => segment.trim().toLowerCase())
218
257
  .filter(Boolean);
258
+ if (segments.length >= 2 && segments[0] === 'redis' && segments[segments.length - 1] === 'url') {
259
+ return true;
260
+ }
219
261
  return segments.some((segment) => SENSITIVE_KEY_TOKENS.some((token) => segment.includes(token)));
220
262
  }
221
- export function redactConfigSecrets(value) {
263
+ export function redactConfigSecrets(value, parentPath = '') {
222
264
  if (Array.isArray(value)) {
223
- return value.map((entry) => redactConfigSecrets(entry));
265
+ return value.map((entry) => redactConfigSecrets(entry, parentPath));
224
266
  }
225
267
  if (!value || typeof value !== 'object') {
226
268
  return value;
227
269
  }
228
270
  const redacted = {};
229
271
  for (const [key, entryValue] of Object.entries(value)) {
230
- if (isSensitiveConfigPath(key)) {
272
+ const path = parentPath ? `${parentPath}.${key}` : key;
273
+ if (isSensitiveConfigPath(path)) {
231
274
  redacted[key] = '[REDACTED]';
232
275
  continue;
233
276
  }
234
- redacted[key] = redactConfigSecrets(entryValue);
277
+ redacted[key] = redactConfigSecrets(entryValue, path);
235
278
  }
236
279
  return redacted;
237
280
  }
@@ -7,11 +7,27 @@ export declare const LEGACY_GLOBAL_CONFIG_DIR_NAME = "codesdd";
7
7
  export declare const LEGACY_GLOBAL_CONFIG_FILE_NAME = "config.json";
8
8
  export type Profile = 'core' | 'custom';
9
9
  export type Delivery = 'both' | 'skills' | 'commands';
10
+ export type RedisFallbackMode = 'filesystem' | 'none';
11
+ export interface RedisGlobalConfig {
12
+ enabled?: boolean;
13
+ url?: string;
14
+ url_env?: string;
15
+ namespace?: string;
16
+ tls?: boolean;
17
+ connect_timeout_ms?: number;
18
+ command_timeout_ms?: number;
19
+ max_retries?: number;
20
+ fallback?: RedisFallbackMode;
21
+ cache_default_ttl_ms?: number;
22
+ lock_ttl_ms?: number;
23
+ stream_max_len?: number;
24
+ }
10
25
  export interface GlobalConfig {
11
26
  featureFlags?: Record<string, boolean>;
12
27
  profile?: Profile;
13
28
  delivery?: Delivery;
14
29
  workflows?: string[];
30
+ redis?: RedisGlobalConfig;
15
31
  }
16
32
  export declare function parseTomlContent(content: string): Record<string, unknown>;
17
33
  export declare function stringifyTomlContent(value: Record<string, unknown>): string;
@@ -8,10 +8,10 @@ declare const agentProviderSchema: z.ZodEnum<{
8
8
  cloudcode: "cloudcode";
9
9
  }>;
10
10
  declare const agentTaskKindSchema: z.ZodEnum<{
11
+ implementation: "implementation";
11
12
  validation: "validation";
12
13
  planning: "planning";
13
14
  "reverse-engineering": "reverse-engineering";
14
- implementation: "implementation";
15
15
  review: "review";
16
16
  "plugin-execution": "plugin-execution";
17
17
  "adr-governance": "adr-governance";
@@ -32,10 +32,10 @@ declare const riskTierSchema: z.ZodEnum<{
32
32
  }>;
33
33
  export declare const agentBindingCapabilitySchema: z.ZodObject<{
34
34
  task_kind: z.ZodEnum<{
35
+ implementation: "implementation";
35
36
  validation: "validation";
36
37
  planning: "planning";
37
38
  "reverse-engineering": "reverse-engineering";
38
- implementation: "implementation";
39
39
  review: "review";
40
40
  "plugin-execution": "plugin-execution";
41
41
  "adr-governance": "adr-governance";
@@ -84,17 +84,17 @@ export declare const agentBindingAdapterSchema: z.ZodObject<{
84
84
  args: z.ZodDefault<z.ZodArray<z.ZodString>>;
85
85
  network: z.ZodDefault<z.ZodEnum<{
86
86
  disabled: "disabled";
87
- restricted: "restricted";
88
87
  enabled: "enabled";
88
+ restricted: "restricted";
89
89
  }>>;
90
90
  evidence_contract: z.ZodDefault<z.ZodString>;
91
91
  }, z.core.$strip>;
92
92
  capabilities: z.ZodArray<z.ZodObject<{
93
93
  task_kind: z.ZodEnum<{
94
+ implementation: "implementation";
94
95
  validation: "validation";
95
96
  planning: "planning";
96
97
  "reverse-engineering": "reverse-engineering";
97
- implementation: "implementation";
98
98
  review: "review";
99
99
  "plugin-execution": "plugin-execution";
100
100
  "adr-governance": "adr-governance";
@@ -137,10 +137,10 @@ export declare const agentBindingResolutionRequestSchema: z.ZodObject<{
137
137
  schema_version: z.ZodDefault<z.ZodLiteral<1>>;
138
138
  feature_ref: z.ZodString;
139
139
  task_kind: z.ZodEnum<{
140
+ implementation: "implementation";
140
141
  validation: "validation";
141
142
  planning: "planning";
142
143
  "reverse-engineering": "reverse-engineering";
143
- implementation: "implementation";
144
144
  review: "review";
145
145
  "plugin-execution": "plugin-execution";
146
146
  "adr-governance": "adr-governance";
@@ -196,10 +196,10 @@ export declare const agentBindingCandidateSchema: z.ZodObject<{
196
196
  label: z.ZodString;
197
197
  }, z.core.$strip>;
198
198
  task_kind: z.ZodEnum<{
199
+ implementation: "implementation";
199
200
  validation: "validation";
200
201
  planning: "planning";
201
202
  "reverse-engineering": "reverse-engineering";
202
- implementation: "implementation";
203
203
  review: "review";
204
204
  "plugin-execution": "plugin-execution";
205
205
  "adr-governance": "adr-governance";
@@ -213,17 +213,17 @@ export declare const agentBindingResolutionSchema: z.ZodObject<{
213
213
  schema_version: z.ZodLiteral<1>;
214
214
  created_at: z.ZodString;
215
215
  status: z.ZodEnum<{
216
- resolved: "resolved";
217
216
  fallback: "fallback";
217
+ resolved: "resolved";
218
218
  }>;
219
219
  request: z.ZodObject<{
220
220
  schema_version: z.ZodDefault<z.ZodLiteral<1>>;
221
221
  feature_ref: z.ZodString;
222
222
  task_kind: z.ZodEnum<{
223
+ implementation: "implementation";
223
224
  validation: "validation";
224
225
  planning: "planning";
225
226
  "reverse-engineering": "reverse-engineering";
226
- implementation: "implementation";
227
227
  review: "review";
228
228
  "plugin-execution": "plugin-execution";
229
229
  "adr-governance": "adr-governance";
@@ -279,10 +279,10 @@ export declare const agentBindingResolutionSchema: z.ZodObject<{
279
279
  label: z.ZodString;
280
280
  }, z.core.$strip>;
281
281
  task_kind: z.ZodEnum<{
282
+ implementation: "implementation";
282
283
  validation: "validation";
283
284
  planning: "planning";
284
285
  "reverse-engineering": "reverse-engineering";
285
- implementation: "implementation";
286
286
  review: "review";
287
287
  "plugin-execution": "plugin-execution";
288
288
  "adr-governance": "adr-governance";
@@ -306,10 +306,10 @@ export declare const agentBindingResolutionSchema: z.ZodObject<{
306
306
  label: z.ZodString;
307
307
  }, z.core.$strip>;
308
308
  task_kind: z.ZodEnum<{
309
+ implementation: "implementation";
309
310
  validation: "validation";
310
311
  planning: "planning";
311
312
  "reverse-engineering": "reverse-engineering";
312
- implementation: "implementation";
313
313
  review: "review";
314
314
  "plugin-execution": "plugin-execution";
315
315
  "adr-governance": "adr-governance";
@@ -0,0 +1,204 @@
1
+ import { z } from 'zod';
2
+ export declare const agentRuntimeProviderSchema: z.ZodEnum<{
3
+ codex: "codex";
4
+ opencode: "opencode";
5
+ deepagents: "deepagents";
6
+ }>;
7
+ export declare const agentRuntimeModeSchema: z.ZodEnum<{
8
+ validate: "validate";
9
+ "read-only": "read-only";
10
+ plan: "plan";
11
+ "apply-sandbox": "apply-sandbox";
12
+ "apply-approved": "apply-approved";
13
+ }>;
14
+ export declare const agentRuntimeSandboxSchema: z.ZodEnum<{
15
+ "read-only": "read-only";
16
+ "workspace-write": "workspace-write";
17
+ "danger-full-access": "danger-full-access";
18
+ }>;
19
+ export declare const agentRuntimeStatusSchema: z.ZodEnum<{
20
+ blocked: "blocked";
21
+ planned: "planned";
22
+ }>;
23
+ export declare const opencodeExecutionStatusSchema: z.ZodEnum<{
24
+ completed: "completed";
25
+ blocked: "blocked";
26
+ planned: "planned";
27
+ failed: "failed";
28
+ skipped: "skipped";
29
+ running: "running";
30
+ }>;
31
+ export declare const agentRuntimeCommandPlanRequestSchema: z.ZodObject<{
32
+ schema_version: z.ZodDefault<z.ZodLiteral<1>>;
33
+ feature_ref: z.ZodString;
34
+ provider: z.ZodEnum<{
35
+ codex: "codex";
36
+ opencode: "opencode";
37
+ deepagents: "deepagents";
38
+ }>;
39
+ mode: z.ZodDefault<z.ZodEnum<{
40
+ validate: "validate";
41
+ "read-only": "read-only";
42
+ plan: "plan";
43
+ "apply-sandbox": "apply-sandbox";
44
+ "apply-approved": "apply-approved";
45
+ }>>;
46
+ instruction: z.ZodString;
47
+ cwd: z.ZodDefault<z.ZodString>;
48
+ model: z.ZodOptional<z.ZodString>;
49
+ sandbox: z.ZodDefault<z.ZodEnum<{
50
+ "read-only": "read-only";
51
+ "workspace-write": "workspace-write";
52
+ "danger-full-access": "danger-full-access";
53
+ }>>;
54
+ output_schema: z.ZodOptional<z.ZodString>;
55
+ output_last_message: z.ZodOptional<z.ZodString>;
56
+ agent: z.ZodOptional<z.ZodString>;
57
+ session: z.ZodOptional<z.ZodString>;
58
+ files: z.ZodDefault<z.ZodArray<z.ZodString>>;
59
+ approval_grants: z.ZodDefault<z.ZodArray<z.ZodEnum<{
60
+ maintainer: "maintainer";
61
+ security: "security";
62
+ "architecture-board": "architecture-board";
63
+ }>>>;
64
+ }, z.core.$strip>;
65
+ export declare const agentRuntimeCommandPlanSchema: z.ZodObject<{
66
+ schema_version: z.ZodLiteral<1>;
67
+ created_at: z.ZodString;
68
+ status: z.ZodEnum<{
69
+ blocked: "blocked";
70
+ planned: "planned";
71
+ }>;
72
+ request: z.ZodObject<{
73
+ schema_version: z.ZodDefault<z.ZodLiteral<1>>;
74
+ feature_ref: z.ZodString;
75
+ provider: z.ZodEnum<{
76
+ codex: "codex";
77
+ opencode: "opencode";
78
+ deepagents: "deepagents";
79
+ }>;
80
+ mode: z.ZodDefault<z.ZodEnum<{
81
+ validate: "validate";
82
+ "read-only": "read-only";
83
+ plan: "plan";
84
+ "apply-sandbox": "apply-sandbox";
85
+ "apply-approved": "apply-approved";
86
+ }>>;
87
+ instruction: z.ZodString;
88
+ cwd: z.ZodDefault<z.ZodString>;
89
+ model: z.ZodOptional<z.ZodString>;
90
+ sandbox: z.ZodDefault<z.ZodEnum<{
91
+ "read-only": "read-only";
92
+ "workspace-write": "workspace-write";
93
+ "danger-full-access": "danger-full-access";
94
+ }>>;
95
+ output_schema: z.ZodOptional<z.ZodString>;
96
+ output_last_message: z.ZodOptional<z.ZodString>;
97
+ agent: z.ZodOptional<z.ZodString>;
98
+ session: z.ZodOptional<z.ZodString>;
99
+ files: z.ZodDefault<z.ZodArray<z.ZodString>>;
100
+ approval_grants: z.ZodDefault<z.ZodArray<z.ZodEnum<{
101
+ maintainer: "maintainer";
102
+ security: "security";
103
+ "architecture-board": "architecture-board";
104
+ }>>>;
105
+ }, z.core.$strip>;
106
+ provider: z.ZodEnum<{
107
+ codex: "codex";
108
+ opencode: "opencode";
109
+ deepagents: "deepagents";
110
+ }>;
111
+ command: z.ZodOptional<z.ZodObject<{
112
+ executable: z.ZodString;
113
+ args: z.ZodDefault<z.ZodArray<z.ZodString>>;
114
+ stdin: z.ZodOptional<z.ZodString>;
115
+ }, z.core.$strip>>;
116
+ evidence_contract: z.ZodEnum<{
117
+ "agent-runtime-v2/deepagents": "agent-runtime-v2/deepagents";
118
+ "agent-runtime-v2/codex-exec": "agent-runtime-v2/codex-exec";
119
+ "agent-runtime-v2/opencode-run": "agent-runtime-v2/opencode-run";
120
+ }>;
121
+ structured_output: z.ZodBoolean;
122
+ reasons: z.ZodDefault<z.ZodArray<z.ZodString>>;
123
+ policy: z.ZodObject<{
124
+ direct_state_write_allowed: z.ZodLiteral<false>;
125
+ requires_codesdd_finalize: z.ZodLiteral<true>;
126
+ mutating_modes_require_approval: z.ZodLiteral<true>;
127
+ }, z.core.$strip>;
128
+ }, z.core.$strip>;
129
+ export declare const opencodeExecutionEvidenceSchema: z.ZodObject<{
130
+ schema_version: z.ZodLiteral<1>;
131
+ contract: z.ZodLiteral<"agent-runtime-v2/opencode-run">;
132
+ provider: z.ZodLiteral<"opencode">;
133
+ feature_ref: z.ZodString;
134
+ run_id: z.ZodString;
135
+ created_at: z.ZodString;
136
+ mode: z.ZodEnum<{
137
+ validate: "validate";
138
+ "read-only": "read-only";
139
+ plan: "plan";
140
+ "apply-sandbox": "apply-sandbox";
141
+ "apply-approved": "apply-approved";
142
+ }>;
143
+ status: z.ZodEnum<{
144
+ completed: "completed";
145
+ blocked: "blocked";
146
+ planned: "planned";
147
+ failed: "failed";
148
+ skipped: "skipped";
149
+ running: "running";
150
+ }>;
151
+ command: z.ZodObject<{
152
+ args: z.ZodDefault<z.ZodArray<z.ZodString>>;
153
+ stdin: z.ZodOptional<z.ZodString>;
154
+ executable: z.ZodLiteral<"opencode">;
155
+ }, z.core.$strip>;
156
+ command_plan_ref: z.ZodOptional<z.ZodString>;
157
+ cwd: z.ZodDefault<z.ZodString>;
158
+ exit_code: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
159
+ started_at: z.ZodOptional<z.ZodString>;
160
+ completed_at: z.ZodOptional<z.ZodString>;
161
+ duration_ms: z.ZodOptional<z.ZodNumber>;
162
+ structured_output: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
163
+ stdout_excerpt: z.ZodOptional<z.ZodString>;
164
+ stderr_excerpt: z.ZodOptional<z.ZodString>;
165
+ artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
166
+ kind: z.ZodString;
167
+ ref: z.ZodString;
168
+ path: z.ZodOptional<z.ZodString>;
169
+ sha256: z.ZodOptional<z.ZodString>;
170
+ }, z.core.$strip>>>;
171
+ validations: z.ZodDefault<z.ZodArray<z.ZodString>>;
172
+ redactions: z.ZodDefault<z.ZodArray<z.ZodString>>;
173
+ risks: z.ZodDefault<z.ZodArray<z.ZodObject<{
174
+ id: z.ZodString;
175
+ severity: z.ZodEnum<{
176
+ low: "low";
177
+ medium: "medium";
178
+ high: "high";
179
+ critical: "critical";
180
+ }>;
181
+ summary: z.ZodString;
182
+ mitigation: z.ZodOptional<z.ZodString>;
183
+ }, z.core.$strip>>>;
184
+ policy: z.ZodObject<{
185
+ direct_state_write_allowed: z.ZodLiteral<false>;
186
+ requires_codesdd_finalize: z.ZodLiteral<true>;
187
+ raw_secret_output_allowed: z.ZodLiteral<false>;
188
+ transcript_storage: z.ZodDefault<z.ZodEnum<{
189
+ forbidden: "forbidden";
190
+ "redacted-excerpts-only": "redacted-excerpts-only";
191
+ }>>;
192
+ }, z.core.$strip>;
193
+ finalize_intent: z.ZodDefault<z.ZodBoolean>;
194
+ }, z.core.$strip>;
195
+ export type AgentRuntimeProvider = z.infer<typeof agentRuntimeProviderSchema>;
196
+ export type AgentRuntimeMode = z.infer<typeof agentRuntimeModeSchema>;
197
+ export type AgentRuntimeCommandPlanRequest = z.infer<typeof agentRuntimeCommandPlanRequestSchema>;
198
+ export type AgentRuntimeCommandPlan = z.infer<typeof agentRuntimeCommandPlanSchema>;
199
+ export type OpenCodeExecutionEvidence = z.infer<typeof opencodeExecutionEvidenceSchema>;
200
+ export type OpenCodeExecutionEvidenceInput = z.input<typeof opencodeExecutionEvidenceSchema>;
201
+ export declare function buildAgentRuntimeCommandPlan(request: AgentRuntimeCommandPlanRequest, createdAt?: string): AgentRuntimeCommandPlan;
202
+ export declare function buildOpenCodeExecutionEvidence(evidence: OpenCodeExecutionEvidenceInput): OpenCodeExecutionEvidence;
203
+ export declare function buildAgentRuntimeJsonSchemas(): Record<string, unknown>;
204
+ //# sourceMappingURL=agent-runtime-contract.d.ts.map