@agents-at-scale/ark 0.1.35-rc.1 → 0.1.35-rc1
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/dist/arkServices.d.ts +4 -12
- package/dist/arkServices.js +19 -34
- package/dist/arkServices.spec.d.ts +1 -0
- package/dist/arkServices.spec.js +24 -0
- package/dist/commands/agents/index.d.ts +2 -1
- package/dist/commands/agents/index.js +2 -7
- package/dist/commands/agents/index.spec.d.ts +1 -0
- package/dist/commands/agents/index.spec.js +67 -0
- package/dist/commands/chat/index.d.ts +2 -1
- package/dist/commands/chat/index.js +5 -21
- package/dist/commands/cluster/get.spec.d.ts +1 -0
- package/dist/commands/cluster/get.spec.js +92 -0
- package/dist/commands/cluster/index.d.ts +2 -1
- package/dist/commands/cluster/index.js +1 -1
- package/dist/commands/cluster/index.spec.d.ts +1 -0
- package/dist/commands/cluster/index.spec.js +24 -0
- package/dist/commands/completion/index.d.ts +2 -1
- package/dist/commands/completion/index.js +1 -1
- package/dist/commands/completion/index.spec.d.ts +1 -0
- package/dist/commands/completion/index.spec.js +34 -0
- package/dist/commands/config/index.d.ts +2 -1
- package/dist/commands/config/index.js +2 -2
- package/dist/commands/config/index.spec.d.ts +1 -0
- package/dist/commands/config/index.spec.js +78 -0
- package/dist/commands/dashboard/index.d.ts +2 -1
- package/dist/commands/dashboard/index.js +1 -1
- package/dist/commands/dev/index.d.ts +2 -1
- package/dist/commands/dev/index.js +1 -1
- package/dist/commands/dev/tool-generate.spec.d.ts +1 -0
- package/dist/commands/dev/tool-generate.spec.js +163 -0
- package/dist/commands/dev/tool.spec.d.ts +1 -0
- package/dist/commands/dev/tool.spec.js +48 -0
- package/dist/commands/generate/generators/project.js +22 -41
- package/dist/commands/generate/index.d.ts +2 -1
- package/dist/commands/generate/index.js +1 -1
- package/dist/commands/install/index.d.ts +4 -2
- package/dist/commands/install/index.js +215 -78
- package/dist/commands/install/index.spec.d.ts +1 -0
- package/dist/commands/install/index.spec.js +135 -0
- package/dist/commands/models/create.spec.d.ts +1 -0
- package/dist/commands/models/create.spec.js +125 -0
- package/dist/commands/models/index.d.ts +2 -1
- package/dist/commands/models/index.js +2 -7
- package/dist/commands/models/index.spec.d.ts +1 -0
- package/dist/commands/models/index.spec.js +76 -0
- package/dist/commands/routes/index.d.ts +2 -1
- package/dist/commands/routes/index.js +1 -9
- package/dist/commands/status/index.d.ts +3 -2
- package/dist/commands/status/index.js +210 -11
- package/dist/commands/targets/index.d.ts +2 -1
- package/dist/commands/targets/index.js +1 -1
- package/dist/commands/targets/index.spec.d.ts +1 -0
- package/dist/commands/targets/index.spec.js +105 -0
- package/dist/commands/teams/index.d.ts +2 -1
- package/dist/commands/teams/index.js +2 -7
- package/dist/commands/teams/index.spec.d.ts +1 -0
- package/dist/commands/teams/index.spec.js +70 -0
- package/dist/commands/tools/index.d.ts +2 -1
- package/dist/commands/tools/index.js +2 -7
- package/dist/commands/tools/index.spec.d.ts +1 -0
- package/dist/commands/tools/index.spec.js +70 -0
- package/dist/commands/uninstall/index.d.ts +2 -1
- package/dist/commands/uninstall/index.js +61 -38
- package/dist/commands/uninstall/index.spec.d.ts +1 -0
- package/dist/commands/uninstall/index.spec.js +117 -0
- package/dist/components/ChatUI.js +4 -4
- package/dist/components/statusChecker.d.ts +5 -12
- package/dist/components/statusChecker.js +172 -89
- package/dist/config.d.ts +3 -22
- package/dist/config.js +7 -151
- package/dist/index.js +22 -19
- package/dist/lib/arkServiceProxy.js +4 -2
- package/dist/lib/arkStatus.d.ts +5 -0
- package/dist/lib/arkStatus.js +61 -2
- package/dist/lib/arkStatus.spec.d.ts +1 -0
- package/dist/lib/arkStatus.spec.js +49 -0
- package/dist/lib/chatClient.js +1 -3
- package/dist/lib/cluster.js +11 -14
- package/dist/lib/cluster.spec.d.ts +1 -0
- package/dist/lib/cluster.spec.js +338 -0
- package/dist/lib/commandUtils.js +7 -7
- package/dist/lib/commands.d.ts +16 -0
- package/dist/lib/commands.js +29 -0
- package/dist/lib/commands.spec.d.ts +1 -0
- package/dist/lib/commands.spec.js +146 -0
- package/dist/lib/config.d.ts +2 -0
- package/dist/lib/config.js +6 -4
- package/dist/lib/config.spec.d.ts +1 -0
- package/dist/lib/config.spec.js +99 -0
- package/dist/lib/consts.d.ts +0 -1
- package/dist/lib/consts.js +0 -2
- package/dist/lib/consts.spec.d.ts +1 -0
- package/dist/lib/consts.spec.js +15 -0
- package/dist/lib/errors.js +1 -1
- package/dist/lib/errors.spec.d.ts +1 -0
- package/dist/lib/errors.spec.js +221 -0
- package/dist/lib/exec.d.ts +0 -4
- package/dist/lib/exec.js +0 -11
- package/dist/lib/output.spec.d.ts +1 -0
- package/dist/lib/output.spec.js +123 -0
- package/dist/lib/portUtils.d.ts +8 -0
- package/dist/lib/portUtils.js +39 -0
- package/dist/lib/startup.d.ts +5 -0
- package/dist/lib/startup.js +73 -0
- package/dist/lib/startup.spec.d.ts +1 -0
- package/dist/lib/startup.spec.js +168 -0
- package/dist/lib/types.d.ts +2 -0
- package/dist/ui/AgentSelector.d.ts +8 -0
- package/dist/ui/AgentSelector.js +53 -0
- package/dist/ui/MainMenu.d.ts +5 -1
- package/dist/ui/MainMenu.js +117 -54
- package/dist/ui/ModelSelector.d.ts +8 -0
- package/dist/ui/ModelSelector.js +53 -0
- package/dist/ui/TeamSelector.d.ts +8 -0
- package/dist/ui/TeamSelector.js +55 -0
- package/dist/ui/ToolSelector.d.ts +8 -0
- package/dist/ui/ToolSelector.js +53 -0
- package/dist/ui/statusFormatter.d.ts +22 -10
- package/dist/ui/statusFormatter.js +37 -109
- package/dist/ui/statusFormatter.spec.d.ts +1 -0
- package/dist/ui/statusFormatter.spec.js +58 -0
- package/package.json +3 -3
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { describe, it, expect, jest, beforeEach, afterEach } from '@jest/globals';
|
|
2
|
+
import { StatusFormatter } from './statusFormatter.js';
|
|
3
|
+
describe('StatusFormatter', () => {
|
|
4
|
+
let consoleLogSpy;
|
|
5
|
+
beforeEach(() => {
|
|
6
|
+
consoleLogSpy = jest.spyOn(console, 'log').mockImplementation(() => { });
|
|
7
|
+
});
|
|
8
|
+
afterEach(() => {
|
|
9
|
+
jest.restoreAllMocks();
|
|
10
|
+
});
|
|
11
|
+
it('prints sections', () => {
|
|
12
|
+
const sections = [
|
|
13
|
+
{
|
|
14
|
+
title: 'Test Section',
|
|
15
|
+
lines: [{ icon: '✓', status: 'ok', name: 'test' }],
|
|
16
|
+
},
|
|
17
|
+
];
|
|
18
|
+
StatusFormatter.printSections(sections);
|
|
19
|
+
expect(consoleLogSpy).toHaveBeenCalled();
|
|
20
|
+
const calls = consoleLogSpy.mock.calls.map((c) => c[0]);
|
|
21
|
+
expect(calls.some((c) => c?.includes('Test Section'))).toBe(true);
|
|
22
|
+
expect(calls.some((c) => c?.includes('✓ ok'))).toBe(true);
|
|
23
|
+
});
|
|
24
|
+
it('prints line with details', () => {
|
|
25
|
+
const sections = [
|
|
26
|
+
{
|
|
27
|
+
title: 'Test',
|
|
28
|
+
lines: [{ icon: '✓', status: 'ok', name: 'test', details: 'v1.0.0' }],
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
StatusFormatter.printSections(sections);
|
|
32
|
+
const calls = consoleLogSpy.mock.calls.map((c) => c[0]);
|
|
33
|
+
expect(calls.some((c) => c?.includes('v1.0.0'))).toBe(true);
|
|
34
|
+
});
|
|
35
|
+
it('prints subtext', () => {
|
|
36
|
+
const sections = [
|
|
37
|
+
{
|
|
38
|
+
title: 'Test',
|
|
39
|
+
lines: [
|
|
40
|
+
{ icon: '✗', status: 'error', name: 'test', subtext: 'Try again' },
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
StatusFormatter.printSections(sections);
|
|
45
|
+
const calls = consoleLogSpy.mock.calls.map((c) => c[0]);
|
|
46
|
+
expect(calls.some((c) => c?.includes('Try again'))).toBe(true);
|
|
47
|
+
});
|
|
48
|
+
it('adds spacing between sections', () => {
|
|
49
|
+
const sections = [
|
|
50
|
+
{ title: 'First', lines: [] },
|
|
51
|
+
{ title: 'Second', lines: [] },
|
|
52
|
+
];
|
|
53
|
+
StatusFormatter.printSections(sections);
|
|
54
|
+
const calls = consoleLogSpy.mock.calls;
|
|
55
|
+
// Should have blank lines for spacing
|
|
56
|
+
expect(calls.filter((c) => c.length === 0).length).toBeGreaterThan(0);
|
|
57
|
+
});
|
|
58
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agents-at-scale/ark",
|
|
3
|
-
"version": "0.1.35-
|
|
3
|
+
"version": "0.1.35-rc1",
|
|
4
4
|
"description": "ARK CLI - Interactive terminal interface for ARK agents",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"clean": "rm -rf dist",
|
|
19
19
|
"lint": "eslint src/ --fix && prettier --write src/",
|
|
20
20
|
"lint:check": "eslint src/ && prettier --check src/",
|
|
21
|
-
"test": "NODE_OPTIONS=\"--experimental-vm-modules\" jest --coverage --coverageDirectory=./artifacts/coverage",
|
|
21
|
+
"test": "NODE_OPTIONS=\"--experimental-vm-modules\" jest --coverage --coverageDirectory=./artifacts/coverage --coverageReporters=text --coverageReporters=lcov --coverageReporters=text-summary",
|
|
22
22
|
"postinstall": "echo \"ARK CLI installed! Run 'ark' to try it out.\""
|
|
23
23
|
},
|
|
24
24
|
"keywords": [
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
"openai": "^5.19.1",
|
|
59
59
|
"ora": "^8.2.0",
|
|
60
60
|
"react": "^19.1.0",
|
|
61
|
-
"simple-git": "^3.28.0",
|
|
62
61
|
"yaml": "^2.6.1"
|
|
63
62
|
},
|
|
64
63
|
"devDependencies": {
|
|
65
64
|
"@eslint/js": "^9.17.0",
|
|
65
|
+
"@jest/globals": "^30.1.2",
|
|
66
66
|
"@types/debug": "^4.1.12",
|
|
67
67
|
"@types/inquirer": "^9.0.7",
|
|
68
68
|
"@types/jest": "^30.0.0",
|