crewbee 0.1.7 → 0.1.9

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.
Files changed (43) hide show
  1. package/README.md +5 -25
  2. package/README.zh-CN.md +28 -24
  3. package/dist/opencode-plugin.mjs +169 -28
  4. package/dist/src/agent-teams/embedded/coding-team/agents/coding-executor.js +2 -2
  5. package/dist/src/agent-teams/embedded/coding-team/agents/coding-executor.js.map +1 -1
  6. package/dist/src/agent-teams/embedded/coding-team.js +8 -8
  7. package/dist/src/agent-teams/filesystem.d.ts +11 -1
  8. package/dist/src/agent-teams/filesystem.d.ts.map +1 -1
  9. package/dist/src/agent-teams/filesystem.js +135 -10
  10. package/dist/src/agent-teams/filesystem.js.map +1 -1
  11. package/dist/src/agent-teams/library.d.ts.map +1 -1
  12. package/dist/src/agent-teams/library.js +32 -1
  13. package/dist/src/agent-teams/library.js.map +1 -1
  14. package/dist/src/install/doctor.d.ts.map +1 -1
  15. package/dist/src/install/doctor.js +18 -3
  16. package/dist/src/install/doctor.js.map +1 -1
  17. package/package.json +2 -1
  18. package/templates/crewbee.json +24 -0
  19. package/templates/teams/general-team/README.md +27 -0
  20. package/templates/teams/general-team/TEAM.md +37 -0
  21. package/templates/teams/general-team/general-analyst.agent.md +107 -0
  22. package/templates/teams/general-team/general-editor.agent.md +107 -0
  23. package/templates/teams/general-team/general-leader.agent.md +138 -0
  24. package/templates/teams/general-team/general-operator.agent.md +123 -0
  25. package/templates/teams/general-team/general-researcher.agent.md +116 -0
  26. package/templates/teams/general-team/general-writer.agent.md +122 -0
  27. package/templates/teams/general-team/team.manifest.yaml +119 -0
  28. package/templates/teams/general-team/team.policy.yaml +40 -0
  29. package/templates/teams/template-team/TEAM.md +71 -0
  30. package/templates/teams/template-team/executor.agent.md +294 -0
  31. package/templates/teams/template-team/leader.agent.md +336 -0
  32. package/templates/teams/template-team/researcher.agent.md +287 -0
  33. package/templates/teams/template-team/team.manifest.yaml +132 -0
  34. package/templates/teams/template-team/team.policy.yaml +49 -0
  35. package/templates/teams/wukong-team/README.md +26 -0
  36. package/templates/teams/wukong-team/TEAM.md +36 -0
  37. package/templates/teams/wukong-team/team.manifest.yaml +110 -0
  38. package/templates/teams/wukong-team/team.policy.yaml +40 -0
  39. package/templates/teams/wukong-team/wukong-bajie.agent.md +107 -0
  40. package/templates/teams/wukong-team/wukong-dragon.agent.md +123 -0
  41. package/templates/teams/wukong-team/wukong-leader.agent.md +133 -0
  42. package/templates/teams/wukong-team/wukong-monk.agent.md +107 -0
  43. package/templates/teams/wukong-team/wukong-wujing.agent.md +123 -0
package/README.md CHANGED
@@ -36,9 +36,10 @@ The current version already delivers a complete **CrewBee → OpenCode** MVP pat
36
36
 
37
37
  ## Quick Links
38
38
 
39
+ - [CrewBeeLab Website](https://crewbeelab.github.io)
39
40
  - [Installation Guide](docs/guide/installation.md)
41
+ - [Custom Agent Team Guide](docs/guide/custom-agent-team.md)
40
42
  - [Release Guide](docs/guide/release.md)
41
- - [Architecture](docs/architecture.md)
42
43
 
43
44
  ## Agent IDs in OpenCode
44
45
 
@@ -61,7 +62,6 @@ The same id is used for OpenCode `default_agent`, session-level selection, deleg
61
62
  * [Core Features](#core-features)
62
63
  * [Installation](#installation)
63
64
  * [Quick Start](#quick-start)
64
- * [Architecture at a Glance](#architecture-at-a-glance)
65
65
  * [How Agent Teams and Agent Profiles Are Defined](#how-agent-teams-and-agent-profiles-are-defined)
66
66
  * [How the OpenCode Runtime Works](#how-the-opencode-runtime-works)
67
67
  * [Built-in Coding Team Design](#built-in-coding-team-design)
@@ -301,30 +301,10 @@ After installation:
301
301
  2. select a CrewBee projected agent (for example `coding-leader`)
302
302
  3. send requests normally
303
303
 
304
- ---
305
-
306
- ## Architecture at a Glance
307
-
308
- ```text
309
- Team Definitions
310
- -> TeamLibrary
311
- -> TeamLibrary Projection
312
- -> OpenCode Bootstrap
313
- -> OpenCode Config Patch + Session Binding
314
- -> OpenCode Plugin Hooks
315
-
316
- User-level install
317
- -> local tarball
318
- -> ~/.cache/opencode
319
- -> node_modules/crewbee
320
- -> canonical package-name entry (crewbee)
321
- -> OpenCode config
322
- ```
323
-
324
- ---
325
-
326
304
  ## How Agent Teams and Agent Profiles Are Defined
327
305
 
306
+ To design and register your own file-based Team, start with the [Custom Agent Team Guide](docs/guide/custom-agent-team.md). It walks through the real runnable directory layout, `crewbee.json` registration, Team policy design, agent role boundaries, and validation checklist.
307
+
328
308
  ### Actual file-based Team structure
329
309
 
330
310
  The real runnable file-based Team structure is currently:
@@ -352,7 +332,7 @@ Example:
352
332
  {
353
333
  "teams": [
354
334
  { "id": "coding-team", "enabled": true, "priority": 0 },
355
- { "path": "@tmp/oh-my-opencode", "enabled": true, "priority": 1 }
335
+ { "path": "@teams/research-team", "enabled": true, "priority": 1 }
356
336
  ]
357
337
  }
358
338
  ```
package/README.zh-CN.md CHANGED
@@ -36,9 +36,10 @@ CrewBee 是一个 **Team-first(团队优先)** 的 Agent Team 框架。
36
36
 
37
37
  ## 快速入口
38
38
 
39
+ - [CrewBeeLab 官网](https://crewbeelab.github.io)
39
40
  - [安装指南](docs/guide/installation.md)
41
+ - [自定义 Agent Team 指南](docs/guide/custom-agent-team.md)
40
42
  - [发布指南](docs/guide/release.md)
41
- - [架构文档](docs/architecture.md)
42
43
 
43
44
  ## OpenCode 中的 Agent ID
44
45
 
@@ -61,7 +62,6 @@ CrewBee 统一使用单一的 **canonical agent id**,贯穿投影、默认选
61
62
  * [核心特性](#核心特性)
62
63
  * [安装](#安装)
63
64
  * [快速开始](#快速开始)
64
- * [当前架构一览](#当前架构一览)
65
65
  * [Agent Team 与 Agent Profile 定义方式](#agent-team-与-agent-profile-定义方式)
66
66
  * [OpenCode 运行时是如何工作的](#opencode-运行时是如何工作的)
67
67
  * [内置 Coding Team 的设计思想](#内置-coding-team-的设计思想)
@@ -307,30 +307,10 @@ npm run version
307
307
  2. 选择 CrewBee 投影出的 agent(例如 `coding-leader`)
308
308
  3. 正常发送请求
309
309
 
310
- ---
311
-
312
- ## 当前架构一览
313
-
314
- ```text
315
- Team Definitions
316
- -> TeamLibrary
317
- -> TeamLibrary Projection
318
- -> OpenCode Bootstrap
319
- -> OpenCode Config Patch + Session Binding
320
- -> OpenCode Plugin Hooks
321
-
322
- User-level install
323
- -> local tarball
324
- -> ~/.cache/opencode
325
- -> node_modules/crewbee
326
- -> canonical package-name entry (crewbee)
327
- -> OpenCode config
328
- ```
329
-
330
-
331
-
332
310
  ## Agent Team 与 Agent Profile 定义方式
333
311
 
312
+ 如果你要设计并注册自己的文件型 Team,请先阅读 [自定义 Agent Team 指南](docs/guide/custom-agent-team.md)。它会说明真实可运行的目录结构、`crewbee.json` 注册方式、Team policy 设计、Agent 职责边界和验证清单。
313
+
334
314
  ### 文件型 Team 的实际结构
335
315
 
336
316
  当前真实可运行的文件型 Team 结构是:
@@ -346,6 +326,30 @@ teams/<team-name>/
346
326
 
347
327
  当前实现采用 **同级扁平目录**;不要求 `agents/` 或 `docs/` 子目录。
348
328
 
329
+ 当前通过以下配置控制要加载哪些文件型 Team:
330
+
331
+ ```text
332
+ ~/.config/opencode/crewbee.json
333
+ ```
334
+
335
+ 示例:
336
+
337
+ ```json
338
+ {
339
+ "teams": [
340
+ { "id": "coding-team", "enabled": true, "priority": 0 },
341
+ { "path": "@teams/research-team", "enabled": true, "priority": 1 }
342
+ ]
343
+ }
344
+ ```
345
+
346
+ 说明:
347
+
348
+ * 内置 `coding-team` 不需要 `path`
349
+ * 文件型 Team 使用 `path` 指向包含 `team.manifest.yaml` 的目录
350
+ * `@...` 路径相对于 OpenCode 配置根目录解析
351
+ * `priority` 数字越小优先级越高;最高优先级 Team 的默认 leader 会成为 CrewBee 的默认 OpenCode agent
352
+
349
353
  ### `team.manifest.yaml`
350
354
 
351
355
  负责:
@@ -7325,6 +7325,7 @@ var require_dist = __commonJS({
7325
7325
  });
7326
7326
 
7327
7327
  // src/agent-teams/constants.ts
7328
+ var TEAM_CONFIG_ROOT = "teams";
7328
7329
  var CREWBEE_CONFIG_FILE = "crewbee.json";
7329
7330
  var BUILTIN_CODING_TEAM_ID = "coding-team";
7330
7331
  var DEFAULT_EMBEDDED_TEAM_PRIORITY = 0;
@@ -8020,8 +8021,8 @@ function createCodingExecutorAgent() {
8020
8021
  { permission: "glob", pattern: "*", action: "allow" },
8021
8022
  { permission: "grep", pattern: "*", action: "allow" },
8022
8023
  { permission: "skill", pattern: "*", action: "allow" },
8023
- { permission: "edit", pattern: "*", action: "ask" },
8024
- { permission: "write", pattern: "*", action: "ask" },
8024
+ { permission: "edit", pattern: "*", action: "allow" },
8025
+ { permission: "write", pattern: "*", action: "allow" },
8025
8026
  { permission: "bash", pattern: "*", action: "allow" },
8026
8027
  { permission: "todowrite", pattern: "*", action: "allow" },
8027
8028
  { permission: "lsp_diagnostics", pattern: "*", action: "allow" }
@@ -9601,14 +9602,14 @@ function createEmbeddedCodingTeam() {
9601
9602
  ]
9602
9603
  },
9603
9604
  agentRuntime: {
9604
- "coding-leader": { provider: "openai", model: "gpt-5.4", temperature: 0.2, topP: 0.85, variant: "long-context" },
9605
- "coordination-leader": { provider: "openai", model: "gpt-5.4", temperature: 0.15, topP: 0.75 },
9606
- "coding-executor": { provider: "openai", model: "gpt-5.4", temperature: 0.25, topP: 0.9 },
9607
- "codebase-explorer": { provider: "openai", model: "gpt-5.4", temperature: 0.1, topP: 0.8 },
9608
- "web-researcher": { provider: "openai", model: "gpt-5.4", temperature: 0.2, topP: 0.85 },
9609
- reviewer: { provider: "openai", model: "gpt-5.4", temperature: 0.15, topP: 0.75 },
9610
- "principal-advisor": { provider: "openai", model: "gpt-5.4", temperature: 0.15, topP: 0.75 },
9611
- "multimodal-looker": { provider: "openai", model: "gpt-5.4", temperature: 0.2, topP: 0.85 }
9605
+ "coding-leader": { provider: "openai", model: "gpt-5.5", temperature: 0.2, topP: 0.85, variant: "long-context" },
9606
+ "coordination-leader": { provider: "openai", model: "gpt-5.5", temperature: 0.15, topP: 0.75 },
9607
+ "coding-executor": { provider: "openai", model: "gpt-5.5", temperature: 0.25, topP: 0.9 },
9608
+ "codebase-explorer": { provider: "openai", model: "gpt-5.5", temperature: 0.1, topP: 0.8 },
9609
+ "web-researcher": { provider: "openai", model: "gpt-5.5", temperature: 0.2, topP: 0.85 },
9610
+ reviewer: { provider: "openai", model: "gpt-5.5", temperature: 0.15, topP: 0.75 },
9611
+ "principal-advisor": { provider: "openai", model: "gpt-5.5", temperature: 0.15, topP: 0.75 },
9612
+ "multimodal-looker": { provider: "openai", model: "gpt-5.5", temperature: 0.2, topP: 0.85 }
9612
9613
  },
9613
9614
  tags: ["\u4EE3\u7801", "leader\u9A71\u52A8", "\u4E0A\u4E0B\u6587\u8FDE\u7EED\u6027", "\u4E3B\u6267\u884C\u8005\u4E2D\u5FC3", "\u8BC4\u5BA1\u4E2D\u5FC3", "\u8BC1\u636E\u9A71\u52A8"]
9614
9615
  };
@@ -9631,7 +9632,7 @@ function createEmbeddedCodingTeam() {
9631
9632
  }
9632
9633
 
9633
9634
  // src/agent-teams/filesystem.ts
9634
- import { existsSync as existsSync3, mkdirSync, readFileSync as readFileSync2, readdirSync as readdirSync2, writeFileSync } from "node:fs";
9635
+ import { cpSync, existsSync as existsSync3, mkdirSync, readFileSync as readFileSync2, readdirSync as readdirSync2, writeFileSync } from "node:fs";
9635
9636
  import os2 from "node:os";
9636
9637
  import path3 from "node:path";
9637
9638
 
@@ -10486,13 +10487,16 @@ function getOptionalPriority(value, fallback) {
10486
10487
  function getOptionalString(value) {
10487
10488
  return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
10488
10489
  }
10489
- function createDefaultCodingTeamSource() {
10490
+ function createDefaultCodingTeamSource(input) {
10490
10491
  return {
10491
10492
  kind: "embedded",
10492
10493
  teamId: BUILTIN_CODING_TEAM_ID,
10493
10494
  enabled: true,
10494
10495
  priority: DEFAULT_EMBEDDED_TEAM_PRIORITY,
10495
- order: -1
10496
+ order: -1,
10497
+ sourceScope: input.sourceScope,
10498
+ sourcePrecedence: input.sourcePrecedence,
10499
+ configPath: input.configPath
10496
10500
  };
10497
10501
  }
10498
10502
  function createDefaultCodingTeamConfigEntry() {
@@ -10502,7 +10506,49 @@ function createDefaultCodingTeamConfigEntry() {
10502
10506
  priority: DEFAULT_EMBEDDED_TEAM_PRIORITY
10503
10507
  };
10504
10508
  }
10509
+ function getPackagedTemplateRootPath() {
10510
+ const candidates = [
10511
+ // Runtime bundle: dist/opencode-plugin.mjs, with __dirname pointing at dist.
10512
+ path3.resolve(__dirname, "..", "templates"),
10513
+ // Compiled module tests / direct imports: dist/src/agent-teams/filesystem.js.
10514
+ path3.resolve(__dirname, "../../..", "templates")
10515
+ ];
10516
+ return candidates.find((candidate) => existsSync3(candidate));
10517
+ }
10518
+ function getPackagedCrewBeeConfigTemplatePath() {
10519
+ const templateRoot = getPackagedTemplateRootPath();
10520
+ return templateRoot ? path3.join(templateRoot, CREWBEE_CONFIG_FILE) : void 0;
10521
+ }
10522
+ function ensurePackagedTeamTemplates(configRoot, dryRun) {
10523
+ const templateRoot = getPackagedTemplateRootPath();
10524
+ if (!templateRoot) {
10525
+ return;
10526
+ }
10527
+ const packagedTeamsRoot = path3.join(templateRoot, TEAM_CONFIG_ROOT);
10528
+ if (!existsSync3(packagedTeamsRoot) || dryRun) {
10529
+ return;
10530
+ }
10531
+ cpSync(packagedTeamsRoot, path3.join(configRoot, TEAM_CONFIG_ROOT), {
10532
+ errorOnExist: false,
10533
+ force: false,
10534
+ recursive: true
10535
+ });
10536
+ }
10537
+ function isCrewBeeConfigFile(value) {
10538
+ return isRecord3(value) && Array.isArray(value.teams);
10539
+ }
10505
10540
  function createDefaultCrewBeeConfig() {
10541
+ const templatePath = getPackagedCrewBeeConfigTemplatePath();
10542
+ if (templatePath) {
10543
+ try {
10544
+ const parsed = JSON.parse(readFileSync2(templatePath, "utf8"));
10545
+ if (isCrewBeeConfigFile(parsed)) {
10546
+ return parsed;
10547
+ }
10548
+ } catch (error45) {
10549
+ void error45;
10550
+ }
10551
+ }
10506
10552
  return {
10507
10553
  teams: [createDefaultCodingTeamConfigEntry()]
10508
10554
  };
@@ -10567,6 +10613,7 @@ function ensureCrewBeeConfigFile(input) {
10567
10613
  const configPath = resolveCrewBeeConfigPath(configRoot);
10568
10614
  if (!existsSync3(configPath)) {
10569
10615
  if (!input.dryRun) {
10616
+ ensurePackagedTeamTemplates(configRoot);
10570
10617
  writeCrewBeeConfig(configPath, createDefaultCrewBeeConfig());
10571
10618
  }
10572
10619
  return {
@@ -10579,6 +10626,7 @@ function ensureCrewBeeConfigFile(input) {
10579
10626
  if (!parsed.valid || !parsed.config) {
10580
10627
  const backupPath = !input.dryRun && parsed.rawText !== void 0 ? backupCrewBeeConfig(configPath, parsed.rawText) : void 0;
10581
10628
  if (!input.dryRun) {
10629
+ ensurePackagedTeamTemplates(configRoot);
10582
10630
  writeCrewBeeConfig(configPath, createDefaultCrewBeeConfig());
10583
10631
  }
10584
10632
  return {
@@ -10661,7 +10709,10 @@ function normalizeConfiguredTeamEntry(input) {
10661
10709
  teamId,
10662
10710
  enabled: getOptionalBoolean(raw.enabled, true),
10663
10711
  priority: getOptionalPriority(raw.priority, DEFAULT_EMBEDDED_TEAM_PRIORITY),
10664
- order: input.index
10712
+ order: input.index,
10713
+ sourceScope: input.sourceScope,
10714
+ sourcePrecedence: input.sourcePrecedence,
10715
+ configPath: input.configPath
10665
10716
  },
10666
10717
  issues: []
10667
10718
  };
@@ -10673,7 +10724,10 @@ function normalizeConfiguredTeamEntry(input) {
10673
10724
  teamDir: resolveConfiguredTeamPath(teamPath, input.configRoot),
10674
10725
  enabled: getOptionalBoolean(raw.enabled, true),
10675
10726
  priority: getOptionalPriority(raw.priority, DEFAULT_FILE_TEAM_PRIORITY),
10676
- order: input.index
10727
+ order: input.index,
10728
+ sourceScope: input.sourceScope,
10729
+ sourcePrecedence: input.sourcePrecedence,
10730
+ configPath: input.configPath
10677
10731
  },
10678
10732
  issues: []
10679
10733
  };
@@ -10701,12 +10755,42 @@ function dedupeConfiguredTeamSources(input) {
10701
10755
  function resolveCrewBeeConfigPath(configRoot = resolveOpenCodeConfigRoot()) {
10702
10756
  return path3.join(configRoot, CREWBEE_CONFIG_FILE);
10703
10757
  }
10704
- function listConfiguredTeamSources(configRoot = resolveOpenCodeConfigRoot()) {
10705
- const configPath = resolveCrewBeeConfigPath(configRoot);
10758
+ function resolveProjectCrewBeeConfigRoot(worktree) {
10759
+ return path3.join(worktree, ".crewbee");
10760
+ }
10761
+ function createConfiguredTeamSourceDescriptors(input) {
10762
+ const sources = [];
10763
+ if (input.projectWorktree) {
10764
+ const projectConfigRoot = resolveProjectCrewBeeConfigRoot(input.projectWorktree);
10765
+ sources.push({
10766
+ scope: "project",
10767
+ configRoot: projectConfigRoot,
10768
+ configPath: resolveCrewBeeConfigPath(projectConfigRoot),
10769
+ precedence: 0,
10770
+ addDefaultCodingTeam: false,
10771
+ missingIsWarning: false
10772
+ });
10773
+ }
10774
+ sources.push({
10775
+ scope: "global",
10776
+ configRoot: input.globalConfigRoot,
10777
+ configPath: resolveCrewBeeConfigPath(input.globalConfigRoot),
10778
+ precedence: 1,
10779
+ addDefaultCodingTeam: true,
10780
+ missingIsWarning: false
10781
+ });
10782
+ return sources;
10783
+ }
10784
+ function listConfiguredTeamSourcesFromDescriptor(descriptor) {
10785
+ const configPath = descriptor.configPath;
10706
10786
  if (!existsSync3(configPath)) {
10707
10787
  return {
10708
- sources: [createDefaultCodingTeamSource()],
10709
- issues: []
10788
+ sources: descriptor.addDefaultCodingTeam ? [createDefaultCodingTeamSource({
10789
+ sourceScope: descriptor.scope,
10790
+ sourcePrecedence: descriptor.precedence,
10791
+ configPath
10792
+ })] : [],
10793
+ issues: descriptor.missingIsWarning ? [createConfigIssue(configPath, `crewbee.json source '${descriptor.scope}' does not exist.`)] : []
10710
10794
  };
10711
10795
  }
10712
10796
  let parsed;
@@ -10715,7 +10799,11 @@ function listConfiguredTeamSources(configRoot = resolveOpenCodeConfigRoot()) {
10715
10799
  const value = JSON.parse(rawConfig);
10716
10800
  if (!isRecord3(value)) {
10717
10801
  return {
10718
- sources: [createDefaultCodingTeamSource()],
10802
+ sources: descriptor.addDefaultCodingTeam ? [createDefaultCodingTeamSource({
10803
+ sourceScope: descriptor.scope,
10804
+ sourcePrecedence: descriptor.precedence,
10805
+ configPath
10806
+ })] : [],
10719
10807
  issues: [createConfigIssue(configPath, "crewbee.json must contain a top-level object.")]
10720
10808
  };
10721
10809
  }
@@ -10723,27 +10811,41 @@ function listConfiguredTeamSources(configRoot = resolveOpenCodeConfigRoot()) {
10723
10811
  } catch (error45) {
10724
10812
  const message = error45 instanceof Error ? error45.message : String(error45);
10725
10813
  return {
10726
- sources: [createDefaultCodingTeamSource()],
10814
+ sources: descriptor.addDefaultCodingTeam ? [createDefaultCodingTeamSource({
10815
+ sourceScope: descriptor.scope,
10816
+ sourcePrecedence: descriptor.precedence,
10817
+ configPath
10818
+ })] : [],
10727
10819
  issues: [createConfigIssue(configPath, `Failed to parse crewbee.json: ${message}`)]
10728
10820
  };
10729
10821
  }
10730
10822
  if (parsed.teams !== void 0 && !Array.isArray(parsed.teams)) {
10731
10823
  return {
10732
- sources: [createDefaultCodingTeamSource()],
10824
+ sources: descriptor.addDefaultCodingTeam ? [createDefaultCodingTeamSource({
10825
+ sourceScope: descriptor.scope,
10826
+ sourcePrecedence: descriptor.precedence,
10827
+ configPath
10828
+ })] : [],
10733
10829
  issues: [createConfigIssue(configPath, "crewbee.json teams must be an array when provided.")]
10734
10830
  };
10735
10831
  }
10736
10832
  const resolved = (parsed.teams ?? []).map((value, index) => normalizeConfiguredTeamEntry({
10737
10833
  value,
10738
10834
  index,
10739
- configRoot,
10740
- configPath
10835
+ configRoot: descriptor.configRoot,
10836
+ configPath,
10837
+ sourceScope: descriptor.scope,
10838
+ sourcePrecedence: descriptor.precedence
10741
10839
  }));
10742
10840
  const configuredSources = resolved.flatMap((entry) => entry.source ? [entry.source] : []);
10743
10841
  const issues = resolved.flatMap((entry) => entry.issues);
10744
10842
  const withDefaultCodingTeam = configuredSources.some(
10745
10843
  (source) => source.kind === "embedded" && source.teamId === BUILTIN_CODING_TEAM_ID
10746
- ) ? configuredSources : [createDefaultCodingTeamSource(), ...configuredSources];
10844
+ ) || !descriptor.addDefaultCodingTeam ? configuredSources : [createDefaultCodingTeamSource({
10845
+ sourceScope: descriptor.scope,
10846
+ sourcePrecedence: descriptor.precedence,
10847
+ configPath
10848
+ }), ...configuredSources];
10747
10849
  const deduped = dedupeConfiguredTeamSources({
10748
10850
  sources: withDefaultCodingTeam,
10749
10851
  configPath
@@ -10753,6 +10855,16 @@ function listConfiguredTeamSources(configRoot = resolveOpenCodeConfigRoot()) {
10753
10855
  issues: [...issues, ...deduped.issues]
10754
10856
  };
10755
10857
  }
10858
+ function listConfiguredTeamSources(input) {
10859
+ const globalConfigRoot = typeof input === "string" ? input : input?.globalConfigRoot ?? resolveOpenCodeConfigRoot();
10860
+ const projectWorktree = typeof input === "string" ? void 0 : input?.projectWorktree;
10861
+ const descriptors = createConfiguredTeamSourceDescriptors({ globalConfigRoot, projectWorktree });
10862
+ const resolved = descriptors.map((descriptor) => listConfiguredTeamSourcesFromDescriptor(descriptor));
10863
+ return {
10864
+ sources: resolved.flatMap((entry) => entry.sources),
10865
+ issues: resolved.flatMap((entry) => entry.issues)
10866
+ };
10867
+ }
10756
10868
  function loadTeamDefinitionFromDirectory(teamDir, workspaceRoot = process.cwd()) {
10757
10869
  const manifest = mapTeamManifest(path3.join(teamDir, TEAM_MANIFEST_FILE));
10758
10870
  const policyPath = path3.join(teamDir, TEAM_POLICY_FILE);
@@ -11016,7 +11128,7 @@ function createSkippedTeamIssue(teamDir, message) {
11016
11128
  };
11017
11129
  }
11018
11130
  function loadDefaultTeamLibrary(baseDir = process.cwd()) {
11019
- const configured = listConfiguredTeamSources();
11131
+ const configured = listConfiguredTeamSources({ projectWorktree: baseDir });
11020
11132
  const pendingTeams = [];
11021
11133
  for (const source of configured.sources) {
11022
11134
  if (!source.enabled) {
@@ -11031,7 +11143,10 @@ function loadDefaultTeamLibrary(baseDir = process.cwd()) {
11031
11143
  pendingTeams.push({
11032
11144
  loader: () => ({ team: embeddedTeam.team, issues: [] }),
11033
11145
  priority: source.priority,
11034
- order: source.order
11146
+ order: source.order,
11147
+ sourcePrecedence: source.sourcePrecedence,
11148
+ sourceScope: source.sourceScope,
11149
+ configPath: source.configPath
11035
11150
  });
11036
11151
  continue;
11037
11152
  }
@@ -11050,10 +11165,17 @@ function loadDefaultTeamLibrary(baseDir = process.cwd()) {
11050
11165
  }
11051
11166
  },
11052
11167
  priority: source.priority,
11053
- order: source.order
11168
+ order: source.order,
11169
+ sourcePrecedence: source.sourcePrecedence,
11170
+ sourceScope: source.sourceScope,
11171
+ configPath: source.configPath
11054
11172
  });
11055
11173
  }
11056
11174
  pendingTeams.sort((left, right) => {
11175
+ const sourceOrder = left.sourcePrecedence - right.sourcePrecedence;
11176
+ if (sourceOrder !== 0) {
11177
+ return sourceOrder;
11178
+ }
11057
11179
  const priorityOrder = left.priority - right.priority;
11058
11180
  if (priorityOrder !== 0) {
11059
11181
  return priorityOrder;
@@ -11061,11 +11183,22 @@ function loadDefaultTeamLibrary(baseDir = process.cwd()) {
11061
11183
  return left.order - right.order;
11062
11184
  });
11063
11185
  const usedCanonicalIds = /* @__PURE__ */ new Set();
11186
+ const usedTeamIds = /* @__PURE__ */ new Map();
11064
11187
  const orderedTeams = [];
11065
11188
  for (const entry of pendingTeams) {
11066
11189
  const loaded = entry.loader();
11067
11190
  configured.issues.push(...loaded.issues);
11068
11191
  if (loaded.team) {
11192
+ const existing = usedTeamIds.get(loaded.team.manifest.id);
11193
+ if (existing) {
11194
+ configured.issues.push({
11195
+ level: "warning",
11196
+ filePath: entry.configPath,
11197
+ 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.`
11198
+ });
11199
+ continue;
11200
+ }
11201
+ const usedCanonicalIdsBeforeNormalize = new Set(usedCanonicalIds);
11069
11202
  const normalized = normalizeTeamAgentIds({
11070
11203
  team: loaded.team,
11071
11204
  usedCanonicalIds
@@ -11075,6 +11208,10 @@ function loadDefaultTeamLibrary(baseDir = process.cwd()) {
11075
11208
  const validationIssues = validateTeamDefinition(normalized.team);
11076
11209
  const errors = validationIssues.filter((issue2) => issue2.level === "error");
11077
11210
  if (errors.length > 0) {
11211
+ usedCanonicalIds.clear();
11212
+ for (const usedId of usedCanonicalIdsBeforeNormalize) {
11213
+ usedCanonicalIds.add(usedId);
11214
+ }
11078
11215
  configured.issues.push(...errors.map((issue2) => ({
11079
11216
  level: "warning",
11080
11217
  filePath: issue2.filePath,
@@ -11084,6 +11221,10 @@ function loadDefaultTeamLibrary(baseDir = process.cwd()) {
11084
11221
  }
11085
11222
  configured.issues.push(...validationIssues.filter((issue2) => issue2.level === "warning"));
11086
11223
  orderedTeams.push(normalized.team);
11224
+ usedTeamIds.set(normalized.team.manifest.id, {
11225
+ sourceScope: entry.sourceScope,
11226
+ configPath: entry.configPath
11227
+ });
11087
11228
  }
11088
11229
  }
11089
11230
  }
@@ -89,8 +89,8 @@ function createCodingExecutorAgent() {
89
89
  { permission: "glob", pattern: "*", action: "allow" },
90
90
  { permission: "grep", pattern: "*", action: "allow" },
91
91
  { permission: "skill", pattern: "*", action: "allow" },
92
- { permission: "edit", pattern: "*", action: "ask" },
93
- { permission: "write", pattern: "*", action: "ask" },
92
+ { permission: "edit", pattern: "*", action: "allow" },
93
+ { permission: "write", pattern: "*", action: "allow" },
94
94
  { permission: "bash", pattern: "*", action: "allow" },
95
95
  { permission: "todowrite", pattern: "*", action: "allow" },
96
96
  { permission: "lsp_diagnostics", pattern: "*", action: "allow" },
@@ -1 +1 @@
1
- {"version":3,"file":"coding-executor.js","sourceRoot":"","sources":["../../../../../../src/agent-teams/embedded/coding-team/agents/coding-executor.ts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AuD;SACxD;QACD,QAAQ,EAAE;YACR,OAAO,EAAE;gBACP,uBAAuB;gBACvB,8BAA8B;gBAC9B,sCAAsC;aACvC;YACD,MAAM,EAAE,CAAC,eAAe,EAAE,sBAAsB,EAAE,oBAAoB,CAAC;SACxE;QACD,UAAU,EAAE;YACV,QAAQ,EAAE,iBAAiB;YAC3B,oBAAoB,EAAE,4CAA4C;YAClE,iBAAiB,EAAE,CAAC;SACrB;KACF,CACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"coding-executor.js","sourceRoot":"","sources":["../../../../../../src/agent-teams/embedded/coding-team/agents/coding-executor.ts"],"names":[],"mappings":";;AAIA,8DAwLC;AA1LD,oDAAwD;AAExD,SAAgB,yBAAyB;IACvC,OAAO,IAAA,2BAAW,EAChB;QACE,EAAE,EAAE,iBAAiB;QACrB,IAAI,EAAE,OAAO;QACb,SAAS,EAAE,UAAU;KACtB,EACD;QACE,WAAW,EAAE;YACX,WAAW,EAAE,oBAAoB;YACjC,cAAc,EAAE,iCAAiC;YACjD,WAAW,EAAE,wCAAwC;YACrD,kBAAkB,EAAE,wBAAwB;YAC5C,gBAAgB,EAAE,wCAAwC;YAC1D,aAAa,EAAE,oCAAoC;YACnD,kBAAkB,EAAE;gBAClB,QAAQ;gBACR,OAAO;gBACP,UAAU;gBACV,WAAW;gBACX,QAAQ;gBACR,YAAY;gBACZ,OAAO;aACR;SACF;QACD,kBAAkB,EAAE;YAClB,WAAW,EAAE,4EAA4E;YACzF,OAAO,EAAE;gBACP,0BAA0B;gBAC1B,2BAA2B;gBAC3B,6BAA6B;gBAC7B,wBAAwB;aACzB;YACD,SAAS,EAAE;gBACT,yBAAyB;gBACzB,wBAAwB;gBACxB,kBAAkB;aACnB;YACD,SAAS,EAAE,+EAA+E;YAC1F,iBAAiB,EAAE;gBACjB,eAAe;gBACf,+BAA+B;gBAC/B,eAAe;gBACf,yBAAyB;gBACzB,cAAc;gBACd,iBAAiB;gBACjB,eAAe;aAChB;YACD,QA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,UAAU,EAAE;YACV,eAAe;YACf,mCAAmC;YACnC,WAAW;YACX,YAAY;YACZ,aAAa;YACb,sBAAsB;YACtB,4BAA4B;YAC5B,6BAA6B;YAC7B,yBAAyB;YACzB,uDAAuD;YACvD,uFAAuF;YACvF,qFAAqF;YACrF,YAAY;YACZ,SAAS;YACT,OAAO;YACP,aAAa;YACb,6BAA6B;SAC9B;QACD,YAAY,EAAE;YACZ,cAAc;YACd,cAAc;YACd,yBAAyB;YACzB,aAAa;YACb,oBAAoB;YACpB,sBAAsB;YACtB,4BAA4B;YAC5B,iDAAiD;YACjD,mBAAmB;YACnB,uDAAuD;SACxD;QACD,QAAQ,EAAE;YACR,OAAO,EAAE;gBACP,uBAAuB;gBACvB,8BAA8B;gBAC9B,sCAAsC;aACvC;YACD,MAAM,EAAE,CAAC,eAAe,EAAE,sBAAsB,EAAE,oBAAoB,CAAC;SACxE;QACD,UAAU,EAAE;YACV,QAAQ,EAAE,iBAAiB;YAC3B,oBAAoB,EAAE,4CAA4C;YAClE,iBAAiB,EAAE,CAAC;SACrB;KACF,CACF,CAAC;AACJ,CAAC"}
@@ -112,14 +112,14 @@ function createEmbeddedCodingTeam() {
112
112
  ],
113
113
  },
114
114
  agentRuntime: {
115
- "coding-leader": { provider: "openai", model: "gpt-5.4", temperature: 0.2, topP: 0.85, variant: "long-context" },
116
- "coordination-leader": { provider: "openai", model: "gpt-5.4", temperature: 0.15, topP: 0.75 },
117
- "coding-executor": { provider: "openai", model: "gpt-5.4", temperature: 0.25, topP: 0.9 },
118
- "codebase-explorer": { provider: "openai", model: "gpt-5.4", temperature: 0.1, topP: 0.8 },
119
- "web-researcher": { provider: "openai", model: "gpt-5.4", temperature: 0.2, topP: 0.85 },
120
- reviewer: { provider: "openai", model: "gpt-5.4", temperature: 0.15, topP: 0.75 },
121
- "principal-advisor": { provider: "openai", model: "gpt-5.4", temperature: 0.15, topP: 0.75 },
122
- "multimodal-looker": { provider: "openai", model: "gpt-5.4", temperature: 0.2, topP: 0.85 },
115
+ "coding-leader": { provider: "openai", model: "gpt-5.5", temperature: 0.2, topP: 0.85, variant: "long-context" },
116
+ "coordination-leader": { provider: "openai", model: "gpt-5.5", temperature: 0.15, topP: 0.75 },
117
+ "coding-executor": { provider: "openai", model: "gpt-5.5", temperature: 0.25, topP: 0.9 },
118
+ "codebase-explorer": { provider: "openai", model: "gpt-5.5", temperature: 0.1, topP: 0.8 },
119
+ "web-researcher": { provider: "openai", model: "gpt-5.5", temperature: 0.2, topP: 0.85 },
120
+ reviewer: { provider: "openai", model: "gpt-5.5", temperature: 0.15, topP: 0.75 },
121
+ "principal-advisor": { provider: "openai", model: "gpt-5.5", temperature: 0.15, topP: 0.75 },
122
+ "multimodal-looker": { provider: "openai", model: "gpt-5.5", temperature: 0.2, topP: 0.85 },
123
123
  },
124
124
  tags: ["代码", "leader驱动", "上下文连续性", "主执行者中心", "评审中心", "证据驱动"],
125
125
  };
@@ -6,6 +6,9 @@ export interface ConfiguredEmbeddedTeamSource {
6
6
  enabled: boolean;
7
7
  priority: number;
8
8
  order: number;
9
+ sourceScope: TeamConfigSourceScope;
10
+ sourcePrecedence: number;
11
+ configPath: string;
9
12
  }
10
13
  export interface ConfiguredFilesystemTeamSource {
11
14
  kind: "filesystem";
@@ -13,8 +16,12 @@ export interface ConfiguredFilesystemTeamSource {
13
16
  enabled: boolean;
14
17
  priority: number;
15
18
  order: number;
19
+ sourceScope: TeamConfigSourceScope;
20
+ sourcePrecedence: number;
21
+ configPath: string;
16
22
  }
17
23
  export type ConfiguredTeamSource = ConfiguredEmbeddedTeamSource | ConfiguredFilesystemTeamSource;
24
+ export type TeamConfigSourceScope = "project" | "global";
18
25
  export interface CrewBeeConfigFile {
19
26
  teams: Array<Record<string, unknown>>;
20
27
  }
@@ -32,7 +39,10 @@ export declare function ensureCrewBeeConfigFile(input: {
32
39
  mode: "install" | "startup";
33
40
  }): CrewBeeConfigEnsureResult;
34
41
  export declare function resolveCrewBeeConfigPath(configRoot?: string): string;
35
- export declare function listConfiguredTeamSources(configRoot?: string): {
42
+ export declare function listConfiguredTeamSources(input?: string | {
43
+ globalConfigRoot?: string;
44
+ projectWorktree?: string;
45
+ }): {
36
46
  sources: ConfiguredTeamSource[];
37
47
  issues: TeamValidationIssue[];
38
48
  };
@@ -1 +1 @@
1
- {"version":3,"file":"filesystem.d.ts","sourceRoot":"","sources":["../../../src/agent-teams/filesystem.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAyBnD,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,oBAAoB,GAAG,4BAA4B,GAAG,8BAA8B,CAAC;AAEjG,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACvC;AAED,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,2BAA2B,GAAG,WAAW,CAAC;AAE3H,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,yBAAyB,CAAC;CACnC;AA4CD,wBAAgB,0BAA0B,IAAI,iBAAiB,CAI9D;AA4ED,wBAA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