clawvault 2.5.4 → 2.6.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 +159 -159
- package/bin/clawvault.js +111 -111
- package/bin/command-registration.test.js +166 -166
- package/bin/command-runtime.js +93 -93
- package/bin/command-runtime.test.js +154 -154
- package/bin/help-contract.test.js +39 -39
- package/bin/register-config-commands.js +153 -153
- package/bin/register-config-route-commands.test.js +121 -121
- package/bin/register-core-commands.js +237 -237
- package/bin/register-kanban-commands.js +56 -56
- package/bin/register-kanban-commands.test.js +83 -83
- package/bin/register-maintenance-commands.js +282 -282
- package/bin/register-project-commands.js +209 -209
- package/bin/register-project-commands.test.js +206 -206
- package/bin/register-query-commands.js +317 -317
- package/bin/register-query-commands.test.js +65 -65
- package/bin/register-resilience-commands.js +182 -182
- package/bin/register-resilience-commands.test.js +81 -81
- package/bin/register-route-commands.js +114 -114
- package/bin/register-session-lifecycle-commands.js +206 -206
- package/bin/register-tailscale-commands.js +106 -106
- package/bin/register-task-commands.js +348 -348
- package/bin/register-task-commands.test.js +69 -69
- package/bin/register-template-commands.js +75 -72
- package/bin/register-template-commands.test.js +87 -0
- package/bin/register-vault-operations-commands.js +300 -300
- package/bin/test-helpers/cli-command-fixtures.js +119 -119
- package/dashboard/lib/graph-diff.js +104 -104
- package/dashboard/lib/graph-diff.test.js +75 -75
- package/dashboard/lib/vault-parser.js +556 -556
- package/dashboard/lib/vault-parser.test.js +254 -254
- package/dashboard/public/app.js +796 -796
- package/dashboard/public/index.html +52 -52
- package/dashboard/public/styles.css +221 -221
- package/dashboard/server.js +374 -374
- package/dist/{chunk-J5EMBUPK.js → chunk-4OXMU5S2.js} +1 -1
- package/dist/{chunk-4IV3R2F5.js → chunk-4TE4JMLA.js} +1 -1
- package/dist/{chunk-5GZFTAL7.js → chunk-AZYOKJYC.js} +128 -42
- package/dist/{chunk-JDLOL2PL.js → chunk-HA5M6KJB.js} +1 -1
- package/dist/{chunk-IZEY5S74.js → chunk-IEVLHNLU.js} +1 -1
- package/dist/{chunk-OSMS7QIG.js → chunk-ME37YNW3.js} +2 -2
- package/dist/chunk-MFAWT5O5.js +301 -0
- package/dist/{chunk-TPDH3JPP.js → chunk-PBEE567J.js} +1 -1
- package/dist/{chunk-S2IG7VNM.js → chunk-Q2J5YTUF.js} +2 -2
- package/dist/{chunk-IOALNTAN.js → chunk-QWQ3TIKS.js} +103 -29
- package/dist/{chunk-YCVDVI5B.js → chunk-R2MIW5G7.js} +1 -1
- package/dist/{chunk-W2HNZC22.js → chunk-UEOUADMO.js} +1 -1
- package/dist/cli/index.js +8 -6
- package/dist/commands/backlog.js +3 -1
- package/dist/commands/blocked.js +3 -1
- package/dist/commands/canvas.js +3 -1
- package/dist/commands/doctor.js +7 -5
- package/dist/commands/kanban.js +4 -2
- package/dist/commands/observe.js +7 -5
- package/dist/commands/project.js +5 -3
- package/dist/commands/rebuild.js +6 -4
- package/dist/commands/replay.js +6 -4
- package/dist/commands/setup.js +1 -1
- package/dist/commands/sleep.js +5 -3
- package/dist/commands/status.js +6 -4
- package/dist/commands/task.js +4 -2
- package/dist/commands/template.d.ts +10 -1
- package/dist/commands/template.js +47 -55
- package/dist/index.js +16 -15
- package/dist/lib/project-utils.js +4 -2
- package/dist/lib/task-utils.d.ts +14 -13
- package/dist/lib/task-utils.js +3 -1
- package/dist/lib/template-engine.d.ts +1 -0
- package/hooks/clawvault/HOOK.md +83 -83
- package/hooks/clawvault/handler.js +816 -816
- package/hooks/clawvault/handler.test.js +263 -263
- package/package.json +94 -94
- package/templates/checkpoint.md +34 -19
- package/templates/daily-note.md +34 -19
- package/templates/daily.md +34 -19
- package/templates/decision.md +39 -17
- package/templates/handoff.md +34 -19
- package/templates/lesson.md +31 -16
- package/templates/person.md +37 -19
- package/templates/project.md +84 -23
- package/templates/task.md +81 -0
- /package/dist/{chunk-AXKYDCNN.js → chunk-RVYA52PY.js} +0 -0
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
2
|
-
import { Command } from 'commander';
|
|
3
|
-
import { registerKanbanCommands } from './register-kanban-commands.js';
|
|
4
|
-
import { chalkStub } from './test-helpers/cli-command-fixtures.js';
|
|
5
|
-
|
|
6
|
-
const { kanbanCommandMock } = vi.hoisted(() => ({
|
|
7
|
-
kanbanCommandMock: vi.fn()
|
|
8
|
-
}));
|
|
9
|
-
|
|
10
|
-
vi.mock('../dist/commands/kanban.js', () => ({
|
|
11
|
-
kanbanCommand: kanbanCommandMock
|
|
12
|
-
}));
|
|
13
|
-
|
|
14
|
-
function buildProgram() {
|
|
15
|
-
const program = new Command();
|
|
16
|
-
registerKanbanCommands(program, {
|
|
17
|
-
chalk: chalkStub,
|
|
18
|
-
resolveVaultPath: (value) => value ?? '/vault'
|
|
19
|
-
});
|
|
20
|
-
return program;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async function runCommand(args) {
|
|
24
|
-
const program = buildProgram();
|
|
25
|
-
await program.parseAsync(args, { from: 'user' });
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
describe('register-kanban-commands', () => {
|
|
29
|
-
beforeEach(() => {
|
|
30
|
-
vi.clearAllMocks();
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
it('registers sync and import subcommands with expected options', () => {
|
|
34
|
-
const program = buildProgram();
|
|
35
|
-
const kanbanCommand = program.commands.find((command) => command.name() === 'kanban');
|
|
36
|
-
expect(kanbanCommand).toBeDefined();
|
|
37
|
-
|
|
38
|
-
const syncCommand = kanbanCommand?.commands.find((command) => command.name() === 'sync');
|
|
39
|
-
expect(syncCommand).toBeDefined();
|
|
40
|
-
const syncFlags = syncCommand?.options.map((option) => option.flags) ?? [];
|
|
41
|
-
expect(syncFlags).toEqual(expect.arrayContaining([
|
|
42
|
-
'--output <path>',
|
|
43
|
-
'--group-by <field>',
|
|
44
|
-
'--filter-project <project>',
|
|
45
|
-
'--filter-owner <owner>',
|
|
46
|
-
'--include-done'
|
|
47
|
-
]));
|
|
48
|
-
|
|
49
|
-
const importCommand = kanbanCommand?.commands.find((command) => command.name() === 'import');
|
|
50
|
-
expect(importCommand).toBeDefined();
|
|
51
|
-
const importFlags = importCommand?.options.map((option) => option.flags) ?? [];
|
|
52
|
-
expect(importFlags).toEqual(expect.arrayContaining(['--output <path>']));
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
it('dispatches sync and import actions to the kanban command handler', async () => {
|
|
56
|
-
await runCommand([
|
|
57
|
-
'kanban',
|
|
58
|
-
'sync',
|
|
59
|
-
'--group-by',
|
|
60
|
-
'priority',
|
|
61
|
-
'--output',
|
|
62
|
-
'Board.md',
|
|
63
|
-
'--filter-project',
|
|
64
|
-
'apollo',
|
|
65
|
-
'--filter-owner',
|
|
66
|
-
'alice',
|
|
67
|
-
'--include-done'
|
|
68
|
-
]);
|
|
69
|
-
|
|
70
|
-
expect(kanbanCommandMock).toHaveBeenCalledWith('/vault', 'sync', {
|
|
71
|
-
output: 'Board.md',
|
|
72
|
-
groupBy: 'priority',
|
|
73
|
-
filterProject: 'apollo',
|
|
74
|
-
filterOwner: 'alice',
|
|
75
|
-
includeDone: true
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
await runCommand(['kanban', 'import', '--output', 'Board.md']);
|
|
79
|
-
expect(kanbanCommandMock).toHaveBeenCalledWith('/vault', 'import', {
|
|
80
|
-
output: 'Board.md'
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
});
|
|
1
|
+
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
2
|
+
import { Command } from 'commander';
|
|
3
|
+
import { registerKanbanCommands } from './register-kanban-commands.js';
|
|
4
|
+
import { chalkStub } from './test-helpers/cli-command-fixtures.js';
|
|
5
|
+
|
|
6
|
+
const { kanbanCommandMock } = vi.hoisted(() => ({
|
|
7
|
+
kanbanCommandMock: vi.fn()
|
|
8
|
+
}));
|
|
9
|
+
|
|
10
|
+
vi.mock('../dist/commands/kanban.js', () => ({
|
|
11
|
+
kanbanCommand: kanbanCommandMock
|
|
12
|
+
}));
|
|
13
|
+
|
|
14
|
+
function buildProgram() {
|
|
15
|
+
const program = new Command();
|
|
16
|
+
registerKanbanCommands(program, {
|
|
17
|
+
chalk: chalkStub,
|
|
18
|
+
resolveVaultPath: (value) => value ?? '/vault'
|
|
19
|
+
});
|
|
20
|
+
return program;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async function runCommand(args) {
|
|
24
|
+
const program = buildProgram();
|
|
25
|
+
await program.parseAsync(args, { from: 'user' });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
describe('register-kanban-commands', () => {
|
|
29
|
+
beforeEach(() => {
|
|
30
|
+
vi.clearAllMocks();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('registers sync and import subcommands with expected options', () => {
|
|
34
|
+
const program = buildProgram();
|
|
35
|
+
const kanbanCommand = program.commands.find((command) => command.name() === 'kanban');
|
|
36
|
+
expect(kanbanCommand).toBeDefined();
|
|
37
|
+
|
|
38
|
+
const syncCommand = kanbanCommand?.commands.find((command) => command.name() === 'sync');
|
|
39
|
+
expect(syncCommand).toBeDefined();
|
|
40
|
+
const syncFlags = syncCommand?.options.map((option) => option.flags) ?? [];
|
|
41
|
+
expect(syncFlags).toEqual(expect.arrayContaining([
|
|
42
|
+
'--output <path>',
|
|
43
|
+
'--group-by <field>',
|
|
44
|
+
'--filter-project <project>',
|
|
45
|
+
'--filter-owner <owner>',
|
|
46
|
+
'--include-done'
|
|
47
|
+
]));
|
|
48
|
+
|
|
49
|
+
const importCommand = kanbanCommand?.commands.find((command) => command.name() === 'import');
|
|
50
|
+
expect(importCommand).toBeDefined();
|
|
51
|
+
const importFlags = importCommand?.options.map((option) => option.flags) ?? [];
|
|
52
|
+
expect(importFlags).toEqual(expect.arrayContaining(['--output <path>']));
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it('dispatches sync and import actions to the kanban command handler', async () => {
|
|
56
|
+
await runCommand([
|
|
57
|
+
'kanban',
|
|
58
|
+
'sync',
|
|
59
|
+
'--group-by',
|
|
60
|
+
'priority',
|
|
61
|
+
'--output',
|
|
62
|
+
'Board.md',
|
|
63
|
+
'--filter-project',
|
|
64
|
+
'apollo',
|
|
65
|
+
'--filter-owner',
|
|
66
|
+
'alice',
|
|
67
|
+
'--include-done'
|
|
68
|
+
]);
|
|
69
|
+
|
|
70
|
+
expect(kanbanCommandMock).toHaveBeenCalledWith('/vault', 'sync', {
|
|
71
|
+
output: 'Board.md',
|
|
72
|
+
groupBy: 'priority',
|
|
73
|
+
filterProject: 'apollo',
|
|
74
|
+
filterOwner: 'alice',
|
|
75
|
+
includeDone: true
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
await runCommand(['kanban', 'import', '--output', 'Board.md']);
|
|
79
|
+
expect(kanbanCommandMock).toHaveBeenCalledWith('/vault', 'import', {
|
|
80
|
+
output: 'Board.md'
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
});
|