@oeronteros-1/opencode-orchestra 0.5.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/LICENSE +21 -0
- package/README.md +207 -0
- package/dashboard-dist/assets/index-89Gs8jun.css +2 -0
- package/dashboard-dist/assets/index-Bhe8OPZD.js +124 -0
- package/dashboard-dist/index.html +14 -0
- package/dist/agents/build.d.ts +7 -0
- package/dist/agents/build.js +16 -0
- package/dist/agents/build.js.map +1 -0
- package/dist/agents/judge.d.ts +3 -0
- package/dist/agents/judge.js +29 -0
- package/dist/agents/judge.js.map +1 -0
- package/dist/agents/lead.d.ts +3 -0
- package/dist/agents/lead.js +54 -0
- package/dist/agents/lead.js.map +1 -0
- package/dist/agents/types.d.ts +14 -0
- package/dist/agents/types.js +2 -0
- package/dist/agents/types.js.map +1 -0
- package/dist/agents/workers.d.ts +3 -0
- package/dist/agents/workers.js +114 -0
- package/dist/agents/workers.js.map +1 -0
- package/dist/cli.d.ts +24 -0
- package/dist/cli.js +418 -0
- package/dist/cli.js.map +1 -0
- package/dist/config/defaults.d.ts +4 -0
- package/dist/config/defaults.js +26 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/config/load.d.ts +6 -0
- package/dist/config/load.js +58 -0
- package/dist/config/load.js.map +1 -0
- package/dist/config/paths.d.ts +2 -0
- package/dist/config/paths.js +13 -0
- package/dist/config/paths.js.map +1 -0
- package/dist/config/schema.d.ts +341 -0
- package/dist/config/schema.js +103 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/dashboard/server.d.ts +12 -0
- package/dist/dashboard/server.js +297 -0
- package/dist/dashboard/server.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +85 -0
- package/dist/index.js.map +1 -0
- package/dist/profiles/architecture.d.ts +2 -0
- package/dist/profiles/architecture.js +13 -0
- package/dist/profiles/architecture.js.map +1 -0
- package/dist/profiles/catalog.d.ts +2 -0
- package/dist/profiles/catalog.js +39 -0
- package/dist/profiles/catalog.js.map +1 -0
- package/dist/profiles/debug.d.ts +2 -0
- package/dist/profiles/debug.js +14 -0
- package/dist/profiles/debug.js.map +1 -0
- package/dist/profiles/performance.d.ts +2 -0
- package/dist/profiles/performance.js +13 -0
- package/dist/profiles/performance.js.map +1 -0
- package/dist/profiles/research.d.ts +2 -0
- package/dist/profiles/research.js +13 -0
- package/dist/profiles/research.js.map +1 -0
- package/dist/profiles/security.d.ts +2 -0
- package/dist/profiles/security.js +13 -0
- package/dist/profiles/security.js.map +1 -0
- package/dist/profiles/types.d.ts +9 -0
- package/dist/profiles/types.js +2 -0
- package/dist/profiles/types.js.map +1 -0
- package/dist/profiles/ui.d.ts +2 -0
- package/dist/profiles/ui.js +13 -0
- package/dist/profiles/ui.js.map +1 -0
- package/dist/prompts/load.d.ts +4 -0
- package/dist/prompts/load.js +26 -0
- package/dist/prompts/load.js.map +1 -0
- package/dist/routing/budget.d.ts +11 -0
- package/dist/routing/budget.js +45 -0
- package/dist/routing/budget.js.map +1 -0
- package/dist/routing/classifier.d.ts +10 -0
- package/dist/routing/classifier.js +160 -0
- package/dist/routing/classifier.js.map +1 -0
- package/dist/routing/escalation.d.ts +12 -0
- package/dist/routing/escalation.js +30 -0
- package/dist/routing/escalation.js.map +1 -0
- package/dist/routing/model-discovery.d.ts +3 -0
- package/dist/routing/model-discovery.js +96 -0
- package/dist/routing/model-discovery.js.map +1 -0
- package/dist/routing/model-resolver.d.ts +26 -0
- package/dist/routing/model-resolver.js +66 -0
- package/dist/routing/model-resolver.js.map +1 -0
- package/dist/superpowers/compatibility.d.ts +2 -0
- package/dist/superpowers/compatibility.js +9 -0
- package/dist/superpowers/compatibility.js.map +1 -0
- package/dist/telemetry/ledger.d.ts +68 -0
- package/dist/telemetry/ledger.js +179 -0
- package/dist/telemetry/ledger.js.map +1 -0
- package/dist/tools.d.ts +4 -0
- package/dist/tools.js +57 -0
- package/dist/tools.js.map +1 -0
- package/package.json +79 -0
- package/prompts/judge.md +13 -0
- package/prompts/lead.md +24 -0
- package/schema/opencode-orchestra.schema.json +112 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="ru">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<meta name="theme-color" content="#090b10" />
|
|
7
|
+
<title>Orchestra Control</title>
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-Bhe8OPZD.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-89Gs8jun.css">
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div id="root"></div>
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { OrchestraConfig } from "../config/schema.js";
|
|
2
|
+
import type { AgentSet } from "./types.js";
|
|
3
|
+
export interface PromptBundle {
|
|
4
|
+
lead: string;
|
|
5
|
+
judge: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function createAgentSet(config: OrchestraConfig, prompts: PromptBundle): AgentSet;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createJudgeAgent } from "./judge.js";
|
|
2
|
+
import { createLeadAgent } from "./lead.js";
|
|
3
|
+
import { createWorkerAgents } from "./workers.js";
|
|
4
|
+
export function createAgentSet(config, prompts) {
|
|
5
|
+
const agents = {
|
|
6
|
+
"orch-lead": createLeadAgent(config, prompts.lead),
|
|
7
|
+
...createWorkerAgents(config),
|
|
8
|
+
"orch-judge": createJudgeAgent(config, prompts.judge),
|
|
9
|
+
};
|
|
10
|
+
for (const [name, model] of Object.entries(config.models.agents)) {
|
|
11
|
+
if (agents[name])
|
|
12
|
+
agents[name].model = model;
|
|
13
|
+
}
|
|
14
|
+
return agents;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=build.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/agents/build.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAOjD,MAAM,UAAU,cAAc,CAAC,MAAuB,EAAE,OAAqB;IAC3E,MAAM,MAAM,GAAa;QACvB,WAAW,EAAE,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC;QAClD,GAAG,kBAAkB,CAAC,MAAM,CAAC;QAC7B,YAAY,EAAE,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC;KACtD,CAAA;IACD,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QACjE,IAAI,MAAM,CAAC,IAAI,CAAC;YAAE,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,GAAG,KAAK,CAAA;IAC9C,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { resolveModel } from "../routing/model-resolver.js";
|
|
2
|
+
export function createJudgeAgent(config, prompt) {
|
|
3
|
+
const resolved = resolveModel({
|
|
4
|
+
pool: config.models.judge,
|
|
5
|
+
capability: "review",
|
|
6
|
+
budget: config.budget,
|
|
7
|
+
allowPaid: config.orchestration.premiumEscalation,
|
|
8
|
+
preferredTiers: ["frontier"],
|
|
9
|
+
});
|
|
10
|
+
return {
|
|
11
|
+
description: "Hidden frontier-model arbiter for critical or genuinely unresolved worker disagreement.",
|
|
12
|
+
mode: "subagent",
|
|
13
|
+
prompt: prompt.trim(),
|
|
14
|
+
hidden: true,
|
|
15
|
+
temperature: 0.1,
|
|
16
|
+
permission: {
|
|
17
|
+
"*": "deny",
|
|
18
|
+
read: "allow",
|
|
19
|
+
glob: "allow",
|
|
20
|
+
grep: "allow",
|
|
21
|
+
list: "allow",
|
|
22
|
+
lsp: "allow",
|
|
23
|
+
task: "deny",
|
|
24
|
+
external_directory: "ask",
|
|
25
|
+
},
|
|
26
|
+
...(resolved ? { model: resolved.id } : {}),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=judge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"judge.js","sourceRoot":"","sources":["../../src/agents/judge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAG3D,MAAM,UAAU,gBAAgB,CAAC,MAAuB,EAAE,MAAc;IACtE,MAAM,QAAQ,GAAG,YAAY,CAAC;QAC5B,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK;QACzB,UAAU,EAAE,QAAQ;QACpB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,SAAS,EAAE,MAAM,CAAC,aAAa,CAAC,iBAAiB;QACjD,cAAc,EAAE,CAAC,UAAU,CAAC;KAC7B,CAAC,CAAA;IAEF,OAAO;QACL,WAAW,EAAE,yFAAyF;QACtG,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE;QACrB,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,GAAG;QAChB,UAAU,EAAE;YACV,GAAG,EAAE,MAAM;YACX,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,OAAO;YACb,GAAG,EAAE,OAAO;YACZ,IAAI,EAAE,MAAM;YACZ,kBAAkB,EAAE,KAAK;SAC1B;QACD,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5C,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { PROFILE_CATALOG } from "../profiles/catalog.js";
|
|
2
|
+
import { resolveModel } from "../routing/model-resolver.js";
|
|
3
|
+
export function createLeadAgent(config, basePrompt) {
|
|
4
|
+
const enabled = Object.values(PROFILE_CATALOG).filter((profile) => config.orchestration.profiles[profile.name] !== false);
|
|
5
|
+
const profileGuide = enabled
|
|
6
|
+
.map((profile) => `- ${profile.name}: ${profile.purpose} Preferred workers: ${profile.workers.join(", ")}.`)
|
|
7
|
+
.join("\n");
|
|
8
|
+
const workerPermissions = Object.fromEntries(Array.from(new Set(enabled.flatMap((profile) => profile.workers))).map((worker) => [worker, "allow"]));
|
|
9
|
+
const resolved = resolveModel({
|
|
10
|
+
pool: config.models.lead,
|
|
11
|
+
capability: "reasoning",
|
|
12
|
+
budget: config.budget,
|
|
13
|
+
allowPaid: config.budget === "quality" || config.budget === "ebobo",
|
|
14
|
+
preferredCosts: config.budget === "balanced"
|
|
15
|
+
? ["subscription"]
|
|
16
|
+
: config.budget === "eco"
|
|
17
|
+
? ["free"]
|
|
18
|
+
: [],
|
|
19
|
+
preferredTiers: config.budget === "balanced"
|
|
20
|
+
? ["lead"]
|
|
21
|
+
: config.budget === "quality" || config.budget === "ebobo"
|
|
22
|
+
? ["frontier", "lead"]
|
|
23
|
+
: [],
|
|
24
|
+
});
|
|
25
|
+
return {
|
|
26
|
+
description: "Orchestration lead that classifies complex work, dispatches a small specialist team, synthesizes evidence, and escalates only unresolved disagreement.",
|
|
27
|
+
mode: "subagent",
|
|
28
|
+
prompt: `${basePrompt.trim()}\n\nEnabled profiles:\n${profileGuide}\n\nRuntime limits: dispatch at most ${config.orchestration.maxWorkers} workers total and at most ${config.orchestration.parallelWorkers} concurrently. Budget mode: ${config.budget}.${config.budget === "ebobo" ? " EBOBO MODE: dispatch the full available specialist roster in parallel, require independent evidence, and always use orch-judge for frontier arbitration." : ""}`,
|
|
29
|
+
hidden: false,
|
|
30
|
+
temperature: 0.2,
|
|
31
|
+
color: "accent",
|
|
32
|
+
permission: {
|
|
33
|
+
"*": "deny",
|
|
34
|
+
read: "allow",
|
|
35
|
+
glob: "allow",
|
|
36
|
+
grep: "allow",
|
|
37
|
+
list: "allow",
|
|
38
|
+
lsp: "allow",
|
|
39
|
+
"context7_*": "allow",
|
|
40
|
+
"codebase-memory_*": "allow",
|
|
41
|
+
"codebase_memory_*": "allow",
|
|
42
|
+
"codebase-memory-mcp_*": "allow",
|
|
43
|
+
"memorygraph_*": "allow",
|
|
44
|
+
task: {
|
|
45
|
+
"*": "deny",
|
|
46
|
+
...workerPermissions,
|
|
47
|
+
"orch-judge": "allow",
|
|
48
|
+
},
|
|
49
|
+
external_directory: "ask",
|
|
50
|
+
},
|
|
51
|
+
...(resolved ? { model: resolved.id } : {}),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=lead.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lead.js","sourceRoot":"","sources":["../../src/agents/lead.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAG3D,MAAM,UAAU,eAAe,CAAC,MAAuB,EAAE,UAAkB;IACzE,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,MAAM,CACnD,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,KAAK,CACnE,CAAA;IACD,MAAM,YAAY,GAAG,OAAO;SACzB,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,KAAK,OAAO,CAAC,OAAO,uBAAuB,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;SAC3G,IAAI,CAAC,IAAI,CAAC,CA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CAAC,CAAC,CAAC,2JAA2J,CAAC,CAAC,CAAC,EAAE,EAAE;QACzb,MAAM,EAAE,KAAK;QACb,WAAW,EAAE,GAAG;QAChB,KAAK,EAAE,QAAQ;QACf,UAAU,EAAE;YACV,GAAG,EAAE,MAAM;YACX,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,OAAO;YACb,GAAG,EAAE,OAAO;YACZ,YAAY,EAAE,OAAO;YACrB,mBAAmB,EAAE,OAAO;YAC5B,mBAAmB,EAAE,OAAO;YAC5B,uBAAuB,EAAE,OAAO;YAChC,eAAe,EAAE,OAAO;YACxB,IAAI,EAAE;gBACJ,GAAG,EAAE,MAAM;gBACX,GAAG,iBAAiB;gBACpB,YAAY,EAAE,OAAO;aACtB;YACD,kBAAkB,EAAE,KAAK;SAC1B;QACD,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5C,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type PermissionAction = "allow" | "ask" | "deny";
|
|
2
|
+
export interface RuntimeAgentConfig {
|
|
3
|
+
description: string;
|
|
4
|
+
mode: "subagent";
|
|
5
|
+
prompt: string;
|
|
6
|
+
model?: string;
|
|
7
|
+
hidden?: boolean;
|
|
8
|
+
temperature?: number;
|
|
9
|
+
color?: string;
|
|
10
|
+
permission: Record<string, PermissionAction | Record<string, PermissionAction>>;
|
|
11
|
+
}
|
|
12
|
+
export interface AgentSet {
|
|
13
|
+
[name: string]: RuntimeAgentConfig;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/agents/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { resolveModel } from "../routing/model-resolver.js";
|
|
2
|
+
const READ_ONLY = {
|
|
3
|
+
"*": "deny",
|
|
4
|
+
read: "allow",
|
|
5
|
+
glob: "allow",
|
|
6
|
+
grep: "allow",
|
|
7
|
+
list: "allow",
|
|
8
|
+
lsp: "allow",
|
|
9
|
+
"codebase-memory_*": "allow",
|
|
10
|
+
"codebase_memory_*": "allow",
|
|
11
|
+
"codebase-memory-mcp_*": "allow",
|
|
12
|
+
task: "deny",
|
|
13
|
+
external_directory: "ask",
|
|
14
|
+
};
|
|
15
|
+
const WORKERS = {
|
|
16
|
+
"orch-repo": {
|
|
17
|
+
description: "Internal read-only repository scout for focused codebase evidence, ownership, patterns, and change impact.",
|
|
18
|
+
prompt: "Inspect the repository for the exact question. Start with Codebase Memory graph tools for structural discovery, then verify decisive claims against exact source. Return compact evidence with file paths, symbols, coverage, and uncertainties. Do not edit files or delegate.",
|
|
19
|
+
pool: "code",
|
|
20
|
+
capability: "code",
|
|
21
|
+
permission: READ_ONLY,
|
|
22
|
+
},
|
|
23
|
+
"orch-docs": {
|
|
24
|
+
description: "Internal official-documentation and dependency-source scout.",
|
|
25
|
+
prompt: "Research official documentation and upstream source. Prefer primary sources, cite direct URLs, distinguish facts from inference, and do not edit or delegate.",
|
|
26
|
+
pool: "research",
|
|
27
|
+
capability: "research",
|
|
28
|
+
permission: { ...READ_ONLY, webfetch: "allow", websearch: "allow", "context7_*": "allow" },
|
|
29
|
+
},
|
|
30
|
+
"orch-tests": {
|
|
31
|
+
description: "Internal test scout that finds reproduction paths, coverage gaps, and safe verification commands.",
|
|
32
|
+
prompt: "Inspect tests and reproduction paths. Use Codebase Memory to find impacted callers, callees, and test surfaces before targeted source checks. You may run read-only or test commands, but never edit. Return the smallest useful regression-test recommendation.",
|
|
33
|
+
pool: "code",
|
|
34
|
+
capability: "code",
|
|
35
|
+
permission: {
|
|
36
|
+
...READ_ONLY,
|
|
37
|
+
bash: {
|
|
38
|
+
"*": "ask",
|
|
39
|
+
"git status*": "allow",
|
|
40
|
+
"git diff*": "allow",
|
|
41
|
+
"*test*": "allow",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
"orch-research": {
|
|
46
|
+
description: "Internal technical researcher for implementations, standards, and current ecosystem evidence.",
|
|
47
|
+
prompt: "Find high-signal technical references. Prefer official docs, standards, and source code. Return evidence and decision implications; do not edit or delegate.",
|
|
48
|
+
pool: "research",
|
|
49
|
+
capability: "research",
|
|
50
|
+
permission: { ...READ_ONLY, webfetch: "allow", websearch: "allow", "context7_*": "allow" },
|
|
51
|
+
},
|
|
52
|
+
"orch-critic": {
|
|
53
|
+
description: "Internal independent critic that challenges conclusions and detects missing evidence or unsafe assumptions.",
|
|
54
|
+
prompt: "Independently critique the proposed conclusion. Identify contradictions, missing evidence, hidden assumptions, and the strongest alternative. Do not edit or delegate.",
|
|
55
|
+
pool: "reasoning",
|
|
56
|
+
capability: "review",
|
|
57
|
+
permission: READ_ONLY,
|
|
58
|
+
},
|
|
59
|
+
"orch-security": {
|
|
60
|
+
description: "Internal security scout for concrete trust-boundary, authorization, secret, and data-handling risks.",
|
|
61
|
+
prompt: "Perform a focused security analysis. Report only evidence-backed attack paths with impact, likelihood, and mitigation. Do not edit or delegate.",
|
|
62
|
+
pool: "reasoning",
|
|
63
|
+
capability: "security",
|
|
64
|
+
permission: { ...READ_ONLY, webfetch: "allow", websearch: "allow" },
|
|
65
|
+
},
|
|
66
|
+
"orch-visual-reference": {
|
|
67
|
+
description: "Internal visual-reference scout for UI patterns, layout, motion, and interaction examples.",
|
|
68
|
+
prompt: "Collect relevant visual references and explain which concrete layout, hierarchy, motion, and interaction ideas transfer to this product. Do not edit or delegate.",
|
|
69
|
+
pool: "vision",
|
|
70
|
+
capability: "vision",
|
|
71
|
+
permission: { ...READ_ONLY, webfetch: "allow", websearch: "allow" },
|
|
72
|
+
},
|
|
73
|
+
"orch-visual-generate": {
|
|
74
|
+
description: "Internal visual generator for exploratory mockups when an image-generation tool is available.",
|
|
75
|
+
prompt: "Generate only the requested exploratory visual asset. Preserve product constraints, label assumptions, and return the asset plus a short rationale. Do not delegate.",
|
|
76
|
+
pool: "image",
|
|
77
|
+
capability: "image",
|
|
78
|
+
permission: { "*": "deny", "image*": "allow", task: "deny" },
|
|
79
|
+
},
|
|
80
|
+
"orch-visual-review": {
|
|
81
|
+
description: "Internal vision reviewer for screenshots, mockups, hierarchy, accessibility, and visual regressions.",
|
|
82
|
+
prompt: "Review the provided visual material against the task. Report observable issues, severity, and precise recommendations. Do not edit or delegate.",
|
|
83
|
+
pool: "vision",
|
|
84
|
+
capability: "vision",
|
|
85
|
+
permission: READ_ONLY,
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
export function createWorkerAgents(config) {
|
|
89
|
+
return Object.fromEntries(Object.entries(WORKERS).map(([name, spec]) => {
|
|
90
|
+
const resolved = resolveModel({
|
|
91
|
+
pool: config.models.worker[spec.pool],
|
|
92
|
+
capability: spec.capability,
|
|
93
|
+
budget: config.budget,
|
|
94
|
+
allowPaid: config.budget === "quality" || config.budget === "ebobo",
|
|
95
|
+
preferredCosts: config.budget === "eco" || config.budget === "balanced" ? ["free"] : [],
|
|
96
|
+
preferredTiers: config.budget === "ebobo"
|
|
97
|
+
? ["frontier", "lead"]
|
|
98
|
+
: config.budget === "quality"
|
|
99
|
+
? ["lead", "frontier"]
|
|
100
|
+
: ["worker"],
|
|
101
|
+
});
|
|
102
|
+
const agent = {
|
|
103
|
+
description: spec.description,
|
|
104
|
+
mode: "subagent",
|
|
105
|
+
prompt: spec.prompt,
|
|
106
|
+
hidden: !config.orchestration.exposeWorkers,
|
|
107
|
+
temperature: 0.15,
|
|
108
|
+
permission: spec.permission,
|
|
109
|
+
...(resolved ? { model: resolved.id } : {}),
|
|
110
|
+
};
|
|
111
|
+
return [name, agent];
|
|
112
|
+
}));
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=workers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workers.js","sourceR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r/bin/env bun
|
|
2
|
+
export interface InstallOptions {
|
|
3
|
+
configDirectory?: string;
|
|
4
|
+
context7: boolean;
|
|
5
|
+
codebaseMemory: boolean;
|
|
6
|
+
memoryGraph: boolean;
|
|
7
|
+
provisionDependencies: boolean;
|
|
8
|
+
force: boolean;
|
|
9
|
+
dryRun: boolean;
|
|
10
|
+
}
|
|
11
|
+
type DependencyStatus = "installed" | "existing" | "skipped";
|
|
12
|
+
export interface InstallResult {
|
|
13
|
+
openCodeConfig: string;
|
|
14
|
+
orchestraConfig: string;
|
|
15
|
+
changed: string[];
|
|
16
|
+
preserved: string[];
|
|
17
|
+
backup?: string;
|
|
18
|
+
dependencies: {
|
|
19
|
+
codebaseMemory: DependencyStatus;
|
|
20
|
+
memoryGraph: DependencyStatus;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export declare function install(options: InstallOptions): Promise<InstallResult>;
|
|
24
|
+
export {};
|