opencode-swarm 7.113.4 → 7.114.0
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/.opencode/skills/test-file-split/SKILL.md +1 -1
- package/.opencode/skills/writing-tests/SKILL.md +1 -1
- package/dist/cli/{curator-llm-factory-b3g0g0cd.js → curator-llm-factory-awp6xgvt.js} +1 -1
- package/dist/cli/{curator-nh9raf1a.js → curator-wvv628sv.js} +1 -1
- package/dist/cli/{guardrail-explain-wpv5eskq.js → guardrail-explain-hhdtrm60.js} +2 -2
- package/dist/cli/{hive-promoter-c0fd3j02.js → hive-promoter-1qkybw79.js} +1 -1
- package/dist/cli/{index-10v7hrkj.js → index-jhdv0jdf.js} +1 -1
- package/dist/cli/{index-5yzr9fk6.js → index-p35ayncy.js} +2 -2
- package/dist/cli/{index-ct9e0y0q.js → index-zezjy05g.js} +51 -14
- package/dist/cli/index.js +1 -1
- package/dist/config/skill-mirrors.d.ts +13 -3
- package/dist/full-auto/state.d.ts +26 -0
- package/dist/index.js +6 -6
- package/dist/services/status-service.d.ts +16 -1
- package/dist/state.d.ts +9 -0
- package/dist/tools/create-tool.d.ts +9 -0
- package/package.json +2 -1
- package/dist/output/agent-writer.d.ts +0 -27
- package/dist/output/index.d.ts +0 -1
- package/dist/tools/knowledge-ack.d.ts +0 -15
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AgentDefinition } from '../agents';
|
|
2
|
+
import { loadFullAutoRunState } from '../full-auto/state';
|
|
2
3
|
import { type RecentEscalation } from '../hooks/knowledge-escalator';
|
|
3
|
-
import { hasActiveFullAuto, hasActiveLeanTurbo } from '../state';
|
|
4
|
+
import { getActiveFullAutoSessionID, hasActiveFullAuto, hasActiveLeanTurbo } from '../state';
|
|
4
5
|
import { loadLeanTurboRunState } from '../turbo/lean/state';
|
|
5
6
|
/**
|
|
6
7
|
* Dependency-injection seam for status-service.
|
|
@@ -10,6 +11,8 @@ export declare const _internals: {
|
|
|
10
11
|
loadLeanTurboRunState: typeof loadLeanTurboRunState;
|
|
11
12
|
hasActiveLeanTurbo: typeof hasActiveLeanTurbo;
|
|
12
13
|
hasActiveFullAuto: typeof hasActiveFullAuto;
|
|
14
|
+
getActiveFullAutoSessionID: typeof getActiveFullAutoSessionID;
|
|
15
|
+
loadFullAutoRunState: typeof loadFullAutoRunState;
|
|
13
16
|
};
|
|
14
17
|
/**
|
|
15
18
|
* Structured status data returned by the status service.
|
|
@@ -39,6 +42,18 @@ export interface StatusData {
|
|
|
39
42
|
leanDegradationSummary?: string;
|
|
40
43
|
/** Whether Full-Auto mode is currently active */
|
|
41
44
|
fullAutoActive?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Issue #1781 E2: latest oversight-escalation detail, surfaced when
|
|
47
|
+
* Full-Auto is active so an operator can see why oversight escalated and
|
|
48
|
+
* how close the run is to a deadlock/human handoff. `undefined` when
|
|
49
|
+
* Full-Auto is inactive or no escalation has occurred.
|
|
50
|
+
*/
|
|
51
|
+
fullAutoEscalation?: {
|
|
52
|
+
reason: string;
|
|
53
|
+
interactionCount: number;
|
|
54
|
+
deadlockCount: number;
|
|
55
|
+
phase?: number;
|
|
56
|
+
};
|
|
42
57
|
/** Reason for pause if Lean Turbo is paused */
|
|
43
58
|
leanPauseReason?: string;
|
|
44
59
|
/** Last known context budget percentage (0-100), or null if not yet measured */
|
package/dist/state.d.ts
CHANGED
|
@@ -657,6 +657,15 @@ export declare function hasActiveTurboMode(sessionID?: string): boolean;
|
|
|
657
657
|
* @returns true if the specified session has fullAutoMode: true (model validation is advisory-only).
|
|
658
658
|
*/
|
|
659
659
|
export declare function hasActiveFullAuto(sessionID?: string): boolean;
|
|
660
|
+
/**
|
|
661
|
+
* Issue #1781 E2: return the sessionID of any currently-active Full-Auto
|
|
662
|
+
* session, or `undefined` if none. Used by `/swarm status` to scope its
|
|
663
|
+
* escalation-detail read to the live session (avoids surfacing stale
|
|
664
|
+
* escalations from prior sessions persisted in `.swarm/full-auto-state.json`).
|
|
665
|
+
* If multiple sessions are active, the one with the most recent tool-call
|
|
666
|
+
* timestamp wins (a proxy for "most recently touched").
|
|
667
|
+
*/
|
|
668
|
+
export declare function getActiveFullAutoSessionID(): string | undefined;
|
|
660
669
|
/**
|
|
661
670
|
* Check if Lean Turbo Mode is active for a specific session or ANY session.
|
|
662
671
|
* @param sessionID - Optional session ID to check. If provided, checks only that session.
|
|
@@ -23,5 +23,14 @@ export interface SwarmToolOptions<Args extends Record<string, unknown>> {
|
|
|
23
23
|
/**
|
|
24
24
|
* Creates a swarm tool with automatic working directory injection.
|
|
25
25
|
* Wraps the @opencode-ai/plugin/tool factory to always inject `directory` and `ctx` into tool execute callbacks.
|
|
26
|
+
*
|
|
27
|
+
* Registration contract (issue #1781 E4): every `export const NAME = createSwarmTool({...})`
|
|
28
|
+
* in `src/tools/**` MUST have a corresponding entry in `TOOL_METADATA`
|
|
29
|
+
* (`src/tools/tool-metadata.ts`). The reverse-direction CI guard in
|
|
30
|
+
* `scripts/check-tool-registration.ts` enumerates all exported `createSwarmTool`
|
|
31
|
+
* bindings and fails on any without a metadata entry. If a tool definition is
|
|
32
|
+
* intentionally internal (an unpublished helper), mark it with a
|
|
33
|
+
* `/** @tool-opt-out <reason> *\/` JSDoc tag directly above its `export const`
|
|
34
|
+
* so the guard skips it — silence is a failure, not an opt-out.
|
|
26
35
|
*/
|
|
27
36
|
export declare function createSwarmTool<Args extends Record<string, unknown>>(opts: SwarmToolOptions<Args>): ReturnType<typeof tool>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.114.0",
|
|
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",
|
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
"lint:ci": "biome ci .",
|
|
95
95
|
"test:unit:ci": "bun scripts/ci/run-unit-tests-local.ts",
|
|
96
96
|
"drift:check": "bun run scripts/drift-check.ts",
|
|
97
|
+
"drift:fix": "bun run scripts/drift-check.ts --fix --confirm",
|
|
97
98
|
"format": "biome format . --write",
|
|
98
99
|
"check": "biome check --write .",
|
|
99
100
|
"dev": "bun run build && opencode",
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export type AgentType = 'architect' | 'coder' | 'reviewer' | 'test_engineer' | 'explorer' | 'sme' | 'critic' | 'docs' | 'designer';
|
|
2
|
-
export type OutputType = 'review' | 'test' | 'research' | 'analysis' | 'summary';
|
|
3
|
-
export interface AgentOutputMetadata {
|
|
4
|
-
agent: AgentType;
|
|
5
|
-
type: OutputType;
|
|
6
|
-
taskId: string;
|
|
7
|
-
phase: number;
|
|
8
|
-
timestamp: string;
|
|
9
|
-
durationMs?: number;
|
|
10
|
-
success?: boolean;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Write agent output to persistent storage
|
|
14
|
-
* Output: .swarm/outputs/phase-N/task-N.M/{agent}-{type}-{timestamp}.md
|
|
15
|
-
*/
|
|
16
|
-
export declare function writeAgentOutput(directory: string, metadata: AgentOutputMetadata, content: string): Promise<string>;
|
|
17
|
-
/**
|
|
18
|
-
* Read agent output from persistent storage
|
|
19
|
-
*/
|
|
20
|
-
export declare function readAgentOutput(directory: string, phase: number, taskId: string): Promise<{
|
|
21
|
-
metadata: AgentOutputMetadata;
|
|
22
|
-
content: string;
|
|
23
|
-
}[]>;
|
|
24
|
-
/**
|
|
25
|
-
* List all agent outputs for a phase
|
|
26
|
-
*/
|
|
27
|
-
export declare function listAgentOutputs(directory: string, phase?: number): Promise<AgentOutputMetadata[]>;
|
package/dist/output/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { type AgentOutputMetadata, type AgentType, listAgentOutputs, type OutputType, readAgentOutput, writeAgentOutput, } from './agent-writer';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* knowledge_ack — Architect-facing tool to record an explicit acknowledgment
|
|
3
|
-
* outcome for an injected knowledge directive.
|
|
4
|
-
*
|
|
5
|
-
* The same outcome can also be expressed inline in chat with markers like
|
|
6
|
-
* KNOWLEDGE_APPLIED: <id>
|
|
7
|
-
* KNOWLEDGE_IGNORED: <id> reason=<reason>
|
|
8
|
-
* but this tool gives a deterministic, auditable surface that doesn't depend
|
|
9
|
-
* on chat-text scanning.
|
|
10
|
-
*/
|
|
11
|
-
import { createSwarmTool } from './create-tool.js';
|
|
12
|
-
export declare const knowledge_ack: ReturnType<typeof createSwarmTool>;
|
|
13
|
-
export declare const _internals: {
|
|
14
|
-
knowledge_ack: typeof knowledge_ack;
|
|
15
|
-
};
|