kenaz 0.3.2 → 0.3.5
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/core/.claude/commands/Ansuz.md +36 -35
- package/core/.claude/hooks/__tests__/task-2395-project-registration.test.js +84 -0
- package/core/.claude/hooks/_ansuz-conversation.js +1 -0
- package/core/.claude/hooks/_ansuz-conversation.test.js +6 -0
- package/core/.claude/hooks/_run-user-prompt.js +0 -4
- package/core/.claude/hooks/_run-user-prompt.test.js +2 -3
- package/core/.claude/hooks/handoff-staleness.js +2 -2
- package/core/.claude/hooks/turn-context.js +50 -2
- package/core/.claude/settings.json +0 -37
- package/core/.collaboration/core/task-api.js +4 -12
- package/core/.formation/README.md +21 -146
- package/core/.formation/bifrost/codex-doctor.js +37 -2
- package/core/.formation/bifrost/codex-doctor.test.js +18 -0
- package/core/.formation/bifrost/launch.js +1 -1
- package/core/.formation/bifrost/openai/codex-hook-shim.js +6 -0
- package/core/.formation/bifrost/openai/codex-hook-shim.test.js +11 -1
- package/core/.formation/bifrost/setup-codex.js +3 -0
- package/core/.formation/spec/task_operations.parity.test.js +0 -1
- package/core/.formation/tools/dashboard-models-chain.test.js +0 -6
- package/core/.formation/tools/dispatch-detail/cross-project-worktree.md +1 -9
- package/core/.formation/tools/dispatch-detail/worktree-subagent-mode.md +2 -2
- package/core/.formation/tools/dispatch.js +28 -549
- package/core/.formation/tools/mcp-allowlist.test.js +0 -1
- package/core/.formation/tools/post-complete/task2345.test.js +0 -5
- package/core/.formation/tools/pre-dispatch-snapshot.test.js +0 -100
- package/core/.formation/tools/prompt.js +66 -1607
- package/core/.formation/tools/prompt.test.js +43 -582
- package/core/.kenaz/claude-hooks-manifest.json +16 -16
- package/core/.specialist/Ansuz/RULES.md +6 -10
- package/core/.specialist/tools/__tests__/freya-cli-contract.test.js +0 -1
- package/core/.specialist/tools/__tests__/task-2218-boot-session-id.test.js +17 -1
- package/core/.specialist/tools/__tests__/task-2222-session-identity-interleave.test.js +17 -1
- package/core/.specialist/tools/__tests__/task-2254-handoff-archive-contract.test.js +6 -5
- package/core/.specialist/tools/ansuz-boot-fast.js +44 -100
- package/core/.specialist/tools/ansuz-boot-fast.test.js +45 -1
- package/core/KENAZ_CORE_VERSION +1 -1
- package/core/dev/plans/ANSUZ_SLIM_PLAN.md +68 -0
- package/core/plugins/kenaz/commands/Amelia.md +1 -1
- package/core/plugins/kenaz/commands/Ansuz.md +36 -35
- package/core/plugins/kenaz/hooks/hooks.json +1 -5
- package/core/plugins/kenaz/hooks/kenaz-hook.js +0 -4
- package/core/plugins/kenaz/scripts/kenaz-mode.js +11 -1
- package/core/plugins/kenaz/scripts/kenaz.test.js +1 -1
- package/core/plugins/kenaz/scripts/sync.js +6 -2
- package/core/plugins/kenaz/scripts/ygg.js +13 -1
- package/core/plugins/kenaz/skills/product_manager/SKILL.md +12 -12
- package/lib/cli.js +47 -6
- package/lib/cli.test.js +24 -0
- package/lib/dashboard.js +10 -0
- package/package.json +11 -7
- package/vendor/install-kenaz-cli.js +18 -7
- package/core/.formation/tools/broadcast.js +0 -103
- package/core/.formation/tools/dispatch-dryrun.test.js +0 -54
- package/core/.formation/tools/dispatch-notifier.js +0 -84
- package/core/.formation/tools/formations.js +0 -1203
- package/core/.formation/tools/headless-branch-recovery.test.js +0 -64
- package/core/.formation/tools/headless-dryrun.test.js +0 -79
- package/core/.formation/tools/headless-v2.js +0 -659
- package/core/.formation/tools/headless.js +0 -1071
- package/core/.formation/tools/legacy-scheduler.js +0 -1994
- package/core/.formation/tools/logger.js +0 -273
- package/core/.formation/tools/memory-loader.js +0 -422
- package/core/.formation/tools/process-state.js +0 -33
- package/core/.formation/tools/remote-conflict.js +0 -98
- package/core/.formation/tools/runner.js +0 -1332
- package/core/.formation/tools/task-utils.js +0 -344
- package/core/.formation/tools/task2028-headless-worktree.test.js +0 -112
- package/core/.formation/tools/tests/headless-mcp-args-plumbing.test.js +0 -123
- package/core/.formation/tools/worktree-leak.test.js +0 -162
- package/core/.specialist/tools/__tests__/task-1863-boot-lease-reuse.test.js +0 -99
- package/core/.specialist/tools/__tests__/task-1977-banner-cap.test.js +0 -129
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const fs = require('fs');
|
|
4
|
-
const path = require('path');
|
|
5
|
-
const { ROOT } = require('./utils');
|
|
6
|
-
|
|
7
|
-
function getDispatchNotificationFile(corePath = ROOT) {
|
|
8
|
-
return path.join(corePath, '.formation', '.dispatch-notifications.json');
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function readDispatchNotifications(corePath = ROOT) {
|
|
12
|
-
const file = getDispatchNotificationFile(corePath);
|
|
13
|
-
try {
|
|
14
|
-
if (fs.existsSync(file)) {
|
|
15
|
-
const parsed = JSON.parse(fs.readFileSync(file, 'utf-8'));
|
|
16
|
-
return Array.isArray(parsed) ? parsed : [];
|
|
17
|
-
}
|
|
18
|
-
} catch {}
|
|
19
|
-
return [];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function writeDispatchNotifications(list, corePath = ROOT) {
|
|
23
|
-
const file = getDispatchNotificationFile(corePath);
|
|
24
|
-
try {
|
|
25
|
-
fs.writeFileSync(file, JSON.stringify(list, null, 2));
|
|
26
|
-
} catch {}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function enqueueDispatchNotification(event, corePath = ROOT) {
|
|
30
|
-
if (!event || !event.originSessionId || !event.taskId || !event.status) return null;
|
|
31
|
-
|
|
32
|
-
const list = readDispatchNotifications(corePath);
|
|
33
|
-
const notification = {
|
|
34
|
-
id: event.id || `dispatch-${event.taskId}-${Date.now()}`,
|
|
35
|
-
originSessionId: event.originSessionId,
|
|
36
|
-
taskId: event.taskId,
|
|
37
|
-
status: event.status,
|
|
38
|
-
summary: event.summary || '',
|
|
39
|
-
formation: event.formation || 'unit',
|
|
40
|
-
skill: event.skill || 'do',
|
|
41
|
-
dispatchSessionId: event.dispatchSessionId || null,
|
|
42
|
-
projectPath: event.projectPath || null,
|
|
43
|
-
logPath: event.logPath || null,
|
|
44
|
-
metadata: event.metadata || {},
|
|
45
|
-
createdAt: event.createdAt || new Date().toISOString(),
|
|
46
|
-
};
|
|
47
|
-
list.push(notification);
|
|
48
|
-
writeDispatchNotifications(list, corePath);
|
|
49
|
-
return notification;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function takeDispatchNotifications(originSessionId, corePath = ROOT) {
|
|
53
|
-
if (!originSessionId) return [];
|
|
54
|
-
const list = readDispatchNotifications(corePath);
|
|
55
|
-
if (list.length === 0) return [];
|
|
56
|
-
|
|
57
|
-
const matches = [];
|
|
58
|
-
const remaining = [];
|
|
59
|
-
for (const item of list) {
|
|
60
|
-
if (item && item.originSessionId === originSessionId) {
|
|
61
|
-
matches.push(item);
|
|
62
|
-
} else {
|
|
63
|
-
remaining.push(item);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (matches.length > 0) {
|
|
68
|
-
if (remaining.length === 0) {
|
|
69
|
-
try { fs.unlinkSync(getDispatchNotificationFile(corePath)); } catch {}
|
|
70
|
-
} else {
|
|
71
|
-
writeDispatchNotifications(remaining, corePath);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return matches;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
module.exports = {
|
|
79
|
-
getDispatchNotificationFile,
|
|
80
|
-
readDispatchNotifications,
|
|
81
|
-
writeDispatchNotifications,
|
|
82
|
-
enqueueDispatchNotification,
|
|
83
|
-
takeDispatchNotifications,
|
|
84
|
-
};
|