agentic-workflow-manager 2.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.
- package/README.md +62 -0
- package/dist/src/commands/doctor.js +77 -0
- package/dist/src/commands/hooks/index.js +118 -0
- package/dist/src/commands/hooks/install.js +113 -0
- package/dist/src/commands/hooks/resync.js +50 -0
- package/dist/src/commands/hooks/status.js +74 -0
- package/dist/src/commands/hooks/uninstall.js +59 -0
- package/dist/src/commands/init.js +181 -0
- package/dist/src/commands/ledger/index.js +73 -0
- package/dist/src/commands/pin.js +75 -0
- package/dist/src/commands/registry/add.js +62 -0
- package/dist/src/commands/registry/index.js +166 -0
- package/dist/src/commands/registry/install-bundles.js +36 -0
- package/dist/src/commands/registry/remove.js +18 -0
- package/dist/src/commands/registry/status.js +31 -0
- package/dist/src/commands/sensors/baseline.js +93 -0
- package/dist/src/commands/sensors/formatters/eslint.js +29 -0
- package/dist/src/commands/sensors/formatters/generic.js +8 -0
- package/dist/src/commands/sensors/formatters/semgrep.js +18 -0
- package/dist/src/commands/sensors/formatters/test.js +12 -0
- package/dist/src/commands/sensors/formatters/tsc.js +23 -0
- package/dist/src/commands/sensors/index.js +94 -0
- package/dist/src/commands/sensors/init.js +112 -0
- package/dist/src/commands/sensors/install.js +78 -0
- package/dist/src/commands/sensors/run.js +217 -0
- package/dist/src/commands/sensors/status.js +85 -0
- package/dist/src/commands/sensors/types.js +2 -0
- package/dist/src/core/bundle-install.js +116 -0
- package/dist/src/core/bundles.js +122 -0
- package/dist/src/core/cli-version.js +30 -0
- package/dist/src/core/context/materializer.js +30 -0
- package/dist/src/core/context/orchestrator.js +75 -0
- package/dist/src/core/context/project-constitution-inject.js +47 -0
- package/dist/src/core/context/provider.js +29 -0
- package/dist/src/core/context/regenerate.js +61 -0
- package/dist/src/core/context/strategies/config-instructions.js +73 -0
- package/dist/src/core/context/strategies/hook-merge.js +23 -0
- package/dist/src/core/context/strategies/strategy.js +2 -0
- package/dist/src/core/context/types.js +2 -0
- package/dist/src/core/diagnostics/checks.js +141 -0
- package/dist/src/core/diagnostics/context.js +181 -0
- package/dist/src/core/diagnostics/types.js +2 -0
- package/dist/src/core/discovery.js +135 -0
- package/dist/src/core/executor.js +41 -0
- package/dist/src/core/init/detector.js +67 -0
- package/dist/src/core/init/orchestrator.js +54 -0
- package/dist/src/core/init/steps.js +279 -0
- package/dist/src/core/init/types.js +2 -0
- package/dist/src/core/ledger/store.js +73 -0
- package/dist/src/core/ledger/types.js +2 -0
- package/dist/src/core/miro.js +314 -0
- package/dist/src/core/profile-pins.js +36 -0
- package/dist/src/core/profile.js +146 -0
- package/dist/src/core/registries.js +205 -0
- package/dist/src/core/registry.js +28 -0
- package/dist/src/core/skill-integrity.js +97 -0
- package/dist/src/core/story-map-parser.js +83 -0
- package/dist/src/core/update-check-worker.js +10 -0
- package/dist/src/core/update-check.js +106 -0
- package/dist/src/core/versioning.js +112 -0
- package/dist/src/index.js +689 -0
- package/dist/src/providers/index.js +63 -0
- package/dist/src/utils/config.js +35 -0
- package/dist/src/utils/grouping.js +51 -0
- package/dist/src/utils/registry-view.js +154 -0
- package/dist/tests/commands/doctor.test.js +98 -0
- package/dist/tests/commands/hooks/install.test.js +149 -0
- package/dist/tests/commands/hooks/resync.test.js +135 -0
- package/dist/tests/commands/hooks/router.test.js +26 -0
- package/dist/tests/commands/hooks/status.test.js +88 -0
- package/dist/tests/commands/hooks/uninstall.test.js +104 -0
- package/dist/tests/commands/init.test.js +87 -0
- package/dist/tests/commands/ledger/index.test.js +64 -0
- package/dist/tests/commands/pin.test.js +72 -0
- package/dist/tests/commands/registry/add.test.js +223 -0
- package/dist/tests/commands/registry/install-bundles.test.js +87 -0
- package/dist/tests/commands/registry/remove.test.js +49 -0
- package/dist/tests/commands/registry/status.test.js +43 -0
- package/dist/tests/commands/sensors/baseline.test.js +106 -0
- package/dist/tests/commands/sensors/formatters/eslint.test.js +32 -0
- package/dist/tests/commands/sensors/formatters/semgrep.test.js +38 -0
- package/dist/tests/commands/sensors/formatters/tsc.test.js +25 -0
- package/dist/tests/commands/sensors/index.test.js +18 -0
- package/dist/tests/commands/sensors/init.test.js +137 -0
- package/dist/tests/commands/sensors/install.test.js +60 -0
- package/dist/tests/commands/sensors/router.test.js +23 -0
- package/dist/tests/commands/sensors/run.test.js +353 -0
- package/dist/tests/commands/sensors/status.test.js +98 -0
- package/dist/tests/core/base-remote.test.js +70 -0
- package/dist/tests/core/bundle-install.test.js +198 -0
- package/dist/tests/core/bundles-multiroot.test.js +68 -0
- package/dist/tests/core/bundles-overrides.test.js +49 -0
- package/dist/tests/core/bundles.test.js +96 -0
- package/dist/tests/core/cli-version.test.js +17 -0
- package/dist/tests/core/context/materializer.test.js +46 -0
- package/dist/tests/core/context/orchestrator.test.js +127 -0
- package/dist/tests/core/context/project-constitution-inject.test.js +82 -0
- package/dist/tests/core/context/provider.test.js +45 -0
- package/dist/tests/core/context/regenerate.test.js +106 -0
- package/dist/tests/core/context/strategies/config-instructions.test.js +88 -0
- package/dist/tests/core/context/strategies/hook-merge.test.js +71 -0
- package/dist/tests/core/context/types.test.js +15 -0
- package/dist/tests/core/diagnostics/checks.test.js +208 -0
- package/dist/tests/core/diagnostics/context.test.js +170 -0
- package/dist/tests/core/discovery-multiroot.test.js +63 -0
- package/dist/tests/core/discovery-overrides.test.js +105 -0
- package/dist/tests/core/discovery.test.js +113 -0
- package/dist/tests/core/executor.test.js +44 -0
- package/dist/tests/core/init/detector.test.js +56 -0
- package/dist/tests/core/init/orchestrator.test.js +122 -0
- package/dist/tests/core/init/steps.test.js +363 -0
- package/dist/tests/core/ledger/gitignore.test.js +13 -0
- package/dist/tests/core/ledger/store.test.js +122 -0
- package/dist/tests/core/miro-layout.test.js +150 -0
- package/dist/tests/core/profile-pins.test.js +131 -0
- package/dist/tests/core/profile-registries.test.js +59 -0
- package/dist/tests/core/profile.test.js +110 -0
- package/dist/tests/core/registries-capability.test.js +52 -0
- package/dist/tests/core/registries-seed.test.js +66 -0
- package/dist/tests/core/registries-sync.test.js +205 -0
- package/dist/tests/core/registries.test.js +91 -0
- package/dist/tests/core/registry-manifest.test.js +95 -0
- package/dist/tests/core/registry-versioned-sync.test.js +113 -0
- package/dist/tests/core/registry.test.js +51 -0
- package/dist/tests/core/skill-integrity.test.js +126 -0
- package/dist/tests/core/story-map-parser.test.js +136 -0
- package/dist/tests/core/sync-gates.test.js +97 -0
- package/dist/tests/core/update-check.test.js +106 -0
- package/dist/tests/core/versioning.test.js +169 -0
- package/dist/tests/integration/pack-e2e.test.js +50 -0
- package/dist/tests/providers/hooks-config.test.js +45 -0
- package/dist/tests/providers/index.test.js +58 -0
- package/dist/tests/providers/injection-config.test.js +25 -0
- package/dist/tests/registry/b3-ledger-wiring.test.js +74 -0
- package/dist/tests/registry/catalog-consistency.test.js +47 -0
- package/dist/tests/registry/design-skills.test.js +146 -0
- package/dist/tests/registry/prose-agnostic.test.js +18 -0
- package/dist/tests/registry/sensor-packs.test.js +45 -0
- package/dist/tests/registry/skill-versions.test.js +26 -0
- package/dist/tests/registry/using-awm.test.js +39 -0
- package/dist/tests/utils/config.test.js +31 -0
- package/dist/tests/utils/grouping.test.js +43 -0
- package/dist/tests/utils/registry-view-overrides.test.js +41 -0
- package/dist/tests/utils/registry-view.test.js +156 -0
- package/package.json +49 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const grouping_1 = require("../../src/utils/grouping");
|
|
4
|
+
const bundle = (over) => ({
|
|
5
|
+
description: '', version: '1.0.0', scope: 'project', visibility: 'public',
|
|
6
|
+
dependsOn: [], skills: [], workflows: [], agents: [], ...over,
|
|
7
|
+
});
|
|
8
|
+
const processes = [
|
|
9
|
+
bundle({ name: 'core-dev', description: 'Core development skills',
|
|
10
|
+
skills: [{ name: 'brainstorming', onSignal: false }, { name: 'shared-skill', onSignal: false }],
|
|
11
|
+
workflows: [], agents: [] }),
|
|
12
|
+
bundle({ name: 'docs', description: 'Documentation skills',
|
|
13
|
+
skills: [{ name: 'docs-assistant', onSignal: false }, { name: 'shared-skill', onSignal: false }],
|
|
14
|
+
workflows: [], agents: [] }),
|
|
15
|
+
];
|
|
16
|
+
const formatLabel = (c) => c.baseName;
|
|
17
|
+
describe('buildGroupedOptions', () => {
|
|
18
|
+
it('shows a skill that belongs to two processes in both process groups', () => {
|
|
19
|
+
const artifacts = [
|
|
20
|
+
{ name: 'shared-skill', type: 'skill' }
|
|
21
|
+
];
|
|
22
|
+
const options = (0, grouping_1.buildGroupedOptions)(artifacts, processes, formatLabel);
|
|
23
|
+
const groupLabels = options
|
|
24
|
+
.filter(o => o.value._group)
|
|
25
|
+
.map(o => o.value.processName);
|
|
26
|
+
expect(groupLabels).toContain('core-dev');
|
|
27
|
+
expect(groupLabels).toContain('docs');
|
|
28
|
+
});
|
|
29
|
+
it('shows a skill only in standalone when it belongs to no process', () => {
|
|
30
|
+
const artifacts = [
|
|
31
|
+
{ name: 'orphan-skill', type: 'skill' }
|
|
32
|
+
];
|
|
33
|
+
const options = (0, grouping_1.buildGroupedOptions)(artifacts, processes, formatLabel);
|
|
34
|
+
const groupLabels = options
|
|
35
|
+
.filter(o => o.value._group)
|
|
36
|
+
.map(o => o.value.processName);
|
|
37
|
+
const standaloneLabels = options
|
|
38
|
+
.filter(o => o.value._child)
|
|
39
|
+
.map(o => o.label);
|
|
40
|
+
expect(groupLabels).toHaveLength(0);
|
|
41
|
+
expect(standaloneLabels.some(l => l.includes('orphan-skill'))).toBe(true);
|
|
42
|
+
});
|
|
43
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const fs_1 = __importDefault(require("fs"));
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const os_1 = __importDefault(require("os"));
|
|
9
|
+
describe('registry-view override markers', () => {
|
|
10
|
+
let tmpHome;
|
|
11
|
+
const origHome = process.env.HOME;
|
|
12
|
+
const origAwmHome = process.env.AWM_HOME;
|
|
13
|
+
beforeEach(() => {
|
|
14
|
+
tmpHome = fs_1.default.mkdtempSync(path_1.default.join(os_1.default.tmpdir(), 'awm-view-'));
|
|
15
|
+
process.env.HOME = tmpHome;
|
|
16
|
+
process.env.AWM_HOME = path_1.default.join(tmpHome, '.awm');
|
|
17
|
+
jest.resetModules();
|
|
18
|
+
});
|
|
19
|
+
afterEach(() => {
|
|
20
|
+
process.env.HOME = origHome;
|
|
21
|
+
if (origAwmHome === undefined)
|
|
22
|
+
delete process.env.AWM_HOME;
|
|
23
|
+
else
|
|
24
|
+
process.env.AWM_HOME = origAwmHome;
|
|
25
|
+
fs_1.default.rmSync(tmpHome, { recursive: true, force: true });
|
|
26
|
+
});
|
|
27
|
+
it('packageDetailLines marks an overridden skill with its registry name', () => {
|
|
28
|
+
const { REGISTRIES_DIR } = require('../../src/core/registries');
|
|
29
|
+
const { buildPackageView, packageDetailLines } = require('../../src/utils/registry-view');
|
|
30
|
+
const teamSkillPath = path_1.default.join(REGISTRIES_DIR, 'team-acme', 'skills', 'brainstorming');
|
|
31
|
+
const view = buildPackageView([{ name: 'brainstorming', path: teamSkillPath, description: 'd', overrode: '/old/path' }], [], [], []);
|
|
32
|
+
const lines = packageDetailLines(view[0]).join('\n');
|
|
33
|
+
expect(lines).toContain('brainstorming');
|
|
34
|
+
expect(lines).toContain('← team-acme (override)');
|
|
35
|
+
});
|
|
36
|
+
it('non-overridden artifacts carry no marker', () => {
|
|
37
|
+
const { buildPackageView, packageDetailLines } = require('../../src/utils/registry-view');
|
|
38
|
+
const view = buildPackageView([{ name: 'plain', path: '/any/skills/plain', description: 'd' }], [], [], []);
|
|
39
|
+
expect(packageDetailLines(view[0]).join('\n')).not.toContain('override');
|
|
40
|
+
});
|
|
41
|
+
});
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const registry_view_1 = require("../../src/utils/registry-view");
|
|
4
|
+
const skill = (name, description = '') => ({ name, path: `/s/${name}`, description });
|
|
5
|
+
const wf = (name, description = '') => ({ name, path: `/w/${name}.md`, description });
|
|
6
|
+
const agent = (name, description = '') => ({ name, path: `/a/${name}.md`, description });
|
|
7
|
+
const bundle = (over) => ({
|
|
8
|
+
description: '', version: '1.0.0', scope: 'project', visibility: 'public',
|
|
9
|
+
dependsOn: [], skills: [], workflows: [], agents: [], ...over,
|
|
10
|
+
});
|
|
11
|
+
const processes = [
|
|
12
|
+
bundle({ name: 'core-dev', description: 'Dev lifecycle', scope: 'baseline',
|
|
13
|
+
skills: [{ name: 'brainstorming', onSignal: false }, { name: 'shared', onSignal: false }],
|
|
14
|
+
workflows: ['exec'], agents: ['plan'] }),
|
|
15
|
+
bundle({ name: 'docs', description: 'Docs as code',
|
|
16
|
+
skills: [{ name: 'shared', onSignal: false }] }),
|
|
17
|
+
];
|
|
18
|
+
describe('buildPackageView', () => {
|
|
19
|
+
it('groups artifacts under their package with correct counts and install names', () => {
|
|
20
|
+
const view = (0, registry_view_1.buildPackageView)([skill('brainstorming', 'explore'), skill('shared')], [wf('exec')], [agent('plan')], processes);
|
|
21
|
+
const core = view.find((p) => p.name === 'core-dev');
|
|
22
|
+
expect(core.description).toBe('Dev lifecycle');
|
|
23
|
+
expect(core.counts).toEqual({ skills: 2, workflows: 1, agents: 1 });
|
|
24
|
+
expect(core.artifacts.find((a) => a.type === 'skill' && a.name === 'brainstorming').installName).toBe('brainstorming');
|
|
25
|
+
expect(core.artifacts.find((a) => a.type === 'workflow').installName).toBe('exec.md');
|
|
26
|
+
expect(core.artifacts.find((a) => a.type === 'agent').installName).toBe('plan.md');
|
|
27
|
+
expect(core.artifacts.find((a) => a.name === 'brainstorming').description).toBe('explore');
|
|
28
|
+
});
|
|
29
|
+
it('places an artifact that belongs to two packages in both', () => {
|
|
30
|
+
const view = (0, registry_view_1.buildPackageView)([skill('shared')], [], [], processes);
|
|
31
|
+
const names = view.map((p) => p.name);
|
|
32
|
+
expect(names).toContain('core-dev');
|
|
33
|
+
expect(names).toContain('docs');
|
|
34
|
+
});
|
|
35
|
+
it('collects orphan artifacts into a standalone package', () => {
|
|
36
|
+
const view = (0, registry_view_1.buildPackageView)([skill('orphan')], [], [], processes);
|
|
37
|
+
const standalone = view.find((p) => p.name === registry_view_1.STANDALONE_NAME);
|
|
38
|
+
expect(standalone.isStandalone).toBe(true);
|
|
39
|
+
expect(standalone.artifacts.map((a) => a.name)).toEqual(['orphan']);
|
|
40
|
+
});
|
|
41
|
+
it('omits empty packages and omits standalone when there are no orphans', () => {
|
|
42
|
+
const view = (0, registry_view_1.buildPackageView)([skill('brainstorming')], [], [], processes);
|
|
43
|
+
expect(view.map((p) => p.name)).toEqual(['core-dev']);
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
describe('artifactCountLabel', () => {
|
|
47
|
+
it('labels a skills-only package', () => {
|
|
48
|
+
expect((0, registry_view_1.artifactCountLabel)({ skills: 30, workflows: 0, agents: 0 })).toBe('30 skills');
|
|
49
|
+
});
|
|
50
|
+
it('singularizes one skill', () => {
|
|
51
|
+
expect((0, registry_view_1.artifactCountLabel)({ skills: 1, workflows: 0, agents: 0 })).toBe('1 skill');
|
|
52
|
+
});
|
|
53
|
+
it('appends workflow and agent counts when present', () => {
|
|
54
|
+
expect((0, registry_view_1.artifactCountLabel)({ skills: 2, workflows: 1, agents: 1 })).toBe('2 skills · 1 workflow · 1 agent');
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
describe('packageSummaryLines', () => {
|
|
58
|
+
it('renders one aligned line per package plus a header count', () => {
|
|
59
|
+
const view = (0, registry_view_1.buildPackageView)([skill('brainstorming'), skill('shared')], [], [], processes);
|
|
60
|
+
const lines = (0, registry_view_1.packageSummaryLines)(view);
|
|
61
|
+
expect(lines[0]).toContain('2 packages');
|
|
62
|
+
expect(lines.some((l) => l.includes('core-dev') && l.includes('Dev lifecycle'))).toBe(true);
|
|
63
|
+
expect(lines.some((l) => l.includes('docs'))).toBe(true);
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
describe('packageDetailLines', () => {
|
|
67
|
+
it('lists each artifact and its description', () => {
|
|
68
|
+
const view = (0, registry_view_1.buildPackageView)([skill('brainstorming', 'explore intent')], [], [], processes);
|
|
69
|
+
const core = view.find((p) => p.name === 'core-dev');
|
|
70
|
+
const lines = (0, registry_view_1.packageDetailLines)(core).join('\n');
|
|
71
|
+
expect(lines).toContain('core-dev');
|
|
72
|
+
expect(lines).toContain('brainstorming');
|
|
73
|
+
expect(lines).toContain('explore intent');
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
describe('findPackage', () => {
|
|
77
|
+
const view = (0, registry_view_1.buildPackageView)([skill('brainstorming')], [], [], processes);
|
|
78
|
+
it('matches by exact name (case-insensitive)', () => {
|
|
79
|
+
expect((0, registry_view_1.findPackage)(view, 'Core-Dev').match.name).toBe('core-dev');
|
|
80
|
+
});
|
|
81
|
+
it('suggests the closest package on a miss', () => {
|
|
82
|
+
const res = (0, registry_view_1.findPackage)(view, 'cor');
|
|
83
|
+
expect(res.match).toBeUndefined();
|
|
84
|
+
expect(res.suggestion).toBe('core-dev');
|
|
85
|
+
});
|
|
86
|
+
it('falls back to prefix suggestion when no substring match exists', () => {
|
|
87
|
+
const res = (0, registry_view_1.findPackage)(view, 'xyz');
|
|
88
|
+
expect(res.match).toBeUndefined();
|
|
89
|
+
expect(res.suggestion).toBe('core-dev');
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
describe('buildLevel1Options', () => {
|
|
93
|
+
it('produces one option per package keyed by package name', () => {
|
|
94
|
+
const view = (0, registry_view_1.buildPackageView)([skill('brainstorming'), skill('shared')], [], [], processes);
|
|
95
|
+
const opts = (0, registry_view_1.buildLevel1Options)(view);
|
|
96
|
+
expect(opts.map((o) => o.value).sort()).toEqual(['core-dev', 'docs']);
|
|
97
|
+
expect(opts.find((o) => o.value === 'core-dev').label).toContain('core-dev');
|
|
98
|
+
expect(opts.find((o) => o.value === 'core-dev').label).toContain('Dev lifecycle');
|
|
99
|
+
});
|
|
100
|
+
it('uses artifact-count label for standalone packages', () => {
|
|
101
|
+
const view = (0, registry_view_1.buildPackageView)([skill('orphan')], [], [], []);
|
|
102
|
+
const opts = (0, registry_view_1.buildLevel1Options)(view);
|
|
103
|
+
expect(opts[0].value).toBe(registry_view_1.STANDALONE_NAME);
|
|
104
|
+
expect(opts[0].label).toContain('1 artifact');
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
describe('buildLevel2Options', () => {
|
|
108
|
+
it('puts an "install entire package" sentinel first, then one option per artifact', () => {
|
|
109
|
+
const view = (0, registry_view_1.buildPackageView)([skill('brainstorming', 'explore')], [wf('exec')], [agent('plan')], processes);
|
|
110
|
+
const core = view.find((p) => p.name === 'core-dev');
|
|
111
|
+
const opts = (0, registry_view_1.buildLevel2Options)(core);
|
|
112
|
+
expect(opts[0].value).toBe(registry_view_1.ALL_SENTINEL);
|
|
113
|
+
expect(opts[0].label).toContain('Install entire package');
|
|
114
|
+
const values = opts.slice(1).map((o) => o.value);
|
|
115
|
+
expect(values).toContain('skill:brainstorming');
|
|
116
|
+
expect(values).toContain('workflow:exec');
|
|
117
|
+
expect(values).toContain('agent:plan');
|
|
118
|
+
expect(opts.find((o) => o.value === 'skill:brainstorming').label).toContain('explore');
|
|
119
|
+
});
|
|
120
|
+
it('uses plain title for artifact with no description', () => {
|
|
121
|
+
const view = (0, registry_view_1.buildPackageView)([skill('brainstorming', 'explore')], [wf('exec')], [agent('plan')], processes);
|
|
122
|
+
const core = view.find((p) => p.name === 'core-dev');
|
|
123
|
+
const opts = (0, registry_view_1.buildLevel2Options)(core);
|
|
124
|
+
const wfOpt = opts.find((o) => o.value === 'workflow:exec');
|
|
125
|
+
expect(wfOpt.label).toBe('⚡ exec');
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
describe('resolveLevel2Selection', () => {
|
|
129
|
+
const view = (0, registry_view_1.buildPackageView)([skill('brainstorming'), skill('shared')], [], [], processes);
|
|
130
|
+
const core = view.find((p) => p.name === 'core-dev');
|
|
131
|
+
it('returns all artifacts when the sentinel is selected', () => {
|
|
132
|
+
const out = (0, registry_view_1.resolveLevel2Selection)(core, [registry_view_1.ALL_SENTINEL]);
|
|
133
|
+
expect(out.map((a) => a.name).sort()).toEqual(['brainstorming', 'shared']);
|
|
134
|
+
});
|
|
135
|
+
it('returns only the cherry-picked artifacts otherwise', () => {
|
|
136
|
+
const out = (0, registry_view_1.resolveLevel2Selection)(core, ['skill:brainstorming']);
|
|
137
|
+
expect(out.map((a) => a.name)).toEqual(['brainstorming']);
|
|
138
|
+
});
|
|
139
|
+
it('returns empty array when no values are selected', () => {
|
|
140
|
+
expect((0, registry_view_1.resolveLevel2Selection)(core, [])).toEqual([]);
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
describe('visibility', () => {
|
|
144
|
+
it('marks a private bundle on its PackageView', () => {
|
|
145
|
+
const priv = [
|
|
146
|
+
bundle({ name: 'secret', description: 'private', visibility: 'private',
|
|
147
|
+
skills: [{ name: 'a', onSignal: false }] }),
|
|
148
|
+
];
|
|
149
|
+
const view = (0, registry_view_1.buildPackageView)([skill('a')], [], [], priv);
|
|
150
|
+
expect(view.find((p) => p.name === 'secret').visibility).toBe('private');
|
|
151
|
+
});
|
|
152
|
+
it('defaults visibility to public', () => {
|
|
153
|
+
const view = (0, registry_view_1.buildPackageView)([skill('brainstorming')], [], [], processes);
|
|
154
|
+
expect(view.find((p) => p.name === 'core-dev').visibility).toBe('public');
|
|
155
|
+
});
|
|
156
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agentic-workflow-manager",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"main": "dist/src/index.js",
|
|
5
|
+
"bin": {
|
|
6
|
+
"awm": "./dist/src/index.js"
|
|
7
|
+
},
|
|
8
|
+
"files": ["dist"],
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/Kodria/agentic-workflow.git",
|
|
12
|
+
"directory": "cli"
|
|
13
|
+
},
|
|
14
|
+
"directories": {
|
|
15
|
+
"doc": "docs"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc && chmod +x dist/src/index.js",
|
|
19
|
+
"test": "jest --runInBand",
|
|
20
|
+
"start": "ts-node src/index.ts",
|
|
21
|
+
"prepack": "npm run build",
|
|
22
|
+
"prepublishOnly": "npm run build"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"agentic",
|
|
26
|
+
"workflow",
|
|
27
|
+
"cli",
|
|
28
|
+
"skills",
|
|
29
|
+
"ai"
|
|
30
|
+
],
|
|
31
|
+
"author": "Kodria",
|
|
32
|
+
"license": "ISC",
|
|
33
|
+
"description": "CLI to manage Agentic Workflows - install skills, workflows, and processes for AI agents",
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@clack/prompts": "^1.0.1",
|
|
36
|
+
"commander": "^14.0.3",
|
|
37
|
+
"picocolors": "^1.1.1",
|
|
38
|
+
"simple-git": "^3.32.2"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/jest": "^30.0.0",
|
|
42
|
+
"@types/node": "^25.3.0",
|
|
43
|
+
"dependency-cruiser": "^17.4.3",
|
|
44
|
+
"eslint": "^10.4.1",
|
|
45
|
+
"jest": "^30.2.0",
|
|
46
|
+
"ts-jest": "^29.4.6",
|
|
47
|
+
"typescript": "^5.9.3"
|
|
48
|
+
}
|
|
49
|
+
}
|