opencode-swarm 6.44.3 → 6.45.1
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/agents/explorer.d.ts +1 -1
- package/dist/cli/index.js +17 -4
- package/dist/hooks/normalize-tool-name.d.ts +25 -0
- package/dist/index.js +1651 -651
- package/dist/tools/batch-symbols.d.ts +24 -0
- package/dist/tools/batch-symbols.test.d.ts +1 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/search.adversarial.test.d.ts +1 -0
- package/dist/tools/search.d.ts +29 -0
- package/dist/tools/search.test.d.ts +1 -0
- package/dist/tools/suggest-patch.adversarial.test.d.ts +1 -0
- package/dist/tools/suggest-patch.d.ts +37 -0
- package/dist/tools/suggest-patch.test.d.ts +1 -0
- package/dist/tools/symbols.d.ts +19 -0
- package/dist/tools/tool-names.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AgentDefinition } from './architect';
|
|
2
2
|
export declare const CURATOR_INIT_PROMPT = "## IDENTITY\nYou are Explorer in CURATOR_INIT mode. You consolidate prior session knowledge into an architect briefing.\nDO NOT use the Task tool to delegate. You ARE the agent that does the work.\n\nINPUT FORMAT:\nTASK: CURATOR_INIT\nPRIOR_SUMMARY: [JSON or \"none\"]\nKNOWLEDGE_ENTRIES: [JSON array of high-confidence entries]\nPROJECT_CONTEXT: [context.md excerpt]\n\nACTIONS:\n- Read the prior summary to understand session history\n- Cross-reference knowledge entries against project context\n- Identify contradictions (knowledge says X, project state shows Y)\n- Produce a concise briefing for the architect\n\nRULES:\n- Output under 2000 chars\n- No code modifications\n- Flag contradictions explicitly with CONTRADICTION: prefix\n- If no prior summary exists, state \"First session \u2014 no prior context\"\n\nOUTPUT FORMAT:\nBRIEFING:\n[concise summary of prior session state, key decisions, active blockers]\n\nCONTRADICTIONS:\n- [entry_id]: [description] (or \"None detected\")\n\nKNOWLEDGE_STATS:\n- Entries reviewed: [N]\n- Prior phases covered: [N]\n";
|
|
3
|
-
export declare const CURATOR_PHASE_PROMPT = "## IDENTITY\nYou are Explorer in CURATOR_PHASE mode. You consolidate a completed phase into a digest.\nDO NOT use the Task tool to delegate. You ARE the agent that does the work.\n\nINPUT FORMAT:\nTASK: CURATOR_PHASE [phase_number]\nPRIOR_DIGEST: [running summary or \"none\"]\nPHASE_EVENTS: [JSON array from events.jsonl for this phase]\nPHASE_EVIDENCE: [summary of evidence bundles]\nPHASE_DECISIONS: [decisions from context.md]\nAGENTS_DISPATCHED: [list]\nAGENTS_EXPECTED: [list from config]\n\nACTIONS:\n- Extend the prior digest with this phase's outcomes (do NOT regenerate from scratch)\n- Identify workflow deviations: missing reviewer, missing retro, skipped test_engineer\n- Recommend knowledge updates: entries to promote, archive, or flag as contradicted\n- Summarize key decisions and blockers resolved\n\nRULES:\n- Output under 2000 chars\n- No code modifications\n- Compliance observations are READ-ONLY \u2014 report, do not enforce\n- Extend the digest, never replace it\n\nOUTPUT FORMAT:\nPHASE_DIGEST:\nphase: [N]\nsummary: [what was accomplished]\nagents_used: [list]\ntasks_completed: [N]/[total]\nkey_decisions: [list]\nblockers_resolved: [list]\n\nCOMPLIANCE:\n- [type]: [description] (or \"No deviations observed\")\n\nKNOWLEDGE_UPDATES:\n- [action]
|
|
3
|
+
export declare const CURATOR_PHASE_PROMPT = "## IDENTITY\nYou are Explorer in CURATOR_PHASE mode. You consolidate a completed phase into a digest.\nDO NOT use the Task tool to delegate. You ARE the agent that does the work.\n\nINPUT FORMAT:\nTASK: CURATOR_PHASE [phase_number]\nPRIOR_DIGEST: [running summary or \"none\"]\nPHASE_EVENTS: [JSON array from events.jsonl for this phase]\nPHASE_EVIDENCE: [summary of evidence bundles]\nPHASE_DECISIONS: [decisions from context.md]\nAGENTS_DISPATCHED: [list]\nAGENTS_EXPECTED: [list from config]\n\nACTIONS:\n- Extend the prior digest with this phase's outcomes (do NOT regenerate from scratch)\n- Identify workflow deviations: missing reviewer, missing retro, skipped test_engineer\n- Recommend knowledge updates: entries to promote, archive, or flag as contradicted\n- Summarize key decisions and blockers resolved\n\nRULES:\n- Output under 2000 chars\n- No code modifications\n- Compliance observations are READ-ONLY \u2014 report, do not enforce\n- Extend the digest, never replace it\n\nOUTPUT FORMAT:\nPHASE_DIGEST:\nphase: [N]\nsummary: [what was accomplished]\nagents_used: [list]\ntasks_completed: [N]/[total]\nkey_decisions: [list]\nblockers_resolved: [list]\n\nCOMPLIANCE:\n- [type]: [description] (or \"No deviations observed\")\n\nKNOWLEDGE_UPDATES:\n- [action] new: [reason] (or \"No recommendations\")\nNOTE: Always use \"new\" as the token \u2014 existing entry IDs (UUID v4) are not available in this context. Any non-UUID token is treated as \"new\" by the parser. Only \"promote new:\" creates a new entry; \"archive new:\" and \"flag_contradiction new:\" are silently skipped because those actions require an existing entry to operate on.\n\nEXTENDED_DIGEST:\n[the full running digest with this phase appended]\n";
|
|
4
4
|
export declare function createExplorerAgent(model: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
|
|
5
5
|
export declare function createExplorerCuratorAgent(model: string, mode: 'CURATOR_INIT' | 'CURATOR_PHASE', customAppendPrompt?: string): AgentDefinition;
|
package/dist/cli/index.js
CHANGED
|
@@ -18000,7 +18000,10 @@ var TOOL_NAMES = [
|
|
|
18000
18000
|
"knowledgeAdd",
|
|
18001
18001
|
"knowledgeRecall",
|
|
18002
18002
|
"knowledgeRemove",
|
|
18003
|
-
"co_change_analyzer"
|
|
18003
|
+
"co_change_analyzer",
|
|
18004
|
+
"search",
|
|
18005
|
+
"batch_symbols",
|
|
18006
|
+
"suggest_patch"
|
|
18004
18007
|
];
|
|
18005
18008
|
var TOOL_NAME_SET = new Set(TOOL_NAMES);
|
|
18006
18009
|
|
|
@@ -18042,6 +18045,8 @@ var AGENT_TOOL_MAP = {
|
|
|
18042
18045
|
"quality_budget",
|
|
18043
18046
|
"retrieve_summary",
|
|
18044
18047
|
"save_plan",
|
|
18048
|
+
"search",
|
|
18049
|
+
"batch_symbols",
|
|
18045
18050
|
"schema_drift",
|
|
18046
18051
|
"secretscan",
|
|
18047
18052
|
"symbols",
|
|
@@ -18063,7 +18068,8 @@ var AGENT_TOOL_MAP = {
|
|
|
18063
18068
|
"knowledgeAdd",
|
|
18064
18069
|
"knowledgeRecall",
|
|
18065
18070
|
"knowledgeRemove",
|
|
18066
|
-
"co_change_analyzer"
|
|
18071
|
+
"co_change_analyzer",
|
|
18072
|
+
"suggest_patch"
|
|
18067
18073
|
],
|
|
18068
18074
|
explorer: [
|
|
18069
18075
|
"complexity_hotspots",
|
|
@@ -18073,6 +18079,8 @@ var AGENT_TOOL_MAP = {
|
|
|
18073
18079
|
"imports",
|
|
18074
18080
|
"retrieve_summary",
|
|
18075
18081
|
"schema_drift",
|
|
18082
|
+
"search",
|
|
18083
|
+
"batch_symbols",
|
|
18076
18084
|
"symbols",
|
|
18077
18085
|
"todo_extract",
|
|
18078
18086
|
"doc_scan",
|
|
@@ -18085,6 +18093,7 @@ var AGENT_TOOL_MAP = {
|
|
|
18085
18093
|
"symbols",
|
|
18086
18094
|
"extract_code_blocks",
|
|
18087
18095
|
"retrieve_summary",
|
|
18096
|
+
"search",
|
|
18088
18097
|
"build_check",
|
|
18089
18098
|
"syntax_check",
|
|
18090
18099
|
"knowledgeAdd",
|
|
@@ -18100,7 +18109,8 @@ var AGENT_TOOL_MAP = {
|
|
|
18100
18109
|
"complexity_hotspots",
|
|
18101
18110
|
"pkg_audit",
|
|
18102
18111
|
"build_check",
|
|
18103
|
-
"syntax_check"
|
|
18112
|
+
"syntax_check",
|
|
18113
|
+
"search"
|
|
18104
18114
|
],
|
|
18105
18115
|
sme: [
|
|
18106
18116
|
"complexity_hotspots",
|
|
@@ -18126,7 +18136,10 @@ var AGENT_TOOL_MAP = {
|
|
|
18126
18136
|
"test_runner",
|
|
18127
18137
|
"sast_scan",
|
|
18128
18138
|
"placeholder_scan",
|
|
18129
|
-
"knowledgeRecall"
|
|
18139
|
+
"knowledgeRecall",
|
|
18140
|
+
"search",
|
|
18141
|
+
"batch_symbols",
|
|
18142
|
+
"suggest_patch"
|
|
18130
18143
|
],
|
|
18131
18144
|
critic: [
|
|
18132
18145
|
"complexity_hotspots",
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical tool-name normalization helpers
|
|
3
|
+
*
|
|
4
|
+
* Strip namespace prefixes (e.g., "mega:write", "mega.search") to get the base tool name.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Strip namespace prefix from a tool name.
|
|
8
|
+
*
|
|
9
|
+
* Examples:
|
|
10
|
+
* "opencode:write" → "write"
|
|
11
|
+
* "opencode.bash" → "bash"
|
|
12
|
+
* "write" → "write"
|
|
13
|
+
* undefined/null → undefined
|
|
14
|
+
*/
|
|
15
|
+
export declare function normalizeToolName(toolName: string): string;
|
|
16
|
+
export declare function normalizeToolName(toolName: null | undefined): string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Strip namespace prefix and lowercase the result.
|
|
19
|
+
*
|
|
20
|
+
* Examples:
|
|
21
|
+
* "opencode:WRITE" → "write"
|
|
22
|
+
* "opencode.bash" → "bash"
|
|
23
|
+
* "write" → "write"
|
|
24
|
+
*/
|
|
25
|
+
export declare function normalizeToolNameLowerCase(toolName: string): string;
|