chatccc 0.2.226 → 0.2.227

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 (64) hide show
  1. package/.agents/skills/create-chatccc-feishu-app/SKILL.md +85 -85
  2. package/.claude/skills/create-chatccc-feishu-app/SKILL.md +85 -85
  3. package/.cursor/skills/create-chatccc-feishu-app/SKILL.md +85 -85
  4. package/README.md +90 -90
  5. package/package.json +1 -1
  6. package/src/__tests__/agent-activity.test.ts +76 -76
  7. package/src/__tests__/builtin-chat-session.test.ts +350 -350
  8. package/src/__tests__/builtin-config.test.ts +26 -26
  9. package/src/__tests__/builtin-context.test.ts +163 -163
  10. package/src/__tests__/builtin-file-tools.test.ts +275 -275
  11. package/src/__tests__/builtin-permissions.test.ts +211 -211
  12. package/src/__tests__/builtin-session-select.test.ts +116 -116
  13. package/src/__tests__/builtin-skills.test.ts +185 -74
  14. package/src/__tests__/card-action-routing.test.ts +18 -18
  15. package/src/__tests__/ccc-adapter.test.ts +136 -136
  16. package/src/__tests__/claude-adapter.test.ts +614 -614
  17. package/src/__tests__/codex-adapter.test.ts +58 -58
  18. package/src/__tests__/codex-raw-stream-log.test.ts +170 -170
  19. package/src/__tests__/cursor-adapter.test.ts +268 -268
  20. package/src/__tests__/feishu-avatar.test.ts +164 -164
  21. package/src/__tests__/feishu-message-ingress.test.ts +138 -138
  22. package/src/__tests__/package-files.test.ts +24 -24
  23. package/src/__tests__/progress-reducer.test.ts +110 -110
  24. package/src/__tests__/response-stall.test.ts +49 -49
  25. package/src/__tests__/sim-platform.test.ts +16 -16
  26. package/src/__tests__/startup-lifecycle.test.ts +231 -231
  27. package/src/__tests__/stop-session.test.ts +34 -34
  28. package/src/__tests__/terminal-renderer.test.ts +247 -247
  29. package/src/__tests__/update-command-guard.test.ts +144 -144
  30. package/src/__tests__/web-ui.test.ts +326 -326
  31. package/src/adapters/adapter-interface.ts +18 -18
  32. package/src/adapters/ccc-adapter.ts +131 -131
  33. package/src/adapters/claude-adapter.ts +620 -620
  34. package/src/adapters/codex-adapter.ts +426 -426
  35. package/src/adapters/cursor-adapter.ts +681 -681
  36. package/src/agent-activity.ts +170 -170
  37. package/src/agent-delegate-task.ts +91 -91
  38. package/src/builtin/cli.ts +61 -2
  39. package/src/builtin/config.ts +84 -84
  40. package/src/builtin/context.ts +323 -323
  41. package/src/builtin/file-log.ts +38 -38
  42. package/src/builtin/index.ts +44 -24
  43. package/src/builtin/proc-tree-kill.ts +61 -61
  44. package/src/builtin/progress/cards-helpers.ts +76 -76
  45. package/src/builtin/progress/reducer.ts +108 -108
  46. package/src/builtin/progress/terminal-renderer.ts +294 -294
  47. package/src/builtin/progress/view.ts +77 -77
  48. package/src/builtin/raw-stream-log.ts +124 -124
  49. package/src/builtin/session-select.ts +48 -48
  50. package/src/builtin/skills.ts +126 -44
  51. package/src/card-action-routing.ts +14 -14
  52. package/src/feishu-api.ts +193 -193
  53. package/src/feishu-message-ingress.ts +195 -195
  54. package/src/index.ts +306 -306
  55. package/src/orchestrator.ts +2388 -2388
  56. package/src/platform-adapter.ts +6 -6
  57. package/src/progress/reducer.ts +108 -108
  58. package/src/progress/terminal-renderer.ts +294 -294
  59. package/src/progress/view.ts +77 -77
  60. package/src/response-stall.ts +28 -28
  61. package/src/session-chat-binding.ts +82 -82
  62. package/src/startup-lifecycle.ts +250 -250
  63. package/src/stream-state.ts +18 -18
  64. package/src/update-command-guard.ts +165 -165
@@ -1,85 +1,85 @@
1
- ---
2
- name: create-chatccc-feishu-app
3
- description: Create, clone, or configure a Feishu enterprise self-built bot application for ChatCCC. Use when asked to create a ChatCCC Feishu app, imitate an existing lowercase `chatccc` app, prepare a bot for another computer, or configure its bot capability, `im:`/`cardkit:` permissions, events, credentials, version, and internal release from this repository's README.
4
- ---
5
-
6
- # Create a ChatCCC Feishu App
7
-
8
- Use the logged-in Feishu developer console to create and completely configure a ChatCCC bot app. Treat this repository's README as the minimum requirement and the existing app named exactly lowercase `chatccc` as the configuration template.
9
-
10
- ## 1. Establish the target and authorization
11
-
12
- - Read the `README.md` section `#### 飞书(推荐)` before changing the console.
13
- - Determine the requested app name, target computer, description, icon, availability, and whether the user wants configuration only or a real release. Derive a concise description when one is not supplied; for example, `用飞书聊天控制<目标电脑>上的 Claude Code / Cursor / Codex。`.
14
- - Use the browser surface the user requested. If the user specifies Chrome DevTools/CDP, connect directly to `chromeDevtools.port` or the README default `15166`; do not substitute extension-based Chrome control.
15
- - Obtain action-time confirmation before creating the app, granting permissions, saving event/callback subscriptions, or publishing. One explicit instruction such as `完整配置并真正发布` may authorize the listed actions as a batch.
16
-
17
- ## 2. Inventory the lowercase template
18
-
19
- 1. Open `https://open.feishu.cn/app?from=devbotmenu` in the authenticated browser.
20
- 2. Open the app named exactly lowercase `chatccc` in a separate tab.
21
- 3. Record its non-secret configuration:
22
- - app description and icon;
23
- - application capabilities, especially `机器人`;
24
- - every granted permission and its identity type;
25
- - event and callback subscription modes;
26
- - every event and callback identifier;
27
- - version availability, external sharing choices, and release state.
28
- 4. Never reveal, log, export to chat, or persist the template App Secret.
29
-
30
- Prefer current console data over a stale hard-coded list. At the time this workflow was verified, lowercase `chatccc` had 62 application-identity permissions, one user-identity permission, 12 application events, and one callback. Use those counts as a sanity check, not as a replacement for inspecting the template.
31
-
32
- ## 3. Create the target app
33
-
34
- 1. Choose `创建企业自建应用` and fill the requested name and description.
35
- 2. Reuse the lowercase `chatccc` icon only when imitation was requested, and verify its crop preview.
36
- 3. Click the final `创建` action only after confirmation.
37
- 4. Click once and wait for SPA navigation. Verify the exact app name, App ID, URL, and status before retrying; the console can temporarily show stale text after a successful mutation.
38
-
39
- ## 4. Clone the complete ChatCCC configuration
40
-
41
- Perform the configuration in this order:
42
-
43
- 1. Add the `机器人` application capability and verify that the page offers `删除能力`, which means the capability is enabled.
44
- 2. Clone permissions with `权限管理` > `批量处理` > `批量导入/导出权限`:
45
- - export from lowercase `chatccc`;
46
- - import into the target app;
47
- - confirm all additions and verify both application-identity and user-identity totals;
48
- - do not save the export JSON in the repository or chat.
49
- 3. Under `事件与回调` > `事件配置`, set the subscription mode to `使用长连接接收事件`, then add every event present in the template. The verified baseline is:
50
- - `im.chat.disbanded_v1`
51
- - `im.chat.member.bot.added_v1`
52
- - `im.chat.member.bot.deleted_v1`
53
- - `im.chat.member.user.added_v1`
54
- - `im.chat.member.user.deleted_v1`
55
- - `im.chat.member.user.withdrawn_v1`
56
- - `im.message.bot_muted_v1`
57
- - `im.message.message_read_v1`
58
- - `im.message.reaction.created_v1`
59
- - `im.message.reaction.deleted_v1`
60
- - `im.message.recalled_v1`
61
- - `im.message.receive_v1`
62
- 4. Under `回调配置`, independently set `使用长连接接收回调` and add `card.action.trigger`. Configuring the event mode does not configure the callback mode.
63
- 5. Verify that every listed event shows a sufficient permission as `已开通`.
64
-
65
- The README minimum is the bot capability, relevant `im:` and `cardkit:` permissions, `im.message.receive_v1`, and `card.action.trigger`; a clone request requires the complete current template configuration, not only that minimum.
66
-
67
- ## 5. Create and publish a version
68
-
69
- 1. Open `版本管理与发布` and create a version such as `1.0.0`.
70
- 2. Keep mobile and desktop default abilities set to `机器人` and write a meaningful update note.
71
- 3. Match the requested or template availability. For a personal computer, default to the owner-only internal range and leave external group/private-chat sharing disabled unless explicitly requested.
72
- 4. Save the version, then complete the separate `确认发布` action. A successful version creation alone is not a release.
73
- 5. Refresh the version list and require all of the following evidence before reporting success:
74
- - application status `已启用`;
75
- - banner `当前修改均已发布`;
76
- - version status `已发布` with a publication time.
77
- 6. If administrator review is required, submit everything authorized and report the exact remaining approval state.
78
-
79
- ## 6. Verify and hand off safely
80
-
81
- - Re-open the bot, permission, event/callback, and version pages after publication. Verify the bot is enabled, permission identity counts match, both subscription modes are long connection, event/callback identifiers match, and the version is published.
82
- - Treat network responses and a refreshed page as stronger evidence than an immediately stale SPA view. Never repeat a create, add, or publish action only because the first page read is stale.
83
- - Report the app name, App ID, capability, permission counts, event/callback counts, version, release state, and any remaining action.
84
- - Never print the App Secret. If the user explicitly asks to configure ChatCCC, transfer the App ID and App Secret directly into the local private configuration without echoing the secret in commands, logs, screenshots, files tracked by Git, or chat.
85
- - Do not modify local ChatCCC configuration or transmit credentials elsewhere unless explicitly authorized.
1
+ ---
2
+ name: create-chatccc-feishu-app
3
+ description: Create, clone, or configure a Feishu enterprise self-built bot application for ChatCCC. Use when asked to create a ChatCCC Feishu app, imitate an existing lowercase `chatccc` app, prepare a bot for another computer, or configure its bot capability, `im:`/`cardkit:` permissions, events, credentials, version, and internal release from this repository's README.
4
+ ---
5
+
6
+ # Create a ChatCCC Feishu App
7
+
8
+ Use the logged-in Feishu developer console to create and completely configure a ChatCCC bot app. Treat this repository's README as the minimum requirement and the existing app named exactly lowercase `chatccc` as the configuration template.
9
+
10
+ ## 1. Establish the target and authorization
11
+
12
+ - Read the `README.md` section `#### 飞书(推荐)` before changing the console.
13
+ - Determine the requested app name, target computer, description, icon, availability, and whether the user wants configuration only or a real release. Derive a concise description when one is not supplied; for example, `用飞书聊天控制<目标电脑>上的 Claude Code / Cursor / Codex。`.
14
+ - Use the browser surface the user requested. If the user specifies Chrome DevTools/CDP, connect directly to `chromeDevtools.port` or the README default `15166`; do not substitute extension-based Chrome control.
15
+ - Obtain action-time confirmation before creating the app, granting permissions, saving event/callback subscriptions, or publishing. One explicit instruction such as `完整配置并真正发布` may authorize the listed actions as a batch.
16
+
17
+ ## 2. Inventory the lowercase template
18
+
19
+ 1. Open `https://open.feishu.cn/app?from=devbotmenu` in the authenticated browser.
20
+ 2. Open the app named exactly lowercase `chatccc` in a separate tab.
21
+ 3. Record its non-secret configuration:
22
+ - app description and icon;
23
+ - application capabilities, especially `机器人`;
24
+ - every granted permission and its identity type;
25
+ - event and callback subscription modes;
26
+ - every event and callback identifier;
27
+ - version availability, external sharing choices, and release state.
28
+ 4. Never reveal, log, export to chat, or persist the template App Secret.
29
+
30
+ Prefer current console data over a stale hard-coded list. At the time this workflow was verified, lowercase `chatccc` had 62 application-identity permissions, one user-identity permission, 12 application events, and one callback. Use those counts as a sanity check, not as a replacement for inspecting the template.
31
+
32
+ ## 3. Create the target app
33
+
34
+ 1. Choose `创建企业自建应用` and fill the requested name and description.
35
+ 2. Reuse the lowercase `chatccc` icon only when imitation was requested, and verify its crop preview.
36
+ 3. Click the final `创建` action only after confirmation.
37
+ 4. Click once and wait for SPA navigation. Verify the exact app name, App ID, URL, and status before retrying; the console can temporarily show stale text after a successful mutation.
38
+
39
+ ## 4. Clone the complete ChatCCC configuration
40
+
41
+ Perform the configuration in this order:
42
+
43
+ 1. Add the `机器人` application capability and verify that the page offers `删除能力`, which means the capability is enabled.
44
+ 2. Clone permissions with `权限管理` > `批量处理` > `批量导入/导出权限`:
45
+ - export from lowercase `chatccc`;
46
+ - import into the target app;
47
+ - confirm all additions and verify both application-identity and user-identity totals;
48
+ - do not save the export JSON in the repository or chat.
49
+ 3. Under `事件与回调` > `事件配置`, set the subscription mode to `使用长连接接收事件`, then add every event present in the template. The verified baseline is:
50
+ - `im.chat.disbanded_v1`
51
+ - `im.chat.member.bot.added_v1`
52
+ - `im.chat.member.bot.deleted_v1`
53
+ - `im.chat.member.user.added_v1`
54
+ - `im.chat.member.user.deleted_v1`
55
+ - `im.chat.member.user.withdrawn_v1`
56
+ - `im.message.bot_muted_v1`
57
+ - `im.message.message_read_v1`
58
+ - `im.message.reaction.created_v1`
59
+ - `im.message.reaction.deleted_v1`
60
+ - `im.message.recalled_v1`
61
+ - `im.message.receive_v1`
62
+ 4. Under `回调配置`, independently set `使用长连接接收回调` and add `card.action.trigger`. Configuring the event mode does not configure the callback mode.
63
+ 5. Verify that every listed event shows a sufficient permission as `已开通`.
64
+
65
+ The README minimum is the bot capability, relevant `im:` and `cardkit:` permissions, `im.message.receive_v1`, and `card.action.trigger`; a clone request requires the complete current template configuration, not only that minimum.
66
+
67
+ ## 5. Create and publish a version
68
+
69
+ 1. Open `版本管理与发布` and create a version such as `1.0.0`.
70
+ 2. Keep mobile and desktop default abilities set to `机器人` and write a meaningful update note.
71
+ 3. Match the requested or template availability. For a personal computer, default to the owner-only internal range and leave external group/private-chat sharing disabled unless explicitly requested.
72
+ 4. Save the version, then complete the separate `确认发布` action. A successful version creation alone is not a release.
73
+ 5. Refresh the version list and require all of the following evidence before reporting success:
74
+ - application status `已启用`;
75
+ - banner `当前修改均已发布`;
76
+ - version status `已发布` with a publication time.
77
+ 6. If administrator review is required, submit everything authorized and report the exact remaining approval state.
78
+
79
+ ## 6. Verify and hand off safely
80
+
81
+ - Re-open the bot, permission, event/callback, and version pages after publication. Verify the bot is enabled, permission identity counts match, both subscription modes are long connection, event/callback identifiers match, and the version is published.
82
+ - Treat network responses and a refreshed page as stronger evidence than an immediately stale SPA view. Never repeat a create, add, or publish action only because the first page read is stale.
83
+ - Report the app name, App ID, capability, permission counts, event/callback counts, version, release state, and any remaining action.
84
+ - Never print the App Secret. If the user explicitly asks to configure ChatCCC, transfer the App ID and App Secret directly into the local private configuration without echoing the secret in commands, logs, screenshots, files tracked by Git, or chat.
85
+ - Do not modify local ChatCCC configuration or transmit credentials elsewhere unless explicitly authorized.
@@ -1,85 +1,85 @@
1
- ---
2
- name: create-chatccc-feishu-app
3
- description: Create, clone, or configure a Feishu enterprise self-built bot application for ChatCCC. Use when asked to create a ChatCCC Feishu app, imitate an existing lowercase `chatccc` app, prepare a bot for another computer, or configure its bot capability, `im:`/`cardkit:` permissions, events, credentials, version, and internal release from this repository's README.
4
- ---
5
-
6
- # Create a ChatCCC Feishu App
7
-
8
- Use the logged-in Feishu developer console to create and completely configure a ChatCCC bot app. Treat this repository's README as the minimum requirement and the existing app named exactly lowercase `chatccc` as the configuration template.
9
-
10
- ## 1. Establish the target and authorization
11
-
12
- - Read the `README.md` section `#### 飞书(推荐)` before changing the console.
13
- - Determine the requested app name, target computer, description, icon, availability, and whether the user wants configuration only or a real release. Derive a concise description when one is not supplied; for example, `用飞书聊天控制<目标电脑>上的 Claude Code / Cursor / Codex。`.
14
- - Use the browser surface the user requested. If the user specifies Chrome DevTools/CDP, connect directly to `chromeDevtools.port` or the README default `15166`; do not substitute extension-based Chrome control.
15
- - Obtain action-time confirmation before creating the app, granting permissions, saving event/callback subscriptions, or publishing. One explicit instruction such as `完整配置并真正发布` may authorize the listed actions as a batch.
16
-
17
- ## 2. Inventory the lowercase template
18
-
19
- 1. Open `https://open.feishu.cn/app?from=devbotmenu` in the authenticated browser.
20
- 2. Open the app named exactly lowercase `chatccc` in a separate tab.
21
- 3. Record its non-secret configuration:
22
- - app description and icon;
23
- - application capabilities, especially `机器人`;
24
- - every granted permission and its identity type;
25
- - event and callback subscription modes;
26
- - every event and callback identifier;
27
- - version availability, external sharing choices, and release state.
28
- 4. Never reveal, log, export to chat, or persist the template App Secret.
29
-
30
- Prefer current console data over a stale hard-coded list. At the time this workflow was verified, lowercase `chatccc` had 62 application-identity permissions, one user-identity permission, 12 application events, and one callback. Use those counts as a sanity check, not as a replacement for inspecting the template.
31
-
32
- ## 3. Create the target app
33
-
34
- 1. Choose `创建企业自建应用` and fill the requested name and description.
35
- 2. Reuse the lowercase `chatccc` icon only when imitation was requested, and verify its crop preview.
36
- 3. Click the final `创建` action only after confirmation.
37
- 4. Click once and wait for SPA navigation. Verify the exact app name, App ID, URL, and status before retrying; the console can temporarily show stale text after a successful mutation.
38
-
39
- ## 4. Clone the complete ChatCCC configuration
40
-
41
- Perform the configuration in this order:
42
-
43
- 1. Add the `机器人` application capability and verify that the page offers `删除能力`, which means the capability is enabled.
44
- 2. Clone permissions with `权限管理` > `批量处理` > `批量导入/导出权限`:
45
- - export from lowercase `chatccc`;
46
- - import into the target app;
47
- - confirm all additions and verify both application-identity and user-identity totals;
48
- - do not save the export JSON in the repository or chat.
49
- 3. Under `事件与回调` > `事件配置`, set the subscription mode to `使用长连接接收事件`, then add every event present in the template. The verified baseline is:
50
- - `im.chat.disbanded_v1`
51
- - `im.chat.member.bot.added_v1`
52
- - `im.chat.member.bot.deleted_v1`
53
- - `im.chat.member.user.added_v1`
54
- - `im.chat.member.user.deleted_v1`
55
- - `im.chat.member.user.withdrawn_v1`
56
- - `im.message.bot_muted_v1`
57
- - `im.message.message_read_v1`
58
- - `im.message.reaction.created_v1`
59
- - `im.message.reaction.deleted_v1`
60
- - `im.message.recalled_v1`
61
- - `im.message.receive_v1`
62
- 4. Under `回调配置`, independently set `使用长连接接收回调` and add `card.action.trigger`. Configuring the event mode does not configure the callback mode.
63
- 5. Verify that every listed event shows a sufficient permission as `已开通`.
64
-
65
- The README minimum is the bot capability, relevant `im:` and `cardkit:` permissions, `im.message.receive_v1`, and `card.action.trigger`; a clone request requires the complete current template configuration, not only that minimum.
66
-
67
- ## 5. Create and publish a version
68
-
69
- 1. Open `版本管理与发布` and create a version such as `1.0.0`.
70
- 2. Keep mobile and desktop default abilities set to `机器人` and write a meaningful update note.
71
- 3. Match the requested or template availability. For a personal computer, default to the owner-only internal range and leave external group/private-chat sharing disabled unless explicitly requested.
72
- 4. Save the version, then complete the separate `确认发布` action. A successful version creation alone is not a release.
73
- 5. Refresh the version list and require all of the following evidence before reporting success:
74
- - application status `已启用`;
75
- - banner `当前修改均已发布`;
76
- - version status `已发布` with a publication time.
77
- 6. If administrator review is required, submit everything authorized and report the exact remaining approval state.
78
-
79
- ## 6. Verify and hand off safely
80
-
81
- - Re-open the bot, permission, event/callback, and version pages after publication. Verify the bot is enabled, permission identity counts match, both subscription modes are long connection, event/callback identifiers match, and the version is published.
82
- - Treat network responses and a refreshed page as stronger evidence than an immediately stale SPA view. Never repeat a create, add, or publish action only because the first page read is stale.
83
- - Report the app name, App ID, capability, permission counts, event/callback counts, version, release state, and any remaining action.
84
- - Never print the App Secret. If the user explicitly asks to configure ChatCCC, transfer the App ID and App Secret directly into the local private configuration without echoing the secret in commands, logs, screenshots, files tracked by Git, or chat.
85
- - Do not modify local ChatCCC configuration or transmit credentials elsewhere unless explicitly authorized.
1
+ ---
2
+ name: create-chatccc-feishu-app
3
+ description: Create, clone, or configure a Feishu enterprise self-built bot application for ChatCCC. Use when asked to create a ChatCCC Feishu app, imitate an existing lowercase `chatccc` app, prepare a bot for another computer, or configure its bot capability, `im:`/`cardkit:` permissions, events, credentials, version, and internal release from this repository's README.
4
+ ---
5
+
6
+ # Create a ChatCCC Feishu App
7
+
8
+ Use the logged-in Feishu developer console to create and completely configure a ChatCCC bot app. Treat this repository's README as the minimum requirement and the existing app named exactly lowercase `chatccc` as the configuration template.
9
+
10
+ ## 1. Establish the target and authorization
11
+
12
+ - Read the `README.md` section `#### 飞书(推荐)` before changing the console.
13
+ - Determine the requested app name, target computer, description, icon, availability, and whether the user wants configuration only or a real release. Derive a concise description when one is not supplied; for example, `用飞书聊天控制<目标电脑>上的 Claude Code / Cursor / Codex。`.
14
+ - Use the browser surface the user requested. If the user specifies Chrome DevTools/CDP, connect directly to `chromeDevtools.port` or the README default `15166`; do not substitute extension-based Chrome control.
15
+ - Obtain action-time confirmation before creating the app, granting permissions, saving event/callback subscriptions, or publishing. One explicit instruction such as `完整配置并真正发布` may authorize the listed actions as a batch.
16
+
17
+ ## 2. Inventory the lowercase template
18
+
19
+ 1. Open `https://open.feishu.cn/app?from=devbotmenu` in the authenticated browser.
20
+ 2. Open the app named exactly lowercase `chatccc` in a separate tab.
21
+ 3. Record its non-secret configuration:
22
+ - app description and icon;
23
+ - application capabilities, especially `机器人`;
24
+ - every granted permission and its identity type;
25
+ - event and callback subscription modes;
26
+ - every event and callback identifier;
27
+ - version availability, external sharing choices, and release state.
28
+ 4. Never reveal, log, export to chat, or persist the template App Secret.
29
+
30
+ Prefer current console data over a stale hard-coded list. At the time this workflow was verified, lowercase `chatccc` had 62 application-identity permissions, one user-identity permission, 12 application events, and one callback. Use those counts as a sanity check, not as a replacement for inspecting the template.
31
+
32
+ ## 3. Create the target app
33
+
34
+ 1. Choose `创建企业自建应用` and fill the requested name and description.
35
+ 2. Reuse the lowercase `chatccc` icon only when imitation was requested, and verify its crop preview.
36
+ 3. Click the final `创建` action only after confirmation.
37
+ 4. Click once and wait for SPA navigation. Verify the exact app name, App ID, URL, and status before retrying; the console can temporarily show stale text after a successful mutation.
38
+
39
+ ## 4. Clone the complete ChatCCC configuration
40
+
41
+ Perform the configuration in this order:
42
+
43
+ 1. Add the `机器人` application capability and verify that the page offers `删除能力`, which means the capability is enabled.
44
+ 2. Clone permissions with `权限管理` > `批量处理` > `批量导入/导出权限`:
45
+ - export from lowercase `chatccc`;
46
+ - import into the target app;
47
+ - confirm all additions and verify both application-identity and user-identity totals;
48
+ - do not save the export JSON in the repository or chat.
49
+ 3. Under `事件与回调` > `事件配置`, set the subscription mode to `使用长连接接收事件`, then add every event present in the template. The verified baseline is:
50
+ - `im.chat.disbanded_v1`
51
+ - `im.chat.member.bot.added_v1`
52
+ - `im.chat.member.bot.deleted_v1`
53
+ - `im.chat.member.user.added_v1`
54
+ - `im.chat.member.user.deleted_v1`
55
+ - `im.chat.member.user.withdrawn_v1`
56
+ - `im.message.bot_muted_v1`
57
+ - `im.message.message_read_v1`
58
+ - `im.message.reaction.created_v1`
59
+ - `im.message.reaction.deleted_v1`
60
+ - `im.message.recalled_v1`
61
+ - `im.message.receive_v1`
62
+ 4. Under `回调配置`, independently set `使用长连接接收回调` and add `card.action.trigger`. Configuring the event mode does not configure the callback mode.
63
+ 5. Verify that every listed event shows a sufficient permission as `已开通`.
64
+
65
+ The README minimum is the bot capability, relevant `im:` and `cardkit:` permissions, `im.message.receive_v1`, and `card.action.trigger`; a clone request requires the complete current template configuration, not only that minimum.
66
+
67
+ ## 5. Create and publish a version
68
+
69
+ 1. Open `版本管理与发布` and create a version such as `1.0.0`.
70
+ 2. Keep mobile and desktop default abilities set to `机器人` and write a meaningful update note.
71
+ 3. Match the requested or template availability. For a personal computer, default to the owner-only internal range and leave external group/private-chat sharing disabled unless explicitly requested.
72
+ 4. Save the version, then complete the separate `确认发布` action. A successful version creation alone is not a release.
73
+ 5. Refresh the version list and require all of the following evidence before reporting success:
74
+ - application status `已启用`;
75
+ - banner `当前修改均已发布`;
76
+ - version status `已发布` with a publication time.
77
+ 6. If administrator review is required, submit everything authorized and report the exact remaining approval state.
78
+
79
+ ## 6. Verify and hand off safely
80
+
81
+ - Re-open the bot, permission, event/callback, and version pages after publication. Verify the bot is enabled, permission identity counts match, both subscription modes are long connection, event/callback identifiers match, and the version is published.
82
+ - Treat network responses and a refreshed page as stronger evidence than an immediately stale SPA view. Never repeat a create, add, or publish action only because the first page read is stale.
83
+ - Report the app name, App ID, capability, permission counts, event/callback counts, version, release state, and any remaining action.
84
+ - Never print the App Secret. If the user explicitly asks to configure ChatCCC, transfer the App ID and App Secret directly into the local private configuration without echoing the secret in commands, logs, screenshots, files tracked by Git, or chat.
85
+ - Do not modify local ChatCCC configuration or transmit credentials elsewhere unless explicitly authorized.
@@ -1,85 +1,85 @@
1
- ---
2
- name: create-chatccc-feishu-app
3
- description: Create, clone, or configure a Feishu enterprise self-built bot application for ChatCCC. Use when asked to create a ChatCCC Feishu app, imitate an existing lowercase `chatccc` app, prepare a bot for another computer, or configure its bot capability, `im:`/`cardkit:` permissions, events, credentials, version, and internal release from this repository's README.
4
- ---
5
-
6
- # Create a ChatCCC Feishu App
7
-
8
- Use the logged-in Feishu developer console to create and completely configure a ChatCCC bot app. Treat this repository's README as the minimum requirement and the existing app named exactly lowercase `chatccc` as the configuration template.
9
-
10
- ## 1. Establish the target and authorization
11
-
12
- - Read the `README.md` section `#### 飞书(推荐)` before changing the console.
13
- - Determine the requested app name, target computer, description, icon, availability, and whether the user wants configuration only or a real release. Derive a concise description when one is not supplied; for example, `用飞书聊天控制<目标电脑>上的 Claude Code / Cursor / Codex。`.
14
- - Use the browser surface the user requested. If the user specifies Chrome DevTools/CDP, connect directly to `chromeDevtools.port` or the README default `15166`; do not substitute extension-based Chrome control.
15
- - Obtain action-time confirmation before creating the app, granting permissions, saving event/callback subscriptions, or publishing. One explicit instruction such as `完整配置并真正发布` may authorize the listed actions as a batch.
16
-
17
- ## 2. Inventory the lowercase template
18
-
19
- 1. Open `https://open.feishu.cn/app?from=devbotmenu` in the authenticated browser.
20
- 2. Open the app named exactly lowercase `chatccc` in a separate tab.
21
- 3. Record its non-secret configuration:
22
- - app description and icon;
23
- - application capabilities, especially `机器人`;
24
- - every granted permission and its identity type;
25
- - event and callback subscription modes;
26
- - every event and callback identifier;
27
- - version availability, external sharing choices, and release state.
28
- 4. Never reveal, log, export to chat, or persist the template App Secret.
29
-
30
- Prefer current console data over a stale hard-coded list. At the time this workflow was verified, lowercase `chatccc` had 62 application-identity permissions, one user-identity permission, 12 application events, and one callback. Use those counts as a sanity check, not as a replacement for inspecting the template.
31
-
32
- ## 3. Create the target app
33
-
34
- 1. Choose `创建企业自建应用` and fill the requested name and description.
35
- 2. Reuse the lowercase `chatccc` icon only when imitation was requested, and verify its crop preview.
36
- 3. Click the final `创建` action only after confirmation.
37
- 4. Click once and wait for SPA navigation. Verify the exact app name, App ID, URL, and status before retrying; the console can temporarily show stale text after a successful mutation.
38
-
39
- ## 4. Clone the complete ChatCCC configuration
40
-
41
- Perform the configuration in this order:
42
-
43
- 1. Add the `机器人` application capability and verify that the page offers `删除能力`, which means the capability is enabled.
44
- 2. Clone permissions with `权限管理` > `批量处理` > `批量导入/导出权限`:
45
- - export from lowercase `chatccc`;
46
- - import into the target app;
47
- - confirm all additions and verify both application-identity and user-identity totals;
48
- - do not save the export JSON in the repository or chat.
49
- 3. Under `事件与回调` > `事件配置`, set the subscription mode to `使用长连接接收事件`, then add every event present in the template. The verified baseline is:
50
- - `im.chat.disbanded_v1`
51
- - `im.chat.member.bot.added_v1`
52
- - `im.chat.member.bot.deleted_v1`
53
- - `im.chat.member.user.added_v1`
54
- - `im.chat.member.user.deleted_v1`
55
- - `im.chat.member.user.withdrawn_v1`
56
- - `im.message.bot_muted_v1`
57
- - `im.message.message_read_v1`
58
- - `im.message.reaction.created_v1`
59
- - `im.message.reaction.deleted_v1`
60
- - `im.message.recalled_v1`
61
- - `im.message.receive_v1`
62
- 4. Under `回调配置`, independently set `使用长连接接收回调` and add `card.action.trigger`. Configuring the event mode does not configure the callback mode.
63
- 5. Verify that every listed event shows a sufficient permission as `已开通`.
64
-
65
- The README minimum is the bot capability, relevant `im:` and `cardkit:` permissions, `im.message.receive_v1`, and `card.action.trigger`; a clone request requires the complete current template configuration, not only that minimum.
66
-
67
- ## 5. Create and publish a version
68
-
69
- 1. Open `版本管理与发布` and create a version such as `1.0.0`.
70
- 2. Keep mobile and desktop default abilities set to `机器人` and write a meaningful update note.
71
- 3. Match the requested or template availability. For a personal computer, default to the owner-only internal range and leave external group/private-chat sharing disabled unless explicitly requested.
72
- 4. Save the version, then complete the separate `确认发布` action. A successful version creation alone is not a release.
73
- 5. Refresh the version list and require all of the following evidence before reporting success:
74
- - application status `已启用`;
75
- - banner `当前修改均已发布`;
76
- - version status `已发布` with a publication time.
77
- 6. If administrator review is required, submit everything authorized and report the exact remaining approval state.
78
-
79
- ## 6. Verify and hand off safely
80
-
81
- - Re-open the bot, permission, event/callback, and version pages after publication. Verify the bot is enabled, permission identity counts match, both subscription modes are long connection, event/callback identifiers match, and the version is published.
82
- - Treat network responses and a refreshed page as stronger evidence than an immediately stale SPA view. Never repeat a create, add, or publish action only because the first page read is stale.
83
- - Report the app name, App ID, capability, permission counts, event/callback counts, version, release state, and any remaining action.
84
- - Never print the App Secret. If the user explicitly asks to configure ChatCCC, transfer the App ID and App Secret directly into the local private configuration without echoing the secret in commands, logs, screenshots, files tracked by Git, or chat.
85
- - Do not modify local ChatCCC configuration or transmit credentials elsewhere unless explicitly authorized.
1
+ ---
2
+ name: create-chatccc-feishu-app
3
+ description: Create, clone, or configure a Feishu enterprise self-built bot application for ChatCCC. Use when asked to create a ChatCCC Feishu app, imitate an existing lowercase `chatccc` app, prepare a bot for another computer, or configure its bot capability, `im:`/`cardkit:` permissions, events, credentials, version, and internal release from this repository's README.
4
+ ---
5
+
6
+ # Create a ChatCCC Feishu App
7
+
8
+ Use the logged-in Feishu developer console to create and completely configure a ChatCCC bot app. Treat this repository's README as the minimum requirement and the existing app named exactly lowercase `chatccc` as the configuration template.
9
+
10
+ ## 1. Establish the target and authorization
11
+
12
+ - Read the `README.md` section `#### 飞书(推荐)` before changing the console.
13
+ - Determine the requested app name, target computer, description, icon, availability, and whether the user wants configuration only or a real release. Derive a concise description when one is not supplied; for example, `用飞书聊天控制<目标电脑>上的 Claude Code / Cursor / Codex。`.
14
+ - Use the browser surface the user requested. If the user specifies Chrome DevTools/CDP, connect directly to `chromeDevtools.port` or the README default `15166`; do not substitute extension-based Chrome control.
15
+ - Obtain action-time confirmation before creating the app, granting permissions, saving event/callback subscriptions, or publishing. One explicit instruction such as `完整配置并真正发布` may authorize the listed actions as a batch.
16
+
17
+ ## 2. Inventory the lowercase template
18
+
19
+ 1. Open `https://open.feishu.cn/app?from=devbotmenu` in the authenticated browser.
20
+ 2. Open the app named exactly lowercase `chatccc` in a separate tab.
21
+ 3. Record its non-secret configuration:
22
+ - app description and icon;
23
+ - application capabilities, especially `机器人`;
24
+ - every granted permission and its identity type;
25
+ - event and callback subscription modes;
26
+ - every event and callback identifier;
27
+ - version availability, external sharing choices, and release state.
28
+ 4. Never reveal, log, export to chat, or persist the template App Secret.
29
+
30
+ Prefer current console data over a stale hard-coded list. At the time this workflow was verified, lowercase `chatccc` had 62 application-identity permissions, one user-identity permission, 12 application events, and one callback. Use those counts as a sanity check, not as a replacement for inspecting the template.
31
+
32
+ ## 3. Create the target app
33
+
34
+ 1. Choose `创建企业自建应用` and fill the requested name and description.
35
+ 2. Reuse the lowercase `chatccc` icon only when imitation was requested, and verify its crop preview.
36
+ 3. Click the final `创建` action only after confirmation.
37
+ 4. Click once and wait for SPA navigation. Verify the exact app name, App ID, URL, and status before retrying; the console can temporarily show stale text after a successful mutation.
38
+
39
+ ## 4. Clone the complete ChatCCC configuration
40
+
41
+ Perform the configuration in this order:
42
+
43
+ 1. Add the `机器人` application capability and verify that the page offers `删除能力`, which means the capability is enabled.
44
+ 2. Clone permissions with `权限管理` > `批量处理` > `批量导入/导出权限`:
45
+ - export from lowercase `chatccc`;
46
+ - import into the target app;
47
+ - confirm all additions and verify both application-identity and user-identity totals;
48
+ - do not save the export JSON in the repository or chat.
49
+ 3. Under `事件与回调` > `事件配置`, set the subscription mode to `使用长连接接收事件`, then add every event present in the template. The verified baseline is:
50
+ - `im.chat.disbanded_v1`
51
+ - `im.chat.member.bot.added_v1`
52
+ - `im.chat.member.bot.deleted_v1`
53
+ - `im.chat.member.user.added_v1`
54
+ - `im.chat.member.user.deleted_v1`
55
+ - `im.chat.member.user.withdrawn_v1`
56
+ - `im.message.bot_muted_v1`
57
+ - `im.message.message_read_v1`
58
+ - `im.message.reaction.created_v1`
59
+ - `im.message.reaction.deleted_v1`
60
+ - `im.message.recalled_v1`
61
+ - `im.message.receive_v1`
62
+ 4. Under `回调配置`, independently set `使用长连接接收回调` and add `card.action.trigger`. Configuring the event mode does not configure the callback mode.
63
+ 5. Verify that every listed event shows a sufficient permission as `已开通`.
64
+
65
+ The README minimum is the bot capability, relevant `im:` and `cardkit:` permissions, `im.message.receive_v1`, and `card.action.trigger`; a clone request requires the complete current template configuration, not only that minimum.
66
+
67
+ ## 5. Create and publish a version
68
+
69
+ 1. Open `版本管理与发布` and create a version such as `1.0.0`.
70
+ 2. Keep mobile and desktop default abilities set to `机器人` and write a meaningful update note.
71
+ 3. Match the requested or template availability. For a personal computer, default to the owner-only internal range and leave external group/private-chat sharing disabled unless explicitly requested.
72
+ 4. Save the version, then complete the separate `确认发布` action. A successful version creation alone is not a release.
73
+ 5. Refresh the version list and require all of the following evidence before reporting success:
74
+ - application status `已启用`;
75
+ - banner `当前修改均已发布`;
76
+ - version status `已发布` with a publication time.
77
+ 6. If administrator review is required, submit everything authorized and report the exact remaining approval state.
78
+
79
+ ## 6. Verify and hand off safely
80
+
81
+ - Re-open the bot, permission, event/callback, and version pages after publication. Verify the bot is enabled, permission identity counts match, both subscription modes are long connection, event/callback identifiers match, and the version is published.
82
+ - Treat network responses and a refreshed page as stronger evidence than an immediately stale SPA view. Never repeat a create, add, or publish action only because the first page read is stale.
83
+ - Report the app name, App ID, capability, permission counts, event/callback counts, version, release state, and any remaining action.
84
+ - Never print the App Secret. If the user explicitly asks to configure ChatCCC, transfer the App ID and App Secret directly into the local private configuration without echoing the secret in commands, logs, screenshots, files tracked by Git, or chat.
85
+ - Do not modify local ChatCCC configuration or transmit credentials elsewhere unless explicitly authorized.