@sabaiway/agent-workflow-kit 14.33.0 → 14.35.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.
@@ -3,6 +3,10 @@ import { dirCovers } from './declared-paths.mjs';
3
3
  import { claudeDirOf, quoteArg, skillTargets } from './jev-facts.mjs';
4
4
  import { targetsFor } from './jev-connect.mjs';
5
5
  import { BUNDLED_SCRIPT_NAMES, INSTALLER_REL, SCRIPTS_REL } from './git-hooks.mjs';
6
+ import { dqUnsafePath } from './checker-claim.mjs';
7
+ import { isLineUnsafe } from './source-size-refusal.mjs';
8
+ import { SOURCE_SIZE_GATE_ID } from './source-size-gate-cmd.mjs';
9
+ import { GATES_REL } from './gates-declaration.mjs';
6
10
 
7
11
  export const LANE_CHAT = 'chat';
8
12
  export const LANE_HARNESS = 'harness';
@@ -16,16 +20,17 @@ export const VARIANT_LANES = Object.freeze({
16
20
  'autonomy-render': LANE_HARNESS,
17
21
  'sandbox-provision': LANE_USER,
18
22
  'sandbox-provision.installable': LANE_USER,
19
- 'review-recipe': LANE_CHAT,
23
+ 'review-recipe': LANE_USER,
20
24
  'gates-declaration': LANE_CHAT,
21
25
  'gates-inert': LANE_CHAT,
26
+ 'gates-inert.unfillable': LANE_USER,
22
27
  'gates-inert.no-verification': LANE_CHAT,
23
- 'gates-inert.producer-unrecognized': LANE_CHAT,
28
+ 'gates-inert.producer-unrecognized': LANE_USER,
24
29
  'gates-inert.coverage-domain-narrow': LANE_CHAT,
25
30
  'source-size': LANE_CHAT,
26
31
  'source-size.unminted': LANE_CHAT,
27
32
  'source-size.adopted-elsewhere': LANE_CHAT,
28
- 'source-size.id-squatter': LANE_CHAT,
33
+ 'source-size.id-squatter': LANE_USER,
29
34
  'gate-hook': LANE_HARNESS,
30
35
  'gate-hook.marker-stale': LANE_HARNESS,
31
36
  'commit-guard': LANE_HARNESS,
@@ -38,6 +43,9 @@ export const VARIANT_LANES = Object.freeze({
38
43
  'mcp-channel.differing': LANE_HARNESS,
39
44
  agents: LANE_HARNESS,
40
45
  'executor-vehicle': LANE_HARNESS,
46
+ 'executor-vehicle.differing': LANE_HARNESS,
47
+ attribution: LANE_HARNESS,
48
+ 'footprint-global': LANE_HARNESS,
41
49
  'family-freshness': LANE_USER,
42
50
  'adr-store-migration': LANE_CHAT,
43
51
  'sandbox-masks': LANE_CHAT,
@@ -106,6 +114,15 @@ const getGuardPaths = (facts) => [preCommitOf(facts), join(facts.root, INSTALLER
106
114
 
107
115
  const formatCommand = (argv) => argv.map(quoteArg).join(' ');
108
116
  const TERMINAL_STEP = 'run in a terminal of your own: ';
117
+ const OWN_STEP = 'your own step — ';
118
+ const RERUN_ADVISOR = ', then run /agent-workflow-kit recommendations';
119
+
120
+ const squatterStep = (facts) => {
121
+ const tool = join(facts.toolsDir, 'source-size-check.mjs');
122
+ const rename = `${OWN_STEP}in ${GATES_REL} rename the "${SOURCE_SIZE_GATE_ID}" gate to an id of its own`;
123
+ if (dqUnsafePath(tool) || isLineUnsafe(tool)) return `${rename}${RERUN_ADVISOR}`;
124
+ return `${rename}, or repoint its cmd at node "${tool}" --check${RERUN_ADVISOR}`;
125
+ };
109
126
 
110
127
  // rejudged: the written value derives from state init's record does not watch, so init re-runs its check before the apply.
111
128
  const createForm = (file, preview, apply, writes, envDependent = false, userStep = null, rejudged = false) => Object.freeze({
@@ -142,19 +159,23 @@ const FORMS = Object.freeze({
142
159
  ['--replace', '--cwd', '<root>'], ['--replace', '--apply', '--cwd', '<root>'], MCP_WRITES),
143
160
  agents: AGENT_FORM,
144
161
  'executor-vehicle': AGENT_FORM,
162
+ 'executor-vehicle.differing': AGENT_FORM,
163
+ attribution: createForm('attribution.mjs', ['--cwd', '<root>'], ['--apply', '--cwd', '<root>'], SETTINGS_WRITES),
164
+ 'footprint-global': createForm('hide-footprint.mjs',
165
+ ['--remove-global', '--dry-run', '--dir', '<root>'], ['--remove-global', '--dir', '<root>'], [], false, null, true),
145
166
  'sandbox-provision.installable': createForm('autonomy-doctor.mjs', [], ['--apply', '<tuple>'], [], true,
146
167
  (facts, argv) => 'your own step (a sudo install; the doctor prints the --apply line to run next) — '
147
168
  + `${TERMINAL_STEP}cd ${quoteArg(facts.root)} && ${formatCommand(argv.preview)}`),
148
169
  'jev-skill': SKILL_FORM,
149
170
  'jev-skill.earlier': SKILL_FORM,
150
171
  'jev-connect': createForm('jev-connect.mjs', null, [], getStartupPaths, true,
151
- (facts, argv) => 'your own step — it asks for the key in your terminal and the key never goes into the chat — '
172
+ (facts, argv) => `${OWN_STEP}it asks for the key in your terminal and the key never goes into the chat — `
152
173
  + `${TERMINAL_STEP}${formatCommand(argv.apply)}`),
153
174
  'family-freshness': Object.freeze({
154
- userStep: () => `your own step — ${TERMINAL_STEP}${formatCommand(['npx', '@sabaiway/agent-workflow-kit@latest', 'init'])}`,
175
+ userStep: () => `${OWN_STEP}${TERMINAL_STEP}${formatCommand(['npx', '@sabaiway/agent-workflow-kit@latest', 'init'])}`,
155
176
  }),
156
177
  'sandbox-provision': Object.freeze({
157
- userStep: (facts) => 'your own step — the doctor has no install it can run for you here (the reason is this item\'s text) — '
178
+ userStep: (facts) => `${OWN_STEP}the doctor has no install it can run for you here (the reason is this item's text) — `
158
179
  + `${TERMINAL_STEP}cd ${quoteArg(facts.root)} && ${formatCommand(['node', join(facts.toolsDir, 'autonomy-doctor.mjs')])}`,
159
180
  }),
160
181
  enforcement: createForm('git-hooks.mjs',
@@ -164,7 +185,21 @@ const FORMS = Object.freeze({
164
185
  'worktrees-dir': createForm('velocity-profile.mjs',
165
186
  ['--worktrees', '--cwd', '<root>'], ['--apply', '--worktrees', '--cwd', '<root>'], LOCAL_SETTINGS_WRITES, false, null, true),
166
187
  'worktrees-dir.home': Object.freeze({
167
- userStep: () => 'your own step — point docs/ai/worktrees.json parentDir at a dedicated directory, then run /agent-workflow-kit recommendations',
188
+ userStep: () => `${OWN_STEP}point docs/ai/worktrees.json parentDir at a dedicated directory${RERUN_ADVISOR}`,
189
+ }),
190
+ 'gates-inert.unfillable': Object.freeze({
191
+ userStep: () => `${OWN_STEP}in ${GATES_REL} declare or move a suite gate carrying the coverage reporters before the coverage checker`
192
+ + ` (references/modes/gates.md names the exact form), or drop that checker${RERUN_ADVISOR}`,
193
+ }),
194
+ 'gates-inert.producer-unrecognized': Object.freeze({
195
+ userStep: () => `${OWN_STEP}in ${GATES_REL} mark the gate that writes the lcov with "lcovProducer": true`
196
+ + ` (references/modes/gates.md names the key), or drop the coverage checker${RERUN_ADVISOR}`,
197
+ }),
198
+ 'source-size.id-squatter': Object.freeze({ userStep: squatterStep }),
199
+ 'review-recipe': Object.freeze({
200
+ userStep: () => `${OWN_STEP}set up the backend the recipe names with /agent-workflow-kit setup (it places the bridge skill`
201
+ + ' and links its wrappers, and names the CLI install and sign-in that stay yours; /agent-workflow-kit backends shows what is'
202
+ + ` missing), or re-pick the recipe with /agent-workflow-kit set-recipe${RERUN_ADVISOR}`,
168
203
  }),
169
204
  });
170
205