@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
|
@@ -11,6 +11,8 @@ export declare function findRefactorCandidates(options?: FindRefactorCandidatesO
|
|
|
11
11
|
* @public exported from `@promptbook/cli`
|
|
12
12
|
*/
|
|
13
13
|
export type FindRefactorCandidatesOptions = {
|
|
14
|
+
/** Explicit project directory retained separately from any enclosing repository. */
|
|
15
|
+
readonly projectPath?: string;
|
|
14
16
|
/**
|
|
15
17
|
* Aggressiveness level used to score candidate files.
|
|
16
18
|
*/
|
|
@@ -20,4 +20,6 @@ export type ResolvedRefactorCandidateProject = {
|
|
|
20
20
|
*
|
|
21
21
|
* @private function of findRefactorCandidates
|
|
22
22
|
*/
|
|
23
|
-
export declare function resolveRefactorCandidateProject(startDir: string
|
|
23
|
+
export declare function resolveRefactorCandidateProject(startDir: string, options?: {
|
|
24
|
+
readonly isPreservingProjectDirectory?: boolean;
|
|
25
|
+
}): Promise<ResolvedRefactorCandidateProject>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @private internal type of `ptbk coder` terminal controls
|
|
5
5
|
*/
|
|
6
|
-
export type CoderRunControlKey = 'P' | 'S' | 'X';
|
|
6
|
+
export type CoderRunControlKey = 'P' | 'S' | 'X' | 'O';
|
|
7
7
|
/**
|
|
8
8
|
* Meaning of one control answer, which decides how it is colored in the terminal.
|
|
9
9
|
*
|
|
@@ -4,4 +4,4 @@ import type { CoderRunControlKey } from './CoderRunControlFeedback';
|
|
|
4
4
|
*
|
|
5
5
|
* @private internal utility of `ptbk coder` terminal controls
|
|
6
6
|
*/
|
|
7
|
-
export declare function buildCoderRunControlKeyBadge(controlKey: CoderRunControlKey): string;
|
|
7
|
+
export declare function buildCoderRunControlKeyBadge(controlKey: CoderRunControlKey, isBracketed?: boolean): string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Listens for the terminal control keys while the plain console output is used.
|
|
3
3
|
*
|
|
4
|
-
* Every recognized key press is answered with one printed line
|
|
5
|
-
*
|
|
4
|
+
* Every recognized key press is answered with one printed line when stdout is a terminal. Redirecting
|
|
5
|
+
* stdout keeps existing stdin controls working without mixing control feedback into logs.
|
|
6
|
+
* The rich terminal UI installs its own listener in
|
|
6
7
|
* [`renderCoderRunUi`](../ui/renderCoderRunUi.ts) and shares the very same key handling through
|
|
7
8
|
* [`applyCoderRunControlKey`](./applyCoderRunControlKey.ts).
|
|
8
9
|
*
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { string_book } from '../../../src/book-2.0/agent-source/string_book';
|
|
2
|
+
import { type CoderAgentRole } from '../../../src/cli/cli-commands/coder/coderAgentRole';
|
|
3
|
+
import type { CoderTeamAgent } from '../team/CoderTeamAgent';
|
|
2
4
|
/**
|
|
3
5
|
* Source and prompt-routing references resolved from an optional `--agent` book file.
|
|
4
6
|
*/
|
|
@@ -26,6 +28,8 @@ export type ResolvedCoderAgentBook = {
|
|
|
26
28
|
* Agent data resolved from the optional `--agent` book file.
|
|
27
29
|
*/
|
|
28
30
|
export type ResolvedCoderAgent = ResolvedCoderAgentBook & {
|
|
31
|
+
/** Compiled TEAM schemas and a session-scoped loader for each adviser's own effective Book. */
|
|
32
|
+
readonly teamAgent: CoderTeamAgent;
|
|
29
33
|
/** Source with inheritance and imports applied, also used for the coder's agent visual. */
|
|
30
34
|
readonly agentSource: string_book;
|
|
31
35
|
/**
|
|
@@ -38,12 +42,18 @@ export type ResolvedCoderAgent = ResolvedCoderAgentBook & {
|
|
|
38
42
|
/**
|
|
39
43
|
* Reads an optional agent `.book` file and prepares the references that route prompts to it.
|
|
40
44
|
*
|
|
41
|
-
* Returns `undefined` when
|
|
45
|
+
* Returns `undefined` when neither an explicit path nor an execution role is provided (list has no default).
|
|
42
46
|
*/
|
|
43
|
-
export declare function resolveCoderAgentBook(agentBookReference: string | undefined, currentWorkingDirectory: string
|
|
47
|
+
export declare function resolveCoderAgentBook(agentBookReference: string | undefined, currentWorkingDirectory: string, options?: {
|
|
48
|
+
readonly defaultRole?: CoderAgentRole;
|
|
49
|
+
}): Promise<ResolvedCoderAgentBook | undefined>;
|
|
44
50
|
/**
|
|
45
|
-
* Reads
|
|
51
|
+
* Reads the explicitly selected or command-default agent Book and compiles its system message for coder prompts.
|
|
46
52
|
*
|
|
47
|
-
* Returns `undefined` when
|
|
53
|
+
* Returns `undefined` when neither an explicit path nor a command default is provided.
|
|
48
54
|
*/
|
|
49
|
-
export declare function resolveCoderAgent(agentBookReference: string | undefined, currentWorkingDirectory: string
|
|
55
|
+
export declare function resolveCoderAgent(agentBookReference: string | undefined, currentWorkingDirectory: string, options?: {
|
|
56
|
+
readonly defaultRole?: CoderAgentRole;
|
|
57
|
+
readonly isInitializationAllowed?: boolean;
|
|
58
|
+
readonly signal?: AbortSignal;
|
|
59
|
+
}): Promise<ResolvedCoderAgent | undefined>;
|
|
@@ -6,6 +6,8 @@ import { type ChildProcessWithoutNullStreams } from 'child_process';
|
|
|
6
6
|
* @private internal type of `$spawnLoggedBashScript`
|
|
7
7
|
*/
|
|
8
8
|
type SpawnLoggedBashScriptOptions = {
|
|
9
|
+
/** Per-invocation cwd, shared by the primary harness and its advisers. */
|
|
10
|
+
readonly projectPath?: string;
|
|
9
11
|
readonly scriptPath: string;
|
|
10
12
|
readonly logPath?: string;
|
|
11
13
|
/**
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Original stream identity, retained independently of the dashboard projection. */
|
|
2
|
+
export type LiveScriptOutputSource = 'stdout' | 'stderr' | 'team';
|
|
3
|
+
/** A presentation observer returns true only while it owns terminal output. */
|
|
4
|
+
type LiveScriptOutputCapture = (chunk: string, source: LiveScriptOutputSource) => boolean;
|
|
5
|
+
/** Installs the dashboard's optional presentation sink and returns its disposer. */
|
|
6
|
+
export declare function subscribeToLiveScriptOutput(capture: LiveScriptOutputCapture): () => void;
|
|
7
|
+
/** Offers an already produced chunk to the dashboard. A display failure cannot fail a script. */
|
|
8
|
+
export declare function captureLiveScriptOutput(chunk: string | (() => string), source: LiveScriptOutputSource): boolean;
|
|
9
|
+
export {};
|
|
@@ -8,6 +8,10 @@ export type ScriptOutputLineReader = {
|
|
|
8
8
|
* Returns every line which the given chunk has completed, keeping the unterminated rest for the next chunk.
|
|
9
9
|
*/
|
|
10
10
|
readCompletedLines(chunk: string): readonly string[];
|
|
11
|
+
/** Reads the pending fragment without treating it as a complete protocol record. */
|
|
12
|
+
getPendingLine(): string;
|
|
13
|
+
/** Drains a final unterminated line when a presentation capture ends. */
|
|
14
|
+
flush(): string;
|
|
11
15
|
};
|
|
12
16
|
/**
|
|
13
17
|
* Creates a line reader for one shell output stream.
|
|
@@ -13,6 +13,8 @@ export declare const SCRIPT_EXECUTION_LOG_RAW_OUTPUT_MARKER = "--- raw output --
|
|
|
13
13
|
* Environment variable that identifies the Node process responsible for a temporary harness shell.
|
|
14
14
|
*/
|
|
15
15
|
export declare const PTBK_CODER_PARENT_PROCESS_ID_ENV_NAME = "PTBK_CODER_PARENT_PROCESS_ID";
|
|
16
|
+
/** Private stdin command asks the owning wrapper to stop its actual harness job before exiting. */
|
|
17
|
+
export declare const PTBK_CODER_CANCEL_COMMAND = "PTBK_CANCEL_OWNED_HARNESS";
|
|
16
18
|
/**
|
|
17
19
|
* Shapes one bash invocation that optionally mirrors live script output into a temporary log file.
|
|
18
20
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type WorkspaceRepositoryContext } from '../../../src/cli/cli-commands/common/workspaceRepository';
|
|
1
2
|
import type { WorkingTreeChangesSnapshot } from './workingTreeChanges';
|
|
2
3
|
/**
|
|
3
4
|
* Working tree state captured right before one `ptbk coder` operation starts changing the project.
|
|
@@ -10,6 +11,8 @@ export type CoderCommitScope = {
|
|
|
10
11
|
* Project the operation runs in.
|
|
11
12
|
*/
|
|
12
13
|
readonly projectPath: string;
|
|
14
|
+
/** Enclosing Git root used for repository-relative snapshots and pathspecs. */
|
|
15
|
+
readonly repositoryRoot?: string;
|
|
13
16
|
/**
|
|
14
17
|
* Files which were already changed before the operation started.
|
|
15
18
|
*/
|
|
@@ -21,7 +24,7 @@ export type CoderCommitScope = {
|
|
|
21
24
|
* The captured scope is passed to the commit of the very same operation, which then commits exactly the files
|
|
22
25
|
* this operation has created, changed, moved or deleted.
|
|
23
26
|
*/
|
|
24
|
-
export declare function captureCoderCommitScope(
|
|
27
|
+
export declare function captureCoderCommitScope(project: string | WorkspaceRepositoryContext): Promise<CoderCommitScope>;
|
|
25
28
|
/**
|
|
26
29
|
* Resolves the repository-relative paths which one `ptbk coder` operation has really changed.
|
|
27
30
|
*
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type WorkspaceRepositoryContext } from '../../../src/cli/cli-commands/common/workspaceRepository';
|
|
1
2
|
import type { CoderCommitScope } from './coderCommitScope';
|
|
2
3
|
/**
|
|
3
4
|
* Automatic git synchronization of the project changes made by one `ptbk coder` command.
|
|
@@ -35,6 +36,7 @@ export declare const DISABLED_CODER_GIT_SYNC_OPTIONS: CoderGitSyncOptions;
|
|
|
35
36
|
export declare function $startCoderGitSync(options: {
|
|
36
37
|
readonly gitSync: CoderGitSyncOptions;
|
|
37
38
|
readonly projectPath?: string;
|
|
39
|
+
readonly workspace?: WorkspaceRepositoryContext;
|
|
38
40
|
}): Promise<CoderCommitScope>;
|
|
39
41
|
/**
|
|
40
42
|
* Pulls the latest repository changes before a `ptbk coder` command changes the project.
|
|
@@ -42,6 +44,7 @@ export declare function $startCoderGitSync(options: {
|
|
|
42
44
|
export declare function $pullCoderChanges(options: {
|
|
43
45
|
readonly gitSync: CoderGitSyncOptions;
|
|
44
46
|
readonly projectPath?: string;
|
|
47
|
+
readonly workspace?: WorkspaceRepositoryContext;
|
|
45
48
|
}): Promise<void>;
|
|
46
49
|
/**
|
|
47
50
|
* Commits - and when requested also pushes - the changes one `ptbk coder` command has just made.
|
|
@@ -53,4 +56,6 @@ export declare function $commitCoderChanges(options: {
|
|
|
53
56
|
readonly gitSync: CoderGitSyncOptions;
|
|
54
57
|
readonly commitMessage: string;
|
|
55
58
|
readonly commitScope: CoderCommitScope;
|
|
59
|
+
/** Optional explicit write set, used by long-running authoring sessions to exclude concurrent user edits. */
|
|
60
|
+
readonly relevantPaths?: ReadonlyArray<string>;
|
|
56
61
|
}): Promise<void>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { WorkspaceRepositoryContext } from '../../../src/cli/cli-commands/common/workspaceRepository';
|
|
1
2
|
/**
|
|
2
3
|
* Commits newly initialized, non-ignored agent books before the coder's clean-tree checkpoint.
|
|
3
4
|
* Only books created by this run are eligible; existing books and unrelated changes remain outside the commit.
|
|
4
5
|
*/
|
|
5
|
-
export declare function commitInitializedAgentBooks(projectPath: string, createdAgentBookPaths: ReadonlyArray<string
|
|
6
|
+
export declare function commitInitializedAgentBooks(projectPath: string, createdAgentBookPaths: ReadonlyArray<string>, workspace?: WorkspaceRepositoryContext): Promise<void>;
|
|
@@ -5,4 +5,4 @@ import type { CoderIsolationWorktree } from './CoderIsolationWorktree';
|
|
|
5
5
|
* The copy is intentionally a snapshot: changing the environment inside the worktree never leaks
|
|
6
6
|
* back into the project the coder was started from.
|
|
7
7
|
*/
|
|
8
|
-
export declare function copyCoderIsolationEnvironment(worktree: CoderIsolationWorktree): Promise<void>;
|
|
8
|
+
export declare function copyCoderIsolationEnvironment(worktree: CoderIsolationWorktree, isolatedProjectPath?: string): Promise<void>;
|
|
@@ -7,6 +7,8 @@ type CreateCoderIsolationWorktreeOptions = {
|
|
|
7
7
|
* Absolute path of the project the coder was started from.
|
|
8
8
|
*/
|
|
9
9
|
readonly projectPath: string;
|
|
10
|
+
/** Enclosing Git root, which can differ from the requested project directory. */
|
|
11
|
+
readonly repositoryRoot?: string;
|
|
10
12
|
/**
|
|
11
13
|
* Name of the isolated task, for example `2026-07-0700-ptbk-coder-timing`.
|
|
12
14
|
*/
|
|
@@ -7,6 +7,8 @@ export type FindUnwrittenPromptsOptions = {
|
|
|
7
7
|
* @default 0
|
|
8
8
|
*/
|
|
9
9
|
readonly priority?: number;
|
|
10
|
+
/** Resolved project directory supplied by the CLI. */
|
|
11
|
+
readonly projectPath?: string;
|
|
10
12
|
};
|
|
11
13
|
/**
|
|
12
14
|
* Lists and prints all prompt sections that still need to be authored (contain `@@@` placeholder).
|
|
@@ -6,6 +6,8 @@ import type { PromptRunnerIdentity } from '../prompts/isPromptCompatibleWithRunn
|
|
|
6
6
|
* @public exported from `@promptbook/cli`
|
|
7
7
|
*/
|
|
8
8
|
export type ListCoderPromptsOptions = PriorityFilterInput & {
|
|
9
|
+
/** Resolved project directory supplied by the CLI. */
|
|
10
|
+
readonly projectPath?: string;
|
|
9
11
|
/**
|
|
10
12
|
* Optional harness, model and Book-agent selection used to omit prompts routed to other runners.
|
|
11
13
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PromptRunnerHarnessName } from '../../../src/cli/cli-commands/common/promptRunnerCliOptions';
|
|
1
2
|
import type { RunOptions } from '../cli/RunOptions';
|
|
2
3
|
import type { PromptRunnerMetadata } from '../common/PromptRunnerMetadata';
|
|
3
4
|
import type { PromptRunner } from '../runners/types/PromptRunner';
|
|
@@ -25,4 +26,14 @@ type PromptRunnerResolution = {
|
|
|
25
26
|
* @private function of runCodexPrompts
|
|
26
27
|
*/
|
|
27
28
|
export declare function resolvePromptRunner(options: PromptRunnerSelectionOptions): PromptRunnerResolution;
|
|
29
|
+
/**
|
|
30
|
+
* Uses the current flagship when no model is selected, while preserving explicit overrides.
|
|
31
|
+
*
|
|
32
|
+
* `--model default` keeps the harness's own configured model where supported. Gemini, Qwen and Cline
|
|
33
|
+
* require a concrete model in their adapters, so the sentinel selects their shared default instead.
|
|
34
|
+
* Read-only previews use the same policy without constructing a harness runner.
|
|
35
|
+
*
|
|
36
|
+
* @private internal utility of Coder execution and previews
|
|
37
|
+
*/
|
|
38
|
+
export declare function resolveRunnerModel(agentName: PromptRunnerHarnessName, providedModel?: string): string | undefined;
|
|
28
39
|
export {};
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import type { PromptFile } from './types/PromptFile';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* HTML comment which excludes a Markdown file from all `ptbk coder` queues.
|
|
4
|
+
*
|
|
5
|
+
* @private internal constant of `loadPromptFiles`
|
|
4
6
|
*/
|
|
5
|
-
export declare
|
|
7
|
+
export declare const PTBK_CODER_IGNORE_MARKER = "<!--ptbk-coder-ignore-->";
|
|
8
|
+
/**
|
|
9
|
+
* Loads top-level PRDs, excluding the README and files marked for `ptbk coder` to ignore.
|
|
10
|
+
*/
|
|
11
|
+
export declare function loadPromptFiles(promptsDir: string, options?: {
|
|
12
|
+
readonly isMissingDirectoryAllowed?: boolean;
|
|
13
|
+
}): Promise<PromptFile[]>;
|
|
@@ -8,6 +8,8 @@ import type { ClaudeCodeRunnerOptions } from './ClaudeCodeRunnerOptions';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class ClaudeCodeRunner implements PromptRunner {
|
|
10
10
|
private readonly options;
|
|
11
|
+
/** TEAM uses this harness's existing command tool, with the same permissions as its caller. */
|
|
12
|
+
readonly teamCapability: "command-tools";
|
|
11
13
|
readonly name = "claude-code";
|
|
12
14
|
private subscriptionUsage;
|
|
13
15
|
/**
|
|
@@ -7,6 +7,8 @@ import type { ClineRunnerOptions } from './ClineRunnerOptions';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class ClineRunner implements PromptRunner {
|
|
9
9
|
private readonly options;
|
|
10
|
+
/** TEAM uses this harness's existing command tool, with the same permissions as its caller. */
|
|
11
|
+
readonly teamCapability: "command-tools";
|
|
10
12
|
readonly name = "cline";
|
|
11
13
|
/**
|
|
12
14
|
* Creates a new Cline runner.
|
|
@@ -11,6 +11,8 @@ export declare const DEFAULT_GEMINI_MODEL: "gemini-3.8-flash";
|
|
|
11
11
|
*/
|
|
12
12
|
export declare class GeminiRunner implements PromptRunner {
|
|
13
13
|
private readonly options;
|
|
14
|
+
/** TEAM uses this harness's existing command tool, with the same permissions as its caller. */
|
|
15
|
+
readonly teamCapability: "command-tools";
|
|
14
16
|
readonly name = "gemini";
|
|
15
17
|
/**
|
|
16
18
|
* Creates a new Gemini runner.
|
|
@@ -7,6 +7,8 @@ import type { GitHubCopilotRunnerOptions } from './GitHubCopilotRunnerOptions';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class GitHubCopilotRunner implements PromptRunner {
|
|
9
9
|
private readonly options;
|
|
10
|
+
/** TEAM uses this harness's existing command tool, with the same permissions as its caller. */
|
|
11
|
+
readonly teamCapability: "command-tools";
|
|
10
12
|
readonly name = "github-copilot";
|
|
11
13
|
/**
|
|
12
14
|
* Creates a new GitHub Copilot runner.
|
|
@@ -8,6 +8,8 @@ import type { OpenAiCodexRunnerOptions } from './OpenAiCodexRunnerOptions';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class OpenAiCodexRunner implements PromptRunner {
|
|
10
10
|
private readonly options;
|
|
11
|
+
/** TEAM uses this harness's existing command tool, with the same permissions as its caller. */
|
|
12
|
+
readonly teamCapability: "command-tools";
|
|
11
13
|
readonly name = "codex";
|
|
12
14
|
private readonly rateLimitBackoff;
|
|
13
15
|
/**
|
|
@@ -7,6 +7,8 @@ import type { OpencodeRunnerOptions } from './OpencodeRunnerOptions';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class OpencodeRunner implements PromptRunner {
|
|
9
9
|
private readonly options;
|
|
10
|
+
/** TEAM uses this harness's existing command tool, with the same permissions as its caller. */
|
|
11
|
+
readonly teamCapability: "command-tools";
|
|
10
12
|
readonly name = "opencode";
|
|
11
13
|
/**
|
|
12
14
|
* Creates a new Opencode runner.
|
|
@@ -11,6 +11,8 @@ export declare const DEFAULT_QWEN_CODE_MODEL: "qwen3.8-max";
|
|
|
11
11
|
*/
|
|
12
12
|
export declare class QwenCodeRunner implements PromptRunner {
|
|
13
13
|
private readonly options;
|
|
14
|
+
/** TEAM uses this harness's existing command tool, with the same permissions as its caller. */
|
|
15
|
+
readonly teamCapability: "command-tools";
|
|
14
16
|
readonly name = "qwen-code";
|
|
15
17
|
/**
|
|
16
18
|
* Creates a new Qwen Code runner.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WorkspaceRepositoryContext } from '../../../src/cli/cli-commands/common/workspaceRepository';
|
|
1
2
|
import type { number_port } from '../../../src/types/number_positive';
|
|
2
3
|
import type { PriorityFilter } from '../prompts/priorityFilter';
|
|
3
4
|
import type { CoderRunUiState } from '../ui/CoderRunUiState';
|
|
@@ -15,6 +16,8 @@ export type CoderHttpServerHandle = {
|
|
|
15
16
|
* @private internal type of `ptbk coder server`
|
|
16
17
|
*/
|
|
17
18
|
export type StartCoderHttpServerOptions = {
|
|
19
|
+
/** Project and enclosing repository resolved before server startup. */
|
|
20
|
+
readonly workspace?: WorkspaceRepositoryContext;
|
|
18
21
|
readonly port: number_port;
|
|
19
22
|
readonly priorityFilter: PriorityFilter;
|
|
20
23
|
readonly serverUrl: string;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { Usage } from '../../../src/execution/Usage';
|
|
2
|
+
import type { CoderTeamAgent } from './CoderTeamAgent';
|
|
3
|
+
/** An attributed tool result returned to the requesting Book, including failures. */
|
|
4
|
+
export type CoderTeamResult = {
|
|
5
|
+
readonly sessionId: string;
|
|
6
|
+
readonly taskId: string;
|
|
7
|
+
readonly invocationId: string;
|
|
8
|
+
readonly callerInvocationId: string;
|
|
9
|
+
readonly teammate: {
|
|
10
|
+
readonly label: string;
|
|
11
|
+
readonly url?: string;
|
|
12
|
+
readonly toolName: string;
|
|
13
|
+
};
|
|
14
|
+
readonly request: string;
|
|
15
|
+
readonly response: string;
|
|
16
|
+
readonly error?: string;
|
|
17
|
+
};
|
|
18
|
+
/** Events use the existing runtime trace transport, without adding a UI or a second task queue. */
|
|
19
|
+
export type CoderTeamEvent = {
|
|
20
|
+
readonly type: 'team_request' | 'team_result' | 'team_activity' | 'team_usage' | 'team_summary';
|
|
21
|
+
readonly sessionId: string;
|
|
22
|
+
readonly taskId: string;
|
|
23
|
+
readonly invocationId: string;
|
|
24
|
+
readonly callerInvocationId?: string;
|
|
25
|
+
readonly agent: string;
|
|
26
|
+
readonly data: unknown;
|
|
27
|
+
};
|
|
28
|
+
/** A model may invoke only tools declared by its current Book. Ancestry and permissions stay host-owned. */
|
|
29
|
+
export type CoderTeamScope = {
|
|
30
|
+
readonly agent: CoderTeamAgent;
|
|
31
|
+
readonly invocationId: string;
|
|
32
|
+
readonly signal: AbortSignal;
|
|
33
|
+
readonly call: (toolName: string, argumentsValue: unknown) => Promise<CoderTeamResult>;
|
|
34
|
+
readonly activity: (data: unknown) => Promise<void>;
|
|
35
|
+
};
|
|
36
|
+
/** Inference receives the adviser's own Book and only the question/context selected by its caller. */
|
|
37
|
+
export type CoderTeamInference = {
|
|
38
|
+
readonly scope: CoderTeamScope;
|
|
39
|
+
readonly message: string;
|
|
40
|
+
readonly context?: string;
|
|
41
|
+
/** Report each raw inference once, including successful calls followed by malformed output. */
|
|
42
|
+
readonly reportUsage: (usage: Usage) => void;
|
|
43
|
+
};
|
|
44
|
+
/** Shared executor contract for a coding harness or the host-mediated planning loop. */
|
|
45
|
+
export type CoderTeamExecutor = (request: CoderTeamInference) => Promise<{
|
|
46
|
+
answer: string;
|
|
47
|
+
usage?: Usage;
|
|
48
|
+
}>;
|
|
49
|
+
/** A session-local delegation tree. No messages, answers, credentials or definitions are cached globally. */
|
|
50
|
+
export declare class CoderTeamRuntime {
|
|
51
|
+
private readonly options;
|
|
52
|
+
readonly sessionId: `${string}-${string}-${string}-${string}-${string}`;
|
|
53
|
+
readonly root: CoderTeamScope;
|
|
54
|
+
private readonly controller;
|
|
55
|
+
private readonly usages;
|
|
56
|
+
private callCount;
|
|
57
|
+
private readonly pending;
|
|
58
|
+
private readonly executions;
|
|
59
|
+
private closing;
|
|
60
|
+
private isClosed;
|
|
61
|
+
private readonly cancel;
|
|
62
|
+
/** Creates a runtime but performs no adviser inference until a tool is called. */
|
|
63
|
+
constructor(options: {
|
|
64
|
+
readonly agent: CoderTeamAgent;
|
|
65
|
+
readonly taskId: string;
|
|
66
|
+
readonly execute: CoderTeamExecutor;
|
|
67
|
+
readonly signal?: AbortSignal;
|
|
68
|
+
readonly timeoutMs?: number;
|
|
69
|
+
readonly onEvent?: (event: CoderTeamEvent) => void | Promise<void>;
|
|
70
|
+
});
|
|
71
|
+
/** Adds each actual adviser inference once; nested results never include their children's usage again. */
|
|
72
|
+
get usage(): Usage;
|
|
73
|
+
/** Revokes every outstanding child when the originating task ends, fails or is cancelled. */
|
|
74
|
+
close(): Promise<void>;
|
|
75
|
+
/** Drains cancellation once; late replies cannot mutate the finished session or its trace. */
|
|
76
|
+
private closeExecutions;
|
|
77
|
+
/** Creates an immutable capability view for one position in the delegation tree. */
|
|
78
|
+
private createScope;
|
|
79
|
+
/** Validates the call before loading a Book or starting any inference. */
|
|
80
|
+
private consult;
|
|
81
|
+
/** Links cancellation and timeout to the executor, including lazy remote Book resolution and nested calls. */
|
|
82
|
+
private executeBounded;
|
|
83
|
+
/** Accounts for actual model work even when parsing or execution fails, without summing nested totals twice. */
|
|
84
|
+
private executeAgent;
|
|
85
|
+
/** Emits attribution on every trace event without passing session internals to a remote Book. */
|
|
86
|
+
private emit;
|
|
87
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { z as schema } from 'zod';
|
|
2
|
+
/** Consultation input is data; callers cannot supply credentials, policy, paths or an agent definition. */
|
|
3
|
+
export declare const CODER_TEAM_ARGUMENTS_SCHEMA: schema.ZodObject<{
|
|
4
|
+
message: schema.ZodString;
|
|
5
|
+
context: schema.ZodOptional<schema.ZodString>;
|
|
6
|
+
}, schema.core.$strict>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ResolvedLocalAgentSource } from '../../../src/cli/cli-commands/common/resolveLocalAgentSource';
|
|
2
|
+
import type { CoderTeamAgent } from './CoderTeamAgent';
|
|
3
|
+
/** Compiles the same TEAM schemas as Agents Server without registering process-global tool implementations. */
|
|
4
|
+
export declare function compileCoderTeamAgent(source: ResolvedLocalAgentSource): Promise<CoderTeamAgent>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PromptRunner } from '../runners/types/PromptRunner';
|
|
2
|
+
import { type CoderTeamEvent } from './CoderTeamRuntime';
|
|
3
|
+
/**
|
|
4
|
+
* Adds a scoped consultation transport around an existing adapter. Both primary and advisers keep exactly
|
|
5
|
+
* that adapter's permissions and authentication. Only the enclosing Coder round owns tests, queues and Git operations.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createCoderTeamPromptRunner(runner: PromptRunner, agentBookReference?: string): PromptRunner;
|
|
8
|
+
/** Appends attributed machine-readable events to the existing runtime log consumed by run traces. */
|
|
9
|
+
export declare function appendCoderTeamEvent(logPath: string | undefined, event: CoderTeamEvent): Promise<void>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CoderTeamScope } from './CoderTeamRuntime';
|
|
2
|
+
/** A revocable command-tool transport shared by all Coder harnesses with shell execution. */
|
|
3
|
+
export type CoderTeamBridge = {
|
|
4
|
+
readonly clientPath: string;
|
|
5
|
+
readonly instructions: string;
|
|
6
|
+
readonly getAnswer: () => string;
|
|
7
|
+
readonly assertConnected: () => void;
|
|
8
|
+
readonly close: () => Promise<void>;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Exposes only one invocation's tools over authenticated loopback. A shell call waits for the answer and
|
|
12
|
+
* returns it on stdout as its ordinary tool result. No global harness configuration or environment is changed.
|
|
13
|
+
*/
|
|
14
|
+
export declare function startCoderTeamBridge(scope: CoderTeamScope, isAdviser?: boolean): Promise<CoderTeamBridge>;
|
|
@@ -8,6 +8,9 @@ import type { PromptStats } from '../prompts/types/PromptStats';
|
|
|
8
8
|
import type { HarnessSubscriptionUsage } from '../runners/types/HarnessSubscriptionUsage';
|
|
9
9
|
import type { CoderRunAgentVisual } from './buildCoderRunAgentVisual';
|
|
10
10
|
import type { AgentRunMessagePreviewSection, AgentRunStatusTableRow } from './buildCoderRunUiFrame';
|
|
11
|
+
import type { LiveScriptOutputSource } from '../common/runGoScript/captureLiveScriptOutput';
|
|
12
|
+
import type { CoderOutputMode } from './output/CoderOutputEvent';
|
|
13
|
+
import { CoderRunOutput } from './output/CoderRunOutput';
|
|
11
14
|
/**
|
|
12
15
|
* Execution phase of the coder run process.
|
|
13
16
|
*
|
|
@@ -59,6 +62,10 @@ export declare class CoderRunUiState extends EventEmitter {
|
|
|
59
62
|
subscriptionUsage: HarnessSubscriptionUsage | undefined;
|
|
60
63
|
pendingEnterLabel: string | undefined;
|
|
61
64
|
agentOutputLines: string[];
|
|
65
|
+
/** Both projections share one invocation-local buffer; the selected view survives task changes. */
|
|
66
|
+
output: CoderRunOutput;
|
|
67
|
+
outputMode: CoderOutputMode;
|
|
68
|
+
outputScrollOffset: number;
|
|
62
69
|
phase: CoderRunPhase;
|
|
63
70
|
statusMessage: string;
|
|
64
71
|
errors: string[];
|
|
@@ -117,7 +124,15 @@ export declare class CoderRunUiState extends EventEmitter {
|
|
|
117
124
|
/**
|
|
118
125
|
* Appends raw agent output text, keeping only the last `MAX_AGENT_OUTPUT_LINES`.
|
|
119
126
|
*/
|
|
120
|
-
addAgentOutput(text: string): void;
|
|
127
|
+
addAgentOutput(text: string, kind?: 'status' | 'warning'): void;
|
|
128
|
+
/** Receives an original harness chunk, separately from runner console messages. */
|
|
129
|
+
addScriptOutput(text: string, source: LiveScriptOutputSource): void;
|
|
130
|
+
/** Flushes final fragments without changing the selected output mode. */
|
|
131
|
+
flushOutput(): void;
|
|
132
|
+
/** Changes presentation only. Neither the queue nor any runner observes this selection. */
|
|
133
|
+
toggleOutputMode(): void;
|
|
134
|
+
/** Scrolls the bounded output history; End returns to live following. */
|
|
135
|
+
scrollOutput(lineCount: number, maximumOffset?: number): void;
|
|
121
136
|
/**
|
|
122
137
|
* Transitions the execution phase shown in the UI.
|
|
123
138
|
*/
|
|
@@ -3,6 +3,8 @@ import type { CoderRunPauseState } from '../common/waitForPause';
|
|
|
3
3
|
import type { HarnessSubscriptionUsage } from '../runners/types/HarnessSubscriptionUsage';
|
|
4
4
|
import type { CoderRunConfig, CoderRunPhase, CoderRunProgressSnapshot } from './CoderRunUiState';
|
|
5
5
|
import type { CoderRunAgentVisual } from './buildCoderRunAgentVisual';
|
|
6
|
+
import type { CoderRunOutput } from './output/CoderRunOutput';
|
|
7
|
+
import type { CoderOutputMode } from './output/CoderOutputEvent';
|
|
6
8
|
/**
|
|
7
9
|
* Shared pause-state shape between the renderer and the frame builder.
|
|
8
10
|
*/
|
|
@@ -44,6 +46,10 @@ export type BuildCoderRunUiFrameOptions = {
|
|
|
44
46
|
readonly agentStatusTableRows?: readonly AgentRunStatusTableRow[];
|
|
45
47
|
readonly pendingEnterLabel?: string;
|
|
46
48
|
readonly agentOutputLines: readonly string[];
|
|
49
|
+
/** Presentation-only state; omitted by dashboards which use the older plain output panel. */
|
|
50
|
+
readonly output?: CoderRunOutput;
|
|
51
|
+
readonly outputMode?: CoderOutputMode;
|
|
52
|
+
readonly outputScrollOffset?: number;
|
|
47
53
|
readonly errors: readonly string[];
|
|
48
54
|
readonly progress: CoderRunProgressSnapshot;
|
|
49
55
|
/**
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Keeps controls reachable in short terminals and makes the entire existing dashboard scrollable. */
|
|
2
|
+
export declare function buildCoderRunUiViewport(lines: string[], columns: number, rows: number, scrollOffset: number): {
|
|
3
|
+
lines: string[];
|
|
4
|
+
maxScrollOffset: number;
|
|
5
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CoderRunControlFeedbackNotice } from '../common/CoderRunControlFeedback';
|
|
2
2
|
import type { CoderRunPauseState } from '../common/waitForPause';
|
|
3
3
|
import type { CoderRunPhase } from './CoderRunUiState';
|
|
4
|
+
import type { CoderOutputMode } from './output/CoderOutputEvent';
|
|
4
5
|
/**
|
|
5
6
|
* Maximum number of output lines reserved for agent output in the UI.
|
|
6
7
|
*/
|
|
@@ -51,7 +52,7 @@ export declare function buildTerminalUrlLink(url: string, availableWidth: number
|
|
|
51
52
|
/**
|
|
52
53
|
* Builds the colored phase badge shown in the session box.
|
|
53
54
|
*/
|
|
54
|
-
export declare function buildPausePresentation(phase: CoderRunPhase, pauseState: CoderRunPauseState, pauseTargetLabel: string, statusMessage: string): PausePresentation;
|
|
55
|
+
export declare function buildPausePresentation(phase: CoderRunPhase, pauseState: CoderRunPauseState, pauseTargetLabel: string, statusMessage: string, isBracketed?: boolean): PausePresentation;
|
|
55
56
|
/**
|
|
56
57
|
* Builds the progress bar shown in the session box.
|
|
57
58
|
*/
|
|
@@ -73,6 +74,7 @@ export declare function buildCoderRunControlPills(options: {
|
|
|
73
74
|
readonly pendingEnterLabel: string | undefined;
|
|
74
75
|
readonly isEndAfterCurrentPromptRequested: boolean;
|
|
75
76
|
readonly sessionTotal: number;
|
|
77
|
+
readonly outputMode?: CoderOutputMode;
|
|
76
78
|
}): readonly string[];
|
|
77
79
|
/**
|
|
78
80
|
* Builds the body of the `Controls` box.
|
|
@@ -83,4 +85,5 @@ export declare function buildCoderRunControlPills(options: {
|
|
|
83
85
|
export declare function buildControlsBoxLines(options: {
|
|
84
86
|
readonly controlPills: readonly string[];
|
|
85
87
|
readonly controlFeedback: CoderRunControlFeedbackNotice | undefined;
|
|
88
|
+
readonly bodyWidth?: number;
|
|
86
89
|
}): readonly string[];
|
|
@@ -28,6 +28,10 @@ export declare function fitPlainText(text: string, width: number): string;
|
|
|
28
28
|
* @private internal utility of coder run UI
|
|
29
29
|
*/
|
|
30
30
|
export declare function visibleLength(text: string): number;
|
|
31
|
+
/** Wraps sanitized display text without splitting surrogate pairs, combining marks or emoji sequences. */
|
|
32
|
+
export declare function wrapTerminalText(text: string, width: number): string[];
|
|
33
|
+
/** Harness control characters may be retained in logs but cannot move the dashboard cursor. */
|
|
34
|
+
export declare function sanitizeTerminalText(text: string): string;
|
|
31
35
|
/**
|
|
32
36
|
* Strips ANSI escape codes from a string.
|
|
33
37
|
*
|