intentdna 1.5.10 → 1.5.11

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.
@@ -9,7 +9,7 @@
9
9
  {
10
10
  "name": "intentdna",
11
11
  "description": "DNA template compilation + runtime enforcement",
12
- "version": "1.5.10",
12
+ "version": "1.5.11",
13
13
  "source": "./"
14
14
  }
15
15
  ]
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "intentdna",
3
- "version": "1.5.10",
3
+ "version": "1.5.11",
4
4
  "description": "Declarative policy layer for AI agent governance"
5
5
  }
package/dist/cli/index.js CHANGED
File without changes
package/dist/hooks/cli.js CHANGED
@@ -83,7 +83,9 @@ async function main() {
83
83
  const rawInput = await readStdin(5000);
84
84
  // Resolve project directory from input or cwd
85
85
  const projectDir = typeof rawInput.cwd === "string" ? rawInput.cwd : process.cwd();
86
- const sessionId = typeof rawInput.sessionId === "string" ? rawInput.sessionId : undefined;
86
+ const sessionId = typeof rawInput.session_id === "string" ? rawInput.session_id
87
+ : typeof rawInput.sessionId === "string" ? rawInput.sessionId
88
+ : undefined;
87
89
  // Load compiled IR
88
90
  const resolvedIRPath = resolve(projectDir, irPath);
89
91
  const ir = await loadIR(resolvedIRPath);
@@ -213,7 +215,9 @@ async function main() {
213
215
  workflow: state.workflowState?.workflow,
214
216
  step: state.workflowState?.current_step,
215
217
  decision: decision,
216
- reason: decision !== "allow" ? output.reason : undefined,
218
+ reason: decision !== "allow"
219
+ ? (output.reason ?? output.hookSpecificOutput?.additionalContext)
220
+ : undefined,
217
221
  target_path: decision !== "allow" ? targetPath : undefined,
218
222
  duration_ms: durationMs,
219
223
  timestamp: new Date().toISOString(),
@@ -243,7 +247,8 @@ function dispatch(event, ir, input, state) {
243
247
  tool_input: (input.tool_input ?? {}),
244
248
  agent_type: typeof input.agent_type === "string" ? input.agent_type : undefined,
245
249
  cwd: typeof input.cwd === "string" ? input.cwd : undefined,
246
- sessionId: typeof input.sessionId === "string" ? input.sessionId : undefined,
250
+ sessionId: typeof input.session_id === "string" ? input.session_id
251
+ : typeof input.sessionId === "string" ? input.sessionId : undefined,
247
252
  }, state);
248
253
  case "PostToolUse":
249
254
  return enforcePostToolUse(ir, {
@@ -277,7 +282,8 @@ function dispatch(event, ir, input, state) {
277
282
  case "SessionStart":
278
283
  return enforceSessionStart(ir, {
279
284
  cwd: typeof input.cwd === "string" ? input.cwd : undefined,
280
- session_id: typeof input.sessionId === "string" ? input.sessionId : undefined,
285
+ session_id: typeof input.session_id === "string" ? input.session_id
286
+ : typeof input.sessionId === "string" ? input.sessionId : undefined,
281
287
  trigger: typeof input.trigger === "string" ? input.trigger : undefined,
282
288
  });
283
289
  default:
package/dist/mcp/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intentdna",
3
- "version": "1.5.10",
3
+ "version": "1.5.11",
4
4
  "description": "Intent DNA — Declarative policy layer for AI agent behavior",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",