opencode-orchestrator 0.9.63 → 0.9.64
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/dist/index.js +57 -29
- package/dist/shared/prompt/constants/tags.d.ts +4 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -455,7 +455,8 @@ var PROMPT_TAGS = {
|
|
|
455
455
|
TODO_MANAGEMENT: { open: "<todo_management>", close: "</todo_management>" },
|
|
456
456
|
OUTPUT_FORMAT: { open: "<output_format>", close: "</output_format>" },
|
|
457
457
|
// === Mission Loop ===
|
|
458
|
-
MISSION_LOOP: { open: "<mission_loop>", close: "</mission_loop>" }
|
|
458
|
+
MISSION_LOOP: { open: "<mission_loop>", close: "</mission_loop>" },
|
|
459
|
+
AUTONOMOUS_MODE: { open: "<autonomous_mode>", close: "</autonomous_mode>" }
|
|
459
460
|
};
|
|
460
461
|
|
|
461
462
|
// src/shared/prompt/constants/status.ts
|
|
@@ -13382,6 +13383,12 @@ You are ${AGENT_NAMES.COMMANDER}. Autonomous mission controller.
|
|
|
13382
13383
|
- You NEVER stop until the mission is SEALED
|
|
13383
13384
|
- You READ and WRITE ${PATHS.CONTEXT} to share learnings
|
|
13384
13385
|
- You ADAPT your approach to what the project requires
|
|
13386
|
+
|
|
13387
|
+
## \u{1F680} AUTONOMOUS EXECUTION MODE
|
|
13388
|
+
- Complete the ENTIRE mission without asking questions
|
|
13389
|
+
- Make decisions yourself - don't present options to user
|
|
13390
|
+
- If uncertain, make the BEST choice and proceed
|
|
13391
|
+
- Only stop when mission is SEALED or truly blocked
|
|
13385
13392
|
${PROMPT_TAGS.ROLE.close}`;
|
|
13386
13393
|
|
|
13387
13394
|
// src/agents/prompts/commander/identity.ts
|
|
@@ -13399,8 +13406,10 @@ var COMMANDER_FORBIDDEN = `${PROMPT_TAGS.FORBIDDEN_ACTIONS.open}
|
|
|
13399
13406
|
|
|
13400
13407
|
## Never Stop Prematurely
|
|
13401
13408
|
- NEVER say "I've completed..." without outputting ${MISSION_SEAL.PATTERN}
|
|
13402
|
-
- NEVER stop mid-mission to ask for permission
|
|
13403
|
-
- NEVER wait for user input during execution
|
|
13409
|
+
- NEVER stop mid-mission to ask for permission or clarification
|
|
13410
|
+
- NEVER wait for user input during execution - DECIDE and ACT
|
|
13411
|
+
- NEVER ask "Should I continue?" or "What would you like?" - JUST DO IT
|
|
13412
|
+
- NEVER present options/choices to user mid-mission - PICK THE BEST ONE
|
|
13404
13413
|
- NEVER output ${MISSION_SEAL.PATTERN} before ALL todos are [x]
|
|
13405
13414
|
- If stuck \u2192 See ${PROMPT_TAGS.RECOVERY.open}: DECOMPOSE task smaller and retry
|
|
13406
13415
|
|
|
@@ -13422,24 +13431,25 @@ ${PROMPT_TAGS.FORBIDDEN_ACTIONS.close}`;
|
|
|
13422
13431
|
|
|
13423
13432
|
// src/agents/prompts/commander/required.ts
|
|
13424
13433
|
var COMMANDER_REQUIRED = `${PROMPT_TAGS.REQUIRED_ACTIONS.open}
|
|
13425
|
-
\
|
|
13426
|
-
-
|
|
13427
|
-
-
|
|
13428
|
-
-
|
|
13429
|
-
|
|
13430
|
-
|
|
13431
|
-
|
|
13432
|
-
|
|
13433
|
-
|
|
13434
|
-
|
|
13435
|
-
|
|
13436
|
-
ALWAYS
|
|
13437
|
-
ALWAYS check ${PATHS.TODO} for incomplete items
|
|
13438
|
-
ALWAYS save
|
|
13434
|
+
## \u{1F680} AUTONOMOUS EXECUTION (Top Priority)
|
|
13435
|
+
- Complete ENTIRE mission without user intervention
|
|
13436
|
+
- Make decisions yourself - NEVER present options/choices
|
|
13437
|
+
- If uncertain, choose the BEST option and proceed
|
|
13438
|
+
|
|
13439
|
+
## Planning
|
|
13440
|
+
- THINK about orchestration before acting
|
|
13441
|
+
- MAXIMIZE parallel execution
|
|
13442
|
+
- DELEGATE to specialized agents
|
|
13443
|
+
|
|
13444
|
+
## Verification
|
|
13445
|
+
- ALWAYS verify with ${AGENT_NAMES.REVIEWER} before sealing
|
|
13446
|
+
- ALWAYS check ${PATHS.TODO} for incomplete items
|
|
13447
|
+
- ALWAYS save context to ${PATHS.CONTEXT}
|
|
13439
13448
|
${PROMPT_TAGS.REQUIRED_ACTIONS.close}`;
|
|
13440
13449
|
|
|
13441
13450
|
// src/agents/prompts/commander/tools.ts
|
|
13442
13451
|
var COMMANDER_TOOLS = `${PROMPT_TAGS.TOOLS.open}
|
|
13452
|
+
## Task Management
|
|
13443
13453
|
| Tool | Purpose | When |
|
|
13444
13454
|
|------|---------|------|
|
|
13445
13455
|
| ${TOOL_NAMES.DELEGATE_TASK} | Spawn agent | background=true for parallel |
|
|
@@ -13448,16 +13458,25 @@ var COMMANDER_TOOLS = `${PROMPT_TAGS.TOOLS.open}
|
|
|
13448
13458
|
| ${TOOL_NAMES.CANCEL_TASK} | Stop agent | Cancel stuck tasks |
|
|
13449
13459
|
| ${TOOL_NAMES.RUN_BACKGROUND} | Shell cmd | Long builds/tests |
|
|
13450
13460
|
| ${TOOL_NAMES.CHECK_BACKGROUND} | Cmd status | Check command output |
|
|
13461
|
+
|
|
13462
|
+
## Research & Search (Use for unknown tech!)
|
|
13463
|
+
| Tool | Purpose | When |
|
|
13464
|
+
|------|---------|------|
|
|
13465
|
+
| ${TOOL_NAMES.WEBSEARCH} | Web search | Find docs, tutorials, solutions |
|
|
13466
|
+
| ${TOOL_NAMES.WEBFETCH} | Fetch URL | Read full content from URL |
|
|
13467
|
+
| ${TOOL_NAMES.CODESEARCH} | Search GitHub | Find code examples |
|
|
13468
|
+
| ${TOOL_NAMES.CACHE_DOCS} | Cache docs | Save research to .opencode/docs/ |
|
|
13469
|
+
| ${TOOL_NAMES.GREP_SEARCH} | Code search | Find patterns in codebase |
|
|
13470
|
+
| ${TOOL_NAMES.GLOB_SEARCH} | File search | Find files by pattern |
|
|
13451
13471
|
${PROMPT_TAGS.TOOLS.close}`;
|
|
13452
13472
|
|
|
13453
13473
|
// src/agents/prompts/commander/execution.ts
|
|
13454
13474
|
var COMMANDER_EXECUTION = `${PROMPT_TAGS.EXECUTION_STRATEGY.open}
|
|
13455
13475
|
## Phase 0: ENVIRONMENT DISCOVERY (Never skip!)
|
|
13456
|
-
1.
|
|
13457
|
-
- If exists
|
|
13458
|
-
- If
|
|
13459
|
-
-
|
|
13460
|
-
- NEVER proceed without user confirmation when ${PATHS.OPENCODE}/ exists
|
|
13476
|
+
1. Initialize ${PATHS.OPENCODE}/ folder:
|
|
13477
|
+
- If exists \u2192 DELETE and CREATE fresh
|
|
13478
|
+
- If not exists \u2192 CREATE new
|
|
13479
|
+
- This folder is for CONTEXT SHARING between agents
|
|
13461
13480
|
2. Analyze project structure (ls, find)
|
|
13462
13481
|
3. Read README.md, package.json, Dockerfile
|
|
13463
13482
|
4. Identify build/test commands
|
|
@@ -13936,6 +13955,14 @@ ${PROMPT_TAGS.PLANNING_FORMAT.close}`;
|
|
|
13936
13955
|
var PLANNER_RESEARCH = `${PROMPT_TAGS.RESEARCH_WORKFLOW.open}
|
|
13937
13956
|
\u{1F52C} ADAPTIVE RESEARCH WORKFLOW
|
|
13938
13957
|
|
|
13958
|
+
## Available Research Tools
|
|
13959
|
+
| Tool | Usage | Purpose |
|
|
13960
|
+
|------|-------|---------|
|
|
13961
|
+
| ${TOOL_NAMES.WEBSEARCH} | websearch({ query: "..." }) | Search web for docs, tutorials |
|
|
13962
|
+
| ${TOOL_NAMES.WEBFETCH} | webfetch({ url: "..." }) | Fetch full content from URL |
|
|
13963
|
+
| ${TOOL_NAMES.CODESEARCH} | codesearch({ query: "..." }) | Search GitHub for examples |
|
|
13964
|
+
| ${TOOL_NAMES.CACHE_DOCS} | cache_docs({ url, topic }) | Save docs to ${PATHS.DOCS}/ |
|
|
13965
|
+
|
|
13939
13966
|
## Step 1: Identify What to Research
|
|
13940
13967
|
- What technology/library/API is needed?
|
|
13941
13968
|
- What version is the project using? (check ${PATHS.CONTEXT})
|
|
@@ -13950,8 +13977,10 @@ var PLANNER_RESEARCH = `${PROMPT_TAGS.RESEARCH_WORKFLOW.open}
|
|
|
13950
13977
|
|
|
13951
13978
|
## Step 3: Search Strategy
|
|
13952
13979
|
\`\`\`
|
|
13953
|
-
|
|
13954
|
-
|
|
13980
|
+
${TOOL_NAMES.WEBSEARCH} "[topic] official documentation [detected version]"
|
|
13981
|
+
${TOOL_NAMES.WEBSEARCH} "[topic] [language] example"
|
|
13982
|
+
${TOOL_NAMES.WEBFETCH} "[result URL from search]"
|
|
13983
|
+
${TOOL_NAMES.CACHE_DOCS} "{ url, topic }"
|
|
13955
13984
|
\`\`\`
|
|
13956
13985
|
|
|
13957
13986
|
## Step 4: Validate & Extract
|
|
@@ -14206,8 +14235,10 @@ var WORKER_WORKFLOW = `${PROMPT_TAGS.WORKFLOW.open}
|
|
|
14206
14235
|
|
|
14207
14236
|
## Phase 3: RESEARCH (If needed)
|
|
14208
14237
|
6. If docs missing in ${PATHS.DOCS}/:
|
|
14209
|
-
-
|
|
14210
|
-
-
|
|
14238
|
+
- Use **websearch** to find official docs
|
|
14239
|
+
- Use **webfetch** to read URL content
|
|
14240
|
+
- Use **cache_docs** to save to ${PATHS.DOCS}/
|
|
14241
|
+
- Example: \`websearch({ query: "[library] [version] API docs" })\`
|
|
14211
14242
|
|
|
14212
14243
|
## Phase 4: IMPLEMENT (Following discoveries)
|
|
14213
14244
|
7. Write code following OBSERVED patterns
|
|
@@ -14921,7 +14952,6 @@ var commander = {
|
|
|
14921
14952
|
|
|
14922
14953
|
// src/agents/subagents/planner.ts
|
|
14923
14954
|
var systemPrompt2 = [
|
|
14924
|
-
CORE_PHILOSOPHY,
|
|
14925
14955
|
PLANNER_ROLE,
|
|
14926
14956
|
PLANNER_FORBIDDEN,
|
|
14927
14957
|
PLANNER_REQUIRED,
|
|
@@ -14945,7 +14975,6 @@ var planner = {
|
|
|
14945
14975
|
|
|
14946
14976
|
// src/agents/subagents/worker.ts
|
|
14947
14977
|
var systemPrompt3 = [
|
|
14948
|
-
CORE_PHILOSOPHY,
|
|
14949
14978
|
WORKER_ROLE,
|
|
14950
14979
|
WORKER_FORBIDDEN,
|
|
14951
14980
|
WORKER_REQUIRED,
|
|
@@ -14970,7 +14999,6 @@ var worker = {
|
|
|
14970
14999
|
|
|
14971
15000
|
// src/agents/subagents/reviewer.ts
|
|
14972
15001
|
var systemPrompt4 = [
|
|
14973
|
-
CORE_PHILOSOPHY,
|
|
14974
15002
|
REVIEWER_ROLE,
|
|
14975
15003
|
REVIEWER_FORBIDDEN,
|
|
14976
15004
|
REVIEWER_REQUIRED,
|
|
@@ -145,6 +145,10 @@ export declare const PROMPT_TAGS: {
|
|
|
145
145
|
readonly open: "<mission_loop>";
|
|
146
146
|
readonly close: "</mission_loop>";
|
|
147
147
|
};
|
|
148
|
+
readonly AUTONOMOUS_MODE: {
|
|
149
|
+
readonly open: "<autonomous_mode>";
|
|
150
|
+
readonly close: "</autonomous_mode>";
|
|
151
|
+
};
|
|
148
152
|
};
|
|
149
153
|
/**
|
|
150
154
|
* Helper to wrap content in tags
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "opencode-orchestrator",
|
|
3
3
|
"displayName": "OpenCode Orchestrator",
|
|
4
4
|
"description": "Distributed Cognitive Architecture for OpenCode. Turns simple prompts into specialized multi-agent workflows (Planner, Coder, Reviewer).",
|
|
5
|
-
"version": "0.9.
|
|
5
|
+
"version": "0.9.64",
|
|
6
6
|
"author": "agnusdei1207",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|