@linkaicli/linkai-cli 0.0.0-stage → 1.0.18

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 (88) hide show
  1. package/AGENTS.md +64 -0
  2. package/GUIDE.md +149 -0
  3. package/LICENSE +190 -0
  4. package/NOTICE +6 -0
  5. package/README.md +82 -2
  6. package/THIRD_PARTY_NOTICES.txt +318 -0
  7. package/cli-manifest.json +1850 -0
  8. package/clis/_shared/common.js +1 -0
  9. package/clis/_shared/site-auth.js +1 -0
  10. package/clis/linkai/build.js +1 -0
  11. package/clis/linkai/card-rules.js +1 -0
  12. package/clis/linkai/collab.js +1 -0
  13. package/clis/linkai/commands.js +4 -0
  14. package/clis/linkai/core.js +12 -0
  15. package/clis/linkai/deliverable.js +2 -0
  16. package/clis/linkai/dictionary.js +1 -0
  17. package/clis/linkai/fill-card.js +1 -0
  18. package/clis/linkai/oauth.js +8 -0
  19. package/clis/linkai/reuse.js +1 -0
  20. package/clis/linkai/templates.js +1 -0
  21. package/dist/bundle/browser-cdp.mjs +2 -0
  22. package/dist/bundle/browser-page.mjs +2 -0
  23. package/dist/bundle/browser-utils.mjs +2 -0
  24. package/dist/bundle/core.mjs +3448 -0
  25. package/dist/bundle/daemon.mjs +16 -0
  26. package/dist/bundle/download-article.mjs +2 -0
  27. package/dist/bundle/download-media.mjs +2 -0
  28. package/dist/bundle/download-progress.mjs +2 -0
  29. package/dist/bundle/download.mjs +2 -0
  30. package/dist/bundle/errors.mjs +2 -0
  31. package/dist/bundle/logger.mjs +2 -0
  32. package/dist/bundle/main.mjs +3 -0
  33. package/dist/bundle/oplog.mjs +2 -0
  34. package/dist/bundle/pipeline.mjs +2 -0
  35. package/dist/bundle/registry.mjs +2 -0
  36. package/dist/bundle/skills.mjs +2 -0
  37. package/dist/bundle/types.mjs +2 -0
  38. package/dist/bundle/utils.mjs +2 -0
  39. package/dist/bundle/vendor/readability/Readability-readerable.js +122 -0
  40. package/dist/bundle/vendor/readability/Readability.js +2786 -0
  41. package/knowledge/README.md +29 -0
  42. package/knowledge/browser/README.md +40 -0
  43. package/knowledge/data-dictionary/README.md +35 -0
  44. package/knowledge/data-dictionary/_templates/enum.md +7 -0
  45. package/knowledge/data-dictionary/_templates/metric.md +5 -0
  46. package/knowledge/data-dictionary/_templates/view.md +29 -0
  47. package/knowledge/data-dictionary/enums/.gitkeep +1 -0
  48. package/knowledge/data-dictionary/index.md +12 -0
  49. package/knowledge/data-dictionary/metrics/.gitkeep +1 -0
  50. package/knowledge/data-dictionary/views/.gitkeep +1 -0
  51. package/knowledge/report-builder/README.md +80 -0
  52. package/knowledge/report-builder/SOP.md +91 -0
  53. package/knowledge/report-builder/build-spec.md +79 -0
  54. package/knowledge/report-builder/references/api-catalog.md +106 -0
  55. package/knowledge/report-builder/references/api.md +148 -0
  56. package/knowledge/report-builder/references/auth-space.md +58 -0
  57. package/knowledge/report-builder/references/card.md +382 -0
  58. package/knowledge/report-builder/references/chart-config-schema.md +572 -0
  59. package/knowledge/report-builder/references/chart-types.md +167 -0
  60. package/knowledge/report-builder/references/dashboard-patterns.md +138 -0
  61. package/knowledge/report-builder/references/dataset.md +152 -0
  62. package/knowledge/report-builder/references/fill-import.md +95 -0
  63. package/knowledge/report-builder/references/filters.md +170 -0
  64. package/knowledge/report-builder/references/gantt.md +79 -0
  65. package/knowledge/report-builder/references/pitfalls.md +265 -0
  66. package/knowledge/report-builder/references/query-engine.md +177 -0
  67. package/knowledge/report-builder/references/report.md +249 -0
  68. package/llms.txt +37 -0
  69. package/package.json +108 -4
  70. package/skills/agent-prompt.md +37 -0
  71. package/skills/linkai-browser/SKILL.md +67 -0
  72. package/skills/linkai-collab/SKILL.md +65 -0
  73. package/skills/linkai-data-workflow/SKILL.md +49 -0
  74. package/skills/linkai-data-workflow/assets/import-run-template.json +22 -0
  75. package/skills/linkai-data-workflow/assets/solution-template.md +60 -0
  76. package/skills/linkai-data-workflow/references/excel-analysis-modeling.md +35 -0
  77. package/skills/linkai-data-workflow/references/fill-import.md +95 -0
  78. package/skills/linkai-data-workflow/references/solution-knowledge.md +35 -0
  79. package/skills/linkai-report-builder/SKILL.md +151 -0
  80. package/skills/linkai-usage/SKILL.md +67 -0
  81. package/templates/report-spec/cards/detail-table.json +12 -0
  82. package/templates/report-spec/filters.example.json +28 -0
  83. package/templates/report-spec/plan-knowledge.example.yaml +18 -0
  84. package/templates/report-spec/report.example.yaml +123 -0
  85. package/templates/report-spec/sql/channel.sql +7 -0
  86. package/templates/report-spec/sql/detail.sql +10 -0
  87. package/templates/report-spec/sql/kpi.sql +8 -0
  88. package/templates/report-spec/sql/trend.sql +9 -0
@@ -0,0 +1,1850 @@
1
+ [
2
+ {
3
+ "site": "linkai",
4
+ "name": "api",
5
+ "description": "调用未封装的写接口(POST/PUT/DELETE,可能新建或修改数据);先查 references/api-catalog.md。数据源、SQL 类接口不开放",
6
+ "access": "write",
7
+ "strategy": "public",
8
+ "browser": false,
9
+ "args": [
10
+ {
11
+ "name": "method",
12
+ "type": "string",
13
+ "required": true,
14
+ "help": "POST、PUT 或 DELETE"
15
+ },
16
+ {
17
+ "name": "path",
18
+ "type": "string",
19
+ "required": true,
20
+ "help": "接口路径"
21
+ },
22
+ {
23
+ "name": "body",
24
+ "type": "string",
25
+ "required": false,
26
+ "help": "请求体 JSON 文件路径"
27
+ },
28
+ {
29
+ "name": "raw",
30
+ "type": "boolean",
31
+ "default": false,
32
+ "required": false,
33
+ "help": "返回完整响应(code/message/extendData)"
34
+ }
35
+ ],
36
+ "defaultFormat": "json",
37
+ "type": "js",
38
+ "modulePath": "linkai/commands.js",
39
+ "sourceFile": "linkai/commands.js"
40
+ },
41
+ {
42
+ "site": "linkai",
43
+ "name": "api-get",
44
+ "description": "调用未封装的读接口(GET,路径可省略 /api/app);先查 references/api-catalog.md。数据源、SQL 类接口不开放",
45
+ "access": "read",
46
+ "strategy": "public",
47
+ "browser": false,
48
+ "args": [
49
+ {
50
+ "name": "path",
51
+ "type": "string",
52
+ "required": true,
53
+ "help": "接口路径,如 /index-block/folders?type=1"
54
+ },
55
+ {
56
+ "name": "raw",
57
+ "type": "boolean",
58
+ "default": false,
59
+ "required": false,
60
+ "help": "返回完整响应"
61
+ }
62
+ ],
63
+ "defaultFormat": "json",
64
+ "type": "js",
65
+ "modulePath": "linkai/commands.js",
66
+ "sourceFile": "linkai/commands.js"
67
+ },
68
+ {
69
+ "site": "linkai",
70
+ "name": "backup",
71
+ "description": "修改已有对象前保存带时间戳的备份(卡片/方案 JSON 或数据集 SQL),存到 ~/.linkai/artifacts/linkai/backups/",
72
+ "access": "read",
73
+ "strategy": "public",
74
+ "browser": false,
75
+ "args": [
76
+ {
77
+ "name": "type",
78
+ "type": "string",
79
+ "required": true,
80
+ "help": "card(卡片)| plan(方案)| ds(数据集)"
81
+ },
82
+ {
83
+ "name": "id",
84
+ "type": "string",
85
+ "required": true,
86
+ "help": "对象的精确 id"
87
+ }
88
+ ],
89
+ "defaultFormat": "json",
90
+ "type": "js",
91
+ "modulePath": "linkai/commands.js",
92
+ "sourceFile": "linkai/commands.js"
93
+ },
94
+ {
95
+ "site": "linkai",
96
+ "name": "build",
97
+ "description": "严格按 BI 公共知识库执行 AI 提供的 SQL 与报表 spec(CLI 不生成业务 SQL)。默认只校验并给出执行计划;--execute 才写入;含正式名还需 --confirm",
98
+ "access": "write",
99
+ "strategy": "public",
100
+ "browser": false,
101
+ "args": [
102
+ {
103
+ "name": "spec",
104
+ "type": "string",
105
+ "required": true,
106
+ "help": "报表 spec 文件(.yaml/.json),模版用 linkai template 复制"
107
+ },
108
+ {
109
+ "name": "execute",
110
+ "type": "boolean",
111
+ "default": false,
112
+ "required": false,
113
+ "help": "真正写入(默认只校验并输出执行计划)"
114
+ },
115
+ {
116
+ "name": "confirm",
117
+ "type": "boolean",
118
+ "default": false,
119
+ "required": false,
120
+ "help": "用户已明确授权使用正式名(非 zz- 前缀)"
121
+ },
122
+ {
123
+ "name": "no-style",
124
+ "type": "boolean",
125
+ "default": false,
126
+ "required": false,
127
+ "help": "跳过页面样式步骤(暖色背景、卡位透明)"
128
+ }
129
+ ],
130
+ "defaultFormat": "json",
131
+ "type": "js",
132
+ "modulePath": "linkai/commands.js",
133
+ "sourceFile": "linkai/commands.js"
134
+ },
135
+ {
136
+ "site": "linkai",
137
+ "name": "card-chart",
138
+ "description": "按图表类型新建或覆盖图表卡片(指定维度、数值、系列列)",
139
+ "access": "write",
140
+ "strategy": "public",
141
+ "browser": false,
142
+ "args": [
143
+ {
144
+ "name": "ds",
145
+ "type": "string",
146
+ "required": true,
147
+ "help": "数据集的精确 id"
148
+ },
149
+ {
150
+ "name": "name",
151
+ "type": "string",
152
+ "required": true,
153
+ "help": "卡片名称"
154
+ },
155
+ {
156
+ "name": "kind",
157
+ "type": "string",
158
+ "required": true,
159
+ "help": "图表类型,如 column/stacked(linkai kinds 查看全部)"
160
+ },
161
+ {
162
+ "name": "dim",
163
+ "type": "string",
164
+ "required": false,
165
+ "help": "维度列名,多个用逗号分隔"
166
+ },
167
+ {
168
+ "name": "meas",
169
+ "type": "string",
170
+ "required": true,
171
+ "help": "数值列名,多个用逗号分隔"
172
+ },
173
+ {
174
+ "name": "series",
175
+ "type": "string",
176
+ "required": false,
177
+ "help": "系列列名(可选)"
178
+ },
179
+ {
180
+ "name": "card",
181
+ "type": "string",
182
+ "required": false,
183
+ "help": "要覆盖的已有卡片 id(可选)"
184
+ }
185
+ ],
186
+ "defaultFormat": "json",
187
+ "type": "js",
188
+ "modulePath": "linkai/commands.js",
189
+ "sourceFile": "linkai/commands.js"
190
+ },
191
+ {
192
+ "site": "linkai",
193
+ "name": "card-gantt",
194
+ "description": "按 spec JSON 新建或覆盖甘特图卡片(见 references/gantt.md)",
195
+ "access": "write",
196
+ "strategy": "public",
197
+ "browser": false,
198
+ "args": [
199
+ {
200
+ "name": "ds",
201
+ "type": "string",
202
+ "required": true,
203
+ "help": "数据集的精确 id"
204
+ },
205
+ {
206
+ "name": "spec",
207
+ "type": "string",
208
+ "required": true,
209
+ "help": "spec JSON 文件路径"
210
+ },
211
+ {
212
+ "name": "card",
213
+ "type": "string",
214
+ "required": false,
215
+ "help": "要覆盖的已有卡片 id(可选)"
216
+ }
217
+ ],
218
+ "defaultFormat": "json",
219
+ "type": "js",
220
+ "modulePath": "linkai/commands.js",
221
+ "sourceFile": "linkai/commands.js"
222
+ },
223
+ {
224
+ "site": "linkai",
225
+ "name": "card-get",
226
+ "description": "把卡片完整配置保存为 JSON 文件(修改前的基线,或 card-save 的输入)",
227
+ "access": "read",
228
+ "strategy": "public",
229
+ "browser": false,
230
+ "args": [
231
+ {
232
+ "name": "card",
233
+ "type": "string",
234
+ "required": true,
235
+ "help": "卡片的精确 id"
236
+ },
237
+ {
238
+ "name": "output",
239
+ "type": "string",
240
+ "required": false,
241
+ "help": "输出 JSON 路径(默认 ~/.linkai/artifacts/linkai/cards/<cardId>.json)"
242
+ }
243
+ ],
244
+ "defaultFormat": "json",
245
+ "type": "js",
246
+ "modulePath": "linkai/commands.js",
247
+ "sourceFile": "linkai/commands.js"
248
+ },
249
+ {
250
+ "site": "linkai",
251
+ "name": "card-list",
252
+ "description": "列出当前租户的卡片",
253
+ "access": "read",
254
+ "strategy": "public",
255
+ "browser": false,
256
+ "args": [
257
+ {
258
+ "name": "search",
259
+ "type": "string",
260
+ "required": false,
261
+ "help": "按名称关键字过滤(可选)"
262
+ }
263
+ ],
264
+ "defaultFormat": "table",
265
+ "type": "js",
266
+ "modulePath": "linkai/commands.js",
267
+ "sourceFile": "linkai/commands.js"
268
+ },
269
+ {
270
+ "site": "linkai",
271
+ "name": "card-meter",
272
+ "description": "新建或覆盖单数值指标卡(meter/list)",
273
+ "access": "write",
274
+ "strategy": "public",
275
+ "browser": false,
276
+ "args": [
277
+ {
278
+ "name": "ds",
279
+ "type": "string",
280
+ "required": true,
281
+ "help": "数据集的精确 id"
282
+ },
283
+ {
284
+ "name": "name",
285
+ "type": "string",
286
+ "required": true,
287
+ "help": "卡片名称"
288
+ },
289
+ {
290
+ "name": "col",
291
+ "type": "string",
292
+ "required": true,
293
+ "help": "数值列名"
294
+ },
295
+ {
296
+ "name": "subtitle",
297
+ "type": "string",
298
+ "required": false,
299
+ "help": "副标题"
300
+ },
301
+ {
302
+ "name": "color",
303
+ "type": "string",
304
+ "required": false,
305
+ "help": "数值颜色(十六进制,如 #E8611C)"
306
+ },
307
+ {
308
+ "name": "card",
309
+ "type": "string",
310
+ "required": false,
311
+ "help": "要覆盖的已有卡片 id(可选)"
312
+ }
313
+ ],
314
+ "defaultFormat": "json",
315
+ "type": "js",
316
+ "modulePath": "linkai/commands.js",
317
+ "sourceFile": "linkai/commands.js"
318
+ },
319
+ {
320
+ "site": "linkai",
321
+ "name": "card-save",
322
+ "description": "保存完整的卡片配置 JSON(唯一能让配置生效的保存方式)",
323
+ "access": "write",
324
+ "strategy": "public",
325
+ "browser": false,
326
+ "args": [
327
+ {
328
+ "name": "file",
329
+ "type": "string",
330
+ "required": true,
331
+ "help": "修改后的卡片 JSON 文件路径"
332
+ }
333
+ ],
334
+ "defaultFormat": "json",
335
+ "type": "js",
336
+ "modulePath": "linkai/commands.js",
337
+ "sourceFile": "linkai/commands.js"
338
+ },
339
+ {
340
+ "site": "linkai",
341
+ "name": "card-sort",
342
+ "description": "设置卡片持久排序(\"列:asc,列:desc\"、.json 文件或 clear),并回读确认排序生效",
343
+ "access": "write",
344
+ "strategy": "public",
345
+ "browser": false,
346
+ "args": [
347
+ {
348
+ "name": "card",
349
+ "type": "string",
350
+ "required": true,
351
+ "help": "卡片的精确 id"
352
+ },
353
+ {
354
+ "name": "spec",
355
+ "type": "string",
356
+ "required": true,
357
+ "help": "\"waxis3:desc,ID:asc\" | sort.json | clear"
358
+ }
359
+ ],
360
+ "defaultFormat": "json",
361
+ "type": "js",
362
+ "modulePath": "linkai/commands.js",
363
+ "sourceFile": "linkai/commands.js"
364
+ },
365
+ {
366
+ "site": "linkai",
367
+ "name": "card-table",
368
+ "description": "按 spec JSON 新建或覆盖 AG 明细表(见 references/card.md)",
369
+ "access": "write",
370
+ "strategy": "public",
371
+ "browser": false,
372
+ "args": [
373
+ {
374
+ "name": "ds",
375
+ "type": "string",
376
+ "required": true,
377
+ "help": "数据集的精确 id"
378
+ },
379
+ {
380
+ "name": "spec",
381
+ "type": "string",
382
+ "required": true,
383
+ "help": "spec JSON 文件路径"
384
+ },
385
+ {
386
+ "name": "card",
387
+ "type": "string",
388
+ "required": false,
389
+ "help": "要覆盖的已有卡片 id(可选)"
390
+ }
391
+ ],
392
+ "defaultFormat": "json",
393
+ "type": "js",
394
+ "modulePath": "linkai/commands.js",
395
+ "sourceFile": "linkai/commands.js"
396
+ },
397
+ {
398
+ "site": "linkai",
399
+ "name": "clean",
400
+ "description": "按 zz- 前缀清理试验对象,按依赖顺序删除:报表 → 方案 → 卡片 → 数据集",
401
+ "access": "write",
402
+ "strategy": "public",
403
+ "browser": false,
404
+ "args": [
405
+ {
406
+ "name": "prefix",
407
+ "type": "string",
408
+ "required": true,
409
+ "help": "以 zz- 开头的前缀,如 zz-销售看板-"
410
+ }
411
+ ],
412
+ "defaultFormat": "json",
413
+ "type": "js",
414
+ "modulePath": "linkai/commands.js",
415
+ "sourceFile": "linkai/commands.js"
416
+ },
417
+ {
418
+ "site": "linkai",
419
+ "name": "collab-claim",
420
+ "description": "多会话协同:写共享对象前认领(全部成功或全部不认领;重复认领即续期);被别人认领时返回 COLLAB_CONFLICT",
421
+ "access": "write",
422
+ "strategy": "public",
423
+ "browser": false,
424
+ "args": [
425
+ {
426
+ "name": "board",
427
+ "type": "string",
428
+ "required": true,
429
+ "help": "任务板 id(collab-start 返回,如 b-1a2b3c4d)"
430
+ },
431
+ {
432
+ "name": "object",
433
+ "type": "string",
434
+ "required": true,
435
+ "help": "对象,逗号分隔:card:<id> ds:<id> plan:<id> knowledge:<planId> spec:<文件> report:<id> filter:<planId>"
436
+ },
437
+ {
438
+ "name": "ttl",
439
+ "type": "int",
440
+ "default": 900,
441
+ "required": false,
442
+ "help": "认领有效秒数(60-7200),到期自动释放"
443
+ },
444
+ {
445
+ "name": "note",
446
+ "type": "string",
447
+ "required": false,
448
+ "help": "在做什么"
449
+ },
450
+ {
451
+ "name": "worker",
452
+ "type": "string",
453
+ "required": false,
454
+ "help": "执行者名称(也可用全局参数 --worker);同一会话保持不变,如 主控、sql-1、card-2"
455
+ }
456
+ ],
457
+ "defaultFormat": "json",
458
+ "type": "js",
459
+ "modulePath": "linkai/commands.js",
460
+ "sourceFile": "linkai/commands.js"
461
+ },
462
+ {
463
+ "site": "linkai",
464
+ "name": "collab-close",
465
+ "description": "多会话协同:关闭任务板并释放其上全部认领,同时结束对应工作流(协调者在交付后执行)",
466
+ "access": "write",
467
+ "strategy": "public",
468
+ "browser": false,
469
+ "args": [
470
+ {
471
+ "name": "board",
472
+ "type": "string",
473
+ "required": true,
474
+ "help": "任务板 id(collab-start 返回,如 b-1a2b3c4d)"
475
+ },
476
+ {
477
+ "name": "status",
478
+ "type": "string",
479
+ "required": false,
480
+ "help": "工作流结束状态:delivered | abandoned | failed(默认 delivered)"
481
+ },
482
+ {
483
+ "name": "note",
484
+ "type": "string",
485
+ "required": false,
486
+ "help": "结果说明"
487
+ },
488
+ {
489
+ "name": "worker",
490
+ "type": "string",
491
+ "required": false,
492
+ "help": "执行者名称(也可用全局参数 --worker);同一会话保持不变,如 主控、sql-1、card-2"
493
+ }
494
+ ],
495
+ "defaultFormat": "json",
496
+ "type": "js",
497
+ "modulePath": "linkai/commands.js",
498
+ "sourceFile": "linkai/commands.js"
499
+ },
500
+ {
501
+ "site": "linkai",
502
+ "name": "collab-note",
503
+ "description": "多会话协同:共享成果或发现(已验证的 SQL 文件、建好的对象 id、口径结论、交接、阻塞),避免别人重复做",
504
+ "access": "write",
505
+ "strategy": "public",
506
+ "browser": false,
507
+ "args": [
508
+ {
509
+ "name": "board",
510
+ "type": "string",
511
+ "required": true,
512
+ "help": "任务板 id(collab-start 返回,如 b-1a2b3c4d)"
513
+ },
514
+ {
515
+ "name": "text",
516
+ "type": "string",
517
+ "required": true,
518
+ "help": "内容"
519
+ },
520
+ {
521
+ "name": "kind",
522
+ "type": "string",
523
+ "required": false,
524
+ "help": "finding | result | handoff | blocker | decision(默认 finding)"
525
+ },
526
+ {
527
+ "name": "ref",
528
+ "type": "string",
529
+ "required": false,
530
+ "help": "相关文件路径或对象 id"
531
+ },
532
+ {
533
+ "name": "worker",
534
+ "type": "string",
535
+ "required": false,
536
+ "help": "执行者名称(也可用全局参数 --worker);同一会话保持不变,如 主控、sql-1、card-2"
537
+ }
538
+ ],
539
+ "defaultFormat": "json",
540
+ "type": "js",
541
+ "modulePath": "linkai/commands.js",
542
+ "sourceFile": "linkai/commands.js"
543
+ },
544
+ {
545
+ "site": "linkai",
546
+ "name": "collab-release",
547
+ "description": "多会话协同:释放认领(不指定对象则释放自己在该任务板上的全部认领)",
548
+ "access": "write",
549
+ "strategy": "public",
550
+ "browser": false,
551
+ "args": [
552
+ {
553
+ "name": "board",
554
+ "type": "string",
555
+ "required": true,
556
+ "help": "任务板 id(collab-start 返回,如 b-1a2b3c4d)"
557
+ },
558
+ {
559
+ "name": "object",
560
+ "type": "string",
561
+ "required": false,
562
+ "help": "要释放的对象,逗号分隔"
563
+ },
564
+ {
565
+ "name": "worker",
566
+ "type": "string",
567
+ "required": false,
568
+ "help": "执行者名称(也可用全局参数 --worker);同一会话保持不变,如 主控、sql-1、card-2"
569
+ }
570
+ ],
571
+ "defaultFormat": "json",
572
+ "type": "js",
573
+ "modulePath": "linkai/commands.js",
574
+ "sourceFile": "linkai/commands.js"
575
+ },
576
+ {
577
+ "site": "linkai",
578
+ "name": "collab-start",
579
+ "description": "多会话协同:创建任务板(协调者执行一次),返回任务板 id 交给各执行者",
580
+ "access": "write",
581
+ "strategy": "public",
582
+ "browser": false,
583
+ "args": [
584
+ {
585
+ "name": "goal",
586
+ "type": "string",
587
+ "required": true,
588
+ "help": "这次协同要完成什么"
589
+ },
590
+ {
591
+ "name": "plan",
592
+ "type": "string",
593
+ "required": false,
594
+ "help": "目标方案 id(修改已有方案时)"
595
+ },
596
+ {
597
+ "name": "type",
598
+ "type": "string",
599
+ "required": false,
600
+ "help": "工作流类型:create(新建方案)| modify(修改已有方案)| import(导入/更新数据)| query(只读查询分析);默认有 --plan 为 modify,否则 create"
601
+ },
602
+ {
603
+ "name": "worker",
604
+ "type": "string",
605
+ "required": false,
606
+ "help": "执行者名称(也可用全局参数 --worker);同一会话保持不变,如 主控、sql-1、card-2"
607
+ }
608
+ ],
609
+ "defaultFormat": "json",
610
+ "type": "js",
611
+ "modulePath": "linkai/commands.js",
612
+ "sourceFile": "linkai/commands.js"
613
+ },
614
+ {
615
+ "site": "linkai",
616
+ "name": "collab-status",
617
+ "description": "多会话协同:查看任务板(任务、有效认领、最近成果);不带 --board 列出全部进行中的任务板",
618
+ "access": "read",
619
+ "strategy": "public",
620
+ "browser": false,
621
+ "args": [
622
+ {
623
+ "name": "board",
624
+ "type": "string",
625
+ "required": false,
626
+ "help": "任务板 id"
627
+ },
628
+ {
629
+ "name": "notes",
630
+ "type": "int",
631
+ "default": 30,
632
+ "required": false,
633
+ "help": "显示最近多少条成果记录"
634
+ }
635
+ ],
636
+ "defaultFormat": "json",
637
+ "type": "js",
638
+ "modulePath": "linkai/commands.js",
639
+ "sourceFile": "linkai/commands.js"
640
+ },
641
+ {
642
+ "site": "linkai",
643
+ "name": "collab-task",
644
+ "description": "多会话协同:新增任务(--title),或更新任务状态(--id --status todo|doing|done|blocked --result)",
645
+ "access": "write",
646
+ "strategy": "public",
647
+ "browser": false,
648
+ "args": [
649
+ {
650
+ "name": "board",
651
+ "type": "string",
652
+ "required": true,
653
+ "help": "任务板 id(collab-start 返回,如 b-1a2b3c4d)"
654
+ },
655
+ {
656
+ "name": "title",
657
+ "type": "string",
658
+ "required": false,
659
+ "help": "新任务标题(新增时)"
660
+ },
661
+ {
662
+ "name": "id",
663
+ "type": "int",
664
+ "required": false,
665
+ "help": "要更新的任务编号"
666
+ },
667
+ {
668
+ "name": "status",
669
+ "type": "string",
670
+ "required": false,
671
+ "help": "todo | doing | done | blocked"
672
+ },
673
+ {
674
+ "name": "result",
675
+ "type": "string",
676
+ "required": false,
677
+ "help": "结果或阻塞原因(文件路径、对象 id、结论)"
678
+ },
679
+ {
680
+ "name": "assignee",
681
+ "type": "string",
682
+ "required": false,
683
+ "help": "分配给哪个执行者"
684
+ },
685
+ {
686
+ "name": "object",
687
+ "type": "string",
688
+ "required": false,
689
+ "help": "任务涉及的共享对象,逗号分隔,如 card:<id>,ds:<id>"
690
+ },
691
+ {
692
+ "name": "worker",
693
+ "type": "string",
694
+ "required": false,
695
+ "help": "执行者名称(也可用全局参数 --worker);同一会话保持不变,如 主控、sql-1、card-2"
696
+ }
697
+ ],
698
+ "defaultFormat": "json",
699
+ "type": "js",
700
+ "modulePath": "linkai/commands.js",
701
+ "sourceFile": "linkai/commands.js"
702
+ },
703
+ {
704
+ "site": "linkai",
705
+ "name": "deliverable",
706
+ "description": "兼容命令:等同 plan-knowledge;需要 --mode 与 --file,不再输出数据集 SQL",
707
+ "access": "write",
708
+ "strategy": "public",
709
+ "browser": false,
710
+ "args": [
711
+ {
712
+ "name": "plan",
713
+ "type": "string",
714
+ "required": true,
715
+ "help": "方案的精确 id"
716
+ },
717
+ {
718
+ "name": "mode",
719
+ "type": "string",
720
+ "required": false,
721
+ "help": "create 或 update"
722
+ },
723
+ {
724
+ "name": "file",
725
+ "type": "string",
726
+ "required": false,
727
+ "help": "方案知识 YAML/JSON 文件"
728
+ }
729
+ ],
730
+ "defaultFormat": "json",
731
+ "type": "js",
732
+ "modulePath": "linkai/commands.js",
733
+ "sourceFile": "linkai/commands.js"
734
+ },
735
+ {
736
+ "site": "linkai",
737
+ "name": "ds-create",
738
+ "description": "新建 SQL 数据集(先做只读与可用表校验,并格式化 SQL);当前租户已有完全一样的数据集时拒绝,除非 --allow-duplicate",
739
+ "access": "write",
740
+ "strategy": "public",
741
+ "browser": false,
742
+ "args": [
743
+ {
744
+ "name": "name",
745
+ "type": "string",
746
+ "required": true,
747
+ "help": "数据集名称(租户内唯一;试验用 zz- 前缀)"
748
+ },
749
+ {
750
+ "name": "file",
751
+ "type": "string",
752
+ "required": true,
753
+ "help": "SQL 文件路径"
754
+ },
755
+ {
756
+ "name": "allow-duplicate",
757
+ "type": "boolean",
758
+ "default": false,
759
+ "required": false,
760
+ "help": "已有完全一样的数据集仍要新建(需说明理由,如要独立演进口径)"
761
+ }
762
+ ],
763
+ "defaultFormat": "json",
764
+ "type": "js",
765
+ "modulePath": "linkai/commands.js",
766
+ "sourceFile": "linkai/commands.js"
767
+ },
768
+ {
769
+ "site": "linkai",
770
+ "name": "ds-fields",
771
+ "description": "列出数据集字段(列名就是卡片引用的映射键)",
772
+ "access": "read",
773
+ "strategy": "public",
774
+ "browser": false,
775
+ "args": [
776
+ {
777
+ "name": "ds",
778
+ "type": "string",
779
+ "required": true,
780
+ "help": "数据集的精确 id"
781
+ }
782
+ ],
783
+ "defaultFormat": "table",
784
+ "type": "js",
785
+ "modulePath": "linkai/commands.js",
786
+ "sourceFile": "linkai/commands.js"
787
+ },
788
+ {
789
+ "site": "linkai",
790
+ "name": "ds-list",
791
+ "description": "列出当前租户的数据集",
792
+ "access": "read",
793
+ "strategy": "public",
794
+ "browser": false,
795
+ "args": [
796
+ {
797
+ "name": "search",
798
+ "type": "string",
799
+ "required": false,
800
+ "help": "按名称关键字过滤(可选)"
801
+ }
802
+ ],
803
+ "defaultFormat": "table",
804
+ "type": "js",
805
+ "modulePath": "linkai/commands.js",
806
+ "sourceFile": "linkai/commands.js"
807
+ },
808
+ {
809
+ "site": "linkai",
810
+ "name": "ds-match",
811
+ "description": "复用查重:在当前租户里找与这段 SQL 完全一样或相似的数据集(建数据集前先查,不含 zz- 试搭对象)",
812
+ "access": "read",
813
+ "strategy": "public",
814
+ "browser": false,
815
+ "args": [
816
+ {
817
+ "name": "file",
818
+ "type": "string",
819
+ "required": true,
820
+ "help": "SQL 文件路径"
821
+ },
822
+ {
823
+ "name": "top",
824
+ "type": "int",
825
+ "default": 3,
826
+ "required": false,
827
+ "help": "相似候选最多几个"
828
+ }
829
+ ],
830
+ "defaultFormat": "json",
831
+ "type": "js",
832
+ "modulePath": "linkai/commands.js",
833
+ "sourceFile": "linkai/commands.js"
834
+ },
835
+ {
836
+ "site": "linkai",
837
+ "name": "ds-refs",
838
+ "description": "列出引用该数据集的卡片",
839
+ "access": "read",
840
+ "strategy": "public",
841
+ "browser": false,
842
+ "args": [
843
+ {
844
+ "name": "ds",
845
+ "type": "string",
846
+ "required": true,
847
+ "help": "数据集的精确 id"
848
+ }
849
+ ],
850
+ "defaultFormat": "table",
851
+ "type": "js",
852
+ "modulePath": "linkai/commands.js",
853
+ "sourceFile": "linkai/commands.js"
854
+ },
855
+ {
856
+ "site": "linkai",
857
+ "name": "ds-sql",
858
+ "description": "把数据集当前保存的 SQL 读出到文件",
859
+ "access": "read",
860
+ "strategy": "public",
861
+ "browser": false,
862
+ "args": [
863
+ {
864
+ "name": "ds",
865
+ "type": "string",
866
+ "required": true,
867
+ "help": "数据集的精确 id"
868
+ },
869
+ {
870
+ "name": "output",
871
+ "type": "string",
872
+ "required": false,
873
+ "help": "输出 SQL 路径(默认 ~/.linkai/artifacts/linkai/sql/<dsId>.sql)"
874
+ }
875
+ ],
876
+ "defaultFormat": "json",
877
+ "type": "js",
878
+ "modulePath": "linkai/commands.js",
879
+ "sourceFile": "linkai/commands.js"
880
+ },
881
+ {
882
+ "site": "linkai",
883
+ "name": "ds-tables",
884
+ "description": "列出数据集 SQL 可以使用的表(视图)",
885
+ "access": "read",
886
+ "strategy": "public",
887
+ "browser": false,
888
+ "args": [
889
+ {
890
+ "name": "search",
891
+ "type": "string",
892
+ "required": false,
893
+ "help": "按表名关键字过滤(可选)"
894
+ }
895
+ ],
896
+ "defaultFormat": "table",
897
+ "type": "js",
898
+ "modulePath": "linkai/commands.js",
899
+ "sourceFile": "linkai/commands.js"
900
+ },
901
+ {
902
+ "site": "linkai",
903
+ "name": "ds-update",
904
+ "description": "原地更新数据集(id 不变,卡片映射不断)",
905
+ "access": "write",
906
+ "strategy": "public",
907
+ "browser": false,
908
+ "args": [
909
+ {
910
+ "name": "ds",
911
+ "type": "string",
912
+ "required": true,
913
+ "help": "数据集的精确 id"
914
+ },
915
+ {
916
+ "name": "name",
917
+ "type": "string",
918
+ "required": true,
919
+ "help": "数据集名称"
920
+ },
921
+ {
922
+ "name": "file",
923
+ "type": "string",
924
+ "required": true,
925
+ "help": "SQL 文件路径"
926
+ }
927
+ ],
928
+ "defaultFormat": "json",
929
+ "type": "js",
930
+ "modulePath": "linkai/commands.js",
931
+ "sourceFile": "linkai/commands.js"
932
+ },
933
+ {
934
+ "site": "linkai",
935
+ "name": "fill-write",
936
+ "description": "写自由填报数据:一条记录一个元素、字段一次带齐(默认只校验并预览,加 --execute 才写入)",
937
+ "access": "write",
938
+ "strategy": "public",
939
+ "browser": false,
940
+ "args": [
941
+ {
942
+ "name": "card",
943
+ "type": "string",
944
+ "required": true,
945
+ "help": "填报卡片的精确 id(usedIndexBlockId)"
946
+ },
947
+ {
948
+ "name": "file",
949
+ "type": "string",
950
+ "required": true,
951
+ "help": "记录 JSON 数组文件:[{\"字段名\":\"值\",…,\"_id\":\"已有记录ID(可选)\"}]"
952
+ },
953
+ {
954
+ "name": "key",
955
+ "type": "string",
956
+ "required": false,
957
+ "help": "填报块:fillfieldid(第一个块)、fillfieldid1(第二个块)…"
958
+ },
959
+ {
960
+ "name": "batch",
961
+ "type": "int",
962
+ "default": 100,
963
+ "required": false,
964
+ "help": "每次请求的记录数(1-500)"
965
+ },
966
+ {
967
+ "name": "execute",
968
+ "type": "boolean",
969
+ "default": false,
970
+ "required": false,
971
+ "help": "确认后真正写入"
972
+ }
973
+ ],
974
+ "defaultFormat": "json",
975
+ "type": "js",
976
+ "modulePath": "linkai/commands.js",
977
+ "sourceFile": "linkai/commands.js"
978
+ },
979
+ {
980
+ "site": "linkai",
981
+ "name": "flow-end",
982
+ "description": "结束工作流:delivered(已交付)| abandoned(放弃)| failed(失败);默认结束当前工作流,或用 --flow <id> 指定",
983
+ "access": "write",
984
+ "strategy": "public",
985
+ "browser": false,
986
+ "args": [
987
+ {
988
+ "name": "status",
989
+ "type": "string",
990
+ "required": true,
991
+ "help": "delivered | abandoned | failed"
992
+ },
993
+ {
994
+ "name": "plan",
995
+ "type": "string",
996
+ "required": false,
997
+ "help": "交付的方案 id"
998
+ },
999
+ {
1000
+ "name": "knowledge-version",
1001
+ "type": "string",
1002
+ "required": false,
1003
+ "help": "方案知识库版本,如 v2"
1004
+ },
1005
+ {
1006
+ "name": "note",
1007
+ "type": "string",
1008
+ "required": false,
1009
+ "help": "结果说明或失败原因"
1010
+ }
1011
+ ],
1012
+ "defaultFormat": "json",
1013
+ "type": "js",
1014
+ "modulePath": "linkai/commands.js",
1015
+ "sourceFile": "linkai/commands.js"
1016
+ },
1017
+ {
1018
+ "site": "linkai",
1019
+ "name": "flow-start",
1020
+ "description": "开始一个工作流:接到业务任务时执行一次,之后的命令自动归入它;完成后用 flow-end 结束",
1021
+ "access": "write",
1022
+ "strategy": "public",
1023
+ "browser": false,
1024
+ "args": [
1025
+ {
1026
+ "name": "goal",
1027
+ "type": "string",
1028
+ "required": true,
1029
+ "help": "这个任务要完成什么(用户原话概括)"
1030
+ },
1031
+ {
1032
+ "name": "type",
1033
+ "type": "string",
1034
+ "required": true,
1035
+ "help": "create(新建方案)| modify(修改已有方案)| import(导入/更新数据)| query(只读查询分析)"
1036
+ },
1037
+ {
1038
+ "name": "plan",
1039
+ "type": "string",
1040
+ "required": false,
1041
+ "help": "目标方案 id(修改已有方案时)"
1042
+ },
1043
+ {
1044
+ "name": "model",
1045
+ "type": "string",
1046
+ "required": false,
1047
+ "help": "你(AI)当前使用的具体模型与版本,如 \"Claude Opus 5.5\"、\"gpt-5.6\";不确定就写你所知道的名称"
1048
+ }
1049
+ ],
1050
+ "defaultFormat": "json",
1051
+ "type": "js",
1052
+ "modulePath": "linkai/commands.js",
1053
+ "sourceFile": "linkai/commands.js"
1054
+ },
1055
+ {
1056
+ "site": "linkai",
1057
+ "name": "flow-status",
1058
+ "description": "查看本机工作流:当前工作流、未完成或中断的工作流(含中断原因与下一步);--all 含已结束的",
1059
+ "access": "read",
1060
+ "strategy": "public",
1061
+ "browser": false,
1062
+ "args": [
1063
+ {
1064
+ "name": "all",
1065
+ "type": "boolean",
1066
+ "default": false,
1067
+ "required": false,
1068
+ "help": "包括已结束和自动关闭的工作流(最近 7 天)"
1069
+ }
1070
+ ],
1071
+ "defaultFormat": "json",
1072
+ "type": "js",
1073
+ "modulePath": "linkai/commands.js",
1074
+ "sourceFile": "linkai/commands.js"
1075
+ },
1076
+ {
1077
+ "site": "linkai",
1078
+ "name": "fmt",
1079
+ "description": "把 SQL 格式化为易读的多行文本",
1080
+ "access": "read",
1081
+ "strategy": "public",
1082
+ "browser": false,
1083
+ "args": [
1084
+ {
1085
+ "name": "file",
1086
+ "type": "string",
1087
+ "required": true,
1088
+ "help": "SQL 文件路径"
1089
+ }
1090
+ ],
1091
+ "defaultFormat": "plain",
1092
+ "type": "js",
1093
+ "modulePath": "linkai/commands.js",
1094
+ "sourceFile": "linkai/commands.js"
1095
+ },
1096
+ {
1097
+ "site": "linkai",
1098
+ "name": "kb",
1099
+ "description": "读取文件型 BI 搭建知识库(服务器优先、本地兜底);数据字典请使用 kb-sources / kb-search 等结构化命令",
1100
+ "access": "read",
1101
+ "strategy": "public",
1102
+ "browser": false,
1103
+ "args": [
1104
+ {
1105
+ "name": "file",
1106
+ "type": "string",
1107
+ "required": false,
1108
+ "help": "文件路径,如 knowledge/report-builder/build-spec.md 或 templates/report-spec/report.example.yaml"
1109
+ },
1110
+ {
1111
+ "name": "search",
1112
+ "type": "string",
1113
+ "required": false,
1114
+ "help": "按关键字过滤目录"
1115
+ },
1116
+ {
1117
+ "name": "library",
1118
+ "type": "string",
1119
+ "required": false,
1120
+ "help": "文件型知识库:bi-builder;data-dictionary 请使用 kb-sources 等结构化命令;另预留 integration-flow | user"
1121
+ }
1122
+ ],
1123
+ "defaultFormat": "json",
1124
+ "type": "js",
1125
+ "modulePath": "linkai/commands.js",
1126
+ "sourceFile": "linkai/commands.js"
1127
+ },
1128
+ {
1129
+ "site": "linkai",
1130
+ "name": "kb-catalog",
1131
+ "description": "分页列出指定 source 的可用视图/对象元数据",
1132
+ "access": "read",
1133
+ "strategy": "public",
1134
+ "browser": false,
1135
+ "args": [
1136
+ {
1137
+ "name": "source",
1138
+ "type": "string",
1139
+ "required": true,
1140
+ "help": "数据源 ID(来自 kb-sources,必须与后续数据集 source 一致)"
1141
+ },
1142
+ {
1143
+ "name": "search",
1144
+ "type": "string",
1145
+ "required": false,
1146
+ "help": "表名、中文名或说明关键字"
1147
+ },
1148
+ {
1149
+ "name": "page",
1150
+ "type": "string",
1151
+ "required": false,
1152
+ "help": "页码,默认 1"
1153
+ },
1154
+ {
1155
+ "name": "page-size",
1156
+ "type": "string",
1157
+ "required": false,
1158
+ "help": "每页 1~100,默认 30"
1159
+ }
1160
+ ],
1161
+ "defaultFormat": "json",
1162
+ "type": "js",
1163
+ "modulePath": "linkai/commands.js",
1164
+ "sourceFile": "linkai/commands.js"
1165
+ },
1166
+ {
1167
+ "site": "linkai",
1168
+ "name": "kb-doc",
1169
+ "description": "一致性读取一篇完整数据字典文档;自动按 nextOffset 分页,版本变化时从头重读",
1170
+ "access": "read",
1171
+ "strategy": "public",
1172
+ "browser": false,
1173
+ "args": [
1174
+ {
1175
+ "name": "source",
1176
+ "type": "string",
1177
+ "required": true,
1178
+ "help": "数据源 ID(来自 kb-sources)"
1179
+ },
1180
+ {
1181
+ "name": "doc",
1182
+ "type": "string",
1183
+ "required": true,
1184
+ "help": "文档 ID(来自 kb-docs 或 kb-search)"
1185
+ },
1186
+ {
1187
+ "name": "page-size",
1188
+ "type": "string",
1189
+ "required": false,
1190
+ "help": "单次正文字符数,1~20000,默认 20000"
1191
+ }
1192
+ ],
1193
+ "defaultFormat": "json",
1194
+ "type": "js",
1195
+ "modulePath": "linkai/commands.js",
1196
+ "sourceFile": "linkai/commands.js"
1197
+ },
1198
+ {
1199
+ "site": "linkai",
1200
+ "name": "kb-docs",
1201
+ "description": "分页列出指定 source 的业务口径、枚举、关系、数据点等知识文档",
1202
+ "access": "read",
1203
+ "strategy": "public",
1204
+ "browser": false,
1205
+ "args": [
1206
+ {
1207
+ "name": "source",
1208
+ "type": "string",
1209
+ "required": true,
1210
+ "help": "数据源 ID(来自 kb-sources)"
1211
+ },
1212
+ {
1213
+ "name": "category",
1214
+ "type": "string",
1215
+ "required": false,
1216
+ "help": "caliber | enum | relation | datapoint | other"
1217
+ },
1218
+ {
1219
+ "name": "search",
1220
+ "type": "string",
1221
+ "required": false,
1222
+ "help": "标题或正文关键字"
1223
+ },
1224
+ {
1225
+ "name": "page",
1226
+ "type": "string",
1227
+ "required": false,
1228
+ "help": "页码,默认 1"
1229
+ },
1230
+ {
1231
+ "name": "page-size",
1232
+ "type": "string",
1233
+ "required": false,
1234
+ "help": "每页 1~100,默认 30"
1235
+ }
1236
+ ],
1237
+ "defaultFormat": "json",
1238
+ "type": "js",
1239
+ "modulePath": "linkai/commands.js",
1240
+ "sourceFile": "linkai/commands.js"
1241
+ },
1242
+ {
1243
+ "site": "linkai",
1244
+ "name": "kb-object",
1245
+ "description": "读取指定 source 中一个可见对象的字段与关联关系",
1246
+ "access": "read",
1247
+ "strategy": "public",
1248
+ "browser": false,
1249
+ "args": [
1250
+ {
1251
+ "name": "source",
1252
+ "type": "string",
1253
+ "required": true,
1254
+ "help": "数据源 ID(来自 kb-sources)"
1255
+ },
1256
+ {
1257
+ "name": "db",
1258
+ "type": "string",
1259
+ "required": true,
1260
+ "help": "数据库/schema 名"
1261
+ },
1262
+ {
1263
+ "name": "object",
1264
+ "type": "string",
1265
+ "required": true,
1266
+ "help": "对象/视图名"
1267
+ }
1268
+ ],
1269
+ "defaultFormat": "json",
1270
+ "type": "js",
1271
+ "modulePath": "linkai/commands.js",
1272
+ "sourceFile": "linkai/commands.js"
1273
+ },
1274
+ {
1275
+ "site": "linkai",
1276
+ "name": "kb-search",
1277
+ "description": "按自然语言检索指定 source 的候选视图与业务知识;相关度不是正确率,使用前继续回读对象/文档核对",
1278
+ "access": "read",
1279
+ "strategy": "public",
1280
+ "browser": false,
1281
+ "args": [
1282
+ {
1283
+ "name": "source",
1284
+ "type": "string",
1285
+ "required": true,
1286
+ "help": "数据源 ID(来自 kb-sources)"
1287
+ },
1288
+ {
1289
+ "name": "question",
1290
+ "type": "string",
1291
+ "required": true,
1292
+ "help": "业务问题,最长 2000 字"
1293
+ },
1294
+ {
1295
+ "name": "top-tables",
1296
+ "type": "string",
1297
+ "required": false,
1298
+ "help": "最多返回表数,1~10,默认 5"
1299
+ },
1300
+ {
1301
+ "name": "top-docs",
1302
+ "type": "string",
1303
+ "required": false,
1304
+ "help": "最多返回文档数,1~10,默认 3"
1305
+ }
1306
+ ],
1307
+ "defaultFormat": "json",
1308
+ "type": "js",
1309
+ "modulePath": "linkai/commands.js",
1310
+ "sourceFile": "linkai/commands.js"
1311
+ },
1312
+ {
1313
+ "site": "linkai",
1314
+ "name": "kb-sources",
1315
+ "description": "列出当前租户可读的数据字典数据源,并标记当前数据集所用 source;后续命令必须显式传该 ID",
1316
+ "access": "read",
1317
+ "strategy": "public",
1318
+ "browser": false,
1319
+ "args": [],
1320
+ "defaultFormat": "table",
1321
+ "type": "js",
1322
+ "modulePath": "linkai/commands.js",
1323
+ "sourceFile": "linkai/commands.js"
1324
+ },
1325
+ {
1326
+ "site": "linkai",
1327
+ "name": "kinds",
1328
+ "description": "列出 74 种图表类型、字段建议与可用状态",
1329
+ "access": "read",
1330
+ "strategy": "public",
1331
+ "browser": false,
1332
+ "args": [],
1333
+ "defaultFormat": "table",
1334
+ "type": "js",
1335
+ "modulePath": "linkai/commands.js",
1336
+ "sourceFile": "linkai/commands.js"
1337
+ },
1338
+ {
1339
+ "site": "linkai",
1340
+ "name": "login",
1341
+ "description": "首次打开领谋 OAuth 授权页;同账号切换租户复用授权,切换账号需显式 --switch-account",
1342
+ "access": "write",
1343
+ "strategy": "public",
1344
+ "browser": false,
1345
+ "args": [
1346
+ {
1347
+ "name": "tenant",
1348
+ "type": "string",
1349
+ "required": false,
1350
+ "help": "目标租户(名称、编码或 id);已有授权时无需再打开浏览器"
1351
+ },
1352
+ {
1353
+ "name": "timeout",
1354
+ "type": "int",
1355
+ "default": 300,
1356
+ "required": false,
1357
+ "help": "等待浏览器完成 OAuth 授权的秒数"
1358
+ },
1359
+ {
1360
+ "name": "no-browser",
1361
+ "type": "boolean",
1362
+ "default": false,
1363
+ "required": false,
1364
+ "help": "只打印授权地址,不自动打开系统浏览器"
1365
+ },
1366
+ {
1367
+ "name": "switch-account",
1368
+ "type": "boolean",
1369
+ "default": false,
1370
+ "required": false,
1371
+ "help": "用户确认切换领谋账号后,重新打开 OAuth 授权页"
1372
+ }
1373
+ ],
1374
+ "defaultFormat": "json",
1375
+ "type": "js",
1376
+ "modulePath": "linkai/commands.js",
1377
+ "sourceFile": "linkai/commands.js"
1378
+ },
1379
+ {
1380
+ "site": "linkai",
1381
+ "name": "logout",
1382
+ "description": "退出登录:撤销 OAuth 会话并删除本机登录信息",
1383
+ "access": "write",
1384
+ "strategy": "public",
1385
+ "browser": false,
1386
+ "args": [],
1387
+ "defaultFormat": "json",
1388
+ "type": "js",
1389
+ "modulePath": "linkai/commands.js",
1390
+ "sourceFile": "linkai/commands.js"
1391
+ },
1392
+ {
1393
+ "site": "linkai",
1394
+ "name": "plan-add",
1395
+ "description": "把卡片放到方案的指定位置;返回 pageCardId(绑定筛选器时使用)",
1396
+ "access": "write",
1397
+ "strategy": "public",
1398
+ "browser": false,
1399
+ "args": [
1400
+ {
1401
+ "name": "plan",
1402
+ "type": "string",
1403
+ "required": true,
1404
+ "help": "方案的精确 id"
1405
+ },
1406
+ {
1407
+ "name": "card",
1408
+ "type": "string",
1409
+ "required": true,
1410
+ "help": "卡片的精确 id"
1411
+ },
1412
+ {
1413
+ "name": "x",
1414
+ "type": "int",
1415
+ "default": 0,
1416
+ "required": false,
1417
+ "help": "横向位置(格,0–23)"
1418
+ },
1419
+ {
1420
+ "name": "y",
1421
+ "type": "int",
1422
+ "default": 0,
1423
+ "required": false,
1424
+ "help": "纵向位置(格)"
1425
+ },
1426
+ {
1427
+ "name": "w",
1428
+ "type": "int",
1429
+ "default": 24,
1430
+ "required": false,
1431
+ "help": "宽度(格,满宽 24)"
1432
+ },
1433
+ {
1434
+ "name": "h",
1435
+ "type": "int",
1436
+ "default": 20,
1437
+ "required": false,
1438
+ "help": "高度(格)"
1439
+ }
1440
+ ],
1441
+ "defaultFormat": "json",
1442
+ "type": "js",
1443
+ "modulePath": "linkai/commands.js",
1444
+ "sourceFile": "linkai/commands.js"
1445
+ },
1446
+ {
1447
+ "site": "linkai",
1448
+ "name": "plan-create",
1449
+ "description": "新建空的分析方案(看板)",
1450
+ "access": "write",
1451
+ "strategy": "public",
1452
+ "browser": false,
1453
+ "args": [
1454
+ {
1455
+ "name": "name",
1456
+ "type": "string",
1457
+ "required": true,
1458
+ "help": "方案名称"
1459
+ }
1460
+ ],
1461
+ "defaultFormat": "json",
1462
+ "type": "js",
1463
+ "modulePath": "linkai/commands.js",
1464
+ "sourceFile": "linkai/commands.js"
1465
+ },
1466
+ {
1467
+ "site": "linkai",
1468
+ "name": "plan-filter",
1469
+ "description": "保存方案筛选器为租户模板(全量覆盖),并重置自己的个人副本",
1470
+ "access": "write",
1471
+ "strategy": "public",
1472
+ "browser": false,
1473
+ "args": [
1474
+ {
1475
+ "name": "plan",
1476
+ "type": "string",
1477
+ "required": true,
1478
+ "help": "方案的精确 id"
1479
+ },
1480
+ {
1481
+ "name": "file",
1482
+ "type": "string",
1483
+ "required": true,
1484
+ "help": "筛选器请求体 JSON 文件路径"
1485
+ }
1486
+ ],
1487
+ "defaultFormat": "json",
1488
+ "type": "js",
1489
+ "modulePath": "linkai/commands.js",
1490
+ "sourceFile": "linkai/commands.js"
1491
+ },
1492
+ {
1493
+ "site": "linkai",
1494
+ "name": "plan-get",
1495
+ "description": "把方案详情保存为 JSON 文件(含租户模板筛选器)",
1496
+ "access": "read",
1497
+ "strategy": "public",
1498
+ "browser": false,
1499
+ "args": [
1500
+ {
1501
+ "name": "plan",
1502
+ "type": "string",
1503
+ "required": true,
1504
+ "help": "方案的精确 id"
1505
+ },
1506
+ {
1507
+ "name": "output",
1508
+ "type": "string",
1509
+ "required": false,
1510
+ "help": "输出 JSON 路径(默认 ~/.linkai/artifacts/linkai/plans/<planId>.json)"
1511
+ },
1512
+ {
1513
+ "name": "personal",
1514
+ "type": "boolean",
1515
+ "default": false,
1516
+ "required": false,
1517
+ "help": "读取自己的个人筛选器副本"
1518
+ }
1519
+ ],
1520
+ "defaultFormat": "json",
1521
+ "type": "js",
1522
+ "modulePath": "linkai/commands.js",
1523
+ "sourceFile": "linkai/commands.js"
1524
+ },
1525
+ {
1526
+ "site": "linkai",
1527
+ "name": "plan-knowledge",
1528
+ "description": "生成、版本化并保存完整方案知识库;服务器不可用时内部留存本地。最终返回方案地址和完整知识内容,不返回 SQL 或上传信息",
1529
+ "access": "write",
1530
+ "strategy": "public",
1531
+ "browser": false,
1532
+ "args": [
1533
+ {
1534
+ "name": "plan",
1535
+ "type": "string",
1536
+ "required": true,
1537
+ "help": "方案的精确 id"
1538
+ },
1539
+ {
1540
+ "name": "mode",
1541
+ "type": "string",
1542
+ "required": false,
1543
+ "help": "create(新方案)或 update(修改原方案)"
1544
+ },
1545
+ {
1546
+ "name": "file",
1547
+ "type": "string",
1548
+ "required": false,
1549
+ "help": "AI 编写的方案知识 YAML/JSON 文件"
1550
+ }
1551
+ ],
1552
+ "defaultFormat": "json",
1553
+ "type": "js",
1554
+ "modulePath": "linkai/commands.js",
1555
+ "sourceFile": "linkai/commands.js"
1556
+ },
1557
+ {
1558
+ "site": "linkai",
1559
+ "name": "plan-knowledge-get",
1560
+ "description": "读取方案当前知识库;修改原方案前先读。服务器不可用时读取本地待同步版本,不展示存储信息",
1561
+ "access": "read",
1562
+ "strategy": "public",
1563
+ "browser": false,
1564
+ "args": [
1565
+ {
1566
+ "name": "plan",
1567
+ "type": "string",
1568
+ "required": true,
1569
+ "help": "方案的精确 id"
1570
+ }
1571
+ ],
1572
+ "defaultFormat": "json",
1573
+ "type": "js",
1574
+ "modulePath": "linkai/commands.js",
1575
+ "sourceFile": "linkai/commands.js"
1576
+ },
1577
+ {
1578
+ "site": "linkai",
1579
+ "name": "plan-list",
1580
+ "description": "列出分析方案(看板)",
1581
+ "access": "read",
1582
+ "strategy": "public",
1583
+ "browser": false,
1584
+ "args": [
1585
+ {
1586
+ "name": "search",
1587
+ "type": "string",
1588
+ "required": false,
1589
+ "help": "按名称关键字过滤(可选)"
1590
+ }
1591
+ ],
1592
+ "defaultFormat": "table",
1593
+ "type": "js",
1594
+ "modulePath": "linkai/commands.js",
1595
+ "sourceFile": "linkai/commands.js"
1596
+ },
1597
+ {
1598
+ "site": "linkai",
1599
+ "name": "query",
1600
+ "description": "按页面方式查询卡片数据;返回状态码、报错信息、行数和实际执行的 SQL",
1601
+ "access": "read",
1602
+ "strategy": "public",
1603
+ "browser": false,
1604
+ "args": [
1605
+ {
1606
+ "name": "card",
1607
+ "type": "string",
1608
+ "required": true,
1609
+ "help": "卡片的精确 id"
1610
+ },
1611
+ {
1612
+ "name": "page-size",
1613
+ "type": "int",
1614
+ "default": 20,
1615
+ "required": false,
1616
+ "help": "取数行数"
1617
+ },
1618
+ {
1619
+ "name": "filters",
1620
+ "type": "string",
1621
+ "required": false,
1622
+ "help": "筛选条件 JSON 文件路径"
1623
+ },
1624
+ {
1625
+ "name": "output",
1626
+ "type": "string",
1627
+ "required": false,
1628
+ "help": "数据行保存路径(不在屏幕上输出数据)"
1629
+ }
1630
+ ],
1631
+ "defaultFormat": "json",
1632
+ "type": "js",
1633
+ "modulePath": "linkai/commands.js",
1634
+ "sourceFile": "linkai/commands.js"
1635
+ },
1636
+ {
1637
+ "site": "linkai",
1638
+ "name": "remove",
1639
+ "description": "按 folderId 删除数据集/卡片/方案/报表(id 来自各 *-list 命令)。需要用户明确授权",
1640
+ "access": "write",
1641
+ "strategy": "public",
1642
+ "browser": false,
1643
+ "args": [
1644
+ {
1645
+ "name": "folder",
1646
+ "type": "string",
1647
+ "required": true,
1648
+ "help": "精确的 folderId,多个用逗号分隔"
1649
+ }
1650
+ ],
1651
+ "defaultFormat": "json",
1652
+ "type": "js",
1653
+ "modulePath": "linkai/commands.js",
1654
+ "sourceFile": "linkai/commands.js"
1655
+ },
1656
+ {
1657
+ "site": "linkai",
1658
+ "name": "report-card",
1659
+ "description": "查询卡片对应报表的 userPageCardId(重置报表筛选器时使用)",
1660
+ "access": "read",
1661
+ "strategy": "public",
1662
+ "browser": false,
1663
+ "args": [
1664
+ {
1665
+ "name": "card",
1666
+ "type": "string",
1667
+ "required": true,
1668
+ "help": "卡片的精确 id"
1669
+ }
1670
+ ],
1671
+ "defaultFormat": "json",
1672
+ "type": "js",
1673
+ "modulePath": "linkai/commands.js",
1674
+ "sourceFile": "linkai/commands.js"
1675
+ },
1676
+ {
1677
+ "site": "linkai",
1678
+ "name": "report-list",
1679
+ "description": "列出数据报表(每个报表对应一张卡片)",
1680
+ "access": "read",
1681
+ "strategy": "public",
1682
+ "browser": false,
1683
+ "args": [
1684
+ {
1685
+ "name": "search",
1686
+ "type": "string",
1687
+ "required": false,
1688
+ "help": "按名称关键字过滤(可选)"
1689
+ }
1690
+ ],
1691
+ "defaultFormat": "table",
1692
+ "type": "js",
1693
+ "modulePath": "linkai/commands.js",
1694
+ "sourceFile": "linkai/commands.js"
1695
+ },
1696
+ {
1697
+ "site": "linkai",
1698
+ "name": "report-publish",
1699
+ "description": "把卡片发布为数据报表",
1700
+ "access": "write",
1701
+ "strategy": "public",
1702
+ "browser": false,
1703
+ "args": [
1704
+ {
1705
+ "name": "card",
1706
+ "type": "string",
1707
+ "required": true,
1708
+ "help": "卡片的精确 id"
1709
+ },
1710
+ {
1711
+ "name": "name",
1712
+ "type": "string",
1713
+ "required": true,
1714
+ "help": "报表名称"
1715
+ }
1716
+ ],
1717
+ "defaultFormat": "json",
1718
+ "type": "js",
1719
+ "modulePath": "linkai/commands.js",
1720
+ "sourceFile": "linkai/commands.js"
1721
+ },
1722
+ {
1723
+ "site": "linkai",
1724
+ "name": "reset-filter",
1725
+ "description": "丢弃自己的个人筛选器副本,按模板重建(方案或报表卡片)",
1726
+ "access": "write",
1727
+ "strategy": "public",
1728
+ "browser": false,
1729
+ "args": [
1730
+ {
1731
+ "name": "plan",
1732
+ "type": "string",
1733
+ "required": false,
1734
+ "help": "方案 id(方案筛选器)"
1735
+ },
1736
+ {
1737
+ "name": "page-card",
1738
+ "type": "string",
1739
+ "required": false,
1740
+ "help": "报表 userPageCardId 或方案 pageCardId(卡片筛选器)"
1741
+ }
1742
+ ],
1743
+ "defaultFormat": "json",
1744
+ "type": "js",
1745
+ "modulePath": "linkai/commands.js",
1746
+ "sourceFile": "linkai/commands.js"
1747
+ },
1748
+ {
1749
+ "site": "linkai",
1750
+ "name": "shot",
1751
+ "description": "在浏览器中打开报表/方案页面并截图(需要 Chrome 与 LinkAI 扩展)",
1752
+ "access": "write",
1753
+ "domain": "bi.linkmore.com",
1754
+ "strategy": "ui",
1755
+ "browser": true,
1756
+ "args": [
1757
+ {
1758
+ "name": "url",
1759
+ "type": "string",
1760
+ "required": true,
1761
+ "help": "页面地址,如 https://bi.linkmore.com/view/plan?plan=<planId>"
1762
+ },
1763
+ {
1764
+ "name": "output",
1765
+ "type": "string",
1766
+ "required": false,
1767
+ "help": "截图保存路径(默认 ~/.linkai/artifacts/linkai/shots/<时间>.png)"
1768
+ },
1769
+ {
1770
+ "name": "wait",
1771
+ "type": "int",
1772
+ "default": 12,
1773
+ "required": false,
1774
+ "help": "等待页面渲染的秒数"
1775
+ }
1776
+ ],
1777
+ "defaultFormat": "json",
1778
+ "type": "js",
1779
+ "modulePath": "linkai/commands.js",
1780
+ "sourceFile": "linkai/commands.js",
1781
+ "navigateBefore": false,
1782
+ "siteSession": "persistent"
1783
+ },
1784
+ {
1785
+ "site": "linkai",
1786
+ "name": "sql-check",
1787
+ "description": "校验数据集 SQL(只读、可用表)并列出字段;多个文件用逗号分隔一次校验(省去多次启动)",
1788
+ "access": "read",
1789
+ "strategy": "public",
1790
+ "browser": false,
1791
+ "args": [
1792
+ {
1793
+ "name": "file",
1794
+ "type": "string",
1795
+ "required": true,
1796
+ "help": "SQL 文件路径;多个用逗号分隔,如 sql/a.sql,sql/b.sql"
1797
+ }
1798
+ ],
1799
+ "defaultFormat": "table",
1800
+ "type": "js",
1801
+ "modulePath": "linkai/commands.js",
1802
+ "sourceFile": "linkai/commands.js"
1803
+ },
1804
+ {
1805
+ "site": "linkai",
1806
+ "name": "status",
1807
+ "description": "查看登录状态、当前租户、是否自动续登、数据源与可用表数量",
1808
+ "access": "read",
1809
+ "strategy": "public",
1810
+ "browser": false,
1811
+ "args": [],
1812
+ "defaultFormat": "json",
1813
+ "type": "js",
1814
+ "modulePath": "linkai/commands.js",
1815
+ "sourceFile": "linkai/commands.js"
1816
+ },
1817
+ {
1818
+ "site": "linkai",
1819
+ "name": "template",
1820
+ "description": "复制报表 spec 与示例文件;SQL 示例必须由 AI 按用户需求、租户数据字典和确认口径重写,CLI 不生成业务 SQL",
1821
+ "access": "write",
1822
+ "strategy": "public",
1823
+ "browser": false,
1824
+ "args": [
1825
+ {
1826
+ "name": "output",
1827
+ "type": "string",
1828
+ "required": false,
1829
+ "help": "目标目录(默认 ./linkai-report),需不存在或为空"
1830
+ }
1831
+ ],
1832
+ "defaultFormat": "json",
1833
+ "type": "js",
1834
+ "modulePath": "linkai/commands.js",
1835
+ "sourceFile": "linkai/commands.js"
1836
+ },
1837
+ {
1838
+ "site": "linkai",
1839
+ "name": "tenants",
1840
+ "description": "查看可用租户、当前租户及下一步;用户完成 OAuth 授权后执行",
1841
+ "access": "read",
1842
+ "strategy": "public",
1843
+ "browser": false,
1844
+ "args": [],
1845
+ "defaultFormat": "json",
1846
+ "type": "js",
1847
+ "modulePath": "linkai/commands.js",
1848
+ "sourceFile": "linkai/commands.js"
1849
+ }
1850
+ ]