intentdna 1.5.2 → 1.5.3

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.
@@ -140,6 +140,11 @@ export interface WorkflowStepDef {
140
140
  checkpoints?: StepCheckpoint[];
141
141
  handoff?: StepHandoff;
142
142
  isolation?: "none" | "worktree" | "auto";
143
+ enforce?: {
144
+ read_only?: boolean;
145
+ relax_after_iteration?: number;
146
+ additional_write_paths?: string[];
147
+ };
143
148
  }
144
149
  /** Top-level workflow definition */
145
150
  export interface WorkflowDef {
@@ -272,6 +277,16 @@ export interface HandoffChainEntry {
272
277
  produces?: HandoffArtifact[];
273
278
  consumes?: HandoffArtifact[];
274
279
  }
280
+ /** G4: Step-level enforce rules — state-driven enforcement conditions */
281
+ export interface StepEnforceRule {
282
+ step_id: string;
283
+ /** Make step read-only (block all write tools) */
284
+ read_only?: boolean;
285
+ /** Relax scope enforcement after N iterations (rescue mode) */
286
+ relax_after_iteration?: number;
287
+ /** Additional write paths allowed beyond role scope */
288
+ additional_write_paths?: string[];
289
+ }
275
290
  /** Workflow-partitioned IR — isolates constraints per workflow */
276
291
  export interface WorkflowIR {
277
292
  workflow_name: string;
@@ -279,6 +294,7 @@ export interface WorkflowIR {
279
294
  step_checkpoints: StepCheckpointIR[];
280
295
  active_roles: string[];
281
296
  handoff_chain: HandoffChainEntry[];
297
+ step_enforce_rules?: StepEnforceRule[];
282
298
  }
283
299
  /** Record of artifacts completed by a step — used for cross-session resume */
284
300
  export interface CompletedArtifactEntry {
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "intentdna",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "description": "Intent DNA — Declarative policy layer for AI agent behavior",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "bin": {
9
9
  "dna": "dist/cli/index.js",
10
- "dna-hook": "dist/hooks/cli.js"
10
+ "dna-hook": "dist/hooks/cli.js",
11
+ "dna-mcp": "dist/mcp/index.js"
11
12
  },
12
13
  "scripts": {
13
14
  "build": "tsc && mkdir -p dist/species dist/templates && cp src/species/*.json dist/species/ && cp src/templates/*.yaml dist/templates/ && node scripts/sync-plugin-version.cjs",
@@ -165,11 +165,11 @@ hook 报错时输出人类可读的提示而非 JSON。`dna verify` 输出友好
165
165
  - [ ] 测试覆盖所有修复
166
166
 
167
167
  ### 第二阶段
168
- - [ ] .dna/state/sessions/{id}/ 目录结构
169
- - [ ] MCP server 提供 state_read/write/trace_query
170
- - [ ] MCP server 提供 compile/sync/generate
171
- - [ ] enforce 支持 WorkflowState 条件规则
172
- - [ ] 远程通信架构预留(接口定义,不实现)
168
+ - [x] .dna/state/sessions/{id}/ 目录结构
169
+ - [x] MCP server 提供 state_read/write/trace_query
170
+ - [x] MCP server 提供 compile/sync/generate
171
+ - [x] enforce 支持 WorkflowState 条件规则
172
+ - [x] 远程通信架构预留(接口定义,不实现)
173
173
 
174
174
  ### 第三阶段
175
175
  - [ ] dna sync 自动检测模板版本 + 提示升级