opencode-swarm 6.80.0 → 6.80.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/cli/index.js +9 -0
- package/dist/config/constants.d.ts +1 -0
- package/dist/index.js +24 -2
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -18738,6 +18738,15 @@ var ALL_AGENT_NAMES = [
|
|
|
18738
18738
|
ORCHESTRATOR_NAME,
|
|
18739
18739
|
...ALL_SUBAGENT_NAMES
|
|
18740
18740
|
];
|
|
18741
|
+
var OPENCODE_NATIVE_AGENTS = new Set([
|
|
18742
|
+
"build",
|
|
18743
|
+
"plan",
|
|
18744
|
+
"general",
|
|
18745
|
+
"explore",
|
|
18746
|
+
"compaction",
|
|
18747
|
+
"title",
|
|
18748
|
+
"summary"
|
|
18749
|
+
]);
|
|
18741
18750
|
var AGENT_TOOL_MAP = {
|
|
18742
18751
|
architect: [
|
|
18743
18752
|
"checkpoint",
|
|
@@ -4,6 +4,7 @@ export declare const PIPELINE_AGENTS: readonly ["explorer", "coder", "test_engin
|
|
|
4
4
|
export declare const ORCHESTRATOR_NAME: "architect";
|
|
5
5
|
export declare const ALL_SUBAGENT_NAMES: readonly ["sme", "docs", "designer", "critic_sounding_board", "critic_drift_verifier", "critic_hallucination_verifier", "curator_init", "curator_phase", "reviewer", "critic", "critic_oversight", "explorer", "coder", "test_engineer"];
|
|
6
6
|
export declare const ALL_AGENT_NAMES: readonly ["architect", "sme", "docs", "designer", "critic_sounding_board", "critic_drift_verifier", "critic_hallucination_verifier", "curator_init", "curator_phase", "reviewer", "critic", "critic_oversight", "explorer", "coder", "test_engineer"];
|
|
7
|
+
export declare const OPENCODE_NATIVE_AGENTS: Set<"compaction" | "title" | "build" | "plan" | "general" | "explore" | "summary">;
|
|
7
8
|
export type QAAgentName = (typeof QA_AGENTS)[number];
|
|
8
9
|
export type PipelineAgentName = (typeof PIPELINE_AGENTS)[number];
|
|
9
10
|
export type AgentName = (typeof ALL_AGENT_NAMES)[number];
|
package/dist/index.js
CHANGED
|
@@ -129,7 +129,7 @@ function isLowCapabilityModel(modelId) {
|
|
|
129
129
|
const lower = modelId.toLowerCase();
|
|
130
130
|
return LOW_CAPABILITY_MODELS.some((substr) => lower.includes(substr));
|
|
131
131
|
}
|
|
132
|
-
var QA_AGENTS, PIPELINE_AGENTS, ORCHESTRATOR_NAME = "architect", ALL_SUBAGENT_NAMES, ALL_AGENT_NAMES, AGENT_TOOL_MAP, WRITE_TOOL_NAMES, TOOL_DESCRIPTIONS, DEFAULT_MODELS, DEFAULT_SCORING_CONFIG, LOW_CAPABILITY_MODELS, TURBO_MODE_BANNER = `## \uD83D\uDE80 TURBO MODE ACTIVE
|
|
132
|
+
var QA_AGENTS, PIPELINE_AGENTS, ORCHESTRATOR_NAME = "architect", ALL_SUBAGENT_NAMES, ALL_AGENT_NAMES, OPENCODE_NATIVE_AGENTS, AGENT_TOOL_MAP, WRITE_TOOL_NAMES, TOOL_DESCRIPTIONS, DEFAULT_MODELS, DEFAULT_SCORING_CONFIG, LOW_CAPABILITY_MODELS, TURBO_MODE_BANNER = `## \uD83D\uDE80 TURBO MODE ACTIVE
|
|
133
133
|
|
|
134
134
|
**Speed optimization enabled for this session.**
|
|
135
135
|
|
|
@@ -177,6 +177,15 @@ var init_constants = __esm(() => {
|
|
|
177
177
|
ORCHESTRATOR_NAME,
|
|
178
178
|
...ALL_SUBAGENT_NAMES
|
|
179
179
|
];
|
|
180
|
+
OPENCODE_NATIVE_AGENTS = new Set([
|
|
181
|
+
"build",
|
|
182
|
+
"plan",
|
|
183
|
+
"general",
|
|
184
|
+
"explore",
|
|
185
|
+
"compaction",
|
|
186
|
+
"title",
|
|
187
|
+
"summary"
|
|
188
|
+
]);
|
|
180
189
|
AGENT_TOOL_MAP = {
|
|
181
190
|
architect: [
|
|
182
191
|
"checkpoint",
|
|
@@ -22640,6 +22649,9 @@ function isWriteTool(toolName) {
|
|
|
22640
22649
|
const normalized = normalizeToolName(toolName);
|
|
22641
22650
|
return WRITE_TOOL_NAMES.includes(normalized);
|
|
22642
22651
|
}
|
|
22652
|
+
function isNativeOpencodeAgent(agentName) {
|
|
22653
|
+
return OPENCODE_NATIVE_AGENTS.has(agentName.toLowerCase());
|
|
22654
|
+
}
|
|
22643
22655
|
function isArchitect(sessionId) {
|
|
22644
22656
|
const activeAgent = swarmState.activeAgent.get(sessionId);
|
|
22645
22657
|
if (activeAgent) {
|
|
@@ -23538,17 +23550,23 @@ function createGuardrailsHooks(directory, directoryOrConfig, config2, authorityC
|
|
|
23538
23550
|
const strippedAgent = rawActiveAgent ? stripKnownSwarmPrefix(rawActiveAgent) : undefined;
|
|
23539
23551
|
if (strippedAgent === ORCHESTRATOR_NAME)
|
|
23540
23552
|
return null;
|
|
23553
|
+
if (strippedAgent && isNativeOpencodeAgent(strippedAgent))
|
|
23554
|
+
return null;
|
|
23541
23555
|
const existingSession = swarmState.agentSessions.get(sessionID);
|
|
23542
23556
|
if (existingSession) {
|
|
23543
23557
|
const sessionAgent = stripKnownSwarmPrefix(existingSession.agentName);
|
|
23544
23558
|
if (sessionAgent === ORCHESTRATOR_NAME)
|
|
23545
23559
|
return null;
|
|
23560
|
+
if (isNativeOpencodeAgent(sessionAgent))
|
|
23561
|
+
return null;
|
|
23546
23562
|
}
|
|
23547
23563
|
const agentName = swarmState.activeAgent.get(sessionID) ?? ORCHESTRATOR_NAME;
|
|
23548
23564
|
const session = ensureAgentSession(sessionID, agentName);
|
|
23549
23565
|
const resolvedName = stripKnownSwarmPrefix(session.agentName);
|
|
23550
23566
|
if (resolvedName === ORCHESTRATOR_NAME)
|
|
23551
23567
|
return null;
|
|
23568
|
+
if (isNativeOpencodeAgent(resolvedName))
|
|
23569
|
+
return null;
|
|
23552
23570
|
const agentConfig = resolveGuardrailsConfig(cfg, session.agentName);
|
|
23553
23571
|
if (agentConfig.max_duration_minutes === 0 && agentConfig.max_tool_calls === 0) {
|
|
23554
23572
|
return null;
|
|
@@ -24475,6 +24493,10 @@ var init_guardrails = __esm(() => {
|
|
|
24475
24493
|
maxSize: 200
|
|
24476
24494
|
});
|
|
24477
24495
|
DEFAULT_AGENT_AUTHORITY_RULES = {
|
|
24496
|
+
build: {},
|
|
24497
|
+
plan: {},
|
|
24498
|
+
general: {},
|
|
24499
|
+
explore: {},
|
|
24478
24500
|
architect: {
|
|
24479
24501
|
blockedExact: [".swarm/plan.md", ".swarm/plan.json"],
|
|
24480
24502
|
blockedZones: ["generated"]
|
|
@@ -67734,7 +67756,7 @@ var GUARD_KEYWORDS = [
|
|
|
67734
67756
|
function isGuardKeyword(name2) {
|
|
67735
67757
|
return GUARD_KEYWORDS.some((keyword) => {
|
|
67736
67758
|
const ciKeyword = keyword.split("").map((c) => `[${c.toLowerCase()}${c.toUpperCase()}]`).join("");
|
|
67737
|
-
const re = new RegExp(
|
|
67759
|
+
const re = new RegExp(`(?<![a-z])${ciKeyword}(?![a-z])`);
|
|
67738
67760
|
return re.test(name2);
|
|
67739
67761
|
});
|
|
67740
67762
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "6.80.
|
|
3
|
+
"version": "6.80.1",
|
|
4
4
|
"description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|