kenaz 0.3.18 → 0.3.19
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/agent-worker.md +1 -1
- package/core/.claude/commands/architect.md +1 -2
- package/core/.claude/commands/spec.md +1 -1
- package/core/.claude/commands//347/224/242/345/223/201.md +1 -1
- package/core/.claude/hooks/__tests__/task-1977-dedupe-guard.test.js +8 -8
- package/core/.claude/skills/architect_agent/SKILL.md +11 -92
- package/core/.claude/skills/assessment_agent/SKILL.md +0 -1
- package/core/.claude/skills/backend_engineer/SKILL.md +3 -6
- package/core/.claude/skills/code_reviewer/SKILL.md +1 -1
- package/core/.claude/skills/code_reviewer/patterns.yaml +1 -1
- package/core/.claude/skills/designer/SKILL.md +3 -6
- package/core/.claude/skills/dev_agent/SKILL.md +30 -491
- package/core/.claude/skills/developer/SKILL.md +3 -6
- package/core/.claude/skills/feature_agent/SKILL.md +3 -17
- package/core/.claude/skills/product_manager/SKILL.md +29 -1064
- package/core/.claude/skills/qa_engineer/SKILL.md +12 -17
- package/core/.claude/skills/spec_optimizer/SKILL.md +25 -275
- package/core/.claude/skills/sre_agent/SKILL.md +3 -6
- package/core/.collaboration/README.md +2 -3
- package/core/.collaboration/core/task-api.js +5 -138
- package/core/.collaboration/docs/CLI.md +0 -2
- package/core/.failure/INDEX.yaml +6 -40
- package/core/.failure/agent-execution/FAIL-013-search-cwd-drift-and-case-mismatch.yaml +1 -1
- package/core/.failure/tools/README.md +9 -227
- package/core/.formation/bifrost/launch.js +1 -6
- package/core/.formation/bifrost/launch.test.js +1 -1
- package/core/.formation/bifrost/shared/ansuz-boot-policy.js +3 -3
- package/core/.formation/bifrost/shared/ansuz-boot-policy.test.js +1 -2
- package/core/.formation/tools/__tests__/m1-hmap-convid.test.js +1 -124
- package/core/.formation/tools/dispatch.js +1 -1
- package/core/.formation/tools/loader.js +17 -140
- package/core/.formation/tools/post-complete.js +0 -31
- package/core/.rule/INDEX.yaml +0 -18
- package/core/.rule/general/agent-workflow.yaml +14 -164
- package/core/.rule/general/project-self-containment.yaml +8 -19
- package/core/.rule/general/rust-verify-target.yaml +6 -5
- package/core/.rule/general/synapse-code-intelligence.yaml +3 -3
- package/core/.specialist/Amelia/capability.yaml +12 -12
- package/core/.specialist/Amelia/workflow.yaml +2 -2
- package/core/.specialist/Ansuz/SYSTEM_DOC.md +20 -578
- package/core/.specialist/Ansuz/cognitive_principles.yaml +2 -3
- package/core/.specialist/Ansuz/concepts/boot_rules_summary.yaml +0 -1
- package/core/.specialist/Ansuz/concepts/deep_knowledge_pointers.yaml +1 -2
- package/core/.specialist/Ansuz/core.yaml +6 -108
- package/core/.specialist/Ansuz/guards/lesson_guards.yaml +0 -3
- package/core/.specialist/Ansuz/identity_contract.yaml +0 -1
- package/core/.specialist/Ansuz/knowledge.yaml +0 -4
- package/core/.specialist/Ansuz/rule.yaml +0 -1
- package/core/.specialist/Ansuz/tools/handoff-session-identity.test.js +6 -150
- package/core/.specialist/tests/runtime-discovery/README.md +1 -1
- package/core/.specialist/tools/__tests__/task-2374-usage-counter.test.js +1 -12
- package/core/.specialist/tools/prompt-files.test.js +1 -0
- package/core/.specialist/tools/task-bridge.js +1 -66
- package/core/.system/README.md +11 -552
- package/core/.system/collaboration/README.md +10 -174
- package/core/CLAUDE.md +1 -6
- package/core/KENAZ_CORE_VERSION +1 -1
- package/core/dev/scripts/js-yaml-resolution.test.js +1 -1
- package/core/dev/scripts/run-rust-tests.js +9 -45
- package/core/dev/scripts/rust-verify-worktree.js +4 -4
- package/core/dev/scripts/verify-target-dir.js +6 -6
- package/core/plugins/kenaz/INVENTORY.md +8 -8
- package/core/plugins/kenaz/commands/architect.md +1 -2
- package/core/plugins/kenaz/commands/spec.md +1 -1
- package/core/plugins/kenaz/commands//347/224/242/345/223/201.md +1 -1
- package/core/plugins/kenaz/guidance.md +1 -1
- package/core/plugins/kenaz/scripts/sync.js +1 -1
- package/core/plugins/kenaz/skills/architect_agent/SKILL.md +11 -92
- package/core/plugins/kenaz/skills/assessment_agent/SKILL.md +0 -1
- package/core/plugins/kenaz/skills/backend_engineer/SKILL.md +3 -6
- package/core/plugins/kenaz/skills/code_reviewer/SKILL.md +1 -1
- package/core/plugins/kenaz/skills/code_reviewer/patterns.yaml +1 -1
- package/core/plugins/kenaz/skills/designer/SKILL.md +3 -6
- package/core/plugins/kenaz/skills/dev_agent/SKILL.md +30 -491
- package/core/plugins/kenaz/skills/developer/SKILL.md +3 -6
- package/core/plugins/kenaz/skills/feature_agent/SKILL.md +3 -17
- package/core/plugins/kenaz/skills/product_manager/SKILL.md +29 -1064
- package/core/plugins/kenaz/skills/qa_engineer/SKILL.md +12 -17
- package/core/plugins/kenaz/skills/spec_optimizer/SKILL.md +25 -275
- package/core/plugins/kenaz/skills/sre_agent/SKILL.md +3 -6
- package/package.json +6 -6
- package/core/.claude/commands/archive.md +0 -24
- package/core/.claude/commands/init.md +0 -112
- package/core/.claude/commands/legacy_dev.md +0 -18
- package/core/.claude/commands/product-review.md +0 -131
- package/core/.claude/commands/strategy.md +0 -141
- package/core/.claude/commands/sunny.md +0 -1
- package/core/.claude/commands//347/224/242/345/223/201/346/252/242/350/246/226.md +0 -129
- package/core/.claude/commands//351/200/262/345/272/246.md +0 -15
- package/core/.claude/hooks/__tests__/substrate.test.js +0 -122
- package/core/.claude/hooks/_substrate-paths.js +0 -95
- package/core/.claude/hooks/context-check.js +0 -51
- package/core/.claude/hooks/fatigue-check.js +0 -52
- package/core/.claude/hooks/handoff-snapshot-on-commit.js +0 -154
- package/core/.claude/hooks/handoff-snapshot-on-question.js +0 -158
- package/core/.claude/hooks/handoff-staleness.js +0 -197
- package/core/.claude/hooks/jev-thalamus-context.js +0 -17
- package/core/.claude/hooks/jev-thalamus-context.test.js +0 -41
- package/core/.claude/hooks/lease-release.js +0 -119
- package/core/.claude/hooks/lease-touch.js +0 -96
- package/core/.claude/hooks/reflex-feedback.js +0 -5
- package/core/.claude/hooks/session-init.ps1 +0 -49
- package/core/.claude/hooks/sound-event.js +0 -70
- package/core/.claude/hooks/sound-event.sh +0 -37
- package/core/.claude/hooks/stream-delta.js +0 -169
- package/core/.claude/no-hooks.settings.json +0 -3
- package/core/.claude/skills/legacy_dev/SKILL.md +0 -202
- package/core/.claude/skills/sunny/SKILL.md +0 -74
- package/core/.collaboration/cli/commands/assign.js +0 -39
- package/core/.collaboration/cli/commands/claim.js +0 -33
- package/core/.collaboration/cli/commands/complete.js +0 -44
- package/core/.collaboration/cli/commands/create.js +0 -110
- package/core/.collaboration/cli/commands/get.js +0 -83
- package/core/.collaboration/cli/commands/index.js +0 -52
- package/core/.collaboration/cli/commands/list.js +0 -51
- package/core/.collaboration/cli/commands/lock.js +0 -45
- package/core/.collaboration/cli/commands/rebuild.js +0 -39
- package/core/.collaboration/cli/commands/search.js +0 -61
- package/core/.collaboration/cli/commands/stats.js +0 -61
- package/core/.collaboration/cli/commands/transfer.js +0 -41
- package/core/.collaboration/cli/commands/unlock.js +0 -48
- package/core/.collaboration/cli/formatters/help-formatter.js +0 -70
- package/core/.collaboration/cli/formatters/index.js +0 -7
- package/core/.collaboration/cli/task-cli.js +0 -46
- package/core/.collaboration/cli/utils/arg-parser.js +0 -74
- package/core/.collaboration/cli/utils/git-user.js +0 -25
- package/core/.collaboration/cli/utils/index.js +0 -9
- package/core/.collaboration/cli/utils/output.js +0 -10
- package/core/.collaboration/config/default.yaml +0 -189
- package/core/.collaboration/core/conflict-resolver.js +0 -461
- package/core/.collaboration/core/conflict-resolver.test.js +0 -389
- package/core/.collaboration/core/migrate-legacy.js +0 -260
- package/core/.collaboration/docs/API.md +0 -787
- package/core/.collaboration/docs/ARCHITECTURE.md +0 -596
- package/core/.collaboration/docs/FAQ.md +0 -695
- package/core/.collaboration/docs/MIGRATION.md +0 -804
- package/core/.collaboration/docs/examples/README.md +0 -320
- package/core/.collaboration/docs/examples/advanced-queries.js +0 -261
- package/core/.collaboration/docs/examples/basic-usage.js +0 -184
- package/core/.collaboration/docs/examples/team-workflow.js +0 -352
- package/core/.failure/agent-execution/FAIL-001-agent-no-output.yaml +0 -391
- package/core/.failure/agent-execution/FAIL-007-pm-lead-wrong-team-invocation.yaml +0 -0
- package/core/.failure/agent-execution/FAIL-010-phase0-poem-format-skipped.yaml +0 -28
- package/core/.failure/agent-execution/FAIL-010-skipping-cognitive-checkpoint-after-verification.yaml +0 -59
- package/core/.failure/agent-execution/FAIL-012-grep-shortcut-during-investigation.yaml +0 -85
- package/core/.failure/architecture/FAIL-006-python-version-compatibility.yaml +0 -445
- package/core/.failure/pipeline/FAIL-003-queue-pollution.yaml +0 -335
- package/core/.failure/pipeline/README.md +0 -95
- package/core/.failure/retired/FAIL-009-skipping-synapse-pulse-before-code-change.yaml +0 -49
- package/core/.failure/tools/USAGE_GUIDE.md +0 -323
- package/core/.failure/tools/check_failures.ps1 +0 -387
- package/core/.failure/tools/log_failure.ps1 +0 -474
- package/core/.formation/.episode-input.json +0 -10
- package/core/.formation/.merge-lock +0 -1
- package/core/.formation/lead.yaml +0 -118
- package/core/.formation/legacy.bak/designer.yaml +0 -57
- package/core/.formation/legacy.bak/pm.yaml +0 -57
- package/core/.formation/legacy.bak/qa.yaml +0 -57
- package/core/.formation/legacy.bak/review.yaml +0 -62
- package/core/.formation/legacy.bak/scheduler.yaml +0 -129
- package/core/.formation/legacy.bak/sre.yaml +0 -57
- package/core/.formation/role-map.yaml +0 -274
- package/core/.formation/roles/_shared/modules/code_review.yaml +0 -98
- package/core/.formation/roles/_shared/modules/security.yaml +0 -103
- package/core/.formation/roles/_shared/modules/testing.yaml +0 -14
- package/core/.formation/roles/backend/role.yaml +0 -93
- package/core/.formation/roles/code_reviewer/role.yaml +0 -102
- package/core/.formation/roles/database_optimizer/role.yaml +0 -107
- package/core/.formation/roles/designer/role.yaml +0 -66
- package/core/.formation/roles/developer/role.yaml +0 -75
- package/core/.formation/roles/frontend/role.yaml +0 -134
- package/core/.formation/roles/incident_response/role.yaml +0 -89
- package/core/.formation/roles/qa/role.yaml +0 -89
- package/core/.formation/roles/security/role.yaml +0 -87
- package/core/.formation/roles/sre/role.yaml +0 -66
- package/core/.formation/skills/coordinator.yaml +0 -52
- package/core/.formation/solo/diagnosis.yaml +0 -78
- package/core/.formation/solo/strategy.yaml +0 -121
- package/core/.formation/tests/hello.txt +0 -2
- package/core/.formation/tools/coordinator.js +0 -350
- package/core/.formation/tools/jev-correction.js +0 -214
- package/core/.formation/tools/jev-correction.test.js +0 -178
- package/core/.formation/tools/log-reader.js +0 -232
- package/core/.formation/tools/revert-daemon-state.js +0 -162
- package/core/.formation/tools/test-drift.js +0 -148
- package/core/.formation/unit/heimdall.yaml +0 -96
- package/core/.formation/unit/plan.yaml +0 -67
- package/core/.formation/unit/think.yaml +0 -58
- package/core/.kenaz/MUNINN_SNAPSHOT9_EPISODE.json +0 -32
- package/core/.kenaz/MUNINN_SNAPSHOT9_RUNE.json +0 -23
- package/core/.kenaz/MUNINN_SNAPSHOT9_SUMMARY.md +0 -89
- package/core/.kenaz/ash_TASK_1428-20260507.json +0 -14
- package/core/.kenaz/muninn_episode_write.ps1 +0 -17
- package/core/.kenaz/muninn_snapshot11_rune_candidates.md +0 -63
- package/core/.kenaz/muninn_snapshot1_rune_candidates.md +0 -49
- package/core/.kenaz/runes_TASK_1428.json +0 -57
- package/core/.kenaz/tmp_heimdall_proposal_8d3e392.json +0 -13
- package/core/.kenaz/tmp_props.json +0 -1
- package/core/.kenaz/tmp_sounddrop_t1_prompt.txt +0 -371
- package/core/.rule/MECHANIZED.md +0 -61
- package/core/.rule/general/cortex-memory-recall.yaml +0 -446
- package/core/.rule/general/pipeline.yaml +0 -246
- package/core/.rule/general/sunny-access-control.yaml +0 -60
- package/core/.rule/general/system-invariants.yaml +0 -231
- package/core/.rule/pipeline/PPL-002-completed-task-archival.yaml +0 -528
- package/core/.rule/pipeline/auto-update.yaml +0 -282
- package/core/.rule/pipeline/task-execution.yaml +0 -365
- package/core/.specialist/Ansuz/concepts/phase_protocol.yaml +0 -65
- package/core/.specialist/Ansuz/experiments/boot_ablation_replay.js +0 -197
- package/core/.specialist/Ansuz/tools/bootstrap-anchors.js +0 -289
- package/core/.specialist/Ansuz/workflow.yaml +0 -1225
- package/core/.specialist/experiments/rg_benchmark.js +0 -523
- package/core/.specialist/experiments/rg_benchmark_results.json +0 -27
- package/core/.specialist/tools/jev-optional-context.js +0 -107
- package/core/.specialist/tools/jev-optional-context.test.js +0 -152
- package/core/.specialist/tools/memory-action-log.js +0 -839
- package/core/.specialist/tools/phase-gate.js +0 -3534
- package/core/.specialist/tools/phase-gate.test.js +0 -85
- package/core/.specialist/tools/precompute-runner.js +0 -444
- package/core/.specialist/tools/rule-engine.js +0 -621
- package/core/.specialist/tools/task-bridge-jev.test.js +0 -170
- package/core/.synapse/memory-shared.json.sync +0 -1
- package/core/.system/agent-skills/README.md +0 -724
- package/core/.system/cli-tools/README.md +0 -724
- package/core/.system/cortex/MODULES.md +0 -1046
- package/core/.system/dashboard/FRONTEND.md +0 -812
- package/core/.system/dashboard/README.md +0 -737
- package/core/.system/failure/README.md +0 -723
- package/core/.system/formation/LEGACY_SKILLS.md +0 -974
- package/core/.system/formation/POST_COMPLETE.md +0 -602
- package/core/.system/formation/README.md +0 -1094
- package/core/.system/formation/TOOLS_REFERENCE.md +0 -1145
- package/core/.system/kenaz/README.md +0 -787
- package/core/.system/memory/README.md +0 -719
- package/core/.system/pipeline/README.md +0 -712
- package/core/.system/rule/README.md +0 -794
- package/core/.system/sunny/README.md +0 -476
- package/core/.system/sunny/RULES.json +0 -89
- package/core/.system/sunny/knowledge/INDEX.md +0 -37
- package/core/.system/sunny/knowledge/agent-teams-api.md +0 -0
- package/core/.system/sunny/knowledge/ansuz-specialist.md +0 -500
- package/core/.system/sunny/knowledge/claude-cli-spawn.md +0 -177
- package/core/.system/sunny/knowledge/collaboration-api.md +0 -925
- package/core/.system/sunny/teammates/README.md +0 -107
- package/core/.system/sunny/teammates/how_to_use.yaml +0 -101
- package/core/.system/sunny/teammates/tools/headless/launcher.js +0 -318
- package/core/.system/sunny/teammates/tools/powershell/launcher.js +0 -241
- package/core/.system/sunny/teammates/tools/powershell/start.bat +0 -50
- package/core/.system/sunny/teammates/tools/utils/env.js +0 -96
- package/core/.system/sunny/teammates/tools/utils/format-output.js +0 -329
- package/core/.system/sunny/tools.json +0 -101
- package/core/dev/scripts/cleanup-queue.js +0 -184
- package/core/dev/scripts/cleanup_queue.js +0 -86
- package/core/dev/scripts/legacy/README.md +0 -39
- package/core/dev/scripts/legacy/dev_agent_scheduler.ps1.bak +0 -536
- package/core/dev/scripts/legacy/multi_agent_scheduler.ps1.bak +0 -1978
- package/core/dev/scripts/matrix/CLI_README.md +0 -214
- package/core/dev/scripts/matrix/README.md +0 -310
- package/core/dev/scripts/matrix/package-lock.json +0 -4266
- package/core/dev/scripts/matrix/package.json +0 -55
- package/core/dev/scripts/matrix/src/abbreviations.ts +0 -295
- package/core/dev/scripts/matrix/src/cli/commands/convert.ts +0 -211
- package/core/dev/scripts/matrix/src/cli/commands/create.ts +0 -95
- package/core/dev/scripts/matrix/src/cli/commands/delete.ts +0 -102
- package/core/dev/scripts/matrix/src/cli/commands/list-tags.ts.wip +0 -140
- package/core/dev/scripts/matrix/src/cli/commands/manage-tags.ts.wip +0 -173
- package/core/dev/scripts/matrix/src/cli/commands/query.ts +0 -261
- package/core/dev/scripts/matrix/src/cli/commands/read.ts +0 -77
- package/core/dev/scripts/matrix/src/cli/commands/stats.ts.wip +0 -168
- package/core/dev/scripts/matrix/src/cli/commands/tokens.ts.wip +0 -126
- package/core/dev/scripts/matrix/src/cli/commands/update.ts +0 -147
- package/core/dev/scripts/matrix/src/cli/commands/validate.ts +0 -275
- package/core/dev/scripts/matrix/src/cli/index.ts +0 -350
- package/core/dev/scripts/matrix/src/cli/utils/file-handler.ts +0 -72
- package/core/dev/scripts/matrix/src/cli/utils/logger.ts +0 -65
- package/core/dev/scripts/matrix/src/index.ts +0 -62
- package/core/dev/scripts/matrix/src/indexer/tag-indexer.ts +0 -165
- package/core/dev/scripts/matrix/src/parser.ts +0 -281
- package/core/dev/scripts/matrix/src/serializer.ts +0 -151
- package/core/dev/scripts/matrix/src/validator.ts +0 -301
- package/core/dev/scripts/matrix/tests/abbreviations.test.ts +0 -122
- package/core/dev/scripts/matrix/tests/cli.test.ts +0 -177
- package/core/dev/scripts/matrix/tests/convert.test.ts +0 -143
- package/core/dev/scripts/matrix/tests/parser.test.ts +0 -203
- package/core/dev/scripts/matrix/tests/query.test.ts +0 -85
- package/core/dev/scripts/matrix/tests/serializer.test.ts +0 -197
- package/core/dev/scripts/matrix/tests/validate.test.ts +0 -141
- package/core/dev/scripts/matrix/tests/validator.test.ts +0 -167
- package/core/dev/scripts/matrix/tsconfig.json +0 -20
- package/core/dev/scripts/matrix/types/index.d.ts +0 -111
- package/core/dev/scripts/matrix/types/index.d.ts.map +0 -1
- package/core/dev/scripts/matrix/types/index.js +0 -8
- package/core/dev/scripts/matrix/types/index.js.map +0 -1
- package/core/dev/scripts/matrix/types/index.ts +0 -124
- package/core/dev/scripts/memory-usage-report.js +0 -152
- package/core/dev/scripts/probe/ansuz-scaffold-ablation.js +0 -579
- package/core/dev/scripts/probe/ansuz-scaffold-ablation.test.js +0 -244
- package/core/dev/scripts/probe/hook-latency-probe.js +0 -315
- package/core/dev/scripts/probe/hook-latency-probe.test.js +0 -105
- package/core/dev/scripts/probe/prediction-signal-auc.js +0 -483
- package/core/dev/scripts/probe/prediction-signal-auc.test.js +0 -200
- package/core/dev/scripts/test-pty-ws-tunnel.js +0 -229
- package/core/dev/scripts/validate_pipeline.js +0 -197
- package/core/dev/spikes/task2145-evidence-20261004/backend-log-excerpt.txt +0 -56
- package/core/dev/spikes/task2145-evidence-20261004/graph.shadow +0 -0
- package/core/dev/spikes/task2145-evidence-20261004/graph.wal +0 -0
- package/core/dev/spikes/task2145-evidence-20261004/graph_corrupt_suspect.marker +0 -1
- package/core/plugins/kenaz/commands/strategy.md +0 -141
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* test-pty-ws-tunnel.js — Diagnostic tool for the PTY WebSocket tunnel chain.
|
|
4
|
-
*
|
|
5
|
-
* Tests each stage of the tunnel chain and reports pass/fail:
|
|
6
|
-
* Stage 1: WebSocket upgrade to relay /api/pty/session/:id with auth
|
|
7
|
-
* Stage 2: Relay sends ws_open to local tunnel_client (inferred via ws_opened reply)
|
|
8
|
-
* Stage 3: Local tunnel_client sends ws_opened back through tunnel
|
|
9
|
-
* Stage 4: Round-trip data — send test data, verify it echoes back
|
|
10
|
-
* Stage 5: Clean close
|
|
11
|
-
*
|
|
12
|
-
* Usage:
|
|
13
|
-
* node dev/scripts/test-pty-ws-tunnel.js \
|
|
14
|
-
* --relay-url wss://your-relay.run.app \
|
|
15
|
-
* --token <session_jwt> \
|
|
16
|
-
* --session-id <pty_session_uuid>
|
|
17
|
-
*
|
|
18
|
-
* Or via env vars:
|
|
19
|
-
* RELAY_URL=... SESSION_TOKEN=... PTY_SESSION_ID=... node dev/scripts/test-pty-ws-tunnel.js
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
const { WebSocket } = require('ws');
|
|
23
|
-
|
|
24
|
-
// ---------------------------------------------------------------------------
|
|
25
|
-
// Config
|
|
26
|
-
// ---------------------------------------------------------------------------
|
|
27
|
-
|
|
28
|
-
function parseArgs() {
|
|
29
|
-
const args = process.argv.slice(2);
|
|
30
|
-
const get = (flag) => {
|
|
31
|
-
const i = args.indexOf(flag);
|
|
32
|
-
return i !== -1 ? args[i + 1] : undefined;
|
|
33
|
-
};
|
|
34
|
-
return {
|
|
35
|
-
relayUrl: get('--relay-url') ?? process.env.RELAY_URL ?? 'ws://localhost:3001',
|
|
36
|
-
token: get('--token') ?? process.env.SESSION_TOKEN ?? '',
|
|
37
|
-
sessionId: get('--session-id') ?? process.env.PTY_SESSION_ID ?? 'test-session-00000000',
|
|
38
|
-
timeout: parseInt(get('--timeout') ?? process.env.TIMEOUT_MS ?? '8000', 10),
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// ---------------------------------------------------------------------------
|
|
43
|
-
// Logging helpers
|
|
44
|
-
// ---------------------------------------------------------------------------
|
|
45
|
-
|
|
46
|
-
const PASS = '\x1b[32m[PASS]\x1b[0m';
|
|
47
|
-
const FAIL = '\x1b[31m[FAIL]\x1b[0m';
|
|
48
|
-
const INFO = '\x1b[36m[INFO]\x1b[0m';
|
|
49
|
-
const WARN = '\x1b[33m[WARN]\x1b[0m';
|
|
50
|
-
|
|
51
|
-
function log(label, msg) {
|
|
52
|
-
console.log(`${label} ${msg}`);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// ---------------------------------------------------------------------------
|
|
56
|
-
// Main diagnostic
|
|
57
|
-
// ---------------------------------------------------------------------------
|
|
58
|
-
|
|
59
|
-
async function runDiagnostic(cfg) {
|
|
60
|
-
const results = [];
|
|
61
|
-
const record = (stage, pass, detail) => {
|
|
62
|
-
const status = pass ? PASS : FAIL;
|
|
63
|
-
log(status, `Stage ${stage}: ${detail}`);
|
|
64
|
-
results.push({ stage, pass, detail });
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
const wsUrl = `${cfg.relayUrl}/api/pty/session/${cfg.sessionId}`;
|
|
68
|
-
log(INFO, `Relay PTY endpoint: ${wsUrl}`);
|
|
69
|
-
log(INFO, `PTY session ID: ${cfg.sessionId}`);
|
|
70
|
-
log(INFO, `Timeout: ${cfg.timeout}ms`);
|
|
71
|
-
console.log('');
|
|
72
|
-
|
|
73
|
-
// -------------------------------------------------------------------------
|
|
74
|
-
// Stage 1: WebSocket upgrade
|
|
75
|
-
// -------------------------------------------------------------------------
|
|
76
|
-
let ws;
|
|
77
|
-
try {
|
|
78
|
-
ws = await new Promise((resolve, reject) => {
|
|
79
|
-
const headers = cfg.token
|
|
80
|
-
? { Authorization: `Bearer ${cfg.token}` }
|
|
81
|
-
: {};
|
|
82
|
-
|
|
83
|
-
const socket = new WebSocket(wsUrl, { headers });
|
|
84
|
-
const timer = setTimeout(() => {
|
|
85
|
-
socket.terminate();
|
|
86
|
-
reject(new Error('WebSocket upgrade timed out'));
|
|
87
|
-
}, cfg.timeout);
|
|
88
|
-
|
|
89
|
-
socket.on('open', () => {
|
|
90
|
-
clearTimeout(timer);
|
|
91
|
-
resolve(socket);
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
socket.on('error', (err) => {
|
|
95
|
-
clearTimeout(timer);
|
|
96
|
-
reject(err);
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
socket.on('unexpected-response', (_req, res) => {
|
|
100
|
-
clearTimeout(timer);
|
|
101
|
-
reject(new Error(`HTTP ${res.statusCode} — upgrade rejected`));
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
record(1, true, `WebSocket upgrade succeeded to ${wsUrl}`);
|
|
105
|
-
} catch (err) {
|
|
106
|
-
record(1, false, `WebSocket upgrade failed: ${err.message}`);
|
|
107
|
-
printSummary(results);
|
|
108
|
-
process.exit(1);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// -------------------------------------------------------------------------
|
|
112
|
-
// Stage 2 + 3: Relay bridges raw PTY frames (not JSON protocol messages).
|
|
113
|
-
// When ws_open succeeds, the local tunnel_client connects to PTY WS and
|
|
114
|
-
// starts forwarding raw binary frames. The relay decodes base64url and sends
|
|
115
|
-
// raw bytes to the remote browser WS. So we expect raw terminal output
|
|
116
|
-
// (escape sequences, text), NOT JSON ws_opened messages.
|
|
117
|
-
// -------------------------------------------------------------------------
|
|
118
|
-
let ptyDataReceived = false;
|
|
119
|
-
let firstDataPreview = '';
|
|
120
|
-
|
|
121
|
-
const messagePromise = new Promise((resolve) => {
|
|
122
|
-
const timer = setTimeout(() => resolve(null), cfg.timeout);
|
|
123
|
-
|
|
124
|
-
ws.on('message', (data) => {
|
|
125
|
-
clearTimeout(timer);
|
|
126
|
-
const buf = Buffer.isBuffer(data) ? data : Buffer.from(data);
|
|
127
|
-
ptyDataReceived = true;
|
|
128
|
-
// Show printable ASCII subset for preview
|
|
129
|
-
firstDataPreview = buf.toString('utf8').replace(/[\x00-\x1f]/g, '.').slice(0, 80);
|
|
130
|
-
resolve(buf);
|
|
131
|
-
});
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
const received = await messagePromise;
|
|
135
|
-
|
|
136
|
-
if (received === null) {
|
|
137
|
-
record(2, false, 'No data received from relay within timeout — local daemon may not be running or PTY session invalid');
|
|
138
|
-
record(3, false, 'PTY data not forwarded (Stage 2 failed)');
|
|
139
|
-
} else if (ptyDataReceived) {
|
|
140
|
-
record(2, true, `Relay forwarded ws_open to local, local connected to PTY (${received.length} bytes received)`);
|
|
141
|
-
record(3, true, `Raw PTY output received: "${firstDataPreview}"`);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// -------------------------------------------------------------------------
|
|
145
|
-
// Stage 4: Round-trip data — send a command and verify we get output back.
|
|
146
|
-
// The relay bridges raw frames, so we send raw text and expect raw output.
|
|
147
|
-
// -------------------------------------------------------------------------
|
|
148
|
-
if (ptyDataReceived) {
|
|
149
|
-
// Send a unique echo command to verify round-trip
|
|
150
|
-
const marker = `kenaz-test-${Date.now()}`;
|
|
151
|
-
ws.send(`echo ${marker}\r`);
|
|
152
|
-
|
|
153
|
-
const echoPromise = new Promise((resolve) => {
|
|
154
|
-
let accumulated = '';
|
|
155
|
-
const timer = setTimeout(() => resolve(accumulated), cfg.timeout);
|
|
156
|
-
const onMsg = (data) => {
|
|
157
|
-
const text = Buffer.isBuffer(data) ? data.toString('utf8') : data.toString();
|
|
158
|
-
accumulated += text;
|
|
159
|
-
if (accumulated.includes(marker)) {
|
|
160
|
-
clearTimeout(timer);
|
|
161
|
-
ws.off('message', onMsg);
|
|
162
|
-
resolve(accumulated);
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
ws.on('message', onMsg);
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
const echoResult = await echoPromise;
|
|
169
|
-
if (echoResult && echoResult.includes(marker)) {
|
|
170
|
-
record(4, true, `Round-trip verified: echo marker "${marker}" received back`);
|
|
171
|
-
} else if (echoResult) {
|
|
172
|
-
record(4, false, `Data received but marker not found. Got ${echoResult.length} chars: "${echoResult.replace(/[\x00-\x1f]/g, '.').slice(0, 80)}"`);
|
|
173
|
-
} else {
|
|
174
|
-
record(4, false, 'No echo response received within timeout');
|
|
175
|
-
}
|
|
176
|
-
} else {
|
|
177
|
-
record(4, false, 'Skipped — no PTY data received (connection not established)');
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
// -------------------------------------------------------------------------
|
|
181
|
-
// Stage 5: Clean close
|
|
182
|
-
// -------------------------------------------------------------------------
|
|
183
|
-
try {
|
|
184
|
-
await new Promise((resolve) => {
|
|
185
|
-
ws.on('close', resolve);
|
|
186
|
-
ws.close(1000, 'diagnostic-complete');
|
|
187
|
-
setTimeout(resolve, 2000); // fallback
|
|
188
|
-
});
|
|
189
|
-
record(5, true, 'WebSocket closed cleanly (code 1000)');
|
|
190
|
-
} catch (err) {
|
|
191
|
-
record(5, false, `Close error: ${err.message}`);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
// -------------------------------------------------------------------------
|
|
195
|
-
// Summary
|
|
196
|
-
// -------------------------------------------------------------------------
|
|
197
|
-
printSummary(results);
|
|
198
|
-
const allPassed = results.every((r) => r.pass);
|
|
199
|
-
process.exit(allPassed ? 0 : 1);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
function printSummary(results) {
|
|
203
|
-
const passed = results.filter((r) => r.pass).length;
|
|
204
|
-
const total = results.length;
|
|
205
|
-
console.log('');
|
|
206
|
-
console.log('─'.repeat(60));
|
|
207
|
-
console.log(`Result: ${passed}/${total} stages passed`);
|
|
208
|
-
if (passed === total) {
|
|
209
|
-
console.log('\x1b[32mTunnel chain is healthy.\x1b[0m');
|
|
210
|
-
} else {
|
|
211
|
-
console.log('\x1b[31mTunnel chain has failures — see above.\x1b[0m');
|
|
212
|
-
}
|
|
213
|
-
console.log('─'.repeat(60));
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
// ---------------------------------------------------------------------------
|
|
217
|
-
// Entry point
|
|
218
|
-
// ---------------------------------------------------------------------------
|
|
219
|
-
|
|
220
|
-
const cfg = parseArgs();
|
|
221
|
-
|
|
222
|
-
if (!cfg.token) {
|
|
223
|
-
log(WARN, 'No --token / SESSION_TOKEN provided — relay will reject with 1008 Unauthorized');
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
runDiagnostic(cfg).catch((err) => {
|
|
227
|
-
log(FAIL, `Unexpected error: ${err.message}`);
|
|
228
|
-
process.exit(1);
|
|
229
|
-
});
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Pipeline Validation Script (Node.js version)
|
|
4
|
-
* Validates TASK_QUEUE.json consistency with actual state
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
const fs = require('fs');
|
|
8
|
-
const path = require('path');
|
|
9
|
-
|
|
10
|
-
let errorCount = 0;
|
|
11
|
-
let warningCount = 0;
|
|
12
|
-
|
|
13
|
-
function check(message, status) {
|
|
14
|
-
const symbols = {
|
|
15
|
-
OK: '✅',
|
|
16
|
-
ERROR: '❌',
|
|
17
|
-
WARNING: '⚠️ ',
|
|
18
|
-
INFO: 'ℹ️ '
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
console.log(` ${symbols[status]} ${message}`);
|
|
22
|
-
|
|
23
|
-
if (status === 'ERROR') errorCount++;
|
|
24
|
-
if (status === 'WARNING') warningCount++;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
console.log('');
|
|
28
|
-
console.log('============================================================');
|
|
29
|
-
console.log(' Pipeline Validation');
|
|
30
|
-
console.log('============================================================');
|
|
31
|
-
console.log('');
|
|
32
|
-
|
|
33
|
-
// Check 1: TASK_QUEUE.json exists and is valid JSON
|
|
34
|
-
console.log('[1/6] Checking TASK_QUEUE.json...');
|
|
35
|
-
|
|
36
|
-
const queuePath = 'dev/pipeline/TASK_QUEUE.json';
|
|
37
|
-
if (!fs.existsSync(queuePath)) {
|
|
38
|
-
check('TASK_QUEUE.json does not exist', 'ERROR');
|
|
39
|
-
process.exit(1);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
let queue;
|
|
43
|
-
try {
|
|
44
|
-
const content = fs.readFileSync(queuePath, 'utf8');
|
|
45
|
-
queue = JSON.parse(content);
|
|
46
|
-
check('TASK_QUEUE.json format is valid', 'OK');
|
|
47
|
-
} catch (error) {
|
|
48
|
-
check(`TASK_QUEUE.json JSON parse error: ${error.message}`, 'ERROR');
|
|
49
|
-
process.exit(1);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// Check 2: Completed tasks must be in completed/ directory
|
|
53
|
-
console.log('');
|
|
54
|
-
console.log('[2/6] Checking completed task file locations...');
|
|
55
|
-
|
|
56
|
-
const completedTasks = queue.tasks.filter(t => t.status === 'completed');
|
|
57
|
-
let missingFiles = [];
|
|
58
|
-
|
|
59
|
-
for (const task of completedTasks) {
|
|
60
|
-
const expectedPath = `dev/pipeline/completed/${task.source_file}`;
|
|
61
|
-
if (!fs.existsSync(expectedPath)) {
|
|
62
|
-
check(`${task.id} marked as completed, but file not in completed/`, 'ERROR');
|
|
63
|
-
missingFiles.push(task.id);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (missingFiles.length === 0) {
|
|
68
|
-
check(`All completed task files in correct location (${completedTasks.length} tasks)`, 'OK');
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Check 3: tasks/ directory should not have completed tasks
|
|
72
|
-
console.log('');
|
|
73
|
-
console.log('[3/6] Checking tasks/ directory for completed tasks...');
|
|
74
|
-
|
|
75
|
-
const tasksDir = 'dev/pipeline/tasks';
|
|
76
|
-
let wrongLocationTasks = [];
|
|
77
|
-
|
|
78
|
-
if (fs.existsSync(tasksDir)) {
|
|
79
|
-
const taskFiles = fs.readdirSync(tasksDir).filter(f => f.startsWith('TASK_') && f.endsWith('.yaml'));
|
|
80
|
-
|
|
81
|
-
for (const file of taskFiles) {
|
|
82
|
-
const taskId = file.replace(/_.*$/, '');
|
|
83
|
-
const task = queue.tasks.find(t => t.id === taskId);
|
|
84
|
-
|
|
85
|
-
if (task && task.status === 'completed') {
|
|
86
|
-
check(`${taskId} marked as completed, but file still in tasks/`, 'ERROR');
|
|
87
|
-
wrongLocationTasks.push(taskId);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (wrongLocationTasks.length === 0) {
|
|
93
|
-
check('No completed tasks in tasks/ directory', 'OK');
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// Check 4: Statistics must match actual counts
|
|
97
|
-
console.log('');
|
|
98
|
-
console.log('[4/6] Checking statistics consistency...');
|
|
99
|
-
|
|
100
|
-
const actualPending = queue.tasks.filter(t => t.status === 'pending').length;
|
|
101
|
-
const actualInProgress = queue.tasks.filter(t => t.status === 'in_progress').length;
|
|
102
|
-
const actualBlocked = queue.tasks.filter(t => t.status === 'blocked').length;
|
|
103
|
-
const actualCompleted = queue.tasks.filter(t => t.status === 'completed').length;
|
|
104
|
-
const actualTotal = queue.tasks.length;
|
|
105
|
-
|
|
106
|
-
let statsCorrect = true;
|
|
107
|
-
|
|
108
|
-
if (actualPending !== queue.statistics.pending) {
|
|
109
|
-
check(`statistics.pending incorrect: ${queue.statistics.pending} (actual: ${actualPending})`, 'ERROR');
|
|
110
|
-
statsCorrect = false;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
if (actualInProgress !== queue.statistics.in_progress) {
|
|
114
|
-
check(`statistics.in_progress incorrect: ${queue.statistics.in_progress} (actual: ${actualInProgress})`, 'ERROR');
|
|
115
|
-
statsCorrect = false;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
if (actualBlocked !== queue.statistics.blocked) {
|
|
119
|
-
check(`statistics.blocked incorrect: ${queue.statistics.blocked} (actual: ${actualBlocked})`, 'ERROR');
|
|
120
|
-
statsCorrect = false;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
if (actualCompleted !== queue.statistics.completed) {
|
|
124
|
-
check(`statistics.completed incorrect: ${queue.statistics.completed} (actual: ${actualCompleted})`, 'ERROR');
|
|
125
|
-
statsCorrect = false;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
if (actualTotal !== queue.statistics.total) {
|
|
129
|
-
check(`statistics.total incorrect: ${queue.statistics.total} (actual: ${actualTotal})`, 'ERROR');
|
|
130
|
-
statsCorrect = false;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
if (statsCorrect) {
|
|
134
|
-
check(`Statistics correct (pending: ${actualPending}, in_progress: ${actualInProgress}, completed: ${actualCompleted})`, 'OK');
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// Check 5: Completed tasks must have complete metadata
|
|
138
|
-
console.log('');
|
|
139
|
-
console.log('[5/6] Checking completed task metadata...');
|
|
140
|
-
|
|
141
|
-
let incompleteMetadata = [];
|
|
142
|
-
|
|
143
|
-
for (const task of completedTasks) {
|
|
144
|
-
const missing = [];
|
|
145
|
-
|
|
146
|
-
if (!task.completed_at) missing.push('completed_at');
|
|
147
|
-
if (!task.completed_by) missing.push('completed_by');
|
|
148
|
-
|
|
149
|
-
if (missing.length > 0) {
|
|
150
|
-
check(`${task.id} missing metadata: ${missing.join(', ')}`, 'WARNING');
|
|
151
|
-
incompleteMetadata.push(task.id);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
if (incompleteMetadata.length === 0) {
|
|
156
|
-
check('All completed tasks have complete metadata', 'OK');
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// Check 6: PROGRESS.md exists
|
|
160
|
-
console.log('');
|
|
161
|
-
console.log('[6/6] Checking PROGRESS.md...');
|
|
162
|
-
|
|
163
|
-
const progressPath = 'dev/pipeline/PROGRESS.md';
|
|
164
|
-
if (!fs.existsSync(progressPath)) {
|
|
165
|
-
check('PROGRESS.md does not exist', 'WARNING');
|
|
166
|
-
} else {
|
|
167
|
-
check('PROGRESS.md exists and is readable', 'OK');
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
// Summary
|
|
171
|
-
console.log('');
|
|
172
|
-
console.log('============================================================');
|
|
173
|
-
console.log(' Validation Result');
|
|
174
|
-
console.log('============================================================');
|
|
175
|
-
console.log('');
|
|
176
|
-
|
|
177
|
-
if (errorCount === 0 && warningCount === 0) {
|
|
178
|
-
console.log(' ✅ Pipeline state is fully consistent!');
|
|
179
|
-
console.log('');
|
|
180
|
-
console.log(' Statistics:');
|
|
181
|
-
console.log(` - Pending: ${actualPending}`);
|
|
182
|
-
console.log(` - In Progress: ${actualInProgress}`);
|
|
183
|
-
console.log(` - Blocked: ${actualBlocked}`);
|
|
184
|
-
console.log(` - Completed: ${actualCompleted}`);
|
|
185
|
-
console.log(` - Total: ${actualTotal}`);
|
|
186
|
-
console.log('');
|
|
187
|
-
process.exit(0);
|
|
188
|
-
} else {
|
|
189
|
-
console.log(' ❌ Issues found:');
|
|
190
|
-
console.log(` - Errors: ${errorCount}`);
|
|
191
|
-
console.log(` - Warnings: ${warningCount}`);
|
|
192
|
-
console.log('');
|
|
193
|
-
console.log(' 💡 Suggested fix:');
|
|
194
|
-
console.log(' node dev/scripts/fix_pipeline.js');
|
|
195
|
-
console.log('');
|
|
196
|
-
process.exit(1);
|
|
197
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
2026-10-03T21:07:10.515249Z INFO MCP tool call tool="synapse_efe_feedback" plugin=None
|
|
2
|
-
2026-10-03T21:07:45.377199Z INFO MCP tool call tool="alaya_recall" plugin=None
|
|
3
|
-
2026-10-03T21:07:53.574088Z WARN [session_watcher] reflex check: role=assistant, text_len=119, blocks=1, project_path=Some("C:/Users/user/Documents/GitHub/KenazAI")
|
|
4
|
-
2026-10-03T21:07:53.574900Z WARN [session_watcher] reflex check: role=assistant, text_len=119, blocks=1, project_path=Some("C:/Users/user/Documents/GitHub/KenazAI")
|
|
5
|
-
2026-10-03T21:07:54.168238Z INFO MCP tool call tool="cortex_recall" plugin=None
|
|
6
|
-
2026-10-03T21:07:54.372461Z INFO MCP tool call tool="alaya_recall" plugin=None
|
|
7
|
-
2026-10-03T21:07:54.728901Z INFO MCP tool call tool="hippocampus_episode_recall" plugin=None
|
|
8
|
-
2026-10-03T21:07:55.213271Z INFO MCP tool call tool="synapse_health" plugin=None
|
|
9
|
-
2026-10-03T21:08:37.929534Z WARN [session_watcher] reflex check: role=assistant, text_len=2101, blocks=1, project_path=Some("C:/Users/user/Documents/GitHub/KenazAI")
|
|
10
|
-
2026-10-03T21:08:37.930488Z WARN [session_watcher] reflex check: role=assistant, text_len=2101, blocks=1, project_path=Some("C:/Users/user/Documents/GitHub/KenazAI")
|
|
11
|
-
2026-10-03T21:10:36.990645Z INFO MCP tool call tool="synapse_efe_feedback" plugin=None
|
|
12
|
-
2026-10-03T21:10:37.101533Z INFO MCP tool call tool="synapse_efe_feedback" plugin=None
|
|
13
|
-
2026-10-03T21:10:47.558693Z WARN [session_watcher] reflex check: role=assistant, text_len=153, blocks=1, project_path=Some("C:/Users/user/Documents/GitHub/KenazAI")
|
|
14
|
-
2026-10-03T21:10:47.558790Z WARN [session_watcher] reflex check: role=assistant, text_len=153, blocks=1, project_path=Some("C:/Users/user/Documents/GitHub/KenazAI")
|
|
15
|
-
2026-10-03T21:12:34.601726Z INFO backend logging initialized version="0.2.263" pid=8024 started_at=2026-10-04 05:12:34.601 profile="debug" log_path=C:\Users\user\AppData\Local\Kenaz Dashboard\backend.log
|
|
16
|
-
2026-10-03T21:12:34.601803Z INFO startup mark label="after_init_tracing" t_ms=3 thread=main
|
|
17
|
-
2026-10-03T21:12:35.010413Z INFO startup mark label="setup_entry" t_ms=411 thread=main
|
|
18
|
-
2026-10-03T21:12:35.015743Z INFO startup mark label="mcp_servers_spawn_issued" t_ms=417 thread=main
|
|
19
|
-
2026-10-03T21:12:35.015846Z INFO startup mark label="mcp_servers_task_entered" t_ms=417 thread=tokio-runtime-worker
|
|
20
|
-
2026-10-03T21:12:35.016550Z INFO startup mark label="mcp_servers_start_done" t_ms=417 thread=tokio-runtime-worker
|
|
21
|
-
2026-10-03T21:12:35.262343Z INFO startup mark label="onnx_preload_dylib_done" t_ms=663 thread=main
|
|
22
|
-
2026-10-03T21:12:35.262445Z INFO startup mark label="onnx_warmup_thread_spawn_issued" t_ms=663 thread=main
|
|
23
|
-
2026-10-03T21:12:35.262574Z INFO startup mark label="delta_graph_recovery_thread_spawn_issued" t_ms=664 thread=main
|
|
24
|
-
2026-10-03T21:12:35.262763Z INFO startup mark label="sleep_cycle_daemon_spawn_issued" t_ms=664 thread=main
|
|
25
|
-
2026-10-03T21:12:35.262754Z INFO startup mark label="onnx_warmup_begin" t_ms=664 thread=onnx-warmup
|
|
26
|
-
2026-10-03T21:12:35.262886Z INFO startup mark label="delta_graph_recovery_begin" t_ms=664 thread=delta-gap-recovery
|
|
27
|
-
2026-10-03T21:12:35.265586Z INFO startup mark label="http_sidecar_task_spawn_issued" t_ms=667 thread=main
|
|
28
|
-
2026-10-03T21:12:35.265647Z INFO startup mark label="auto_index_watcher_spawn_issued" t_ms=667 thread=main
|
|
29
|
-
2026-10-03T21:12:35.265727Z INFO startup mark label="http_sidecar_task_entered" t_ms=667 thread=tokio-runtime-worker
|
|
30
|
-
2026-10-03T21:12:35.265789Z INFO startup mark label="setup_fn_returning" t_ms=667 thread=main
|
|
31
|
-
2026-10-03T21:12:35.265824Z INFO startup mark label="auto_index_watcher_task_entered" t_ms=667 thread=tokio-runtime-worker
|
|
32
|
-
2026-10-03T21:12:35.291199Z INFO [synapse] IS_INDEXING set — indexing started project=C:/Users/user/Documents/GitHub/KenazAI mode="incremental"
|
|
33
|
-
2026-10-03T21:12:35.291229Z INFO [synapse] reindex phase transition phase="init" project=C:/Users/user/Documents/GitHub/KenazAI
|
|
34
|
-
2026-10-03T21:12:35.358777Z INFO Loading ONNX embedding model [query] (ArcticEmbedXs, dim=384) from C:\Users\user\Documents\GitHub\KenazAI\dashboard\src-tauri\target\debug\resources\onnx\arctic-embed-xs
|
|
35
|
-
2026-10-03T21:12:35.635924Z INFO Embedding engine [query] loaded successfully (ArcticEmbedXs, dim=384, outputs=["last_hidden_state"], token_type_ids=true)
|
|
36
|
-
2026-10-03T21:12:35.636005Z INFO startup mark label="onnx_warmup_done" t_ms=1037 thread=onnx-warmup
|
|
37
|
-
2026-10-03T21:12:36.101980Z INFO startup mark label="http_server_start_begin" t_ms=1503 thread=tokio-runtime-worker
|
|
38
|
-
2026-10-03T21:12:36.119887Z INFO startup mark label="http_server_start_ready" t_ms=1521 thread=tokio-runtime-worker
|
|
39
|
-
2026-10-03T21:12:36.122223Z INFO synapse worker forwarder configuration workers_enabled=true current_project=C:/Users/user/Documents/GitHub/KenazAI
|
|
40
|
-
2026-10-03T21:12:36.122290Z INFO reaper armed leaseless_idle_secs=300 leased_idle_secs=900 tick_secs=60 per_worker_rss_cap_mb=400 total_rss_cap_mb=1200 max_workers=3
|
|
41
|
-
2026-10-03T21:12:36.275465Z INFO startup mark label="ready_wait_end" t_ms=1676 thread=tokio-runtime-worker
|
|
42
|
-
2026-10-03T21:12:37.479820Z INFO [synapse] reindex phase transition phase="kuzu_write_start:2_files" project=C:/Users/user/Documents/GitHub/KenazAI
|
|
43
|
-
2026-10-03T21:12:37.815038Z ERROR [conn pool] GRAPH CORRUPT SUSPECT for C:/Users/user/Documents/GitHub/KenazAI\.synapse\db\graph: Failed to DETACH DELETE Symbol nodes for dashboard/src-tauri/src/features/synapse/scanner.rs: Query execution failed: kuzu native exception 0xC0000005 — no further kuzu calls will be issued against this Database for the rest of this process's lifetime (persisted; the next start will also refuse it). Recovery: rebuild_graph.
|
|
44
|
-
2026-10-03T21:12:37.815639Z ERROR [synapse] dashboard/src-tauri/src/features/synapse/scanner.rs write hit a native ACCESS_VIOLATION — graph marked corrupt_suspect, aborting the round instead of quarantining just this file: Failed to DETACH DELETE Symbol nodes for dashboard/src-tauri/src/features/synapse/scanner.rs: Query execution failed: kuzu native exception 0xC0000005
|
|
45
|
-
2026-10-03T21:12:37.815845Z ERROR Incremental index round aborted mid-batch (with_connection closure returned Err): Failed to DETACH DELETE Symbol nodes for dashboard/src-tauri/src/features/synapse/scanner.rs: Query execution failed: kuzu native exception 0xC0000005. Recording phase=failed and NOT advancing last_commit_hash, so the file(s) that caused this are retried (re-appear in the git diff) on the next incremental cycle instead of being permanently skipped.
|
|
46
|
-
2026-10-03T21:12:37.823713Z INFO [synapse] IS_INDEXING cleared project=C:/Users/user/Documents/GitHub/KenazAI
|
|
47
|
-
2026-10-03T21:12:39.477700Z INFO [synapse spool] drain: attempted=1 replayed=0 still_pending=1 dead_lettered=0
|
|
48
|
-
2026-10-03T21:12:40.139564Z INFO startup mark label="session_watcher_start_begin" t_ms=5541 thread=tokio-runtime-worker
|
|
49
|
-
2026-10-03T21:12:40.139634Z INFO startup mark label="session_watcher_start_done" t_ms=5541 thread=tokio-runtime-worker
|
|
50
|
-
2026-10-03T21:12:40.139740Z INFO [session_watcher] Watching "C:\\Users\\user\\.claude\\projects\\C--Users-user-Documents-GitHub-KenazAI" (notify + polling fallback)
|
|
51
|
-
2026-10-03T21:12:44.502961Z INFO startup mark label="synapse_kuzu_memorydb_open_done" t_ms=9904 thread=delta-gap-recovery
|
|
52
|
-
2026-10-03T21:12:44.680900Z INFO startup mark label="delta_graph_recovery_done" t_ms=10082 thread=delta-gap-recovery
|
|
53
|
-
2026-10-03T21:12:44.706667Z INFO startup mark label="heat_cache_load_done" t_ms=10108 thread=delta-gap-recovery
|
|
54
|
-
2026-10-03T21:13:01.645377Z INFO MCP tool call tool="synapse_efe_feedback" plugin=None
|
|
55
|
-
2026-10-03T21:13:01.645462Z INFO MCP tool call tool="synapse_efe_feedback" plugin=None
|
|
56
|
-
2026-10-03T21:13:01.650906Z INFO MCP tool call tool="synapse_cypher" plugin=None
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Failed to DETACH DELETE Symbol nodes for dashboard/src-tauri/src/features/synapse/scanner.rs: Query execution failed: kuzu native exception 0xC0000005
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
# /strategy - 策略智庫團隊
|
|
2
|
-
|
|
3
|
-
調用 Strategy Team 進行設計思考、方案討論、決策建議。
|
|
4
|
-
|
|
5
|
-
## 用法
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
/strategy "您的問題或需求"
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## 範例
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
# 架構決策
|
|
15
|
-
/strategy "我們應該使用單體架構還是微服務架構?"
|
|
16
|
-
|
|
17
|
-
# 技術選型
|
|
18
|
-
/strategy "資料庫應該選擇 PostgreSQL 還是 MongoDB?"
|
|
19
|
-
|
|
20
|
-
# 功能評估
|
|
21
|
-
/strategy "這個 AI 助手功能值得開發嗎?需要投入多少資源?"
|
|
22
|
-
|
|
23
|
-
# 方案設計
|
|
24
|
-
/strategy "如何設計一個可擴展到千萬用戶的系統?"
|
|
25
|
-
|
|
26
|
-
# 風險分析
|
|
27
|
-
/strategy "重構代碼庫有哪些潛在風險?如何緩解?"
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## 團隊特色
|
|
31
|
-
|
|
32
|
-
- 🧠 **7 個專業成員**:產品、技術、UX、商業、創新、風險、策略
|
|
33
|
-
- 💬 **成員互相討論**:就像真實的策略會議
|
|
34
|
-
- 🤝 **與您互動**:主動提問、澄清需求
|
|
35
|
-
- 📊 **方案對比**:提供 2-3 個可行方案
|
|
36
|
-
- ⚖️ **權衡分析**:清楚說明每個方案的優缺點
|
|
37
|
-
|
|
38
|
-
## 輸出
|
|
39
|
-
|
|
40
|
-
1. **問題分析**
|
|
41
|
-
2. **團隊討論摘要**(成員之間的對話)
|
|
42
|
-
3. **2-3 個方案選項**
|
|
43
|
-
4. **建議報告**(包含推薦方案與理由)
|
|
44
|
-
5. **風險分析與緩解策略**
|
|
45
|
-
6. **下一步行動計劃**
|
|
46
|
-
|
|
47
|
-
## 執行時間
|
|
48
|
-
|
|
49
|
-
- 人類預估:8-16 小時(策略會議 + 分析 + 報告)
|
|
50
|
-
- Agent 預估:20-30 分鐘(AI 討論與分析)
|
|
51
|
-
- 效率提升:約 30 倍
|
|
52
|
-
|
|
53
|
-
## 調用邏輯
|
|
54
|
-
|
|
55
|
-
當用戶執行 `/strategy` 時:
|
|
56
|
-
|
|
57
|
-
1. 讀取 Strategy Agent Skill 定義
|
|
58
|
-
2. 啟動策略分析流程
|
|
59
|
-
3. 多視角獨立分析
|
|
60
|
-
4. 向用戶提問(使用 AskUserQuestion)
|
|
61
|
-
5. 設計 2-3 個方案
|
|
62
|
-
6. 提出建議報告
|
|
63
|
-
7. 記錄決策過程
|
|
64
|
-
|
|
65
|
-
## 團隊成員
|
|
66
|
-
|
|
67
|
-
| 成員 | 視角 | 關注點 |
|
|
68
|
-
|------|------|--------|
|
|
69
|
-
| Strategy Lead | 整合 | 協調、綜合、達成共識 |
|
|
70
|
-
| Product Strategist | 產品 | 用戶價值、功能優先級 |
|
|
71
|
-
| Technical Architect | 技術 | 可行性、架構設計 |
|
|
72
|
-
| UX Strategist | UX | 用戶體驗、交互設計 |
|
|
73
|
-
| Business Analyst | 商業 | ROI、成本效益 |
|
|
74
|
-
| Innovation Specialist | 創新 | 新技術、突破性方案 |
|
|
75
|
-
| Risk Analyst | 風險 | 風險識別、緩解策略 |
|
|
76
|
-
|
|
77
|
-
## 適用場景
|
|
78
|
-
|
|
79
|
-
✅ **推薦使用**:
|
|
80
|
-
- 面對複雜決策(架構、技術選型)
|
|
81
|
-
- 需要多視角分析
|
|
82
|
-
- 需要評估商業價值
|
|
83
|
-
- 需要風險分析
|
|
84
|
-
- 需要創新方案
|
|
85
|
-
|
|
86
|
-
❌ **不推薦使用**:
|
|
87
|
-
- 已有明確方案(直接用執行團隊)
|
|
88
|
-
- 簡單 Bug 修復
|
|
89
|
-
- 緊急問題(需要快速響應)
|
|
90
|
-
- 日常維護工作
|
|
91
|
-
|
|
92
|
-
## 與其他團隊的區別
|
|
93
|
-
|
|
94
|
-
| 特性 | Strategy Team | Developer/Backend Team |
|
|
95
|
-
|------|---------------|----------------------|
|
|
96
|
-
| 職責 | 設計思考、方案建議 | 代碼實現、功能開發 |
|
|
97
|
-
| 輸出 | 建議報告、方案文檔 | 代碼、Git commits |
|
|
98
|
-
| 時間 | 20-30 分鐘 | 5-15 分鐘 |
|
|
99
|
-
| 價值 | 決策支援、風險規避 | 快速執行、交付功能 |
|
|
100
|
-
|
|
101
|
-
## 範例輸出
|
|
102
|
-
|
|
103
|
-
```markdown
|
|
104
|
-
# 建議報告:資料庫選型
|
|
105
|
-
|
|
106
|
-
## Executive Summary
|
|
107
|
-
建議使用 PostgreSQL + Redis 組合方案,平衡性能、可擴展性與成本。
|
|
108
|
-
|
|
109
|
-
## Options
|
|
110
|
-
|
|
111
|
-
### 選項 1:PostgreSQL + Redis(推薦)⭐
|
|
112
|
-
優點:成熟穩定、團隊熟悉、成本可控
|
|
113
|
-
缺點:垂直擴展有上限
|
|
114
|
-
ROI:高
|
|
115
|
-
|
|
116
|
-
### 選項 2:MongoDB + ElasticSearch
|
|
117
|
-
優點:水平擴展能力強
|
|
118
|
-
缺點:學習成本高、複雜查詢較弱
|
|
119
|
-
ROI:中
|
|
120
|
-
|
|
121
|
-
### 選項 3:Supabase(雲原生)
|
|
122
|
-
優點:運維成本低、快速上線
|
|
123
|
-
缺點:雲服務依賴、長期成本高
|
|
124
|
-
ROI:中
|
|
125
|
-
|
|
126
|
-
## Recommendation
|
|
127
|
-
推薦選項 1,理由:
|
|
128
|
-
1. 符合團隊技能
|
|
129
|
-
2. 可擴展到千萬級
|
|
130
|
-
3. 成本最優
|
|
131
|
-
|
|
132
|
-
## Next Steps
|
|
133
|
-
1. 建立 PostgreSQL PoC
|
|
134
|
-
2. 設計 Schema
|
|
135
|
-
3. 建立監控策略
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
**建立日期**: 2026-02-09
|
|
141
|
-
**適用版本**: Claude Code v1.0+
|