@ikon85/agent-workflow-kit 0.29.0 → 0.29.1
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/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikon85/agent-workflow-kit",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.1",
|
|
4
4
|
"description": "Portable AI-agent workflow skills (plan → execute → land → learn) for Claude Code & Codex — grilling, TDD, diagnosis, two-axis code review, cross-model Codex review, design & domain-modeling, plus a skill router (ask-matt). npx init/update/diff/uninstall.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { test } from 'node:test';
|
|
2
2
|
import assert from 'node:assert/strict';
|
|
3
|
-
import { readFile } from 'node:fs/promises';
|
|
3
|
+
import { copyFile, mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises';
|
|
4
|
+
import { execFileSync } from 'node:child_process';
|
|
5
|
+
import { randomUUID } from 'node:crypto';
|
|
4
6
|
import { dirname, join } from 'node:path';
|
|
7
|
+
import { tmpdir } from 'node:os';
|
|
5
8
|
import { fileURLToPath } from 'node:url';
|
|
6
9
|
import {
|
|
7
10
|
createCommandAdapter, githubReleaseArgs, inspectRelease, isMissingRelease,
|
|
@@ -50,6 +53,55 @@ test('post-merge status inspection is read-only and reports the reconstructable
|
|
|
50
53
|
assert.deepEqual(fixture.events, ['read npm', 'read github']);
|
|
51
54
|
});
|
|
52
55
|
|
|
56
|
+
test('local Claude overrides cannot change the packed release identity or enter the tarball', async () => {
|
|
57
|
+
const fixture = await mkdtemp(join(tmpdir(), 'awkit-local-overrides-'));
|
|
58
|
+
await mkdir(join(fixture, '.claude'), { recursive: true });
|
|
59
|
+
await Promise.all([
|
|
60
|
+
['package.json', 'package.json'],
|
|
61
|
+
['agent-workflow-kit.package.json', 'agent-workflow-kit.package.json'],
|
|
62
|
+
['.claude/.npmignore', '.claude/.npmignore'],
|
|
63
|
+
].map(([source, destination]) => copyFile(join(REPO, source), join(fixture, destination))));
|
|
64
|
+
await writeFile(join(fixture, '.claude/shipped.json'), '{"shipped":true}\n');
|
|
65
|
+
|
|
66
|
+
const overrides = [
|
|
67
|
+
['.claude/settings.local.json', randomUUID()],
|
|
68
|
+
['.claude/settings.local.json.backup', randomUUID()],
|
|
69
|
+
];
|
|
70
|
+
|
|
71
|
+
const clean = await createCommandAdapter({ repoRoot: fixture });
|
|
72
|
+
const local = await createCommandAdapter({ repoRoot: fixture });
|
|
73
|
+
try {
|
|
74
|
+
const { identity: publishedIdentity } = await clean.local();
|
|
75
|
+
for (const [path, canary] of overrides) {
|
|
76
|
+
await writeFile(join(fixture, path), `${canary}\n`);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const { identity, tarball } = await local.local();
|
|
80
|
+
assert.deepEqual(identity, publishedIdentity);
|
|
81
|
+
assert.deepEqual(await inspectRelease({
|
|
82
|
+
local: async () => ({ identity, tarball }),
|
|
83
|
+
npm: async () => publishedIdentity,
|
|
84
|
+
github: async () => publishedIdentity,
|
|
85
|
+
}), { status: 'released', identity: publishedIdentity });
|
|
86
|
+
|
|
87
|
+
const paths = new Set(
|
|
88
|
+
execFileSync('tar', ['-tzf', tarball], { encoding: 'utf8' })
|
|
89
|
+
.trim().split('\n').map((path) => path.replace(/^package\//, '')),
|
|
90
|
+
);
|
|
91
|
+
assert.ok(paths.has('.claude/shipped.json'));
|
|
92
|
+
const contents = execFileSync('tar', ['-xOzf', tarball], {
|
|
93
|
+
encoding: 'utf8', maxBuffer: 16 * 1024 * 1024,
|
|
94
|
+
});
|
|
95
|
+
for (const [path, canary] of overrides) {
|
|
96
|
+
assert.ok(!paths.has(path), `packed local override: ${path}`);
|
|
97
|
+
assert.doesNotMatch(contents, new RegExp(canary));
|
|
98
|
+
}
|
|
99
|
+
} finally {
|
|
100
|
+
await Promise.all([clean.dispose(), local.dispose()]);
|
|
101
|
+
await rm(fixture, { recursive: true, force: true });
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
|
|
53
105
|
test('an unpublished npm version is reconstructable when npm reports ETARGET', () => {
|
|
54
106
|
assert.equal(isMissingRelease({
|
|
55
107
|
stderr: 'npm error code ETARGET\nnpm error notarget No matching version found',
|