@promptbook/cli 0.114.0-41 → 0.114.0-47
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/agents/default/copywriter.book +15 -0
- package/agents/default/developer.book +3 -0
- package/agents/default/lawyer.book +14 -0
- package/agents/default/planner.book +16 -0
- package/esm/index.es.js +4769 -809
- package/esm/index.es.js.map +1 -1
- package/esm/scripts/find-fresh-emoji-tags/find-fresh-emoji-tags.d.ts +1 -1
- package/esm/scripts/find-refactor-candidates/find-refactor-candidates.d.ts +2 -0
- package/esm/scripts/find-refactor-candidates/resolveRefactorCandidateProject.d.ts +3 -1
- package/esm/scripts/run-codex-prompts/common/CoderRunControlFeedback.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/common/buildCoderRunControlKeyBadge.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/common/listenForCoderRunControls.d.ts +3 -2
- package/esm/scripts/run-codex-prompts/common/resolveCoderAgent.d.ts +15 -5
- package/esm/scripts/run-codex-prompts/common/runGoScript/$spawnLoggedBashScript.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/captureLiveScriptOutput.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/createScriptOutputLineReader.d.ts +4 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/resolveShellHereDocumentDelimiter.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/git/coderCommitScope.d.ts +4 -1
- package/esm/scripts/run-codex-prompts/git/coderGitSync.d.ts +5 -0
- package/esm/scripts/run-codex-prompts/git/commitInitializedAgentBooks.d.ts +2 -1
- package/esm/scripts/run-codex-prompts/git/ensureWorkingTreeClean.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/isolation/copyCoderIsolationEnvironment.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/isolation/createCoderIsolationWorktree.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/main/findUnwrittenPrompts.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/main/listCoderPrompts.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/main/resolvePromptRunner.d.ts +11 -0
- package/esm/scripts/run-codex-prompts/prompts/loadPromptFiles.d.ts +10 -2
- package/esm/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/runners/cline/ClineRunner.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/runners/gemini/GeminiRunner.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/runners/github-copilot/GitHubCopilotRunner.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/runners/openai-codex/OpenAiCodexRunner.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/runners/opencode/OpencodeRunner.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/runners/qwen-code/QwenCodeRunner.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/server/runCoderHttpServer.d.ts +3 -0
- package/esm/scripts/run-codex-prompts/team/CoderTeamRuntime.d.ts +87 -0
- package/esm/scripts/run-codex-prompts/team/coderTeamProtocol.d.ts +6 -0
- package/esm/scripts/run-codex-prompts/team/compileCoderTeamAgent.d.ts +4 -0
- package/esm/scripts/run-codex-prompts/team/createCoderTeamPromptRunner.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/team/startCoderTeamBridge.d.ts +14 -0
- package/esm/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +16 -1
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +6 -0
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiViewport.d.ts +5 -0
- package/esm/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +4 -1
- package/esm/scripts/run-codex-prompts/ui/coderRunUiText.d.ts +4 -0
- package/esm/scripts/run-codex-prompts/ui/output/CoderOutputEvent.d.ts +20 -0
- package/esm/scripts/run-codex-prompts/ui/output/CoderRunOutput.d.ts +48 -0
- package/esm/scripts/run-codex-prompts/ui/output/buildCoderOutputLines.d.ts +18 -0
- package/esm/scripts/run-codex-prompts/ui/output/normalizeCoderOutputRecord.d.ts +10 -0
- package/esm/scripts/utils/emojiTags/scanEmojiTagUsage.d.ts +2 -0
- package/esm/scripts/utils/prompts/isPromptDocumentationFile.d.ts +5 -0
- package/esm/scripts/utils/prompts/promptEmojiTags.d.ts +2 -0
- package/esm/scripts/verify-prompts/verify-prompts.d.ts +3 -0
- package/esm/src/book-2.0/agent-source/CreateAgentModelRequirementsOptions.d.ts +2 -0
- package/esm/src/cli/cli-commands/coder/add.d.ts +16 -0
- package/esm/src/cli/cli-commands/coder/agentCliOptions.d.ts +3 -2
- package/esm/src/cli/cli-commands/coder/augmentCoderAgentTeam.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/coderAgentRole.d.ts +16 -0
- package/esm/src/cli/cli-commands/coder/coderReferencedArtifacts.d.ts +8 -7
- package/esm/src/cli/cli-commands/coder/ensureCoderDefaultAgentFiles.d.ts +8 -0
- package/esm/src/cli/cli-commands/coder/ensureCoderDefaultAgentFiles.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/ensureCoderRoleAgentFile.d.ts +12 -0
- package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +1 -1
- package/esm/src/cli/cli-commands/coder/getCoderInitializationCommitPaths.d.ts +9 -0
- package/esm/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +7 -5
- package/esm/src/cli/cli-commands/coder/plan.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/planning/assertPlanningCommitSafe.d.ts +6 -0
- package/esm/src/cli/cli-commands/coder/planning/assertPlanningPrdCommitScope.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/planning/assertPlanningRuntimePath.d.ts +6 -0
- package/esm/src/cli/cli-commands/coder/planning/createPlanningTerminal.d.ts +8 -0
- package/esm/src/cli/cli-commands/coder/planning/createPlanningTerminal.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/planning/createPlanningWorkspace.d.ts +11 -0
- package/esm/src/cli/cli-commands/coder/planning/discussPlanningTurn.d.ts +15 -0
- package/esm/src/cli/cli-commands/coder/planning/fixtures/snapshotPlanningProject.d.ts +5 -0
- package/esm/src/cli/cli-commands/coder/planning/planningGitSync.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/planning/planningPackagedCli.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/planning/planningProtocol.d.ts +152 -0
- package/esm/src/cli/cli-commands/coder/planning/planningTeam.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/planning/preparePlanningChanges.d.ts +16 -0
- package/esm/src/cli/cli-commands/coder/planning/readPlanningContext.d.ts +6 -0
- package/esm/src/cli/cli-commands/coder/planning/resolvePlanningPath.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/planning/runPlanningHarness.d.ts +30 -0
- package/esm/src/cli/cli-commands/coder/planning/runPlanningHarness.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/planning/runPlanningSession.d.ts +21 -0
- package/esm/src/cli/cli-commands/coder/planning/runPlanningSession.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/planning/savePlanningChanges.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/printInitializationSummary.d.ts +2 -1
- package/esm/src/cli/cli-commands/coder/promptsReadmeTemplate.d.ts +13 -0
- package/esm/src/cli/cli-commands/coder/promptsReadmeTemplate.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/readCoderAgentBook.d.ts +8 -0
- package/esm/src/cli/cli-commands/coder/workspacePreflight.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/LocalAgentBookCollection.d.ts +4 -2
- package/esm/src/cli/cli-commands/common/coderGitSyncCliOptions.d.ts +1 -1
- package/esm/src/cli/cli-commands/common/resolveLocalAgentSource.d.ts +8 -1
- package/esm/src/cli/cli-commands/common/validateCoderRunOptions.d.ts +6 -0
- package/esm/src/cli/cli-commands/common/workspaceRepository.d.ts +36 -0
- package/esm/src/cli/cli-commands/common/workspaceRepository.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/workspaceRepositoryCliOptions.d.ts +11 -0
- package/esm/src/commitments/TEAM/TEAM.test.d.ts +1 -0
- package/esm/src/conversion/archive/loadJsZipModule.d.ts +10 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +4 -3
- package/src/book-2.0/agent-source/CreateAgentModelRequirementsOptions.ts +2 -0
- package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/applyCommitmentsToAgentModelRequirements.ts +8 -3
- package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.ts +6 -0
- package/src/cli/$initializePromptbookCliProgram.ts +2 -0
- package/src/cli/cli-commands/coder/add.ts +44 -14
- package/src/cli/cli-commands/coder/agentCliOptions.ts +9 -3
- package/src/cli/cli-commands/coder/augmentCoderAgentTeam.ts +152 -0
- package/src/cli/cli-commands/coder/coderAgentRole.ts +22 -0
- package/src/cli/cli-commands/coder/coderReferencedArtifacts.ts +9 -12
- package/src/cli/cli-commands/coder/ensureCoderDefaultAgentFiles.ts +90 -0
- package/src/cli/cli-commands/coder/ensureCoderDeveloperAgentFile.ts +2 -21
- package/src/cli/cli-commands/coder/ensureCoderRoleAgentFile.ts +36 -0
- package/src/cli/cli-commands/coder/find-fresh-emoji-tags.ts +11 -2
- package/src/cli/cli-commands/coder/find-refactor-candidates.ts +10 -1
- package/src/cli/cli-commands/coder/find-unwritten.ts +10 -1
- package/src/cli/cli-commands/coder/generate-boilerplates.ts +12 -3
- package/src/cli/cli-commands/coder/getCoderInitializationCommitPaths.ts +42 -0
- package/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.ts +7 -2
- package/src/cli/cli-commands/coder/init.ts +88 -26
- package/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.ts +67 -21
- package/src/cli/cli-commands/coder/list.ts +7 -1
- package/src/cli/cli-commands/coder/ping.ts +8 -1
- package/src/cli/cli-commands/coder/plan.ts +127 -0
- package/src/cli/cli-commands/coder/planning/README.md +37 -0
- package/src/cli/cli-commands/coder/planning/assertPlanningCommitSafe.ts +23 -0
- package/src/cli/cli-commands/coder/planning/assertPlanningPrdCommitScope.ts +57 -0
- package/src/cli/cli-commands/coder/planning/assertPlanningRuntimePath.ts +34 -0
- package/src/cli/cli-commands/coder/planning/createPlanningTerminal.ts +57 -0
- package/src/cli/cli-commands/coder/planning/createPlanningWorkspace.ts +36 -0
- package/src/cli/cli-commands/coder/planning/discussPlanningTurn.ts +61 -0
- package/src/cli/cli-commands/coder/planning/fixtures/codex.cjs +54 -0
- package/src/cli/cli-commands/coder/planning/fixtures/conversation.json +70 -0
- package/src/cli/cli-commands/coder/planning/fixtures/snapshotPlanningProject.ts +17 -0
- package/src/cli/cli-commands/coder/planning/fixtures/terminal.cjs +26 -0
- package/src/cli/cli-commands/coder/planning/planningProtocol.ts +132 -0
- package/src/cli/cli-commands/coder/planning/preparePlanningChanges.ts +178 -0
- package/src/cli/cli-commands/coder/planning/readPlanningContext.ts +108 -0
- package/src/cli/cli-commands/coder/planning/resolvePlanningPath.ts +72 -0
- package/src/cli/cli-commands/coder/planning/runPlanningHarness.ts +249 -0
- package/src/cli/cli-commands/coder/planning/runPlanningSession.ts +243 -0
- package/src/cli/cli-commands/coder/planning/savePlanningChanges.ts +107 -0
- package/src/cli/cli-commands/coder/printInitializationSummary.ts +26 -3
- package/src/cli/cli-commands/coder/promptsReadmeTemplate.ts +358 -0
- package/src/cli/cli-commands/coder/readCoderAgentBook.ts +62 -0
- package/src/cli/cli-commands/coder/run.ts +37 -15
- package/src/cli/cli-commands/coder/server.ts +31 -10
- package/src/cli/cli-commands/coder/verify.ts +18 -1
- package/src/cli/cli-commands/coder.ts +7 -0
- package/src/cli/cli-commands/common/LocalAgentBookCollection.ts +56 -18
- package/src/cli/cli-commands/common/coderGitSyncCliOptions.ts +1 -1
- package/src/cli/cli-commands/common/createLocalAgentReferenceResolver.ts +7 -0
- package/src/cli/cli-commands/common/resolveLocalAgentSource.ts +39 -19
- package/src/cli/cli-commands/common/validateCoderRunOptions.ts +91 -0
- package/src/cli/cli-commands/common/workspaceRepository.md +46 -0
- package/src/cli/cli-commands/common/workspaceRepository.ts +265 -0
- package/src/cli/cli-commands/common/workspaceRepositoryCliOptions.ts +29 -0
- package/src/commitments/TEAM/TEAM.ts +26 -4
- package/src/conversion/archive/loadJsZipModule.ts +3 -1
- package/src/other/templates/getTemplatesPipelineCollection.ts +921 -830
- package/src/version.ts +2 -2
- package/src/versions.txt +7 -1
- package/umd/index.umd.js +4767 -809
- package/umd/index.umd.js.map +1 -1
- package/umd/scripts/find-fresh-emoji-tags/find-fresh-emoji-tags.d.ts +1 -1
- package/umd/scripts/find-refactor-candidates/find-refactor-candidates.d.ts +2 -0
- package/umd/scripts/find-refactor-candidates/resolveRefactorCandidateProject.d.ts +3 -1
- package/umd/scripts/run-codex-prompts/common/CoderRunControlFeedback.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/common/buildCoderRunControlKeyBadge.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/common/listenForCoderRunControls.d.ts +3 -2
- package/umd/scripts/run-codex-prompts/common/resolveCoderAgent.d.ts +15 -5
- package/umd/scripts/run-codex-prompts/common/runGoScript/$spawnLoggedBashScript.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/captureLiveScriptOutput.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/createScriptOutputLineReader.d.ts +4 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/resolveShellHereDocumentDelimiter.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/git/coderCommitScope.d.ts +4 -1
- package/umd/scripts/run-codex-prompts/git/coderGitSync.d.ts +5 -0
- package/umd/scripts/run-codex-prompts/git/commitInitializedAgentBooks.d.ts +2 -1
- package/umd/scripts/run-codex-prompts/git/ensureWorkingTreeClean.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/isolation/copyCoderIsolationEnvironment.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/isolation/createCoderIsolationWorktree.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/main/findUnwrittenPrompts.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/main/listCoderPrompts.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/main/resolvePromptRunner.d.ts +11 -0
- package/umd/scripts/run-codex-prompts/prompts/loadPromptFiles.d.ts +10 -2
- package/umd/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/runners/cline/ClineRunner.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/runners/gemini/GeminiRunner.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/runners/github-copilot/GitHubCopilotRunner.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/runners/openai-codex/OpenAiCodexRunner.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/runners/opencode/OpencodeRunner.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/runners/qwen-code/QwenCodeRunner.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/server/runCoderHttpServer.d.ts +3 -0
- package/umd/scripts/run-codex-prompts/team/CoderTeamRuntime.d.ts +87 -0
- package/umd/scripts/run-codex-prompts/team/coderTeamProtocol.d.ts +6 -0
- package/umd/scripts/run-codex-prompts/team/compileCoderTeamAgent.d.ts +4 -0
- package/umd/scripts/run-codex-prompts/team/createCoderTeamPromptRunner.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/team/startCoderTeamBridge.d.ts +14 -0
- package/umd/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +16 -1
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +6 -0
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiViewport.d.ts +5 -0
- package/umd/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +4 -1
- package/umd/scripts/run-codex-prompts/ui/coderRunUiText.d.ts +4 -0
- package/umd/scripts/run-codex-prompts/ui/output/CoderOutputEvent.d.ts +20 -0
- package/umd/scripts/run-codex-prompts/ui/output/CoderRunOutput.d.ts +48 -0
- package/umd/scripts/run-codex-prompts/ui/output/buildCoderOutputLines.d.ts +18 -0
- package/umd/scripts/run-codex-prompts/ui/output/normalizeCoderOutputRecord.d.ts +10 -0
- package/umd/scripts/utils/emojiTags/scanEmojiTagUsage.d.ts +2 -0
- package/umd/scripts/utils/prompts/isPromptDocumentationFile.d.ts +5 -0
- package/umd/scripts/utils/prompts/promptEmojiTags.d.ts +2 -0
- package/umd/scripts/verify-prompts/verify-prompts.d.ts +3 -0
- package/umd/src/book-2.0/agent-source/CreateAgentModelRequirementsOptions.d.ts +2 -0
- package/umd/src/cli/cli-commands/coder/add.d.ts +16 -0
- package/umd/src/cli/cli-commands/coder/agentCliOptions.d.ts +3 -2
- package/umd/src/cli/cli-commands/coder/augmentCoderAgentTeam.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/coderAgentRole.d.ts +16 -0
- package/umd/src/cli/cli-commands/coder/coderReferencedArtifacts.d.ts +8 -7
- package/umd/src/cli/cli-commands/coder/ensureCoderDefaultAgentFiles.d.ts +8 -0
- package/umd/src/cli/cli-commands/coder/ensureCoderDefaultAgentFiles.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/ensureCoderRoleAgentFile.d.ts +12 -0
- package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +1 -1
- package/umd/src/cli/cli-commands/coder/getCoderInitializationCommitPaths.d.ts +9 -0
- package/umd/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +7 -5
- package/umd/src/cli/cli-commands/coder/plan.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/planning/assertPlanningCommitSafe.d.ts +6 -0
- package/umd/src/cli/cli-commands/coder/planning/assertPlanningPrdCommitScope.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/planning/assertPlanningRuntimePath.d.ts +6 -0
- package/umd/src/cli/cli-commands/coder/planning/createPlanningTerminal.d.ts +8 -0
- package/umd/src/cli/cli-commands/coder/planning/createPlanningTerminal.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/planning/createPlanningWorkspace.d.ts +11 -0
- package/umd/src/cli/cli-commands/coder/planning/discussPlanningTurn.d.ts +15 -0
- package/umd/src/cli/cli-commands/coder/planning/fixtures/snapshotPlanningProject.d.ts +5 -0
- package/umd/src/cli/cli-commands/coder/planning/planningGitSync.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/planning/planningPackagedCli.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/planning/planningProtocol.d.ts +152 -0
- package/umd/src/cli/cli-commands/coder/planning/planningTeam.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/planning/preparePlanningChanges.d.ts +16 -0
- package/umd/src/cli/cli-commands/coder/planning/readPlanningContext.d.ts +6 -0
- package/umd/src/cli/cli-commands/coder/planning/resolvePlanningPath.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/planning/runPlanningHarness.d.ts +30 -0
- package/umd/src/cli/cli-commands/coder/planning/runPlanningHarness.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/planning/runPlanningSession.d.ts +21 -0
- package/umd/src/cli/cli-commands/coder/planning/runPlanningSession.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/planning/savePlanningChanges.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/printInitializationSummary.d.ts +2 -1
- package/umd/src/cli/cli-commands/coder/promptsReadmeTemplate.d.ts +13 -0
- package/umd/src/cli/cli-commands/coder/promptsReadmeTemplate.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/readCoderAgentBook.d.ts +8 -0
- package/umd/src/cli/cli-commands/coder/workspacePreflight.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/LocalAgentBookCollection.d.ts +4 -2
- package/umd/src/cli/cli-commands/common/coderGitSyncCliOptions.d.ts +1 -1
- package/umd/src/cli/cli-commands/common/resolveLocalAgentSource.d.ts +8 -1
- package/umd/src/cli/cli-commands/common/validateCoderRunOptions.d.ts +6 -0
- package/umd/src/cli/cli-commands/common/workspaceRepository.d.ts +36 -0
- package/umd/src/cli/cli-commands/common/workspaceRepository.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/workspaceRepositoryCliOptions.d.ts +11 -0
- package/umd/src/commitments/TEAM/TEAM.test.d.ts +1 -0
- package/umd/src/conversion/archive/loadJsZipModule.d.ts +10 -0
- package/umd/src/version.d.ts +1 -1
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from 'fs';
|
|
2
|
+
import { realpath } from 'fs/promises';
|
|
3
|
+
import { join } from 'path';
|
|
4
|
+
import { resolveCoderAgent } from '../../../../../scripts/run-codex-prompts/common/resolveCoderAgent';
|
|
5
|
+
import { CoderTeamRuntime } from '../../../../../scripts/run-codex-prompts/team/CoderTeamRuntime';
|
|
6
|
+
import { appendCoderTeamEvent } from '../../../../../scripts/run-codex-prompts/team/createCoderTeamPromptRunner';
|
|
7
|
+
import type { Usage } from '../../../../execution/Usage';
|
|
8
|
+
import { addUsage } from '../../../../execution/utils/addUsage';
|
|
9
|
+
import { NotFoundError } from '../../../../errors/NotFoundError';
|
|
10
|
+
import { spaceTrim } from '../../../../utils/organization/spaceTrim';
|
|
11
|
+
import type { NormalizedPromptRunnerSelectionCliOptions } from '../../common/promptRunnerCliOptions';
|
|
12
|
+
import { COMMON_PROMPT_TEMPLATE_FILE_PATH, resolveCoderPromptTemplate } from '../boilerplateTemplates';
|
|
13
|
+
import { assertPlanningPrdCommitScope } from './assertPlanningPrdCommitScope';
|
|
14
|
+
import { createPlanningWorkspace } from './createPlanningWorkspace';
|
|
15
|
+
import { resolvePlanningPath } from './resolvePlanningPath';
|
|
16
|
+
import { PLANNING_PROTOCOL, type PlanningMessage } from './planningProtocol';
|
|
17
|
+
import { discussPlanningTurn } from './discussPlanningTurn';
|
|
18
|
+
import { preparePlanningChanges, type PlanningChange } from './preparePlanningChanges';
|
|
19
|
+
import { readPlanningContext } from './readPlanningContext';
|
|
20
|
+
import { assertPlanningHarnessSupported, runPlanningHarness } from './runPlanningHarness';
|
|
21
|
+
import { savePlanningChanges } from './savePlanningChanges';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Terminal interface also used by deterministic conversation fixtures.
|
|
25
|
+
* @private internal type of `coder plan`
|
|
26
|
+
*/
|
|
27
|
+
export type PlanningSessionIo = {
|
|
28
|
+
readonly readMessage: () => Promise<string | undefined>;
|
|
29
|
+
readonly write: (message: string) => void;
|
|
30
|
+
readonly signal: AbortSignal;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Runs one multi-topic planning conversation; only explicit save commands cross the PRD write boundary.
|
|
35
|
+
* @private internal utility of `coder plan`
|
|
36
|
+
*/
|
|
37
|
+
export async function runPlanningSession(
|
|
38
|
+
options: NormalizedPromptRunnerSelectionCliOptions & {
|
|
39
|
+
readonly projectPath: string;
|
|
40
|
+
readonly agent?: string;
|
|
41
|
+
readonly template?: string;
|
|
42
|
+
readonly preexistingChangedPaths?: ReadonlySet<string>;
|
|
43
|
+
},
|
|
44
|
+
io: PlanningSessionIo,
|
|
45
|
+
harness: typeof runPlanningHarness = runPlanningHarness,
|
|
46
|
+
): Promise<ReadonlyMap<string, string>> {
|
|
47
|
+
const projectPath = await realpath(options.projectPath);
|
|
48
|
+
assertPlanningHarnessSupported(options.agentName);
|
|
49
|
+
const agent = await resolveCoderAgent(options.agent, projectPath, {
|
|
50
|
+
defaultRole: 'planner',
|
|
51
|
+
isInitializationAllowed: false,
|
|
52
|
+
signal: io.signal,
|
|
53
|
+
});
|
|
54
|
+
if (!existsSync(join(projectPath, 'prompts'))) {
|
|
55
|
+
throw new NotFoundError(spaceTrim('Planning requires `prompts/`. Run `ptbk coder init` first.'));
|
|
56
|
+
}
|
|
57
|
+
if (!agent) throw new NotFoundError(spaceTrim('Planner Book is missing. Run `ptbk coder init`.'));
|
|
58
|
+
resolvePlanningPath(projectPath, 'prompts');
|
|
59
|
+
const templateOption =
|
|
60
|
+
options.template ??
|
|
61
|
+
(existsSync(join(projectPath, COMMON_PROMPT_TEMPLATE_FILE_PATH))
|
|
62
|
+
? COMMON_PROMPT_TEMPLATE_FILE_PATH
|
|
63
|
+
: undefined);
|
|
64
|
+
const template = await resolveCoderPromptTemplate({ projectPath, templateOption });
|
|
65
|
+
const workspacePath = await createPlanningWorkspace(projectPath);
|
|
66
|
+
const primaryUsage: Usage[] = [];
|
|
67
|
+
const team = new CoderTeamRuntime({
|
|
68
|
+
agent: agent.teamAgent,
|
|
69
|
+
taskId: workspacePath,
|
|
70
|
+
signal: io.signal,
|
|
71
|
+
onEvent: (event) => appendCoderTeamEvent(join(workspacePath, 'runtime.log'), event),
|
|
72
|
+
execute: async ({ scope, message, context, reportUsage }) => {
|
|
73
|
+
const consultationHistory: PlanningMessage[] = [
|
|
74
|
+
{
|
|
75
|
+
role: 'context',
|
|
76
|
+
content: `Selected Book (${scope.agent.name}):\n${
|
|
77
|
+
scope.agent.systemMessage
|
|
78
|
+
}\nAvailable TEAM tools: ${JSON.stringify(scope.agent.teammates.map(({ tool }) => tool))}`,
|
|
79
|
+
},
|
|
80
|
+
{ role: 'user', content: JSON.stringify({ message, context }) },
|
|
81
|
+
];
|
|
82
|
+
const reply = await discussPlanningTurn({
|
|
83
|
+
projectPath,
|
|
84
|
+
history: consultationHistory,
|
|
85
|
+
signal: scope.signal,
|
|
86
|
+
team: scope,
|
|
87
|
+
isAdviser: true,
|
|
88
|
+
infer: () =>
|
|
89
|
+
harness({
|
|
90
|
+
...options,
|
|
91
|
+
workspacePath,
|
|
92
|
+
signal: scope.signal,
|
|
93
|
+
onUsage: reportUsage,
|
|
94
|
+
prompt: `${PLANNING_PROTOCOL}\nYou are a TEAM adviser. Return advice in message, no proposals.\nConversation (JSON data):\n${JSON.stringify(
|
|
95
|
+
consultationHistory,
|
|
96
|
+
)}`,
|
|
97
|
+
}),
|
|
98
|
+
});
|
|
99
|
+
return { answer: reply.message };
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
try {
|
|
103
|
+
const history: PlanningMessage[] = [
|
|
104
|
+
{
|
|
105
|
+
role: 'context',
|
|
106
|
+
content: `Selected Book (${agent.agentName}):\n${
|
|
107
|
+
agent.systemMessage
|
|
108
|
+
}\nAvailable TEAM tools: ${JSON.stringify(
|
|
109
|
+
agent.teamAgent.teammates.map(({ tool }) => tool),
|
|
110
|
+
)}\n\nSelected PRD template:\n${template.content}`,
|
|
111
|
+
},
|
|
112
|
+
{ role: 'context', content: await readPlanningContext(projectPath, { kind: 'list', path: '.' }) },
|
|
113
|
+
];
|
|
114
|
+
for (const path of ['README.md', 'AGENTS.md']) {
|
|
115
|
+
if (existsSync(join(projectPath, path))) {
|
|
116
|
+
history.push({
|
|
117
|
+
role: 'context',
|
|
118
|
+
content: `${path}:\n${await readPlanningContext(projectPath, {
|
|
119
|
+
kind: 'read',
|
|
120
|
+
path,
|
|
121
|
+
startLine: 1,
|
|
122
|
+
lineCount: 200,
|
|
123
|
+
})}`,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
const savedContents = new Map<string, string>();
|
|
128
|
+
let pending: PlanningChange[] = [];
|
|
129
|
+
io.write(
|
|
130
|
+
`${agent.agentName}: Discuss features and review PRD proposals. /save applies the preview; /draft saves unresolved drafts; /discard drops it; /exit ends. Ctrl+C cancels.\n`,
|
|
131
|
+
);
|
|
132
|
+
while (!io.signal.aborted) {
|
|
133
|
+
const message = (await io.readMessage())?.trim();
|
|
134
|
+
if (message === undefined || ['/exit', 'exit', 'quit'].includes(message)) break;
|
|
135
|
+
if (!message) continue;
|
|
136
|
+
if (message === '/discard') {
|
|
137
|
+
pending = [];
|
|
138
|
+
history.push({ role: 'context', content: 'The user discarded the unsaved proposals.' });
|
|
139
|
+
io.write('Discarded unsaved proposals.');
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
if (message === '/save' || message === '/draft') {
|
|
143
|
+
if (!pending.length) {
|
|
144
|
+
io.write('There are no proposed changes to save.');
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
if (io.signal.aborted) break;
|
|
148
|
+
try {
|
|
149
|
+
if (options.preexistingChangedPaths) {
|
|
150
|
+
await assertPlanningPrdCommitScope(
|
|
151
|
+
projectPath,
|
|
152
|
+
pending,
|
|
153
|
+
savedContents,
|
|
154
|
+
options.preexistingChangedPaths,
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
if (io.signal.aborted) break;
|
|
158
|
+
const paths = savePlanningChanges(projectPath, workspacePath, pending, message === '/draft');
|
|
159
|
+
for (const path of paths)
|
|
160
|
+
savedContents.set(path, readFileSync(resolvePlanningPath(projectPath, path), 'utf-8'));
|
|
161
|
+
history.push({
|
|
162
|
+
role: 'context',
|
|
163
|
+
content: `Saved ${message === '/draft' ? 'draft' : 'reviewed'} PRDs:\n${paths.join('\n')}`,
|
|
164
|
+
});
|
|
165
|
+
io.write(`Saved:\n${paths.join('\n')}`);
|
|
166
|
+
pending = [];
|
|
167
|
+
} catch (error) {
|
|
168
|
+
io.write(`Could not save: ${(error as Error).message}`);
|
|
169
|
+
}
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
// Continuing the discussion invalidates any earlier preview so a later save cannot apply stale decisions.
|
|
173
|
+
pending = [];
|
|
174
|
+
history.push({ role: 'user', content: message });
|
|
175
|
+
io.write(`${agent.agentName} is reading and thinking…`);
|
|
176
|
+
const reply = await discussPlanningTurn({
|
|
177
|
+
projectPath,
|
|
178
|
+
history,
|
|
179
|
+
signal: io.signal,
|
|
180
|
+
write: io.write,
|
|
181
|
+
team: team.root,
|
|
182
|
+
infer: () =>
|
|
183
|
+
harness({
|
|
184
|
+
...options,
|
|
185
|
+
workspacePath,
|
|
186
|
+
signal: io.signal,
|
|
187
|
+
onUsage: (item) => {
|
|
188
|
+
primaryUsage.push(item);
|
|
189
|
+
},
|
|
190
|
+
prompt: `${PLANNING_PROTOCOL}\n\nConversation (JSON data):\n${JSON.stringify(history)}`,
|
|
191
|
+
}),
|
|
192
|
+
});
|
|
193
|
+
if (io.signal.aborted) break;
|
|
194
|
+
io.write(`${agent.agentName}: ${reply.message}`);
|
|
195
|
+
pending = await preparePlanningChanges(projectPath, reply.proposals, templateOption);
|
|
196
|
+
for (const change of pending) io.write(formatPlanningPreview(change));
|
|
197
|
+
if (pending.length)
|
|
198
|
+
io.write(
|
|
199
|
+
'Review the changes above. /save applies this preview; /draft saves drafts; continue discussing to revise it.',
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
io.write(
|
|
203
|
+
io.signal.aborted
|
|
204
|
+
? 'Planning cancelled. Saved PRDs remain intact.'
|
|
205
|
+
: 'Planning ended. Unsaved proposals were discarded.',
|
|
206
|
+
);
|
|
207
|
+
return savedContents;
|
|
208
|
+
} finally {
|
|
209
|
+
await team.close();
|
|
210
|
+
await appendCoderTeamEvent(join(workspacePath, 'runtime.log'), {
|
|
211
|
+
type: 'team_summary',
|
|
212
|
+
sessionId: team.sessionId,
|
|
213
|
+
taskId: workspacePath,
|
|
214
|
+
invocationId: team.root.invocationId,
|
|
215
|
+
agent: agent.agentName,
|
|
216
|
+
data: { usage: addUsage(...primaryUsage, team.usage), isAggregate: true },
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/** Shows exact before/after content, including lifecycle lines, without requiring an external diff command. */
|
|
222
|
+
function formatPlanningPreview(change: PlanningChange): string {
|
|
223
|
+
if (change.before === null)
|
|
224
|
+
return `Create ${change.path}\n${change.after
|
|
225
|
+
.split(/\r?\n/u)
|
|
226
|
+
.map((line) => `+ ${line}`)
|
|
227
|
+
.join('\n')}`;
|
|
228
|
+
const before = change.before.split(/\r?\n/u);
|
|
229
|
+
const after = change.after.split(/\r?\n/u);
|
|
230
|
+
let start = 0;
|
|
231
|
+
while (start < before.length && start < after.length && before[start] === after[start]) start++;
|
|
232
|
+
let end = 0;
|
|
233
|
+
while (
|
|
234
|
+
end < before.length - start &&
|
|
235
|
+
end < after.length - start &&
|
|
236
|
+
before[before.length - end - 1] === after[after.length - end - 1]
|
|
237
|
+
)
|
|
238
|
+
end++;
|
|
239
|
+
return `Edit ${change.path}\n@@ line ${start + 1} @@\n${[
|
|
240
|
+
...before.slice(start, before.length - end).map((line) => `- ${line}`),
|
|
241
|
+
...after.slice(start, after.length - end).map((line) => `+ ${line}`),
|
|
242
|
+
].join('\n')}`;
|
|
243
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import {
|
|
2
|
+
closeSync,
|
|
3
|
+
existsSync,
|
|
4
|
+
fsyncSync,
|
|
5
|
+
linkSync,
|
|
6
|
+
openSync,
|
|
7
|
+
readFileSync,
|
|
8
|
+
renameSync,
|
|
9
|
+
unlinkSync,
|
|
10
|
+
writeFileSync,
|
|
11
|
+
} from 'fs';
|
|
12
|
+
import { join } from 'path';
|
|
13
|
+
import { NotAllowed } from '../../../../errors/NotAllowed';
|
|
14
|
+
import { spaceTrim } from '../../../../utils/organization/spaceTrim';
|
|
15
|
+
import { assertPlanningRuntimePath } from './assertPlanningRuntimePath';
|
|
16
|
+
import { resolvePlanningPath } from './resolvePlanningPath';
|
|
17
|
+
import type { PlanningChange } from './preparePlanningChanges';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Validates the entire batch before writing, stages outside the queue, then atomically replaces each file.
|
|
21
|
+
* The synchronous commit region cannot be interrupted by a SIGINT callback halfway through a save.
|
|
22
|
+
* @private internal execution boundary of `coder plan`
|
|
23
|
+
*/
|
|
24
|
+
export function savePlanningChanges(
|
|
25
|
+
projectPath: string,
|
|
26
|
+
workspacePath: string,
|
|
27
|
+
changes: ReadonlyArray<PlanningChange>,
|
|
28
|
+
isDraft: boolean,
|
|
29
|
+
): string[] {
|
|
30
|
+
assertPlanningRuntimePath(projectPath, workspacePath);
|
|
31
|
+
const prepared = changes.map((change, index) => {
|
|
32
|
+
const path = resolvePlanningPath(projectPath, change.path, true);
|
|
33
|
+
const current = existsSync(path) ? readFileSync(path, 'utf-8') : null;
|
|
34
|
+
if (current !== change.before) {
|
|
35
|
+
throw new NotAllowed(
|
|
36
|
+
spaceTrim(
|
|
37
|
+
`\`${change.path}\` changed since the preview. Nothing was saved; ask Planner to read it again.`,
|
|
38
|
+
),
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
if (isDraft && !change.draft) {
|
|
42
|
+
throw new NotAllowed(
|
|
43
|
+
spaceTrim(
|
|
44
|
+
`\`${change.path}\` has routing metadata that cannot be converted to [-] safely. Save the reviewed ready revision or keep discussing it.`,
|
|
45
|
+
),
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
...change,
|
|
50
|
+
planningPath: change.path,
|
|
51
|
+
path,
|
|
52
|
+
content: isDraft ? change.draft : change.after,
|
|
53
|
+
temporaryPath: join(workspacePath, `save-${index}.tmp`),
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
const saved: typeof prepared = [];
|
|
57
|
+
try {
|
|
58
|
+
for (const change of prepared) {
|
|
59
|
+
writeDurableFile(change.temporaryPath, change.content);
|
|
60
|
+
}
|
|
61
|
+
for (const change of prepared) {
|
|
62
|
+
resolvePlanningPath(projectPath, change.planningPath, true);
|
|
63
|
+
const current = existsSync(change.path) ? readFileSync(change.path, 'utf-8') : null;
|
|
64
|
+
if (current !== change.before) {
|
|
65
|
+
throw new NotAllowed(
|
|
66
|
+
spaceTrim(
|
|
67
|
+
`\`${change.planningPath}\` changed while saving. Review a fresh preview.`,
|
|
68
|
+
),
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
if (change.before === null) {
|
|
72
|
+
// Hard-link creation is exclusive: unlike rename, it cannot overwrite a concurrently created task.
|
|
73
|
+
linkSync(change.temporaryPath, change.path);
|
|
74
|
+
saved.push(change);
|
|
75
|
+
unlinkSync(change.temporaryPath);
|
|
76
|
+
} else {
|
|
77
|
+
renameSync(change.temporaryPath, change.path);
|
|
78
|
+
saved.push(change);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
} catch (error) {
|
|
82
|
+
for (const change of saved.reverse()) {
|
|
83
|
+
if (change.before === null) unlinkSync(change.path);
|
|
84
|
+
else {
|
|
85
|
+
writeDurableFile(change.temporaryPath, change.before);
|
|
86
|
+
renameSync(change.temporaryPath, change.path);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
throw error;
|
|
90
|
+
} finally {
|
|
91
|
+
for (const change of prepared) {
|
|
92
|
+
if (existsSync(change.temporaryPath)) unlinkSync(change.temporaryPath);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return changes.map((change) => change.path);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** Flushes a staged PRD before publishing its directory entry. */
|
|
99
|
+
function writeDurableFile(path: string, content: string): void {
|
|
100
|
+
const descriptor = openSync(path, 'wx');
|
|
101
|
+
try {
|
|
102
|
+
writeFileSync(descriptor, content, 'utf-8');
|
|
103
|
+
fsyncSync(descriptor);
|
|
104
|
+
} finally {
|
|
105
|
+
closeSync(descriptor);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WorkspaceRepositoryContext } from '../common/workspaceRepository';
|
|
1
2
|
import colors from 'colors';
|
|
2
3
|
import { ADAM_AGENT_BOOK_RELATIVE_PATH } from '../common/ensureAdamAgentBook';
|
|
3
4
|
import { CODER_AGENTS_DIRECTORY_PATH } from './ensureCoderDeveloperAgentFile';
|
|
@@ -11,15 +12,29 @@ import type { CoderInitializationSummary } from './initializeCoderProjectConfigu
|
|
|
11
12
|
*
|
|
12
13
|
* @private function of `coder init` command
|
|
13
14
|
*/
|
|
14
|
-
export function printInitializationSummary(
|
|
15
|
-
|
|
15
|
+
export function printInitializationSummary(
|
|
16
|
+
summary: CoderInitializationSummary,
|
|
17
|
+
workspace?: WorkspaceRepositoryContext,
|
|
18
|
+
): void {
|
|
19
|
+
const isUnresolved =
|
|
20
|
+
summary.adamAgentFileStatus === 'unresolved' ||
|
|
21
|
+
summary.referencedArtifactStatuses.some(({ status }) => status === 'unresolved');
|
|
22
|
+
console.info(
|
|
23
|
+
isUnresolved
|
|
24
|
+
? colors.yellow('Promptbook coder initialization has unresolved artifacts.')
|
|
25
|
+
: colors.green('Promptbook coder configuration setup:'),
|
|
26
|
+
);
|
|
27
|
+
if (workspace)
|
|
28
|
+
console.info(colors.gray(`✔ Git repository: ${workspace.repositoryStatus} (${workspace.repositoryRoot})`));
|
|
16
29
|
printInitializationStatusLine('prompts/', summary.promptsDirectoryStatus);
|
|
30
|
+
printInitializationStatusLine('prompts/README.md', summary.promptsReadmeFileStatus);
|
|
17
31
|
printInitializationStatusLine('prompts/done/', summary.promptsDoneDirectoryStatus);
|
|
18
32
|
printInitializationStatusLine('prompts/templates/', summary.promptsTemplatesDirectoryStatus);
|
|
19
33
|
printInitializationStatusLine('agents/', summary.agentsDirectoryStatus);
|
|
20
34
|
printInitializationStatusLine(
|
|
21
35
|
`${CODER_AGENTS_DIRECTORY_PATH}/${ADAM_AGENT_BOOK_RELATIVE_PATH}`,
|
|
22
36
|
summary.adamAgentFileStatus,
|
|
37
|
+
summary.adamAgentFileDiagnostic,
|
|
23
38
|
);
|
|
24
39
|
printInitializationStatusLine('.env', summary.envFileStatus);
|
|
25
40
|
printInitializationStatusLine('.gitignore', summary.gitignoreFileStatus);
|
|
@@ -30,6 +45,7 @@ export function printInitializationSummary(summary: CoderInitializationSummary):
|
|
|
30
45
|
printInitializationStatusLine(
|
|
31
46
|
formatDisplayPath(referencedArtifactStatus.relativeFilePath),
|
|
32
47
|
referencedArtifactStatus.status,
|
|
48
|
+
referencedArtifactStatus.diagnostic,
|
|
33
49
|
);
|
|
34
50
|
}
|
|
35
51
|
|
|
@@ -58,6 +74,8 @@ function formatInitializationStatus(status: InitializationStatus | CoderReferenc
|
|
|
58
74
|
return 'updated';
|
|
59
75
|
}
|
|
60
76
|
|
|
77
|
+
if (status === 'augmented' || status === 'unresolved') return status;
|
|
78
|
+
|
|
61
79
|
if (status === 'not-referenced') {
|
|
62
80
|
return 'not referenced by the added scripts, kept as is';
|
|
63
81
|
}
|
|
@@ -71,8 +89,13 @@ function formatInitializationStatus(status: InitializationStatus | CoderReferenc
|
|
|
71
89
|
function printInitializationStatusLine(
|
|
72
90
|
relativePath: string,
|
|
73
91
|
status: InitializationStatus | CoderReferencedArtifactStatus,
|
|
92
|
+
diagnostic?: string,
|
|
74
93
|
): void {
|
|
75
|
-
|
|
94
|
+
const colorize = status === 'unresolved' ? colors.yellow : colors.gray;
|
|
95
|
+
console.info(
|
|
96
|
+
colorize(`${status === 'unresolved' ? '!' : '✔'} ${relativePath}: ${formatInitializationStatus(status)}`),
|
|
97
|
+
);
|
|
98
|
+
if (diagnostic) console.info(colorize(` ${diagnostic}`));
|
|
76
99
|
}
|
|
77
100
|
|
|
78
101
|
/**
|