@aidemd-mcp/aidemd 0.0.0-stage → 0.21.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/.aide/bin/aide-tree.mjs +8 -0
- package/.aide/config/brain.aide +1449 -0
- package/.aide/docs/.aide +130 -0
- package/.aide/docs/agent-readable-code.md +74 -0
- package/.aide/docs/aide-spec.md +290 -0
- package/.aide/docs/aide-template.md +141 -0
- package/.aide/docs/automated-qa.md +111 -0
- package/.aide/docs/brain-aide.md +242 -0
- package/.aide/docs/brief-aide.md +124 -0
- package/.aide/docs/cascading-alignment.md +107 -0
- package/.aide/docs/index.md +52 -0
- package/.aide/docs/plan-aide.md +132 -0
- package/.aide/docs/progressive-disclosure.md +74 -0
- package/.aide/docs/session-aide.md +210 -0
- package/.aide/docs/todo-aide.md +82 -0
- package/.aide/intent.aide +71 -0
- package/.aide/readme.aide +343 -0
- package/.aide/reference/hooks/PostToolUse.md +24 -0
- package/.aide/reference/hooks/SessionEnd.md +22 -0
- package/.aide/reference/hooks/SessionStart.md +18 -0
- package/.aide/reference/hooks/Stop.md +18 -0
- package/.aide/reference/hooks/UserPromptSubmit.md +18 -0
- package/.aide/reference/hooks/index.md +36 -0
- package/.aide/reference/tools/aide_brain.md +34 -0
- package/.aide/reference/tools/aide_cleanup.md +31 -0
- package/.aide/reference/tools/aide_discover.md +40 -0
- package/.aide/reference/tools/aide_frontmatter.md +36 -0
- package/.aide/reference/tools/aide_info.md +33 -0
- package/.aide/reference/tools/aide_init.md +39 -0
- package/.aide/reference/tools/aide_inspect.md +27 -0
- package/.aide/reference/tools/aide_observer_end_session.md +36 -0
- package/.aide/reference/tools/aide_observer_event.md +52 -0
- package/.aide/reference/tools/aide_observer_start.md +45 -0
- package/.aide/reference/tools/aide_read.md +29 -0
- package/.aide/reference/tools/aide_scaffold.md +35 -0
- package/.aide/reference/tools/aide_upgrade.md +45 -0
- package/.aide/reference/tools/aide_validate.md +36 -0
- package/.aide/reference/tools/index.md +25 -0
- package/.aide/session.aide +774 -0
- package/.claude/.aide +316 -0
- package/.claude/agents/aide/aide-aligner.md +129 -0
- package/.claude/agents/aide/aide-architect.md +151 -0
- package/.claude/agents/aide/aide-auditor.md +100 -0
- package/.claude/agents/aide/aide-domain-expert.md +84 -0
- package/.claude/agents/aide/aide-explorer.md +63 -0
- package/.claude/agents/aide/aide-implementor.md +121 -0
- package/.claude/agents/aide/aide-maintainer.md +115 -0
- package/.claude/agents/aide/aide-qa.md +95 -0
- package/.claude/agents/aide/aide-spec-writer.md +220 -0
- package/.claude/agents/aide/aide-strategist.md +104 -0
- package/.claude/agents/aide/aide-upgrader.md +71 -0
- package/.claude/agents/kanban/kanban-maintainer.md +113 -0
- package/.claude/commands/aide/align.md +24 -0
- package/.claude/commands/aide/brain.md +169 -0
- package/.claude/commands/aide/build.md +22 -0
- package/.claude/commands/aide/fix.md +23 -0
- package/.claude/commands/aide/handoff.md +15 -0
- package/.claude/commands/aide/plan.md +32 -0
- package/.claude/commands/aide/qa.md +27 -0
- package/.claude/commands/aide/refactor.md +106 -0
- package/.claude/commands/aide/research.md +21 -0
- package/.claude/commands/aide/spec.md +35 -0
- package/.claude/commands/aide/synthesize.md +24 -0
- package/.claude/commands/aide/update-playbook.md +3 -0
- package/.claude/commands/aide/upgrade.md +158 -0
- package/.claude/commands/aide.md +13 -0
- package/.claude/skills/aide/SKILL.md +611 -0
- package/.claude/skills/aide-brain-author/SKILL.md +122 -0
- package/.claude/skills/aide-handoff/SKILL.md +56 -0
- package/.claude/skills/aide-observer/SKILL.md +94 -0
- package/.claude/skills/brain/SKILL.md +69 -0
- package/.claude/skills/kanban/SKILL.md +24 -0
- package/.claude/skills/study-playbook/SKILL.md +11 -0
- package/CHANGELOG.md +428 -0
- package/LICENSE +21 -0
- package/README.md +219 -2
- package/dist/cli/hook/findLinkedSession/index.d.ts +8 -0
- package/dist/cli/hook/findLinkedSession/index.js +18 -0
- package/dist/cli/hook/index.d.ts +21 -0
- package/dist/cli/hook/index.js +64 -0
- package/dist/cli/hook/mapHookEvent/index.d.ts +9 -0
- package/dist/cli/hook/mapHookEvent/index.js +25 -0
- package/dist/cli/hook/parseHookInput/index.d.ts +9 -0
- package/dist/cli/hook/parseHookInput/index.js +43 -0
- package/dist/cli/hook/readStdin/index.d.ts +10 -0
- package/dist/cli/hook/readStdin/index.js +25 -0
- package/dist/cli/hook/resolveHookRoot/index.d.ts +10 -0
- package/dist/cli/hook/resolveHookRoot/index.js +14 -0
- package/dist/cli/hook/types/index.d.ts +24 -0
- package/dist/cli/hook/types/index.js +1 -0
- package/dist/cli/index.d.ts +24 -0
- package/dist/cli/index.js +62 -0
- package/dist/cli/init/ensureGlobalAide/index.d.ts +19 -0
- package/dist/cli/init/ensureGlobalAide/index.js +36 -0
- package/dist/cli/init/ensureGlobalAide/installGlobalPackage/index.d.ts +8 -0
- package/dist/cli/init/ensureGlobalAide/installGlobalPackage/index.js +15 -0
- package/dist/cli/init/index.d.ts +82 -0
- package/dist/cli/init/index.js +465 -0
- package/dist/cli/init/renderWarning/index.d.ts +41 -0
- package/dist/cli/init/renderWarning/index.js +66 -0
- package/dist/cli/init/reportHooks/index.d.ts +31 -0
- package/dist/cli/init/reportHooks/index.js +75 -0
- package/dist/cli/init/types/index.d.ts +46 -0
- package/dist/cli/init/types/index.js +1 -0
- package/dist/cli/init/writeMcpEntry/index.d.ts +30 -0
- package/dist/cli/init/writeMcpEntry/index.js +81 -0
- package/dist/cli/isMainModule/index.d.ts +11 -0
- package/dist/cli/isMainModule/index.js +27 -0
- package/dist/cli/launchSync/index.d.ts +9 -0
- package/dist/cli/launchSync/index.js +40 -0
- package/dist/cli/shared/writeMcpEntry/index.d.ts +49 -0
- package/dist/cli/shared/writeMcpEntry/index.js +107 -0
- package/dist/cli/sync/index.d.ts +27 -0
- package/dist/cli/sync/index.js +125 -0
- package/dist/cli/tree/App/index.d.ts +14 -0
- package/dist/cli/tree/App/index.js +291 -0
- package/dist/cli/tree/DetailPanel/index.d.ts +28 -0
- package/dist/cli/tree/DetailPanel/index.js +77 -0
- package/dist/cli/tree/DetailPanel/renderPlanDetail/index.d.ts +20 -0
- package/dist/cli/tree/DetailPanel/renderPlanDetail/index.js +30 -0
- package/dist/cli/tree/DetailPanel/renderPlanDetail/parsePlanItems/index.d.ts +32 -0
- package/dist/cli/tree/DetailPanel/renderPlanDetail/parsePlanItems/index.js +80 -0
- package/dist/cli/tree/DetailPanel/renderTodoDetail/index.d.ts +17 -0
- package/dist/cli/tree/DetailPanel/renderTodoDetail/index.js +19 -0
- package/dist/cli/tree/DetailPanel/renderTodoDetail/parseTodoItems/index.d.ts +26 -0
- package/dist/cli/tree/DetailPanel/renderTodoDetail/parseTodoItems/index.js +48 -0
- package/dist/cli/tree/TreePanel/index.d.ts +24 -0
- package/dist/cli/tree/TreePanel/index.js +96 -0
- package/dist/cli/tree/findPrimaryIntent/index.d.ts +12 -0
- package/dist/cli/tree/findPrimaryIntent/index.js +20 -0
- package/dist/cli/tree/flattenTree/index.d.ts +16 -0
- package/dist/cli/tree/flattenTree/index.js +20 -0
- package/dist/cli/tree/index.d.ts +2 -0
- package/dist/cli/tree/index.js +15 -0
- package/dist/cli/view/awaitShutdown/index.d.ts +12 -0
- package/dist/cli/view/awaitShutdown/index.js +32 -0
- package/dist/cli/view/buildLink/index.d.ts +13 -0
- package/dist/cli/view/buildLink/index.js +18 -0
- package/dist/cli/view/formatPortNote/index.d.ts +10 -0
- package/dist/cli/view/formatPortNote/index.js +11 -0
- package/dist/cli/view/formatUsage/index.d.ts +6 -0
- package/dist/cli/view/formatUsage/index.js +24 -0
- package/dist/cli/view/index.d.ts +21 -0
- package/dist/cli/view/index.js +102 -0
- package/dist/cli/view/parseViewArgs/index.d.ts +14 -0
- package/dist/cli/view/parseViewArgs/index.js +59 -0
- package/dist/cli/view/types/index.d.ts +20 -0
- package/dist/cli/view/types/index.js +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +17 -0
- package/dist/observer/assets/Inter-OFL.txt +93 -0
- package/dist/observer/assets/JetBrainsMono-OFL.txt +93 -0
- package/dist/observer/assets/page.css +1 -0
- package/dist/observer/assets/page.js +158 -0
- package/dist/observer/assets/page.js.LEGAL.txt +56 -0
- package/dist/observer/bindServer/index.d.ts +17 -0
- package/dist/observer/bindServer/index.js +29 -0
- package/dist/observer/buildPageShell/index.d.ts +8 -0
- package/dist/observer/buildPageShell/index.js +30 -0
- package/dist/observer/buildProjectView/index.d.ts +12 -0
- package/dist/observer/buildProjectView/index.js +25 -0
- package/dist/observer/buildViewLink/index.d.ts +16 -0
- package/dist/observer/buildViewLink/index.js +15 -0
- package/dist/observer/createEventStore/index.d.ts +14 -0
- package/dist/observer/createEventStore/index.js +98 -0
- package/dist/observer/createStatusPusher/index.d.ts +16 -0
- package/dist/observer/createStatusPusher/index.js +40 -0
- package/dist/observer/createStop/index.d.ts +23 -0
- package/dist/observer/createStop/index.js +40 -0
- package/dist/observer/createStreamHub/frame/index.d.ts +6 -0
- package/dist/observer/createStreamHub/frame/index.js +4 -0
- package/dist/observer/createStreamHub/index.d.ts +13 -0
- package/dist/observer/createStreamHub/index.js +76 -0
- package/dist/observer/findRunningObserver/index.d.ts +12 -0
- package/dist/observer/findRunningObserver/index.js +33 -0
- package/dist/observer/findRunningObserver/probeIndex/index.d.ts +13 -0
- package/dist/observer/findRunningObserver/probeIndex/index.js +28 -0
- package/dist/observer/guardRequest/index.d.ts +20 -0
- package/dist/observer/guardRequest/index.js +38 -0
- package/dist/observer/guardRequest/matchesToken/index.d.ts +5 -0
- package/dist/observer/guardRequest/matchesToken/index.js +9 -0
- package/dist/observer/guardRequest/types/index.d.ts +8 -0
- package/dist/observer/guardRequest/types/index.js +1 -0
- package/dist/observer/handleRequest/index.d.ts +13 -0
- package/dist/observer/handleRequest/index.js +76 -0
- package/dist/observer/handleRequest/isTokenFree/index.d.ts +11 -0
- package/dist/observer/handleRequest/isTokenFree/index.js +12 -0
- package/dist/observer/handleRequest/matchRoute/index.d.ts +26 -0
- package/dist/observer/handleRequest/matchRoute/index.js +89 -0
- package/dist/observer/index.d.ts +23 -0
- package/dist/observer/index.js +112 -0
- package/dist/observer/listPorts/index.d.ts +9 -0
- package/dist/observer/listPorts/index.js +10 -0
- package/dist/observer/loadToken/index.d.ts +12 -0
- package/dist/observer/loadToken/index.js +46 -0
- package/dist/observer/loadToken/readStored/index.d.ts +4 -0
- package/dist/observer/loadToken/readStored/index.js +16 -0
- package/dist/observer/loadToken/writeTemp/index.d.ts +5 -0
- package/dist/observer/loadToken/writeTemp/index.js +8 -0
- package/dist/observer/locatePageAssets/index.d.ts +6 -0
- package/dist/observer/locatePageAssets/index.js +17 -0
- package/dist/observer/mintToken/index.d.ts +2 -0
- package/dist/observer/mintToken/index.js +6 -0
- package/dist/observer/rebuildStatus/index.d.ts +17 -0
- package/dist/observer/rebuildStatus/index.js +49 -0
- package/dist/observer/removeRecord/index.d.ts +10 -0
- package/dist/observer/removeRecord/index.js +22 -0
- package/dist/observer/replaySessions/index.d.ts +7 -0
- package/dist/observer/replaySessions/index.js +17 -0
- package/dist/observer/resolvePort/index.d.ts +12 -0
- package/dist/observer/resolvePort/index.js +21 -0
- package/dist/observer/routes/archiveSession/index.d.ts +11 -0
- package/dist/observer/routes/archiveSession/index.js +57 -0
- package/dist/observer/routes/deleteSession/index.d.ts +10 -0
- package/dist/observer/routes/deleteSession/index.js +33 -0
- package/dist/observer/routes/getAsset/index.d.ts +7 -0
- package/dist/observer/routes/getAsset/index.js +30 -0
- package/dist/observer/routes/getEvents/index.d.ts +3 -0
- package/dist/observer/routes/getEvents/index.js +13 -0
- package/dist/observer/routes/getFile/index.d.ts +7 -0
- package/dist/observer/routes/getFile/index.js +54 -0
- package/dist/observer/routes/getFile/resolveConfinedPath/index.d.ts +24 -0
- package/dist/observer/routes/getFile/resolveConfinedPath/index.js +65 -0
- package/dist/observer/routes/getIndex/index.d.ts +7 -0
- package/dist/observer/routes/getIndex/index.js +23 -0
- package/dist/observer/routes/getSessionPage/index.d.ts +8 -0
- package/dist/observer/routes/getSessionPage/index.js +10 -0
- package/dist/observer/routes/getStatus/index.d.ts +7 -0
- package/dist/observer/routes/getStatus/index.js +15 -0
- package/dist/observer/routes/getTask/index.d.ts +7 -0
- package/dist/observer/routes/getTask/index.js +47 -0
- package/dist/observer/routes/listArchived/index.d.ts +8 -0
- package/dist/observer/routes/listArchived/index.js +22 -0
- package/dist/observer/routes/listProjects/index.d.ts +3 -0
- package/dist/observer/routes/listProjects/index.js +9 -0
- package/dist/observer/routes/listSessions/index.d.ts +3 -0
- package/dist/observer/routes/listSessions/index.js +18 -0
- package/dist/observer/routes/postEvent/index.d.ts +12 -0
- package/dist/observer/routes/postEvent/index.js +76 -0
- package/dist/observer/routes/postEvent/readJsonBody/index.d.ts +18 -0
- package/dist/observer/routes/postEvent/readJsonBody/index.js +37 -0
- package/dist/observer/routes/postPresence/index.d.ts +12 -0
- package/dist/observer/routes/postPresence/index.js +63 -0
- package/dist/observer/routes/postShutdown/index.d.ts +13 -0
- package/dist/observer/routes/postShutdown/index.js +64 -0
- package/dist/observer/routes/restoreSession/index.d.ts +11 -0
- package/dist/observer/routes/restoreSession/index.js +46 -0
- package/dist/observer/routes/streamUpdates/index.d.ts +10 -0
- package/dist/observer/routes/streamUpdates/index.js +20 -0
- package/dist/observer/shared/announceSessions/index.d.ts +12 -0
- package/dist/observer/shared/announceSessions/index.js +20 -0
- package/dist/observer/shared/broadcastProjects/index.d.ts +10 -0
- package/dist/observer/shared/broadcastProjects/index.js +13 -0
- package/dist/observer/shared/buildObserverMessage/index.d.ts +8 -0
- package/dist/observer/shared/buildObserverMessage/index.js +20 -0
- package/dist/observer/shared/findProject/index.d.ts +12 -0
- package/dist/observer/shared/findProject/index.js +22 -0
- package/dist/observer/shared/pageAssets/index.d.ts +13 -0
- package/dist/observer/shared/pageAssets/index.js +16 -0
- package/dist/observer/shared/pageTitle/index.d.ts +7 -0
- package/dist/observer/shared/pageTitle/index.js +7 -0
- package/dist/observer/shared/parsePort/index.d.ts +12 -0
- package/dist/observer/shared/parsePort/index.js +15 -0
- package/dist/observer/shared/pickKanbanOverride/index.d.ts +10 -0
- package/dist/observer/shared/pickKanbanOverride/index.js +10 -0
- package/dist/observer/shared/pickReportedLocation/index.d.ts +13 -0
- package/dist/observer/shared/pickReportedLocation/index.js +18 -0
- package/dist/observer/shared/readHeldLiveness/index.d.ts +13 -0
- package/dist/observer/shared/readHeldLiveness/index.js +23 -0
- package/dist/observer/shared/routeTable/index.d.ts +131 -0
- package/dist/observer/shared/routeTable/index.js +31 -0
- package/dist/observer/shared/sendBody/index.d.ts +14 -0
- package/dist/observer/shared/sendBody/index.js +17 -0
- package/dist/observer/shared/sendJson/index.d.ts +12 -0
- package/dist/observer/shared/sendJson/index.js +15 -0
- package/dist/observer/shared/sendPage/index.d.ts +10 -0
- package/dist/observer/shared/sendPage/index.js +18 -0
- package/dist/observer/shared/shutdownRequest/index.d.ts +14 -0
- package/dist/observer/shared/shutdownRequest/index.js +7 -0
- package/dist/observer/shared/summarizeProjects/index.d.ts +14 -0
- package/dist/observer/shared/summarizeProjects/index.js +38 -0
- package/dist/observer/shared/summarizeSessions/index.d.ts +12 -0
- package/dist/observer/shared/summarizeSessions/index.js +30 -0
- package/dist/observer/shared/tokenFormat/index.d.ts +4 -0
- package/dist/observer/shared/tokenFormat/index.js +4 -0
- package/dist/observer/shared/wantsHtml/index.d.ts +8 -0
- package/dist/observer/shared/wantsHtml/index.js +10 -0
- package/dist/observer/takeOver/awaitExit/index.d.ts +10 -0
- package/dist/observer/takeOver/awaitExit/index.js +26 -0
- package/dist/observer/takeOver/index.d.ts +11 -0
- package/dist/observer/takeOver/index.js +27 -0
- package/dist/observer/takeOver/requestShutdown/index.d.ts +10 -0
- package/dist/observer/takeOver/requestShutdown/index.js +28 -0
- package/dist/observer/types/index.d.ts +214 -0
- package/dist/observer/types/index.js +1 -0
- package/dist/observer/writeRecord/index.d.ts +10 -0
- package/dist/observer/writeRecord/index.js +11 -0
- package/dist/service/brainContract/index.d.ts +113 -0
- package/dist/service/brainContract/index.js +107 -0
- package/dist/service/brainContract/launcherPurpose/index.d.ts +8 -0
- package/dist/service/brainContract/launcherPurpose/index.js +8 -0
- package/dist/service/brainContract/toMarkerPair/index.d.ts +11 -0
- package/dist/service/brainContract/toMarkerPair/index.js +12 -0
- package/dist/service/buildBrainState/classifyParseFailure/index.d.ts +17 -0
- package/dist/service/buildBrainState/classifyParseFailure/index.js +29 -0
- package/dist/service/buildBrainState/index.d.ts +84 -0
- package/dist/service/buildBrainState/index.js +177 -0
- package/dist/service/install/applySteps/index.d.ts +38 -0
- package/dist/service/install/applySteps/index.js +86 -0
- package/dist/service/install/configureIde/index.d.ts +25 -0
- package/dist/service/install/configureIde/index.js +143 -0
- package/dist/service/install/detectFramework/index.d.ts +11 -0
- package/dist/service/install/detectFramework/index.js +53 -0
- package/dist/service/install/index.d.ts +63 -0
- package/dist/service/install/index.js +138 -0
- package/dist/service/install/initContent/index.d.ts +158 -0
- package/dist/service/install/initContent/index.js +260 -0
- package/dist/service/install/installAgents/index.d.ts +16 -0
- package/dist/service/install/installAgents/index.js +55 -0
- package/dist/service/install/installAideTree/index.d.ts +15 -0
- package/dist/service/install/installAideTree/index.js +54 -0
- package/dist/service/install/installHooks/index.d.ts +24 -0
- package/dist/service/install/installHooks/index.js +68 -0
- package/dist/service/install/installMethodologyDocs/index.d.ts +16 -0
- package/dist/service/install/installMethodologyDocs/index.js +55 -0
- package/dist/service/install/installSkills/index.d.ts +16 -0
- package/dist/service/install/installSkills/index.js +55 -0
- package/dist/service/install/planSessionRecord/index.d.ts +16 -0
- package/dist/service/install/planSessionRecord/index.js +30 -0
- package/dist/service/install/provisionBrain/buildBrainAideStep/index.d.ts +25 -0
- package/dist/service/install/provisionBrain/buildBrainAideStep/index.js +60 -0
- package/dist/service/install/provisionBrain/buildBrainAideStep/summarizeBrainConfig/index.d.ts +14 -0
- package/dist/service/install/provisionBrain/buildBrainAideStep/summarizeBrainConfig/index.js +33 -0
- package/dist/service/install/provisionBrain/buildBrainAideStep/summarizeBrainConfig/listBrainSections/index.d.ts +10 -0
- package/dist/service/install/provisionBrain/buildBrainAideStep/summarizeBrainConfig/listBrainSections/index.js +19 -0
- package/dist/service/install/provisionBrain/detectBrainMigration/findLegacyLauncher/index.d.ts +17 -0
- package/dist/service/install/provisionBrain/detectBrainMigration/findLegacyLauncher/index.js +39 -0
- package/dist/service/install/provisionBrain/detectBrainMigration/findStaleSections/fingerprintSection/index.d.ts +11 -0
- package/dist/service/install/provisionBrain/detectBrainMigration/findStaleSections/fingerprintSection/index.js +20 -0
- package/dist/service/install/provisionBrain/detectBrainMigration/findStaleSections/index.d.ts +16 -0
- package/dist/service/install/provisionBrain/detectBrainMigration/findStaleSections/index.js +30 -0
- package/dist/service/install/provisionBrain/detectBrainMigration/index.d.ts +13 -0
- package/dist/service/install/provisionBrain/detectBrainMigration/index.js +32 -0
- package/dist/service/install/provisionBrain/index.d.ts +37 -0
- package/dist/service/install/provisionBrain/index.js +182 -0
- package/dist/service/install/provisionBrain/isTemplateIntegration/index.d.ts +14 -0
- package/dist/service/install/provisionBrain/isTemplateIntegration/index.js +24 -0
- package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/index.d.ts +73 -0
- package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/index.js +557 -0
- package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/complete/index.d.ts +13 -0
- package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/complete/index.js +51 -0
- package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/create/index.d.ts +13 -0
- package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/create/index.js +82 -0
- package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/manage/index.d.ts +13 -0
- package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/manage/index.js +86 -0
- package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/move/index.d.ts +12 -0
- package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/move/index.js +59 -0
- package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/review/index.d.ts +15 -0
- package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/review/index.js +274 -0
- package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/stash/index.d.ts +14 -0
- package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/stash/index.js +103 -0
- package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/work/index.d.ts +14 -0
- package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/work/index.js +332 -0
- package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/hub/index.d.ts +16 -0
- package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/hub/index.js +94 -0
- package/dist/service/install/provisionBrain/outdatedTemplateSections/index.d.ts +18 -0
- package/dist/service/install/provisionBrain/outdatedTemplateSections/index.js +164 -0
- package/dist/service/install/provisionBrain/parseBundledTemplate/index.d.ts +14 -0
- package/dist/service/install/provisionBrain/parseBundledTemplate/index.js +21 -0
- package/dist/service/install/provisionBrain/planBrainRepair/index.d.ts +26 -0
- package/dist/service/install/provisionBrain/planBrainRepair/index.js +47 -0
- package/dist/service/install/provisionBrain/readBrainMigrationNotice/index.d.ts +15 -0
- package/dist/service/install/provisionBrain/readBrainMigrationNotice/index.js +26 -0
- package/dist/service/install/reference/index.d.ts +24 -0
- package/dist/service/install/reference/index.js +51 -0
- package/dist/service/install/resolveBrainHints/index.d.ts +17 -0
- package/dist/service/install/resolveBrainHints/index.js +44 -0
- package/dist/service/install/scaffoldCommands/index.d.ts +42 -0
- package/dist/service/install/scaffoldCommands/index.js +90 -0
- package/dist/service/install/scaffoldReadme/deriveProjectName/index.d.ts +18 -0
- package/dist/service/install/scaffoldReadme/deriveProjectName/index.js +37 -0
- package/dist/service/install/scaffoldReadme/index.d.ts +20 -0
- package/dist/service/install/scaffoldReadme/index.js +57 -0
- package/dist/service/install/scaffoldReadme/insertBadge/index.d.ts +17 -0
- package/dist/service/install/scaffoldReadme/insertBadge/index.js +51 -0
- package/dist/service/install/shared/aidePackage/index.d.ts +18 -0
- package/dist/service/install/shared/aidePackage/index.js +17 -0
- package/dist/service/install/shared/checkGlobalPackage/index.d.ts +11 -0
- package/dist/service/install/shared/checkGlobalPackage/index.js +28 -0
- package/dist/service/install/shared/compareBytes/index.d.ts +12 -0
- package/dist/service/install/shared/compareBytes/index.js +24 -0
- package/dist/service/install/shared/describeAideCommand/index.d.ts +10 -0
- package/dist/service/install/shared/describeAideCommand/index.js +13 -0
- package/dist/service/install/shared/detectLaunchMode/index.d.ts +11 -0
- package/dist/service/install/shared/detectLaunchMode/index.js +10 -0
- package/dist/service/install/shared/isOlderVersion/index.d.ts +7 -0
- package/dist/service/install/shared/isOlderVersion/index.js +19 -0
- package/dist/service/install/shared/normalizeLaunchedCommand/index.d.ts +16 -0
- package/dist/service/install/shared/normalizeLaunchedCommand/index.js +36 -0
- package/dist/service/install/shared/planHooks/ignoreLocal/appendLine/index.d.ts +10 -0
- package/dist/service/install/shared/planHooks/ignoreLocal/appendLine/index.js +14 -0
- package/dist/service/install/shared/planHooks/ignoreLocal/index.d.ts +13 -0
- package/dist/service/install/shared/planHooks/ignoreLocal/index.js +30 -0
- package/dist/service/install/shared/planHooks/ignoreLocal/inspectGit/index.d.ts +17 -0
- package/dist/service/install/shared/planHooks/ignoreLocal/inspectGit/index.js +42 -0
- package/dist/service/install/shared/planHooks/index.d.ts +19 -0
- package/dist/service/install/shared/planHooks/index.js +65 -0
- package/dist/service/install/shared/planHooks/locateEntry/index.d.ts +15 -0
- package/dist/service/install/shared/planHooks/locateEntry/index.js +40 -0
- package/dist/service/install/shared/planHooks/mergeLocal/aideHookEntries/index.d.ts +11 -0
- package/dist/service/install/shared/planHooks/mergeLocal/aideHookEntries/index.js +21 -0
- package/dist/service/install/shared/planHooks/mergeLocal/buildCommand/index.d.ts +7 -0
- package/dist/service/install/shared/planHooks/mergeLocal/buildCommand/index.js +9 -0
- package/dist/service/install/shared/planHooks/mergeLocal/findWiredEvents/index.d.ts +16 -0
- package/dist/service/install/shared/planHooks/mergeLocal/findWiredEvents/index.js +35 -0
- package/dist/service/install/shared/planHooks/mergeLocal/index.d.ts +17 -0
- package/dist/service/install/shared/planHooks/mergeLocal/index.js +57 -0
- package/dist/service/install/shared/planHooks/shared/isAideHookCommand/index.d.ts +10 -0
- package/dist/service/install/shared/planHooks/shared/isAideHookCommand/index.js +86 -0
- package/dist/service/install/shared/planHooks/shared/parseSettings/index.d.ts +10 -0
- package/dist/service/install/shared/planHooks/shared/parseSettings/index.js +24 -0
- package/dist/service/install/shared/planHooks/shared/readOptional/index.d.ts +7 -0
- package/dist/service/install/shared/planHooks/shared/readOptional/index.js +17 -0
- package/dist/service/install/shared/planHooks/shared/removeAideHooks/index.d.ts +17 -0
- package/dist/service/install/shared/planHooks/shared/removeAideHooks/index.js +84 -0
- package/dist/service/install/shared/planHooks/stripProject/index.d.ts +14 -0
- package/dist/service/install/shared/planHooks/stripProject/index.js +26 -0
- package/dist/service/install/shared/planInstallInstruction/index.d.ts +3 -0
- package/dist/service/install/shared/planInstallInstruction/index.js +6 -0
- package/dist/service/install/shared/readNpxPackageSpec/index.d.ts +11 -0
- package/dist/service/install/shared/readNpxPackageSpec/index.js +35 -0
- package/dist/service/install/wireMcp/index.d.ts +28 -0
- package/dist/service/install/wireMcp/index.js +89 -0
- package/dist/service/install/writeMethodology/index.d.ts +22 -0
- package/dist/service/install/writeMethodology/index.js +131 -0
- package/dist/service/observer/event/archive/index.d.ts +14 -0
- package/dist/service/observer/event/archive/index.js +52 -0
- package/dist/service/observer/event/delete/index.d.ts +20 -0
- package/dist/service/observer/event/delete/index.js +60 -0
- package/dist/service/observer/event/endSession/index.d.ts +19 -0
- package/dist/service/observer/event/endSession/index.js +85 -0
- package/dist/service/observer/event/findConversation/index.d.ts +16 -0
- package/dist/service/observer/event/findConversation/index.js +46 -0
- package/dist/service/observer/event/markClosed/index.d.ts +15 -0
- package/dist/service/observer/event/markClosed/index.js +39 -0
- package/dist/service/observer/event/read/index.d.ts +11 -0
- package/dist/service/observer/event/read/index.js +18 -0
- package/dist/service/observer/event/read/readProject/index.d.ts +14 -0
- package/dist/service/observer/event/read/readProject/index.js +52 -0
- package/dist/service/observer/event/readArchive/index.d.ts +9 -0
- package/dist/service/observer/event/readArchive/index.js +46 -0
- package/dist/service/observer/event/readConversations/index.d.ts +10 -0
- package/dist/service/observer/event/readConversations/index.js +12 -0
- package/dist/service/observer/event/readLiveness/index.d.ts +24 -0
- package/dist/service/observer/event/readLiveness/index.js +40 -0
- package/dist/service/observer/event/record/appendLine/index.d.ts +17 -0
- package/dist/service/observer/event/record/appendLine/index.js +25 -0
- package/dist/service/observer/event/record/index.d.ts +19 -0
- package/dist/service/observer/event/record/index.js +62 -0
- package/dist/service/observer/event/record/postToObserver/index.d.ts +15 -0
- package/dist/service/observer/event/record/postToObserver/index.js +39 -0
- package/dist/service/observer/event/record/readPreviouslyEnded/index.d.ts +11 -0
- package/dist/service/observer/event/record/readPreviouslyEnded/index.js +25 -0
- package/dist/service/observer/event/record/session/createSession/index.d.ts +3 -0
- package/dist/service/observer/event/record/session/createSession/index.js +18 -0
- package/dist/service/observer/event/record/session/createSessionId/index.d.ts +9 -0
- package/dist/service/observer/event/record/session/createSessionId/index.js +11 -0
- package/dist/service/observer/event/record/session/index.d.ts +8 -0
- package/dist/service/observer/event/record/session/index.js +14 -0
- package/dist/service/observer/event/reopen/index.d.ts +13 -0
- package/dist/service/observer/event/reopen/index.js +34 -0
- package/dist/service/observer/event/restore/index.d.ts +12 -0
- package/dist/service/observer/event/restore/index.js +48 -0
- package/dist/service/observer/event/shared/attachLiveness/index.d.ts +14 -0
- package/dist/service/observer/event/shared/attachLiveness/index.js +18 -0
- package/dist/service/observer/event/shared/buildSessionPath/index.d.ts +11 -0
- package/dist/service/observer/event/shared/buildSessionPath/index.js +13 -0
- package/dist/service/observer/event/shared/endedMark/index.d.ts +30 -0
- package/dist/service/observer/event/shared/endedMark/index.js +48 -0
- package/dist/service/observer/event/shared/findNewestStart/index.d.ts +13 -0
- package/dist/service/observer/event/shared/findNewestStart/index.js +19 -0
- package/dist/service/observer/event/shared/formatSessionTag/index.d.ts +8 -0
- package/dist/service/observer/event/shared/formatSessionTag/index.js +11 -0
- package/dist/service/observer/event/shared/groupConversations/index.d.ts +14 -0
- package/dist/service/observer/event/shared/groupConversations/index.js +44 -0
- package/dist/service/observer/event/shared/isClosedRecord/index.d.ts +8 -0
- package/dist/service/observer/event/shared/isClosedRecord/index.js +13 -0
- package/dist/service/observer/event/shared/isIsoDateTime/index.d.ts +7 -0
- package/dist/service/observer/event/shared/isIsoDateTime/index.js +18 -0
- package/dist/service/observer/event/shared/judgeConversation/index.d.ts +18 -0
- package/dist/service/observer/event/shared/judgeConversation/index.js +26 -0
- package/dist/service/observer/event/shared/judgeConversation/pickNewestPresence/index.d.ts +10 -0
- package/dist/service/observer/event/shared/judgeConversation/pickNewestPresence/index.js +9 -0
- package/dist/service/observer/event/shared/judgeLiveness/index.d.ts +24 -0
- package/dist/service/observer/event/shared/judgeLiveness/index.js +41 -0
- package/dist/service/observer/event/shared/limits/index.d.ts +15 -0
- package/dist/service/observer/event/shared/limits/index.js +15 -0
- package/dist/service/observer/event/shared/listSessionIds/index.d.ts +9 -0
- package/dist/service/observer/event/shared/listSessionIds/index.js +33 -0
- package/dist/service/observer/event/shared/observerRecord/index.d.ts +23 -0
- package/dist/service/observer/event/shared/observerRecord/index.js +29 -0
- package/dist/service/observer/event/shared/parseSessionTag/index.d.ts +8 -0
- package/dist/service/observer/event/shared/parseSessionTag/index.js +18 -0
- package/dist/service/observer/event/shared/presencePing/index.d.ts +15 -0
- package/dist/service/observer/event/shared/presencePing/index.js +13 -0
- package/dist/service/observer/event/shared/presenceRecord/index.d.ts +36 -0
- package/dist/service/observer/event/shared/presenceRecord/index.js +70 -0
- package/dist/service/observer/event/shared/protocol/index.d.ts +31 -0
- package/dist/service/observer/event/shared/protocol/index.js +30 -0
- package/dist/service/observer/event/shared/readClosingRecord/index.d.ts +15 -0
- package/dist/service/observer/event/shared/readClosingRecord/index.js +50 -0
- package/dist/service/observer/event/shared/readConversationMark/index.d.ts +13 -0
- package/dist/service/observer/event/shared/readConversationMark/index.js +14 -0
- package/dist/service/observer/event/shared/readConversationMark/pickDecidingMark/index.d.ts +10 -0
- package/dist/service/observer/event/shared/readConversationMark/pickDecidingMark/index.js +10 -0
- package/dist/service/observer/event/shared/readEndedMark/index.d.ts +9 -0
- package/dist/service/observer/event/shared/readEndedMark/index.js +24 -0
- package/dist/service/observer/event/shared/readObserverRecord/index.d.ts +11 -0
- package/dist/service/observer/event/shared/readObserverRecord/index.js +26 -0
- package/dist/service/observer/event/shared/readObserverRecord/parseJson/index.d.ts +2 -0
- package/dist/service/observer/event/shared/readObserverRecord/parseJson/index.js +9 -0
- package/dist/service/observer/event/shared/readPresence/index.d.ts +11 -0
- package/dist/service/observer/event/shared/readPresence/index.js +46 -0
- package/dist/service/observer/event/shared/readSessionLog/index.d.ts +13 -0
- package/dist/service/observer/event/shared/readSessionLog/index.js +29 -0
- package/dist/service/observer/event/shared/readSessionLog/parseLines/index.d.ts +14 -0
- package/dist/service/observer/event/shared/readSessionLog/parseLines/index.js +32 -0
- package/dist/service/observer/event/shared/readSessionStart/index.d.ts +8 -0
- package/dist/service/observer/event/shared/readSessionStart/index.js +20 -0
- package/dist/service/observer/event/shared/readTranscriptActivity/index.d.ts +9 -0
- package/dist/service/observer/event/shared/readTranscriptActivity/index.js +18 -0
- package/dist/service/observer/event/shared/schema/index.d.ts +1398 -0
- package/dist/service/observer/event/shared/schema/index.js +218 -0
- package/dist/service/observer/event/shared/writeEndedMark/index.d.ts +12 -0
- package/dist/service/observer/event/shared/writeEndedMark/index.js +26 -0
- package/dist/service/observer/event/touchPresence/index.d.ts +15 -0
- package/dist/service/observer/event/touchPresence/index.js +77 -0
- package/dist/service/observer/event/touchPresence/mergePresence/index.d.ts +19 -0
- package/dist/service/observer/event/touchPresence/mergePresence/index.js +50 -0
- package/dist/service/observer/event/touchPresence/pingObserver/index.d.ts +15 -0
- package/dist/service/observer/event/touchPresence/pingObserver/index.js +63 -0
- package/dist/service/observer/event/touchPresence/shouldRefresh/index.d.ts +17 -0
- package/dist/service/observer/event/touchPresence/shouldRefresh/index.js +25 -0
- package/dist/service/observer/event/touchPresence/writePresence/index.d.ts +12 -0
- package/dist/service/observer/event/touchPresence/writePresence/index.js +20 -0
- package/dist/service/observer/event/types/index.d.ts +217 -0
- package/dist/service/observer/event/types/index.js +1 -0
- package/dist/service/observer/kanban/board/read/index.d.ts +13 -0
- package/dist/service/observer/kanban/board/read/index.js +27 -0
- package/dist/service/observer/kanban/board/read/readColumn/index.d.ts +11 -0
- package/dist/service/observer/kanban/board/read/readColumn/index.js +67 -0
- package/dist/service/observer/kanban/shared/boardHints/index.d.ts +17 -0
- package/dist/service/observer/kanban/shared/boardHints/index.js +17 -0
- package/dist/service/observer/kanban/shared/boardUnavailable/index.d.ts +6 -0
- package/dist/service/observer/kanban/shared/boardUnavailable/index.js +8 -0
- package/dist/service/observer/kanban/shared/columns/index.d.ts +18 -0
- package/dist/service/observer/kanban/shared/columns/index.js +9 -0
- package/dist/service/observer/kanban/shared/isInsideFolder/index.d.ts +8 -0
- package/dist/service/observer/kanban/shared/isInsideFolder/index.js +25 -0
- package/dist/service/observer/kanban/shared/locateBoard/index.d.ts +25 -0
- package/dist/service/observer/kanban/shared/locateBoard/index.js +76 -0
- package/dist/service/observer/kanban/shared/locateBoard/readKanbanFolder/index.d.ts +13 -0
- package/dist/service/observer/kanban/shared/locateBoard/readKanbanFolder/index.js +39 -0
- package/dist/service/observer/kanban/shared/namesSlug/index.d.ts +8 -0
- package/dist/service/observer/kanban/shared/namesSlug/index.js +13 -0
- package/dist/service/observer/kanban/shared/parseTaskNote/index.d.ts +11 -0
- package/dist/service/observer/kanban/shared/parseTaskNote/index.js +63 -0
- package/dist/service/observer/kanban/shared/readSessionKanban/index.d.ts +7 -0
- package/dist/service/observer/kanban/shared/readSessionKanban/index.js +22 -0
- package/dist/service/observer/kanban/task/read/findTaskFile/index.d.ts +22 -0
- package/dist/service/observer/kanban/task/read/findTaskFile/index.js +34 -0
- package/dist/service/observer/kanban/task/read/index.d.ts +13 -0
- package/dist/service/observer/kanban/task/read/index.js +42 -0
- package/dist/service/observer/kanban/types/index.d.ts +95 -0
- package/dist/service/observer/kanban/types/index.js +1 -0
- package/dist/service/observer/status/buildHistory/formatDuration/index.d.ts +6 -0
- package/dist/service/observer/status/buildHistory/formatDuration/index.js +15 -0
- package/dist/service/observer/status/buildHistory/index.d.ts +10 -0
- package/dist/service/observer/status/buildHistory/index.js +68 -0
- package/dist/service/observer/status/buildHistory/labelEvent/index.d.ts +12 -0
- package/dist/service/observer/status/buildHistory/labelEvent/index.js +78 -0
- package/dist/service/observer/status/buildModuleNodes/classifyTreeFile/index.d.ts +8 -0
- package/dist/service/observer/status/buildModuleNodes/classifyTreeFile/index.js +25 -0
- package/dist/service/observer/status/buildModuleNodes/findParentFolder/index.d.ts +9 -0
- package/dist/service/observer/status/buildModuleNodes/findParentFolder/index.js +20 -0
- package/dist/service/observer/status/buildModuleNodes/index.d.ts +9 -0
- package/dist/service/observer/status/buildModuleNodes/index.js +49 -0
- package/dist/service/observer/status/buildModuleNodes/readTreeFile/countPlanSteps/index.d.ts +10 -0
- package/dist/service/observer/status/buildModuleNodes/readTreeFile/countPlanSteps/index.js +38 -0
- package/dist/service/observer/status/buildModuleNodes/readTreeFile/index.d.ts +12 -0
- package/dist/service/observer/status/buildModuleNodes/readTreeFile/index.js +73 -0
- package/dist/service/observer/status/buildModuleNodes/readTreeFile/workStatuses/index.d.ts +11 -0
- package/dist/service/observer/status/buildModuleNodes/readTreeFile/workStatuses/index.js +7 -0
- package/dist/service/observer/status/buildRails/collectPipelineEvents/index.d.ts +15 -0
- package/dist/service/observer/status/buildRails/collectPipelineEvents/index.js +44 -0
- package/dist/service/observer/status/buildRails/index.d.ts +18 -0
- package/dist/service/observer/status/buildRails/index.js +62 -0
- package/dist/service/observer/status/buildRails/isOutside/index.d.ts +11 -0
- package/dist/service/observer/status/buildRails/isOutside/index.js +13 -0
- package/dist/service/observer/status/buildRails/judgeStage/index.d.ts +18 -0
- package/dist/service/observer/status/buildRails/judgeStage/index.js +40 -0
- package/dist/service/observer/status/findRunningWork/index.d.ts +18 -0
- package/dist/service/observer/status/findRunningWork/index.js +73 -0
- package/dist/service/observer/status/findWaitingFiles/index.d.ts +15 -0
- package/dist/service/observer/status/findWaitingFiles/index.js +80 -0
- package/dist/service/observer/status/foldSessions/index.d.ts +12 -0
- package/dist/service/observer/status/foldSessions/index.js +54 -0
- package/dist/service/observer/status/index.d.ts +14 -0
- package/dist/service/observer/status/index.js +84 -0
- package/dist/service/observer/status/listWorkFiles/index.d.ts +8 -0
- package/dist/service/observer/status/listWorkFiles/index.js +18 -0
- package/dist/service/observer/status/readSessionRecord/index.d.ts +9 -0
- package/dist/service/observer/status/readSessionRecord/index.js +58 -0
- package/dist/service/observer/status/shared/findCurrentPipeline/index.d.ts +18 -0
- package/dist/service/observer/status/shared/findCurrentPipeline/index.js +29 -0
- package/dist/service/observer/status/shared/findOpenPhase/index.d.ts +24 -0
- package/dist/service/observer/status/shared/findOpenPhase/index.js +47 -0
- package/dist/service/observer/status/shared/normalizeProjectPath/index.d.ts +10 -0
- package/dist/service/observer/status/shared/normalizeProjectPath/index.js +17 -0
- package/dist/service/observer/status/shared/phaseLabels/index.d.ts +19 -0
- package/dist/service/observer/status/shared/phaseLabels/index.js +19 -0
- package/dist/service/observer/status/shared/toNodeFolder/index.d.ts +6 -0
- package/dist/service/observer/status/shared/toNodeFolder/index.js +13 -0
- package/dist/service/observer/status/types/index.d.ts +240 -0
- package/dist/service/observer/status/types/index.js +1 -0
- package/dist/service/parseBrainAide/extractMarkerSections/findStructuralFault/index.d.ts +15 -0
- package/dist/service/parseBrainAide/extractMarkerSections/findStructuralFault/index.js +58 -0
- package/dist/service/parseBrainAide/extractMarkerSections/findUnknownMarker/index.d.ts +17 -0
- package/dist/service/parseBrainAide/extractMarkerSections/findUnknownMarker/index.js +52 -0
- package/dist/service/parseBrainAide/extractMarkerSections/index.d.ts +18 -0
- package/dist/service/parseBrainAide/extractMarkerSections/index.js +35 -0
- package/dist/service/parseBrainAide/extractMarkerSections/locateMarkers/index.d.ts +9 -0
- package/dist/service/parseBrainAide/extractMarkerSections/locateMarkers/index.js +30 -0
- package/dist/service/parseBrainAide/extractMarkerSections/slicePresentSections/index.d.ts +18 -0
- package/dist/service/parseBrainAide/extractMarkerSections/slicePresentSections/index.js +24 -0
- package/dist/service/parseBrainAide/extractMarkerSections/sliceSections/index.d.ts +12 -0
- package/dist/service/parseBrainAide/extractMarkerSections/sliceSections/index.js +19 -0
- package/dist/service/parseBrainAide/index.d.ts +113 -0
- package/dist/service/parseBrainAide/index.js +248 -0
- package/dist/service/parseBrainAide/parseKanbanField/index.d.ts +21 -0
- package/dist/service/parseBrainAide/parseKanbanField/index.js +56 -0
- package/dist/startServer/index.d.ts +7 -0
- package/dist/startServer/index.js +459 -0
- package/dist/tools/brain/composeOutdatedRemediation/index.d.ts +12 -0
- package/dist/tools/brain/composeOutdatedRemediation/index.js +24 -0
- package/dist/tools/brain/index.d.ts +94 -0
- package/dist/tools/brain/index.js +113 -0
- package/dist/tools/brain/listContract/index.d.ts +10 -0
- package/dist/tools/brain/listContract/index.js +14 -0
- package/dist/tools/brain/readTemplateSection/index.d.ts +17 -0
- package/dist/tools/brain/readTemplateSection/index.js +26 -0
- package/dist/tools/brain/readTemplateSection/readTemplateLauncher/index.d.ts +11 -0
- package/dist/tools/brain/readTemplateSection/readTemplateLauncher/index.js +22 -0
- package/dist/tools/brain/sectionPurpose/index.d.ts +10 -0
- package/dist/tools/brain/sectionPurpose/index.js +15 -0
- package/dist/tools/brain/selectSection/index.d.ts +14 -0
- package/dist/tools/brain/selectSection/index.js +19 -0
- package/dist/tools/brain/validateDraft/composeDraftVerdict/index.d.ts +11 -0
- package/dist/tools/brain/validateDraft/composeDraftVerdict/index.js +22 -0
- package/dist/tools/brain/validateDraft/index.d.ts +13 -0
- package/dist/tools/brain/validateDraft/index.js +43 -0
- package/dist/tools/brain/validateDraft/readDraft/index.d.ts +19 -0
- package/dist/tools/brain/validateDraft/readDraft/index.js +19 -0
- package/dist/tools/brain/validateDraft/resolveDraftPath/index.d.ts +21 -0
- package/dist/tools/brain/validateDraft/resolveDraftPath/index.js +34 -0
- package/dist/tools/cleanup/checkPreconditions/index.d.ts +20 -0
- package/dist/tools/cleanup/checkPreconditions/index.js +94 -0
- package/dist/tools/cleanup/formatReport/index.d.ts +12 -0
- package/dist/tools/cleanup/formatReport/index.js +94 -0
- package/dist/tools/cleanup/index.d.ts +25 -0
- package/dist/tools/cleanup/index.js +53 -0
- package/dist/tools/cleanup/judgeEphemeral/index.d.ts +37 -0
- package/dist/tools/cleanup/judgeEphemeral/index.js +47 -0
- package/dist/tools/cleanup/locateEphemerals/index.d.ts +16 -0
- package/dist/tools/cleanup/locateEphemerals/index.js +27 -0
- package/dist/tools/cleanup/removeEphemerals/index.d.ts +19 -0
- package/dist/tools/cleanup/removeEphemerals/index.js +27 -0
- package/dist/tools/cleanup/resolveModule/index.d.ts +20 -0
- package/dist/tools/cleanup/resolveModule/index.js +35 -0
- package/dist/tools/discover/buildAncestorChain/index.d.ts +22 -0
- package/dist/tools/discover/buildAncestorChain/index.js +108 -0
- package/dist/tools/discover/buildTree/index.d.ts +10 -0
- package/dist/tools/discover/buildTree/index.js +64 -0
- package/dist/tools/discover/index.d.ts +21 -0
- package/dist/tools/discover/index.js +50 -0
- package/dist/tools/frontmatter/checkCompletion/index.d.ts +13 -0
- package/dist/tools/frontmatter/checkCompletion/index.js +51 -0
- package/dist/tools/frontmatter/checkTransition/index.d.ts +21 -0
- package/dist/tools/frontmatter/checkTransition/index.js +34 -0
- package/dist/tools/frontmatter/classifyAideFile/index.d.ts +8 -0
- package/dist/tools/frontmatter/classifyAideFile/index.js +25 -0
- package/dist/tools/frontmatter/formatResult/index.d.ts +11 -0
- package/dist/tools/frontmatter/formatResult/index.js +104 -0
- package/dist/tools/frontmatter/governedFields/index.d.ts +31 -0
- package/dist/tools/frontmatter/governedFields/index.js +31 -0
- package/dist/tools/frontmatter/index.d.ts +27 -0
- package/dist/tools/frontmatter/index.js +163 -0
- package/dist/tools/frontmatter/readGovernedValue/index.d.ts +16 -0
- package/dist/tools/frontmatter/readGovernedValue/index.js +159 -0
- package/dist/tools/frontmatter/resolveTarget/index.d.ts +23 -0
- package/dist/tools/frontmatter/resolveTarget/index.js +30 -0
- package/dist/tools/frontmatter/rewriteFieldLine/index.d.ts +18 -0
- package/dist/tools/frontmatter/rewriteFieldLine/index.js +16 -0
- package/dist/tools/frontmatter/types/index.d.ts +134 -0
- package/dist/tools/frontmatter/types/index.js +1 -0
- package/dist/tools/info/index.d.ts +40 -0
- package/dist/tools/info/index.js +60 -0
- package/dist/tools/info/resolveBehind/fetchPublishedVersions/index.d.ts +10 -0
- package/dist/tools/info/resolveBehind/fetchPublishedVersions/index.js +34 -0
- package/dist/tools/info/resolveBehind/index.d.ts +12 -0
- package/dist/tools/info/resolveBehind/index.js +44 -0
- package/dist/tools/info/resolveBehind/listSkippedVersions/index.d.ts +7 -0
- package/dist/tools/info/resolveBehind/listSkippedVersions/index.js +21 -0
- package/dist/tools/info/resolveBehind/readAideLaunchMode/index.d.ts +8 -0
- package/dist/tools/info/resolveBehind/readAideLaunchMode/index.js +24 -0
- package/dist/tools/info/resolveBehind/resolveHighlights/fetchChangelog/index.d.ts +9 -0
- package/dist/tools/info/resolveBehind/resolveHighlights/fetchChangelog/index.js +23 -0
- package/dist/tools/info/resolveBehind/resolveHighlights/index.d.ts +7 -0
- package/dist/tools/info/resolveBehind/resolveHighlights/index.js +16 -0
- package/dist/tools/info/resolveBehind/resolveHighlights/pickHighlights/index.d.ts +7 -0
- package/dist/tools/info/resolveBehind/resolveHighlights/pickHighlights/index.js +21 -0
- package/dist/tools/info/resolveBehind/resolveHighlights/pickHighlights/readReleaseBullets/index.d.ts +9 -0
- package/dist/tools/info/resolveBehind/resolveHighlights/pickHighlights/readReleaseBullets/index.js +50 -0
- package/dist/tools/info/resolveBehind/resolveHighlights/pickHighlights/toOneLine/index.d.ts +6 -0
- package/dist/tools/info/resolveBehind/resolveHighlights/pickHighlights/toOneLine/index.js +24 -0
- package/dist/tools/info/resolveOutdated/detectStaleHooks/index.d.ts +17 -0
- package/dist/tools/info/resolveOutdated/detectStaleHooks/index.js +28 -0
- package/dist/tools/info/resolveOutdated/index.d.ts +13 -0
- package/dist/tools/info/resolveOutdated/index.js +18 -0
- package/dist/tools/info/resolveOutdated/listStaleFiles/index.d.ts +7 -0
- package/dist/tools/info/resolveOutdated/listStaleFiles/index.js +30 -0
- package/dist/tools/inspect/index.d.ts +24 -0
- package/dist/tools/inspect/index.js +47 -0
- package/dist/tools/inspect/parseSymbols/index.d.ts +21 -0
- package/dist/tools/inspect/parseSymbols/index.js +213 -0
- package/dist/tools/inspect/walk/index.d.ts +8 -0
- package/dist/tools/inspect/walk/index.js +31 -0
- package/dist/tools/observer/endSession/formatReply/index.d.ts +9 -0
- package/dist/tools/observer/endSession/formatReply/index.js +23 -0
- package/dist/tools/observer/endSession/index.d.ts +21 -0
- package/dist/tools/observer/endSession/index.js +31 -0
- package/dist/tools/observer/endSession/types/index.d.ts +10 -0
- package/dist/tools/observer/endSession/types/index.js +1 -0
- package/dist/tools/observer/event/formatReply/index.d.ts +10 -0
- package/dist/tools/observer/event/formatReply/index.js +28 -0
- package/dist/tools/observer/event/index.d.ts +9 -0
- package/dist/tools/observer/event/index.js +11 -0
- package/dist/tools/observer/shared/tryBind/index.d.ts +13 -0
- package/dist/tools/observer/shared/tryBind/index.js +31 -0
- package/dist/tools/observer/start/awaitObserver/index.d.ts +16 -0
- package/dist/tools/observer/start/awaitObserver/index.js +75 -0
- package/dist/tools/observer/start/awaitOwnLink/index.d.ts +12 -0
- package/dist/tools/observer/start/awaitOwnLink/index.js +24 -0
- package/dist/tools/observer/start/checkProject/index.d.ts +18 -0
- package/dist/tools/observer/start/checkProject/index.js +45 -0
- package/dist/tools/observer/start/findOpenSessions/index.d.ts +18 -0
- package/dist/tools/observer/start/findOpenSessions/index.js +53 -0
- package/dist/tools/observer/start/formatReply/describeOpenSession/index.d.ts +7 -0
- package/dist/tools/observer/start/formatReply/describeOpenSession/index.js +13 -0
- package/dist/tools/observer/start/formatReply/index.d.ts +6 -0
- package/dist/tools/observer/start/formatReply/index.js +43 -0
- package/dist/tools/observer/start/index.d.ts +27 -0
- package/dist/tools/observer/start/index.js +87 -0
- package/dist/tools/observer/start/launchObserver/index.d.ts +17 -0
- package/dist/tools/observer/start/launchObserver/index.js +23 -0
- package/dist/tools/observer/start/markClosedSessions/index.d.ts +16 -0
- package/dist/tools/observer/start/markClosedSessions/index.js +49 -0
- package/dist/tools/observer/start/moveLegacyHistory/index.d.ts +10 -0
- package/dist/tools/observer/start/moveLegacyHistory/index.js +26 -0
- package/dist/tools/observer/start/types/index.d.ts +82 -0
- package/dist/tools/observer/start/types/index.js +1 -0
- package/dist/tools/observer/start/walkPorts/index.d.ts +15 -0
- package/dist/tools/observer/start/walkPorts/index.js +17 -0
- package/dist/tools/read/index.d.ts +15 -0
- package/dist/tools/read/index.js +79 -0
- package/dist/tools/scaffold/hasIntentSpec/index.d.ts +7 -0
- package/dist/tools/scaffold/hasIntentSpec/index.js +9 -0
- package/dist/tools/scaffold/index.d.ts +33 -0
- package/dist/tools/scaffold/index.js +216 -0
- package/dist/tools/scaffold/placeRootIntent/index.d.ts +17 -0
- package/dist/tools/scaffold/placeRootIntent/index.js +24 -0
- package/dist/tools/scaffold/resolveSpecFolder/index.d.ts +17 -0
- package/dist/tools/scaffold/resolveSpecFolder/index.js +21 -0
- package/dist/tools/scaffold/sessionTemplate/index.d.ts +9 -0
- package/dist/tools/scaffold/sessionTemplate/index.js +40 -0
- package/dist/tools/scaffold/writeIfAbsent/index.d.ts +10 -0
- package/dist/tools/scaffold/writeIfAbsent/index.js +21 -0
- package/dist/tools/upgrade/applyFiles/index.d.ts +49 -0
- package/dist/tools/upgrade/applyFiles/index.js +91 -0
- package/dist/tools/upgrade/applyFiles/movePin/changesOnlyThePin/index.d.ts +11 -0
- package/dist/tools/upgrade/applyFiles/movePin/changesOnlyThePin/index.js +23 -0
- package/dist/tools/upgrade/applyFiles/movePin/index.d.ts +14 -0
- package/dist/tools/upgrade/applyFiles/movePin/index.js +56 -0
- package/dist/tools/upgrade/applyFiles/movePin/locatePinToken/index.d.ts +16 -0
- package/dist/tools/upgrade/applyFiles/movePin/locatePinToken/index.js +30 -0
- package/dist/tools/upgrade/applyFiles/switchToGlobal/changesOnlyTheLaunch/index.d.ts +12 -0
- package/dist/tools/upgrade/applyFiles/switchToGlobal/changesOnlyTheLaunch/index.js +27 -0
- package/dist/tools/upgrade/applyFiles/switchToGlobal/index.d.ts +16 -0
- package/dist/tools/upgrade/applyFiles/switchToGlobal/index.js +78 -0
- package/dist/tools/upgrade/applyFiles/switchToGlobal/locateLaunchTokens/index.d.ts +21 -0
- package/dist/tools/upgrade/applyFiles/switchToGlobal/locateLaunchTokens/index.js +36 -0
- package/dist/tools/upgrade/brainCategory/applyChange/index.d.ts +21 -0
- package/dist/tools/upgrade/brainCategory/applyChange/index.js +64 -0
- package/dist/tools/upgrade/brainCategory/applyChange/yieldsExpectedConfig/index.d.ts +12 -0
- package/dist/tools/upgrade/brainCategory/applyChange/yieldsExpectedConfig/index.js +25 -0
- package/dist/tools/upgrade/brainCategory/index.d.ts +19 -0
- package/dist/tools/upgrade/brainCategory/index.js +28 -0
- package/dist/tools/upgrade/brainCategory/insertMissingSections/index.d.ts +15 -0
- package/dist/tools/upgrade/brainCategory/insertMissingSections/index.js +62 -0
- package/dist/tools/upgrade/brainCategory/insertMissingSections/spliceRepairs/index.d.ts +25 -0
- package/dist/tools/upgrade/brainCategory/insertMissingSections/spliceRepairs/index.js +36 -0
- package/dist/tools/upgrade/brainCategory/previewChange/index.d.ts +16 -0
- package/dist/tools/upgrade/brainCategory/previewChange/index.js +61 -0
- package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildLauncherOffer/index.d.ts +20 -0
- package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildLauncherOffer/index.js +54 -0
- package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildLauncherOffer/rewriteLauncherArgs/index.d.ts +19 -0
- package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildLauncherOffer/rewriteLauncherArgs/index.js +61 -0
- package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildLauncherOffer/rewriteLauncherArgs/locateArgLines/index.d.ts +11 -0
- package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildLauncherOffer/rewriteLauncherArgs/locateArgLines/index.js +49 -0
- package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildLauncherOffer/rewriteLauncherArgs/renderArgLine/index.d.ts +6 -0
- package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildLauncherOffer/rewriteLauncherArgs/renderArgLine/index.js +8 -0
- package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildLauncherOffer/rewriteLauncherCommand/index.d.ts +13 -0
- package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildLauncherOffer/rewriteLauncherCommand/index.js +27 -0
- package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildSectionOffer/index.d.ts +19 -0
- package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildSectionOffer/index.js +58 -0
- package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/index.d.ts +13 -0
- package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/index.js +19 -0
- package/dist/tools/upgrade/brainCategory/shared/changedSinceDiff/index.d.ts +3 -0
- package/dist/tools/upgrade/brainCategory/shared/changedSinceDiff/index.js +4 -0
- package/dist/tools/upgrade/brainCategory/shared/detectLineEnding/index.d.ts +6 -0
- package/dist/tools/upgrade/brainCategory/shared/detectLineEnding/index.js +9 -0
- package/dist/tools/upgrade/brainCategory/shared/hashBytes/index.d.ts +7 -0
- package/dist/tools/upgrade/brainCategory/shared/hashBytes/index.js +10 -0
- package/dist/tools/upgrade/brainCategory/shared/invalidResultInstructions/index.d.ts +5 -0
- package/dist/tools/upgrade/brainCategory/shared/invalidResultInstructions/index.js +7 -0
- package/dist/tools/upgrade/brainCategory/shared/locateFrontmatter/index.d.ts +19 -0
- package/dist/tools/upgrade/brainCategory/shared/locateFrontmatter/index.js +27 -0
- package/dist/tools/upgrade/brainCategory/shared/locateSection/index.d.ts +16 -0
- package/dist/tools/upgrade/brainCategory/shared/locateSection/index.js +19 -0
- package/dist/tools/upgrade/brainCategory/shared/readBrainConfig/index.d.ts +12 -0
- package/dist/tools/upgrade/brainCategory/shared/readBrainConfig/index.js +22 -0
- package/dist/tools/upgrade/brainCategory/shared/readChangeBefore/index.d.ts +13 -0
- package/dist/tools/upgrade/brainCategory/shared/readChangeBefore/index.js +17 -0
- package/dist/tools/upgrade/brainCategory/shared/refuseUnusableConfig/index.d.ts +13 -0
- package/dist/tools/upgrade/brainCategory/shared/refuseUnusableConfig/index.js +30 -0
- package/dist/tools/upgrade/brainCategory/shared/toLineEnding/index.d.ts +9 -0
- package/dist/tools/upgrade/brainCategory/shared/toLineEnding/index.js +8 -0
- package/dist/tools/upgrade/buildVersionsMeta/assertFullClone/index.d.ts +14 -0
- package/dist/tools/upgrade/buildVersionsMeta/assertFullClone/index.js +27 -0
- package/dist/tools/upgrade/buildVersionsMeta/enumerateArtifacts/index.d.ts +23 -0
- package/dist/tools/upgrade/buildVersionsMeta/enumerateArtifacts/index.js +62 -0
- package/dist/tools/upgrade/buildVersionsMeta/index.d.ts +17 -0
- package/dist/tools/upgrade/buildVersionsMeta/index.js +26 -0
- package/dist/tools/upgrade/checkBrainConfig/index.d.ts +29 -0
- package/dist/tools/upgrade/checkBrainConfig/index.js +67 -0
- package/dist/tools/upgrade/checkHooksConfig/index.d.ts +30 -0
- package/dist/tools/upgrade/checkHooksConfig/index.js +72 -0
- package/dist/tools/upgrade/checkIdeConfig/index.d.ts +24 -0
- package/dist/tools/upgrade/checkIdeConfig/index.js +134 -0
- package/dist/tools/upgrade/checkMcpConfig/index.d.ts +37 -0
- package/dist/tools/upgrade/checkMcpConfig/index.js +172 -0
- package/dist/tools/upgrade/checkMcpConfig/isCanonicalGlobalAideEntry/index.d.ts +10 -0
- package/dist/tools/upgrade/checkMcpConfig/isCanonicalGlobalAideEntry/index.js +17 -0
- package/dist/tools/upgrade/checkMcpConfig/isPinBehind/index.d.ts +9 -0
- package/dist/tools/upgrade/checkMcpConfig/isPinBehind/index.js +18 -0
- package/dist/tools/upgrade/checkReference/index.d.ts +12 -0
- package/dist/tools/upgrade/checkReference/index.js +28 -0
- package/dist/tools/upgrade/compareFile/index.d.ts +12 -0
- package/dist/tools/upgrade/compareFile/index.js +24 -0
- package/dist/tools/upgrade/index.d.ts +51 -0
- package/dist/tools/upgrade/index.js +216 -0
- package/dist/tools/upgrade/resolveProjectRoot/index.d.ts +7 -0
- package/dist/tools/upgrade/resolveProjectRoot/index.js +12 -0
- package/dist/tools/upgrade/shared/readAidePin/index.d.ts +9 -0
- package/dist/tools/upgrade/shared/readAidePin/index.js +24 -0
- package/dist/tools/upgrade/spliceStub/index.d.ts +13 -0
- package/dist/tools/upgrade/spliceStub/index.js +91 -0
- package/dist/tools/validate/checkAlignment/index.d.ts +15 -0
- package/dist/tools/validate/checkAlignment/index.js +42 -0
- package/dist/tools/validate/checkPlanSpec/index.d.ts +9 -0
- package/dist/tools/validate/checkPlanSpec/index.js +27 -0
- package/dist/tools/validate/index.d.ts +20 -0
- package/dist/tools/validate/index.js +91 -0
- package/dist/types/index.d.ts +1366 -0
- package/dist/types/index.js +1 -0
- package/dist/util/baseName/index.d.ts +6 -0
- package/dist/util/baseName/index.js +9 -0
- package/dist/util/buildTreeData/index.d.ts +7 -0
- package/dist/util/buildTreeData/index.js +51 -0
- package/dist/util/checkboxPattern/index.d.ts +9 -0
- package/dist/util/checkboxPattern/index.js +9 -0
- package/dist/util/classify/holdsCode/index.d.ts +6 -0
- package/dist/util/classify/holdsCode/index.js +31 -0
- package/dist/util/classify/holdsCode/isCodeFile/index.d.ts +2 -0
- package/dist/util/classify/holdsCode/isCodeFile/index.js +11 -0
- package/dist/util/classify/index.d.ts +17 -0
- package/dist/util/classify/index.js +163 -0
- package/dist/util/countCheckboxes/index.d.ts +16 -0
- package/dist/util/countCheckboxes/index.js +29 -0
- package/dist/util/describeError/index.d.ts +7 -0
- package/dist/util/describeError/index.js +7 -0
- package/dist/util/firstLine/index.d.ts +10 -0
- package/dist/util/firstLine/index.js +17 -0
- package/dist/util/isProcessRunning/index.d.ts +10 -0
- package/dist/util/isProcessRunning/index.js +22 -0
- package/dist/util/isVersionBehind/index.d.ts +6 -0
- package/dist/util/isVersionBehind/index.js +23 -0
- package/dist/util/parseBody/index.d.ts +7 -0
- package/dist/util/parseBody/index.js +43 -0
- package/dist/util/parseFrontmatter/index.d.ts +14 -0
- package/dist/util/parseFrontmatter/index.js +66 -0
- package/dist/util/readPackageVersion/index.d.ts +6 -0
- package/dist/util/readPackageVersion/index.js +24 -0
- package/dist/util/runtimePaths/create/index.d.ts +11 -0
- package/dist/util/runtimePaths/create/index.js +17 -0
- package/dist/util/runtimePaths/createRoot/index.d.ts +7 -0
- package/dist/util/runtimePaths/createRoot/index.js +13 -0
- package/dist/util/runtimePaths/isProjectKey/index.d.ts +7 -0
- package/dist/util/runtimePaths/isProjectKey/index.js +18 -0
- package/dist/util/runtimePaths/listProjectFolders/index.d.ts +10 -0
- package/dist/util/runtimePaths/listProjectFolders/index.js +28 -0
- package/dist/util/runtimePaths/moveLegacyRoot/compareFiles/index.d.ts +11 -0
- package/dist/util/runtimePaths/moveLegacyRoot/compareFiles/index.js +27 -0
- package/dist/util/runtimePaths/moveLegacyRoot/index.d.ts +13 -0
- package/dist/util/runtimePaths/moveLegacyRoot/index.js +85 -0
- package/dist/util/runtimePaths/moveLegacyRoot/moveLog/index.d.ts +15 -0
- package/dist/util/runtimePaths/moveLegacyRoot/moveLog/index.js +47 -0
- package/dist/util/runtimePaths/moveLegacyRoot/moveRecord/index.d.ts +13 -0
- package/dist/util/runtimePaths/moveLegacyRoot/moveRecord/index.js +29 -0
- package/dist/util/runtimePaths/moveLegacyRoot/publishCopy/index.d.ts +13 -0
- package/dist/util/runtimePaths/moveLegacyRoot/publishCopy/index.js +38 -0
- package/dist/util/runtimePaths/moveLegacyRoot/removeEmptyFolders/index.d.ts +8 -0
- package/dist/util/runtimePaths/moveLegacyRoot/removeEmptyFolders/index.js +11 -0
- package/dist/util/runtimePaths/moveLegacyRoot/resolveLegacyRoot/index.d.ts +9 -0
- package/dist/util/runtimePaths/moveLegacyRoot/resolveLegacyRoot/index.js +23 -0
- package/dist/util/runtimePaths/moveLegacyRoot/shared/isGone/index.d.ts +4 -0
- package/dist/util/runtimePaths/moveLegacyRoot/shared/isGone/index.js +9 -0
- package/dist/util/runtimePaths/moveLegacyRoot/shared/unlinkIfPresent/index.d.ts +4 -0
- package/dist/util/runtimePaths/moveLegacyRoot/shared/unlinkIfPresent/index.js +8 -0
- package/dist/util/runtimePaths/resolve/index.d.ts +9 -0
- package/dist/util/runtimePaths/resolve/index.js +31 -0
- package/dist/util/runtimePaths/resolve/nameProjectFolder/index.d.ts +10 -0
- package/dist/util/runtimePaths/resolve/nameProjectFolder/index.js +23 -0
- package/dist/util/runtimePaths/resolveArchivedLog/index.d.ts +9 -0
- package/dist/util/runtimePaths/resolveArchivedLog/index.js +19 -0
- package/dist/util/runtimePaths/resolveEndedMark/index.d.ts +11 -0
- package/dist/util/runtimePaths/resolveEndedMark/index.js +21 -0
- package/dist/util/runtimePaths/resolveEventLog/index.d.ts +10 -0
- package/dist/util/runtimePaths/resolveEventLog/index.js +20 -0
- package/dist/util/runtimePaths/resolvePresenceFile/index.d.ts +11 -0
- package/dist/util/runtimePaths/resolvePresenceFile/index.js +21 -0
- package/dist/util/runtimePaths/resolveRoot/index.d.ts +8 -0
- package/dist/util/runtimePaths/resolveRoot/index.js +13 -0
- package/dist/util/runtimePaths/resolveSessionLog/index.d.ts +11 -0
- package/dist/util/runtimePaths/resolveSessionLog/index.js +21 -0
- package/dist/util/runtimePaths/shared/isSessionId/index.d.ts +8 -0
- package/dist/util/runtimePaths/shared/isSessionId/index.js +10 -0
- package/dist/util/runtimePaths/shared/pickPathModule/index.d.ts +8 -0
- package/dist/util/runtimePaths/shared/pickPathModule/index.js +11 -0
- package/dist/util/runtimePaths/shared/projectKeyHash/index.d.ts +7 -0
- package/dist/util/runtimePaths/shared/projectKeyHash/index.js +7 -0
- package/dist/util/runtimePaths/shared/resolveAppDataRoot/index.d.ts +12 -0
- package/dist/util/runtimePaths/shared/resolveAppDataRoot/index.js +32 -0
- package/dist/util/runtimePaths/shared/runtimeNames/index.d.ts +20 -0
- package/dist/util/runtimePaths/shared/runtimeNames/index.js +20 -0
- package/dist/util/runtimePaths/types/index.d.ts +55 -0
- package/dist/util/runtimePaths/types/index.js +1 -0
- package/dist/util/scan/index.d.ts +12 -0
- package/dist/util/scan/index.js +228 -0
- package/dist/util/sessionQuietLimit/index.d.ts +9 -0
- package/dist/util/sessionQuietLimit/index.js +9 -0
- package/dist/util/skipDirs/index.d.ts +7 -0
- package/dist/util/skipDirs/index.js +15 -0
- package/dist/util/timeUnits/index.d.ts +15 -0
- package/dist/util/timeUnits/index.js +15 -0
- package/dist/versions.json +330 -0
- package/package.json +83 -5
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
2
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
|
+
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
4
|
+
import discover, { DiscoverInput } from "../tools/discover/index.js";
|
|
5
|
+
import read, { ReadInput } from "../tools/read/index.js";
|
|
6
|
+
import scaffold, { ScaffoldInput } from "../tools/scaffold/index.js";
|
|
7
|
+
import cleanup, { CleanupInput } from "../tools/cleanup/index.js";
|
|
8
|
+
import formatReport from "../tools/cleanup/formatReport/index.js";
|
|
9
|
+
import frontmatter, { FrontmatterInput } from "../tools/frontmatter/index.js";
|
|
10
|
+
import formatFrontmatterResult from "../tools/frontmatter/formatResult/index.js";
|
|
11
|
+
import validate, { ValidateInput } from "../tools/validate/index.js";
|
|
12
|
+
import init, { InitInput } from "../service/install/index.js";
|
|
13
|
+
import applySteps from "../service/install/applySteps/index.js";
|
|
14
|
+
import upgrade, { UpgradeInput } from "../tools/upgrade/index.js";
|
|
15
|
+
import applyFiles from "../tools/upgrade/applyFiles/index.js";
|
|
16
|
+
import brainCategory from "../tools/upgrade/brainCategory/index.js";
|
|
17
|
+
import brainContract from "../service/brainContract/index.js";
|
|
18
|
+
import info, { InfoInput } from "../tools/info/index.js";
|
|
19
|
+
import brain, { BrainInput } from "../tools/brain/index.js";
|
|
20
|
+
import readTemplateSection from "../tools/brain/readTemplateSection/index.js";
|
|
21
|
+
import listContract from "../tools/brain/listContract/index.js";
|
|
22
|
+
import validateDraft from "../tools/brain/validateDraft/index.js";
|
|
23
|
+
import inspect, { InspectInput } from "../tools/inspect/index.js";
|
|
24
|
+
import observerStart, { ObserverStartInput } from "../tools/observer/start/index.js";
|
|
25
|
+
import formatStartReply from "../tools/observer/start/formatReply/index.js";
|
|
26
|
+
import observerEvent from "../tools/observer/event/index.js";
|
|
27
|
+
import observerEndSession from "../tools/observer/endSession/index.js";
|
|
28
|
+
import { inputSchema as observerEventSchema } from "../service/observer/event/shared/schema/index.js";
|
|
29
|
+
import aidePackage from "../service/install/shared/aidePackage/index.js";
|
|
30
|
+
import describeAideCommand from "../service/install/shared/describeAideCommand/index.js";
|
|
31
|
+
import readPackageVersion from "../util/readPackageVersion/index.js";
|
|
32
|
+
/** Parse --root flag from CLI args, default to cwd. */
|
|
33
|
+
function parseRoot() {
|
|
34
|
+
const args = process.argv.slice(2);
|
|
35
|
+
const rootIdx = args.indexOf("--root");
|
|
36
|
+
if (rootIdx !== -1 && args[rootIdx + 1])
|
|
37
|
+
return args[rootIdx + 1];
|
|
38
|
+
return process.cwd();
|
|
39
|
+
}
|
|
40
|
+
/** Every section marker of the published brain contract: the one source of the registered `kind` and `brainChange` vocabularies. */
|
|
41
|
+
const brainMarkers = brainContract.map(({ marker }) => marker);
|
|
42
|
+
/** Every event kind the recorder accepts, read from the shared input schema so the listed enum can never drift. */
|
|
43
|
+
const observerEventKinds = observerEventSchema.options.map((option) => option.shape.kind.value);
|
|
44
|
+
/**
|
|
45
|
+
* Starts the MCP server on stdio: resolves the project root from `--root` (default
|
|
46
|
+
* cwd), builds the server, registers the tool-list and tool-call handlers, and
|
|
47
|
+
* connects the stdio transport. Loaded only through a dynamic import from the
|
|
48
|
+
* entry, so `aidemd-mcp init|sync|view` never pays for the SDK or the tools.
|
|
49
|
+
*/
|
|
50
|
+
export default async function startServer() {
|
|
51
|
+
// Step 1 — resolve the project root the tools operate on.
|
|
52
|
+
const root = parseRoot();
|
|
53
|
+
// Step 2 — build the server and register the tool list and tool calls.
|
|
54
|
+
const server = new Server({ name: aidePackage.name, version: readPackageVersion() }, { capabilities: { tools: {} } });
|
|
55
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
56
|
+
tools: [
|
|
57
|
+
{
|
|
58
|
+
name: "aide_discover",
|
|
59
|
+
description: "Scan for .aide spec files in this project. Returns a tree map of where specs live, following progressive disclosure.\n\nWithout a path: returns a lightweight project-wide map — file locations, type tags and each spec's one-line description; a plan or todo tag carries its status, e.g. [plan: approved]. Only the head of each file is read. Use this once to understand the project's spec architecture.\n\nWith a path: the response opens with the ancestor chain — the cascading intent lineage from project root down to the target directory, with each ancestor showing its description and alignment status (aligned/misaligned when set). The ancestor chain gives you the full inherited context before you read a single spec body. After the ancestor chain comes the detailed subtree of the target directory — summaries extracted from file content and anomaly warnings. Use this to drill into the area you're working on.\n\n.aide files are progressive disclosure specs that live next to orchestrator code — they contain intent (strategy, implementation contracts, anti-patterns), research (sources, data, patterns), or QA checklists (todo). Read .aide files BEFORE reading code — they are the context layer between folder structure and implementation details.\n\nFile types (.aide, intent.aide, research.aide, plan.aide, todo.aide):\n- .aide — Intent spec (default). Strategy, contracts, anti-patterns.\n- intent.aide — Same as .aide, used only when research.aide exists in the same folder.\n- research.aide — Raw research. Sources, data points, pattern synthesis.\n- plan.aide -- Architect's implementation plan. Checkboxed steps for the implementor.\n- todo.aide — QA re-alignment document. Captures where implementation drifted from intent.\n\nNever have both .aide and intent.aide in the same folder.",
|
|
60
|
+
inputSchema: {
|
|
61
|
+
type: "object",
|
|
62
|
+
properties: {
|
|
63
|
+
path: {
|
|
64
|
+
type: "string",
|
|
65
|
+
description: "Subdirectory to drill into. When provided, the response opens with the ancestor chain — the cascading intent lineage from root to target, each ancestor showing its description and alignment status — followed by the detailed subtree with summaries and warnings. When omitted, returns a shallow project-wide map (locations, type tags with plan/todo status, and spec descriptions).",
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: "aide_read",
|
|
72
|
+
description: "Read an .aide spec file with full context. Returns the file content, its classified type (intent/research/plan/todo), related specs in the same directory, and links found in the content (relative paths, inline references, URLs). Use this after aide_discover to drill into a specific spec.",
|
|
73
|
+
inputSchema: {
|
|
74
|
+
type: "object",
|
|
75
|
+
properties: {
|
|
76
|
+
path: {
|
|
77
|
+
type: "string",
|
|
78
|
+
description: "Path to the .aide file to read",
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
required: ["path"],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "aide_scaffold",
|
|
86
|
+
description: "Create a new AIDE working file from its blank template, under its canonical name. It never overwrites: a request for a file that already exists, filled or empty, is a no-op reported as a skip line — remove a file first with aide_cleanup to replace it. New files start with their starting value: an intent spec alignment: unreviewed, a plan or todo list status: proposed. Handles the naming rules, so never pick a name yourself: in a module folder, intent specs are .aide by default, but become intent.aide when research.aide exists in the same folder. Creating a research.aide auto-renames any existing .aide to intent.aide. The project root intent spec always lands at .aide/intent.aide: pass directory \".aide\" or \".\" (both mean the project's .aide folder for intent, research and both). A bare .aide/.aide left by an older project, with no intent.aide beside it, is renamed to .aide/intent.aide with its content kept; if .aide/intent.aide exists, nothing changes. Folders are never treated as spec files. A plan needs an intent spec beside it: scaffolding a plan in a folder with no intent spec (.aide or intent.aide; a research.aide alone does not count) is refused and creates nothing — write the folder's intent spec first. For a root-level plan, pass directory \".aide\".\n\nTypes:\n- intent — Strategy, contracts, anti-patterns\n- research — Sources, data, patterns (triggers rename of existing .aide)\n- both — Creates research.aide + intent.aide pair\n- todo — QA re-alignment document for QA agents\n- plan — Architect's implementation plan; refused unless the folder already holds an intent spec\n- session — The project's session record, always at .aide/session.aide whatever directory you pass: the empty placeholder with every section heading. Its single source; never write the placeholder by hand.",
|
|
87
|
+
inputSchema: {
|
|
88
|
+
type: "object",
|
|
89
|
+
properties: {
|
|
90
|
+
directory: {
|
|
91
|
+
type: "string",
|
|
92
|
+
description: "Directory where the .aide file(s) will be created. For the project root intent spec pass \".aide\" or \".\"; it lands at .aide/intent.aide",
|
|
93
|
+
},
|
|
94
|
+
type: {
|
|
95
|
+
type: "string",
|
|
96
|
+
enum: ["intent", "research", "both", "todo", "plan", "session"],
|
|
97
|
+
description: "Type of file to create: intent, research, both, todo, plan, or session (always .aide/session.aide)",
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
required: ["directory", "type"],
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: "aide_cleanup",
|
|
105
|
+
description: "Remove a module's pipeline ephemerals (plan.aide, todo.aide, brief.aide) once that module's cycle has closed, leaving the code and the intent specs as the durable record. It never removes, rewrites or reads anything else: intent specs, research specs, code, and .aide/session.aide are all out of reach.\n\nEach file it would remove must record a closed status: completed (re-checked — every checkbox really checked) or abandoned. A file from before statuses existed, with no status but every checkbox checked, also passes. It refuses anything still proposed or approved, a completed file with an open item, a brief.aide with no plan.aide beside it, and a folder with no ephemerals. An abandoned plan takes its brief with it, and where there is no plan.aide a closed todo.aide is removed on its own. A refusal names each open file or item with its file and line, and nothing is removed. Record a closing status with aide_frontmatter first; this tool never sets or infers one.\n\nCall it directly, because the real call is already safe. dryRun is an optional preview for inspection only and is never a required step before the real call.\n\nThis is the cross-platform replacement for a shell delete, so it can be permitted by name.",
|
|
106
|
+
inputSchema: {
|
|
107
|
+
type: "object",
|
|
108
|
+
properties: {
|
|
109
|
+
path: {
|
|
110
|
+
type: "string",
|
|
111
|
+
description: "The module directory whose ephemerals to remove, relative to the project root",
|
|
112
|
+
},
|
|
113
|
+
dryRun: {
|
|
114
|
+
type: "boolean",
|
|
115
|
+
description: "Optional. Removes nothing and only reports what a real call would remove. Agents closing a module omit it.",
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
required: ["path"],
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: "aide_frontmatter",
|
|
123
|
+
description: "Read or change one governed frontmatter value of an AIDE file, leaving every other byte untouched. Intent specs carry alignment (unreviewed, aligned, misaligned). plan.aide, brief.aide and todo.aide carry one status lifecycle: proposed, approved, completed, abandoned. Only allowed moves are accepted, completed is refused while any item is unchecked or, for a brief, until its plan is completed, and a refusal names the allowed next values. Call with path alone to read a file's governed value without changing it. The session record, research specs and brain.aide carry no governed values. The tool never chooses a value; the caller decides.",
|
|
124
|
+
inputSchema: {
|
|
125
|
+
type: "object",
|
|
126
|
+
properties: {
|
|
127
|
+
path: {
|
|
128
|
+
type: "string",
|
|
129
|
+
description: "Path of the AIDE file, relative to the project root",
|
|
130
|
+
},
|
|
131
|
+
field: {
|
|
132
|
+
type: "string",
|
|
133
|
+
description: "Governed field to change: alignment (intent specs) or status (plans, todo lists, briefs). Omit with value to read.",
|
|
134
|
+
},
|
|
135
|
+
value: {
|
|
136
|
+
type: "string",
|
|
137
|
+
description: "New value for field. Omit with field to read.",
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
required: ["path"],
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: "aide_validate",
|
|
145
|
+
description: "Health check for .aide spec files in the project. Detects orphaned specs (a spec whose folder, subfolders included, holds no code — only AIDE files, Markdown and dot-files; the project root intent spec in .aide/ is never orphaned, and a plan's presence never decides it), plans with no intent spec beside them (plan-without-spec — write the folder's spec, never delete the plan), missing specs (orchestrators with 3+ helper imports but no .aide), naming conflicts (.aide + intent.aide in same folder), broken links, orphaned research (research.aide without intent spec), missing descriptions (specs with no description field in frontmatter), files whose frontmatter cannot be parsed, and intent specs whose alignment is missing (missing-alignment) or not one of unreviewed, aligned, misaligned (invalid-alignment).",
|
|
146
|
+
inputSchema: {
|
|
147
|
+
type: "object",
|
|
148
|
+
properties: {
|
|
149
|
+
path: {
|
|
150
|
+
type: "string",
|
|
151
|
+
description: "Subdirectory to validate (defaults to entire project)",
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
name: "aide_upgrade",
|
|
158
|
+
description: "Compare the AIDE methodology artifacts in this project against the canonical versions and return structured JSON results grouped by category. Use this when the user asks to update AIDE, sync AIDE, refresh AIDE, check for AIDE updates, or bring AIDE up to date. This is NOT for editing user .aide specs — it inspects methodology infrastructure only.\n\nThe tool uses a two-call pattern for progressive disclosure:\n\n**First call (no `category` param):** Returns a lightweight summary — every category with file names, statuses, and counts, but NO file content. Use this to understand what has drifted and present a summary to the user. Ask which categories they want to apply.\n\n**Second call (with `category` param):** The tool writes all differs/missing files directly to disk itself and returns a manifest — file results with `filePath`, `status` (`\"updated\"`, `\"created\"`, or `\"unchanged\"`), and `name`, but NO `canonicalContent`. The agent never sees file content and never uses the Write tool for methodology files.\n\nRepeat the second call for each category the user confirms.\n\nAs the calling agent, you must:\n1. Call without `category` first to get the summary\n2. Present each drifted category (differs/missing) and ask the user which to apply\n3. For each confirmed category, call again with `category=X` — the tool writes the files and returns a manifest. Report what was updated/created to the user.\n4. For the `mcp` category, a result that carries `prescription` is merged into the existing MCP config by you (read → merge → write). A result that carries `pinMove` or `globalSwitch` is never merged by hand: the tool writes it (see the MCP step). If `malformed`, tell the user — do not overwrite.\n5. For `ide`, the manifest may include `instructions` for VS Code extension install — execute that command for the user. Zed config is written directly by the tool.\n6. For `brain`, the summary reports `missingSections`, outdated section text as `staleSections` and a legacy brain launcher as `legacyLauncher` (its reasons), each named separately. The brain category then works through three calls, each one decision at a time:\n a. `category: \"brain\"` (after the user's yes) inserts every missing section from the latest bundled template — byte-identical, in the file's line endings — only when the config launches the template's own brain server. It returns `{ outcome: \"inserted\", inserted }` (markers only; empty when nothing is missing) or `{ outcome: \"adapt\", adapt, instructions }` naming the sections the user must write for their backend.\n b. `category: \"brain\"` with `brainChange: <marker | \"launcher\">` returns one `{ outcome: \"change\", target, before, after, beforeHash }` diff to show the user. It is read-only. For a non-template config it returns `missing` with the template's version of an absent section instead.\n c. The same call plus that `beforeHash`, only on the user's yes to that one diff, returns `applied`, or a `refused` re-fetch instruction when the bytes changed since the preview.\n Never batch changes under one yes. Every refusal's `instructions` names the next step.\n\n**IMPORTANT — one-at-a-time wizard pattern using AskUserQuestion:**\nDo NOT present all categories at once. Walk the user through ONE category at a time using AskUserQuestion with Yes/Skip options. Stop after each question and wait for confirmation before calling with that category.\n\nCategories: pointer-stub, methodology-docs, version-metadata, reference, commands, agents, skills, mcp, ide, readme, brain, hooks.\n\nUpgrade surface (user code and user .aide specs are never touched):\n- AIDE pointer stub in the agent config file\n- Canonical methodology docs under .aide/docs/\n- versions.json metadata under .aide/docs/\n- The tool and hook reference pages under .aide/reference/, through the reference category: its own category, apart from the methodology docs, applied as one unit\n- Slash commands for all pipeline phases\n- Pipeline agent files, skill templates\n- MCP server entry in the project's MCP config\n- IDE file association config (Zed settings, VS Code extension)\n- The user-owned brain config, only through the brain category: missing sections and confirmed migrations, one consented change at a time\n- AIDE's own Claude Code hooks (Claude Code projects only), through the hooks category: written only to this machine's uncommitted .claude/settings.local.json, each running the installed server directly with node and the session-end hook given a 10-second budget; AIDE's old entries in the shared .claude/settings.json are removed with every other byte unchanged; .claude/settings.local.json is added to .gitignore when git does not already ignore it; a malformed settings file stops the category with nothing written, and a missing global install returns install-first instructions\n\nSupports Claude Code, Cursor, Windsurf, and Copilot. Auto-detects the framework or accepts an override.\n\n**MCP step:** the canonical aide entry runs the global command `aidemd-mcp`. The entry is read under the `aide` key, or under `aidemd-mcp` when there is no `aide` key; the key is never renamed. Without `targetVersion`, an entry that launches through npx reports `differs` with `globalSwitch: { key, name, installed, installCommand }` and no prescription. Tell the user npx launches time out at session start and ask; on yes, run `installCommand` via Bash first unless `installed` is true (a failed install: say so and stop). Then `category: \"mcp\"` makes the tool rewrite only that entry's command and args to the global command, every other byte unchanged; it re-checks the global install and, while the package is missing, keeps `differs` and returns `instructions` naming the install command — install, then call again. A missing aide entry returns the global `prescription` plus `globalPackage`; when the package is not installed it also carries `instructions` — act on them: install first, then merge, and never merge after a failed install. An older server cannot switch itself, so a pinned project first moves its pin to a newer version with `targetVersion` (only under the `aide` key; an npx entry under `aidemd-mcp` gets `instructions` to call without `targetVersion` and switch instead) — an exact published `x.y.z`, normally `aide_info`'s `behind.latest`, valid only with no category or with `category: \"mcp\"`. With it, a local (npx) aide entry is judged by its version pin alone: an older, missing or non-exact pin reports `differs` with `pinMove: { from, to }` (`from` is null when unpinned) and no prescription; a pin at or ahead of the target `matches` and is never moved back. Install the target first (`npx -y " + aidePackage.name + "@{to} sync --help` prints help starting `Usage:` and exits 2 by design; anything else means the install failed — then stop and move nothing). Then `category: \"mcp\"` with the same `targetVersion` makes the tool write the move itself, changing only the version inside the package argument — the command form, `cmd /c`, `-y`, other servers, formatting and line endings stay byte-identical — and returns `status: \"updated\"` with `pinMove`. A result that keeps `status: \"differs\"` with `instructions` means nothing was written (the pin changed since it was checked, the config cannot be edited byte-safely, or the entry is not a locatable `" + aidePackage.name + "` spec): relay the instructions. A global entry is never moved; the target is ignored for it. A moved pin takes effect only in a new session — tell the user to start one. An `aidemd-mcp` entry matches as the bare command or an absolute-path shim of it; a path-launched one may carry `tip`, an informational remark to mention once — never drift, never a merge question. Any other (custom) command under the `aide` key is left alone and reports `matches`. The brain entry is not part of the `mcp` step; a legacy brain launcher is changed only through the brain category's `brainChange: \"launcher\"` preview and apply, on the user's yes.",
|
|
159
|
+
inputSchema: {
|
|
160
|
+
type: "object",
|
|
161
|
+
properties: {
|
|
162
|
+
framework: {
|
|
163
|
+
type: "string",
|
|
164
|
+
enum: ["claude", "cursor", "windsurf", "copilot"],
|
|
165
|
+
description: "Force a specific framework instead of auto-detecting. Auto-detection checks for framework-specific files/directories and defaults to Claude Code.",
|
|
166
|
+
},
|
|
167
|
+
path: {
|
|
168
|
+
type: "string",
|
|
169
|
+
description: "Custom project root path (defaults to server working directory)",
|
|
170
|
+
},
|
|
171
|
+
category: {
|
|
172
|
+
type: "string",
|
|
173
|
+
enum: ["pointer-stub", "methodology-docs", "version-metadata", "reference", "commands", "agents", "skills", "mcp", "ide", "readme", "brain", "hooks"],
|
|
174
|
+
description: "When provided, applies that category. For package-owned categories the call writes all differs/missing files to disk and returns a manifest (no canonicalContent). For `brain` it inserts missing sections (no `brainChange`), previews one change (`brainChange` alone), or applies it (`brainChange` + `beforeHash`); it never rewrites an existing section outside an applied change. When omitted, return all categories as metadata-only summaries (no canonicalContent fields).",
|
|
175
|
+
},
|
|
176
|
+
brainChange: {
|
|
177
|
+
type: "string",
|
|
178
|
+
enum: [...brainMarkers, "launcher"],
|
|
179
|
+
description: "Brain-category-only selector for one stale section (its marker) or the legacy launcher (`launcher`). Without `beforeHash` the call previews that one change read-only; with `beforeHash` it applies it.",
|
|
180
|
+
},
|
|
181
|
+
beforeHash: {
|
|
182
|
+
type: "string",
|
|
183
|
+
description: "The `beforeHash` a `brainChange` preview returned. Turns the call into the guarded apply: the change is written only if the current bytes still hash to this value.",
|
|
184
|
+
},
|
|
185
|
+
targetVersion: {
|
|
186
|
+
type: "string",
|
|
187
|
+
pattern: "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$",
|
|
188
|
+
description: "Exact published x.y.z version to judge the project's local aide entry's npx pin against (normally aide_info's behind.latest). With category \"mcp\" the tool moves the pin to it, changing only the version; with no category the move is shown read-only as pinMove. Not valid with any other category. A global entry is never moved.",
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: "aide_info",
|
|
195
|
+
description: "Boot-time reporter called by the orchestrator at startup. Returns independent top-level fields that the orchestrator must branch on separately:\n\n**`outdated` (array of stale artifact keys) — soft notification.**\nCompares the host's `.aide/versions.json` against the canonical manifest shipped with this running server — never against the latest published version, so files that match the version the project runs are current even when a newer release exists. Each element names an artifact key that is behind; the key `hooks` means the project's Claude Code hooks are missing or differ from what this server installs (judged the way `aide_upgrade` judges them). An empty array means everything is current. A missing `.aide/versions.json` (old install predating version tracking) reports no stale files but still reports `hooks`. Staleness is informational — the orchestrator continues with a heads-up to the user.\n\n**`behind` (`{ installed, latest, launch, versionsBehind, highlights }` or null) — soft notification.** Non-null when the running server is older than the latest published version, whatever launch the project's `aide` entry uses — a global install or npx, pinned or not. `installed` is the running server's version. `launch` (`global` or `local`) picks the remedy: `global` → `" + aidePackage.installCommand + "@{latest}`; `local` → first install `latest` into the npx cache, then move the project's aide pin to it with `aide_upgrade({ category: \"mcp\", targetVersion: latest })`, never a hand edit of `.mcp.json`; if the install fails, switch nothing; once the newer server runs, `/aide:upgrade` offers to switch the entry to the global command. `versionsBehind` (1 or more) counts the published releases after `installed` up to `latest`; `highlights` holds 0–3 one-line notes of what they added or fixed (empty when the release notes were unavailable). Show the count and highlights briefly, never the changelog. Either upgrade takes effect only in a new session. It never gates the pipeline. Null when there is no `aide` entry, the running version is unknown, the server is current, or the version check could not run (offline checks pass silently).\n\n**`brainMigration` (`{ staleSections, legacyLauncher }` or null) — soft notification.** Non-null when the brain config has sections whose text matches an earlier template version, or a legacy brain launcher (`legacyLauncher` lists the reasons: npx-launch, unpinned, unversioned, older-pin, missing-auto-confirm). Mention it once and suggest `/aide:brain config`; it never gates the pipeline and never changes `brain.status`.\n\n**`brain` (precondition state) — hard gate.**\nReports whether the host's brain MCP entry is wired and consistent. Shape: `{ status, name?, fault?, hints }` — `name` is absent on `no-brain-aide` and `brain-aide-invalid`; `fault` is present only on `brain-aide-invalid`. The orchestrator must halt and direct the user to resolve the issue before continuing if `status` is not `'ok'`. No path validation is performed — the package never stats any directory on disk; state derives entirely from comparing `.aide/config/brain.aide` against `.mcp.json`.\n\nThe five `brain.status` values:\n- `ok` — `.aide/config/brain.aide` exists, satisfies the required-section contract, and the host's `.mcp.json` `brain` entry matches the parsed `mcpServerConfig`. `name` is the user-declared descriptive label from brain.aide. The pipeline may proceed.\n- `no-brain-aide` — `.aide/config/brain.aide` is absent. No `name` field. Remediation: run `/aide:brain config`, which creates the config.\n- `brain-aide-invalid` — the file exists but falls short. `fault.kind` is `missing-sections` (with `fault.sections` naming each missing required section) or `malformed` (with `fault.reason`). No `name` field. Remediation: run `/aide:brain config`.\n- `no-mcp-entry` — brain.aide parsed successfully but the host's `.mcp.json` is absent, malformed, or has no `mcpServers.brain` key. `name` is present. Remediation: run sync with the same launcher the project's `aide` MCP entry uses — " + describeAideCommand("sync") + ".\n- `mcp-drift` — brain.aide and `.mcp.json` both exist but their `brain` entries disagree on `command` or `args`. `name` is present. Remediation: run sync with the same launcher the project's `aide` MCP entry uses — " + describeAideCommand("sync") + ".\n\n`hints` is always present on every status — an array of candidate brain root paths the orchestrator can surface during recovery.\n\nNo parameters needed — uses the server's working directory.",
|
|
196
|
+
inputSchema: {
|
|
197
|
+
type: "object",
|
|
198
|
+
properties: {},
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
name: "aide_brain",
|
|
203
|
+
description: "On-demand brain entry-point tool. Call this when you need to reach the brain mid-task — do NOT call it on every /aide boot. Boot-time brain precondition state is already reported by aide_info.brain.status; firing aide_brain at boot duplicates that work unnecessarily. It is also how a brain config is set up, repaired or written for any backend, one decision at a time. Every mode is read-only: no call writes to disk.\n\n**Optional `source` parameter** — which read runs. Omitted means `\"host\"`.\n- `\"host\"` — one section of the host's `.aide/config/brain.aide`, described below.\n- `\"template\"` — `{ template, purpose }`: one section of the bundled template (or its launcher, with `kind: \"launcher\"`) as verbatim bytes, and that section's one-line purpose from the published contract. The answer is the same whatever state the host's config is in. Use it as a worked example when writing that section for another backend.\n- `\"contract\"` — `{ sections }`: every contract section in order, each with `marker`, `role` (`live` or `seed`) and `purpose`, and no section text.\n- `\"draft\"` — a structural check of the draft config at `path`, with the same rules and fault vocabulary as the host config check, so a draft that passes is ready to swap in. Returns `{ outcome, instructions }`: `valid`; `invalid` with `fault` (`missing-sections` and its `sections`, or `malformed` and its `reason`); `absent` when no file is at `path`; `refused` when `path` is outside the project, and nothing is read. It checks structure, never content.\n\n**Optional `kind` parameter** — host and template reads only: any section marker of the published brain contract (see the enum), live or seed; `\"launcher\"` only with `source: \"template\"`. Omitting it means `\"orientation\"`, the runtime briefing for reaching the brain mid-task. `\"config\"` is the integration's wiring flow that `/aide:brain config` runs. Seed sections are fetched one per call while seeding. `path` is required with `source: \"draft\"` and accepted nowhere else; any other combination is rejected before the tool runs.\n\n**Host read response shape: exactly `{ status, instructions, found, purpose? }`.** No `backend`, no `connector`, no `name`, no `kind`.\n\n- `found: true` — `instructions` is that section's verbatim bytes from the host's `.aide/config/brain.aide`: no trimming, no normalization, no `${...}` substitution. `purpose` is that section's one-line purpose from the published contract; use it when adapting the section for another backend.\n- `found: false` — `instructions` is remediation, and `purpose` is absent. An absent file → run `/aide:brain config`. A requested section missing from the file → with the user's consent, call `aide_upgrade` with `category: \"brain\"`. A malformed or unreadable file → the exact fault, a hand fix with the user, then re-check with `aide_info`. Do not proceed as if the section were available.\n\nThe section is returned on every status where the config exists and is well-formed, including `brain-aide-invalid` with missing sections, `no-mcp-entry` and `mcp-drift`.\n\n`status` mirrors the `BrainState` tagged union from `buildBrainState`, with five values: `ok`, `no-brain-aide`, `brain-aide-invalid`, `no-mcp-entry`, `mcp-drift`. Branch on `found` for \"did I get the section\" and on `status` for \"is the brain healthy\".",
|
|
204
|
+
inputSchema: {
|
|
205
|
+
type: "object",
|
|
206
|
+
properties: {
|
|
207
|
+
source: {
|
|
208
|
+
type: "string",
|
|
209
|
+
enum: ["host", "template", "contract", "draft"],
|
|
210
|
+
description: "Which read runs. Omitted means `host`: one section of the host's `.aide/config/brain.aide`. `template`: one section or the launcher of the bundled template, with its purpose. `contract`: every contract section with its role and purpose. `draft`: a structural check of the draft config at `path`.",
|
|
211
|
+
},
|
|
212
|
+
kind: {
|
|
213
|
+
type: "string",
|
|
214
|
+
enum: [...brainMarkers, "launcher"],
|
|
215
|
+
description: 'Which section: any section marker of the published contract, live or seed, or `launcher` with `source: "template"` only. Omitted means `orientation`. Not accepted with `contract` or `draft`. Seed sections are fetched one per call while seeding.',
|
|
216
|
+
},
|
|
217
|
+
path: {
|
|
218
|
+
type: "string",
|
|
219
|
+
description: 'Project-relative path of a draft brain config. Required with `source: "draft"` and accepted nowhere else; a path outside the project is refused unread.',
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: "aide_init",
|
|
226
|
+
description: "Bootstrap the AIDE development environment into a project. Returns structured JSON for agent consumption — not prose.\n\nThe tool uses a two-call pattern for progressive disclosure:\n\n**First call (no `category` param):** Returns a lightweight summary — every step with `name`, `status` (would-create/would-overwrite/would-skip/exists), `category`, and `filePath`, but NO `content` fields. Also returns `brainHints` (brain root candidates) and detected `framework`. Use this to understand what needs to be done and which categories require user prompts.\n\n**Second call (with `category` param):** The tool writes all `would-create` AND approved `would-overwrite` files directly to disk itself and returns a manifest — steps with `filePath`, `status` (`created`, `overwritten`, or `exists`), and `name`, but NO `content`. `would-skip` steps stay `would-skip` in the manifest (tool writes nothing for them). The agent never sees file content and never uses the Write tool for new files.\n\n**Exception — MCP steps:** For MCP steps, the manifest includes `prescription` data (key name and entry object) so the agent can read the existing config, merge, and write. The tool never touches MCP config directly.\n\n**Exception — brain category:** The `Brain config (brain.aide)` step carries `brainSummary` on every call, including the summary: `sections` (each section's `marker`, `role`, `seedPath` for seeds, and `templateBytes`), `missingSections`, `staleSections`, `legacyLauncher` reasons and `templateIntegration`. It never carries section text, purposes, repair blocks or before/after bodies. Missing sections are inserted with `aide_upgrade` `category: \"brain\"`, seeds are read one at a time with `aide_brain`, and migrations are previewed and applied one at a time through `aide_upgrade`. Sections the user edited and custom launchers are never offered. The tool creates `.aide/config/brain.aide` when it is absent and never overwrites an existing one.\n\n**Exception — session record:** The `Session record (session.aide)` step never carries content and the tool never writes it. When it is `would-create`, its `instructions` tell you to call `aide_scaffold` with directory \".\" and type \"session\" — do that, unprompted. When `.aide/session.aide` exists it is `exists` and is never overwritten.\n\n**Exception — IDE VS Code steps:** IDE steps that need external tooling (VS Code CLI) return instructions for the agent to execute, since those aren't simple file writes.\n\n**Agent branch logic — silent-on-create, prompt-on-overwrite:**\n\nAfter the first call, walk the categories using this rule:\n- **Pure-create category** (all steps are `would-create`, `would-skip`, or `exists`): apply silently by calling with `category=X` immediately — no AskUserQuestion. A category with nothing on disk to overwrite has no decision the user can inform.\n- **Overwrite-bearing category** (any step is `would-overwrite`): pause and use AskUserQuestion with structured options. Name the files that would be overwritten. If the user approves, call with `category=X` — the tool overwrites and returns `overwritten` in the manifest. If the user declines an overwrite but wants the new files, call with `category=X` — the tool writes only `would-create` steps; the `would-overwrite` step stays `would-overwrite` in the manifest.\n- **Inherent-decision categories** (framework, brain root path, MCP config merge, IDE choice): always use AskUserQuestion regardless of disk state. These are not file-write decisions — filesystem contents cannot resolve them.\n\n**IMPORTANT — one-at-a-time wizard pattern using AskUserQuestion:**\nDo NOT present a summary table of all categories. Do NOT offer \"all\" as an option. Do NOT ask conversational questions — use the `AskUserQuestion` tool with structured options at every pause point.\n\n1. Call without `category` first to get the metadata\n2. Present ONLY the detected framework — use AskUserQuestion with Yes/{alternatives} options. STOP.\n3. Walk categories in order: methodology, reference, commands, agents, skills, mcp, brain, ide, hooks, readme. For each:\n - Pure-create: apply silently (call with `category=X`), report results, move to next.\n - Overwrite-bearing: use AskUserQuestion naming the would-overwrite files. STOP. Wait for selection, then call with `category=X`. Report manifest (created N, overwrote M). Move to next.\n - Inherent decision: always use AskUserQuestion. STOP.\n4. For brain: read `brainSummary` from the step, then direct the user to `/aide:brain config`. Call with `category=brain` only to receive the manifest; the tool creates `.aide/config/brain.aide` only when absent and never overwrites an existing one.\n5. For MCP: when the aide step is would-create, its `globalPackage` names the aide server's global package. If `installed` is false, the step also carries `instructions`: act on them before merging — run its `installCommand` via Bash first — running AIDE's setup is the consent. If the install fails, tell the user plainly and stop: never merge an entry whose command is not installed. Then use AskUserQuestion with Merge/Skip and merge the `prescription` entry (the global `aidemd-mcp` command) into the existing config yourself (read → merge → write). Never replace an existing aide entry. STOP.\n6. For IDE: use AskUserQuestion with multiSelect for Zed/VS Code/Neither. STOP.\n\nEach pause point is ONE AskUserQuestion → wait for selection → then proceed. Never show multiple categories at once. Never ask open-ended conversational questions.",
|
|
227
|
+
inputSchema: {
|
|
228
|
+
type: "object",
|
|
229
|
+
properties: {
|
|
230
|
+
framework: {
|
|
231
|
+
type: "string",
|
|
232
|
+
enum: ["claude", "cursor", "windsurf", "copilot"],
|
|
233
|
+
description: "Force a specific framework instead of auto-detecting. Use this when re-calling after the user confirms or overrides detection.",
|
|
234
|
+
},
|
|
235
|
+
path: {
|
|
236
|
+
type: "string",
|
|
237
|
+
description: "Custom project root path (defaults to server working directory)",
|
|
238
|
+
},
|
|
239
|
+
category: {
|
|
240
|
+
type: "string",
|
|
241
|
+
enum: ["framework", "methodology", "reference", "commands", "agents", "skills", "mcp", "brain", "ide", "readme", "hooks"],
|
|
242
|
+
description: "Write all would-create and approved would-overwrite files for this category to disk and return a manifest (status: created/overwritten/exists; would-skip steps pass through unchanged). Omit on the first call to get a metadata-only summary of all steps.",
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
name: "aide_inspect",
|
|
249
|
+
description: "Return JSDoc, signature, and kind for a named symbol without opening the full file — Tier 2 progressive disclosure for code. When an agent knows a function name from an import list or orchestrator file, call inspect to learn what the symbol does, what it accepts, and what it returns, based on its contract alone. Searches across TypeScript and JavaScript source files (ts, tsx, js, jsx, mjs, cjs). Use the optional `file` parameter to narrow the search to a single file when the location is already known.",
|
|
250
|
+
inputSchema: {
|
|
251
|
+
type: "object",
|
|
252
|
+
properties: {
|
|
253
|
+
name: {
|
|
254
|
+
type: "string",
|
|
255
|
+
description: "Symbol name to look up",
|
|
256
|
+
},
|
|
257
|
+
file: {
|
|
258
|
+
type: "string",
|
|
259
|
+
description: "Optional file path to narrow search to a single file",
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
required: ["name"],
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
name: "aide_observer_start",
|
|
267
|
+
description: "Start the observer (or reuse the running one) and check that no other session is open in this project. The observer is mandatory: it is the single source of truth for which agent session works in a project, and a project has at most one open session. Call it at every session start, after reporting `session_started` through aide_observer_event on its own and reading that reply; call it once more when a report replies `observer not running`. It takes no arguments. One observer serves every project on this machine: it tries AIDE_OBSERVER_PORT first if set, then 24680 to 24689 in order, takes the first free port and records it. The first line of the reply starts with exactly one of: `Observer running at <link>` or `Observer already running at <link>` (go on), `Observer not replaced: …` (an older observer still serves at the link; go on), `REOPENED: …` (this conversation had ended earlier and nothing newer has worked the project since, so it is open again; the link follows on the next line; tell the user and go on), `STOPPED: …` (this conversation had ended and cannot reopen, because a newer session has worked the project since or another session ended it with the user's approval; a hard stop no approval lifts: tell the user to continue in a new session, offer no end-session and do not call start again), `HALT: …` (another session of this project is open — each line names its id, or `claude:<id>` for a Claude session that never reported, whether it is working or waiting on the user, how long it has been quiet with `maybe stuck` past 15 minutes, its last activity, pipeline and phase; this is a hard stop: tell the user, and proceed only after they approve ending that session with aide_observer_end_session and a new start passes, or they close this one), or `BLOCKED: …` (the observer could not start on any port, every port tried is named, or this ended conversation could not be reopened, with the reason; a hard stop: tell the user and do nothing further). A session whose transcript ends in its own closing record counts as closed: it never halts the start, and start marks it ended. Give the user the link, which includes its access token.",
|
|
268
|
+
inputSchema: {
|
|
269
|
+
type: "object",
|
|
270
|
+
properties: {},
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
name: "aide_observer_event",
|
|
275
|
+
description: "Report one action of this session to the observer. Each report is written first to this session's own log outside the project, then shown live if an observer is running. Never retry a report and never wait on one. The server stamps time, session and order; send only `kind` and that kind's fields. Kinds: `session_started` (first, once per session, called on its own: projectRoot, kanbanTag; the observer finds the board from the `kanban` field of the project's brain config, so a brainPath is optional and informational only) · `prompt` (text: the user's message, in full) · `task` (slug, action picked|moved, title?, column?; `picked` when the session takes up a task, also one already In Progress that nothing moves) · `pipeline_started` (pipeline, phase: the phase it starts or resumes at) · `pipeline_finished` (pipeline, result completed|abandoned) · `phase_skipped` (pipeline, phase, reason; report every skip) · `phase_started` (pipeline, phase, agent, module) · `phase_finished` (pipeline, phase, agent, module, result?, summary?) · `gate_waiting` (pipeline, gate, file: the path of the file awaiting the user's approval) · `gate_resolved` (pipeline, gate, file, resolution?) · `plan_step_checked` (pipeline, module, step, total?) · `qa_verdict` (pipeline, module, verdict passed|issues, open?) · `file_written` (path, action created|updated) · `commit` (sha, message?) · `release` (version) · `error` (message, agent?, module?). A pipeline is one feature flow, named by its kanban task's slug, else a short name kept for the whole flow; hand work outside a pipeline names none. Phase is one of spec, research, synthesize, structure, plan, build, qa, fix, align, refactor, cleanup. The reply is one line ending with `[observer-session <id>]`, this session's id: `recorded`, `recorded; observer not running` (call aide_observer_start once; if that restart answers BLOCKED, stop and tell the user), or why it was not recorded. When this conversation had ended (closed, archived or ended, then resumed), the reply adds `; previously ended: run aide_observer_start before anything else` before the session tag: the report is still recorded, and the agent calls aide_observer_start next and acts on its REOPENED, HALT or STOPPED reply.",
|
|
276
|
+
inputSchema: {
|
|
277
|
+
type: "object",
|
|
278
|
+
properties: { kind: { type: "string", enum: observerEventKinds } },
|
|
279
|
+
required: ["kind"],
|
|
280
|
+
additionalProperties: true,
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
name: "aide_observer_end_session",
|
|
285
|
+
description: "End another open session of this project, only after the user has approved it. Use it when aide_observer_start answers HALT and the user chooses to end the session it names: pass `sessionId` exactly as the HALT line gave it — an observer session id, or the Claude session id of a session that never reported (written `claude:<id>` in the HALT; pass the id without the `claude:` prefix). Ending only writes a mark that the session has ended: it deletes no log, presence or project file. A later report from the ended session is still recorded and flagged as previously ended; the session reopens only through aide_observer_start, and only while it is the project's most recent session. It never ends the caller's own session, nor an earlier session of the caller's own conversation. Replies are one line: `ended <id>`, `already ended <id>` (also for a session whose transcript shows it closed, which gets a transcript mark), `refused: <id> is this session`, `refused: no session <id> in this project`, `refused: invalid session id`, or `not ended (<reason>)` when the disk could not be written. After `ended`, call aide_observer_start again.",
|
|
286
|
+
inputSchema: {
|
|
287
|
+
type: "object",
|
|
288
|
+
properties: { sessionId: { type: "string" } },
|
|
289
|
+
required: ["sessionId"],
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
],
|
|
293
|
+
}));
|
|
294
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
295
|
+
const { name, arguments: args } = request.params;
|
|
296
|
+
switch (name) {
|
|
297
|
+
case "aide_discover": {
|
|
298
|
+
const parsed = DiscoverInput.parse(args);
|
|
299
|
+
const result = await discover(root, parsed.path);
|
|
300
|
+
return { content: [{ type: "text", text: result }] };
|
|
301
|
+
}
|
|
302
|
+
case "aide_read": {
|
|
303
|
+
const parsed = ReadInput.parse(args);
|
|
304
|
+
const result = await read(root, parsed.path);
|
|
305
|
+
return {
|
|
306
|
+
content: [
|
|
307
|
+
{
|
|
308
|
+
type: "text",
|
|
309
|
+
text: `# ${result.type} spec\n\n${result.content}\n\n---\nSiblings: ${result.siblings.map((s) => s.relativePath).join(", ") || "none"}\nLinks: ${result.links.join(", ") || "none"}`,
|
|
310
|
+
},
|
|
311
|
+
],
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
case "aide_scaffold": {
|
|
315
|
+
const parsed = ScaffoldInput.parse(args);
|
|
316
|
+
const result = await scaffold(root, parsed.directory, parsed.type);
|
|
317
|
+
return { content: [{ type: "text", text: result }] };
|
|
318
|
+
}
|
|
319
|
+
case "aide_cleanup": {
|
|
320
|
+
const parsed = CleanupInput.parse(args);
|
|
321
|
+
const result = await cleanup(root, parsed);
|
|
322
|
+
const { text, isError } = formatReport(result);
|
|
323
|
+
return { content: [{ type: "text", text }], isError };
|
|
324
|
+
}
|
|
325
|
+
case "aide_frontmatter": {
|
|
326
|
+
const parsed = FrontmatterInput.parse(args);
|
|
327
|
+
const outcome = await frontmatter(root, parsed);
|
|
328
|
+
const { text, isError } = formatFrontmatterResult(outcome);
|
|
329
|
+
return { content: [{ type: "text", text }], isError };
|
|
330
|
+
}
|
|
331
|
+
case "aide_validate": {
|
|
332
|
+
const parsed = ValidateInput.parse(args);
|
|
333
|
+
const result = await validate(root, parsed.path);
|
|
334
|
+
const summary = result.warnings.length === 0
|
|
335
|
+
? "No issues found."
|
|
336
|
+
: result.warnings.map((w) => `[${w.kind}] ${w.path} — ${w.message}`).join("\n");
|
|
337
|
+
return { content: [{ type: "text", text: summary }] };
|
|
338
|
+
}
|
|
339
|
+
case "aide_init": {
|
|
340
|
+
const parsed = InitInput.parse(args);
|
|
341
|
+
const result = await init(root, parsed.framework, parsed.path);
|
|
342
|
+
if (parsed.category) {
|
|
343
|
+
// Category-specific call: filter to matching steps, write files to
|
|
344
|
+
// disk via applySteps, and return a manifest (no content).
|
|
345
|
+
result.steps = result.steps.filter((s) => s.category === parsed.category);
|
|
346
|
+
result.steps = await applySteps(result.steps);
|
|
347
|
+
}
|
|
348
|
+
else {
|
|
349
|
+
// Summary call: strip content to keep response small
|
|
350
|
+
result.steps = result.steps.map(({ content: _content, ...rest }) => rest);
|
|
351
|
+
}
|
|
352
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
353
|
+
}
|
|
354
|
+
case "aide_upgrade": {
|
|
355
|
+
const parsed = UpgradeInput.parse(args);
|
|
356
|
+
if (parsed.category === "brain") {
|
|
357
|
+
// Brain category: its own orchestrator (insert / preview / guarded apply);
|
|
358
|
+
// neither framework detection nor the whole-surface comparison is needed.
|
|
359
|
+
const brainResult = await brainCategory({
|
|
360
|
+
root,
|
|
361
|
+
path: parsed.path,
|
|
362
|
+
brainChange: parsed.brainChange,
|
|
363
|
+
beforeHash: parsed.beforeHash,
|
|
364
|
+
});
|
|
365
|
+
return { content: [{ type: "text", text: JSON.stringify(brainResult, null, 2) }] };
|
|
366
|
+
}
|
|
367
|
+
const result = await upgrade(root, parsed.framework, parsed.path, parsed.targetVersion);
|
|
368
|
+
if (parsed.category) {
|
|
369
|
+
// Category-specific call: filter to the requested category, write files
|
|
370
|
+
// to disk via applyFiles, and return a manifest (no canonicalContent).
|
|
371
|
+
const filtered = result.categories.filter((c) => c.category === parsed.category);
|
|
372
|
+
result.categories = await Promise.all(filtered.map(async (cat) => {
|
|
373
|
+
const appliedFiles = await applyFiles(cat.files);
|
|
374
|
+
// Recompute summary from post-apply statuses
|
|
375
|
+
const summary = {
|
|
376
|
+
total: appliedFiles.length,
|
|
377
|
+
differs: appliedFiles.filter((f) => f.status === "differs").length,
|
|
378
|
+
missing: appliedFiles.filter((f) => f.status === "missing").length,
|
|
379
|
+
matches: appliedFiles.filter((f) => f.status === "matches").length,
|
|
380
|
+
updated: appliedFiles.filter((f) => f.status === "updated").length,
|
|
381
|
+
created: appliedFiles.filter((f) => f.status === "created").length,
|
|
382
|
+
unchanged: appliedFiles.filter((f) => f.status === "unchanged").length,
|
|
383
|
+
};
|
|
384
|
+
// Defense in depth: strip any residual canonicalContent
|
|
385
|
+
const manifestFiles = appliedFiles.map(({ canonicalContent: _content, ...rest }) => rest);
|
|
386
|
+
return { ...cat, files: manifestFiles, summary };
|
|
387
|
+
}));
|
|
388
|
+
}
|
|
389
|
+
else {
|
|
390
|
+
// Summary call: strip canonicalContent to keep response small
|
|
391
|
+
result.categories = result.categories.map((cat) => ({
|
|
392
|
+
...cat,
|
|
393
|
+
files: cat.files.map(({ canonicalContent: _content, ...rest }) => rest),
|
|
394
|
+
}));
|
|
395
|
+
}
|
|
396
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
397
|
+
}
|
|
398
|
+
case "aide_info": {
|
|
399
|
+
InfoInput.parse(args);
|
|
400
|
+
const result = await info(root);
|
|
401
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
402
|
+
}
|
|
403
|
+
case "aide_brain": {
|
|
404
|
+
const parsed = BrainInput.parse(args);
|
|
405
|
+
// Step 1 — template read: one section or the launcher of the bundled template.
|
|
406
|
+
if (parsed.source === "template") {
|
|
407
|
+
const result = readTemplateSection({ kind: parsed.kind });
|
|
408
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
409
|
+
}
|
|
410
|
+
// Step 2 — contract read: every contract section with role and purpose.
|
|
411
|
+
if (parsed.source === "contract") {
|
|
412
|
+
const result = listContract();
|
|
413
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
414
|
+
}
|
|
415
|
+
// Step 3 — draft check: structural validation of the draft at `path`.
|
|
416
|
+
if (parsed.source === "draft") {
|
|
417
|
+
const result = await validateDraft({ root, path: parsed.path });
|
|
418
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
419
|
+
}
|
|
420
|
+
// Step 4 — host read (`source` absent or "host"): unchanged.
|
|
421
|
+
const result = await brain(root, parsed);
|
|
422
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
423
|
+
}
|
|
424
|
+
case "aide_inspect": {
|
|
425
|
+
const parsed = InspectInput.parse(args);
|
|
426
|
+
const result = await inspect(root, parsed.name, parsed.file);
|
|
427
|
+
if (result.hits.length === 0) {
|
|
428
|
+
return {
|
|
429
|
+
content: [
|
|
430
|
+
{
|
|
431
|
+
type: "text",
|
|
432
|
+
text: `No symbol "${parsed.name}" found. Check the name or specify a file path to narrow the search.`,
|
|
433
|
+
},
|
|
434
|
+
],
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
438
|
+
}
|
|
439
|
+
case "aide_observer_start": {
|
|
440
|
+
ObserverStartInput.parse(args ?? {});
|
|
441
|
+
const reply = await observerStart({ root, entryScript: process.argv[1] });
|
|
442
|
+
return { content: [{ type: "text", text: formatStartReply(reply) }] };
|
|
443
|
+
}
|
|
444
|
+
case "aide_observer_event": {
|
|
445
|
+
const line = await observerEvent({ root, input: args });
|
|
446
|
+
return { content: [{ type: "text", text: line }] };
|
|
447
|
+
}
|
|
448
|
+
case "aide_observer_end_session": {
|
|
449
|
+
const line = await observerEndSession({ root, input: args });
|
|
450
|
+
return { content: [{ type: "text", text: line }] };
|
|
451
|
+
}
|
|
452
|
+
default:
|
|
453
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
454
|
+
}
|
|
455
|
+
});
|
|
456
|
+
// Step 3 — connect the stdio transport.
|
|
457
|
+
const transport = new StdioServerTransport();
|
|
458
|
+
await server.connect(transport);
|
|
459
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BrainAideFault } from "../../../types/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Composes the `brain-aide-invalid` remediation sentence for `aide_brain` from
|
|
4
|
+
* the detector's fault alone. A `missing-sections` fault names every absent
|
|
5
|
+
* required section marker (in the order the parser reported them) and points
|
|
6
|
+
* to the `aide_upgrade` brain-category insertion, then an `aide_info` re-check;
|
|
7
|
+
* a `malformed` fault carries the parser's reason verbatim and points to a hand
|
|
8
|
+
* fix with the user, then an `aide_info` re-check. Neither names
|
|
9
|
+
* `/aide:brain config`. No other input is consulted — no section selector,
|
|
10
|
+
* no brand, no file reads — so the output is identical for every `kind`.
|
|
11
|
+
*/
|
|
12
|
+
export default function composeOutdatedRemediation(fault: BrainAideFault): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composes the `brain-aide-invalid` remediation sentence for `aide_brain` from
|
|
3
|
+
* the detector's fault alone. A `missing-sections` fault names every absent
|
|
4
|
+
* required section marker (in the order the parser reported them) and points
|
|
5
|
+
* to the `aide_upgrade` brain-category insertion, then an `aide_info` re-check;
|
|
6
|
+
* a `malformed` fault carries the parser's reason verbatim and points to a hand
|
|
7
|
+
* fix with the user, then an `aide_info` re-check. Neither names
|
|
8
|
+
* `/aide:brain config`. No other input is consulted — no section selector,
|
|
9
|
+
* no brand, no file reads — so the output is identical for every `kind`.
|
|
10
|
+
*/
|
|
11
|
+
export default function composeOutdatedRemediation(fault) {
|
|
12
|
+
switch (fault.kind) {
|
|
13
|
+
case "missing-sections":
|
|
14
|
+
return `\`.aide/config/brain.aide\` is missing required sections: ${fault.sections.join(", ")}. With the user's consent, call \`aide_upgrade\` with \`category: "brain"\` — it inserts only the missing sections and leaves every existing section untouched — then re-check brain state with \`aide_info\`.`;
|
|
15
|
+
case "malformed":
|
|
16
|
+
return `\`.aide/config/brain.aide\` exists but is malformed: ${fault.reason}. Fix it by hand with the user at the place that reason names, then re-check brain state with \`aide_info\`. Do not proceed with this task as if the brain were available.`;
|
|
17
|
+
default: {
|
|
18
|
+
// Exhaustiveness guard — a new BrainAideFault kind fails to compile here.
|
|
19
|
+
const _exhaustive = fault;
|
|
20
|
+
void _exhaustive;
|
|
21
|
+
throw new Error("Unhandled BrainAideFault kind");
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|