@promptbook/cli 0.114.0-42 → 0.114.0-48
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 +1104 -781
- package/src/version.ts +2 -2
- package/src/versions.txt +6 -0
- 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,20 @@
|
|
|
1
|
+
/** Display selection belongs only to this dashboard invocation. */
|
|
2
|
+
export type CoderOutputMode = 'normal' | 'raw';
|
|
3
|
+
/** Observable output categories; these never drive runner state. */
|
|
4
|
+
export type CoderOutputKind = 'agent' | 'reasoning' | 'tool' | 'files' | 'verification' | 'result' | 'warning' | 'error' | 'status' | 'unknown';
|
|
5
|
+
/** A bounded presentation entry, separate from the original harness chunks and durable trace. */
|
|
6
|
+
export type CoderOutputEvent = {
|
|
7
|
+
readonly id?: string;
|
|
8
|
+
readonly kind: CoderOutputKind;
|
|
9
|
+
readonly title: string;
|
|
10
|
+
readonly text: string;
|
|
11
|
+
readonly isDelta?: boolean;
|
|
12
|
+
};
|
|
13
|
+
/** Permissive protocol object: all fields are checked at the presentation boundary. */
|
|
14
|
+
export type CoderOutputRecord = Record<string, unknown>;
|
|
15
|
+
/** Safely reads an object from an unknown protocol field. */
|
|
16
|
+
export declare function outputRecord(value: unknown): CoderOutputRecord;
|
|
17
|
+
/** Safely reads a string without interpreting arbitrary objects as prose. */
|
|
18
|
+
export declare function outputText(value: unknown): string;
|
|
19
|
+
/** Safely reads arrays containing protocol records. */
|
|
20
|
+
export declare function outputRecords(value: unknown): CoderOutputRecord[];
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { LiveScriptOutputSource } from '../../common/runGoScript/captureLiveScriptOutput';
|
|
2
|
+
import { type CoderOutputEvent } from './CoderOutputEvent';
|
|
3
|
+
/** Original chunks in arrival order, including stream identity. */
|
|
4
|
+
export type CoderRawOutputChunk = {
|
|
5
|
+
readonly text: string;
|
|
6
|
+
readonly source: string;
|
|
7
|
+
};
|
|
8
|
+
/** Bounded, passive projection of existing output. No method calls or controls any harness. */
|
|
9
|
+
export declare class CoderRunOutput {
|
|
10
|
+
/** Lets the renderer reuse wrapping while only the spinner or elapsed timer changes. */
|
|
11
|
+
revision: number;
|
|
12
|
+
private readonly projectedEvents;
|
|
13
|
+
private readonly pendingOutput;
|
|
14
|
+
private pendingCharacterCount;
|
|
15
|
+
private skippedChunkCount;
|
|
16
|
+
readonly rawChunks: CoderRawOutputChunk[];
|
|
17
|
+
isHistoryTruncated: boolean;
|
|
18
|
+
private rawCharacterCount;
|
|
19
|
+
private sequence;
|
|
20
|
+
private generation;
|
|
21
|
+
private streams;
|
|
22
|
+
/** Makes projection lazy so input keys and process-output callbacks perform no rendering work. */
|
|
23
|
+
get events(): readonly CoderOutputEvent[];
|
|
24
|
+
/** Records the original chunk first and queues its independent presentation projection. */
|
|
25
|
+
append(chunk: string, source: LiveScriptOutputSource, harnessName: string, isVerification: boolean): void;
|
|
26
|
+
/** Projects a queued chunk, assembling stdout and stderr independently. */
|
|
27
|
+
private projectChunk;
|
|
28
|
+
/** Runner logs are already complete messages, unlike shell chunks. */
|
|
29
|
+
appendRunner(text: string, kind?: 'status' | 'warning' | 'error' | 'verification'): void;
|
|
30
|
+
/** Queues the capture boundary; runner callbacks must never perform projection or wrapping. */
|
|
31
|
+
flush(): void;
|
|
32
|
+
/** Final plain lines retain their observed speaker/activity; malformed records remain labeled as data. */
|
|
33
|
+
private flushStreams;
|
|
34
|
+
/** Pending JSON is never presented as an agent message. Plain text remains visible before a newline arrives. */
|
|
35
|
+
getPendingEvents(): CoderOutputEvent[];
|
|
36
|
+
/** Bounds deferred work too; overload is visible and durable logs remain untouched. */
|
|
37
|
+
private enqueue;
|
|
38
|
+
/** Processes bounded display work, never a runner action. */
|
|
39
|
+
private drain;
|
|
40
|
+
/** Keeps bounded original chunks separately, never replacing the durable log with normalized text. */
|
|
41
|
+
private retainRaw;
|
|
42
|
+
/** Uses the existing shared harness JSON parser; unknown and malformed records stay visible. */
|
|
43
|
+
private projectLine;
|
|
44
|
+
/** Groups adjacent lines only within the same observed activity and stream. */
|
|
45
|
+
private addPlain;
|
|
46
|
+
/** Updates known message/tool snapshots in place and suppresses duplicate result text. */
|
|
47
|
+
private add;
|
|
48
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CoderOutputEvent, CoderOutputMode } from './CoderOutputEvent';
|
|
2
|
+
import type { CoderRawOutputChunk } from './CoderRunOutput';
|
|
3
|
+
/** Reads the last rendered scroll extent without doing presentation work on the input-control path. */
|
|
4
|
+
export declare function getCoderOutputScrollMaximum(chunks: readonly CoderRawOutputChunk[], mode: CoderOutputMode, height: number): number;
|
|
5
|
+
/** Builds a fixed-height, wrapped viewport from the selected projection of the same stream. */
|
|
6
|
+
export declare function buildCoderOutputLines(options: {
|
|
7
|
+
readonly mode: CoderOutputMode;
|
|
8
|
+
readonly events: readonly CoderOutputEvent[];
|
|
9
|
+
readonly rawChunks: readonly CoderRawOutputChunk[];
|
|
10
|
+
readonly width: number;
|
|
11
|
+
readonly height: number;
|
|
12
|
+
readonly scrollOffset: number;
|
|
13
|
+
readonly isHistoryTruncated: boolean;
|
|
14
|
+
readonly revision?: number;
|
|
15
|
+
}): {
|
|
16
|
+
lines: string[];
|
|
17
|
+
maxScrollOffset: number;
|
|
18
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type CoderOutputEvent, type CoderOutputRecord } from './CoderOutputEvent';
|
|
2
|
+
/** Per-stream message identity for Claude's indexed content blocks. */
|
|
3
|
+
export type CoderOutputRecordContext = {
|
|
4
|
+
messageId: string;
|
|
5
|
+
sequence: number;
|
|
6
|
+
};
|
|
7
|
+
/** Projects known harness envelopes into display events, without making execution decisions. */
|
|
8
|
+
export declare function normalizeCoderOutputRecord(record: CoderOutputRecord, context: CoderOutputRecordContext): CoderOutputEvent[] | undefined;
|
|
9
|
+
/** Displays supplied data as data, never as invented narration. */
|
|
10
|
+
export declare function formatOutputValue(value: unknown): string;
|
|
@@ -3,6 +3,8 @@ import type { string_char_emoji } from '../../../src/types/typeAliasEmoji';
|
|
|
3
3
|
* Options controlling one repository emoji-tag scan.
|
|
4
4
|
*/
|
|
5
5
|
export type EmojiTagScanOptions = {
|
|
6
|
+
/** False keeps a scan read-only while still reusing any existing cache. */
|
|
7
|
+
readonly isCacheWriteEnabled?: boolean;
|
|
6
8
|
/**
|
|
7
9
|
* Candidate emojis that may appear inside bracketed tags.
|
|
8
10
|
*/
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reserves the prompts README for documentation, regardless of its contents or filename case.
|
|
3
|
+
* Other Markdown filenames remain valid PRDs, including names which contain the word "readme".
|
|
4
|
+
*/
|
|
5
|
+
export declare function isPromptDocumentationFile(filePath: string): boolean;
|
|
@@ -7,6 +7,8 @@ export declare const PROMPT_EMOJI_TAG_PREFIX = "\u2728";
|
|
|
7
7
|
* Options for selecting fresh prompt emoji tags.
|
|
8
8
|
*/
|
|
9
9
|
export type PromptEmojiTagOptions = {
|
|
10
|
+
/** Read-only authoring previews can disable the scan cache's filesystem writes. */
|
|
11
|
+
readonly isCacheWriteEnabled?: boolean;
|
|
10
12
|
/**
|
|
11
13
|
* Number of unique emojis to reserve.
|
|
12
14
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WorkspaceRepositoryContext } from '../../src/cli/cli-commands/common/workspaceRepository';
|
|
1
2
|
import type { CoderGitSyncOptions } from '../run-codex-prompts/git/coderGitSync';
|
|
2
3
|
import type { PromptFile } from '../run-codex-prompts/prompts/types/PromptFile';
|
|
3
4
|
import type { VerifyPromptsOrder } from './VerifyPromptsOrder';
|
|
@@ -5,6 +6,8 @@ import type { VerifyPromptsOrder } from './VerifyPromptsOrder';
|
|
|
5
6
|
* Options supported by the prompt verification helper.
|
|
6
7
|
*/
|
|
7
8
|
export type VerifyPromptsOptions = {
|
|
9
|
+
/** Resolved project and repository supplied by the workspace preflight. */
|
|
10
|
+
readonly workspace?: WorkspaceRepositoryContext;
|
|
8
11
|
/**
|
|
9
12
|
* Order in which the prompt files are processed.
|
|
10
13
|
*/
|
|
@@ -7,6 +7,8 @@ import type { TeammateProfileResolver } from './TeammateProfileResolver';
|
|
|
7
7
|
* @public exported from `@promptbook/core`
|
|
8
8
|
*/
|
|
9
9
|
export type CreateAgentModelRequirementsOptions = {
|
|
10
|
+
/** A host supplying its own scoped TEAM runtime only needs the tool definitions, not global executors. */
|
|
11
|
+
readonly isTeamToolRegistrationDisabled?: boolean;
|
|
10
12
|
/**
|
|
11
13
|
* Resolver that transforms compact agent references (FROM, IMPORT, TEAM) into concrete URLs.
|
|
12
14
|
*/
|
|
@@ -34,3 +34,19 @@ export declare function addCoderPrompt({ projectPath, description, priority, tem
|
|
|
34
34
|
readonly priority: number;
|
|
35
35
|
readonly templateOption?: string;
|
|
36
36
|
}): Promise<AddCoderPromptResult>;
|
|
37
|
+
/**
|
|
38
|
+
* Prepares a numbered, emoji-tagged prompt for preview without writing the prompt file.
|
|
39
|
+
* The offset reserves consecutive identities when a planning turn proposes several files.
|
|
40
|
+
*
|
|
41
|
+
* @private internal utility shared by `coder add` and `coder plan`
|
|
42
|
+
*/
|
|
43
|
+
export declare function prepareCoderPrompt({ projectPath, description, priority, templateOption, numberOffset, reservedEmojiTag, }: {
|
|
44
|
+
readonly projectPath: string;
|
|
45
|
+
readonly description: string;
|
|
46
|
+
readonly priority: number;
|
|
47
|
+
readonly templateOption?: string;
|
|
48
|
+
readonly numberOffset?: number;
|
|
49
|
+
readonly reservedEmojiTag?: string;
|
|
50
|
+
}): Promise<AddCoderPromptResult & {
|
|
51
|
+
readonly content: string;
|
|
52
|
+
}>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Command as Program } from 'commander';
|
|
2
|
+
import { type CoderAgentRole } from './coderAgentRole';
|
|
2
3
|
/**
|
|
3
4
|
* Commander option bag for an optional Book agent used by coder commands.
|
|
4
5
|
*
|
|
@@ -12,10 +13,10 @@ export type CoderAgentCliOptions = {
|
|
|
12
13
|
*
|
|
13
14
|
* @private internal utility of `ptbk coder`
|
|
14
15
|
*/
|
|
15
|
-
export declare const CODER_AGENT_OPTION_DESCRIPTION = "
|
|
16
|
+
export declare const CODER_AGENT_OPTION_DESCRIPTION = "Book agent providing persona, instructions, identity and task routing; --harness selects the coding tool and --model selects its model";
|
|
16
17
|
/**
|
|
17
18
|
* Registers the shared `--agent` option for coder commands.
|
|
18
19
|
*
|
|
19
20
|
* @private internal utility of `ptbk coder`
|
|
20
21
|
*/
|
|
21
|
-
export declare function addCoderAgentOption(command: Program): void;
|
|
22
|
+
export declare function addCoderAgentOption(command: Program, defaultRole?: CoderAgentRole): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adds only missing bundled TEAM commitments using canonical local Book identities.
|
|
3
|
+
* Role instructions come from the bundled Book, not from a harness or a second template here.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `coder init`
|
|
6
|
+
*/
|
|
7
|
+
export declare function augmentCoderAgentTeam(projectPath: string, role: 'developer' | 'planner'): Promise<'augmented' | 'unchanged'>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project-owned Book defaults for execution roles, independent of harness and model selection.
|
|
3
|
+
* Commands without an execution role, such as `coder list`, have no default Book filter.
|
|
4
|
+
*
|
|
5
|
+
* @private internal constant of `ptbk coder`
|
|
6
|
+
*/
|
|
7
|
+
export declare const CODER_DEFAULT_AGENT_BOOK_PATHS: {
|
|
8
|
+
readonly developer: "agents/developer.book";
|
|
9
|
+
readonly planner: "agents/planner.book";
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Execution role whose editable local Book is selected when `--agent` is omitted.
|
|
13
|
+
*
|
|
14
|
+
* @private internal type of `ptbk coder`
|
|
15
|
+
*/
|
|
16
|
+
export type CoderAgentRole = keyof typeof CODER_DEFAULT_AGENT_BOOK_PATHS;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { InitializationStatus } from './boilerplateTemplates';
|
|
2
2
|
/**
|
|
3
|
-
* Status of one artifact referenced by the default coder scripts.
|
|
3
|
+
* Status of one default Book or artifact referenced by the default coder scripts.
|
|
4
4
|
*
|
|
5
5
|
* `not-referenced` means that no newly added script points at the artifact, so `ptbk coder init` left it alone.
|
|
6
6
|
*
|
|
7
7
|
* @private internal utility of `coder init` command
|
|
8
8
|
*/
|
|
9
|
-
export type CoderReferencedArtifactStatus = InitializationStatus | 'not-referenced';
|
|
9
|
+
export type CoderReferencedArtifactStatus = InitializationStatus | 'augmented' | 'unresolved' | 'not-referenced';
|
|
10
10
|
/**
|
|
11
|
-
* Result of ensuring one artifact referenced by the default coder scripts.
|
|
11
|
+
* Result of ensuring one default Book or artifact referenced by the default coder scripts.
|
|
12
12
|
*
|
|
13
13
|
* @private internal utility of `coder init` command
|
|
14
14
|
*/
|
|
@@ -18,15 +18,16 @@ export type EnsuredCoderReferencedArtifact = {
|
|
|
18
18
|
*/
|
|
19
19
|
readonly relativeFilePath: string;
|
|
20
20
|
/**
|
|
21
|
-
* Status describing whether the artifact
|
|
21
|
+
* Status describing whether the artifact was created, augmented, preserved, or could not be resolved.
|
|
22
22
|
*/
|
|
23
23
|
readonly status: CoderReferencedArtifactStatus;
|
|
24
|
+
/** Explanation of an unresolved file or TEAM declaration, with the original content preserved. */
|
|
25
|
+
readonly diagnostic?: string;
|
|
24
26
|
};
|
|
25
27
|
/**
|
|
26
|
-
*
|
|
28
|
+
* Initializes artifacts referenced by freshly added scripts. Default Books are ensured separately.
|
|
27
29
|
*
|
|
28
|
-
*
|
|
29
|
-
* script is kept as is, so it does not reference the default artifact in the first place.
|
|
30
|
+
* For artifacts other than role Books, an existing project script does not cause default files to be created.
|
|
30
31
|
*
|
|
31
32
|
* @private function of `initializeCoderProjectConfiguration`
|
|
32
33
|
*/
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EnsuredCoderReferencedArtifact } from './coderReferencedArtifacts';
|
|
2
|
+
/**
|
|
3
|
+
* Ensures every default Book independently, then adds missing helper declarations to the two primary roles.
|
|
4
|
+
* A failure leaves the affected Book intact and does not prevent the remaining files from being initialized.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `coder init`
|
|
7
|
+
*/
|
|
8
|
+
export declare function ensureCoderDefaultAgentFiles(projectPath: string): Promise<EnsuredCoderReferencedArtifact[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { InitializationStatus } from './boilerplateTemplates';
|
|
2
|
+
/**
|
|
3
|
+
* Project-owned planning role selected when `coder plan` has no explicit Book override.
|
|
4
|
+
* @private internal constant of Coder role resolution
|
|
5
|
+
*/
|
|
6
|
+
export declare const CODER_PLANNER_AGENT_FILE_PATH = "agents/planner.book";
|
|
7
|
+
/**
|
|
8
|
+
* Copies a bundled role without overwriting an existing project-owned Book, including on repeated init.
|
|
9
|
+
*
|
|
10
|
+
* @private internal utility of `coder init`
|
|
11
|
+
*/
|
|
12
|
+
export declare function ensureCoderRoleAgentFile(projectPath: string, role: 'developer' | 'planner' | 'lawyer' | 'copywriter'): Promise<InitializationStatus>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { WorkspaceRepositoryContext } from '../common/workspaceRepository';
|
|
2
|
+
import type { CoderInitializationSummary } from './initializeCoderProjectConfiguration';
|
|
3
|
+
/**
|
|
4
|
+
* Restricts an explicit initialization commit to the initializer's write set, in repository-relative paths.
|
|
5
|
+
* The shared snapshot still excludes pre-existing files that initialization did not actually change.
|
|
6
|
+
*
|
|
7
|
+
* @private internal utility of the shared project initializer
|
|
8
|
+
*/
|
|
9
|
+
export declare function getCoderInitializationCommitPaths(workspace: WorkspaceRepositoryContext, summary: CoderInitializationSummary, boilerplatePaths: ReadonlyArray<string>): ReadonlyArray<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InitializationStatus } from './boilerplateTemplates';
|
|
2
|
-
import type { EnsuredCoderReferencedArtifact } from './coderReferencedArtifacts';
|
|
2
|
+
import type { CoderReferencedArtifactStatus, EnsuredCoderReferencedArtifact } from './coderReferencedArtifacts';
|
|
3
3
|
/**
|
|
4
4
|
* Result summary returned after coder configuration initialization.
|
|
5
5
|
*
|
|
@@ -7,10 +7,12 @@ import type { EnsuredCoderReferencedArtifact } from './coderReferencedArtifacts'
|
|
|
7
7
|
*/
|
|
8
8
|
export type CoderInitializationSummary = {
|
|
9
9
|
readonly promptsDirectoryStatus: InitializationStatus;
|
|
10
|
+
readonly promptsReadmeFileStatus: InitializationStatus;
|
|
10
11
|
readonly promptsDoneDirectoryStatus: InitializationStatus;
|
|
11
12
|
readonly promptsTemplatesDirectoryStatus: InitializationStatus;
|
|
12
13
|
readonly agentsDirectoryStatus: InitializationStatus;
|
|
13
|
-
readonly adamAgentFileStatus:
|
|
14
|
+
readonly adamAgentFileStatus: CoderReferencedArtifactStatus;
|
|
15
|
+
readonly adamAgentFileDiagnostic?: string;
|
|
14
16
|
readonly envFileStatus: InitializationStatus;
|
|
15
17
|
readonly gitignoreFileStatus: InitializationStatus;
|
|
16
18
|
readonly packageJsonFileStatus: InitializationStatus;
|
|
@@ -22,9 +24,9 @@ export type CoderInitializationSummary = {
|
|
|
22
24
|
/**
|
|
23
25
|
* Creates or updates all coder configuration artifacts required in the current project.
|
|
24
26
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
+
* Existing scripts, settings and Books are preserved. Missing Books and helper TEAM declarations are added
|
|
28
|
+
* independently of package scripts, with unresolved artifacts reported without replacing project content.
|
|
27
29
|
*
|
|
28
30
|
* @private internal utility of `coder init` command
|
|
29
31
|
*/
|
|
30
|
-
export declare function initializeCoderProjectConfiguration(projectPath: string): Promise<CoderInitializationSummary>;
|
|
32
|
+
export declare function initializeCoderProjectConfiguration(projectPath: string, onStepCompleted?: (step: string) => void): Promise<CoderInitializationSummary>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Command as Program } from 'commander';
|
|
2
|
+
import type { $side_effect } from '../../../utils/organization/$side_effect';
|
|
3
|
+
/**
|
|
4
|
+
* Registers the repository-aware, planning-only conversation under the existing coder command group.
|
|
5
|
+
* @private internal utility of `promptbookCli`
|
|
6
|
+
*/
|
|
7
|
+
export declare function $initializeCoderPlanCommand(program: Program): $side_effect;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Protects the shared authoring Git helper's temporary directory and shell-quoted absolute message path.
|
|
3
|
+
* PRD paths themselves are checked separately by the write boundary before every save and commit.
|
|
4
|
+
* @private internal execution boundary of `coder plan`
|
|
5
|
+
*/
|
|
6
|
+
export declare function assertPlanningCommitSafe(projectPath: string): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PlanningChange } from './preparePlanningChanges';
|
|
2
|
+
/**
|
|
3
|
+
* Refuses to mix prior or concurrent user edits into a PRD that this session intends to commit.
|
|
4
|
+
* After the first save, the session's exact saved text is the baseline for subsequent revisions.
|
|
5
|
+
* @private internal execution boundary of `coder plan`
|
|
6
|
+
*/
|
|
7
|
+
export declare function assertPlanningPrdCommitScope(projectPath: string, changes: ReadonlyArray<PlanningChange>, savedContents: ReadonlyMap<string, string>, preexistingChangedPaths: ReadonlySet<string>): Promise<void>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keeps host-owned staging and Git runtime directories inside the ordinary Promptbook temporary tree.
|
|
3
|
+
* Missing directories are allowed, but no existing ancestor may redirect subsequent writes through a link.
|
|
4
|
+
* @private internal execution boundary of `coder plan`
|
|
5
|
+
*/
|
|
6
|
+
export declare function assertPlanningRuntimePath(projectPath: string, runtimePath: string): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PlanningSessionIo } from './runPlanningSession';
|
|
2
|
+
/**
|
|
3
|
+
* Builds an EOF-aware terminal. EOF or Ctrl+C also cancels an in-flight harness turn.
|
|
4
|
+
* @private internal utility of `coder plan`
|
|
5
|
+
*/
|
|
6
|
+
export declare function createPlanningTerminal(): PlanningSessionIo & {
|
|
7
|
+
readonly close: () => void;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host-owned structured output contract kept outside the PRD queue.
|
|
3
|
+
* @private internal constant of `coder plan`
|
|
4
|
+
*/
|
|
5
|
+
export declare const PLANNING_RESPONSE_SCHEMA_FILENAME = "response.schema.json";
|
|
6
|
+
/**
|
|
7
|
+
* Creates isolated runtime state in the already ignored Promptbook location, outside the PRD queue.
|
|
8
|
+
* An empty Git root prevents the harness from loading repository-local configuration and hooks.
|
|
9
|
+
* @private internal utility of `coder plan`
|
|
10
|
+
*/
|
|
11
|
+
export declare function createPlanningWorkspace(projectPath: string): Promise<string>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CoderTeamScope } from '../../../../../scripts/run-codex-prompts/team/CoderTeamRuntime';
|
|
2
|
+
import { type PlanningMessage, type PlanningReply } from './planningProtocol';
|
|
3
|
+
/**
|
|
4
|
+
* Runs the same read-only protocol throughout the delegation tree. Only the primary caller can receive proposals.
|
|
5
|
+
* @private internal utility of `coder plan`
|
|
6
|
+
*/
|
|
7
|
+
export declare function discussPlanningTurn(options: {
|
|
8
|
+
readonly projectPath: string;
|
|
9
|
+
readonly history: PlanningMessage[];
|
|
10
|
+
readonly signal: AbortSignal;
|
|
11
|
+
readonly infer: () => Promise<string>;
|
|
12
|
+
readonly team?: CoderTeamScope;
|
|
13
|
+
readonly isAdviser?: boolean;
|
|
14
|
+
readonly write?: (message: string) => void;
|
|
15
|
+
}): Promise<PlanningReply>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Captures project-owned fixture files while excluding the ignored planning runtime and linked test targets.
|
|
3
|
+
* @private test utility of `coder plan`
|
|
4
|
+
*/
|
|
5
|
+
export declare function snapshotPlanningProject(projectPath: string, directory?: string): Promise<Record<string, string>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { z as schema } from 'zod';
|
|
2
|
+
/** Read-only host requests and scoped TEAM consultations; there is deliberately no shell operation. */
|
|
3
|
+
declare const PLANNING_READ_SCHEMA: schema.ZodDiscriminatedUnion<[schema.ZodObject<{
|
|
4
|
+
kind: schema.ZodLiteral<"list">;
|
|
5
|
+
path: schema.ZodString;
|
|
6
|
+
}, schema.core.$strict>, schema.ZodObject<{
|
|
7
|
+
kind: schema.ZodLiteral<"read">;
|
|
8
|
+
path: schema.ZodString;
|
|
9
|
+
startLine: schema.ZodNumber;
|
|
10
|
+
lineCount: schema.ZodNumber;
|
|
11
|
+
}, schema.core.$strict>, schema.ZodObject<{
|
|
12
|
+
kind: schema.ZodLiteral<"search">;
|
|
13
|
+
path: schema.ZodString;
|
|
14
|
+
query: schema.ZodString;
|
|
15
|
+
}, schema.core.$strict>, schema.ZodObject<{
|
|
16
|
+
kind: schema.ZodLiteral<"git">;
|
|
17
|
+
operation: schema.ZodEnum<{
|
|
18
|
+
status: "status";
|
|
19
|
+
diff: "diff";
|
|
20
|
+
log: "log";
|
|
21
|
+
}>;
|
|
22
|
+
}, schema.core.$strict>, schema.ZodObject<{
|
|
23
|
+
message: schema.ZodString;
|
|
24
|
+
context: schema.ZodNonOptional<schema.ZodOptional<schema.ZodString>>;
|
|
25
|
+
kind: schema.ZodLiteral<"team">;
|
|
26
|
+
toolName: schema.ZodString;
|
|
27
|
+
}, schema.core.$strict>], "kind">;
|
|
28
|
+
/** Proposed changes are data, never instructions executed by a harness. */
|
|
29
|
+
declare const PLANNING_PROPOSAL_SCHEMA: schema.ZodDiscriminatedUnion<[schema.ZodObject<{
|
|
30
|
+
kind: schema.ZodLiteral<"create">;
|
|
31
|
+
title: schema.ZodString;
|
|
32
|
+
body: schema.ZodString;
|
|
33
|
+
priority: schema.ZodNumber;
|
|
34
|
+
isReady: schema.ZodBoolean;
|
|
35
|
+
}, schema.core.$strict>, schema.ZodObject<{
|
|
36
|
+
kind: schema.ZodLiteral<"edit">;
|
|
37
|
+
path: schema.ZodString;
|
|
38
|
+
find: schema.ZodString;
|
|
39
|
+
replace: schema.ZodString;
|
|
40
|
+
isReady: schema.ZodBoolean;
|
|
41
|
+
}, schema.core.$strict>], "kind">;
|
|
42
|
+
/** Strict validation prevents unsupported operations from reaching any filesystem code. */
|
|
43
|
+
declare const PLANNING_REPLY_SCHEMA: schema.ZodObject<{
|
|
44
|
+
message: schema.ZodString;
|
|
45
|
+
reads: schema.ZodArray<schema.ZodDiscriminatedUnion<[schema.ZodObject<{
|
|
46
|
+
kind: schema.ZodLiteral<"list">;
|
|
47
|
+
path: schema.ZodString;
|
|
48
|
+
}, schema.core.$strict>, schema.ZodObject<{
|
|
49
|
+
kind: schema.ZodLiteral<"read">;
|
|
50
|
+
path: schema.ZodString;
|
|
51
|
+
startLine: schema.ZodNumber;
|
|
52
|
+
lineCount: schema.ZodNumber;
|
|
53
|
+
}, schema.core.$strict>, schema.ZodObject<{
|
|
54
|
+
kind: schema.ZodLiteral<"search">;
|
|
55
|
+
path: schema.ZodString;
|
|
56
|
+
query: schema.ZodString;
|
|
57
|
+
}, schema.core.$strict>, schema.ZodObject<{
|
|
58
|
+
kind: schema.ZodLiteral<"git">;
|
|
59
|
+
operation: schema.ZodEnum<{
|
|
60
|
+
status: "status";
|
|
61
|
+
diff: "diff";
|
|
62
|
+
log: "log";
|
|
63
|
+
}>;
|
|
64
|
+
}, schema.core.$strict>, schema.ZodObject<{
|
|
65
|
+
message: schema.ZodString;
|
|
66
|
+
context: schema.ZodNonOptional<schema.ZodOptional<schema.ZodString>>;
|
|
67
|
+
kind: schema.ZodLiteral<"team">;
|
|
68
|
+
toolName: schema.ZodString;
|
|
69
|
+
}, schema.core.$strict>], "kind">>;
|
|
70
|
+
proposals: schema.ZodArray<schema.ZodDiscriminatedUnion<[schema.ZodObject<{
|
|
71
|
+
kind: schema.ZodLiteral<"create">;
|
|
72
|
+
title: schema.ZodString;
|
|
73
|
+
body: schema.ZodString;
|
|
74
|
+
priority: schema.ZodNumber;
|
|
75
|
+
isReady: schema.ZodBoolean;
|
|
76
|
+
}, schema.core.$strict>, schema.ZodObject<{
|
|
77
|
+
kind: schema.ZodLiteral<"edit">;
|
|
78
|
+
path: schema.ZodString;
|
|
79
|
+
find: schema.ZodString;
|
|
80
|
+
replace: schema.ZodString;
|
|
81
|
+
isReady: schema.ZodBoolean;
|
|
82
|
+
}, schema.core.$strict>], "kind">>;
|
|
83
|
+
}, schema.core.$strict>;
|
|
84
|
+
/**
|
|
85
|
+
* The same response contract constrains Codex output and validates it at the host boundary.
|
|
86
|
+
* @private internal constant of `coder plan`
|
|
87
|
+
*/
|
|
88
|
+
export declare const PLANNING_RESPONSE_SCHEMA: schema.core.ZodStandardJSONSchemaPayload<schema.ZodObject<{
|
|
89
|
+
message: schema.ZodString;
|
|
90
|
+
reads: schema.ZodArray<schema.ZodDiscriminatedUnion<[schema.ZodObject<{
|
|
91
|
+
kind: schema.ZodLiteral<"list">;
|
|
92
|
+
path: schema.ZodString;
|
|
93
|
+
}, schema.core.$strict>, schema.ZodObject<{
|
|
94
|
+
kind: schema.ZodLiteral<"read">;
|
|
95
|
+
path: schema.ZodString;
|
|
96
|
+
startLine: schema.ZodNumber;
|
|
97
|
+
lineCount: schema.ZodNumber;
|
|
98
|
+
}, schema.core.$strict>, schema.ZodObject<{
|
|
99
|
+
kind: schema.ZodLiteral<"search">;
|
|
100
|
+
path: schema.ZodString;
|
|
101
|
+
query: schema.ZodString;
|
|
102
|
+
}, schema.core.$strict>, schema.ZodObject<{
|
|
103
|
+
kind: schema.ZodLiteral<"git">;
|
|
104
|
+
operation: schema.ZodEnum<{
|
|
105
|
+
status: "status";
|
|
106
|
+
diff: "diff";
|
|
107
|
+
log: "log";
|
|
108
|
+
}>;
|
|
109
|
+
}, schema.core.$strict>, schema.ZodObject<{
|
|
110
|
+
message: schema.ZodString;
|
|
111
|
+
context: schema.ZodNonOptional<schema.ZodOptional<schema.ZodString>>;
|
|
112
|
+
kind: schema.ZodLiteral<"team">;
|
|
113
|
+
toolName: schema.ZodString;
|
|
114
|
+
}, schema.core.$strict>], "kind">>;
|
|
115
|
+
proposals: schema.ZodArray<schema.ZodDiscriminatedUnion<[schema.ZodObject<{
|
|
116
|
+
kind: schema.ZodLiteral<"create">;
|
|
117
|
+
title: schema.ZodString;
|
|
118
|
+
body: schema.ZodString;
|
|
119
|
+
priority: schema.ZodNumber;
|
|
120
|
+
isReady: schema.ZodBoolean;
|
|
121
|
+
}, schema.core.$strict>, schema.ZodObject<{
|
|
122
|
+
kind: schema.ZodLiteral<"edit">;
|
|
123
|
+
path: schema.ZodString;
|
|
124
|
+
find: schema.ZodString;
|
|
125
|
+
replace: schema.ZodString;
|
|
126
|
+
isReady: schema.ZodBoolean;
|
|
127
|
+
}, schema.core.$strict>], "kind">>;
|
|
128
|
+
}, schema.core.$strict>>;
|
|
129
|
+
/** @private internal type of `coder plan` */
|
|
130
|
+
export type PlanningRead = Exclude<schema.infer<typeof PLANNING_READ_SCHEMA>, {
|
|
131
|
+
kind: 'team';
|
|
132
|
+
}>;
|
|
133
|
+
/** @private internal type of `coder plan` */
|
|
134
|
+
export type PlanningProposal = schema.infer<typeof PLANNING_PROPOSAL_SCHEMA>;
|
|
135
|
+
/** @private internal type of `coder plan` */
|
|
136
|
+
export type PlanningReply = schema.infer<typeof PLANNING_REPLY_SCHEMA>;
|
|
137
|
+
/** @private internal type of `coder plan` */
|
|
138
|
+
export type PlanningMessage = {
|
|
139
|
+
readonly role: 'user' | 'planner' | 'context';
|
|
140
|
+
readonly content: string;
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* Rejects malformed or unsupported harness output before processing reads or proposed writes.
|
|
144
|
+
* @private internal utility of `coder plan`
|
|
145
|
+
*/
|
|
146
|
+
export declare function parsePlanningReply(output: string): PlanningReply;
|
|
147
|
+
/**
|
|
148
|
+
* Describes the host-mediated planning protocol, independent of the selected Book's instructions.
|
|
149
|
+
* @private internal constant of `coder plan`
|
|
150
|
+
*/
|
|
151
|
+
export declare const PLANNING_PROTOCOL: string;
|
|
152
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PlanningProposal } from './planningProtocol';
|
|
2
|
+
/**
|
|
3
|
+
* A fully rendered change retained in memory until the user explicitly saves it.
|
|
4
|
+
* @private internal type of `coder plan`
|
|
5
|
+
*/
|
|
6
|
+
export type PlanningChange = {
|
|
7
|
+
readonly path: string;
|
|
8
|
+
readonly before: string | null;
|
|
9
|
+
readonly after: string;
|
|
10
|
+
readonly draft: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Prepares an entire proposal set without writing. Exact replacements preserve unrelated content and line endings.
|
|
14
|
+
* @private internal utility of `coder plan`
|
|
15
|
+
*/
|
|
16
|
+
export declare function preparePlanningChanges(projectPath: string, proposals: ReadonlyArray<PlanningProposal>, templateOption: string | undefined): Promise<PlanningChange[]>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PlanningRead } from './planningProtocol';
|
|
2
|
+
/**
|
|
3
|
+
* Executes only the read operations in the planning protocol. Never evaluates a command from the model.
|
|
4
|
+
* @private internal utility of `coder plan`
|
|
5
|
+
*/
|
|
6
|
+
export declare function readPlanningContext(projectPath: string, request: PlanningRead): Promise<string>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves a repository path without traversing symlinks, junctions, device paths, or parent escapes.
|
|
3
|
+
* Writes additionally require an ordinary, singly linked PRD Markdown file in the active prompts directory.
|
|
4
|
+
* The queue loader reads only this directory; archives, templates and reusable context remain read-only.
|
|
5
|
+
* @private internal execution boundary of `coder plan`
|
|
6
|
+
*/
|
|
7
|
+
export declare function resolvePlanningPath(projectPath: string, path: string, isWriting?: boolean): string;
|