crewbee 0.1.9 → 0.1.10
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 +19 -3
- package/README.zh-CN.md +24 -8
- package/dist/opencode-plugin.mjs +247 -55
- package/dist/src/adapters/opencode/config-hook.d.ts.map +1 -1
- package/dist/src/adapters/opencode/config-hook.js +9 -2
- package/dist/src/adapters/opencode/config-hook.js.map +1 -1
- package/dist/src/adapters/opencode/plugin.d.ts.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/system-transform-hook.d.ts +2 -1
- package/dist/src/adapters/opencode/system-transform-hook.d.ts.map +1 -1
- package/dist/src/adapters/opencode/system-transform-hook.js +17 -3
- package/dist/src/adapters/opencode/system-transform-hook.js.map +1 -1
- package/dist/src/agent-teams/canonical-agent-id.d.ts.map +1 -1
- package/dist/src/agent-teams/canonical-agent-id.js +3 -0
- package/dist/src/agent-teams/canonical-agent-id.js.map +1 -1
- package/dist/src/agent-teams/diagnostics.d.ts +10 -0
- package/dist/src/agent-teams/diagnostics.d.ts.map +1 -0
- package/dist/src/agent-teams/diagnostics.js +29 -0
- package/dist/src/agent-teams/diagnostics.js.map +1 -0
- package/dist/src/agent-teams/filesystem.d.ts +4 -0
- package/dist/src/agent-teams/filesystem.d.ts.map +1 -1
- package/dist/src/agent-teams/filesystem.js +134 -21
- package/dist/src/agent-teams/filesystem.js.map +1 -1
- package/dist/src/agent-teams/index.d.ts +1 -0
- package/dist/src/agent-teams/index.d.ts.map +1 -1
- package/dist/src/agent-teams/index.js +5 -1
- package/dist/src/agent-teams/index.js.map +1 -1
- package/dist/src/agent-teams/library.d.ts +5 -1
- package/dist/src/agent-teams/library.d.ts.map +1 -1
- package/dist/src/agent-teams/library.js +31 -8
- package/dist/src/agent-teams/library.js.map +1 -1
- package/dist/src/agent-teams/parsers.js +3 -3
- package/dist/src/agent-teams/parsers.js.map +1 -1
- package/dist/src/agent-teams/types.d.ts +6 -0
- package/dist/src/agent-teams/types.d.ts.map +1 -1
- package/dist/src/agent-teams/validation.d.ts.map +1 -1
- package/dist/src/agent-teams/validation.js +50 -3
- package/dist/src/agent-teams/validation.js.map +1 -1
- package/dist/src/cli/doctor.d.ts.map +1 -1
- package/dist/src/cli/doctor.js +36 -1
- package/dist/src/cli/doctor.js.map +1 -1
- package/dist/src/cli/render-help.d.ts.map +1 -1
- package/dist/src/cli/render-help.js +2 -1
- package/dist/src/cli/render-help.js.map +1 -1
- package/dist/src/cli/run-cli.d.ts.map +1 -1
- package/dist/src/cli/run-cli.js +7 -0
- package/dist/src/cli/run-cli.js.map +1 -1
- package/dist/src/cli/validate.d.ts +6 -0
- package/dist/src/cli/validate.d.ts.map +1 -0
- package/dist/src/cli/validate.js +90 -0
- package/dist/src/cli/validate.js.map +1 -0
- package/dist/src/core/index.d.ts +1 -0
- package/dist/src/core/index.d.ts.map +1 -1
- package/dist/src/install/doctor.d.ts.map +1 -1
- package/dist/src/install/doctor.js +15 -1
- package/dist/src/install/doctor.js.map +1 -1
- package/dist/src/install/types.d.ts +7 -0
- package/dist/src/install/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/opencode-plugin.mjs
CHANGED
|
@@ -10129,8 +10129,8 @@ function mapCollaboration(raw) {
|
|
|
10129
10129
|
return value.map(mapCollaborationBinding);
|
|
10130
10130
|
};
|
|
10131
10131
|
return {
|
|
10132
|
-
defaultConsults: mapList(raw
|
|
10133
|
-
defaultHandoffs: mapList(raw
|
|
10132
|
+
defaultConsults: mapList(raw?.default_consults ?? raw?.defaultConsults ?? [], "default_consults"),
|
|
10133
|
+
defaultHandoffs: mapList(raw?.default_handoffs ?? raw?.defaultHandoffs ?? [], "default_handoffs")
|
|
10134
10134
|
};
|
|
10135
10135
|
}
|
|
10136
10136
|
function mapMinimalOperations(raw, body) {
|
|
@@ -10297,7 +10297,7 @@ function mapAgentProfile(filePath) {
|
|
|
10297
10297
|
rejectRemovedAgentProfileFields(data, filePath);
|
|
10298
10298
|
const personaCore = asRecord(data.persona_core, "persona_core");
|
|
10299
10299
|
const responsibilityCore = asRecord(data.responsibility_core, "responsibility_core");
|
|
10300
|
-
const collaboration =
|
|
10300
|
+
const collaboration = asOptionalRecord(data.collaboration);
|
|
10301
10301
|
const runtimeConfig = asRecord(data.runtime_config, "runtime_config");
|
|
10302
10302
|
const extraContent = omitKeys(data, KNOWN_AGENT_TOP_LEVEL_KEYS);
|
|
10303
10303
|
const reservedAgentKeys = new Set(KNOWN_AGENT_TOP_LEVEL_KEYS);
|
|
@@ -10468,11 +10468,16 @@ function mapTeamPolicy(filePath) {
|
|
|
10468
10468
|
// src/agent-teams/filesystem.ts
|
|
10469
10469
|
var TEAM_MANIFEST_FILE = "team.manifest.yaml";
|
|
10470
10470
|
var TEAM_POLICY_FILE = "team.policy.yaml";
|
|
10471
|
-
function createConfigIssue(
|
|
10471
|
+
function createConfigIssue(input) {
|
|
10472
10472
|
return {
|
|
10473
10473
|
level: "warning",
|
|
10474
|
-
filePath: configPath,
|
|
10475
|
-
message
|
|
10474
|
+
filePath: input.configPath,
|
|
10475
|
+
message: input.message,
|
|
10476
|
+
code: input.code,
|
|
10477
|
+
path: input.path,
|
|
10478
|
+
suggestion: input.suggestion,
|
|
10479
|
+
sourceScope: input.sourceScope,
|
|
10480
|
+
fixable: input.fixable
|
|
10476
10481
|
};
|
|
10477
10482
|
}
|
|
10478
10483
|
function isRecord3(value) {
|
|
@@ -10676,7 +10681,14 @@ function resolveConfiguredTeamPath(teamPath, configRoot) {
|
|
|
10676
10681
|
function normalizeConfiguredTeamEntry(input) {
|
|
10677
10682
|
if (!isRecord3(input.value)) {
|
|
10678
10683
|
return {
|
|
10679
|
-
issues: [createConfigIssue(
|
|
10684
|
+
issues: [createConfigIssue({
|
|
10685
|
+
configPath: input.configPath,
|
|
10686
|
+
message: `crewbee.json teams[${input.index}] must be an object.`,
|
|
10687
|
+
code: "crewbee_config_team_entry_invalid",
|
|
10688
|
+
path: `teams[${input.index}]`,
|
|
10689
|
+
sourceScope: input.sourceScope,
|
|
10690
|
+
suggestion: "Replace this entry with an object containing either id or path."
|
|
10691
|
+
})]
|
|
10680
10692
|
};
|
|
10681
10693
|
}
|
|
10682
10694
|
const raw = input.value;
|
|
@@ -10684,22 +10696,50 @@ function normalizeConfiguredTeamEntry(input) {
|
|
|
10684
10696
|
const teamPath = getOptionalString(raw.path);
|
|
10685
10697
|
if (teamId && teamPath) {
|
|
10686
10698
|
return {
|
|
10687
|
-
issues: [createConfigIssue(
|
|
10699
|
+
issues: [createConfigIssue({
|
|
10700
|
+
configPath: input.configPath,
|
|
10701
|
+
message: `crewbee.json teams[${input.index}] cannot declare both id and path.`,
|
|
10702
|
+
code: "crewbee_config_team_entry_conflict",
|
|
10703
|
+
path: `teams[${input.index}]`,
|
|
10704
|
+
sourceScope: input.sourceScope,
|
|
10705
|
+
suggestion: "Keep id for embedded Teams or path for filesystem Teams, not both."
|
|
10706
|
+
})]
|
|
10688
10707
|
};
|
|
10689
10708
|
}
|
|
10690
10709
|
if (!teamId && !teamPath) {
|
|
10691
10710
|
return {
|
|
10692
|
-
issues: [createConfigIssue(
|
|
10711
|
+
issues: [createConfigIssue({
|
|
10712
|
+
configPath: input.configPath,
|
|
10713
|
+
message: `crewbee.json teams[${input.index}] must declare either id or path.`,
|
|
10714
|
+
code: "crewbee_config_team_entry_missing_source",
|
|
10715
|
+
path: `teams[${input.index}]`,
|
|
10716
|
+
sourceScope: input.sourceScope,
|
|
10717
|
+
suggestion: "Add an embedded Team id or a filesystem Team path."
|
|
10718
|
+
})]
|
|
10693
10719
|
};
|
|
10694
10720
|
}
|
|
10695
10721
|
if (raw.enabled !== void 0 && typeof raw.enabled !== "boolean") {
|
|
10696
10722
|
return {
|
|
10697
|
-
issues: [createConfigIssue(
|
|
10723
|
+
issues: [createConfigIssue({
|
|
10724
|
+
configPath: input.configPath,
|
|
10725
|
+
message: `crewbee.json teams[${input.index}].enabled must be a boolean when provided.`,
|
|
10726
|
+
code: "crewbee_config_team_entry_enabled_invalid",
|
|
10727
|
+
path: `teams[${input.index}].enabled`,
|
|
10728
|
+
sourceScope: input.sourceScope,
|
|
10729
|
+
suggestion: "Use true or false for enabled."
|
|
10730
|
+
})]
|
|
10698
10731
|
};
|
|
10699
10732
|
}
|
|
10700
10733
|
if (raw.priority !== void 0 && (typeof raw.priority !== "number" || !Number.isFinite(raw.priority))) {
|
|
10701
10734
|
return {
|
|
10702
|
-
issues: [createConfigIssue(
|
|
10735
|
+
issues: [createConfigIssue({
|
|
10736
|
+
configPath: input.configPath,
|
|
10737
|
+
message: `crewbee.json teams[${input.index}].priority must be a finite number when provided.`,
|
|
10738
|
+
code: "crewbee_config_team_entry_priority_invalid",
|
|
10739
|
+
path: `teams[${input.index}].priority`,
|
|
10740
|
+
sourceScope: input.sourceScope,
|
|
10741
|
+
suggestion: "Use a finite numeric priority; lower values load first."
|
|
10742
|
+
})]
|
|
10703
10743
|
};
|
|
10704
10744
|
}
|
|
10705
10745
|
if (teamId) {
|
|
@@ -10734,7 +10774,14 @@ function normalizeConfiguredTeamEntry(input) {
|
|
|
10734
10774
|
} catch (error45) {
|
|
10735
10775
|
const message = error45 instanceof Error ? error45.message : String(error45);
|
|
10736
10776
|
return {
|
|
10737
|
-
issues: [createConfigIssue(
|
|
10777
|
+
issues: [createConfigIssue({
|
|
10778
|
+
configPath: input.configPath,
|
|
10779
|
+
message: `crewbee.json teams[${input.index}].path is invalid: ${message}`,
|
|
10780
|
+
code: "crewbee_config_team_entry_path_invalid",
|
|
10781
|
+
path: `teams[${input.index}].path`,
|
|
10782
|
+
sourceScope: input.sourceScope,
|
|
10783
|
+
suggestion: "Use an absolute path, ~/path, or @path relative to the crewbee.json directory."
|
|
10784
|
+
})]
|
|
10738
10785
|
};
|
|
10739
10786
|
}
|
|
10740
10787
|
}
|
|
@@ -10744,7 +10791,12 @@ function dedupeConfiguredTeamSources(input) {
|
|
|
10744
10791
|
const sources = input.sources.filter((source) => {
|
|
10745
10792
|
const key = source.kind === "embedded" ? `embedded:${source.teamId}` : `filesystem:${source.teamDir.toLowerCase()}`;
|
|
10746
10793
|
if (seen.has(key)) {
|
|
10747
|
-
issues.push(createConfigIssue(
|
|
10794
|
+
issues.push(createConfigIssue({
|
|
10795
|
+
configPath: input.configPath,
|
|
10796
|
+
message: `crewbee.json contains a duplicate Team entry for '${key}'.`,
|
|
10797
|
+
code: "crewbee_config_duplicate_team_entry",
|
|
10798
|
+
suggestion: "Remove the duplicate Team entry; the first matching entry is used."
|
|
10799
|
+
}));
|
|
10748
10800
|
return false;
|
|
10749
10801
|
}
|
|
10750
10802
|
seen.add(key);
|
|
@@ -10790,7 +10842,12 @@ function listConfiguredTeamSourcesFromDescriptor(descriptor) {
|
|
|
10790
10842
|
sourcePrecedence: descriptor.precedence,
|
|
10791
10843
|
configPath
|
|
10792
10844
|
})] : [],
|
|
10793
|
-
issues: descriptor.missingIsWarning ? [createConfigIssue(
|
|
10845
|
+
issues: descriptor.missingIsWarning ? [createConfigIssue({
|
|
10846
|
+
configPath,
|
|
10847
|
+
message: `crewbee.json source '${descriptor.scope}' does not exist.`,
|
|
10848
|
+
code: "crewbee_config_missing",
|
|
10849
|
+
sourceScope: descriptor.scope
|
|
10850
|
+
})] : []
|
|
10794
10851
|
};
|
|
10795
10852
|
}
|
|
10796
10853
|
let parsed;
|
|
@@ -10804,7 +10861,14 @@ function listConfiguredTeamSourcesFromDescriptor(descriptor) {
|
|
|
10804
10861
|
sourcePrecedence: descriptor.precedence,
|
|
10805
10862
|
configPath
|
|
10806
10863
|
})] : [],
|
|
10807
|
-
issues: [createConfigIssue(
|
|
10864
|
+
issues: [createConfigIssue({
|
|
10865
|
+
configPath,
|
|
10866
|
+
message: "crewbee.json must contain a top-level object.",
|
|
10867
|
+
code: "crewbee_config_root_invalid",
|
|
10868
|
+
sourceScope: descriptor.scope,
|
|
10869
|
+
fixable: descriptor.addDefaultCodingTeam,
|
|
10870
|
+
suggestion: descriptor.addDefaultCodingTeam ? "Run crewbee install to rewrite the global crewbee.json from the packaged template." : "Replace project crewbee.json with an object containing a teams array."
|
|
10871
|
+
})]
|
|
10808
10872
|
};
|
|
10809
10873
|
}
|
|
10810
10874
|
parsed = value;
|
|
@@ -10816,7 +10880,14 @@ function listConfiguredTeamSourcesFromDescriptor(descriptor) {
|
|
|
10816
10880
|
sourcePrecedence: descriptor.precedence,
|
|
10817
10881
|
configPath
|
|
10818
10882
|
})] : [],
|
|
10819
|
-
issues: [createConfigIssue(
|
|
10883
|
+
issues: [createConfigIssue({
|
|
10884
|
+
configPath,
|
|
10885
|
+
message: `Failed to parse crewbee.json: ${message}`,
|
|
10886
|
+
code: "crewbee_config_parse_failed",
|
|
10887
|
+
sourceScope: descriptor.scope,
|
|
10888
|
+
fixable: descriptor.addDefaultCodingTeam,
|
|
10889
|
+
suggestion: descriptor.addDefaultCodingTeam ? "The global config can be safely repaired from the packaged template on install or plugin startup." : "Fix the JSON syntax; project configs are reported but not auto-rewritten."
|
|
10890
|
+
})]
|
|
10820
10891
|
};
|
|
10821
10892
|
}
|
|
10822
10893
|
if (parsed.teams !== void 0 && !Array.isArray(parsed.teams)) {
|
|
@@ -10826,7 +10897,15 @@ function listConfiguredTeamSourcesFromDescriptor(descriptor) {
|
|
|
10826
10897
|
sourcePrecedence: descriptor.precedence,
|
|
10827
10898
|
configPath
|
|
10828
10899
|
})] : [],
|
|
10829
|
-
issues: [createConfigIssue(
|
|
10900
|
+
issues: [createConfigIssue({
|
|
10901
|
+
configPath,
|
|
10902
|
+
message: "crewbee.json teams must be an array when provided.",
|
|
10903
|
+
code: "crewbee_config_teams_invalid",
|
|
10904
|
+
path: "teams",
|
|
10905
|
+
sourceScope: descriptor.scope,
|
|
10906
|
+
fixable: descriptor.addDefaultCodingTeam,
|
|
10907
|
+
suggestion: descriptor.addDefaultCodingTeam ? "The global config can be safely repaired from the packaged template on install or plugin startup." : "Use teams: [] or a list of Team entries in project crewbee.json."
|
|
10908
|
+
})]
|
|
10830
10909
|
};
|
|
10831
10910
|
}
|
|
10832
10911
|
const resolved = (parsed.teams ?? []).map((value, index) => normalizeConfiguredTeamEntry({
|
|
@@ -10865,21 +10944,45 @@ function listConfiguredTeamSources(input) {
|
|
|
10865
10944
|
issues: resolved.flatMap((entry) => entry.issues)
|
|
10866
10945
|
};
|
|
10867
10946
|
}
|
|
10868
|
-
function
|
|
10947
|
+
function createSkippedAgentIssue(filePath, message) {
|
|
10948
|
+
return {
|
|
10949
|
+
level: "error",
|
|
10950
|
+
blocking: false,
|
|
10951
|
+
filePath,
|
|
10952
|
+
code: "agent_profile_load_failed",
|
|
10953
|
+
message: `Skipped Agent '${path3.basename(filePath)}': ${message}`,
|
|
10954
|
+
suggestion: "Fix this Agent profile file; other valid Agents in the same Team remain loadable when possible."
|
|
10955
|
+
};
|
|
10956
|
+
}
|
|
10957
|
+
function loadTeamDefinitionFromDirectoryWithIssues(teamDir, workspaceRoot = process.cwd()) {
|
|
10869
10958
|
const manifest = mapTeamManifest(path3.join(teamDir, TEAM_MANIFEST_FILE));
|
|
10870
10959
|
const policyPath = path3.join(teamDir, TEAM_POLICY_FILE);
|
|
10871
10960
|
if (!existsSync3(policyPath)) {
|
|
10872
10961
|
throw new Error(`${teamDir} is missing ${TEAM_POLICY_FILE}.`);
|
|
10873
10962
|
}
|
|
10874
|
-
const
|
|
10963
|
+
const agentFiles = readdirSync2(teamDir).filter((entry) => entry.endsWith(".agent.md")).sort();
|
|
10964
|
+
const issues = [];
|
|
10965
|
+
const agents = agentFiles.flatMap((entry) => {
|
|
10966
|
+
const agentPath = path3.join(teamDir, entry);
|
|
10967
|
+
try {
|
|
10968
|
+
return [mapAgentProfile(agentPath)];
|
|
10969
|
+
} catch (error45) {
|
|
10970
|
+
const message = error45 instanceof Error ? error45.message : String(error45);
|
|
10971
|
+
issues.push(createSkippedAgentIssue(agentPath, message));
|
|
10972
|
+
return [];
|
|
10973
|
+
}
|
|
10974
|
+
});
|
|
10875
10975
|
if (agents.length === 0) {
|
|
10876
10976
|
throw new Error(`${teamDir} must contain at least one *.agent.md file at the team root.`);
|
|
10877
10977
|
}
|
|
10878
10978
|
return {
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10979
|
+
team: {
|
|
10980
|
+
manifest,
|
|
10981
|
+
policy: mapTeamPolicy(policyPath),
|
|
10982
|
+
agents,
|
|
10983
|
+
documentation: resolveTeamDocumentation(teamDir, workspaceRoot)
|
|
10984
|
+
},
|
|
10985
|
+
issues
|
|
10883
10986
|
};
|
|
10884
10987
|
}
|
|
10885
10988
|
|
|
@@ -10933,7 +11036,10 @@ function normalizeTeamAgentIds(input) {
|
|
|
10933
11036
|
if (nextUsedIds.has(assigned) || localAssignedIds.has(assigned)) {
|
|
10934
11037
|
issues.push({
|
|
10935
11038
|
level: "error",
|
|
10936
|
-
|
|
11039
|
+
code: "canonical_agent_id_collision",
|
|
11040
|
+
message: `Team '${input.team.manifest.id}' cannot assign a unique canonicalAgentId for source agent '${sourceId}'. Candidate '${candidate}' and fallback '${fallback}' both collide.`,
|
|
11041
|
+
path: `agents.${sourceId}.id`,
|
|
11042
|
+
suggestion: "Rename the source Agent id or Team id so CrewBee can derive a unique canonical Agent id."
|
|
10937
11043
|
});
|
|
10938
11044
|
return { issues };
|
|
10939
11045
|
}
|
|
@@ -11006,34 +11112,49 @@ function validateTeamDefinition(team) {
|
|
|
11006
11112
|
if (!agentIds.has(manifest.leader.agentRef)) {
|
|
11007
11113
|
issues.push({
|
|
11008
11114
|
level: "error",
|
|
11009
|
-
|
|
11115
|
+
code: "team_leader_missing",
|
|
11116
|
+
path: "leader.agent_ref",
|
|
11117
|
+
message: `Leader agent '${manifest.leader.agentRef}' is not defined in this Team.`,
|
|
11118
|
+
suggestion: "Add a matching *.agent.md profile or update leader.agent_ref."
|
|
11010
11119
|
});
|
|
11011
11120
|
} else if (leaderAgent?.entryPoint?.exposure !== "user-selectable") {
|
|
11012
11121
|
issues.push({
|
|
11013
11122
|
level: "error",
|
|
11014
|
-
|
|
11123
|
+
code: "team_leader_not_user_selectable",
|
|
11124
|
+
path: "leader.agent_ref",
|
|
11125
|
+
message: `Leader agent '${manifest.leader.agentRef}' must be user-selectable.`,
|
|
11126
|
+
suggestion: "Set entry_point.exposure to user-selectable on the leader Agent profile."
|
|
11015
11127
|
});
|
|
11016
11128
|
}
|
|
11017
11129
|
for (const agentRef of Object.keys(manifest.members)) {
|
|
11018
11130
|
if (!agentIds.has(agentRef)) {
|
|
11019
11131
|
issues.push({
|
|
11020
|
-
level: "
|
|
11021
|
-
|
|
11132
|
+
level: "warning",
|
|
11133
|
+
code: "team_member_missing",
|
|
11134
|
+
path: `members.${agentRef}`,
|
|
11135
|
+
message: `Member agent '${agentRef}' is not defined in this Team.`,
|
|
11136
|
+
suggestion: "Add the member Agent profile or remove this manifest member entry."
|
|
11022
11137
|
});
|
|
11023
11138
|
}
|
|
11024
11139
|
}
|
|
11025
11140
|
if (!team.policy) {
|
|
11026
11141
|
issues.push({
|
|
11027
11142
|
level: "error",
|
|
11028
|
-
|
|
11143
|
+
code: "team_policy_missing",
|
|
11144
|
+
path: "team.policy.yaml",
|
|
11145
|
+
message: `Team '${manifest.id}' must define team.policy.yaml.`,
|
|
11146
|
+
suggestion: "Create team.policy.yaml at the Team root."
|
|
11029
11147
|
});
|
|
11030
11148
|
return issues;
|
|
11031
11149
|
}
|
|
11032
11150
|
for (const [agentId] of Object.entries(manifest.agentRuntime ?? {})) {
|
|
11033
11151
|
if (!agentIds.has(agentId)) {
|
|
11034
11152
|
issues.push({
|
|
11035
|
-
level: "
|
|
11036
|
-
|
|
11153
|
+
level: "warning",
|
|
11154
|
+
code: "team_agent_runtime_target_missing",
|
|
11155
|
+
path: `agent_runtime.${agentId}`,
|
|
11156
|
+
message: `Agent runtime override '${agentId}' is not defined in this Team.`,
|
|
11157
|
+
suggestion: "Remove this runtime override or add the target Agent profile."
|
|
11037
11158
|
});
|
|
11038
11159
|
}
|
|
11039
11160
|
}
|
|
@@ -11046,27 +11167,39 @@ function validateTeamDefinition(team) {
|
|
|
11046
11167
|
if (requestedTools.size === 0) {
|
|
11047
11168
|
issues.push({
|
|
11048
11169
|
level: "error",
|
|
11049
|
-
|
|
11170
|
+
code: "agent_requested_tools_missing",
|
|
11171
|
+
path: `agents.${agent.metadata.id}.runtime_config.requested_tools`,
|
|
11172
|
+
message: `Agent '${agent.metadata.id}' must declare at least one requested tool.`,
|
|
11173
|
+
suggestion: "Add runtime_config.requested_tools with at least one tool name."
|
|
11050
11174
|
});
|
|
11051
11175
|
}
|
|
11052
11176
|
if (agent.runtimeConfig.permission.length === 0) {
|
|
11053
11177
|
issues.push({
|
|
11054
11178
|
level: "error",
|
|
11055
|
-
|
|
11179
|
+
code: "agent_permission_missing",
|
|
11180
|
+
path: `agents.${agent.metadata.id}.runtime_config.permission`,
|
|
11181
|
+
message: `Agent '${agent.metadata.id}' must declare at least one permission rule.`,
|
|
11182
|
+
suggestion: "Add runtime_config.permission with at least one permission rule."
|
|
11056
11183
|
});
|
|
11057
11184
|
}
|
|
11058
11185
|
for (const targetAgentRef of collaborationTargets) {
|
|
11059
11186
|
if (!agentIds.has(targetAgentRef)) {
|
|
11060
11187
|
issues.push({
|
|
11061
|
-
level: "
|
|
11062
|
-
|
|
11188
|
+
level: "warning",
|
|
11189
|
+
code: "agent_collaboration_target_unknown",
|
|
11190
|
+
path: `agents.${agent.metadata.id}.collaboration`,
|
|
11191
|
+
message: `Agent '${agent.metadata.id}' references unknown collaboration target '${targetAgentRef}'.`,
|
|
11192
|
+
suggestion: "Add the target Agent profile or update the collaboration binding."
|
|
11063
11193
|
});
|
|
11064
11194
|
continue;
|
|
11065
11195
|
}
|
|
11066
11196
|
if (targetAgentRef !== manifest.leader.agentRef && !manifest.members[targetAgentRef]) {
|
|
11067
11197
|
issues.push({
|
|
11068
11198
|
level: "error",
|
|
11069
|
-
|
|
11199
|
+
code: "agent_collaboration_target_missing_member_guidance",
|
|
11200
|
+
path: `agents.${agent.metadata.id}.collaboration`,
|
|
11201
|
+
message: `Agent '${agent.metadata.id}' references collaboration target '${targetAgentRef}' without manifest member guidance.`,
|
|
11202
|
+
suggestion: "Add manifest member guidance for this collaboration target or remove the binding."
|
|
11070
11203
|
});
|
|
11071
11204
|
}
|
|
11072
11205
|
}
|
|
@@ -11074,43 +11207,63 @@ function validateTeamDefinition(team) {
|
|
|
11074
11207
|
if (manifest.governance.instructionPrecedence.length === 0) {
|
|
11075
11208
|
issues.push({
|
|
11076
11209
|
level: "error",
|
|
11077
|
-
|
|
11210
|
+
code: "team_governance_instruction_precedence_missing",
|
|
11211
|
+
path: "governance.instruction_precedence",
|
|
11212
|
+
message: `Team '${manifest.id}' must define governance.instructionPrecedence.`,
|
|
11213
|
+
suggestion: "Add governance.instruction_precedence with at least one rule."
|
|
11078
11214
|
});
|
|
11079
11215
|
}
|
|
11080
11216
|
if (!team.policy.instructionPrecedence) {
|
|
11081
11217
|
issues.push({
|
|
11082
11218
|
level: "error",
|
|
11083
|
-
|
|
11219
|
+
code: "team_policy_instruction_precedence_missing",
|
|
11220
|
+
path: "team.policy.yaml.instruction_precedence",
|
|
11221
|
+
message: `Team '${manifest.id}' must define policy.instruction_precedence.`,
|
|
11222
|
+
suggestion: "Add instruction_precedence to team.policy.yaml."
|
|
11084
11223
|
});
|
|
11085
11224
|
}
|
|
11086
11225
|
if (!team.policy.workingRules) {
|
|
11087
11226
|
issues.push({
|
|
11088
11227
|
level: "error",
|
|
11089
|
-
|
|
11228
|
+
code: "team_policy_working_rules_missing",
|
|
11229
|
+
path: "team.policy.yaml.working_rules",
|
|
11230
|
+
message: `Team '${manifest.id}' must define policy.working_rules.`,
|
|
11231
|
+
suggestion: "Add working_rules to team.policy.yaml."
|
|
11090
11232
|
});
|
|
11091
11233
|
}
|
|
11092
11234
|
if (!team.policy.qualityFloor) {
|
|
11093
11235
|
issues.push({
|
|
11094
11236
|
level: "error",
|
|
11095
|
-
|
|
11237
|
+
code: "team_policy_quality_floor_missing",
|
|
11238
|
+
path: "team.policy.yaml.quality_floor",
|
|
11239
|
+
message: `Team '${manifest.id}' must define policy.quality_floor.`,
|
|
11240
|
+
suggestion: "Add quality_floor to team.policy.yaml."
|
|
11096
11241
|
});
|
|
11097
11242
|
}
|
|
11098
11243
|
if (manifest.governance.workingRules.length === 0) {
|
|
11099
11244
|
issues.push({
|
|
11100
11245
|
level: "error",
|
|
11101
|
-
|
|
11246
|
+
code: "team_governance_working_rules_missing",
|
|
11247
|
+
path: "governance.working_rules",
|
|
11248
|
+
message: `Team '${manifest.id}' must define governance.workingRules.`,
|
|
11249
|
+
suggestion: "Add governance.working_rules with at least one rule."
|
|
11102
11250
|
});
|
|
11103
11251
|
}
|
|
11104
11252
|
if (manifest.governance.qualityFloor.requiredChecks.length === 0) {
|
|
11105
11253
|
issues.push({
|
|
11106
11254
|
level: "error",
|
|
11107
|
-
|
|
11255
|
+
code: "team_governance_required_checks_missing",
|
|
11256
|
+
path: "governance.quality_floor.required_checks",
|
|
11257
|
+
message: `Team '${manifest.id}' must define governance.qualityFloor.requiredChecks.`,
|
|
11258
|
+
suggestion: "Add governance.quality_floor.required_checks with at least one check."
|
|
11108
11259
|
});
|
|
11109
11260
|
}
|
|
11110
11261
|
if (!team.documentation?.teamReadme && !EMBEDDED_TEAM_IDS.includes(manifest.id)) {
|
|
11111
11262
|
issues.push({
|
|
11112
11263
|
level: "warning",
|
|
11113
|
-
|
|
11264
|
+
code: "team_documentation_missing",
|
|
11265
|
+
message: `Team '${manifest.id}' has no human-facing TEAM.md or README.md at the team root.`,
|
|
11266
|
+
suggestion: "Add TEAM.md or README.md to document this Team for humans."
|
|
11114
11267
|
});
|
|
11115
11268
|
}
|
|
11116
11269
|
return issues;
|
|
@@ -11124,11 +11277,16 @@ function createSkippedTeamIssue(teamDir, message) {
|
|
|
11124
11277
|
return {
|
|
11125
11278
|
level: "warning",
|
|
11126
11279
|
filePath: teamDir,
|
|
11127
|
-
|
|
11280
|
+
code: "team_load_failed",
|
|
11281
|
+
message: `Skipped Team '${path4.basename(teamDir)}': ${message}`,
|
|
11282
|
+
suggestion: "Fix this Team directory; CrewBee will continue loading other valid Teams."
|
|
11128
11283
|
};
|
|
11129
11284
|
}
|
|
11130
|
-
function loadDefaultTeamLibrary(
|
|
11131
|
-
const
|
|
11285
|
+
function loadDefaultTeamLibrary(input = process.cwd()) {
|
|
11286
|
+
const baseDir = typeof input === "string" ? input : input.projectWorktree ?? process.cwd();
|
|
11287
|
+
const configured = listConfiguredTeamSources(
|
|
11288
|
+
typeof input === "string" ? { projectWorktree: input } : { globalConfigRoot: input.globalConfigRoot, projectWorktree: input.projectWorktree }
|
|
11289
|
+
);
|
|
11132
11290
|
const pendingTeams = [];
|
|
11133
11291
|
for (const source of configured.sources) {
|
|
11134
11292
|
if (!source.enabled) {
|
|
@@ -11153,9 +11311,10 @@ function loadDefaultTeamLibrary(baseDir = process.cwd()) {
|
|
|
11153
11311
|
pendingTeams.push({
|
|
11154
11312
|
loader: () => {
|
|
11155
11313
|
try {
|
|
11314
|
+
const loaded = loadTeamDefinitionFromDirectoryWithIssues(source.teamDir, baseDir);
|
|
11156
11315
|
return {
|
|
11157
|
-
team:
|
|
11158
|
-
issues:
|
|
11316
|
+
team: loaded.team,
|
|
11317
|
+
issues: loaded.issues
|
|
11159
11318
|
};
|
|
11160
11319
|
} catch (error45) {
|
|
11161
11320
|
const message = error45 instanceof Error ? error45.message : String(error45);
|
|
@@ -11194,7 +11353,10 @@ function loadDefaultTeamLibrary(baseDir = process.cwd()) {
|
|
|
11194
11353
|
configured.issues.push({
|
|
11195
11354
|
level: "warning",
|
|
11196
11355
|
filePath: entry.configPath,
|
|
11197
|
-
|
|
11356
|
+
code: "team_id_shadowed_or_duplicate",
|
|
11357
|
+
sourceScope: entry.sourceScope === "project" || entry.sourceScope === "global" ? entry.sourceScope : void 0,
|
|
11358
|
+
message: entry.sourceScope === "global" && existing.sourceScope === "project" ? `Project Team '${loaded.team.manifest.id}' shadows global Team '${loaded.team.manifest.id}'.` : `Skipped Team '${loaded.team.manifest.id}': duplicate Team id already loaded from ${existing.sourceScope} source.`,
|
|
11359
|
+
suggestion: entry.sourceScope === "global" && existing.sourceScope === "project" ? "This is expected when a project intentionally overrides a global Team id." : "Rename one Team id or disable one Team entry."
|
|
11198
11360
|
});
|
|
11199
11361
|
continue;
|
|
11200
11362
|
}
|
|
@@ -11215,6 +11377,9 @@ function loadDefaultTeamLibrary(baseDir = process.cwd()) {
|
|
|
11215
11377
|
configured.issues.push(...errors.map((issue2) => ({
|
|
11216
11378
|
level: "warning",
|
|
11217
11379
|
filePath: issue2.filePath,
|
|
11380
|
+
code: issue2.code ?? "team_validation_failed",
|
|
11381
|
+
path: issue2.path,
|
|
11382
|
+
suggestion: issue2.suggestion,
|
|
11218
11383
|
message: `Skipped Team '${normalized.team?.manifest.id ?? "unknown"}': ${issue2.message}`
|
|
11219
11384
|
})));
|
|
11220
11385
|
continue;
|
|
@@ -12674,7 +12839,7 @@ function getConfig(cfg) {
|
|
|
12674
12839
|
}
|
|
12675
12840
|
async function validateAndLogTeamLibrary(ctx, teamLibrary) {
|
|
12676
12841
|
const issues = validateTeamLibrary(teamLibrary);
|
|
12677
|
-
const errors = issues.filter((issue2) => issue2.level === "error");
|
|
12842
|
+
const errors = issues.filter((issue2) => issue2.level === "error" && issue2.blocking !== false);
|
|
12678
12843
|
if (errors.length > 0) {
|
|
12679
12844
|
throw new Error(errors.map((issue2) => issue2.message).join("\n"));
|
|
12680
12845
|
}
|
|
@@ -12684,7 +12849,14 @@ async function validateAndLogTeamLibrary(ctx, teamLibrary) {
|
|
|
12684
12849
|
service: "crewbee",
|
|
12685
12850
|
level: issue2.level === "warning" ? "warn" : "error",
|
|
12686
12851
|
message: issue2.message,
|
|
12687
|
-
extra:
|
|
12852
|
+
extra: {
|
|
12853
|
+
...issue2.filePath ? { filePath: issue2.filePath } : {},
|
|
12854
|
+
...issue2.code ? { code: issue2.code } : {},
|
|
12855
|
+
...issue2.path ? { path: issue2.path } : {},
|
|
12856
|
+
...issue2.sourceScope ? { sourceScope: issue2.sourceScope } : {},
|
|
12857
|
+
...issue2.fixable !== void 0 ? { fixable: issue2.fixable } : {},
|
|
12858
|
+
...issue2.suggestion ? { suggestion: issue2.suggestion } : {}
|
|
12859
|
+
}
|
|
12688
12860
|
}
|
|
12689
12861
|
}))
|
|
12690
12862
|
);
|
|
@@ -25693,7 +25865,7 @@ function createDelegateTools(input) {
|
|
|
25693
25865
|
}
|
|
25694
25866
|
|
|
25695
25867
|
// src/adapters/opencode/system-transform-hook.ts
|
|
25696
|
-
function createSystemTransformHook(bindings) {
|
|
25868
|
+
function createSystemTransformHook(bindings, getLoadIssues = () => []) {
|
|
25697
25869
|
return async (input, output) => {
|
|
25698
25870
|
if (!input.sessionID) {
|
|
25699
25871
|
return;
|
|
@@ -25702,13 +25874,30 @@ function createSystemTransformHook(bindings) {
|
|
|
25702
25874
|
if (!binding3) {
|
|
25703
25875
|
return;
|
|
25704
25876
|
}
|
|
25705
|
-
|
|
25877
|
+
const lines = [
|
|
25706
25878
|
"CrewBee runtime binding:",
|
|
25707
25879
|
`- Team: ${binding3.teamId}`,
|
|
25708
25880
|
`- Entry Agent: ${binding3.selectedAgentId}`,
|
|
25709
25881
|
`- Active Owner: ${binding3.activeOwnerId}`,
|
|
25710
25882
|
`- Mode: ${binding3.mode}`
|
|
25711
|
-
]
|
|
25883
|
+
];
|
|
25884
|
+
const loadIssues = getLoadIssues();
|
|
25885
|
+
if (loadIssues.length > 0) {
|
|
25886
|
+
lines.push(
|
|
25887
|
+
"- Team Load Warnings:",
|
|
25888
|
+
...loadIssues.map((issue2) => {
|
|
25889
|
+
const details = [
|
|
25890
|
+
issue2.code,
|
|
25891
|
+
issue2.sourceScope ? `scope=${issue2.sourceScope}` : void 0,
|
|
25892
|
+
issue2.filePath,
|
|
25893
|
+
issue2.path ? `path=${issue2.path}` : void 0,
|
|
25894
|
+
issue2.suggestion ? `suggestion=${issue2.suggestion}` : void 0
|
|
25895
|
+
].filter(Boolean).join("; ");
|
|
25896
|
+
return ` - ${issue2.message}${details ? ` (${details})` : ""}`;
|
|
25897
|
+
})
|
|
25898
|
+
);
|
|
25899
|
+
}
|
|
25900
|
+
output.system.push(lines.join("\n"));
|
|
25712
25901
|
};
|
|
25713
25902
|
}
|
|
25714
25903
|
|
|
@@ -26234,7 +26423,10 @@ var OpenCodeCrewBeePlugin = async (ctx) => {
|
|
|
26234
26423
|
getAliasIndex: () => aliasIndex
|
|
26235
26424
|
}),
|
|
26236
26425
|
"tool.execute.after": createToolExecuteAfterHook(),
|
|
26237
|
-
"experimental.chat.system.transform": createSystemTransformHook(
|
|
26426
|
+
"experimental.chat.system.transform": createSystemTransformHook(
|
|
26427
|
+
bindings,
|
|
26428
|
+
() => teamLibrary.loadIssues ?? []
|
|
26429
|
+
),
|
|
26238
26430
|
"experimental.session.compacting": createCompactionHook(ctx, store)
|
|
26239
26431
|
};
|
|
26240
26432
|
};
|
|
@@ -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;AAGpF,OAAO,EAAkC,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAoB5F,wBAAsB,yBAAyB,CAAC,GAAG,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,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;AAGpF,OAAO,EAAkC,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAoB5F,wBAAsB,yBAAyB,CAAC,GAAG,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBzG;AAED,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,WAAW,GAAG;IAChE,IAAI,EAAE,uBAAuB,CAAC;IAC9B,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;CAClD,CASA;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,mBAuCvD"}
|
|
@@ -20,7 +20,7 @@ function getConfig(cfg) {
|
|
|
20
20
|
}
|
|
21
21
|
async function validateAndLogTeamLibrary(ctx, teamLibrary) {
|
|
22
22
|
const issues = (0, agent_teams_1.validateTeamLibrary)(teamLibrary);
|
|
23
|
-
const errors = issues.filter((issue) => issue.level === "error");
|
|
23
|
+
const errors = issues.filter((issue) => issue.level === "error" && issue.blocking !== false);
|
|
24
24
|
if (errors.length > 0) {
|
|
25
25
|
throw new Error(errors.map((issue) => issue.message).join("\n"));
|
|
26
26
|
}
|
|
@@ -29,7 +29,14 @@ async function validateAndLogTeamLibrary(ctx, teamLibrary) {
|
|
|
29
29
|
service: "crewbee",
|
|
30
30
|
level: issue.level === "warning" ? "warn" : "error",
|
|
31
31
|
message: issue.message,
|
|
32
|
-
extra:
|
|
32
|
+
extra: {
|
|
33
|
+
...(issue.filePath ? { filePath: issue.filePath } : {}),
|
|
34
|
+
...(issue.code ? { code: issue.code } : {}),
|
|
35
|
+
...(issue.path ? { path: issue.path } : {}),
|
|
36
|
+
...(issue.sourceScope ? { sourceScope: issue.sourceScope } : {}),
|
|
37
|
+
...(issue.fixable !== undefined ? { fixable: issue.fixable } : {}),
|
|
38
|
+
...(issue.suggestion ? { suggestion: issue.suggestion } : {}),
|
|
39
|
+
},
|
|
33
40
|
},
|
|
34
41
|
})));
|
|
35
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-hook.js","sourceRoot":"","sources":["../../../../src/adapters/opencode/config-hook.ts"],"names":[],"mappings":";;AA4BA,
|
|
1
|
+
{"version":3,"file":"config-hook.js","sourceRoot":"","sources":["../../../../src/adapters/opencode/config-hook.ts"],"names":[],"mappings":";;AA4BA,8DAwBC;AAED,wDAYC;AAED,4CA8CC;AAhHD,mDAAkF;AAGlF,2CAAoF;AAEpF,uCAAuC;AACvC,6CAA4F;AAE5F,MAAM,YAAY,GAAG,iBAA0B,CAAC;AAEhD,SAAS,wBAAwB,CAAC,IAA6B;IAK7D,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC1C,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,UAAU,IAAI,KAAK,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,SAAS;KAC5G,CAAC,CAAC,CAAC;AACN,CAAC;AAED,SAAS,SAAS,CAAC,GAAwC;IACzD,OAAO,GAAyB,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,CAAC,MAAM;YAC/E,eAAe,EAAE,wBAAwB,CAAC,IAAI,CAAC;SAChD,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/adapters/opencode/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAiBlD,eAAO,MAAM,qBAAqB,EAAE,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/adapters/opencode/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAiBlD,eAAO,MAAM,qBAAqB,EAAE,MAmEnC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -70,7 +70,7 @@ const OpenCodeCrewBeePlugin = async (ctx) => {
|
|
|
70
70
|
getAliasIndex: () => aliasIndex,
|
|
71
71
|
}),
|
|
72
72
|
"tool.execute.after": (0, tool_hooks_1.createToolExecuteAfterHook)(),
|
|
73
|
-
"experimental.chat.system.transform": (0, system_transform_hook_1.createSystemTransformHook)(bindings),
|
|
73
|
+
"experimental.chat.system.transform": (0, system_transform_hook_1.createSystemTransformHook)(bindings, () => teamLibrary.loadIssues ?? []),
|
|
74
74
|
"experimental.session.compacting": (0, compaction_hook_1.createCompactionHook)(ctx, store),
|
|
75
75
|
};
|
|
76
76
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/adapters/opencode/plugin.ts"],"names":[],"mappings":";;;AAEA,mDAAoF;AACpF,2CAA0D;AAG1D,2DAA4D;AAC5D,uDAAyD;AACzD,+CAAoG;AACpG,6CAA+C;AAC/C,8CAAwD;AACxD,8CAAyD;AACzD,uCAAuC;AACvC,mEAAoE;AACpE,6CAAiH;AACjH,kDAAqE;AAE9D,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