@sabaiway/agent-workflow-kit 16.1.0 → 18.0.0

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.
@@ -35,19 +35,18 @@ export const VARIANT_LANES = Object.freeze({
35
35
  'source-size.schema-1': LANE_CHAT,
36
36
  'source-size.layout': LANE_CHAT,
37
37
  'gate-hook': LANE_HARNESS,
38
- 'gate-hook.marker-stale': LANE_HARNESS,
38
+ 'gate-hook.not-current': LANE_KIT,
39
39
  'commit-guard': LANE_HARNESS,
40
40
  'hook-checks': LANE_HARNESS,
41
41
  enforcement: LANE_HARNESS,
42
42
  'read-lane': LANE_CHAT,
43
- 'read-lane.stale': LANE_HARNESS,
44
- 'read-lane.missing': LANE_HARNESS,
45
43
  'state-block': LANE_HARNESS,
44
+ 'state-block.not-current': LANE_KIT,
46
45
  'mcp-channel': LANE_HARNESS,
47
46
  'mcp-channel.differing': LANE_HARNESS,
48
47
  agents: LANE_HARNESS,
48
+ 'agents.not-current': LANE_KIT,
49
49
  'executor-vehicle': LANE_HARNESS,
50
- 'executor-vehicle.differing': LANE_KIT,
51
50
  attribution: LANE_HARNESS,
52
51
  'footprint-global': LANE_HARNESS,
53
52
  'family-freshness': LANE_USER,
@@ -93,8 +92,8 @@ export const isProtectedPath = (abs, { root, home, hooksDir }) => {
93
92
 
94
93
  const SETTINGS_WRITES = [SETTINGS_PATH];
95
94
  const LOCAL_SETTINGS_WRITES = [join('.claude', 'settings.local.json')];
96
- const HOOK_WRITES = [join('.claude', 'hooks', 'agent-workflow-gates.mjs'), ...SETTINGS_WRITES];
97
- const STOP_HOOK_WRITES = [join('.claude', 'hooks', 'state-block-guard.mjs'), ...SETTINGS_WRITES];
95
+ const GATE_HOOK_FILE = [join('.claude', 'hooks', 'agent-workflow-gates.mjs')];
96
+ const STOP_HOOK_FILE = [join('.claude', 'hooks', 'state-block-guard.mjs')];
98
97
  const MCP_WRITES = ['.mcp.json', ...SETTINGS_WRITES];
99
98
  const AGENT_WRITES = [join('.claude', 'agents')];
100
99
 
@@ -139,8 +138,8 @@ const createForm = (file, preview, apply, writes, envDependent = false, userStep
139
138
  });
140
139
 
141
140
  const CORE_FORM = createForm('velocity-profile.mjs', ['--cwd', '<root>'], ['--apply', '--cwd', '<root>'], SETTINGS_WRITES);
142
- const HOOK_FORM = createForm('gate-hook.mjs', ['--cwd', '<root>'], ['--apply', '--cwd', '<root>'], HOOK_WRITES);
143
- const RESEED_FORM = createForm('gate-hook.mjs', ['--reseed', '--cwd', '<root>'], ['--apply', '--reseed', '--cwd', '<root>'], HOOK_WRITES);
141
+ // A hook's offer writes its file and the settings entry; its kit item, over a wired hook, the file alone.
142
+ const hookForm = (file, writes) => createForm(file, ['--cwd', '<root>'], ['--apply', '--cwd', '<root>'], writes);
144
143
  const AGENT_FORM = createForm('cheap-agents.mjs', ['--cwd', '<root>'], ['--apply', '--cwd', '<root>'], AGENT_WRITES);
145
144
  const SKILL_FORM = createForm('jev-skill.mjs', ['--claude-dir', '<dir>'], ['--apply', '--claude-dir', '<dir>'], getSkillPaths, true);
146
145
 
@@ -152,18 +151,16 @@ const FORMS = Object.freeze({
152
151
  ['--bridge-tier', '--cwd', '<root>'], ['--apply', '--bridge-tier', '--cwd', '<root>'], SETTINGS_WRITES, true),
153
152
  'autonomy-render': createForm('velocity-profile.mjs',
154
153
  ['--autonomy', '--cwd', '<root>'], ['--autonomy', '--apply', '--cwd', '<root>'], SETTINGS_WRITES),
155
- 'gate-hook': HOOK_FORM,
156
- 'read-lane.missing': HOOK_FORM,
157
- 'gate-hook.marker-stale': RESEED_FORM,
158
- 'read-lane.stale': RESEED_FORM,
159
- 'state-block': createForm('state-block-hook.mjs', ['--cwd', '<root>'], ['--apply', '--cwd', '<root>'], STOP_HOOK_WRITES),
154
+ 'gate-hook': hookForm('gate-hook.mjs', [...GATE_HOOK_FILE, ...SETTINGS_WRITES]),
155
+ 'gate-hook.not-current': hookForm('gate-hook.mjs', GATE_HOOK_FILE),
156
+ 'state-block': hookForm('state-block-hook.mjs', [...STOP_HOOK_FILE, ...SETTINGS_WRITES]),
157
+ 'state-block.not-current': hookForm('state-block-hook.mjs', STOP_HOOK_FILE),
160
158
  'mcp-channel': createForm('mcp.mjs', ['--cwd', '<root>'], ['--apply', '--cwd', '<root>'], MCP_WRITES),
161
159
  'mcp-channel.differing': createForm('mcp.mjs',
162
160
  ['--replace', '--cwd', '<root>'], ['--replace', '--apply', '--cwd', '<root>'], MCP_WRITES),
163
161
  agents: AGENT_FORM,
162
+ 'agents.not-current': AGENT_FORM,
164
163
  'executor-vehicle': AGENT_FORM,
165
- 'executor-vehicle.differing': createForm('cheap-agents.mjs',
166
- ['--executor', '--cwd', '<root>'], ['--apply', '--executor', '--cwd', '<root>'], [join('.claude', 'agents', 'executor.md')]),
167
164
  attribution: createForm('attribution.mjs', ['--cwd', '<root>'], ['--apply', '--cwd', '<root>'], SETTINGS_WRITES),
168
165
  'footprint-global': createForm('hide-footprint.mjs',
169
166
  ['--remove-global', '--dry-run', '--dir', '<root>'], ['--remove-global', '--dir', '<root>'], [], false, null, true),