intentdna 1.4.1 → 1.4.2

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.
@@ -1,12 +1,16 @@
1
1
  {
2
2
  "name": "intentdna",
3
- "description": "Declarative policy layer for AI agent governance — compile DNA templates to hooks, agents, and constraints",
3
+ "description": "Declarative policy layer for AI agent governance",
4
+ "owner": {
5
+ "name": "Samuel",
6
+ "email": "wanglushan3344@gmail.com"
7
+ },
4
8
  "plugins": [
5
9
  {
6
10
  "name": "intentdna",
7
11
  "description": "DNA template compilation + runtime enforcement",
8
- "version": "1.4.0",
9
- "source": "./"
12
+ "version": "1.4.1",
13
+ "source": "./.claude-plugin"
10
14
  }
11
15
  ]
12
16
  }
@@ -187,7 +187,7 @@ export function enforceSessionStart(ir, input) {
187
187
  if (stats.length > 0) {
188
188
  lines.push(` Enforcement: ${stats.join(", ")}`);
189
189
  }
190
- return allowOutput(lines.join("\n"));
190
+ return allowOutput(lines.join("\n"), "SessionStart");
191
191
  }
192
192
  /**
193
193
  * Enforce Stop hook — verify workflow checkpoint completion.
@@ -55,7 +55,7 @@ export interface HookOutput {
55
55
  };
56
56
  }
57
57
  /** Create an allow output, optionally injecting text into the conversation. */
58
- export declare function allowOutput(additionalContext?: string): HookOutput;
58
+ export declare function allowOutput(additionalContext?: string, hookEventName?: string): HookOutput;
59
59
  /** Create a block output with reason. */
60
60
  export declare function blockOutput(reason: string): HookOutput;
61
61
  /** Create an escalate output (ask user for permission). */
@@ -8,11 +8,14 @@
8
8
  */
9
9
  // ── Output Helpers ─────────────────────────────────────────
10
10
  /** Create an allow output, optionally injecting text into the conversation. */
11
- export function allowOutput(additionalContext) {
11
+ export function allowOutput(additionalContext, hookEventName) {
12
12
  if (additionalContext) {
13
13
  return {
14
14
  continue: true,
15
- hookSpecificOutput: { additionalContext },
15
+ hookSpecificOutput: {
16
+ ...(hookEventName ? { hookEventName } : {}),
17
+ additionalContext,
18
+ },
16
19
  };
17
20
  }
18
21
  return { continue: true };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intentdna",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Intent DNA — Declarative policy layer for AI agent behavior",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",