@lark-apaas/openclaw-scripts-diagnose-cli 0.1.6-alpha.1 → 0.1.6-alpha.3

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 (2) hide show
  1. package/dist/index.cjs +36 -4
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -53,7 +53,7 @@ let json_diff = require("json-diff");
53
53
  * it terse and parseable.
54
54
  */
55
55
  function getVersion() {
56
- return "0.1.6-alpha.1";
56
+ return "0.1.6-alpha.3";
57
57
  }
58
58
  //#endregion
59
59
  //#region src/rule-engine/base.ts
@@ -4213,7 +4213,39 @@ function finalize(results, aborted) {
4213
4213
  //#region src/lark-cli-init.ts
4214
4214
  const LARK_PLUGIN_NAMES = ["openclaw-lark", "feishu-openclaw-plugin"];
4215
4215
  const PE_XML_TAG = "lark-pe";
4216
- const PE_PLACEHOLDER = `\n<${PE_XML_TAG}>\n<!-- TODO: replace with actual prompt engineering content -->\n</${PE_XML_TAG}>\n`;
4216
+ const PE_PLACEHOLDER = `
4217
+ <${PE_XML_TAG}>
4218
+ # 飞书操作铁律(最高优先级)
4219
+ 【Critical】所有飞书相关操作(消息、文档、日历、搜索、群、文件等)**必须通过 lark-cli**,禁止使用 \`feishu_im_*\` / \`feishu_chat\` / \`feishu_search_doc_wiki\` / \`feishu_fetch_doc\` / \`feishu_create_doc\` / \`feishu_update_doc\` 等同名工具。
4220
+ lark-cli 是飞书所有能力的唯一入口。
4221
+ ## 调用规范
4222
+ 【必读】开始任何飞书操作前,先读对应 SKILL.md:
4223
+ - 系统自动根据任务匹配 skills,读取对应 SKILL.md
4224
+ - 匹配到相关 skill 后,严格按照 SKILL.md 的规范执行
4225
+ - 需要时用 \`lark-cli --help\` 或 \`lark-cli <sub> --help\` 查看可用命令,不要猜测参数格式
4226
+ ## 命令格式
4227
+ \`\`\`
4228
+ lark-cli --profile <appId> [--as bot] <子命令> <子命令参数>
4229
+ \`\`\`
4230
+ ### --profile 参数(必填)
4231
+ \`--profile\` 传入的是飞书 App ID(格式:\`cli_xxx\`),**不是** \`account_id\`(\`bot-cli_xxx\`)。
4232
+ **如何找到当前 Agent 的 appId**:
4233
+ 1. **获取 account_id**:从入站上下文元数据的 \`account_id\` 字段读取(格式:\`bot-cli_xxx\`)
4234
+ 2. **查 appId**:调用 \`gateway config.get\` 查询 \`channels.feishu.accounts[account_id].appId\`
4235
+ 3. **兜底**:如果 accounts 里查不到,直接查 \`channels.feishu.appId\`
4236
+ \`\`\`bash
4237
+ # 示例:account_id = bot-cli_a977eb4fc239dbd7
4238
+ # 查询配置获取 appId
4239
+ gateway config.get channels.feishu.accounts
4240
+ # → appId: cli_a977eb4fc239dbd7
4241
+ # 正确用法
4242
+ lark-cli --profile cli_a977eb4fc239dbd7 --as bot im +chat-messages-list ...
4243
+ \`\`\`
4244
+ ### --as bot 参数(必填)
4245
+ 当前账号 \`uat.enabled: false\`,**必须显式加 \`--as bot\`**。
4246
+ \`--as user\` 仅在 \`uat.enabled: true\` 且需要以用户身份操作时使用。
4247
+ </${PE_XML_TAG}>
4248
+ `;
4217
4249
  function isLarkPluginInstalled(configPath) {
4218
4250
  const extDir = getExtensionsDir(configPath);
4219
4251
  return LARK_PLUGIN_NAMES.some((name) => {
@@ -4493,7 +4525,7 @@ async function reportCliRun(opts) {
4493
4525
  //#region src/help.ts
4494
4526
  const BIN = "mclaw-diagnose";
4495
4527
  function versionBanner() {
4496
- return `v0.1.6-alpha.1`;
4528
+ return `v0.1.6-alpha.3`;
4497
4529
  }
4498
4530
  const COMMANDS = [
4499
4531
  {
@@ -5244,7 +5276,7 @@ async function main() {
5244
5276
  agentsMdPath: getFlag(args, "agents-md"),
5245
5277
  feishuAppSecret: getFlag(args, "feishu-app-secret")
5246
5278
  });
5247
- console.error(`lark-cli-init: result=${JSON.stringify(result)}`);
5279
+ console.log(JSON.stringify(result));
5248
5280
  await reportRun("lark-cli-init", rc, void 0, args.join(" "), Date.now() - t0, {
5249
5281
  success: result.ok,
5250
5282
  result,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/openclaw-scripts-diagnose-cli",
3
- "version": "0.1.6-alpha.1",
3
+ "version": "0.1.6-alpha.3",
4
4
  "description": "CLI for OpenClaw config diagnose and repair with JSON5 support",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {