chatccc 0.2.229 → 0.2.231

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 (120) 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/agent-prompts/claude_specific.md +45 -45
  6. package/agent-prompts/codex_specific.md +2 -2
  7. package/agent-prompts/cursor_specific.md +13 -13
  8. package/bin/cccagent.mjs +17 -17
  9. package/im-skills/feishu-skill/receive-send-file.md +63 -63
  10. package/im-skills/feishu-skill/receive-send-image.md +24 -24
  11. package/im-skills/feishu-skill/skill.md +3 -3
  12. package/im-skills/wechat-file-skill/receive-send-file.md +38 -38
  13. package/im-skills/wechat-file-skill/send-file.mjs +83 -83
  14. package/im-skills/wechat-file-skill/skill.md +10 -10
  15. package/im-skills/wechat-image-skill/skill.md +10 -10
  16. package/im-skills/wechat-video-skill/receive-send-video.md +38 -38
  17. package/im-skills/wechat-video-skill/send-video.mjs +79 -79
  18. package/im-skills/wechat-video-skill/skill.md +10 -10
  19. package/package.json +1 -1
  20. package/scripts/postinstall-sharp-check.mjs +58 -58
  21. package/src/__tests__/agent-activity.test.ts +86 -76
  22. package/src/__tests__/agent-delegate-task-rpc.test.ts +165 -165
  23. package/src/__tests__/agent-reload-config-rpc.test.ts +99 -99
  24. package/src/__tests__/builtin-chat-session.test.ts +65 -1
  25. package/src/__tests__/builtin-cli-json.test.ts +39 -39
  26. package/src/__tests__/builtin-config.test.ts +26 -26
  27. package/src/__tests__/builtin-context.test.ts +202 -163
  28. package/src/__tests__/builtin-permissions.test.ts +211 -211
  29. package/src/__tests__/builtin-session-select.test.ts +116 -116
  30. package/src/__tests__/builtin-sigint.test.ts +56 -56
  31. package/src/__tests__/builtin-web-tools.test.ts +220 -220
  32. package/src/__tests__/card-action-routing.test.ts +18 -18
  33. package/src/__tests__/cardkit.test.ts +60 -60
  34. package/src/__tests__/ccc-adapter.test.ts +170 -136
  35. package/src/__tests__/chatgpt-subscription-rpc.test.ts +89 -89
  36. package/src/__tests__/chatgpt-subscription.test.ts +135 -135
  37. package/src/__tests__/chrome-devtools-guard.test.ts +165 -165
  38. package/src/__tests__/claude-adapter.test.ts +614 -614
  39. package/src/__tests__/claude-raw-stream-log.test.ts +87 -87
  40. package/src/__tests__/codex-adapter.test.ts +58 -58
  41. package/src/__tests__/codex-raw-stream-log.test.ts +170 -170
  42. package/src/__tests__/codex-reset-actions.test.ts +146 -146
  43. package/src/__tests__/cursor-adapter.test.ts +268 -268
  44. package/src/__tests__/feishu-api.test.ts +60 -60
  45. package/src/__tests__/feishu-avatar.test.ts +164 -164
  46. package/src/__tests__/feishu-message-ingress.test.ts +138 -138
  47. package/src/__tests__/feishu-platform.test.ts +22 -22
  48. package/src/__tests__/format-message.test.ts +47 -47
  49. package/src/__tests__/jsonl-stream.test.ts +79 -79
  50. package/src/__tests__/package-files.test.ts +24 -24
  51. package/src/__tests__/privacy.test.ts +198 -198
  52. package/src/__tests__/progress-reducer.test.ts +121 -110
  53. package/src/__tests__/raw-stream-log.test.ts +106 -106
  54. package/src/__tests__/response-stall.test.ts +49 -49
  55. package/src/__tests__/session.test.ts +174 -16
  56. package/src/__tests__/shared-prefix.test.ts +36 -36
  57. package/src/__tests__/sim-platform.test.ts +16 -16
  58. package/src/__tests__/startup-lifecycle.test.ts +231 -231
  59. package/src/__tests__/stop-session.test.ts +34 -34
  60. package/src/__tests__/stream-state.test.ts +42 -42
  61. package/src/__tests__/terminal-error.test.ts +54 -0
  62. package/src/__tests__/terminal-renderer.test.ts +247 -247
  63. package/src/__tests__/update-command-guard.test.ts +144 -144
  64. package/src/__tests__/web-ui.test.ts +326 -326
  65. package/src/adapters/adapter-interface.ts +24 -18
  66. package/src/adapters/ccc-adapter.ts +141 -131
  67. package/src/adapters/claude-adapter.ts +620 -620
  68. package/src/adapters/claude-session-meta-store.ts +120 -120
  69. package/src/adapters/codex-adapter.ts +426 -426
  70. package/src/adapters/cursor-adapter.ts +681 -681
  71. package/src/adapters/jsonl-stream.ts +157 -157
  72. package/src/adapters/raw-stream-log.ts +124 -124
  73. package/src/adapters/resource-monitor.ts +140 -140
  74. package/src/agent-activity.ts +175 -170
  75. package/src/agent-delegate-task-rpc.ts +153 -153
  76. package/src/agent-delegate-task.ts +91 -91
  77. package/src/agent-reload-config-rpc.ts +34 -34
  78. package/src/agent-stop-stuck.ts +129 -129
  79. package/src/builtin/cli.ts +9 -2
  80. package/src/builtin/config.ts +84 -84
  81. package/src/builtin/context.ts +62 -4
  82. package/src/builtin/file-log.ts +38 -38
  83. package/src/builtin/index.ts +83 -19
  84. package/src/builtin/proc-tree-kill.ts +61 -61
  85. package/src/builtin/progress/cards-helpers.ts +76 -76
  86. package/src/builtin/progress/reducer.ts +113 -108
  87. package/src/builtin/progress/terminal-renderer.ts +294 -294
  88. package/src/builtin/progress/view.ts +77 -77
  89. package/src/builtin/raw-stream-log.ts +124 -124
  90. package/src/builtin/session-select.ts +48 -48
  91. package/src/builtin/sigint.ts +50 -50
  92. package/src/builtin/web-tools.ts +313 -313
  93. package/src/card-action-routing.ts +14 -14
  94. package/src/chatgpt-subscription-rpc.ts +27 -27
  95. package/src/chatgpt-subscription.ts +299 -299
  96. package/src/chrome-devtools-guard.ts +318 -318
  97. package/src/codex-reset-actions.ts +184 -184
  98. package/src/feishu-api.ts +193 -193
  99. package/src/feishu-message-ingress.ts +195 -195
  100. package/src/feishu-platform.ts +20 -20
  101. package/src/format-message.ts +293 -293
  102. package/src/litellm-proxy.ts +374 -374
  103. package/src/orchestrator.ts +8 -3
  104. package/src/platform-adapter.ts +6 -6
  105. package/src/privacy.ts +118 -118
  106. package/src/progress/reducer.ts +113 -108
  107. package/src/progress/terminal-renderer.ts +294 -294
  108. package/src/progress/view.ts +77 -77
  109. package/src/response-stall.ts +28 -28
  110. package/src/runtime-reload.ts +34 -34
  111. package/src/session-chat-binding.ts +82 -82
  112. package/src/session-name.ts +8 -8
  113. package/src/session.ts +149 -26
  114. package/src/shared-prefix.ts +29 -29
  115. package/src/sim-platform.ts +20 -20
  116. package/src/startup-lifecycle.ts +250 -250
  117. package/src/stream-state.ts +21 -18
  118. package/src/terminal-error.ts +129 -0
  119. package/src/turn-cards.ts +117 -117
  120. 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.