@yjjeong/omg 0.1.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/CHANGELOG.md +85 -0
- package/LICENSE +21 -0
- package/README.md +153 -0
- package/dist/cli/args.d.ts +39 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +129 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/autoCommit.d.ts +20 -0
- package/dist/cli/autoCommit.d.ts.map +1 -0
- package/dist/cli/autoCommit.js +121 -0
- package/dist/cli/autoCommit.js.map +1 -0
- package/dist/cli/bgTasks.d.ts +57 -0
- package/dist/cli/bgTasks.d.ts.map +1 -0
- package/dist/cli/bgTasks.js +193 -0
- package/dist/cli/bgTasks.js.map +1 -0
- package/dist/cli/compactor.d.ts +48 -0
- package/dist/cli/compactor.d.ts.map +1 -0
- package/dist/cli/compactor.js +73 -0
- package/dist/cli/compactor.js.map +1 -0
- package/dist/cli/doctor.d.ts +77 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +279 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/gitStatus.d.ts +7 -0
- package/dist/cli/gitStatus.d.ts.map +1 -0
- package/dist/cli/gitStatus.js +70 -0
- package/dist/cli/gitStatus.js.map +1 -0
- package/dist/cli/handoff.d.ts +36 -0
- package/dist/cli/handoff.d.ts.map +1 -0
- package/dist/cli/handoff.js +60 -0
- package/dist/cli/handoff.js.map +1 -0
- package/dist/cli/interactive/brokers.d.ts +31 -0
- package/dist/cli/interactive/brokers.d.ts.map +1 -0
- package/dist/cli/interactive/brokers.js +259 -0
- package/dist/cli/interactive/brokers.js.map +1 -0
- package/dist/cli/interactive/index.d.ts +8 -0
- package/dist/cli/interactive/index.d.ts.map +1 -0
- package/dist/cli/interactive/index.js +731 -0
- package/dist/cli/interactive/index.js.map +1 -0
- package/dist/cli/interactive/proxyQuestions.d.ts +15 -0
- package/dist/cli/interactive/proxyQuestions.d.ts.map +1 -0
- package/dist/cli/interactive/proxyQuestions.js +48 -0
- package/dist/cli/interactive/proxyQuestions.js.map +1 -0
- package/dist/cli/interactive/tabManager.d.ts +32 -0
- package/dist/cli/interactive/tabManager.d.ts.map +1 -0
- package/dist/cli/interactive/tabManager.js +244 -0
- package/dist/cli/interactive/tabManager.js.map +1 -0
- package/dist/cli/interactive/teamHint.d.ts +2 -0
- package/dist/cli/interactive/teamHint.d.ts.map +1 -0
- package/dist/cli/interactive/teamHint.js +14 -0
- package/dist/cli/interactive/teamHint.js.map +1 -0
- package/dist/cli/login.d.ts +13 -0
- package/dist/cli/login.d.ts.map +1 -0
- package/dist/cli/login.js +53 -0
- package/dist/cli/login.js.map +1 -0
- package/dist/cli/modes/demo.d.ts +12 -0
- package/dist/cli/modes/demo.d.ts.map +1 -0
- package/dist/cli/modes/demo.js +48 -0
- package/dist/cli/modes/demo.js.map +1 -0
- package/dist/cli/modes/doctor.d.ts +28 -0
- package/dist/cli/modes/doctor.d.ts.map +1 -0
- package/dist/cli/modes/doctor.js +79 -0
- package/dist/cli/modes/doctor.js.map +1 -0
- package/dist/cli/modes/login.d.ts +5 -0
- package/dist/cli/modes/login.d.ts.map +1 -0
- package/dist/cli/modes/login.js +40 -0
- package/dist/cli/modes/login.js.map +1 -0
- package/dist/cli/modes/mcpServe.d.ts +9 -0
- package/dist/cli/modes/mcpServe.d.ts.map +1 -0
- package/dist/cli/modes/mcpServe.js +112 -0
- package/dist/cli/modes/mcpServe.js.map +1 -0
- package/dist/cli/modes/orchestrator.d.ts +14 -0
- package/dist/cli/modes/orchestrator.d.ts.map +1 -0
- package/dist/cli/modes/orchestrator.js +64 -0
- package/dist/cli/modes/orchestrator.js.map +1 -0
- package/dist/cli/modes/team.d.ts +14 -0
- package/dist/cli/modes/team.d.ts.map +1 -0
- package/dist/cli/modes/team.js +87 -0
- package/dist/cli/modes/team.js.map +1 -0
- package/dist/cli/registry.d.ts +3 -0
- package/dist/cli/registry.d.ts.map +1 -0
- package/dist/cli/registry.js +15 -0
- package/dist/cli/registry.js.map +1 -0
- package/dist/cli/slash/core.d.ts +3 -0
- package/dist/cli/slash/core.d.ts.map +1 -0
- package/dist/cli/slash/core.js +509 -0
- package/dist/cli/slash/core.js.map +1 -0
- package/dist/cli/slash/index.d.ts +3 -0
- package/dist/cli/slash/index.d.ts.map +1 -0
- package/dist/cli/slash/index.js +28 -0
- package/dist/cli/slash/index.js.map +1 -0
- package/dist/cli/slash/modes.d.ts +3 -0
- package/dist/cli/slash/modes.d.ts.map +1 -0
- package/dist/cli/slash/modes.js +530 -0
- package/dist/cli/slash/modes.js.map +1 -0
- package/dist/cli/slash/session.d.ts +3 -0
- package/dist/cli/slash/session.d.ts.map +1 -0
- package/dist/cli/slash/session.js +376 -0
- package/dist/cli/slash/session.js.map +1 -0
- package/dist/cli/slash/shared.d.ts +43 -0
- package/dist/cli/slash/shared.d.ts.map +1 -0
- package/dist/cli/slash/shared.js +6 -0
- package/dist/cli/slash/shared.js.map +1 -0
- package/dist/cli/slash/tabs.d.ts +3 -0
- package/dist/cli/slash/tabs.d.ts.map +1 -0
- package/dist/cli/slash/tabs.js +497 -0
- package/dist/cli/slash/tabs.js.map +1 -0
- package/dist/cli/slash/team.d.ts +3 -0
- package/dist/cli/slash/team.d.ts.map +1 -0
- package/dist/cli/slash/team.js +85 -0
- package/dist/cli/slash/team.js.map +1 -0
- package/dist/cli/slash.d.ts +3 -0
- package/dist/cli/slash.d.ts.map +1 -0
- package/dist/cli/slash.js +8 -0
- package/dist/cli/slash.js.map +1 -0
- package/dist/cli/teamPipeline.d.ts +42 -0
- package/dist/cli/teamPipeline.d.ts.map +1 -0
- package/dist/cli/teamPipeline.js +406 -0
- package/dist/cli/teamPipeline.js.map +1 -0
- package/dist/cli/touchedFiles.d.ts +14 -0
- package/dist/cli/touchedFiles.d.ts.map +1 -0
- package/dist/cli/touchedFiles.js +66 -0
- package/dist/cli/touchedFiles.js.map +1 -0
- package/dist/cli/turn.d.ts +47 -0
- package/dist/cli/turn.d.ts.map +1 -0
- package/dist/cli/turn.js +626 -0
- package/dist/cli/turn.js.map +1 -0
- package/dist/cli/types.d.ts +47 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +5 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/cli/uiSession.d.ts +10 -0
- package/dist/cli/uiSession.d.ts.map +1 -0
- package/dist/cli/uiSession.js +66 -0
- package/dist/cli/uiSession.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +128 -0
- package/dist/cli.js.map +1 -0
- package/dist/core/adapter.d.ts +47 -0
- package/dist/core/adapter.d.ts.map +1 -0
- package/dist/core/adapter.js +48 -0
- package/dist/core/adapter.js.map +1 -0
- package/dist/core/adapters/anthropic.d.ts +35 -0
- package/dist/core/adapters/anthropic.d.ts.map +1 -0
- package/dist/core/adapters/anthropic.js +203 -0
- package/dist/core/adapters/anthropic.js.map +1 -0
- package/dist/core/adapters/claudeCli.d.ts +126 -0
- package/dist/core/adapters/claudeCli.d.ts.map +1 -0
- package/dist/core/adapters/claudeCli.js +584 -0
- package/dist/core/adapters/claudeCli.js.map +1 -0
- package/dist/core/adapters/cliAdapterBase.d.ts +48 -0
- package/dist/core/adapters/cliAdapterBase.d.ts.map +1 -0
- package/dist/core/adapters/cliAdapterBase.js +105 -0
- package/dist/core/adapters/cliAdapterBase.js.map +1 -0
- package/dist/core/adapters/cliStderr.d.ts +35 -0
- package/dist/core/adapters/cliStderr.d.ts.map +1 -0
- package/dist/core/adapters/cliStderr.js +87 -0
- package/dist/core/adapters/cliStderr.js.map +1 -0
- package/dist/core/adapters/codexCli.d.ts +113 -0
- package/dist/core/adapters/codexCli.d.ts.map +1 -0
- package/dist/core/adapters/codexCli.js +424 -0
- package/dist/core/adapters/codexCli.js.map +1 -0
- package/dist/core/adapters/gemini.d.ts +17 -0
- package/dist/core/adapters/gemini.d.ts.map +1 -0
- package/dist/core/adapters/gemini.js +133 -0
- package/dist/core/adapters/gemini.js.map +1 -0
- package/dist/core/adapters/geminiCli.d.ts +91 -0
- package/dist/core/adapters/geminiCli.d.ts.map +1 -0
- package/dist/core/adapters/geminiCli.js +276 -0
- package/dist/core/adapters/geminiCli.js.map +1 -0
- package/dist/core/adapters/nudges.d.ts +21 -0
- package/dist/core/adapters/nudges.d.ts.map +1 -0
- package/dist/core/adapters/nudges.js +75 -0
- package/dist/core/adapters/nudges.js.map +1 -0
- package/dist/core/adapters/openai.d.ts +17 -0
- package/dist/core/adapters/openai.d.ts.map +1 -0
- package/dist/core/adapters/openai.js +138 -0
- package/dist/core/adapters/openai.js.map +1 -0
- package/dist/core/adapters/parseFailures.d.ts +10 -0
- package/dist/core/adapters/parseFailures.d.ts.map +1 -0
- package/dist/core/adapters/parseFailures.js +35 -0
- package/dist/core/adapters/parseFailures.js.map +1 -0
- package/dist/core/adapters/utils.d.ts +11 -0
- package/dist/core/adapters/utils.d.ts.map +1 -0
- package/dist/core/adapters/utils.js +33 -0
- package/dist/core/adapters/utils.js.map +1 -0
- package/dist/core/askBroker.d.ts +11 -0
- package/dist/core/askBroker.d.ts.map +1 -0
- package/dist/core/askBroker.js +78 -0
- package/dist/core/askBroker.js.map +1 -0
- package/dist/core/atomicWrite.d.ts +5 -0
- package/dist/core/atomicWrite.d.ts.map +1 -0
- package/dist/core/atomicWrite.js +18 -0
- package/dist/core/atomicWrite.js.map +1 -0
- package/dist/core/brokers/askBroker.d.ts +11 -0
- package/dist/core/brokers/askBroker.d.ts.map +1 -0
- package/dist/core/brokers/askBroker.js +78 -0
- package/dist/core/brokers/askBroker.js.map +1 -0
- package/dist/core/brokers/permissionBroker.d.ts +7 -0
- package/dist/core/brokers/permissionBroker.d.ts.map +1 -0
- package/dist/core/brokers/permissionBroker.js +63 -0
- package/dist/core/brokers/permissionBroker.js.map +1 -0
- package/dist/core/brokers/socketBroker.d.ts +35 -0
- package/dist/core/brokers/socketBroker.d.ts.map +1 -0
- package/dist/core/brokers/socketBroker.js +74 -0
- package/dist/core/brokers/socketBroker.js.map +1 -0
- package/dist/core/clipboard.d.ts +4 -0
- package/dist/core/clipboard.d.ts.map +1 -0
- package/dist/core/clipboard.js +46 -0
- package/dist/core/clipboard.js.map +1 -0
- package/dist/core/compactor.d.ts +32 -0
- package/dist/core/compactor.d.ts.map +1 -0
- package/dist/core/compactor.js +91 -0
- package/dist/core/compactor.js.map +1 -0
- package/dist/core/consensusEngine.d.ts +21 -0
- package/dist/core/consensusEngine.d.ts.map +1 -0
- package/dist/core/consensusEngine.js +116 -0
- package/dist/core/consensusEngine.js.map +1 -0
- package/dist/core/context/contextCompressor.d.ts +10 -0
- package/dist/core/context/contextCompressor.d.ts.map +1 -0
- package/dist/core/context/contextCompressor.js +54 -0
- package/dist/core/context/contextCompressor.js.map +1 -0
- package/dist/core/context/contextWindows.d.ts +25 -0
- package/dist/core/context/contextWindows.d.ts.map +1 -0
- package/dist/core/context/contextWindows.js +101 -0
- package/dist/core/context/contextWindows.js.map +1 -0
- package/dist/core/context/summarizer.d.ts +65 -0
- package/dist/core/context/summarizer.d.ts.map +1 -0
- package/dist/core/context/summarizer.js +184 -0
- package/dist/core/context/summarizer.js.map +1 -0
- package/dist/core/context/usageCache.d.ts +19 -0
- package/dist/core/context/usageCache.d.ts.map +1 -0
- package/dist/core/context/usageCache.js +157 -0
- package/dist/core/context/usageCache.js.map +1 -0
- package/dist/core/context/usageWindow.d.ts +19 -0
- package/dist/core/context/usageWindow.d.ts.map +1 -0
- package/dist/core/context/usageWindow.js +73 -0
- package/dist/core/context/usageWindow.js.map +1 -0
- package/dist/core/contextCompressor.d.ts +10 -0
- package/dist/core/contextCompressor.d.ts.map +1 -0
- package/dist/core/contextCompressor.js +54 -0
- package/dist/core/contextCompressor.js.map +1 -0
- package/dist/core/contextWindows.d.ts +5 -0
- package/dist/core/contextWindows.d.ts.map +1 -0
- package/dist/core/contextWindows.js +60 -0
- package/dist/core/contextWindows.js.map +1 -0
- package/dist/core/continuum/digest.d.ts +35 -0
- package/dist/core/continuum/digest.d.ts.map +1 -0
- package/dist/core/continuum/digest.js +91 -0
- package/dist/core/continuum/digest.js.map +1 -0
- package/dist/core/continuum/index.d.ts +6 -0
- package/dist/core/continuum/index.d.ts.map +1 -0
- package/dist/core/continuum/index.js +7 -0
- package/dist/core/continuum/index.js.map +1 -0
- package/dist/core/continuum/inject.d.ts +9 -0
- package/dist/core/continuum/inject.d.ts.map +1 -0
- package/dist/core/continuum/inject.js +78 -0
- package/dist/core/continuum/inject.js.map +1 -0
- package/dist/core/continuum/projectId.d.ts +10 -0
- package/dist/core/continuum/projectId.d.ts.map +1 -0
- package/dist/core/continuum/projectId.js +60 -0
- package/dist/core/continuum/projectId.js.map +1 -0
- package/dist/core/continuum/store.d.ts +24 -0
- package/dist/core/continuum/store.d.ts.map +1 -0
- package/dist/core/continuum/store.js +144 -0
- package/dist/core/continuum/store.js.map +1 -0
- package/dist/core/continuum/types.d.ts +87 -0
- package/dist/core/continuum/types.d.ts.map +1 -0
- package/dist/core/continuum/types.js +9 -0
- package/dist/core/continuum/types.js.map +1 -0
- package/dist/core/dag.d.ts +21 -0
- package/dist/core/dag.d.ts.map +1 -0
- package/dist/core/dag.js +71 -0
- package/dist/core/dag.js.map +1 -0
- package/dist/core/director.d.ts +11 -0
- package/dist/core/director.d.ts.map +1 -0
- package/dist/core/director.js +37 -0
- package/dist/core/director.js.map +1 -0
- package/dist/core/hookedToolBroker.d.ts +25 -0
- package/dist/core/hookedToolBroker.d.ts.map +1 -0
- package/dist/core/hookedToolBroker.js +95 -0
- package/dist/core/hookedToolBroker.js.map +1 -0
- package/dist/core/langHint.d.ts +9 -0
- package/dist/core/langHint.d.ts.map +1 -0
- package/dist/core/langHint.js +33 -0
- package/dist/core/langHint.js.map +1 -0
- package/dist/core/mcp/mcpClient.d.ts +42 -0
- package/dist/core/mcp/mcpClient.d.ts.map +1 -0
- package/dist/core/mcp/mcpClient.js +134 -0
- package/dist/core/mcp/mcpClient.js.map +1 -0
- package/dist/core/mcp/mcpConfig.d.ts +58 -0
- package/dist/core/mcp/mcpConfig.d.ts.map +1 -0
- package/dist/core/mcp/mcpConfig.js +148 -0
- package/dist/core/mcp/mcpConfig.js.map +1 -0
- package/dist/core/mcp/mcpManager.d.ts +31 -0
- package/dist/core/mcp/mcpManager.d.ts.map +1 -0
- package/dist/core/mcp/mcpManager.js +83 -0
- package/dist/core/mcp/mcpManager.js.map +1 -0
- package/dist/core/mcpClient.d.ts +42 -0
- package/dist/core/mcpClient.d.ts.map +1 -0
- package/dist/core/mcpClient.js +134 -0
- package/dist/core/mcpClient.js.map +1 -0
- package/dist/core/mcpConfig.d.ts +24 -0
- package/dist/core/mcpConfig.d.ts.map +1 -0
- package/dist/core/mcpConfig.js +74 -0
- package/dist/core/mcpConfig.js.map +1 -0
- package/dist/core/mcpManager.d.ts +31 -0
- package/dist/core/mcpManager.d.ts.map +1 -0
- package/dist/core/mcpManager.js +83 -0
- package/dist/core/mcpManager.js.map +1 -0
- package/dist/core/memory.d.ts +22 -0
- package/dist/core/memory.d.ts.map +1 -0
- package/dist/core/memory.js +102 -0
- package/dist/core/memory.js.map +1 -0
- package/dist/core/omgToolManifest.d.ts +34 -0
- package/dist/core/omgToolManifest.d.ts.map +1 -0
- package/dist/core/omgToolManifest.js +59 -0
- package/dist/core/omgToolManifest.js.map +1 -0
- package/dist/core/orchestration/consensusEngine.d.ts +21 -0
- package/dist/core/orchestration/consensusEngine.d.ts.map +1 -0
- package/dist/core/orchestration/consensusEngine.js +116 -0
- package/dist/core/orchestration/consensusEngine.js.map +1 -0
- package/dist/core/orchestration/dag.d.ts +21 -0
- package/dist/core/orchestration/dag.d.ts.map +1 -0
- package/dist/core/orchestration/dag.js +71 -0
- package/dist/core/orchestration/dag.js.map +1 -0
- package/dist/core/orchestration/director.d.ts +11 -0
- package/dist/core/orchestration/director.d.ts.map +1 -0
- package/dist/core/orchestration/director.js +37 -0
- package/dist/core/orchestration/director.js.map +1 -0
- package/dist/core/orchestration/orchestrator.d.ts +32 -0
- package/dist/core/orchestration/orchestrator.d.ts.map +1 -0
- package/dist/core/orchestration/orchestrator.js +214 -0
- package/dist/core/orchestration/orchestrator.js.map +1 -0
- package/dist/core/orchestration/roleRouter.d.ts +28 -0
- package/dist/core/orchestration/roleRouter.d.ts.map +1 -0
- package/dist/core/orchestration/roleRouter.js +64 -0
- package/dist/core/orchestration/roleRouter.js.map +1 -0
- package/dist/core/orchestration/teamRunner.d.ts +69 -0
- package/dist/core/orchestration/teamRunner.d.ts.map +1 -0
- package/dist/core/orchestration/teamRunner.js +477 -0
- package/dist/core/orchestration/teamRunner.js.map +1 -0
- package/dist/core/orchestration/types.d.ts +115 -0
- package/dist/core/orchestration/types.d.ts.map +1 -0
- package/dist/core/orchestration/types.js +71 -0
- package/dist/core/orchestration/types.js.map +1 -0
- package/dist/core/orchestrator.d.ts +32 -0
- package/dist/core/orchestrator.d.ts.map +1 -0
- package/dist/core/orchestrator.js +214 -0
- package/dist/core/orchestrator.js.map +1 -0
- package/dist/core/permissionBroker.d.ts +7 -0
- package/dist/core/permissionBroker.d.ts.map +1 -0
- package/dist/core/permissionBroker.js +63 -0
- package/dist/core/permissionBroker.js.map +1 -0
- package/dist/core/planConfig.d.ts +15 -0
- package/dist/core/planConfig.d.ts.map +1 -0
- package/dist/core/planConfig.js +98 -0
- package/dist/core/planConfig.js.map +1 -0
- package/dist/core/presetPersistence.d.ts +4 -0
- package/dist/core/presetPersistence.d.ts.map +1 -0
- package/dist/core/presetPersistence.js +64 -0
- package/dist/core/presetPersistence.js.map +1 -0
- package/dist/core/roleRouter.d.ts +26 -0
- package/dist/core/roleRouter.d.ts.map +1 -0
- package/dist/core/roleRouter.js +62 -0
- package/dist/core/roleRouter.js.map +1 -0
- package/dist/core/sessionList.d.ts +26 -0
- package/dist/core/sessionList.d.ts.map +1 -0
- package/dist/core/sessionList.js +278 -0
- package/dist/core/sessionList.js.map +1 -0
- package/dist/core/slugify.d.ts +2 -0
- package/dist/core/slugify.d.ts.map +1 -0
- package/dist/core/slugify.js +17 -0
- package/dist/core/slugify.js.map +1 -0
- package/dist/core/socketBroker.d.ts +19 -0
- package/dist/core/socketBroker.d.ts.map +1 -0
- package/dist/core/socketBroker.js +48 -0
- package/dist/core/socketBroker.js.map +1 -0
- package/dist/core/state/agentsMdScaffold.d.ts +15 -0
- package/dist/core/state/agentsMdScaffold.d.ts.map +1 -0
- package/dist/core/state/agentsMdScaffold.js +118 -0
- package/dist/core/state/agentsMdScaffold.js.map +1 -0
- package/dist/core/state/atomicWrite.d.ts +5 -0
- package/dist/core/state/atomicWrite.d.ts.map +1 -0
- package/dist/core/state/atomicWrite.js +18 -0
- package/dist/core/state/atomicWrite.js.map +1 -0
- package/dist/core/state/handoff.d.ts +20 -0
- package/dist/core/state/handoff.d.ts.map +1 -0
- package/dist/core/state/handoff.js +71 -0
- package/dist/core/state/handoff.js.map +1 -0
- package/dist/core/state/mcpCatalog.d.ts +11 -0
- package/dist/core/state/mcpCatalog.d.ts.map +1 -0
- package/dist/core/state/mcpCatalog.js +51 -0
- package/dist/core/state/mcpCatalog.js.map +1 -0
- package/dist/core/state/mcpRecommendations.d.ts +7 -0
- package/dist/core/state/mcpRecommendations.d.ts.map +1 -0
- package/dist/core/state/mcpRecommendations.js +57 -0
- package/dist/core/state/mcpRecommendations.js.map +1 -0
- package/dist/core/state/memory.d.ts +22 -0
- package/dist/core/state/memory.d.ts.map +1 -0
- package/dist/core/state/memory.js +102 -0
- package/dist/core/state/memory.js.map +1 -0
- package/dist/core/state/planConfig.d.ts +15 -0
- package/dist/core/state/planConfig.d.ts.map +1 -0
- package/dist/core/state/planConfig.js +98 -0
- package/dist/core/state/planConfig.js.map +1 -0
- package/dist/core/state/presetPersistence.d.ts +4 -0
- package/dist/core/state/presetPersistence.d.ts.map +1 -0
- package/dist/core/state/presetPersistence.js +67 -0
- package/dist/core/state/presetPersistence.js.map +1 -0
- package/dist/core/state/sessionList.d.ts +26 -0
- package/dist/core/state/sessionList.d.ts.map +1 -0
- package/dist/core/state/sessionList.js +278 -0
- package/dist/core/state/sessionList.js.map +1 -0
- package/dist/core/state/stackDetect.d.ts +8 -0
- package/dist/core/state/stackDetect.d.ts.map +1 -0
- package/dist/core/state/stackDetect.js +40 -0
- package/dist/core/state/stackDetect.js.map +1 -0
- package/dist/core/state/tabPersistence.d.ts +29 -0
- package/dist/core/state/tabPersistence.d.ts.map +1 -0
- package/dist/core/state/tabPersistence.js +65 -0
- package/dist/core/state/tabPersistence.js.map +1 -0
- package/dist/core/tabPersistence.d.ts +29 -0
- package/dist/core/tabPersistence.d.ts.map +1 -0
- package/dist/core/tabPersistence.js +65 -0
- package/dist/core/tabPersistence.js.map +1 -0
- package/dist/core/teamRunner.d.ts +42 -0
- package/dist/core/teamRunner.d.ts.map +1 -0
- package/dist/core/teamRunner.js +248 -0
- package/dist/core/teamRunner.js.map +1 -0
- package/dist/core/toolGate.d.ts +23 -0
- package/dist/core/toolGate.d.ts.map +1 -0
- package/dist/core/toolGate.js +51 -0
- package/dist/core/toolGate.js.map +1 -0
- package/dist/core/toolInterceptor.d.ts +7 -0
- package/dist/core/toolInterceptor.d.ts.map +1 -0
- package/dist/core/toolInterceptor.js +108 -0
- package/dist/core/toolInterceptor.js.map +1 -0
- package/dist/core/tools/hookedToolBroker.d.ts +25 -0
- package/dist/core/tools/hookedToolBroker.d.ts.map +1 -0
- package/dist/core/tools/hookedToolBroker.js +95 -0
- package/dist/core/tools/hookedToolBroker.js.map +1 -0
- package/dist/core/tools/omgToolManifest.d.ts +42 -0
- package/dist/core/tools/omgToolManifest.d.ts.map +1 -0
- package/dist/core/tools/omgToolManifest.js +66 -0
- package/dist/core/tools/omgToolManifest.js.map +1 -0
- package/dist/core/tools/toolGate.d.ts +23 -0
- package/dist/core/tools/toolGate.d.ts.map +1 -0
- package/dist/core/tools/toolGate.js +51 -0
- package/dist/core/tools/toolGate.js.map +1 -0
- package/dist/core/tools/toolInterceptor.d.ts +7 -0
- package/dist/core/tools/toolInterceptor.d.ts.map +1 -0
- package/dist/core/tools/toolInterceptor.js +108 -0
- package/dist/core/tools/toolInterceptor.js.map +1 -0
- package/dist/core/tools/tools.d.ts +34 -0
- package/dist/core/tools/tools.d.ts.map +1 -0
- package/dist/core/tools/tools.js +328 -0
- package/dist/core/tools/tools.js.map +1 -0
- package/dist/core/tools.d.ts +34 -0
- package/dist/core/tools.d.ts.map +1 -0
- package/dist/core/tools.js +300 -0
- package/dist/core/tools.js.map +1 -0
- package/dist/core/types.d.ts +107 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +55 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/usageCache.d.ts +19 -0
- package/dist/core/usageCache.d.ts.map +1 -0
- package/dist/core/usageCache.js +157 -0
- package/dist/core/usageCache.js.map +1 -0
- package/dist/core/usageWindow.d.ts +19 -0
- package/dist/core/usageWindow.d.ts.map +1 -0
- package/dist/core/usageWindow.js +73 -0
- package/dist/core/usageWindow.js.map +1 -0
- package/dist/core/util/bgProtocol.d.ts +5 -0
- package/dist/core/util/bgProtocol.d.ts.map +1 -0
- package/dist/core/util/bgProtocol.js +20 -0
- package/dist/core/util/bgProtocol.js.map +1 -0
- package/dist/core/util/clipboard.d.ts +4 -0
- package/dist/core/util/clipboard.d.ts.map +1 -0
- package/dist/core/util/clipboard.js +46 -0
- package/dist/core/util/clipboard.js.map +1 -0
- package/dist/core/util/clipboardImage.d.ts +3 -0
- package/dist/core/util/clipboardImage.d.ts.map +1 -0
- package/dist/core/util/clipboardImage.js +58 -0
- package/dist/core/util/clipboardImage.js.map +1 -0
- package/dist/core/util/langHint.d.ts +9 -0
- package/dist/core/util/langHint.d.ts.map +1 -0
- package/dist/core/util/langHint.js +33 -0
- package/dist/core/util/langHint.js.map +1 -0
- package/dist/core/util/slugify.d.ts +2 -0
- package/dist/core/util/slugify.d.ts.map +1 -0
- package/dist/core/util/slugify.js +28 -0
- package/dist/core/util/slugify.js.map +1 -0
- package/dist/hooks/hookedToolProxy.mjs +118 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/ipc/dispatcher.d.ts +21 -0
- package/dist/ipc/dispatcher.d.ts.map +1 -0
- package/dist/ipc/dispatcher.js +160 -0
- package/dist/ipc/dispatcher.js.map +1 -0
- package/dist/ipc/events.d.ts +33 -0
- package/dist/ipc/events.d.ts.map +1 -0
- package/dist/ipc/events.js +42 -0
- package/dist/ipc/events.js.map +1 -0
- package/dist/ipc/rpc.d.ts +31 -0
- package/dist/ipc/rpc.d.ts.map +1 -0
- package/dist/ipc/rpc.js +110 -0
- package/dist/ipc/rpc.js.map +1 -0
- package/dist/ipc/stdio.d.ts +11 -0
- package/dist/ipc/stdio.d.ts.map +1 -0
- package/dist/ipc/stdio.js +52 -0
- package/dist/ipc/stdio.js.map +1 -0
- package/dist/mcp/askClient.d.ts +9 -0
- package/dist/mcp/askClient.d.ts.map +1 -0
- package/dist/mcp/askClient.js +70 -0
- package/dist/mcp/askClient.js.map +1 -0
- package/dist/mcp/constants.d.ts +6 -0
- package/dist/mcp/constants.d.ts.map +1 -0
- package/dist/mcp/constants.js +8 -0
- package/dist/mcp/constants.js.map +1 -0
- package/dist/mcp/permissionClient.d.ts +5 -0
- package/dist/mcp/permissionClient.d.ts.map +1 -0
- package/dist/mcp/permissionClient.js +71 -0
- package/dist/mcp/permissionClient.js.map +1 -0
- package/dist/mcp/schemas.d.ts +9 -0
- package/dist/mcp/schemas.d.ts.map +1 -0
- package/dist/mcp/schemas.js +121 -0
- package/dist/mcp/schemas.js.map +1 -0
- package/dist/mcp/server.d.ts +41 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +204 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/policy/loader.d.ts +27 -0
- package/dist/policy/loader.d.ts.map +1 -0
- package/dist/policy/loader.js +89 -0
- package/dist/policy/loader.js.map +1 -0
- package/dist/policy/team-claude-only.yaml +46 -0
- package/dist/policy/team-codex-only.yaml +46 -0
- package/dist/policy/team-codex.yaml +54 -0
- package/dist/policy/team.yaml +104 -0
- package/dist/toolhook/hookedToolProxy.mjs +118 -0
- package/dist/ui/components/App.d.ts +14 -0
- package/dist/ui/components/App.d.ts.map +1 -0
- package/dist/ui/components/App.js +803 -0
- package/dist/ui/components/App.js.map +1 -0
- package/dist/ui/components/AskPicker.d.ts +8 -0
- package/dist/ui/components/AskPicker.d.ts.map +1 -0
- package/dist/ui/components/AskPicker.js +202 -0
- package/dist/ui/components/AskPicker.js.map +1 -0
- package/dist/ui/components/CommandInput.d.ts +63 -0
- package/dist/ui/components/CommandInput.d.ts.map +1 -0
- package/dist/ui/components/CommandInput.js +994 -0
- package/dist/ui/components/CommandInput.js.map +1 -0
- package/dist/ui/components/DiffView.d.ts +19 -0
- package/dist/ui/components/DiffView.d.ts.map +1 -0
- package/dist/ui/components/DiffView.js +93 -0
- package/dist/ui/components/DiffView.js.map +1 -0
- package/dist/ui/components/Dock.d.ts +49 -0
- package/dist/ui/components/Dock.d.ts.map +1 -0
- package/dist/ui/components/Dock.js +52 -0
- package/dist/ui/components/Dock.js.map +1 -0
- package/dist/ui/components/EventLog.d.ts +42 -0
- package/dist/ui/components/EventLog.d.ts.map +1 -0
- package/dist/ui/components/EventLog.js +450 -0
- package/dist/ui/components/EventLog.js.map +1 -0
- package/dist/ui/components/FileSuggest.d.ts +8 -0
- package/dist/ui/components/FileSuggest.d.ts.map +1 -0
- package/dist/ui/components/FileSuggest.js +19 -0
- package/dist/ui/components/FileSuggest.js.map +1 -0
- package/dist/ui/components/HRule.d.ts +27 -0
- package/dist/ui/components/HRule.d.ts.map +1 -0
- package/dist/ui/components/HRule.js +75 -0
- package/dist/ui/components/HRule.js.map +1 -0
- package/dist/ui/components/HintBar.d.ts +2 -0
- package/dist/ui/components/HintBar.d.ts.map +1 -0
- package/dist/ui/components/HintBar.js +19 -0
- package/dist/ui/components/HintBar.js.map +1 -0
- package/dist/ui/components/MarkdownText.d.ts +13 -0
- package/dist/ui/components/MarkdownText.d.ts.map +1 -0
- package/dist/ui/components/MarkdownText.js +255 -0
- package/dist/ui/components/MarkdownText.js.map +1 -0
- package/dist/ui/components/PermissionPrompt.d.ts +8 -0
- package/dist/ui/components/PermissionPrompt.d.ts.map +1 -0
- package/dist/ui/components/PermissionPrompt.js +37 -0
- package/dist/ui/components/PermissionPrompt.js.map +1 -0
- package/dist/ui/components/SessionPicker.d.ts +16 -0
- package/dist/ui/components/SessionPicker.d.ts.map +1 -0
- package/dist/ui/components/SessionPicker.js +116 -0
- package/dist/ui/components/SessionPicker.js.map +1 -0
- package/dist/ui/components/SlashPalette.d.ts +8 -0
- package/dist/ui/components/SlashPalette.d.ts.map +1 -0
- package/dist/ui/components/SlashPalette.js +41 -0
- package/dist/ui/components/SlashPalette.js.map +1 -0
- package/dist/ui/components/Spinner.d.ts +37 -0
- package/dist/ui/components/Spinner.d.ts.map +1 -0
- package/dist/ui/components/Spinner.js +139 -0
- package/dist/ui/components/Spinner.js.map +1 -0
- package/dist/ui/components/StatusBar.d.ts +92 -0
- package/dist/ui/components/StatusBar.d.ts.map +1 -0
- package/dist/ui/components/StatusBar.js +268 -0
- package/dist/ui/components/StatusBar.js.map +1 -0
- package/dist/ui/components/TabChip.d.ts +11 -0
- package/dist/ui/components/TabChip.d.ts.map +1 -0
- package/dist/ui/components/TabChip.js +23 -0
- package/dist/ui/components/TabChip.js.map +1 -0
- package/dist/ui/components/TeamIndicator.d.ts +6 -0
- package/dist/ui/components/TeamIndicator.d.ts.map +1 -0
- package/dist/ui/components/TeamIndicator.js +17 -0
- package/dist/ui/components/TeamIndicator.js.map +1 -0
- package/dist/ui/components/TeamStatusPanel.d.ts +14 -0
- package/dist/ui/components/TeamStatusPanel.d.ts.map +1 -0
- package/dist/ui/components/TeamStatusPanel.js +65 -0
- package/dist/ui/components/TeamStatusPanel.js.map +1 -0
- package/dist/ui/components/ThinkingBlock.d.ts +10 -0
- package/dist/ui/components/ThinkingBlock.d.ts.map +1 -0
- package/dist/ui/components/ThinkingBlock.js +21 -0
- package/dist/ui/components/ThinkingBlock.js.map +1 -0
- package/dist/ui/components/TodoIndicator.d.ts +11 -0
- package/dist/ui/components/TodoIndicator.d.ts.map +1 -0
- package/dist/ui/components/TodoIndicator.js +37 -0
- package/dist/ui/components/TodoIndicator.js.map +1 -0
- package/dist/ui/components/ToolCallCard.d.ts +16 -0
- package/dist/ui/components/ToolCallCard.d.ts.map +1 -0
- package/dist/ui/components/ToolCallCard.js +195 -0
- package/dist/ui/components/ToolCallCard.js.map +1 -0
- package/dist/ui/components/Welcome.d.ts +8 -0
- package/dist/ui/components/Welcome.d.ts.map +1 -0
- package/dist/ui/components/Welcome.js +53 -0
- package/dist/ui/components/Welcome.js.map +1 -0
- package/dist/ui/cursorState.d.ts +29 -0
- package/dist/ui/cursorState.d.ts.map +1 -0
- package/dist/ui/cursorState.js +49 -0
- package/dist/ui/cursorState.js.map +1 -0
- package/dist/ui/diff.d.ts +34 -0
- package/dist/ui/diff.d.ts.map +1 -0
- package/dist/ui/diff.js +184 -0
- package/dist/ui/diff.js.map +1 -0
- package/dist/ui/diffLang.d.ts +2 -0
- package/dist/ui/diffLang.d.ts.map +1 -0
- package/dist/ui/diffLang.js +36 -0
- package/dist/ui/diffLang.js.map +1 -0
- package/dist/ui/emoji.d.ts +4 -0
- package/dist/ui/emoji.d.ts.map +1 -0
- package/dist/ui/emoji.js +73 -0
- package/dist/ui/emoji.js.map +1 -0
- package/dist/ui/fileMentions.d.ts +41 -0
- package/dist/ui/fileMentions.d.ts.map +1 -0
- package/dist/ui/fileMentions.js +135 -0
- package/dist/ui/fileMentions.js.map +1 -0
- package/dist/ui/hooks/useLineEditor.d.ts +44 -0
- package/dist/ui/hooks/useLineEditor.d.ts.map +1 -0
- package/dist/ui/hooks/useLineEditor.js +142 -0
- package/dist/ui/hooks/useLineEditor.js.map +1 -0
- package/dist/ui/inputHistory.d.ts +8 -0
- package/dist/ui/inputHistory.d.ts.map +1 -0
- package/dist/ui/inputHistory.js +56 -0
- package/dist/ui/inputHistory.js.map +1 -0
- package/dist/ui/jsonrpc.d.ts +17 -0
- package/dist/ui/jsonrpc.d.ts.map +1 -0
- package/dist/ui/jsonrpc.js +41 -0
- package/dist/ui/jsonrpc.js.map +1 -0
- package/dist/ui/launcher.d.ts +20 -0
- package/dist/ui/launcher.d.ts.map +1 -0
- package/dist/ui/launcher.js +185 -0
- package/dist/ui/launcher.js.map +1 -0
- package/dist/ui/markdown.d.ts +104 -0
- package/dist/ui/markdown.d.ts.map +1 -0
- package/dist/ui/markdown.js +449 -0
- package/dist/ui/markdown.js.map +1 -0
- package/dist/ui/mouse.d.ts +22 -0
- package/dist/ui/mouse.d.ts.map +1 -0
- package/dist/ui/mouse.js +31 -0
- package/dist/ui/mouse.js.map +1 -0
- package/dist/ui/outbound.d.ts +20 -0
- package/dist/ui/outbound.d.ts.map +1 -0
- package/dist/ui/outbound.js +49 -0
- package/dist/ui/outbound.js.map +1 -0
- package/dist/ui/screenMode.d.ts +25 -0
- package/dist/ui/screenMode.d.ts.map +1 -0
- package/dist/ui/screenMode.js +43 -0
- package/dist/ui/screenMode.js.map +1 -0
- package/dist/ui/slashCatalog.d.ts +18 -0
- package/dist/ui/slashCatalog.d.ts.map +1 -0
- package/dist/ui/slashCatalog.js +243 -0
- package/dist/ui/slashCatalog.js.map +1 -0
- package/dist/ui/syntax.d.ts +11 -0
- package/dist/ui/syntax.d.ts.map +1 -0
- package/dist/ui/syntax.js +78 -0
- package/dist/ui/syntax.js.map +1 -0
- package/dist/ui/theme.d.ts +165 -0
- package/dist/ui/theme.d.ts.map +1 -0
- package/dist/ui/theme.js +394 -0
- package/dist/ui/theme.js.map +1 -0
- package/dist/ui/types.d.ts +203 -0
- package/dist/ui/types.d.ts.map +1 -0
- package/dist/ui/types.js +53 -0
- package/dist/ui/types.js.map +1 -0
- package/package.json +104 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
// Phase 343: auto-scaffold the AGENTS.md / CLAUDE.md instruction-file
|
|
2
|
+
// pattern when omg starts in a project that's missing it.
|
|
3
|
+
//
|
|
4
|
+
// Convention: AGENTS.md is the single source of truth — Codex reads it
|
|
5
|
+
// directly from disk. CLAUDE.md is a thin stub that imports it via
|
|
6
|
+
// `@AGENTS.md`, so Claude Code sees the same rules. One canonical file
|
|
7
|
+
// kills the drift you otherwise get when CLAUDE.md and AGENTS.md are
|
|
8
|
+
// edited independently (the two slowly disagree, and each model follows
|
|
9
|
+
// a different copy).
|
|
10
|
+
//
|
|
11
|
+
// Behaviour is deliberately conservative and PURELY ADDITIVE — it never
|
|
12
|
+
// rewrites, merges, or deletes an existing file:
|
|
13
|
+
// - neither present -> write a starter AGENTS.md + a CLAUDE.md stub
|
|
14
|
+
// - AGENTS.md only -> write the CLAUDE.md stub pointing at it
|
|
15
|
+
// - CLAUDE.md only -> do nothing (migrating existing content into
|
|
16
|
+
// AGENTS.md is a manual call; silently rewriting the user's CLAUDE.md
|
|
17
|
+
// on startup is not our decision to make)
|
|
18
|
+
// - both present -> do nothing
|
|
19
|
+
//
|
|
20
|
+
// Guards:
|
|
21
|
+
// - only fires at a git work-tree ROOT, and writes there — so launching
|
|
22
|
+
// omg in $HOME or a random subdirectory never litters files, and a
|
|
23
|
+
// launch from a subdir still targets the project root.
|
|
24
|
+
// - suppressible with OMG_SKIP_AGENTS_MD=1.
|
|
25
|
+
// Best-effort: callers wrap in try/catch; a throw here must never break
|
|
26
|
+
// session startup.
|
|
27
|
+
import { execFileSync } from "node:child_process";
|
|
28
|
+
import { existsSync, writeFileSync } from "node:fs";
|
|
29
|
+
import { basename, join } from "node:path";
|
|
30
|
+
/** Resolve the git work-tree root for `cwd`, or null if not a repo. Shared
|
|
31
|
+
* by the sibling MCP-recommendations scaffold (Phase 348). */
|
|
32
|
+
export function gitToplevel(cwd) {
|
|
33
|
+
try {
|
|
34
|
+
const out = execFileSync("git", ["rev-parse", "--show-toplevel"], {
|
|
35
|
+
cwd,
|
|
36
|
+
timeout: 2000,
|
|
37
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
38
|
+
});
|
|
39
|
+
return out.toString().trim() || null;
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function agentsTemplate(name) {
|
|
46
|
+
return `# ${name} — AGENTS.md
|
|
47
|
+
|
|
48
|
+
> Single source of truth for **all** agents working in this repo. Codex reads
|
|
49
|
+
> this file directly; \`CLAUDE.md\` imports it via \`@AGENTS.md\`; add a
|
|
50
|
+
> \`GEMINI.md\` that imports it too if you use Gemini here. Edit project
|
|
51
|
+
> guidance **here**, not in \`CLAUDE.md\`.
|
|
52
|
+
|
|
53
|
+
## Overview
|
|
54
|
+
|
|
55
|
+
<!-- One or two sentences: what this project is and its goal. -->
|
|
56
|
+
|
|
57
|
+
## How to work here
|
|
58
|
+
|
|
59
|
+
- Build:
|
|
60
|
+
- Test:
|
|
61
|
+
- Lint:
|
|
62
|
+
|
|
63
|
+
## Conventions & guardrails
|
|
64
|
+
|
|
65
|
+
<!-- Project-specific rules, invariants, and things agents must not do. -->
|
|
66
|
+
`;
|
|
67
|
+
}
|
|
68
|
+
function claudeStub(name) {
|
|
69
|
+
return `# ${name} — Project Instructions for Claude
|
|
70
|
+
|
|
71
|
+
Project guidance is maintained in **\`AGENTS.md\`** (the single source of truth,
|
|
72
|
+
read directly by Codex). This file imports it so Claude sees the same rules —
|
|
73
|
+
edit \`AGENTS.md\`, not here. Add Claude-Code-only guidance *below* the import
|
|
74
|
+
if ever needed.
|
|
75
|
+
|
|
76
|
+
@AGENTS.md
|
|
77
|
+
`;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Ensure the AGENTS.md / CLAUDE.md pattern exists at the git root containing
|
|
81
|
+
* `cwd`. Idempotent and additive — safe to call on every session/tab start.
|
|
82
|
+
*/
|
|
83
|
+
export function ensureAgentsMd(cwd) {
|
|
84
|
+
if (process.env.OMG_SKIP_AGENTS_MD === "1")
|
|
85
|
+
return { root: null, created: [] };
|
|
86
|
+
const root = gitToplevel(cwd);
|
|
87
|
+
if (!root)
|
|
88
|
+
return { root: null, created: [] };
|
|
89
|
+
const agentsPath = join(root, "AGENTS.md");
|
|
90
|
+
const claudePath = join(root, "CLAUDE.md");
|
|
91
|
+
const hasAgents = existsSync(agentsPath);
|
|
92
|
+
const hasClaude = existsSync(claudePath);
|
|
93
|
+
// CLAUDE.md exists on its own, or both exist: never touch user content.
|
|
94
|
+
if (hasClaude)
|
|
95
|
+
return { root, created: [] };
|
|
96
|
+
const name = basename(root) || "project";
|
|
97
|
+
const created = [];
|
|
98
|
+
// `wx` flag: fail rather than clobber if the file raced into existence
|
|
99
|
+
// between the existsSync check and the write.
|
|
100
|
+
if (!hasAgents) {
|
|
101
|
+
try {
|
|
102
|
+
writeFileSync(agentsPath, agentsTemplate(name), { flag: "wx" });
|
|
103
|
+
created.push(agentsPath);
|
|
104
|
+
}
|
|
105
|
+
catch {
|
|
106
|
+
/* lost the race or unwritable — leave it */
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
try {
|
|
110
|
+
writeFileSync(claudePath, claudeStub(name), { flag: "wx" });
|
|
111
|
+
created.push(claudePath);
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
/* lost the race or unwritable — leave it */
|
|
115
|
+
}
|
|
116
|
+
return { root, created };
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=agentsMdScaffold.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentsMdScaffold.js","sourceRoot":"","sources":["../../../src/core/state/agentsMdScaffold.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,0DAA0D;AAC1D,EAAE;AACF,uEAAuE;AACvE,mEAAmE;AACnE,uEAAuE;AACvE,qEAAqE;AACrE,wEAAwE;AACxE,qBAAqB;A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
+
* intermediate plus `renameSync`. Caller is responsible for ensuring
|
|
3
|
+
* the parent directory exists. */
|
|
4
|
+
export declare function atomicWriteSync(path: string, content: string): void;
|
|
5
|
+
//# sourceMappingURL=atomicWrite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atomicWrite.d.ts","sourceRoot":"","sources":["../../../src/core/state/atomicWrite.ts"],"names":[],"mappings":"AAWA;;mCAEmC;AACnC,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAInE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Phase 200b: shared atomic-write helper for ~/.omg/* state files.
|
|
2
|
+
//
|
|
3
|
+
// `writeFileSync(path, content)` rewrites in-place: a concurrent omg
|
|
4
|
+
// instance writing the same file at the same moment can drop one of
|
|
5
|
+
// the writes. The fix is the textbook tmp-then-rename pattern —
|
|
6
|
+
// rename(2) is atomic on POSIX, so the canonical path is never half-
|
|
7
|
+
// written. tabPersistence has used this since Phase 72; Phase 200b
|
|
8
|
+
// extracts it as a single helper for everyone.
|
|
9
|
+
import { renameSync, writeFileSync } from "node:fs";
|
|
10
|
+
/** Atomically write `content` to `path` via a `<path>.<pid>.tmp`
|
|
11
|
+
* intermediate plus `renameSync`. Caller is responsible for ensuring
|
|
12
|
+
* the parent directory exists. */
|
|
13
|
+
export function atomicWriteSync(path, content) {
|
|
14
|
+
const tmp = `${path}.${process.pid}.tmp`;
|
|
15
|
+
writeFileSync(tmp, content, "utf-8");
|
|
16
|
+
renameSync(tmp, path);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=atomicWrite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atomicWrite.js","sourceRoot":"","sources":["../../../src/core/state/atomicWrite.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,EAAE;AACF,qEAAqE;AACrE,oEAAoE;AACpE,gEAAgE;AAChE,qEAAqE;AACrE,mEAAmE;AACnE,+CAA+C;AAE/C,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEpD;;mCAEmC;AACnC,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,OAAe;IAC3D,MAAM,GAAG,GAAG,GAAG,IAAI,IAAI,OAAO,CAAC,GAAG,MAAM,CAAC;IACzC,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACrC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** The structured-handoff prompt handed to the cheap summarizer. Unlike
|
|
2
|
+
* the compaction prompt (which produces dense prose to replace history)
|
|
3
|
+
* this asks for a fixed-section doc a fresh agent can act on directly. */
|
|
4
|
+
export declare const HANDOFF_PROMPT: string;
|
|
5
|
+
export declare function handoffsDir(home?: string): string;
|
|
6
|
+
/** Path for a handoff doc. `id` is normally the tab's continuum id;
|
|
7
|
+
* `stamp` is a filesystem-safe timestamp the caller supplies (so the
|
|
8
|
+
* filename is stable/testable rather than wall-clock-derived here). */
|
|
9
|
+
export declare function handoffPath(id: string, stamp: string, home?: string): string;
|
|
10
|
+
/** Write a handoff doc to disk and return its absolute path. Creates
|
|
11
|
+
* `~/.omg/handoffs/` on first use (atomicWriteSync does not mkdir). */
|
|
12
|
+
export declare function writeHandoff(id: string, stamp: string, markdown: string, home?: string): string;
|
|
13
|
+
/** Read a handoff doc from an explicit path (the `/handoff <path>` load
|
|
14
|
+
* mode). Throws if the file is missing — the caller surfaces that. */
|
|
15
|
+
export declare function readHandoff(path: string): string;
|
|
16
|
+
/** Wrap a handoff doc as a context block to prepend to the next user
|
|
17
|
+
* turn (via `tab.pendingContinuumInjection`). The framing tells the
|
|
18
|
+
* model this is resumed work, not a fresh request. */
|
|
19
|
+
export declare function wrapHandoffInjection(markdown: string): string;
|
|
20
|
+
//# sourceMappingURL=handoff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handoff.d.ts","sourceRoot":"","sources":["../../../src/core/state/handoff.ts"],"names":[],"mappings":"AAkBA;;2EAE2E;AAC3E,eAAO,MAAM,cAAc,QAYoC,CAAC;AAEhE,wBAAgB,WAAW,CAAC,IAAI,GAAE,MAAuB,GAAG,MAAM,CAEjE;AAED;;wEAEwE;AACxE,wBAAgB,WAAW,CACzB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,MAAuB,GAC5B,MAAM,CAGR;AAED;wEACwE;AACxE,wBAAgB,YAAY,CAC1B,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE,MAAuB,GAC5B,MAAM,CAMR;AAED;uEACuE;AACvE,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;uDAEuD;AACvD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAW7D"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// Phase 290: session handoff. A handoff captures the live state of the
|
|
2
|
+
// current conversation as a structured markdown doc so work can resume
|
|
3
|
+
// with a clean context window — either in-process (the /handoff command
|
|
4
|
+
// summarizes, clears the tab, and re-seeds it) or across a real restart
|
|
5
|
+
// (the doc is persisted to disk and can be reloaded by path).
|
|
6
|
+
//
|
|
7
|
+
// This module is the pure, CLI-free half: the handoff prompt, the
|
|
8
|
+
// on-disk layout under `~/.omg/handoffs/`, and the wrapper that turns a
|
|
9
|
+
// handoff doc into an injectable context block. The tab manipulation
|
|
10
|
+
// that consumes these lives in `src/cli/handoff.ts`.
|
|
11
|
+
import { existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
12
|
+
import { homedir } from "node:os";
|
|
13
|
+
import { join } from "node:path";
|
|
14
|
+
import { atomicWriteSync } from "./atomicWrite.js";
|
|
15
|
+
const DEFAULT_HOME = () => process.env.HOME ?? homedir();
|
|
16
|
+
/** The structured-handoff prompt handed to the cheap summarizer. Unlike
|
|
17
|
+
* the compaction prompt (which produces dense prose to replace history)
|
|
18
|
+
* this asks for a fixed-section doc a fresh agent can act on directly. */
|
|
19
|
+
export const HANDOFF_PROMPT = "Write a SESSION HANDOFF so a fresh agent can resume this work with " +
|
|
20
|
+
"zero prior context. Use exactly these markdown sections, in the " +
|
|
21
|
+
"user's language; omit a section only if it is genuinely empty:\n" +
|
|
22
|
+
"## Goal — what we are ultimately trying to achieve\n" +
|
|
23
|
+
"## Done — what is completed and verified so far\n" +
|
|
24
|
+
"## In progress — what is mid-flight right now, with its exact state\n" +
|
|
25
|
+
"## Next steps — the concrete next actions, ordered\n" +
|
|
26
|
+
"## Key files & decisions — file paths touched and decisions made, " +
|
|
27
|
+
"each with the reason\n" +
|
|
28
|
+
"## Gotchas — anything that would trip up the next agent\n" +
|
|
29
|
+
"Be concrete: real file paths, real command names, real error text. " +
|
|
30
|
+
"Output ONLY the markdown — no preamble, no closing remarks.";
|
|
31
|
+
export function handoffsDir(home = DEFAULT_HOME()) {
|
|
32
|
+
return join(home, ".omg", "handoffs");
|
|
33
|
+
}
|
|
34
|
+
/** Path for a handoff doc. `id` is normally the tab's continuum id;
|
|
35
|
+
* `stamp` is a filesystem-safe timestamp the caller supplies (so the
|
|
36
|
+
* filename is stable/testable rather than wall-clock-derived here). */
|
|
37
|
+
export function handoffPath(id, stamp, home = DEFAULT_HOME()) {
|
|
38
|
+
const safeId = id.replace(/[^\w.-]/g, "_") || "session";
|
|
39
|
+
return join(handoffsDir(home), `${safeId}-${stamp}.md`);
|
|
40
|
+
}
|
|
41
|
+
/** Write a handoff doc to disk and return its absolute path. Creates
|
|
42
|
+
* `~/.omg/handoffs/` on first use (atomicWriteSync does not mkdir). */
|
|
43
|
+
export function writeHandoff(id, stamp, markdown, home = DEFAULT_HOME()) {
|
|
44
|
+
const dir = handoffsDir(home);
|
|
45
|
+
if (!existsSync(dir))
|
|
46
|
+
mkdirSync(dir, { recursive: true });
|
|
47
|
+
const path = handoffPath(id, stamp, home);
|
|
48
|
+
atomicWriteSync(path, markdown);
|
|
49
|
+
return path;
|
|
50
|
+
}
|
|
51
|
+
/** Read a handoff doc from an explicit path (the `/handoff <path>` load
|
|
52
|
+
* mode). Throws if the file is missing — the caller surfaces that. */
|
|
53
|
+
export function readHandoff(path) {
|
|
54
|
+
return readFileSync(path, "utf-8");
|
|
55
|
+
}
|
|
56
|
+
/** Wrap a handoff doc as a context block to prepend to the next user
|
|
57
|
+
* turn (via `tab.pendingContinuumInjection`). The framing tells the
|
|
58
|
+
* model this is resumed work, not a fresh request. */
|
|
59
|
+
export function wrapHandoffInjection(markdown) {
|
|
60
|
+
return [
|
|
61
|
+
"<omg-handoff>",
|
|
62
|
+
"Resumed session. The work below was handed off from a previous " +
|
|
63
|
+
"context — continue it. Do not restart from scratch.",
|
|
64
|
+
"",
|
|
65
|
+
markdown.trim(),
|
|
66
|
+
"</omg-handoff>",
|
|
67
|
+
"",
|
|
68
|
+
"",
|
|
69
|
+
].join("\n");
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=handoff.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handoff.js","sourceRoot":"","sources":["../../../src/core/state/handoff.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,uEAAuE;AACvE,wEAAwE;AACxE,wEAAwE;AACxE,8DAA8D;AAC9D,EAAE;AACF,kEAAkE;AAClE,wEAAwE;AACxE,qEAAqE;AACrE,qDAAqD;AAErD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,YAAY,GAA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OAAO,CAAC,CAAC;AACrC,CAAC;AAED;;uDAEuD;AACvD,MAAM,UAAU,oBAAoB,CAAC,QAAgB;IACnD,OAAO;QACL,eAAe;QACf,iEAAiE;YAC/D,qDAAqD;QACvD,EAAE;QACF,QAAQ,CAAC,IAAI,EAAE;QACf,gBAAgB;QAChB,EAAE;QACF,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { McpServerConfig } from "../mcp/mcpConfig.js";
|
|
2
|
+
import type { StackDetection } from "./stackDetect.js";
|
|
3
|
+
export interface CatalogServer {
|
|
4
|
+
name: string;
|
|
5
|
+
config: McpServerConfig;
|
|
6
|
+
note: string;
|
|
7
|
+
}
|
|
8
|
+
/** Recommended servers for a detected stack: the baseline plus any per-stack
|
|
9
|
+
* extras. Names are unique (baseline wins on collision). */
|
|
10
|
+
export declare function recommendedServers(detection: StackDetection): CatalogServer[];
|
|
11
|
+
//# sourceMappingURL=mcpCatalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcpCatalog.d.ts","sourceRoot":"","sources":["../../../src/core/state/mcpCatalog.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,eAAe,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;CACd;AAgCD;6DAC6D;AAC7D,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,cAAc,GAAG,aAAa,EAAE,CAS7E"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Phase 348: curated MCP-server recommendations per project stack.
|
|
2
|
+
//
|
|
3
|
+
// This is deliberately SMALL and conservative — curation is opinion and
|
|
4
|
+
// maintenance, and an external MCP server always downloads on first use
|
|
5
|
+
// (npx/uvx), so we only auto-enable a canonical baseline and leave the rest
|
|
6
|
+
// as opt-in (`/mcp enable <name>`). The shared baseline tool set agents
|
|
7
|
+
// actually need (read/write/list/shell) is already provided natively by
|
|
8
|
+
// omg's own tools, so nothing here is load-bearing — these are extras.
|
|
9
|
+
// Recommended for every project. `filesystem` (scoped to the repo) is the one
|
|
10
|
+
// safe, canonical default we enable; git/fetch are opt-in.
|
|
11
|
+
const BASE = [
|
|
12
|
+
{
|
|
13
|
+
name: "filesystem",
|
|
14
|
+
config: {
|
|
15
|
+
command: "npx",
|
|
16
|
+
args: ["-y", "@modelcontextprotocol/server-filesystem", "."],
|
|
17
|
+
enabled: true,
|
|
18
|
+
},
|
|
19
|
+
note: "Project-scoped file access (official MCP server; downloads on first use).",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: "git",
|
|
23
|
+
config: { command: "uvx", args: ["mcp-server-git"], enabled: false },
|
|
24
|
+
note: "Structured git operations. `/mcp enable git` to turn on.",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "fetch",
|
|
28
|
+
config: { command: "uvx", args: ["mcp-server-fetch"], enabled: false },
|
|
29
|
+
note: "Fetch + read web pages. `/mcp enable fetch` to turn on.",
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
// Per-stack extras, all opt-in. Intentionally sparse — only add servers that
|
|
33
|
+
// are real and broadly useful. Keyed by the stack ids from detectStack().
|
|
34
|
+
const BY_STACK = {
|
|
35
|
+
// (none yet — language-specific MCP servers are still sparse; extend here)
|
|
36
|
+
};
|
|
37
|
+
/** Recommended servers for a detected stack: the baseline plus any per-stack
|
|
38
|
+
* extras. Names are unique (baseline wins on collision). */
|
|
39
|
+
export function recommendedServers(detection) {
|
|
40
|
+
const byName = new Map();
|
|
41
|
+
for (const e of BASE)
|
|
42
|
+
byName.set(e.name, e);
|
|
43
|
+
for (const stack of detection.stacks) {
|
|
44
|
+
for (const e of BY_STACK[stack] ?? []) {
|
|
45
|
+
if (!byName.has(e.name))
|
|
46
|
+
byName.set(e.name, e);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return [...byName.values()];
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=mcpCatalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcpCatalog.js","sourceRoot":"","sources":["../../../src/core/state/mcpCatalog.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,EAAE;AACF,wEAAwE;AACxE,wEAAwE;AACxE,4EAA4E;AAC5E,wEAAwE;AACxE,wEAAwE;AACxE,uEAAuE;AAWvE,8EAA8E;AAC9E,2DAA2D;AAC3D,MAAM,IAAI,GAAoB;IAC5B;QACE,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE;YACN,OAAO,EAAE,KAAK;YACd,IAAI,EAAE,CAAC,IAAI,EAAE,yCAAyC,EAAE,GAAG,CAAC;YAC5D,OAAO,EAAE,IAAI;SACd;QACD,IAAI,EAAE,2EAA2E;KAClF;IACD;QACE,IAAI,EAAE,KAAK;QACX,MAAM,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE;QACpE,IAAI,EAAE,0DAA0D;KACjE;IACD;QACE,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,kBAAkB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE;QACtE,IAAI,EAAE,yDAAyD;KAChE;CACF,CAAC;AAEF,6EAA6E;AAC7E,0EAA0E;AAC1E,MAAM,QAAQ,GAAoC;AAChD,2EAA2E;CAC5E,CAAC;AAEF;6DAC6D;AAC7D,MAAM,UAAU,kBAAkB,CAAC,SAAyB;IAC1D,MAAM,MAAM,GAAG,IAAI,GAAG,EAAyB,CAAC;IAChD,KAAK,MAAM,CAAC,IAAI,IAAI;QAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC5C,KAAK,MAAM,KAAK,IAAI,SAAS,CAAC,MAAM,EAAE,CAAC;QACrC,KAAK,MAAM,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;YACtC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;gBAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface McpRecResult {
|
|
2
|
+
root: string | null;
|
|
3
|
+
/** Server names newly written (empty when nothing was added). */
|
|
4
|
+
added: string[];
|
|
5
|
+
}
|
|
6
|
+
export declare function ensureMcpRecommendations(cwd: string): McpRecResult;
|
|
7
|
+
//# sourceMappingURL=mcpRecommendations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcpRecommendations.d.ts","sourceRoot":"","sources":["../../../src/core/state/mcpRecommendations.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,iEAAiE;IACjE,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CA0ClE"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Phase 348: first-run MCP recommendations. Mirrors agentsMdScaffold — at the
|
|
2
|
+
// git root, detect the project stack and write a starter `.omg/mcp.json` of
|
|
3
|
+
// recommended servers (a safe baseline enabled, the rest disabled for opt-in).
|
|
4
|
+
//
|
|
5
|
+
// PURELY ADDITIVE: never overwrites a server the user already defined, never
|
|
6
|
+
// touches a server omg didn't add, leaves a corrupt file alone. Idempotent
|
|
7
|
+
// (a second run adds nothing). Git-root-guarded so launching in $HOME or a
|
|
8
|
+
// random subdir never litters. Suppress with OMG_SKIP_MCP_SCAFFOLD=1.
|
|
9
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
10
|
+
import { dirname, join } from "node:path";
|
|
11
|
+
import { gitToplevel } from "./agentsMdScaffold.js";
|
|
12
|
+
import { detectStack } from "./stackDetect.js";
|
|
13
|
+
import { recommendedServers } from "./mcpCatalog.js";
|
|
14
|
+
export function ensureMcpRecommendations(cwd) {
|
|
15
|
+
if (process.env.OMG_SKIP_MCP_SCAFFOLD === "1")
|
|
16
|
+
return { root: null, added: [] };
|
|
17
|
+
const root = gitToplevel(cwd);
|
|
18
|
+
if (!root)
|
|
19
|
+
return { root: null, added: [] };
|
|
20
|
+
const recs = recommendedServers(detectStack(root));
|
|
21
|
+
if (recs.length === 0)
|
|
22
|
+
return { root, added: [] };
|
|
23
|
+
const file = join(root, ".omg", "mcp.json");
|
|
24
|
+
let obj = {};
|
|
25
|
+
if (existsSync(file)) {
|
|
26
|
+
try {
|
|
27
|
+
obj = JSON.parse(readFileSync(file, "utf-8"));
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
// Corrupt user file — never clobber it.
|
|
31
|
+
return { root, added: [] };
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// Honor whichever key the existing file uses; default to `servers`.
|
|
35
|
+
const key = obj.servers === undefined &&
|
|
36
|
+
obj.mcpServers !== undefined &&
|
|
37
|
+
typeof obj.mcpServers === "object"
|
|
38
|
+
? "mcpServers"
|
|
39
|
+
: "servers";
|
|
40
|
+
const servers = typeof obj[key] === "object" && obj[key] !== null
|
|
41
|
+
? obj[key]
|
|
42
|
+
: {};
|
|
43
|
+
const added = [];
|
|
44
|
+
for (const rec of recs) {
|
|
45
|
+
if (rec.name in servers)
|
|
46
|
+
continue; // never overwrite an existing entry
|
|
47
|
+
servers[rec.name] = { ...rec.config };
|
|
48
|
+
added.push(rec.name);
|
|
49
|
+
}
|
|
50
|
+
if (added.length === 0)
|
|
51
|
+
return { root, added: [] };
|
|
52
|
+
obj[key] = servers;
|
|
53
|
+
mkdirSync(dirname(file), { recursive: true });
|
|
54
|
+
writeFileSync(file, JSON.stringify(obj, null, 2) + "\n");
|
|
55
|
+
return { root, added };
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=mcpRecommendations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcpRecommendations.js","sourceRoot":"","sources":["../../../src/core/state/mcpRecommendations.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,4EAA4E;AAC5E,+EAA+E;AAC/E,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,2EAA2E;AAC3E,sEAAsE;AAEtE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAQrD,MAAM,UAAU,wBAAwB,CAAC,GAAW;IAClD,IAAI,OAAO,CAAC,GAAG,CAAC,qBAAqB,KAAK,GAAG;QAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;IAChF,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;IAE5C,MAAM,IAAI,GAAG,kBAAkB,CAAC,WAAW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;IACD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;IAEnD,GAAG,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC;IACnB,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9C,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IACzD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare function memoryFile(home?: string): string;
|
|
2
|
+
/** Append one bullet entry to the memory file. Returns the trimmed
|
|
3
|
+
* text that was actually written (empty input is a no-op). */
|
|
4
|
+
export declare function addMemory(text: string, home?: string): string;
|
|
5
|
+
/** Return the full memory file content. Empty string when there's
|
|
6
|
+
* no file yet. Never throws. */
|
|
7
|
+
export declare function loadMemory(home?: string): string;
|
|
8
|
+
/** Parse the file into a list of `- foo` bullets for `/memory list`.
|
|
9
|
+
* Lines that aren't bullets are ignored — the user can edit the
|
|
10
|
+
* file by hand without breaking the slash output. */
|
|
11
|
+
export declare function listMemory(home?: string): string[];
|
|
12
|
+
/** Truncate the memory file to empty. Idempotent.
|
|
13
|
+
* Phase 200b: atomic rewrite so a concurrent `/memory add` doesn't
|
|
14
|
+
* briefly resurrect bytes the clear was supposed to erase. */
|
|
15
|
+
export declare function clearMemory(home?: string): void;
|
|
16
|
+
/** Build the prefix to inject into the first user message of a new
|
|
17
|
+
* tab when `OMG_INJECT_MEMORY=1` is set or `/memory inject on` is
|
|
18
|
+
* the active runtime toggle. Returns empty string when memory is
|
|
19
|
+
* empty — caller can use the result directly without an existence
|
|
20
|
+
* check. */
|
|
21
|
+
export declare function buildInjectionPrefix(home?: string): string;
|
|
22
|
+
//# sourceMappingURL=memory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../src/core/state/memory.ts"],"names":[],"mappings":"AAsBA,wBAAgB,UAAU,CAAC,IAAI,GAAE,MAAuB,GAAG,MAAM,CAEhE;AAOD;+DAC+D;AAC/D,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,MAAuB,GAAG,MAAM,CAW7E;AAED;iCACiC;AACjC,wBAAgB,UAAU,CAAC,IAAI,GAAE,MAAuB,GAAG,MAAM,CAQhE;AAED;;sDAEsD;AACtD,wBAAgB,UAAU,CAAC,IAAI,GAAE,MAAuB,GAAG,MAAM,EAAE,CASlE;AAED;;+DAE+D;AAC/D,wBAAgB,WAAW,CAAC,IAAI,GAAE,MAAuB,GAAG,IAAI,CAQ/D;AAED;;;;aAIa;AACb,wBAAgB,oBAAoB,CAAC,IAAI,GAAE,MAAuB,GAAG,MAAM,CAY1E"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// Phase 77: persistent user memory.
|
|
2
|
+
//
|
|
3
|
+
// A single markdown file at `~/.omg/memory.md` keeps free-form notes
|
|
4
|
+
// the user wants to carry across sessions — "this project uses uv,
|
|
5
|
+
// not pip", "the api gateway lives in apps/gateway", that kind of
|
|
6
|
+
// thing.
|
|
7
|
+
//
|
|
8
|
+
// The store is intentionally dumb:
|
|
9
|
+
// - One markdown file, appended bullet-style by `/memory add`.
|
|
10
|
+
// - Read-as-string for display and (optional) injection into the
|
|
11
|
+
// first user message of each new tab.
|
|
12
|
+
//
|
|
13
|
+
// No structured entries, no tagging, no metadata. If the user wants
|
|
14
|
+
// structure they can write it directly in the file.
|
|
15
|
+
import { appendFileSync, existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
16
|
+
import { homedir } from "node:os";
|
|
17
|
+
import { join } from "node:path";
|
|
18
|
+
import { atomicWriteSync } from "./atomicWrite.js";
|
|
19
|
+
const DEFAULT_HOME = () => process.env.HOME ?? homedir();
|
|
20
|
+
export function memoryFile(home = DEFAULT_HOME()) {
|
|
21
|
+
return join(home, ".omg", "memory.md");
|
|
22
|
+
}
|
|
23
|
+
function ensureDir(file) {
|
|
24
|
+
const dir = file.slice(0, file.lastIndexOf("/"));
|
|
25
|
+
if (!existsSync(dir))
|
|
26
|
+
mkdirSync(dir, { recursive: true });
|
|
27
|
+
}
|
|
28
|
+
/** Append one bullet entry to the memory file. Returns the trimmed
|
|
29
|
+
* text that was actually written (empty input is a no-op). */
|
|
30
|
+
export function addMemory(text, home = DEFAULT_HOME()) {
|
|
31
|
+
const trimmed = text.trim();
|
|
32
|
+
if (!trimmed)
|
|
33
|
+
return "";
|
|
34
|
+
const file = memoryFile(home);
|
|
35
|
+
ensureDir(file);
|
|
36
|
+
// Make sure the entry is on its own line. Existing files may or
|
|
37
|
+
// may not end in a newline.
|
|
38
|
+
const prefix = existsSync(file) && readFileSync(file, "utf-8").endsWith("\n") ? "" : "\n";
|
|
39
|
+
appendFileSync(file, `${prefix}- ${trimmed}\n`, "utf-8");
|
|
40
|
+
return trimmed;
|
|
41
|
+
}
|
|
42
|
+
/** Return the full memory file content. Empty string when there's
|
|
43
|
+
* no file yet. Never throws. */
|
|
44
|
+
export function loadMemory(home = DEFAULT_HOME()) {
|
|
45
|
+
const file = memoryFile(home);
|
|
46
|
+
if (!existsSync(file))
|
|
47
|
+
return "";
|
|
48
|
+
try {
|
|
49
|
+
return readFileSync(file, "utf-8");
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return "";
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/** Parse the file into a list of `- foo` bullets for `/memory list`.
|
|
56
|
+
* Lines that aren't bullets are ignored — the user can edit the
|
|
57
|
+
* file by hand without breaking the slash output. */
|
|
58
|
+
export function listMemory(home = DEFAULT_HOME()) {
|
|
59
|
+
const body = loadMemory(home);
|
|
60
|
+
if (!body)
|
|
61
|
+
return [];
|
|
62
|
+
return body
|
|
63
|
+
.split("\n")
|
|
64
|
+
.map((l) => l.trim())
|
|
65
|
+
.filter((l) => l.startsWith("- "))
|
|
66
|
+
.map((l) => l.slice(2).trim())
|
|
67
|
+
.filter((l) => l.length > 0);
|
|
68
|
+
}
|
|
69
|
+
/** Truncate the memory file to empty. Idempotent.
|
|
70
|
+
* Phase 200b: atomic rewrite so a concurrent `/memory add` doesn't
|
|
71
|
+
* briefly resurrect bytes the clear was supposed to erase. */
|
|
72
|
+
export function clearMemory(home = DEFAULT_HOME()) {
|
|
73
|
+
const file = memoryFile(home);
|
|
74
|
+
if (!existsSync(file))
|
|
75
|
+
return;
|
|
76
|
+
try {
|
|
77
|
+
atomicWriteSync(file, "");
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
/* best-effort */
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/** Build the prefix to inject into the first user message of a new
|
|
84
|
+
* tab when `OMG_INJECT_MEMORY=1` is set or `/memory inject on` is
|
|
85
|
+
* the active runtime toggle. Returns empty string when memory is
|
|
86
|
+
* empty — caller can use the result directly without an existence
|
|
87
|
+
* check. */
|
|
88
|
+
export function buildInjectionPrefix(home = DEFAULT_HOME()) {
|
|
89
|
+
const items = listMemory(home);
|
|
90
|
+
if (items.length === 0)
|
|
91
|
+
return "";
|
|
92
|
+
const bullets = items.map((s) => `- ${s}`).join("\n");
|
|
93
|
+
return [
|
|
94
|
+
"<user-memory>",
|
|
95
|
+
"Context the user wants you to carry across sessions:",
|
|
96
|
+
bullets,
|
|
97
|
+
"</user-memory>",
|
|
98
|
+
"",
|
|
99
|
+
"",
|
|
100
|
+
].join("\n");
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=memory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../../src/core/state/memory.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,EAAE;AACF,qEAAqE;AACrE,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,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAC9B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO;IAC9B,IAAI,CAAC;QACH,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAC5B,CAAC;IAAC,MAAM,CAAC;QACP,iBAAiB;IACnB,CAAC;AACH,CAAC;AAED;;;;aAIa;AACb,MAAM,UAAU,oBAAoB,CAAC,OAAe,YAAY,EAAE;IAChE,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAClC,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtD,OAAO;QACL,eAAe;QACf,sDAAsD;QACtD,OAAO;QACP,gBAAgB;QAChB,EAAE;QACF,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type PlanWindow = "five_hour" | "weekly" | "session";
|
|
2
|
+
export interface PlanConfig {
|
|
3
|
+
five_hour?: number;
|
|
4
|
+
weekly?: number;
|
|
5
|
+
session?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function planConfigFile(home?: string): string;
|
|
8
|
+
export declare function loadPlanConfig(home?: string): PlanConfig;
|
|
9
|
+
export declare function savePlanConfig(cfg: PlanConfig, home?: string): void;
|
|
10
|
+
/** Set one cap on disk and return the updated config. Pass 0 (or any
|
|
11
|
+
* non-positive number) to clear that window. */
|
|
12
|
+
export declare function setPlanCap(window: PlanWindow, value: number, home?: string): PlanConfig;
|
|
13
|
+
/** Resolve a single window's cap, env > file > undefined. */
|
|
14
|
+
export declare function planCapResolved(window: PlanWindow): number | undefined;
|
|
15
|
+
//# sourceMappingURL=planConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planConfig.d.ts","sourceRoot":"","sources":["../../../src/core/state/planConfig.ts"],"names":[],"mappings":"AA2BA,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE5D,MAAM,WAAW,UAAU;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,cAAc,CAAC,IAAI,GAAE,MAAuB,GAAG,MAAM,CAEpE;AASD,wBAAgB,cAAc,CAAC,IAAI,GAAE,MAAuB,GAAG,UAAU,CA2BxE;AAED,wBAAgB,cAAc,CAC5B,GAAG,EAAE,UAAU,EACf,IAAI,GAAE,MAAuB,GAC5B,IAAI,CAYN;AAED;iDACiD;AACjD,wBAAgB,UAAU,CACxB,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,MAAuB,GAC5B,UAAU,CASZ;AAED,6DAA6D;AAC7D,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAatE"}
|