crewbee 0.1.15 → 0.1.16
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 +32 -0
- package/README.zh-CN.md +32 -0
- package/dist/opencode-plugin.mjs +202 -51
- package/dist/src/adapters/opencode/config-hook.d.ts +2 -2
- package/dist/src/adapters/opencode/config-hook.d.ts.map +1 -1
- package/dist/src/adapters/opencode/config-hook.js +10 -1
- package/dist/src/adapters/opencode/config-hook.js.map +1 -1
- package/dist/src/adapters/opencode/delegation/prompt.d.ts.map +1 -1
- package/dist/src/adapters/opencode/delegation/prompt.js +1 -0
- package/dist/src/adapters/opencode/delegation/prompt.js.map +1 -1
- package/dist/src/adapters/opencode/delegation/tools.d.ts.map +1 -1
- package/dist/src/adapters/opencode/delegation/tools.js +48 -10
- package/dist/src/adapters/opencode/delegation/tools.js.map +1 -1
- package/dist/src/adapters/opencode/delegation/types.d.ts +1 -0
- package/dist/src/adapters/opencode/delegation/types.d.ts.map +1 -1
- package/dist/src/adapters/opencode/model-availability.d.ts +4 -0
- package/dist/src/adapters/opencode/model-availability.d.ts.map +1 -0
- package/dist/src/adapters/opencode/model-availability.js +36 -0
- package/dist/src/adapters/opencode/model-availability.js.map +1 -0
- package/dist/src/adapters/opencode/model-resolution.d.ts +3 -0
- package/dist/src/adapters/opencode/model-resolution.d.ts.map +1 -1
- package/dist/src/adapters/opencode/model-resolution.js +98 -27
- package/dist/src/adapters/opencode/model-resolution.js.map +1 -1
- package/dist/src/adapters/opencode/plugin.js +1 -1
- package/dist/src/adapters/opencode/plugin.js.map +1 -1
- package/dist/src/adapters/opencode/projection.d.ts +1 -0
- package/dist/src/adapters/opencode/projection.d.ts.map +1 -1
- package/dist/src/adapters/opencode/projection.js.map +1 -1
- package/dist/src/agent-teams/filesystem.d.ts +2 -0
- package/dist/src/agent-teams/filesystem.d.ts.map +1 -1
- package/dist/src/agent-teams/filesystem.js +12 -1
- package/dist/src/agent-teams/filesystem.js.map +1 -1
- package/dist/src/cli/doctor.d.ts.map +1 -1
- package/dist/src/cli/doctor.js +2 -0
- package/dist/src/cli/doctor.js.map +1 -1
- package/dist/src/core/index.d.ts +3 -0
- package/dist/src/core/index.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -532,6 +532,38 @@ Injects minimal CrewBee runtime information into the system prompt:
|
|
|
532
532
|
* Active Owner
|
|
533
533
|
* Mode
|
|
534
534
|
|
|
535
|
+
### Model resolution and fallback
|
|
536
|
+
|
|
537
|
+
CrewBee's model policy is reliability-first: recommended Coding Team models are not treated as hard requirements unless the user explicitly marks them strict.
|
|
538
|
+
|
|
539
|
+
During OpenCode projection, CrewBee reads OpenCode's configured provider/model registry through the plugin client and uses it as an availability filter:
|
|
540
|
+
|
|
541
|
+
* user `strict: true` model: projected as-is; failures belong to the explicit user configuration
|
|
542
|
+
* user non-strict model: used as primary when available; otherwise fallback candidates are considered
|
|
543
|
+
* built-in recommendations: projected only when the model is visible in the OpenCode provider/model registry
|
|
544
|
+
* unknown registry: CrewBee does not assume built-in recommendations are usable and falls back to OpenCode host default by omitting `model`
|
|
545
|
+
|
|
546
|
+
During delegated `task(...)` execution, non-strict model-not-found failures are retried once without a model so OpenCode can use the host default. Strict models are not retried.
|
|
547
|
+
|
|
548
|
+
Example override:
|
|
549
|
+
|
|
550
|
+
```jsonc
|
|
551
|
+
{
|
|
552
|
+
"teams": [
|
|
553
|
+
{
|
|
554
|
+
"id": "coding-team",
|
|
555
|
+
"agents": {
|
|
556
|
+
"reviewer": {
|
|
557
|
+
"model": "anthropic/claude-opus-4-7",
|
|
558
|
+
"strict": false,
|
|
559
|
+
"fallback_models": ["openai/gpt-5.5"]
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
]
|
|
564
|
+
}
|
|
565
|
+
```
|
|
566
|
+
|
|
535
567
|
---
|
|
536
568
|
|
|
537
569
|
## Built-in Coding Team
|
package/README.zh-CN.md
CHANGED
|
@@ -523,6 +523,38 @@ package.json
|
|
|
523
523
|
* Active Owner
|
|
524
524
|
* Mode
|
|
525
525
|
|
|
526
|
+
### 模型解析与 fallback
|
|
527
|
+
|
|
528
|
+
CrewBee 的模型策略以可靠交付为第一原则:内置 Coding Team 的推荐模型不是硬依赖,除非用户显式设置 `strict: true`。
|
|
529
|
+
|
|
530
|
+
在投影 OpenCode agent config 时,CrewBee 会通过插件 client 读取 OpenCode 当前配置的 provider/model registry,并把它作为可用性过滤依据:
|
|
531
|
+
|
|
532
|
+
* 用户 `strict: true` model:原样投影;失败视为用户显式配置负责
|
|
533
|
+
* 用户非 strict model:作为 primary;不可用时继续尝试 fallback candidates
|
|
534
|
+
* 内置推荐模型:只有出现在 OpenCode provider/model registry 中才投影
|
|
535
|
+
* registry 不可得:CrewBee 不假设内置推荐模型可用,而是通过不写 `model` 回退到 OpenCode host default
|
|
536
|
+
|
|
537
|
+
在实际执行 delegated `task(...)` 时,如果非 strict model 触发 model-not-found,CrewBee 会自动重试一次不带 model 的请求,让 OpenCode 使用 host default。Strict model 不会被自动重试。
|
|
538
|
+
|
|
539
|
+
示例覆盖:
|
|
540
|
+
|
|
541
|
+
```jsonc
|
|
542
|
+
{
|
|
543
|
+
"teams": [
|
|
544
|
+
{
|
|
545
|
+
"id": "coding-team",
|
|
546
|
+
"agents": {
|
|
547
|
+
"reviewer": {
|
|
548
|
+
"model": "anthropic/claude-opus-4-7",
|
|
549
|
+
"strict": false,
|
|
550
|
+
"fallback_models": ["openai/gpt-5.5"]
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
]
|
|
555
|
+
}
|
|
556
|
+
```
|
|
557
|
+
|
|
526
558
|
---
|
|
527
559
|
|
|
528
560
|
## 内置 Coding Team 的设计思想
|
package/dist/opencode-plugin.mjs
CHANGED
|
@@ -10534,6 +10534,13 @@ function isRecord3(value) {
|
|
|
10534
10534
|
function getOptionalBoolean(value, fallback) {
|
|
10535
10535
|
return typeof value === "boolean" ? value : fallback;
|
|
10536
10536
|
}
|
|
10537
|
+
function getOptionalStringArray(value) {
|
|
10538
|
+
if (!Array.isArray(value)) {
|
|
10539
|
+
return void 0;
|
|
10540
|
+
}
|
|
10541
|
+
const entries = value.filter((entry) => typeof entry === "string" && entry.trim().length > 0);
|
|
10542
|
+
return entries.length > 0 ? entries : void 0;
|
|
10543
|
+
}
|
|
10537
10544
|
function getOptionalPriority(value, fallback) {
|
|
10538
10545
|
return typeof value === "number" && Number.isFinite(value) ? value : fallback;
|
|
10539
10546
|
}
|
|
@@ -10568,10 +10575,15 @@ function normalizeConfiguredTeamModelOverride(raw) {
|
|
|
10568
10575
|
const model = getOptionalString(value.model);
|
|
10569
10576
|
const variant = getOptionalString(value.variant);
|
|
10570
10577
|
const options = createProviderOptionOverrides(value);
|
|
10578
|
+
const fallbackModels = getOptionalStringArray(value.fallback_models ?? value.fallbackModels);
|
|
10579
|
+
const strictValue = value.strict;
|
|
10580
|
+
const strict = typeof strictValue === "boolean" ? strictValue : void 0;
|
|
10571
10581
|
return [[agentId, {
|
|
10572
10582
|
...model ? { model } : {},
|
|
10573
10583
|
...variant ? { variant } : {},
|
|
10574
|
-
...options ? { options } : {}
|
|
10584
|
+
...options ? { options } : {},
|
|
10585
|
+
...fallbackModels ? { fallbackModels } : {},
|
|
10586
|
+
...strict !== void 0 ? { strict } : {}
|
|
10575
10587
|
}]];
|
|
10576
10588
|
})
|
|
10577
10589
|
) : void 0;
|
|
@@ -10606,10 +10618,7 @@ function createDefaultCodingTeamConfigEntry() {
|
|
|
10606
10618
|
priority: DEFAULT_EMBEDDED_TEAM_PRIORITY,
|
|
10607
10619
|
model_preset: BUILTIN_CODING_TEAM_MODEL_PRESET,
|
|
10608
10620
|
fallback: BUILTIN_CODING_TEAM_MODEL_FALLBACK,
|
|
10609
|
-
fallback_to_host_default: BUILTIN_CODING_TEAM_FALLBACK_TO_HOST_DEFAULT
|
|
10610
|
-
agents: Object.fromEntries(
|
|
10611
|
-
Object.entries(BUILTIN_CODING_TEAM_AGENT_MODELS).map(([agentId, model]) => [agentId, { model }])
|
|
10612
|
-
)
|
|
10621
|
+
fallback_to_host_default: BUILTIN_CODING_TEAM_FALLBACK_TO_HOST_DEFAULT
|
|
10613
10622
|
};
|
|
10614
10623
|
}
|
|
10615
10624
|
function getPackagedTemplateRootPath() {
|
|
@@ -12604,8 +12613,9 @@ function applyAgentModelOverride(runtime, override) {
|
|
|
12604
12613
|
topP: runtime?.topP,
|
|
12605
12614
|
variant: override.variant ?? runtime?.variant,
|
|
12606
12615
|
options: mergeModelOptions(runtime?.options, override.options),
|
|
12607
|
-
fallbackModels: runtime?.fallbackModels,
|
|
12608
|
-
fallbackToHostDefault: runtime?.fallbackToHostDefault
|
|
12616
|
+
fallbackModels: override.fallbackModels ?? runtime?.fallbackModels,
|
|
12617
|
+
fallbackToHostDefault: runtime?.fallbackToHostDefault,
|
|
12618
|
+
strict: override.strict ?? runtime?.strict
|
|
12609
12619
|
};
|
|
12610
12620
|
}
|
|
12611
12621
|
function parseProviderModel(model) {
|
|
@@ -12638,9 +12648,20 @@ function createHostDefaultTrace(input) {
|
|
|
12638
12648
|
fallbackToHostDefault: input.fallbackToHostDefault,
|
|
12639
12649
|
candidates: getCandidateModelIds(input.candidates),
|
|
12640
12650
|
skipped: input.skipped,
|
|
12651
|
+
availability: input.availability,
|
|
12641
12652
|
reason: input.reason
|
|
12642
12653
|
};
|
|
12643
12654
|
}
|
|
12655
|
+
function isBuiltinCodingTeamDefaultModel(input) {
|
|
12656
|
+
if (input.agent.teamId !== BUILTIN_CODING_TEAM_ID) {
|
|
12657
|
+
return false;
|
|
12658
|
+
}
|
|
12659
|
+
const sourceAgentId = input.agent.sourceAgent.metadata.sourceId ?? input.agent.canonicalAgentId;
|
|
12660
|
+
if (BUILTIN_CODING_TEAM_AGENT_MODELS[sourceAgentId] === input.model || BUILTIN_CODING_TEAM_AGENT_MODELS[input.agent.canonicalAgentId] === input.model) {
|
|
12661
|
+
return true;
|
|
12662
|
+
}
|
|
12663
|
+
return BUILTIN_ROLE_FALLBACKS[sourceAgentId]?.includes(input.model) === true || BUILTIN_ROLE_FALLBACKS[input.agent.canonicalAgentId]?.includes(input.model) === true;
|
|
12664
|
+
}
|
|
12644
12665
|
function appendConfiguredModelCandidate(input) {
|
|
12645
12666
|
const runtimeModel = resolveRuntimeModelId(input.runtime);
|
|
12646
12667
|
const defaultRuntimeModel = resolveRuntimeModelId(input.defaultRuntime);
|
|
@@ -12648,7 +12669,9 @@ function appendConfiguredModelCandidate(input) {
|
|
|
12648
12669
|
appendUniqueCandidate(input.candidates, {
|
|
12649
12670
|
model: input.agentOverride.model,
|
|
12650
12671
|
source: "crewbee-json",
|
|
12651
|
-
runtime: applyAgentModelOverride(input.runtime ?? input.defaultRuntime, input.agentOverride)
|
|
12672
|
+
runtime: applyAgentModelOverride(input.runtime ?? input.defaultRuntime, input.agentOverride),
|
|
12673
|
+
strict: input.agentOverride.strict === true,
|
|
12674
|
+
allowWhenAvailabilityUnknown: input.allowWhenAvailabilityUnknown ?? true
|
|
12652
12675
|
});
|
|
12653
12676
|
return;
|
|
12654
12677
|
}
|
|
@@ -12656,7 +12679,9 @@ function appendConfiguredModelCandidate(input) {
|
|
|
12656
12679
|
appendUniqueCandidate(input.candidates, {
|
|
12657
12680
|
model: runtimeModel,
|
|
12658
12681
|
source: "team-manifest",
|
|
12659
|
-
runtime: applyAgentModelOverride(input.runtime, input.agentOverride)
|
|
12682
|
+
runtime: applyAgentModelOverride(input.runtime, input.agentOverride),
|
|
12683
|
+
strict: input.runtime?.strict === true,
|
|
12684
|
+
allowWhenAvailabilityUnknown: input.runtime?.strict === true
|
|
12660
12685
|
});
|
|
12661
12686
|
return;
|
|
12662
12687
|
}
|
|
@@ -12664,10 +12689,40 @@ function appendConfiguredModelCandidate(input) {
|
|
|
12664
12689
|
appendUniqueCandidate(input.candidates, {
|
|
12665
12690
|
model: defaultRuntimeModel,
|
|
12666
12691
|
source: "team-manifest-default",
|
|
12667
|
-
runtime: applyAgentModelOverride(input.defaultRuntime, input.agentOverride)
|
|
12692
|
+
runtime: applyAgentModelOverride(input.defaultRuntime, input.agentOverride),
|
|
12693
|
+
strict: input.defaultRuntime?.strict === true,
|
|
12694
|
+
allowWhenAvailabilityUnknown: input.defaultRuntime?.strict === true
|
|
12668
12695
|
});
|
|
12669
12696
|
}
|
|
12670
12697
|
}
|
|
12698
|
+
function createResolvedModel(input) {
|
|
12699
|
+
return {
|
|
12700
|
+
model: {
|
|
12701
|
+
providerID: input.parsed.providerID,
|
|
12702
|
+
modelID: input.parsed.modelID,
|
|
12703
|
+
temperature: input.candidate.runtime?.temperature,
|
|
12704
|
+
topP: input.candidate.runtime?.topP,
|
|
12705
|
+
variant: input.candidate.runtime?.variant,
|
|
12706
|
+
options: input.candidate.runtime?.options,
|
|
12707
|
+
source: input.candidate.source,
|
|
12708
|
+
strict: input.candidate.strict === true
|
|
12709
|
+
},
|
|
12710
|
+
trace: {
|
|
12711
|
+
teamId: input.agent.teamId,
|
|
12712
|
+
agentId: input.agent.canonicalAgentId,
|
|
12713
|
+
configuredModel: input.configuredModel,
|
|
12714
|
+
resolvedModel: input.candidate.model,
|
|
12715
|
+
source: input.candidate.source,
|
|
12716
|
+
fallback: input.fallbackStrategy,
|
|
12717
|
+
fallbackToHostDefault: input.fallbackToHostDefault,
|
|
12718
|
+
candidates: getCandidateModelIds(input.candidates),
|
|
12719
|
+
skipped: input.skipped,
|
|
12720
|
+
availability: input.availability,
|
|
12721
|
+
strict: input.candidate.strict === true,
|
|
12722
|
+
reason: input.reason
|
|
12723
|
+
}
|
|
12724
|
+
};
|
|
12725
|
+
}
|
|
12671
12726
|
function resolveAgentModel(input) {
|
|
12672
12727
|
const { agent } = input;
|
|
12673
12728
|
const teamOverride = agent.sourceTeam.modelConfigOverride;
|
|
@@ -12680,12 +12735,17 @@ function resolveAgentModel(input) {
|
|
|
12680
12735
|
const fallbackToHostDefault = teamOverride?.fallbackToHostDefault ?? runtime?.fallbackToHostDefault ?? defaultRuntime?.fallbackToHostDefault ?? true;
|
|
12681
12736
|
const runtimeModel = resolveRuntimeModelId(runtime);
|
|
12682
12737
|
const configuredModel = agentOverride?.model ?? runtimeModel ?? resolveRuntimeModelId(defaultRuntime);
|
|
12738
|
+
const configuredIsBuiltinDefault = configuredModel ? isBuiltinCodingTeamDefaultModel({ agent, model: configuredModel }) : false;
|
|
12683
12739
|
const candidates = [];
|
|
12740
|
+
const availableModels = input.availableModels ? new Set(input.availableModels) : void 0;
|
|
12741
|
+
const availability = availableModels ? "checked" : "unavailable";
|
|
12742
|
+
const skipped = [];
|
|
12684
12743
|
appendConfiguredModelCandidate({
|
|
12685
12744
|
candidates,
|
|
12686
12745
|
agentOverride,
|
|
12687
12746
|
runtime: runtimeWithOverride,
|
|
12688
|
-
defaultRuntime: defaultRuntimeWithOverride
|
|
12747
|
+
defaultRuntime: defaultRuntimeWithOverride,
|
|
12748
|
+
allowWhenAvailabilityUnknown: !configuredIsBuiltinDefault
|
|
12689
12749
|
});
|
|
12690
12750
|
if (agentOverride?.model === HOST_DEFAULT_MODEL_ID || !agentOverride?.model && runtimeModel === HOST_DEFAULT_MODEL_ID) {
|
|
12691
12751
|
return {
|
|
@@ -12696,6 +12756,7 @@ function resolveAgentModel(input) {
|
|
|
12696
12756
|
fallbackToHostDefault,
|
|
12697
12757
|
candidates,
|
|
12698
12758
|
skipped: [],
|
|
12759
|
+
availability,
|
|
12699
12760
|
reason: "host-default selected explicitly"
|
|
12700
12761
|
})
|
|
12701
12762
|
};
|
|
@@ -12703,15 +12764,20 @@ function resolveAgentModel(input) {
|
|
|
12703
12764
|
const sourceAgentId = agent.sourceAgent.metadata.sourceId ?? agent.canonicalAgentId;
|
|
12704
12765
|
if (fallbackStrategy === BUILTIN_CODING_TEAM_MODEL_FALLBACK && agent.teamId === BUILTIN_CODING_TEAM_ID) {
|
|
12705
12766
|
for (const model of BUILTIN_ROLE_FALLBACKS[sourceAgentId] ?? BUILTIN_ROLE_FALLBACKS[agent.canonicalAgentId] ?? []) {
|
|
12706
|
-
appendUniqueCandidate(candidates, { model, source: "builtin-role-chain", runtime: runtimeWithOverride });
|
|
12767
|
+
appendUniqueCandidate(candidates, { model, source: "builtin-role-chain", runtime: runtimeWithOverride, allowWhenAvailabilityUnknown: false });
|
|
12707
12768
|
}
|
|
12708
12769
|
} else {
|
|
12709
12770
|
for (const model of runtimeWithOverride?.fallbackModels ?? defaultRuntimeWithOverride?.fallbackModels ?? []) {
|
|
12710
|
-
|
|
12771
|
+
const fallbackRuntime = runtimeWithOverride ?? defaultRuntimeWithOverride;
|
|
12772
|
+
appendUniqueCandidate(candidates, {
|
|
12773
|
+
model,
|
|
12774
|
+
source: "team-manifest",
|
|
12775
|
+
runtime: fallbackRuntime,
|
|
12776
|
+
strict: fallbackRuntime?.strict === true,
|
|
12777
|
+
allowWhenAvailabilityUnknown: fallbackRuntime?.strict === true
|
|
12778
|
+
});
|
|
12711
12779
|
}
|
|
12712
12780
|
}
|
|
12713
|
-
const availableModels = input.availableModels ? new Set(input.availableModels) : void 0;
|
|
12714
|
-
const skipped = [];
|
|
12715
12781
|
for (const candidate of candidates) {
|
|
12716
12782
|
if (candidate.model === HOST_DEFAULT_MODEL_ID) {
|
|
12717
12783
|
return {
|
|
@@ -12722,6 +12788,7 @@ function resolveAgentModel(input) {
|
|
|
12722
12788
|
fallbackToHostDefault,
|
|
12723
12789
|
candidates,
|
|
12724
12790
|
skipped,
|
|
12791
|
+
availability,
|
|
12725
12792
|
reason: "host-default selected from candidate chain"
|
|
12726
12793
|
})
|
|
12727
12794
|
};
|
|
@@ -12731,32 +12798,39 @@ function resolveAgentModel(input) {
|
|
|
12731
12798
|
skipped.push({ model: candidate.model, reason: "model must use provider/model format" });
|
|
12732
12799
|
continue;
|
|
12733
12800
|
}
|
|
12801
|
+
if (candidate.strict) {
|
|
12802
|
+
return createResolvedModel({
|
|
12803
|
+
agent,
|
|
12804
|
+
candidate,
|
|
12805
|
+
parsed,
|
|
12806
|
+
configuredModel,
|
|
12807
|
+
fallbackStrategy,
|
|
12808
|
+
fallbackToHostDefault,
|
|
12809
|
+
candidates,
|
|
12810
|
+
skipped,
|
|
12811
|
+
availability,
|
|
12812
|
+
reason: availableModels && !availableModels.has(candidate.model) ? "strict model selected; availability check bypassed" : void 0
|
|
12813
|
+
});
|
|
12814
|
+
}
|
|
12815
|
+
if (!availableModels && !candidate.allowWhenAvailabilityUnknown) {
|
|
12816
|
+
skipped.push({ model: candidate.model, reason: "availability registry unavailable; candidate is not strict user configuration" });
|
|
12817
|
+
continue;
|
|
12818
|
+
}
|
|
12734
12819
|
if (availableModels && !availableModels.has(candidate.model)) {
|
|
12735
12820
|
skipped.push({ model: candidate.model, reason: "model not available in current OpenCode environment" });
|
|
12736
12821
|
continue;
|
|
12737
12822
|
}
|
|
12738
|
-
return {
|
|
12739
|
-
|
|
12740
|
-
|
|
12741
|
-
|
|
12742
|
-
|
|
12743
|
-
|
|
12744
|
-
|
|
12745
|
-
|
|
12746
|
-
|
|
12747
|
-
|
|
12748
|
-
|
|
12749
|
-
teamId: agent.teamId,
|
|
12750
|
-
agentId: agent.canonicalAgentId,
|
|
12751
|
-
configuredModel,
|
|
12752
|
-
resolvedModel: candidate.model,
|
|
12753
|
-
source: candidate.source,
|
|
12754
|
-
fallback: fallbackStrategy,
|
|
12755
|
-
fallbackToHostDefault,
|
|
12756
|
-
candidates: getCandidateModelIds(candidates),
|
|
12757
|
-
skipped
|
|
12758
|
-
}
|
|
12759
|
-
};
|
|
12823
|
+
return createResolvedModel({
|
|
12824
|
+
agent,
|
|
12825
|
+
candidate,
|
|
12826
|
+
parsed,
|
|
12827
|
+
configuredModel,
|
|
12828
|
+
fallbackStrategy,
|
|
12829
|
+
fallbackToHostDefault,
|
|
12830
|
+
candidates,
|
|
12831
|
+
skipped,
|
|
12832
|
+
availability
|
|
12833
|
+
});
|
|
12760
12834
|
}
|
|
12761
12835
|
return {
|
|
12762
12836
|
trace: createHostDefaultTrace({
|
|
@@ -12766,6 +12840,7 @@ function resolveAgentModel(input) {
|
|
|
12766
12840
|
fallbackToHostDefault,
|
|
12767
12841
|
candidates,
|
|
12768
12842
|
skipped,
|
|
12843
|
+
availability,
|
|
12769
12844
|
reason: fallbackToHostDefault ? "no usable model candidate; fallback_to_host_default enabled" : "no usable model candidate"
|
|
12770
12845
|
})
|
|
12771
12846
|
};
|
|
@@ -13157,7 +13232,8 @@ function resolveDelegateModel(target, fallback) {
|
|
|
13157
13232
|
if (target.resolvedModel) {
|
|
13158
13233
|
return {
|
|
13159
13234
|
providerID: target.resolvedModel.providerID,
|
|
13160
|
-
modelID: target.resolvedModel.modelID
|
|
13235
|
+
modelID: target.resolvedModel.modelID,
|
|
13236
|
+
strict: target.resolvedModel.strict
|
|
13161
13237
|
};
|
|
13162
13238
|
}
|
|
13163
13239
|
return fallback;
|
|
@@ -13336,6 +13412,39 @@ async function logCrewBee(ctx, message, extra, level = "info") {
|
|
|
13336
13412
|
});
|
|
13337
13413
|
}
|
|
13338
13414
|
|
|
13415
|
+
// src/adapters/opencode/model-availability.ts
|
|
13416
|
+
function isRecord6(value) {
|
|
13417
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
13418
|
+
}
|
|
13419
|
+
function getProviders(value) {
|
|
13420
|
+
const unwrapped = unwrapSdkResponse(value);
|
|
13421
|
+
if (!isRecord6(unwrapped) || !Array.isArray(unwrapped.providers)) {
|
|
13422
|
+
return void 0;
|
|
13423
|
+
}
|
|
13424
|
+
return unwrapped.providers;
|
|
13425
|
+
}
|
|
13426
|
+
async function listOpenCodeAvailableModels(input) {
|
|
13427
|
+
if (!isRecord6(input.client) || !isRecord6(input.client.config) || typeof input.client.config.providers !== "function") {
|
|
13428
|
+
return void 0;
|
|
13429
|
+
}
|
|
13430
|
+
const providers = input.client.config.providers;
|
|
13431
|
+
const response = await providers().catch(() => void 0);
|
|
13432
|
+
const providerList = getProviders(response);
|
|
13433
|
+
if (!providerList) {
|
|
13434
|
+
return void 0;
|
|
13435
|
+
}
|
|
13436
|
+
const models = [];
|
|
13437
|
+
for (const provider of providerList) {
|
|
13438
|
+
if (typeof provider.id !== "string" || !isRecord6(provider.models)) {
|
|
13439
|
+
continue;
|
|
13440
|
+
}
|
|
13441
|
+
for (const modelID of Object.keys(provider.models)) {
|
|
13442
|
+
models.push(`${provider.id}/${modelID}`);
|
|
13443
|
+
}
|
|
13444
|
+
}
|
|
13445
|
+
return [...new Set(models)].sort();
|
|
13446
|
+
}
|
|
13447
|
+
|
|
13339
13448
|
// src/adapters/opencode/config-hook.ts
|
|
13340
13449
|
function summarizeProjectedAgents(boot) {
|
|
13341
13450
|
return boot.projectedAgents.map((agent) => ({
|
|
@@ -13371,10 +13480,14 @@ async function validateAndLogTeamLibrary(ctx, teamLibrary) {
|
|
|
13371
13480
|
}))
|
|
13372
13481
|
);
|
|
13373
13482
|
}
|
|
13374
|
-
function createInitialBootstrap(teamLibrary) {
|
|
13483
|
+
async function createInitialBootstrap(ctx, teamLibrary) {
|
|
13484
|
+
const availableModels = await listOpenCodeAvailableModels({
|
|
13485
|
+
client: ctx.client
|
|
13486
|
+
});
|
|
13375
13487
|
const boot = createOpenCodeBootstrap({
|
|
13376
13488
|
teamLibrary,
|
|
13377
|
-
defaults: { defaultMode: DEFAULT_OPENCODE_EXECUTION_MODE }
|
|
13489
|
+
defaults: { defaultMode: DEFAULT_OPENCODE_EXECUTION_MODE },
|
|
13490
|
+
availableModels
|
|
13378
13491
|
});
|
|
13379
13492
|
return {
|
|
13380
13493
|
boot,
|
|
@@ -13384,11 +13497,15 @@ function createInitialBootstrap(teamLibrary) {
|
|
|
13384
13497
|
function createConfigHook(input) {
|
|
13385
13498
|
return async (cfg) => {
|
|
13386
13499
|
const current = getConfig(cfg);
|
|
13500
|
+
const availableModels = await listOpenCodeAvailableModels({
|
|
13501
|
+
client: input.ctx.client
|
|
13502
|
+
});
|
|
13387
13503
|
const next = createOpenCodeBootstrap({
|
|
13388
13504
|
teamLibrary: input.teamLibrary,
|
|
13389
13505
|
defaults: { defaultMode: DEFAULT_OPENCODE_EXECUTION_MODE },
|
|
13390
13506
|
existingConfig: current,
|
|
13391
|
-
existingDefaultAgent: typeof current.default_agent === "string" ? current.default_agent : void 0
|
|
13507
|
+
existingDefaultAgent: typeof current.default_agent === "string" ? current.default_agent : void 0,
|
|
13508
|
+
availableModels
|
|
13392
13509
|
});
|
|
13393
13510
|
input.setBoot(next);
|
|
13394
13511
|
input.setAliasIndex(createProjectedAgentAliasIndex(next.projectedAgents));
|
|
@@ -26149,6 +26266,13 @@ function resolveRequestedMode(args) {
|
|
|
26149
26266
|
}
|
|
26150
26267
|
return args.mode ?? "foreground";
|
|
26151
26268
|
}
|
|
26269
|
+
function createPromptModel(model) {
|
|
26270
|
+
return model ? { providerID: model.providerID, modelID: model.modelID } : void 0;
|
|
26271
|
+
}
|
|
26272
|
+
function isModelUnavailableError(error45) {
|
|
26273
|
+
const text = String(error45 instanceof Error ? `${error45.name} ${error45.message}` : error45).toLowerCase();
|
|
26274
|
+
return text.includes("providermodelnotfounderror") || text.includes("model not found") || text.includes("model_not_found") || text.includes("unknown model");
|
|
26275
|
+
}
|
|
26152
26276
|
async function resolveChildSession(input) {
|
|
26153
26277
|
const requestedSessionID = resolveRequestedSessionID(input.args);
|
|
26154
26278
|
if (!requestedSessionID) {
|
|
@@ -26189,14 +26313,28 @@ async function runForeground(input) {
|
|
|
26189
26313
|
prompt: input.args.prompt
|
|
26190
26314
|
});
|
|
26191
26315
|
input.store.setCheckpoint(input.sessionID, createCheckpoint(input.target, model));
|
|
26192
|
-
|
|
26193
|
-
|
|
26194
|
-
|
|
26195
|
-
|
|
26196
|
-
|
|
26197
|
-
|
|
26316
|
+
try {
|
|
26317
|
+
await input.client.session.prompt({
|
|
26318
|
+
path: { id: input.sessionID },
|
|
26319
|
+
body: {
|
|
26320
|
+
agent: input.target.configKey,
|
|
26321
|
+
model: createPromptModel(model),
|
|
26322
|
+
parts: [{ type: "text", text: envelope }]
|
|
26323
|
+
}
|
|
26324
|
+
});
|
|
26325
|
+
} catch (error45) {
|
|
26326
|
+
if (!model || model.strict || !isModelUnavailableError(error45)) {
|
|
26327
|
+
throw error45;
|
|
26198
26328
|
}
|
|
26199
|
-
|
|
26329
|
+
input.store.setCheckpoint(input.sessionID, createCheckpoint(input.target, void 0));
|
|
26330
|
+
await input.client.session.prompt({
|
|
26331
|
+
path: { id: input.sessionID },
|
|
26332
|
+
body: {
|
|
26333
|
+
agent: input.target.configKey,
|
|
26334
|
+
parts: [{ type: "text", text: envelope }]
|
|
26335
|
+
}
|
|
26336
|
+
});
|
|
26337
|
+
}
|
|
26200
26338
|
const message = await extractAssistantText(input.client, input.sessionID, anchor);
|
|
26201
26339
|
const result = {
|
|
26202
26340
|
status: "completed",
|
|
@@ -26237,11 +26375,24 @@ function launchBackground(input) {
|
|
|
26237
26375
|
path: { id: input.sessionID },
|
|
26238
26376
|
body: {
|
|
26239
26377
|
agent: input.target.configKey,
|
|
26240
|
-
model,
|
|
26378
|
+
model: createPromptModel(model),
|
|
26241
26379
|
parts: [{ type: "text", text: envelope }]
|
|
26242
26380
|
}
|
|
26243
26381
|
}).catch((error45) => {
|
|
26244
|
-
|
|
26382
|
+
if (!model || model.strict || !isModelUnavailableError(error45)) {
|
|
26383
|
+
input.store.setTaskStatus(input.taskRef, "failed", { lastError: String(error45), message: String(error45) });
|
|
26384
|
+
return;
|
|
26385
|
+
}
|
|
26386
|
+
input.store.setCheckpoint(input.sessionID, createCheckpoint(input.target, void 0));
|
|
26387
|
+
void launcher({
|
|
26388
|
+
path: { id: input.sessionID },
|
|
26389
|
+
body: {
|
|
26390
|
+
agent: input.target.configKey,
|
|
26391
|
+
parts: [{ type: "text", text: envelope }]
|
|
26392
|
+
}
|
|
26393
|
+
}).catch((retryError) => {
|
|
26394
|
+
input.store.setTaskStatus(input.taskRef, "failed", { lastError: String(retryError), message: String(retryError) });
|
|
26395
|
+
});
|
|
26245
26396
|
});
|
|
26246
26397
|
}
|
|
26247
26398
|
function findBoundSourceAgent(input) {
|
|
@@ -26912,7 +27063,7 @@ var OpenCodeCrewBeePlugin = async (ctx) => {
|
|
|
26912
27063
|
}
|
|
26913
27064
|
const teamLibrary = loadDefaultTeamLibrary(ctx.worktree);
|
|
26914
27065
|
await validateAndLogTeamLibrary(ctx, teamLibrary);
|
|
26915
|
-
const initial = createInitialBootstrap(teamLibrary);
|
|
27066
|
+
const initial = await createInitialBootstrap(ctx, teamLibrary);
|
|
26916
27067
|
await logCrewBee(ctx, "CrewBee plugin initialized", {
|
|
26917
27068
|
worktree: ctx.worktree,
|
|
26918
27069
|
projectedAgentCount: initial.boot.projectedAgents.length,
|
|
@@ -3,10 +3,10 @@ import type { TeamLibrary } from "../../core";
|
|
|
3
3
|
import { type OpenCodeBootstrapOutput } from "./bootstrap";
|
|
4
4
|
import { type OpenCodeAgentAliasEntry } from "./projection";
|
|
5
5
|
export declare function validateAndLogTeamLibrary(ctx: PluginInput, teamLibrary: TeamLibrary): Promise<void>;
|
|
6
|
-
export declare function createInitialBootstrap(teamLibrary: TeamLibrary): {
|
|
6
|
+
export declare function createInitialBootstrap(ctx: PluginInput, teamLibrary: TeamLibrary): Promise<{
|
|
7
7
|
boot: OpenCodeBootstrapOutput;
|
|
8
8
|
aliasIndex: Map<string, OpenCodeAgentAliasEntry>;
|
|
9
|
-
}
|
|
9
|
+
}>;
|
|
10
10
|
export declare function createConfigHook(input: {
|
|
11
11
|
ctx: PluginInput;
|
|
12
12
|
teamLibrary: TeamLibrary;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-hook.d.ts","sourceRoot":"","sources":["../../../../src/adapters/opencode/config-hook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,EAA2B,KAAK,uBAAuB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"config-hook.d.ts","sourceRoot":"","sources":["../../../../src/adapters/opencode/config-hook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,EAA2B,KAAK,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAKpF,OAAO,EAAkC,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAkB5F,wBAAsB,yBAAyB,CAAC,GAAG,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBzG;AAED,wBAAsB,sBAAsB,CAAC,GAAG,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC;IAChG,IAAI,EAAE,uBAAuB,CAAC;IAC9B,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;CAClD,CAAC,CAaD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACtC,GAAG,EAAE,WAAW,CAAC;IACjB,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,IAAI,uBAAuB,CAAC;IACnC,OAAO,CAAC,IAAI,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAC7C,aAAa,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,uBAAuB,CAAC,GAAG,IAAI,CAAC;CAClE,IACe,KAAK;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,mBA2CvD"}
|
|
@@ -7,6 +7,7 @@ const agent_teams_1 = require("../../agent-teams");
|
|
|
7
7
|
const bootstrap_1 = require("./bootstrap");
|
|
8
8
|
const defaults_1 = require("./defaults");
|
|
9
9
|
const logging_1 = require("./logging");
|
|
10
|
+
const model_availability_1 = require("./model-availability");
|
|
10
11
|
const projection_1 = require("./projection");
|
|
11
12
|
function summarizeProjectedAgents(boot) {
|
|
12
13
|
return boot.projectedAgents.map((agent) => ({
|
|
@@ -40,10 +41,14 @@ async function validateAndLogTeamLibrary(ctx, teamLibrary) {
|
|
|
40
41
|
},
|
|
41
42
|
})));
|
|
42
43
|
}
|
|
43
|
-
function createInitialBootstrap(teamLibrary) {
|
|
44
|
+
async function createInitialBootstrap(ctx, teamLibrary) {
|
|
45
|
+
const availableModels = await (0, model_availability_1.listOpenCodeAvailableModels)({
|
|
46
|
+
client: ctx.client,
|
|
47
|
+
});
|
|
44
48
|
const boot = (0, bootstrap_1.createOpenCodeBootstrap)({
|
|
45
49
|
teamLibrary,
|
|
46
50
|
defaults: { defaultMode: defaults_1.DEFAULT_OPENCODE_EXECUTION_MODE },
|
|
51
|
+
availableModels,
|
|
47
52
|
});
|
|
48
53
|
return {
|
|
49
54
|
boot,
|
|
@@ -53,11 +58,15 @@ function createInitialBootstrap(teamLibrary) {
|
|
|
53
58
|
function createConfigHook(input) {
|
|
54
59
|
return async (cfg) => {
|
|
55
60
|
const current = getConfig(cfg);
|
|
61
|
+
const availableModels = await (0, model_availability_1.listOpenCodeAvailableModels)({
|
|
62
|
+
client: input.ctx.client,
|
|
63
|
+
});
|
|
56
64
|
const next = (0, bootstrap_1.createOpenCodeBootstrap)({
|
|
57
65
|
teamLibrary: input.teamLibrary,
|
|
58
66
|
defaults: { defaultMode: defaults_1.DEFAULT_OPENCODE_EXECUTION_MODE },
|
|
59
67
|
existingConfig: current,
|
|
60
68
|
existingDefaultAgent: typeof current.default_agent === "string" ? current.default_agent : undefined,
|
|
69
|
+
availableModels,
|
|
61
70
|
});
|
|
62
71
|
input.setBoot(next);
|
|
63
72
|
input.setAliasIndex((0, projection_1.createProjectedAgentAliasIndex)(next.projectedAgents));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-hook.js","sourceRoot":"","sources":["../../../../src/adapters/opencode/config-hook.ts"],"names":[],"mappings":";;
|
|
1
|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AAkB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAOvE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAE1E;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,mBAAmB,EAAE,QAAQ,CAAC,EAAE,mBAAmB,GAAG,mBAAmB,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../../../../src/adapters/opencode/delegation/prompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAOvE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAE1E;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,mBAAmB,EAAE,QAAQ,CAAC,EAAE,mBAAmB,GAAG,mBAAmB,GAAG,SAAS,CAUjI;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,MAAM,CAsBT;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,mBAAmB,EAAE,KAAK,CAAC,EAAE,mBAAmB,GAAG,kBAAkB,CAM5G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../../../src/adapters/opencode/delegation/prompt.ts"],"names":[],"mappings":";;AASA,oDAEC;AAED,
|
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../../../src/adapters/opencode/delegation/prompt.ts"],"names":[],"mappings":";;AASA,oDAEC;AAED,oDAUC;AAED,4DA2BC;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