yadflow 4.10.0 → 4.12.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.
- package/CHANGELOG.md +152 -0
- package/README.md +14 -3
- package/bin/commands.mjs +7 -1
- package/bin/yad.mjs +163 -16
- package/cli/agent-guard-worker.mjs +13 -0
- package/cli/agent-guard.mjs +1053 -57
- package/cli/agent-rules.mjs +59 -3
- package/cli/argv-flags.mjs +2 -2
- package/cli/brain/vendor/LICENSE-graphology-library.txt +21 -0
- package/cli/brain/vendor/LICENSE-graphology.txt +21 -0
- package/cli/brain/vendor/LICENSE-sigma.txt +12 -0
- package/cli/brain/vendor/graphology-library.min.js +2 -0
- package/cli/brain/vendor/graphology.umd.min.js +2 -0
- package/cli/brain/vendor/sigma.min.js +1369 -0
- package/cli/brain/view/app.js +382 -0
- package/cli/brain/view/index.html +63 -0
- package/cli/brain/view/live.css +228 -0
- package/cli/brain/view/live.html +110 -0
- package/cli/brain/view/live.js +884 -0
- package/cli/brain/view/style.css +141 -0
- package/cli/brain-about.mjs +206 -0
- package/cli/brain-activity.mjs +285 -0
- package/cli/brain-skills.mjs +118 -0
- package/cli/brain-vendor.mjs +71 -0
- package/cli/brain-view.mjs +345 -0
- package/cli/brain.mjs +810 -0
- package/cli/brand-cmd.mjs +326 -0
- package/cli/brand.mjs +327 -0
- package/cli/ci-check.mjs +3 -3
- package/cli/doctor.mjs +145 -14
- package/cli/epic-state.mjs +93 -1
- package/cli/epic.mjs +15 -3
- package/cli/errors.mjs +2 -1
- package/cli/find-product.mjs +69 -15
- package/cli/foundation-publish.mjs +256 -0
- package/cli/gate.mjs +29 -3
- package/cli/git-read.mjs +38 -0
- package/cli/guard-stream.mjs +409 -0
- package/cli/guide.mjs +26 -3
- package/cli/hook.mjs +59 -9
- package/cli/issues-act.mjs +57 -13
- package/cli/issues-write.mjs +19 -6
- package/cli/issues.mjs +69 -24
- package/cli/lib.mjs +37 -2
- package/cli/local-page.mjs +138 -0
- package/cli/local-setup-record.mjs +71 -0
- package/cli/local-setup-steps.mjs +186 -0
- package/cli/local-setup.mjs +611 -0
- package/cli/machine.mjs +1 -1
- package/cli/manifest.mjs +55 -0
- package/cli/map/view/app.js +712 -0
- package/cli/map/view/index.html +50 -0
- package/cli/map/view/style.css +142 -0
- package/cli/map-view.mjs +190 -0
- package/cli/map.mjs +637 -0
- package/cli/members.mjs +9 -15
- package/cli/next.mjs +1 -1
- package/cli/openpr.mjs +2 -2
- package/cli/plain-text.mjs +22 -0
- package/cli/plan.mjs +310 -36
- package/cli/platform.mjs +5 -5
- package/cli/product-index.mjs +1 -1
- package/cli/protection.mjs +32 -0
- package/cli/reconcile.mjs +61 -13
- package/cli/report.mjs +9 -3
- package/cli/reports-dir.mjs +393 -0
- package/cli/reports.mjs +65 -0
- package/cli/run-checks.mjs +5 -2
- package/cli/scan.mjs +4 -6
- package/cli/secret-text.mjs +66 -0
- package/cli/setup.mjs +54 -8
- package/cli/standup.mjs +94 -72
- package/cli/status.mjs +6 -5
- package/cli/test-agents-file.mjs +614 -8
- package/cli/test-brain-activity.mjs +753 -0
- package/cli/test-brain-view.mjs +381 -0
- package/cli/test-brain.mjs +795 -0
- package/cli/test-brand.mjs +558 -0
- package/cli/test-guide.mjs +438 -0
- package/cli/test-local-setup.mjs +1188 -0
- package/cli/test-machine.mjs +59 -0
- package/cli/test-map.mjs +615 -0
- package/cli/test-reports.mjs +382 -0
- package/cli/test-run-checks.mjs +4 -0
- package/cli/test-worktree.mjs +24 -3
- package/cli/toolbox-connect.mjs +21 -6
- package/cli/toolbox.mjs +74 -5
- package/cli/update-commit.mjs +118 -9
- package/cli/usage.mjs +17 -7
- package/cli/workspace.mjs +11 -2
- package/package.json +8 -4
- package/skills/sdlc/module-help.csv +1 -0
- package/skills/yad-architecture/SKILL.md +22 -4
- package/skills/yad-brand/SKILL.md +69 -0
- package/skills/yad-change/SKILL.md +3 -1
- package/skills/yad-change/references/triage.md +2 -0
- package/skills/yad-checks/SKILL.md +2 -0
- package/skills/yad-checks/references/check-gates.md +8 -5
- package/skills/yad-checks/templates/checks/build-test-lint.sh +7 -0
- package/skills/yad-checks/templates/checks/install-deps.sh +6 -0
- package/skills/yad-checks/templates/checks/package-manager.sh +42 -0
- package/skills/yad-checks/templates/github/yad-checks.yml +3 -2
- package/skills/yad-checks/templates/gitlab/yad-checks.gitlab-ci.yml +3 -2
- package/skills/yad-checks/templates/hooks/local-setup-notice.mjs +96 -0
- package/skills/yad-checks/templates/hooks/yad-activity.mjs +238 -0
- package/skills/yad-connect-repos/SKILL.md +14 -0
- package/skills/yad-discovery/SKILL.md +11 -0
- package/skills/yad-discovery/references/foundation-schema.md +11 -0
- package/skills/yad-docs/templates/app/package-lock.json +18 -10
- package/skills/yad-docs/templates/app/package.json +6 -1
- package/skills/yad-epic/SKILL.md +3 -0
- package/skills/yad-epic/references/state-schema.md +35 -1
- package/skills/yad-guide/SKILL.md +10 -7
- package/skills/yad-implement/SKILL.md +76 -15
- package/skills/yad-issues/SKILL.md +2 -1
- package/skills/yad-pr-template/templates/checks/pr-template.sh +8 -4
- package/skills/yad-pr-template/templates/checks/pr-title.sh +8 -4
- package/skills/yad-spec/SKILL.md +19 -0
- package/skills/yad-stories/SKILL.md +22 -4
- package/skills/yad-stories/references/story-schema.md +1 -1
package/cli/test-machine.mjs
CHANGED
|
@@ -138,3 +138,62 @@ test('#352: a repo that names no pin and no Docker adds no rows, and Docker is n
|
|
|
138
138
|
assert.equal(asked, 0, 'docker is not asked about');
|
|
139
139
|
} finally { done(T); }
|
|
140
140
|
});
|
|
141
|
+
|
|
142
|
+
// #509 — glab's own words with two config files, as glab 1.125.0 prints them on stderr.
|
|
143
|
+
const GLAB_WARNING = [
|
|
144
|
+
'Warning: Multiple config files found. Only the first one will be used.',
|
|
145
|
+
' Using: /home/me/.config/glab-cli/config.yml',
|
|
146
|
+
' Ignoring: /home/me/Library/Application Support/glab-cli/config.yml',
|
|
147
|
+
'Consider consolidating to one location to avoid confusion.',
|
|
148
|
+
].join('\n');
|
|
149
|
+
const GLAB_401 = 'ERROR\n 1 error occurred:\n * g/p: GET https://gitlab.example/api/v4/projects/g%2Fp: 401\n {message: 401 Unauthorized}';
|
|
150
|
+
|
|
151
|
+
test('#509: glab\'s two-config warning is dropped from what yad reads; a failed run is led by one line that names it', async () => {
|
|
152
|
+
const { withoutGlabConfigWarning } = await import('./lib.mjs');
|
|
153
|
+
assert.equal(withoutGlabConfigWarning(GLAB_WARNING), '', 'a run that worked: nothing left');
|
|
154
|
+
assert.equal(withoutGlabConfigWarning(`${GLAB_WARNING}\nsome note`), 'some note', 'other stderr is kept');
|
|
155
|
+
assert.equal(withoutGlabConfigWarning(GLAB_401, { ok: false }), GLAB_401, 'no warning: unchanged, no hint');
|
|
156
|
+
assert.equal(withoutGlabConfigWarning('Warning: something else'), 'Warning: something else', 'only that exact block');
|
|
157
|
+
const failed = withoutGlabConfigWarning(`${GLAB_WARNING}\n${GLAB_401}`, { ok: false });
|
|
158
|
+
assert.equal(failed, `glab reads only one of its two config files, so a login saved in the other is not used (see \`yad doctor\`, glab-config) — ${GLAB_401}`,
|
|
159
|
+
'the real error, whole, on the hint\'s own line: a caller that shows only the first line still shows it');
|
|
160
|
+
assert.equal(withoutGlabConfigWarning(GLAB_WARNING, { ok: false }).includes('—'), false, 'nothing else: the hint alone');
|
|
161
|
+
assert.ok(!/Multiple config files|Using:|Ignoring:|Consider consolidating/.test(failed));
|
|
162
|
+
// Windows line ends: the same block is found.
|
|
163
|
+
assert.equal(withoutGlabConfigWarning(`${GLAB_WARNING.replaceAll('\n', '\r\n')}\r\nsome note`), 'some note');
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
// A fake glab on PATH: the warning on stderr, then `body` (shell). Not on Windows (a shell script).
|
|
167
|
+
const withFakeGlab = async (body, fn) => {
|
|
168
|
+
const T = tmp();
|
|
169
|
+
const bin = path.join(T, 'bin');
|
|
170
|
+
fs.mkdirSync(bin);
|
|
171
|
+
fs.writeFileSync(path.join(bin, 'glab'), `#!/bin/sh\ncat >&2 <<'W'\n${GLAB_WARNING}\nW\n${body}\n`, { mode: 0o755 });
|
|
172
|
+
const before = process.env.PATH;
|
|
173
|
+
process.env.PATH = `${bin}${path.delimiter}${before}`;
|
|
174
|
+
try { return await fn(T); } finally { process.env.PATH = before; done(T); }
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
test('#509: an MR glab opened with the warning on stderr is opened, and its address is read past any trailing notice', { skip: process.platform === 'win32' }, async () => {
|
|
178
|
+
const { run } = await import('./lib.mjs');
|
|
179
|
+
const { createPr } = await import('./platform.mjs');
|
|
180
|
+
await withFakeGlab("echo 'Creating merge request for x into main in g/p'\necho\necho 'https://gitlab.example/g/p/-/merge_requests/7'\necho 'A newer glab is available'\nexit 0", () => {
|
|
181
|
+
const r = run('glab', ['version']);
|
|
182
|
+
assert.equal(r.ok, true);
|
|
183
|
+
assert.equal(r.stderr, '', 'the warning is not read');
|
|
184
|
+
const pr = createPr('gitlab', { title: 't', body: 'b', base: 'main', head: 'x' });
|
|
185
|
+
assert.equal(pr.ok, true);
|
|
186
|
+
assert.equal(pr.url, 'https://gitlab.example/g/p/-/merge_requests/7');
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
test('#509: an MR glab could not open says glab\'s real error, led by the two-config line', { skip: process.platform === 'win32' }, async () => {
|
|
191
|
+
const { createPr } = await import('./platform.mjs');
|
|
192
|
+
await withFakeGlab(`cat >&2 <<'E'\n${GLAB_401}\nE\nexit 1`, () => {
|
|
193
|
+
const pr = createPr('gitlab', { title: 't', body: 'b', base: 'main', head: 'x' });
|
|
194
|
+
assert.equal(pr.ok, false);
|
|
195
|
+
assert.match(pr.reason, /^glab reads only one of its two config files/);
|
|
196
|
+
assert.match(pr.reason, /401 Unauthorized/);
|
|
197
|
+
assert.doesNotMatch(pr.reason, /Multiple config files/);
|
|
198
|
+
});
|
|
199
|
+
});
|