@kanyun-ai-infra/band-cli 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/bundled/examples/aitutor-tool/band/views/release/package.json +1 -1
  2. package/bundled/examples/aitutor-tool/band/views/tool-preview/package.json +1 -1
  3. package/bundled/examples/analysis/band/views/intake/package.json +1 -1
  4. package/bundled/examples/compliance/band/views/compliance/package.json +1 -1
  5. package/bundled/examples/content-review/band/views/checklist/package.json +1 -1
  6. package/bundled/examples/rush-site/band/views/rush-db/package.json +1 -1
  7. package/bundled/examples/rush-site/band/views/rush-deploy/package.json +1 -1
  8. package/bundled/examples/video/band/views/timeline/package.json +1 -1
  9. package/bundled/kernel/fixture.js +1 -1
  10. package/bundled/kernel/index.js +1 -1
  11. package/bundled/official/activity/package.json +4 -4
  12. package/bundled/official/approval/package.json +4 -4
  13. package/bundled/official/artifacts/package.json +4 -4
  14. package/bundled/official/chat/package.json +4 -4
  15. package/bundled/official/chunks/{chunk-SB74RUTN.js → chunk-DIL5YSVK.js} +1 -1
  16. package/bundled/official/comment/dist/index.js +1 -1
  17. package/bundled/official/comment/package.json +4 -4
  18. package/bundled/official/header/package.json +4 -4
  19. package/bundled/official/home/package.json +4 -4
  20. package/bundled/official/layouts/package.json +4 -4
  21. package/bundled/official/library/dist/index.js +1 -1
  22. package/bundled/official/library/package.json +4 -4
  23. package/bundled/official/members/package.json +4 -4
  24. package/bundled/official/memory/package.json +4 -4
  25. package/bundled/official/native/package.json +2 -2
  26. package/bundled/official/params-form/package.json +4 -4
  27. package/bundled/official/plugins/package.json +4 -4
  28. package/bundled/official/project/dist/index.js +1 -1
  29. package/bundled/official/project/package.json +4 -4
  30. package/bundled/official/queue/package.json +4 -4
  31. package/bundled/official/settings/package.json +4 -4
  32. package/bundled/official/shell/dist/index.js +1 -1
  33. package/bundled/official/shell/package.json +4 -4
  34. package/bundled/official/stages/package.json +4 -4
  35. package/bundled/official/threads/package.json +4 -4
  36. package/bundled/official/turn-bar/package.json +4 -4
  37. package/bundled/official/turn-trace/package.json +4 -4
  38. package/bundled/official/version-switch/dist/index.js +1 -1
  39. package/bundled/official/version-switch/package.json +4 -4
  40. package/bundled/official/viewer-entity/package.json +2 -2
  41. package/bundled/official/viewer-external/package.json +2 -2
  42. package/bundled/official/viewer-image/package.json +2 -2
  43. package/bundled/official/viewer-media/package.json +2 -2
  44. package/bundled/official/viewer-storyboard/package.json +2 -2
  45. package/bundled/official/viewer-text/package.json +4 -4
  46. package/bundled/official/viewer-tool/package.json +2 -2
  47. package/bundled/official/viewer-web/package.json +2 -2
  48. package/bundled/official/viewer-web-app/package.json +2 -2
  49. package/bundled/official/workshops/dist/index.js +2 -2
  50. package/bundled/official/workshops/package.json +4 -4
  51. package/bundled/official/workshops/plugin.yaml +2 -2
  52. package/bundled/skills/band-plugin/references/code.md +2 -2
  53. package/bundled/skills/band-plugin/references/manifest.md +2 -2
  54. package/bundled/skills/band-plugin/references/rules.md +1 -0
  55. package/bundled/skills/band-plugin/references/testing-publish.md +1 -1
  56. package/bundled/skills/band-plugin/templates/panel/package.json +1 -1
  57. package/dev-host/app.tsx +9 -5
  58. package/dist/bin.js +3 -3
  59. package/dist/build-plugin.d.ts +1 -1
  60. package/dist/build-plugin.js +1 -1
  61. package/dist/{chunk-TQHHHXXU.js → chunk-LGYGWMSY.js} +18 -16
  62. package/dist/{chunk-VTAJX7NN.js → chunk-Q2XJXNVH.js} +16 -9
  63. package/dist/{chunk-JWZU3NOD.js → chunk-XPLYTHNX.js} +1 -1
  64. package/dist/{dev-server-SB5FMSVP.js → dev-server-Q7NTJ3QD.js} +19 -4
  65. package/dist/fixture.d.ts +11 -0
  66. package/dist/index.d.ts +2 -2
  67. package/dist/index.js +3 -3
  68. package/dist/vite.d.ts +1 -1
  69. package/dist/vite.js +2 -2
  70. package/dist/{workshop-repo-Uq6blxyt.d.ts → workshop-repo-DqoVdcGu.d.ts} +9 -9
  71. package/package.json +9 -7
  72. package/src/dev-managers.ts +16 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanyun-ai-infra/band-cli",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "band 命令行:新建、本地调试、校验与发布 Band 工坊和插件",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -15,7 +15,8 @@
15
15
  },
16
16
  "./build": {
17
17
  "types": "./dist/build-plugin.d.ts",
18
- "import": "./dist/build-plugin.js"
18
+ "import": "./dist/build-plugin.js",
19
+ "default": "./dist/build-plugin.js"
19
20
  },
20
21
  "./catalog": {
21
22
  "types": "./dist/plugin-entry.d.ts",
@@ -33,6 +34,7 @@
33
34
  "files": [
34
35
  "dist",
35
36
  "dev-host",
37
+ "src/dev-managers.ts",
36
38
  "src/inspector-plugins.ts",
37
39
  "src/load-plugins.ts",
38
40
  "bundled"
@@ -41,12 +43,12 @@
41
43
  "node": ">=22.19"
42
44
  },
43
45
  "dependencies": {
44
- "@kanyun-ai-infra/band-contracts": "^0.1.2",
45
- "@kanyun-ai-infra/band-plugin-react": "^0.1.2",
46
- "@kanyun-ai-infra/band-plugin-sdk": "^1.222.0",
46
+ "@kanyun-ai-infra/band-contracts": "^0.1.3",
47
+ "@kanyun-ai-infra/band-plugin-react": "^0.2.0",
48
+ "@kanyun-ai-infra/band-plugin-sdk": "^2.0.0",
47
49
  "es-module-lexer": "^2.3.2",
48
- "react": "^18.3.1",
49
- "react-dom": "^18.3.1",
50
+ "react": "^19.3.1",
51
+ "react-dom": "^19.3.1",
50
52
  "semver": "^7.8.5",
51
53
  "vite": "^6.0.7",
52
54
  "yaml": "^2.6.1",
@@ -0,0 +1,16 @@
1
+ /**
2
+ * band dev 的 dev-host 里谁算项目管理员(夹具 `FixtureData.managers`)。
3
+ *
4
+ * 与线上同构:只有 owner / maintainer 管项目。不带 `?role=`(或角色不在工坊里)是默认开发身份,按管理员看;
5
+ * 选了工坊里的业务角色(`?role=teacher` 这类)就是非管理员,预览得到非管理员视图。业务角色不是管理角色。
6
+ * 不从起始身份推创建人:dev-host 的身份恒为 `dev`,推出来会让任何角色都变成管理员。
7
+ */
8
+ export function devManagers(
9
+ roleParam: string | null,
10
+ workshopRoles: readonly string[],
11
+ memberId: string,
12
+ ): string[] {
13
+ const picked = roleParam !== null && workshopRoles.includes(roleParam);
14
+ const manages = !picked || roleParam === "owner" || roleParam === "maintainer";
15
+ return manages ? [memberId] : [];
16
+ }