opencode-orchestrator 0.4.19 → 0.4.21
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/README.md +61 -3
- package/dist/agents/definitions.d.ts +0 -0
- package/dist/agents/orchestrator.d.ts +0 -0
- package/dist/agents/subagents/architect.d.ts +0 -0
- package/dist/agents/subagents/builder.d.ts +0 -0
- package/dist/agents/subagents/inspector.d.ts +0 -0
- package/dist/agents/subagents/recorder.d.ts +0 -0
- package/dist/core/async-agent.d.ts +14 -2
- package/dist/core/state.d.ts +0 -0
- package/dist/core/tasks.d.ts +1 -0
- package/dist/index.d.ts +20 -2
- package/dist/index.js +1497 -164
- package/dist/shared/contracts/interfaces.d.ts +0 -0
- package/dist/shared/contracts/names.d.ts +0 -0
- package/dist/tools/background.d.ts +2 -2
- package/dist/tools/callAgent.d.ts +0 -0
- package/dist/tools/rust.d.ts +0 -0
- package/dist/tools/search.d.ts +0 -0
- package/dist/tools/slashCommand.d.ts +0 -0
- package/dist/utils/binary.d.ts +0 -0
- package/dist/utils/common.d.ts +0 -0
- package/dist/utils/sanity.d.ts +0 -22
- package/package.json +6 -4
- package/dist/agents/coder.d.ts +0 -2
- package/dist/agents/fixer.d.ts +0 -2
- package/dist/agents/names.d.ts +0 -12
- package/dist/agents/planner.d.ts +0 -2
- package/dist/agents/reviewer.d.ts +0 -2
- package/dist/agents/searcher.d.ts +0 -2
- package/dist/agents/subagents/coder.d.ts +0 -2
- package/dist/agents/subagents/executor.d.ts +0 -2
- package/dist/agents/subagents/fixer.d.ts +0 -2
- package/dist/agents/subagents/memory.d.ts +0 -2
- package/dist/agents/subagents/planner.d.ts +0 -2
- package/dist/agents/subagents/publisher.d.ts +0 -2
- package/dist/agents/subagents/reviewer.d.ts +0 -2
- package/dist/agents/subagents/searcher.d.ts +0 -2
- package/dist/agents/subagents/strategist.d.ts +0 -2
- package/dist/agents/subagents/surgeon.d.ts +0 -2
- package/dist/agents/subagents/types.d.ts +0 -7
- package/dist/agents/subagents/visualist.d.ts +0 -2
- package/dist/agents/types.d.ts +0 -7
- package/dist/cli.d.ts +0 -2
- package/dist/tasks.d.ts +0 -29
|
File without changes
|
|
File without changes
|
|
@@ -37,13 +37,13 @@ export declare const listBackgroundTool: {
|
|
|
37
37
|
args: {
|
|
38
38
|
status: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
39
39
|
running: "running";
|
|
40
|
+
all: "all";
|
|
40
41
|
done: "done";
|
|
41
42
|
error: "error";
|
|
42
|
-
all: "all";
|
|
43
43
|
}>>;
|
|
44
44
|
};
|
|
45
45
|
execute(args: {
|
|
46
|
-
status?: "running" | "
|
|
46
|
+
status?: "running" | "all" | "done" | "error" | undefined;
|
|
47
47
|
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
48
48
|
};
|
|
49
49
|
export declare const killBackgroundTool: {
|
|
File without changes
|
package/dist/tools/rust.d.ts
CHANGED
|
File without changes
|
package/dist/tools/search.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/utils/binary.d.ts
CHANGED
|
File without changes
|
package/dist/utils/common.d.ts
CHANGED
|
File without changes
|
package/dist/utils/sanity.d.ts
CHANGED
|
@@ -1,31 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Output Sanity Check - LLM degeneration/gibberish detection
|
|
3
|
-
*
|
|
4
|
-
* Detects common LLM failure modes:
|
|
5
|
-
* - Single character repetition (SSSSSS...)
|
|
6
|
-
* - Pattern loops (茅茅茅茅...)
|
|
7
|
-
* - Low information density
|
|
8
|
-
* - Visual gibberish (box drawing characters)
|
|
9
|
-
* - Line repetition
|
|
10
|
-
*/
|
|
11
1
|
export interface SanityResult {
|
|
12
2
|
isHealthy: boolean;
|
|
13
3
|
reason?: string;
|
|
14
4
|
severity: "ok" | "warning" | "critical";
|
|
15
5
|
}
|
|
16
|
-
/**
|
|
17
|
-
* Check if LLM output shows signs of degeneration
|
|
18
|
-
*/
|
|
19
6
|
export declare function checkOutputSanity(text: string): SanityResult;
|
|
20
|
-
/**
|
|
21
|
-
* Check if text is completely empty or meaningless
|
|
22
|
-
*/
|
|
23
7
|
export declare function isEmptyOrMeaningless(text: string): boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Recovery prompt for single anomaly
|
|
26
|
-
*/
|
|
27
8
|
export declare const RECOVERY_PROMPT = "<anomaly_recovery>\n\u26A0\uFE0F SYSTEM NOTICE: Previous output was malformed (gibberish/loop detected).\n\n<recovery_protocol>\n1. DISCARD the corrupted output completely - do not reference it\n2. RECALL the original mission objective\n3. IDENTIFY the last confirmed successful step\n4. RESTART with a simpler, more focused approach\n</recovery_protocol>\n\n<instructions>\n- If a sub-agent produced bad output: try a different agent or simpler task\n- If stuck in a loop: break down the task into smaller pieces\n- If context seems corrupted: call recorder to restore context\n- THINK in English for maximum stability\n</instructions>\n\nWhat was the original task? Proceed from the last known good state.\n</anomaly_recovery>";
|
|
28
|
-
/**
|
|
29
|
-
* Escalation prompt for multiple consecutive anomalies
|
|
30
|
-
*/
|
|
31
9
|
export declare const ESCALATION_PROMPT = "<critical_anomaly>\n\uD83D\uDEA8 CRITICAL: Multiple consecutive malformed outputs detected.\n\n<emergency_protocol>\n1. STOP current execution path immediately\n2. DO NOT continue with the same approach - it is failing\n3. CALL architect for a completely new strategy\n4. If architect also fails: report status to user and await guidance\n</emergency_protocol>\n\n<diagnosis>\nThe current approach is producing corrupted output.\nThis may indicate: context overload, model instability, or task complexity.\n</diagnosis>\n\nRequest a fresh plan from architect with reduced scope.\n</critical_anomaly>";
|
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.4.
|
|
5
|
+
"version": "0.4.21",
|
|
6
6
|
"author": "agnusdei1207",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|
|
@@ -38,18 +38,20 @@
|
|
|
38
38
|
"LICENSE"
|
|
39
39
|
],
|
|
40
40
|
"scripts": {
|
|
41
|
-
"build": "npx esbuild src/index.ts --bundle --outfile=dist/index.js --platform=node --format=esm && tsc --emitDeclarationOnly && shx mkdir -p dist/scripts && npx esbuild scripts/postinstall.ts --bundle --outfile=dist/scripts/postinstall.js --platform=node --format=esm && npx esbuild scripts/preuninstall.ts --bundle --outfile=dist/scripts/preuninstall.js --platform=node --format=esm",
|
|
41
|
+
"build": "npx esbuild src/index.ts --bundle --outfile=dist/index.js --platform=node --format=esm --external:os --external:path --external:fs --external:child_process --external:util --external:events --external:stream --external:crypto --external:http --external:https --external:url --external:net --external:tls --external:zlib --external:buffer --external:querystring --external:string_decoder && tsc --emitDeclarationOnly && shx mkdir -p dist/scripts && npx esbuild scripts/postinstall.ts --bundle --outfile=dist/scripts/postinstall.js --platform=node --format=esm --packages=external && npx esbuild scripts/preuninstall.ts --bundle --outfile=dist/scripts/preuninstall.js --platform=node --format=esm --packages=external",
|
|
42
42
|
"postinstall": "node dist/scripts/postinstall.js",
|
|
43
43
|
"preuninstall": "node dist/scripts/preuninstall.js",
|
|
44
44
|
"prepublishOnly": "npm run build",
|
|
45
|
-
"release:ship": "
|
|
45
|
+
"release:ship": "npx tsx scripts/release.ts",
|
|
46
46
|
"release:patch": "npm run build && npm version patch && npm run release:ship",
|
|
47
47
|
"release:minor": "npm run build && npm version minor && npm run release:ship",
|
|
48
48
|
"release:major": "npm run build && npm version major && npm run release:ship",
|
|
49
49
|
"dev:link": "npm run build && npm unlink opencode-orchestrator || shx echo 'Not linked' && shx rm -rf $(npm root -g)/opencode-orchestrator && npm link && echo 'SUCCESS: Re-linked. Restart OpenCode.'",
|
|
50
50
|
"dev:unlink": "npm unlink opencode-orchestrator || shx echo 'Not linked' && shx rm -rf $(npm root -g)/opencode-orchestrator && echo 'SUCCESS: Unlinked and Cleaned'",
|
|
51
51
|
"dev:status": "echo '=== Global Link Status ===' && shx ls -l $(npm root -g)/opencode-orchestrator || echo 'Not linked'",
|
|
52
|
-
"dev:test": "node dist/scripts/postinstall.js && echo '---' && node dist/scripts/preuninstall.js"
|
|
52
|
+
"dev:test": "node dist/scripts/postinstall.js && echo '---' && node dist/scripts/preuninstall.js",
|
|
53
|
+
"delete": "brew uninstall opencode && rm -rf ~/.config/opencode && npm uninstall -g opencode-orchestrator",
|
|
54
|
+
"setup": "brew install opencode && npm install -g opencode-orchestrator"
|
|
53
55
|
},
|
|
54
56
|
"dependencies": {
|
|
55
57
|
"@opencode-ai/plugin": "^1.1.1",
|
package/dist/agents/coder.d.ts
DELETED
package/dist/agents/fixer.d.ts
DELETED
package/dist/agents/names.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const AGENT_NAMES: {
|
|
2
|
-
readonly ORCHESTRATOR: "orchestrator";
|
|
3
|
-
readonly PLANNER: "planner";
|
|
4
|
-
readonly CODER: "coder";
|
|
5
|
-
readonly REVIEWER: "reviewer";
|
|
6
|
-
readonly SEARCHER: "searcher";
|
|
7
|
-
readonly SURGEON: "surgeon";
|
|
8
|
-
readonly EXECUTOR: "executor";
|
|
9
|
-
readonly VISUALIST: "visualist";
|
|
10
|
-
readonly PUBLISHER: "publisher";
|
|
11
|
-
};
|
|
12
|
-
export type AgentName = typeof AGENT_NAMES[keyof typeof AGENT_NAMES];
|
package/dist/agents/planner.d.ts
DELETED
package/dist/agents/types.d.ts
DELETED
package/dist/cli.d.ts
DELETED
package/dist/tasks.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Task management for DAG-based orchestration
|
|
3
|
-
*/
|
|
4
|
-
export type TaskStatus = "pending" | "running" | "completed" | "failed";
|
|
5
|
-
export interface Task {
|
|
6
|
-
id: string;
|
|
7
|
-
description: string;
|
|
8
|
-
action: string;
|
|
9
|
-
file: string;
|
|
10
|
-
dependencies: string[];
|
|
11
|
-
status: TaskStatus;
|
|
12
|
-
result?: string;
|
|
13
|
-
retryCount: number;
|
|
14
|
-
complexity: number;
|
|
15
|
-
type: "infrastructure" | "logic" | "integration";
|
|
16
|
-
}
|
|
17
|
-
export declare class TaskGraph {
|
|
18
|
-
private tasks;
|
|
19
|
-
constructor(tasks?: Task[]);
|
|
20
|
-
addTask(task: Task): void;
|
|
21
|
-
getTask(id: string): Task | undefined;
|
|
22
|
-
updateTask(id: string, updates: Partial<Task>): void;
|
|
23
|
-
getReadyTasks(): Task[];
|
|
24
|
-
isCompleted(): boolean;
|
|
25
|
-
hasFailed(): boolean;
|
|
26
|
-
getTaskSummary(): string;
|
|
27
|
-
toJSON(): string;
|
|
28
|
-
static fromJSON(json: string): TaskGraph;
|
|
29
|
-
}
|