@jmanuelcorral/openteam 0.9.3 → 0.9.4
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.es.md +1 -1
- package/README.md +1 -1
- package/dist/cli.js +22 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +104 -20
- package/dist/opencodeArtifacts/orchestratorAgent.d.ts.map +1 -1
- package/dist/orchestrator/roster.d.ts +10 -2
- package/dist/orchestrator/roster.d.ts.map +1 -1
- package/dist/orchestrator/rosterPersistence.d.ts +14 -13
- package/dist/orchestrator/rosterPersistence.d.ts.map +1 -1
- package/dist/plugin/registerCastTool.d.ts +33 -0
- package/dist/plugin/registerCastTool.d.ts.map +1 -0
- package/package.json +1 -1
package/README.es.md
CHANGED
|
@@ -819,7 +819,7 @@ Consulta [docs/compatibility.md](docs/compatibility.md). Resumen verificado el `
|
|
|
819
819
|
|
|
820
820
|
| Superficie | Versión / contrato |
|
|
821
821
|
| --- | --- |
|
|
822
|
-
| openteam | `0.9.
|
|
822
|
+
| openteam | `0.9.4`; versión actual del paquete |
|
|
823
823
|
| `@opencode-ai/plugin` | `1.18.19` |
|
|
824
824
|
| `@opencode-ai/sdk` | `1.18.19` |
|
|
825
825
|
| Hook de routing | `chat.message`; no `chat.params` para cambiar modelo |
|
package/README.md
CHANGED
|
@@ -700,7 +700,7 @@ See [docs/compatibility.md](docs/compatibility.md). Verified summary as of `2026
|
|
|
700
700
|
|
|
701
701
|
| Surface | Version / contract |
|
|
702
702
|
| --- | --- |
|
|
703
|
-
| openteam | `0.9.
|
|
703
|
+
| openteam | `0.9.4`; current package version |
|
|
704
704
|
| `@opencode-ai/plugin` | `1.18.19` |
|
|
705
705
|
| `@opencode-ai/sdk` | `1.18.19` |
|
|
706
706
|
| Routing hook | `chat.message`; not `chat.params` for model changes |
|
package/dist/cli.js
CHANGED
|
@@ -8660,16 +8660,21 @@ function buildOrchestratorAgent(frontier, options = {}) {
|
|
|
8660
8660
|
" `routing-cost` (plus the guaranteed `orchestrator`, `guardian`,",
|
|
8661
8661
|
" `scribe`, `ralph`). The roleID space is open: use free-form project",
|
|
8662
8662
|
" roleIDs only when no curated role fits.",
|
|
8663
|
-
`5. **Register the cast**
|
|
8664
|
-
"
|
|
8665
|
-
"
|
|
8666
|
-
|
|
8663
|
+
`5. **Register the cast** by calling the \`openteam-register-cast\` tool`,
|
|
8664
|
+
" with `{ universe, entries: [{ roleID, agentName }] }`. The tool validates",
|
|
8665
|
+
" the payload, re-asserts any missing guaranteed role, and persists the",
|
|
8666
|
+
` roster to \`${OPENTEAM_ROSTER_PATH}\` — outside \`.opencode/agent/\`,`,
|
|
8667
|
+
" which would otherwise load it as a phantom agent. Never write that file",
|
|
8668
|
+
" by hand: an invalid draft is rejected naming the offending field and",
|
|
8669
|
+
" nothing is written. Always reuse the same cast; do not re-cast without",
|
|
8670
|
+
" reason.",
|
|
8667
8671
|
"",
|
|
8668
8672
|
"## Roster file format",
|
|
8669
8673
|
"",
|
|
8670
|
-
"
|
|
8671
|
-
"`{ universe, entries: [{ roleID, agentName }] }
|
|
8672
|
-
"
|
|
8674
|
+
"`openteam-register-cast` persists the roster as Markdown with exactly one",
|
|
8675
|
+
"fenced `json` block matching `{ universe, entries: [{ roleID, agentName }] }`,",
|
|
8676
|
+
"and preserves any prose already in the document. Never write a table: the",
|
|
8677
|
+
"parser reads only the fenced block. Minimal parseable example:",
|
|
8673
8678
|
"",
|
|
8674
8679
|
"# openteam roster",
|
|
8675
8680
|
"",
|
|
@@ -8727,8 +8732,8 @@ function buildOrchestratorAgent(frontier, options = {}) {
|
|
|
8727
8732
|
" frontier only for architecture, security or ambiguous debugging:",
|
|
8728
8733
|
" openteam already routes cheapest-capable automatically.",
|
|
8729
8734
|
" - A focused, actionable role prompt.",
|
|
8730
|
-
|
|
8731
|
-
" tasks** to the newly created team with the `task` tool.",
|
|
8735
|
+
"4. Register the cast with the `openteam-register-cast` tool and **hand out",
|
|
8736
|
+
" the tasks** to the newly created team with the `task` tool.",
|
|
8732
8737
|
"",
|
|
8733
8738
|
"## Standard team roles",
|
|
8734
8739
|
"",
|
|
@@ -14656,16 +14661,18 @@ async function* linesFromReadable(readable) {
|
|
|
14656
14661
|
}
|
|
14657
14662
|
|
|
14658
14663
|
// src/orchestrator/rosterPersistence.ts
|
|
14659
|
-
function
|
|
14664
|
+
function rosterFence(roster) {
|
|
14660
14665
|
const data = { universe: roster.universe, entries: roster.entries };
|
|
14661
|
-
|
|
14666
|
+
return `\`\`\`json
|
|
14667
|
+
${JSON.stringify(data, null, 2)}
|
|
14668
|
+
\`\`\``;
|
|
14669
|
+
}
|
|
14670
|
+
function serializeRoster(roster) {
|
|
14662
14671
|
return `# openteam roster
|
|
14663
14672
|
|
|
14664
14673
|
Universe: ${roster.universe}
|
|
14665
14674
|
|
|
14666
|
-
|
|
14667
|
-
${json}
|
|
14668
|
-
\`\`\`
|
|
14675
|
+
${rosterFence(roster)}
|
|
14669
14676
|
`;
|
|
14670
14677
|
}
|
|
14671
14678
|
async function persistRoster(storage, roster, path4 = OPENTEAM_ROSTER_PATH) {
|
|
@@ -14958,7 +14965,7 @@ async function buildMemoryRuntimeFromConfig(config, deps, options = {}) {
|
|
|
14958
14965
|
// package.json
|
|
14959
14966
|
var package_default = {
|
|
14960
14967
|
name: "@jmanuelcorral/openteam",
|
|
14961
|
-
version: "0.9.
|
|
14968
|
+
version: "0.9.4",
|
|
14962
14969
|
packageManager: "bun@1.3.14",
|
|
14963
14970
|
description: "Cost-aware, local-first routing plugin for opencode with cheapest-capable frontier fallback and multi-agent orchestration.",
|
|
14964
14971
|
license: "MIT",
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,MAAM,EAEX,KAAK,YAAY,EAGlB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,KAAK,EAAE,OA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,OAAO,GAAG,OAAO,CAOrD;AA0CD,wBAAgB,aAAa,CAC3B,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,eAAe,EACzB,aAAa,EAAE,MAAM,EACrB,WAAW,GAAE,MAA6B,EAC1C,OAAO,GAAE,eAAwD,EACjE,cAAc,GAAE,YAAwB,EACxC,UAAU,CAAC,EAAE,OAAO,GACnB,OAAO,CA+FT;AA2JD,eAAO,MAAM,MAAM,EAAE,MAiVpB,CAAC;AAEF,QAAA,MAAM,MAAM,EAAE,YAGb,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;eAE7B,MAAM"}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
|
4
4
|
// src/index.ts
|
|
5
5
|
import { dirname as dirname4 } from "node:path";
|
|
6
6
|
import {
|
|
7
|
-
tool as
|
|
7
|
+
tool as tool6
|
|
8
8
|
} from "@opencode-ai/plugin";
|
|
9
9
|
|
|
10
10
|
// src/cli/graphOperator.ts
|
|
@@ -3673,16 +3673,21 @@ function buildOrchestratorAgent(frontier, options = {}) {
|
|
|
3673
3673
|
" `routing-cost` (plus the guaranteed `orchestrator`, `guardian`,",
|
|
3674
3674
|
" `scribe`, `ralph`). The roleID space is open: use free-form project",
|
|
3675
3675
|
" roleIDs only when no curated role fits.",
|
|
3676
|
-
`5. **Register the cast**
|
|
3677
|
-
"
|
|
3678
|
-
"
|
|
3679
|
-
|
|
3676
|
+
`5. **Register the cast** by calling the \`openteam-register-cast\` tool`,
|
|
3677
|
+
" with `{ universe, entries: [{ roleID, agentName }] }`. The tool validates",
|
|
3678
|
+
" the payload, re-asserts any missing guaranteed role, and persists the",
|
|
3679
|
+
` roster to \`${OPENTEAM_ROSTER_PATH}\` — outside \`.opencode/agent/\`,`,
|
|
3680
|
+
" which would otherwise load it as a phantom agent. Never write that file",
|
|
3681
|
+
" by hand: an invalid draft is rejected naming the offending field and",
|
|
3682
|
+
" nothing is written. Always reuse the same cast; do not re-cast without",
|
|
3683
|
+
" reason.",
|
|
3680
3684
|
"",
|
|
3681
3685
|
"## Roster file format",
|
|
3682
3686
|
"",
|
|
3683
|
-
"
|
|
3684
|
-
"`{ universe, entries: [{ roleID, agentName }] }
|
|
3685
|
-
"
|
|
3687
|
+
"`openteam-register-cast` persists the roster as Markdown with exactly one",
|
|
3688
|
+
"fenced `json` block matching `{ universe, entries: [{ roleID, agentName }] }`,",
|
|
3689
|
+
"and preserves any prose already in the document. Never write a table: the",
|
|
3690
|
+
"parser reads only the fenced block. Minimal parseable example:",
|
|
3686
3691
|
"",
|
|
3687
3692
|
"# openteam roster",
|
|
3688
3693
|
"",
|
|
@@ -3740,8 +3745,8 @@ function buildOrchestratorAgent(frontier, options = {}) {
|
|
|
3740
3745
|
" frontier only for architecture, security or ambiguous debugging:",
|
|
3741
3746
|
" openteam already routes cheapest-capable automatically.",
|
|
3742
3747
|
" - A focused, actionable role prompt.",
|
|
3743
|
-
|
|
3744
|
-
" tasks** to the newly created team with the `task` tool.",
|
|
3748
|
+
"4. Register the cast with the `openteam-register-cast` tool and **hand out",
|
|
3749
|
+
" the tasks** to the newly created team with the `task` tool.",
|
|
3745
3750
|
"",
|
|
3746
3751
|
"## Standard team roles",
|
|
3747
3752
|
"",
|
|
@@ -6859,22 +6864,40 @@ async function dispatchGuaranteedRole(agentName, agentFileExists, dispatch) {
|
|
|
6859
6864
|
}
|
|
6860
6865
|
|
|
6861
6866
|
// src/orchestrator/rosterPersistence.ts
|
|
6862
|
-
function
|
|
6867
|
+
function rosterFence(roster) {
|
|
6863
6868
|
const data = { universe: roster.universe, entries: roster.entries };
|
|
6864
|
-
|
|
6869
|
+
return `\`\`\`json
|
|
6870
|
+
${JSON.stringify(data, null, 2)}
|
|
6871
|
+
\`\`\``;
|
|
6872
|
+
}
|
|
6873
|
+
function serializeRoster(roster) {
|
|
6865
6874
|
return `# openteam roster
|
|
6866
6875
|
|
|
6867
6876
|
Universe: ${roster.universe}
|
|
6868
6877
|
|
|
6869
|
-
|
|
6870
|
-
${json}
|
|
6871
|
-
\`\`\`
|
|
6878
|
+
${rosterFence(roster)}
|
|
6872
6879
|
`;
|
|
6873
6880
|
}
|
|
6881
|
+
function replaceRosterFence(existing, roster) {
|
|
6882
|
+
if (existing === undefined || existing.trim() === "") {
|
|
6883
|
+
return serializeRoster(roster);
|
|
6884
|
+
}
|
|
6885
|
+
const fence = rosterFence(roster);
|
|
6886
|
+
if (ROSTER_JSON_FENCE.test(existing)) {
|
|
6887
|
+
return existing.replace(ROSTER_JSON_FENCE, () => fence);
|
|
6888
|
+
}
|
|
6889
|
+
return `${serializeRoster(roster)}
|
|
6890
|
+
${existing}`;
|
|
6891
|
+
}
|
|
6874
6892
|
async function persistRoster(storage, roster, path2 = OPENTEAM_ROSTER_PATH) {
|
|
6875
6893
|
await storage.write(path2, serializeRoster(roster));
|
|
6876
6894
|
return path2;
|
|
6877
6895
|
}
|
|
6896
|
+
async function persistRosterPreservingProse(storage, roster, path2 = OPENTEAM_ROSTER_PATH) {
|
|
6897
|
+
const existing = await storage.read(path2);
|
|
6898
|
+
await storage.write(path2, replaceRosterFence(existing, roster));
|
|
6899
|
+
return path2;
|
|
6900
|
+
}
|
|
6878
6901
|
async function loadRosterFile(storage, path2 = OPENTEAM_ROSTER_PATH) {
|
|
6879
6902
|
const content = await storage.read(path2);
|
|
6880
6903
|
if (content === undefined) {
|
|
@@ -12541,6 +12564,65 @@ function createOrchestrateTool(deps) {
|
|
|
12541
12564
|
});
|
|
12542
12565
|
}
|
|
12543
12566
|
|
|
12567
|
+
// src/plugin/registerCastTool.ts
|
|
12568
|
+
import { tool as tool5 } from "@opencode-ai/plugin";
|
|
12569
|
+
import { z as z26 } from "zod";
|
|
12570
|
+
var CastEntrySchema = z26.object({
|
|
12571
|
+
roleID: z26.string().min(1).describe("Stable role identifier, e.g. scribe or guardian"),
|
|
12572
|
+
agentName: z26.string().min(1).describe("Themed character name assigned to the role")
|
|
12573
|
+
}).strict();
|
|
12574
|
+
var RegisterCastPayloadSchema = z26.object({
|
|
12575
|
+
universe: z26.string().min(1).describe("Casting universe for this roster"),
|
|
12576
|
+
entries: z26.array(CastEntrySchema).min(1).describe("Role-to-name mappings")
|
|
12577
|
+
}).strict();
|
|
12578
|
+
function offendingFields(error) {
|
|
12579
|
+
const fields = error.issues.flatMap((issue) => {
|
|
12580
|
+
const base = issue.path.map((segment) => String(segment));
|
|
12581
|
+
if (issue.code === "unrecognized_keys") {
|
|
12582
|
+
return issue.keys.map((key) => [...base, key].join("."));
|
|
12583
|
+
}
|
|
12584
|
+
return [base.join(".") || "(root)"];
|
|
12585
|
+
});
|
|
12586
|
+
return [...new Set(fields)];
|
|
12587
|
+
}
|
|
12588
|
+
async function registerCast(storage, draft, path4 = OPENTEAM_ROSTER_PATH) {
|
|
12589
|
+
const parsed = RegisterCastPayloadSchema.safeParse(draft);
|
|
12590
|
+
if (!parsed.success) {
|
|
12591
|
+
const fields = offendingFields(parsed.error);
|
|
12592
|
+
return {
|
|
12593
|
+
ok: false,
|
|
12594
|
+
error: `cast draft rejected — invalid field(s): ${fields.join(", ")}`,
|
|
12595
|
+
fields
|
|
12596
|
+
};
|
|
12597
|
+
}
|
|
12598
|
+
const roster = enforceGuaranteedRoles({
|
|
12599
|
+
universe: parsed.data.universe,
|
|
12600
|
+
entries: parsed.data.entries
|
|
12601
|
+
});
|
|
12602
|
+
const written = await persistRosterPreservingProse(storage, roster, path4);
|
|
12603
|
+
return { ok: true, path: written, roster };
|
|
12604
|
+
}
|
|
12605
|
+
function createRegisterCastTool(deps) {
|
|
12606
|
+
return tool5({
|
|
12607
|
+
description: "Registers the orchestrator's cast as the project roster. Use this " + "instead of writing the roster file directly: the payload is validated " + "before anything is persisted, guaranteed roles are added automatically, " + "and curated prose already in the document is preserved.",
|
|
12608
|
+
args: {
|
|
12609
|
+
universe: tool5.schema.string().describe("Casting universe for this roster"),
|
|
12610
|
+
entries: tool5.schema.array(tool5.schema.object({
|
|
12611
|
+
roleID: tool5.schema.string().describe("Stable role identifier, e.g. scribe or guardian"),
|
|
12612
|
+
agentName: tool5.schema.string().describe("Themed character name assigned to the role")
|
|
12613
|
+
})).describe("Role-to-name mappings")
|
|
12614
|
+
},
|
|
12615
|
+
async execute(args) {
|
|
12616
|
+
const result = await registerCast(deps.storage, args, deps.rosterPath ?? OPENTEAM_ROSTER_PATH);
|
|
12617
|
+
if (!result.ok) {
|
|
12618
|
+
return `validation error: ${result.error}`;
|
|
12619
|
+
}
|
|
12620
|
+
const roles = result.roster.entries.map((entry) => `${entry.roleID}=${entry.agentName}`).join(", ");
|
|
12621
|
+
return `registered ${result.roster.entries.length} roles in ${result.path} (${roles})`;
|
|
12622
|
+
}
|
|
12623
|
+
});
|
|
12624
|
+
}
|
|
12625
|
+
|
|
12544
12626
|
// src/plugin/sessionTracker.ts
|
|
12545
12627
|
function createSessionTracker() {
|
|
12546
12628
|
const knownSessions = new Set;
|
|
@@ -12813,7 +12895,7 @@ var createOtlpSpanExporter = (connection, config) => {
|
|
|
12813
12895
|
// package.json
|
|
12814
12896
|
var package_default = {
|
|
12815
12897
|
name: "@jmanuelcorral/openteam",
|
|
12816
|
-
version: "0.9.
|
|
12898
|
+
version: "0.9.4",
|
|
12817
12899
|
packageManager: "bun@1.3.14",
|
|
12818
12900
|
description: "Cost-aware, local-first routing plugin for opencode with cheapest-capable frontier fallback and multi-agent orchestration.",
|
|
12819
12901
|
license: "MIT",
|
|
@@ -13386,11 +13468,11 @@ function createLoopTool(deps) {
|
|
|
13386
13468
|
const defaultRalphAgent = TEAM_ROLES[RALPH_ROLE_ID]?.opencodeAgent ?? RALPH_ROLE_ID;
|
|
13387
13469
|
const agentDir = dirname4(ORCHESTRATOR_AGENT_PATH);
|
|
13388
13470
|
const agentFileExists = (agentName) => deps.storage.exists(`${agentDir}/${agentName}.md`);
|
|
13389
|
-
return
|
|
13471
|
+
return tool6({
|
|
13390
13472
|
description: "Runs openteam's bounded Ralph-pattern loop: dispatches the guaranteed " + "ralph role repeatedly until done or the iteration cap. Ensures a roster " + "exists and fails closed when the ralph agent file is missing (run " + "`openteam setup`).",
|
|
13391
13473
|
args: {
|
|
13392
|
-
prompt:
|
|
13393
|
-
maxIterations:
|
|
13474
|
+
prompt: tool6.schema.string().describe("Work prompt for the ralph loop"),
|
|
13475
|
+
maxIterations: tool6.schema.number().int().positive().optional().describe("Iteration cap (defaults to the ralph loop default)")
|
|
13394
13476
|
},
|
|
13395
13477
|
async execute(args) {
|
|
13396
13478
|
const prompt = typeof args.prompt === "string" ? args.prompt : "";
|
|
@@ -13592,6 +13674,7 @@ var server = async (ctx, rawOptions) => {
|
|
|
13592
13674
|
runtimeLimiter
|
|
13593
13675
|
}
|
|
13594
13676
|
});
|
|
13677
|
+
const registerCastTool = createRegisterCastTool({ storage });
|
|
13595
13678
|
return {
|
|
13596
13679
|
...hooks,
|
|
13597
13680
|
tool: {
|
|
@@ -13599,7 +13682,8 @@ var server = async (ctx, rawOptions) => {
|
|
|
13599
13682
|
"openteam-graph": graphSurface.definition,
|
|
13600
13683
|
"openteam-orchestrate": orchestrateTool,
|
|
13601
13684
|
"openteam-memory": memoryTool,
|
|
13602
|
-
"openteam-loop": loopTool
|
|
13685
|
+
"openteam-loop": loopTool,
|
|
13686
|
+
"openteam-register-cast": registerCastTool
|
|
13603
13687
|
},
|
|
13604
13688
|
"tool.execute.before": async (input) => {
|
|
13605
13689
|
toolcalls.before(input);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestratorAgent.d.ts","sourceRoot":"","sources":["../../src/opencodeArtifacts/orchestratorAgent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,uBAAuB,gCAAgC,CAAC;AAErE;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,iCAAiC,CAAC;AAInE;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,cAAc,EACxB,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAC/B,MAAM,
|
|
1
|
+
{"version":3,"file":"orchestratorAgent.d.ts","sourceRoot":"","sources":["../../src/opencodeArtifacts/orchestratorAgent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,uBAAuB,gCAAgC,CAAC;AAErE;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,iCAAiC,CAAC;AAInE;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,cAAc,EACxB,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAC/B,MAAM,CAwRR"}
|
|
@@ -29,6 +29,12 @@ export declare const RosterSchema: z.ZodObject<{
|
|
|
29
29
|
}, z.core.$strict>;
|
|
30
30
|
export type RosterEntry = z.infer<typeof RosterEntrySchema>;
|
|
31
31
|
export type Roster = z.infer<typeof RosterSchema>;
|
|
32
|
+
/**
|
|
33
|
+
* The fenced `json` block is the machine-owned region of the roster document.
|
|
34
|
+
* Exported so persistence repairs exactly the region this parser reads: a second
|
|
35
|
+
* copy of this pattern would silently drift from the parser it must match.
|
|
36
|
+
*/
|
|
37
|
+
export declare const ROSTER_JSON_FENCE: RegExp;
|
|
32
38
|
export type RosterParseErrorCode = "missing-json-block" | "malformed-json" | "invalid-roster-schema";
|
|
33
39
|
export declare class RosterParseError extends Error {
|
|
34
40
|
readonly code: RosterParseErrorCode;
|
|
@@ -139,8 +145,10 @@ export type RosterDraft = {
|
|
|
139
145
|
};
|
|
140
146
|
/**
|
|
141
147
|
* Injected generation port (#172). Turns an initial prompt into a draft roster.
|
|
142
|
-
*
|
|
143
|
-
*
|
|
148
|
+
* Every current production call site passes a deterministic fallback source, and
|
|
149
|
+
* casts reach disk through the validated `openteam-register-cast` tool (#205) —
|
|
150
|
+
* not through a model writing the file. This port exists so a generated source
|
|
151
|
+
* can be injected without the decision core ever contacting a live LLM itself.
|
|
144
152
|
*/
|
|
145
153
|
export type RosterSource = (prompt: string) => RosterDraft | Promise<RosterDraft>;
|
|
146
154
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roster.d.ts","sourceRoot":"","sources":["../../src/orchestrator/roster.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,KAAK,gBAAgB,EAGtB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;GAaG;AAEH,mFAAmF;AACnF,eAAO,MAAM,iBAAiB;;;kBAKnB,CAAC;AAEZ,+DAA+D;AAC/D,eAAO,MAAM,YAAY;;;;;;kBAKd,CAAC;AAEZ,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"roster.d.ts","sourceRoot":"","sources":["../../src/orchestrator/roster.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,KAAK,gBAAgB,EAGtB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;GAaG;AAEH,mFAAmF;AACnF,eAAO,MAAM,iBAAiB;;;kBAKnB,CAAC;AAEZ,+DAA+D;AAC/D,eAAO,MAAM,YAAY;;;;;;kBAKd,CAAC;AAEZ,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,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AAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,WAAW,GACjB,MAAM,CAOR;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAMjE;AAED;;;;GAIG;AACH,wBAAsB,sBAAsB,CAC1C,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GACjE,OAAO,CAAC,IAAI,CAAC,CAIf;AAED;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAAC,CAAC,EAC5C,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,EAClE,QAAQ,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACzB,OAAO,CAAC,CAAC,CAAC,CAGZ"}
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import type { StorageProvider } from "../storage/provider";
|
|
2
2
|
import { type Roster, type RosterParseError } from "./roster";
|
|
3
3
|
export { parseRoster, parseRosterResult, RosterParseError } from "./roster";
|
|
4
|
+
/** Serialises a roster to the Markdown-with-JSON roster document. Pure. */
|
|
5
|
+
export declare function serializeRoster(roster: Roster): string;
|
|
4
6
|
/**
|
|
5
|
-
*
|
|
7
|
+
* Rewrites only the machine-owned JSON fence, preserving every other byte of an
|
|
8
|
+
* existing roster document. Pure.
|
|
6
9
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* lives OUTSIDE `.opencode/agent/` on purpose: opencode loads every `.md` there as
|
|
11
|
-
* an agent, so a roster inside it would appear as a phantom agent.
|
|
12
|
-
*
|
|
13
|
-
* Serialisation embeds the structured roster as a JSON block inside a Markdown
|
|
14
|
-
* document, so the write/parse round-trip is exact and Zod-validated while the file
|
|
15
|
-
* stays human-readable. All disk access goes through the injected
|
|
16
|
-
* {@link StorageProvider} boundary, so this module has no direct I/O.
|
|
10
|
+
* Curated prose — the character table and `## Convenciones` a team writes around
|
|
11
|
+
* the fence — is theirs, not ours: re-serialising the whole document on every cast
|
|
12
|
+
* registration would silently delete it (#205).
|
|
17
13
|
*/
|
|
18
|
-
|
|
19
|
-
export declare function serializeRoster(roster: Roster): string;
|
|
14
|
+
export declare function replaceRosterFence(existing: string | undefined, roster: Roster): string;
|
|
20
15
|
/** Writes the roster to the portable path; returns the path written. */
|
|
21
16
|
export declare function persistRoster(storage: StorageProvider, roster: Roster, path?: string): Promise<string>;
|
|
17
|
+
/**
|
|
18
|
+
* Persists a roster while preserving any curated prose already on disk.
|
|
19
|
+
* Prefer this over {@link persistRoster} for writes that may hit a document a
|
|
20
|
+
* human has edited.
|
|
21
|
+
*/
|
|
22
|
+
export declare function persistRosterPreservingProse(storage: StorageProvider, roster: Roster, path?: string): Promise<string>;
|
|
22
23
|
export type RosterFileLoadResult = {
|
|
23
24
|
readonly status: "absent";
|
|
24
25
|
readonly path: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rosterPersistence.d.ts","sourceRoot":"","sources":["../../src/orchestrator/rosterPersistence.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,
|
|
1
|
+
{"version":3,"file":"rosterPersistence.d.ts","sourceRoot":"","sources":["../../src/orchestrator/rosterPersistence.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAIL,KAAK,MAAM,EACX,KAAK,gBAAgB,EACtB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAuB5E,2EAA2E;AAC3E,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;;;;;;GA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AAO,EAAE,eAAe,EACxB,QAAQ,EAAE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,EACxC,IAAI,GAAE,MAA6B,GAClC,OAAO,CAAC,gBAAgB,CAAC,CAoB3B"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type ToolDefinition } from "@opencode-ai/plugin";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { type Roster } from "../orchestrator/roster";
|
|
4
|
+
import type { StorageProvider } from "../storage/provider";
|
|
5
|
+
export declare const RegisterCastPayloadSchema: z.ZodObject<{
|
|
6
|
+
universe: z.ZodString;
|
|
7
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
8
|
+
roleID: z.ZodString;
|
|
9
|
+
agentName: z.ZodString;
|
|
10
|
+
}, z.core.$strict>>;
|
|
11
|
+
}, z.core.$strict>;
|
|
12
|
+
export type RegisterCastPayload = z.infer<typeof RegisterCastPayloadSchema>;
|
|
13
|
+
export type RegisterCastResult = {
|
|
14
|
+
readonly ok: true;
|
|
15
|
+
readonly path: string;
|
|
16
|
+
readonly roster: Roster;
|
|
17
|
+
} | {
|
|
18
|
+
readonly ok: false;
|
|
19
|
+
readonly error: string;
|
|
20
|
+
readonly fields: readonly string[];
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Validates a cast draft and persists it, preserving curated prose.
|
|
24
|
+
* On rejection no write is attempted at all.
|
|
25
|
+
*/
|
|
26
|
+
export declare function registerCast(storage: StorageProvider, draft: unknown, path?: string): Promise<RegisterCastResult>;
|
|
27
|
+
export type RegisterCastDeps = {
|
|
28
|
+
readonly storage: StorageProvider;
|
|
29
|
+
readonly rosterPath?: string;
|
|
30
|
+
};
|
|
31
|
+
/** Builds the `openteam-register-cast` tool definition. */
|
|
32
|
+
export declare function createRegisterCastTool(deps: RegisterCastDeps): ToolDefinition;
|
|
33
|
+
//# sourceMappingURL=registerCastTool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3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-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"packageManager": "bun@1.3.14",
|
|
5
5
|
"description": "Cost-aware, local-first routing plugin for opencode with cheapest-capable frontier fallback and multi-agent orchestration.",
|
|
6
6
|
"license": "MIT",
|