@thinkingai/ae-cli 6.1.25 → 6.1.26

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 (121) hide show
  1. package/README.md +28 -9
  2. package/README.zh.md +25 -9
  3. package/bin/ae-cli.js +6 -1
  4. package/cli-installation-guide.md +91 -0
  5. package/dist/{auth-LHM7NQPR.js → auth-YHMC3GDH.js} +6 -8
  6. package/dist/automation-NWWVLWG2.js +459 -0
  7. package/dist/{capability-SJI5KOCK.js → capability-3QLLIVFB.js} +6 -6
  8. package/dist/chunk-4655PUNX.js +43 -0
  9. package/dist/{chunk-KS4DE3MX.js → chunk-5XJYLEVC.js} +4 -4
  10. package/dist/{chunk-N4BLPJC7.js → chunk-7QXISROD.js} +1 -1
  11. package/dist/{chunk-7WZACOAI.js → chunk-AP7YP2NX.js} +2 -2
  12. package/dist/{chunk-SO5LKIWP.js → chunk-CT7QDJS6.js} +2 -2
  13. package/dist/chunk-D6ACFILC.js +56 -0
  14. package/dist/{chunk-QYXDJOLA.js → chunk-EOYSKMXN.js} +19 -11
  15. package/dist/{chunk-5XRQ3CZR.js → chunk-FMNNGNYO.js} +43 -8
  16. package/dist/{chunk-DU72X2IO.js → chunk-GIK6EDUG.js} +22 -10
  17. package/dist/chunk-HVHR4SCP.js +133 -0
  18. package/dist/{chunk-2FJM4HRV.js → chunk-KAEHZZH4.js} +3 -3
  19. package/dist/{chunk-BW7JUDEI.js → chunk-KFNMQTZI.js} +514 -213
  20. package/dist/{chunk-KJDOTPYU.js → chunk-PLE722AJ.js} +28 -11
  21. package/dist/chunk-RK6GLDGI.js +27 -0
  22. package/dist/{chunk-GK7WDY7E.js → chunk-S6M42KND.js} +1 -1
  23. package/dist/{chunk-IG3DYEIR.js → chunk-UQ77JXYH.js} +4 -3
  24. package/dist/{chunk-YVGXGTD6.js → chunk-WNGFSIOB.js} +7 -1
  25. package/dist/{chunk-XKIW3QMF.js → chunk-XCHAYMSF.js} +3 -3
  26. package/dist/{community-report-client-6VJDDMJJ.js → community-report-client-PEERQCX2.js} +1 -1
  27. package/dist/{config-XQWOPDHN.js → config-AHPMEW5A.js} +4 -4
  28. package/dist/context-YAE3QXP3.js +136 -0
  29. package/dist/{data-integration-XBTCGXQT.js → data-integration-HESZET7E.js} +6 -6
  30. package/dist/index.js +123 -46
  31. package/dist/{local-data-upload-client-3P7NIVQ4.js → local-data-upload-client-TWMHFLUA.js} +1 -1
  32. package/dist/memory-62BJOULV.js +580 -0
  33. package/dist/{metadata-JRYKNUS5.js → metadata-C7CEDHOJ.js} +7 -7
  34. package/dist/{model-ZS7HVGKN.js → model-SBV2JFJI.js} +9 -5
  35. package/dist/{personal-semantic-preference-IDE2GE5T.js → personal-semantic-preference-QECDPHND.js} +117 -11
  36. package/dist/{project-semantic-36KOCYN7.js → project-semantic-Z4QAMBWF.js} +6 -6
  37. package/dist/{sync-EQLSTUS7.js → sync-SU33KYX7.js} +12 -8
  38. package/dist/{te-agent-Z3HCTKR7.js → te-agent-F5QBZSQA.js} +90 -454
  39. package/dist/{te-analysis-5ZZ6YHVH.js → te-analysis-2ECAAIFK.js} +297 -20
  40. package/dist/{te-community-Z7JACGF3.js → te-community-PFLDLPP4.js} +3 -3
  41. package/dist/{te-dataops-F7GQOIS6.js → te-dataops-FOQSRIAZ.js} +5 -5
  42. package/dist/{te-engage-RNRMYDO3.js → te-engage-QKUGIWSR.js} +6 -6
  43. package/dist/{te-experiment-BTAC2UNK.js → te-experiment-26PXR2UO.js} +6 -6
  44. package/dist/{te-kb-QJLJEX5K.js → te-kb-MHDOST62.js} +494 -214
  45. package/dist/{te-system-IXC43QHZ.js → te-system-J2FQF5ER.js} +6 -6
  46. package/dist/{te-team-BIZIKIHZ.js → te-team-5UOZPTU3.js} +6 -6
  47. package/dist/things-VPPXXLHB.js +1091 -0
  48. package/dist/{update-W2SGQNKT.js → update-EEUTEI6R.js} +59 -51
  49. package/dist/workspace-O3EEIYQM.js +554 -0
  50. package/package.json +21 -9
  51. package/skills/ae-agent/SKILL.md +89 -139
  52. package/skills/ae-agent/references/add-model.md +1 -1
  53. package/skills/ae-agent/references/create-agent.md +1 -1
  54. package/skills/ae-agent/references/find-archived-conversations.md +12 -5
  55. package/skills/ae-agent/references/get-agent.md +1 -1
  56. package/skills/ae-agent/references/list-agents.md +2 -2
  57. package/skills/ae-agent/references/list-models.md +2 -2
  58. package/skills/ae-agent/references/restore-conversation.md +3 -1
  59. package/skills/ae-analysis/SKILL.md +15 -6
  60. package/skills/ae-analysis/references/ai_models/funnel.md +5 -3
  61. package/skills/ae-analysis/references/ai_models.md +27 -0
  62. package/skills/ae-analysis/references/command_index.md +12 -4
  63. package/skills/ae-analysis/references/dashboard_move.md +21 -0
  64. package/skills/ae-analysis/references/dashboard_report_add.md +2 -0
  65. package/skills/ae-analysis/references/dashboard_report_get.md +19 -0
  66. package/skills/ae-analysis/references/dashboard_report_update.md +27 -0
  67. package/skills/ae-analysis/references/dashboard_update.md +1 -1
  68. package/skills/ae-analysis/references/event_report_presentation.md +76 -0
  69. package/skills/ae-analysis/references/feedback_submit.md +37 -0
  70. package/skills/ae-analysis/references/metadata_resolution.md +15 -0
  71. package/skills/ae-analysis/references/personal_semantic_preference_review.md +9 -0
  72. package/skills/ae-analysis/references/personal_semantic_preference_review_list.md +7 -0
  73. package/skills/ae-analysis/references/personal_semantic_preference_submit.md +7 -0
  74. package/skills/ae-analysis/references/project_semantic_knowledge_wiki.md +68 -27
  75. package/skills/ae-analysis/references/project_semantic_knowledge_wiki_plan_schema.md +40 -1
  76. package/skills/ae-analysis/references/report_create.md +13 -3
  77. package/skills/ae-analysis/references/report_get.md +5 -1
  78. package/skills/ae-analysis/references/report_update.md +15 -4
  79. package/skills/ae-analysis/references/system_query_monitor_overview.md +2 -0
  80. package/skills/ae-analysis/references/system_query_task_cancel.md +2 -0
  81. package/skills/ae-analysis/references/system_query_task_export.md +6 -2
  82. package/skills/ae-analysis/references/system_query_task_get.md +2 -0
  83. package/skills/ae-analysis/references/system_query_task_list.md +7 -3
  84. package/skills/ae-analysis/references/system_query_task_options.md +2 -2
  85. package/skills/ae-analysis/references/system_query_task_realtime_list.md +15 -0
  86. package/skills/ae-analysis/references/user_tag_models.md +2 -0
  87. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-empty-skeleton.mjs +105 -0
  88. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-project-semantic-wiki.mjs +337 -22
  89. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/company-kb.mjs +21 -8
  90. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-rules.md +24 -11
  91. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-schema.md +66 -0
  92. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/generate-build-ir.mjs +1 -0
  93. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/package-wiki-source-zip.mjs +109 -40
  94. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/plan-kb-source-sync.mjs +1 -1
  95. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/prepare-compile-schema.mjs +64 -0
  96. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/refresh-state-parts.mjs +91 -0
  97. package/skills/ae-automation/SKILL.md +16 -0
  98. package/skills/ae-automation/references/cli.md +53 -0
  99. package/skills/ae-automation/references/command_index.md +17 -0
  100. package/skills/ae-capability/SKILL.md +15 -6
  101. package/skills/ae-current-context/SKILL.md +3 -2
  102. package/skills/ae-kb/SKILL.md +62 -12
  103. package/skills/ae-kb/references/analysis-workflow.md +73 -36
  104. package/skills/ae-kb/references/query-workflow.md +67 -33
  105. package/skills/ae-kb/references/schema-import.md +5 -3
  106. package/skills/ae-kb/references/source-mutations.md +6 -4
  107. package/skills/ae-kb/references/text-sources.md +53 -0
  108. package/skills/ae-kb-discovery/SKILL.md +1 -1
  109. package/skills/ae-team/SKILL.md +23 -17
  110. package/skills/ae-things/SKILL.md +85 -0
  111. package/skills/ae-things/references/cli.md +103 -0
  112. package/skills/ae-things-progress/SKILL.md +43 -0
  113. package/skills/ae-things-review/SKILL.md +42 -0
  114. package/skills/ae-workspace/SKILL.md +43 -0
  115. package/skills/ae-workspace/references/commands.md +51 -0
  116. package/dist/chunk-E2JKXMVO.js +0 -29
  117. package/dist/context-M3HDGEIR.js +0 -46
  118. package/dist/memory-6APEB2JB.js +0 -892
  119. package/skills/ae-agent/references/create-automation.md +0 -125
  120. package/skills/ae-agent/references/list-automations.md +0 -56
  121. package/skills/ae-agent/references/update-automation.md +0 -107
@@ -0,0 +1,15 @@
1
+ # system query-task realtime-list
2
+
3
+ Use for a one-time snapshot of the Query Monitor **Realtime Query** tab. The existing `query-task list` command is for historical **Query Logs** and requires a fixed start/end range. Do not substitute one for the other.
4
+
5
+ ```bash
6
+ ae-cli system query-task realtime-list --company-id <company_id> --project-ids '[123]' --cluster-names '["cluster-a"]' --duration-minutes 30 --limit 100
7
+ ```
8
+
9
+ Capability ID: `system.query_task.realtime_list`. Run `ae-cli system query-task options --company-id <company_id>` first if IDs, status codes, or cluster names are unknown. Discovery does not grant access; a project or workspace outside the company is rejected during execution.
10
+
11
+ The global system-project ID `-1` cannot be selected as a company-scoped project. System tasks tied to a company workspace remain visible through that workspace where applicable.
12
+
13
+ Provide at least one non-empty `--project-ids` or `--space-codes` JSON array, and a non-empty `--cluster-names` JSON array. `--duration-minutes` defaults to 30 (range 1–30). Optional `--status-codes` filters task states. `--limit` defaults to 100 (maximum 200). This command does not poll or cancel tasks.
14
+
15
+ The response contains `items`, `limit`, `has_more`, and `snapshot_at`. `has_more` means the bounded snapshot has additional matching rows, not a full historical count. Task rows omit credentials, user identity tokens, internal SQL gateway selection, and SQL text. To inspect one task, use `query-task get`; cancel remains a separate high-risk operation requiring confirmation.
@@ -62,6 +62,8 @@ From a fixed date through today:
62
62
 
63
63
  ## SQL tag
64
64
 
65
+ Return one row per distinct analysis-subject ID, with the tag value in the second column; a list tag requires a native SQL `ARRAY(varchar)` value, not a JSON string or repeated scalar rows. The server infers the tag type from that column, so do not add `selectType`; aggregate repeated subjects in the SQL itself, for example with `array_agg(DISTINCT CAST(value AS varchar))` and `GROUP BY` the subject ID.
66
+
65
67
  ```json
66
68
  {"type":"sql","sql":"SELECT \"#user_id\", 'payer' AS tag_value FROM hive.ta.v_event_1 WHERE ${PartDate:partdate} AND \"$part_event\"='pay'","params":[{"name":"partdate","type":"part_date","recent_day":"1-7"}]}
67
69
  ```
@@ -0,0 +1,105 @@
1
+ #!/usr/bin/env node
2
+ import { createHash } from 'node:crypto';
3
+ import { execFileSync } from 'node:child_process';
4
+ import fs from 'node:fs';
5
+ import path from 'node:path';
6
+ import { normalizeSourceForHash } from './precompiled-source.mjs';
7
+
8
+ const args = Object.fromEntries(process.argv.slice(2).reduce((pairs, part, index, all) => {
9
+ if (part.startsWith('--') && all[index + 1] && !all[index + 1].startsWith('--')) {
10
+ pairs.push([part.slice(2), all[index + 1]]);
11
+ }
12
+ return pairs;
13
+ }, []));
14
+ const packageRoot = path.resolve(required('asset-package'));
15
+ const outputRoot = path.resolve(required('output'));
16
+ const descriptor = readJson(path.join(packageRoot, '.asset-package.json'));
17
+ const manifest = readJson(path.join(packageRoot, 'manifest.json'));
18
+ const projectId = Number(descriptor.project_id ?? manifest.project_id);
19
+ const projectName = String(args['project-name'] || descriptor.project_name || manifest.project_name || '')
20
+ .replace(/\s+/g, ' ').trim();
21
+ const snapshotHash = String(descriptor.snapshot_hash ?? manifest.snapshot_hash ?? '');
22
+ const scope = String(descriptor.asset_scope ?? manifest.asset_scope ?? '');
23
+ const policy = descriptor.filter_policy ?? manifest.filter_policy ?? {};
24
+ if (String(descriptor.schema_version ?? manifest.schema_version) !== '3.0'
25
+ || descriptor.truncated === true || manifest.truncated === true
26
+ || scope !== 'governed' || policy.authenticated_entry_assets_only !== true
27
+ || policy.dependency_closure !== true || !Number.isSafeInteger(projectId) || projectId < 1
28
+ || !projectName || !/^[0-9a-f]{64}$/i.test(snapshotHash)) {
29
+ throw new Error('A complete governed schema 3.0 package with valid project identity is required.');
30
+ }
31
+ for (const name of ['dashboard-catalog', 'report-catalog', 'metric-catalog']) {
32
+ if (readJsonl(path.join(packageRoot, 'indexes', `${name}.jsonl`)).length) {
33
+ throw new Error(`The ${name} is not empty; use the normal semantic Wiki builder.`);
34
+ }
35
+ }
36
+ if (readJsonl(path.join(packageRoot, 'sources', 'adopted-personal-semantics.jsonl')).length) {
37
+ throw new Error('Adopted personal semantics are present; the empty skeleton is not applicable.');
38
+ }
39
+ if (fs.existsSync(outputRoot)) throw new Error('Output already exists.');
40
+ const flatRoot = path.join(outputRoot, 'flat');
41
+ fs.mkdirSync(flatRoot, { recursive: true });
42
+ const namespace = `pskb-p${projectId}`;
43
+ const facts = [
44
+ ['index', 'index', 'index.md', `# ${projectName} project semantic knowledge base\n\n- Project overview: project identity and current evidence boundary.\n- Shared project knowledge: no verified shared facts yet.\n- Business domains: none established from governed sources yet.\n- Event and asset catalog: no certified entry assets yet.\n- Governance and provenance: source scope and update policy.\n\nThis is an empty knowledge skeleton. It does not establish business facts or authorize use of uncertified assets.\n`],
45
+ ['wiki-project-overview', 'wiki-page', 'wiki/project-overview.md', `# Project overview\n\nProject: ${projectName} (ID ${projectId}). Business positioning, audience, objects, relationships, and decision paths are not established by the current governed sources. Add verified project material before using this knowledge base for business conclusions.\n`],
46
+ ['common-index', 'common', 'wiki/common/index.md', '# Shared project knowledge\n\nNo verified project-wide knowledge is available yet. Human-authored material may be added under the project and business source directories with provenance and scope.\n'],
47
+ ['domain-index', 'domain', 'wiki/domains/index.md', '# Business domains\n\nNo business domain is established by the current governed sources. Do not infer domains from project names or unverified assets.\n'],
48
+ ['asset-index-index', 'asset-index', 'wiki/asset-index/index.md', '# Event and asset catalog\n\nNo certified entry asset is available in this governed snapshot. Do not switch to all visible assets without an explicit user request.\n'],
49
+ ['governance-index', 'governance', 'wiki/governance/index.md', `# Governance and provenance\n\nProject ID: ${projectId}. Source scope: governed. Certified entry assets: 0. Adopted personal semantics: 0. Business facts remain unknown until verified sources are added. A later refresh must replace this empty-source state when governed evidence becomes available and preserve unrelated human sources.\n`],
50
+ ];
51
+ const refreshState = {
52
+ schema_version: '1.0',
53
+ empty_skeleton: true,
54
+ semantic_project_id: projectId,
55
+ source_snapshot_hash: snapshotHash,
56
+ };
57
+ facts.push(['refresh-state', 'refresh-state', 'refresh-state.md',
58
+ `# Project semantic refresh state\n\n<!-- pskb_refresh_state_base64\n${Buffer.from(JSON.stringify(refreshState)).toString('base64url')}\n-->\n`]);
59
+ const sources = facts.map(([stem, sourceKind, sourcePath, content]) => {
60
+ const file = `${namespace}-${stem}.md`;
61
+ fs.writeFileSync(path.join(flatRoot, file), content);
62
+ return {
63
+ display_name: file, file, namespace, snapshot_hash: snapshotHash,
64
+ source_kind: sourceKind, asset_type: null, asset_key: null,
65
+ title: content.split('\n')[0].replace(/^# /, ''), source_path: sourcePath,
66
+ content_hash: createHash('sha256').update(normalizeSourceForHash(content)).digest('hex'),
67
+ semantic_plan_fragment_refs: [],
68
+ };
69
+ });
70
+ fs.writeFileSync(path.join(flatRoot, 'kb-upload-manifest.json'), JSON.stringify({
71
+ schema_version: '1.0',
72
+ manifest_kind: 'ae_project_semantic_kb_upload_sources',
73
+ navigation_taxonomy_version: 'empty-skeleton-1.0',
74
+ namespace,
75
+ semantic_project_id: projectId,
76
+ project_name: projectName,
77
+ snapshot_hash: snapshotHash,
78
+ semantic_plan_state: { schema_version: null, plan_hash: null, fragment_count: 0, fragments: [] },
79
+ source_count: sources.length,
80
+ sources,
81
+ }, null, 2));
82
+ const packager = path.join(import.meta.dirname, 'package-wiki-source-zip.mjs');
83
+ const archive = path.join(outputRoot, 'empty-skeleton.zip');
84
+ const tree = path.join(outputRoot, 'source-tree');
85
+ const sourceManifest = path.join(outputRoot, 'source-tree-manifest.json');
86
+ execFileSync(process.execPath, [packager, '--source-dir', flatRoot, '--tree-output', tree,
87
+ '--manifest-output', sourceManifest, '--output', archive, '--embed-refresh-state-baseline'], {
88
+ stdio: 'pipe',
89
+ });
90
+ process.stdout.write(JSON.stringify({
91
+ project_id: projectId, project_name: projectName, archive,
92
+ source_tree: tree, manifest: sourceManifest, source_count: sources.length,
93
+ }, null, 2) + '\n');
94
+
95
+ function required(name) {
96
+ if (!args[name]) throw new Error(`--${name} is required.`);
97
+ return args[name];
98
+ }
99
+ function readJson(file) {
100
+ return JSON.parse(fs.readFileSync(file, 'utf8'));
101
+ }
102
+ function readJsonl(file) {
103
+ const rows = fs.readFileSync(file, 'utf8').split(/\r?\n/).filter(Boolean).map((line) => JSON.parse(line));
104
+ return rows.filter((row) => row.record_type !== 'header');
105
+ }