@thinkingai/ae-cli 6.1.13 → 6.1.16
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.
- package/dist/{auth-GBMV6TEJ.js → auth-2WTQOP77.js} +3 -3
- package/dist/{auth-NDSXE54J.js → auth-77BUFLGC.js} +57 -13
- package/dist/{capability-TAMDRZYV.js → capability-72DTW5M2.js} +9 -9
- package/dist/{capability-U7TDEEEG.js → capability-PJHNI4GJ.js} +9 -9
- package/dist/{chunk-AFXA7BRK.js → chunk-4KVPKXFX.js} +5 -5
- package/dist/chunk-4SGZG4XY.js +311 -0
- package/dist/chunk-6EIJSNBD.js +8 -0
- package/dist/chunk-C4MGVGJW.js +13 -0
- package/dist/{chunk-WZRX4KOH.js → chunk-GT46FPXN.js} +4 -6
- package/dist/{chunk-5XUSIK27.js → chunk-ILIU36SU.js} +10 -7
- package/dist/{chunk-JHENBQ5B.js → chunk-LYVNONC4.js} +0 -35
- package/dist/{chunk-JUW4AJXN.js → chunk-P3FGXJTU.js} +12 -7
- package/dist/chunk-QGM4M3NI.js +37 -0
- package/dist/{chunk-753BUTNZ.js → chunk-RGKJGKT7.js} +2 -2
- package/dist/{chunk-UIHQJK5E.js → chunk-SAU3QFIQ.js} +3 -3
- package/dist/{chunk-VLWOLBGZ.js → chunk-UOUS37JQ.js} +149 -161
- package/dist/{chunk-AXDXJTPC.js → chunk-UW5UN47B.js} +19 -2
- package/dist/chunk-VPKZ7I72.js +509 -0
- package/dist/{chunk-QATA32VR.js → chunk-VR3LCBHW.js} +2 -2
- package/dist/{chunk-IBH3LDAH.js → chunk-YA6SMTXG.js} +3 -3
- package/dist/chunk-ZZUOD757.js +598 -0
- package/dist/{client-L2YDMHQ6.js → client-TKG4WBHN.js} +4 -5
- package/dist/{community-report-client-M2RW4MXD.js → community-report-client-FI4LNVYS.js} +3 -2
- package/dist/{config-OL2LWGBV.js → config-RE6CMGPK.js} +7 -7
- package/dist/data-integration-2MYMANJI.js +3383 -0
- package/dist/index.js +68 -34
- package/dist/local-data-upload-client-BWHSUQQK.js +167 -0
- package/dist/{memory-MUP7PPL7.js → memory-CHRU2F7W.js} +7 -6
- package/dist/{memory-U4O5PMXH.js → memory-YK33G4T7.js} +7 -6
- package/dist/{metadata-UORZTW3T.js → metadata-UILXHBWF.js} +22 -18
- package/dist/{metadata-VVQ3AQT5.js → metadata-XXR34N5P.js} +22 -18
- package/dist/{model-JTUEO5M4.js → model-K3KLWIW6.js} +7 -3
- package/dist/model-NR3JHFSJ.js +139 -0
- package/dist/{sync-MOSFNBVR.js → sync-DAVKYVMW.js} +8 -6
- package/dist/sync-FCKOVWWS.js +10261 -0
- package/dist/{te-agent-IFKZDHZI.js → te-agent-4BKBODMF.js} +686 -71
- package/dist/te-agent-HLW4VTQK.js +3893 -0
- package/dist/{te-analysis-KOKHJJPE.js → te-analysis-O6DCO6BS.js} +84 -61
- package/dist/{te-analysis-LLOCCBJ4.js → te-analysis-ZMNGOVNW.js} +84 -61
- package/dist/{te-community-HNKVTERD.js → te-community-6HPBWJUZ.js} +24 -19
- package/dist/{te-community-IWE5B7W6.js → te-community-HLC43QKH.js} +24 -20
- package/dist/{te-dataops-KXCEB4CS.js → te-dataops-EJP56W3K.js} +57 -34
- package/dist/{te-dataops-KQPYNAE3.js → te-dataops-HDRUXY4K.js} +59 -34
- package/dist/{te-engage-BRLSRVQT.js → te-engage-FGBGQ4IY.js} +398 -12
- package/dist/{te-engage-HE4OPZIT.js → te-engage-RAK5PESW.js} +398 -12
- package/dist/{te-experiment-K5US7RMG.js → te-experiment-SO5MPDMJ.js} +9 -8
- package/dist/{te-experiment-WA7TFMEL.js → te-experiment-VZF7BT6G.js} +9 -8
- package/dist/{te-kb-OIH3T6CS.js → te-kb-APXBWBDY.js} +6 -6
- package/dist/{te-system-AZ3URMUO.js → te-system-YARIK4S5.js} +7 -4
- package/dist/te-system-Z77IKZFN.js +2213 -0
- package/dist/{te-team-GZPU6UWA.js → te-team-EFKWYKMK.js} +7 -7
- package/dist/{update-TOBFXF2V.js → update-OGPSZM5A.js} +7 -7
- package/package.json +13 -3
- package/skills/ae-agent/SKILL.md +21 -11
- package/skills/ae-agent/references/approval-effect.md +44 -0
- package/skills/ae-agent/references/approval-request.md +46 -0
- package/skills/ae-agent/references/approval-task.md +45 -0
- package/skills/ae-agent/references/approval-type.md +32 -0
- package/skills/ae-agent/references/command_index.md +19 -0
- package/skills/ae-analysis/SKILL.md +11 -7
- package/skills/ae-analysis/references/adhoc_run.md +2 -0
- package/skills/ae-analysis/references/ai_models.md +31 -1
- package/skills/ae-analysis/references/alert_list.md +2 -3
- package/skills/ae-analysis/references/analysis_gateway_assets.md +8 -7
- package/skills/ae-analysis/references/bi_panel_list.md +2 -2
- package/skills/ae-analysis/references/command_index.md +18 -15
- package/skills/ae-analysis/references/dashboard_get.md +8 -2
- package/skills/ae-analysis/references/dashboard_list.md +2 -2
- package/skills/ae-analysis/references/dashboard_report_data_run.md +3 -1
- package/skills/ae-analysis/references/dashboard_update.md +4 -1
- package/skills/ae-analysis/references/favorite_add.md +2 -2
- package/skills/ae-analysis/references/favorite_remove.md +2 -2
- package/skills/ae-analysis/references/metric_create.md +7 -8
- package/skills/ae-analysis/references/project_space_business_filter_upsert.md +17 -0
- package/skills/ae-analysis/references/project_space_list.md +2 -2
- package/skills/ae-analysis/references/public_link_list.md +2 -2
- package/skills/ae-analysis/references/report_list.md +3 -3
- package/skills/ae-analysis/references/report_list_export.md +2 -2
- package/skills/ae-analysis/references/sql_table_list.md +3 -2
- package/skills/ae-analysis/references/user_cluster_update.md +4 -2
- package/skills/ae-analysis/references/user_tag_models.md +4 -4
- package/skills/ae-analysis/references/user_tag_update.md +4 -2
- package/skills/ae-analysis/references/virtual_property_sql_rule_update.md +3 -3
- package/skills/ae-data-integration/SKILL.md +54 -0
- package/skills/ae-data-integration/references/handoff.md +43 -0
- package/skills/ae-data-integration/references/local-analysis.md +27 -0
- package/skills/ae-data-integration/references/reuse.md +41 -0
- package/skills/ae-data-integration/references/sink-upload.md +58 -0
- package/skills/ae-data-integration/references/source-inspect.md +55 -0
- package/skills/ae-data-integration/references/sync-json-upload.md +60 -0
- package/skills/ae-data-integration/references/tracking-plan.md +35 -0
- package/skills/ae-data-integration/references/transform.md +65 -0
- package/skills/ae-data-integration/references/ue-mapping.md +142 -0
- package/skills/ae-data-integration/references/ue-routing.md +35 -0
- package/skills/ae-data-integration-helper/SKILL.md +1 -1
- package/skills/ae-dataops/SKILL.md +1 -1
- package/skills/ae-dataops/references/dataops-query.md +4 -4
- package/skills/ae-engage/SKILL.md +10 -2
- package/skills/ae-engage/references/flow-metric-user.md +2 -1
- package/skills/ae-engage/references/flow-node-metric-user.md +2 -1
- package/skills/ae-engage/references/flow-node-user.md +2 -1
- package/skills/ae-engage/references/task-indicator-user.md +104 -0
- package/skills/ae-engage/references/task-user-detail-export.md +31 -0
- package/skills/ae-generate-tracking-plan/SKILL.md +54 -3
- package/skills/ae-metadata/SKILL.md +0 -1
- package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +1 -1
- package/dist/chunk-3FY3RJ26.js +0 -293
- package/dist/chunk-S5NTSDBS.js +0 -198
- package/dist/chunk-ZQKDZXDO.js +0 -317
- package/dist/cli-token-4UPER74P.js +0 -21
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getCurrentWorkspace
|
|
3
|
+
} from "./chunk-DWO43OIB.js";
|
|
4
|
+
import {
|
|
5
|
+
MultiselectCancelled,
|
|
6
|
+
promptSingleCheckboxSelect
|
|
7
|
+
} from "./chunk-TUKQZTMI.js";
|
|
8
|
+
import {
|
|
9
|
+
TeAgentApiError,
|
|
10
|
+
TeAgentCredentialsError,
|
|
11
|
+
getClaudeConfigDir,
|
|
12
|
+
getSandboxModels,
|
|
13
|
+
postSandboxModelSelection
|
|
14
|
+
} from "./chunk-VPKZ7I72.js";
|
|
15
|
+
import "./chunk-6EIJSNBD.js";
|
|
16
|
+
import "./chunk-4SGZG4XY.js";
|
|
17
|
+
import "./chunk-ZZUOD757.js";
|
|
18
|
+
import "./chunk-UW5UN47B.js";
|
|
19
|
+
import "./chunk-LYVNONC4.js";
|
|
20
|
+
import "./chunk-QGM4M3NI.js";
|
|
21
|
+
|
|
22
|
+
// src/commands/model/index.ts
|
|
23
|
+
import { existsSync, readFileSync } from "fs";
|
|
24
|
+
import { join } from "path";
|
|
25
|
+
function readCurrentModelSelection() {
|
|
26
|
+
const settingsPath = join(getClaudeConfigDir(), "settings.json");
|
|
27
|
+
if (!existsSync(settingsPath)) return { routingModelId: null, providerModelId: null };
|
|
28
|
+
try {
|
|
29
|
+
const raw = readFileSync(settingsPath, "utf8");
|
|
30
|
+
const parsed = JSON.parse(raw);
|
|
31
|
+
if (!parsed || typeof parsed !== "object") {
|
|
32
|
+
return { routingModelId: null, providerModelId: null };
|
|
33
|
+
}
|
|
34
|
+
const env = parsed.env && typeof parsed.env === "object" ? parsed.env : {};
|
|
35
|
+
const headers = typeof env.ANTHROPIC_CUSTOM_HEADERS === "string" ? env.ANTHROPIC_CUSTOM_HEADERS : void 0;
|
|
36
|
+
const routingModelId = extractModelIdHeader(headers);
|
|
37
|
+
const providerModelId = typeof parsed.model === "string" && parsed.model ? parsed.model : typeof env.ANTHROPIC_MODEL === "string" && env.ANTHROPIC_MODEL ? env.ANTHROPIC_MODEL : null;
|
|
38
|
+
return { routingModelId, providerModelId };
|
|
39
|
+
} catch {
|
|
40
|
+
return { routingModelId: null, providerModelId: null };
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function extractModelIdHeader(headers) {
|
|
44
|
+
if (!headers) return null;
|
|
45
|
+
for (const line of headers.split(/\r?\n/)) {
|
|
46
|
+
const match = line.match(/^\s*model-id\s*:\s*(.+?)\s*$/);
|
|
47
|
+
if (match?.[1]) {
|
|
48
|
+
return match[1];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
function isCurrentModel(model, current) {
|
|
54
|
+
if (current.routingModelId) return model.id === current.routingModelId;
|
|
55
|
+
return model.scope === "system" && Boolean(current.providerModelId) && model.modelId === current.providerModelId;
|
|
56
|
+
}
|
|
57
|
+
async function runModelPicker() {
|
|
58
|
+
const current = readCurrentModelSelection();
|
|
59
|
+
const models = await getSandboxModels();
|
|
60
|
+
if (models.length === 0) {
|
|
61
|
+
process.stderr.write("No models visible to the current user\n");
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const sorted = models.slice().sort((a, b) => {
|
|
65
|
+
const scopeOrder = {
|
|
66
|
+
system: 0,
|
|
67
|
+
company: 1,
|
|
68
|
+
personal: 2
|
|
69
|
+
};
|
|
70
|
+
const scopeDiff = scopeOrder[a.scope] - scopeOrder[b.scope];
|
|
71
|
+
return scopeDiff !== 0 ? scopeDiff : a.name.localeCompare(b.name);
|
|
72
|
+
});
|
|
73
|
+
const picked = await promptSingleCheckboxSelect({
|
|
74
|
+
title: "Select a model to use",
|
|
75
|
+
items: sorted.map((model) => {
|
|
76
|
+
const isCurrent = isCurrentModel(model, current);
|
|
77
|
+
return {
|
|
78
|
+
value: model,
|
|
79
|
+
label: `${model.name} ${model.scope}`,
|
|
80
|
+
hint: isCurrent ? "(current)" : void 0,
|
|
81
|
+
preselected: isCurrent
|
|
82
|
+
};
|
|
83
|
+
})
|
|
84
|
+
});
|
|
85
|
+
const workspace = getCurrentWorkspace();
|
|
86
|
+
if (!workspace) {
|
|
87
|
+
process.stderr.write("Please run ae-cli model from within a te-agent workspace directory\n");
|
|
88
|
+
process.exitCode = 1;
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (isCurrentModel(picked, current)) {
|
|
92
|
+
process.stdout.write("This model is already active\n");
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
await postSandboxModelSelection({
|
|
96
|
+
workspacePath: workspace.name,
|
|
97
|
+
modelId: picked.id
|
|
98
|
+
});
|
|
99
|
+
process.stdout.write(`Switched to ${picked.name}
|
|
100
|
+
`);
|
|
101
|
+
}
|
|
102
|
+
function registerModel(program) {
|
|
103
|
+
program.command("model").description("Choose and switch the current workspace model (te-agent sandbox only)").action(async () => {
|
|
104
|
+
try {
|
|
105
|
+
await runModelPicker();
|
|
106
|
+
} catch (err) {
|
|
107
|
+
handleError(err);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
function handleError(err) {
|
|
112
|
+
if (err instanceof MultiselectCancelled) {
|
|
113
|
+
process.stderr.write("Cancelled\n");
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
if (err instanceof TeAgentCredentialsError) {
|
|
117
|
+
process.stderr.write(`\u2717 ${err.message}
|
|
118
|
+
`);
|
|
119
|
+
if (err.hint) process.stderr.write(` ${err.hint}
|
|
120
|
+
`);
|
|
121
|
+
process.exitCode = 1;
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
if (err instanceof TeAgentApiError) {
|
|
125
|
+
process.stderr.write(`\u2717 Main app error (${err.status}${err.code ? " " + err.code : ""}): ${err.message}
|
|
126
|
+
`);
|
|
127
|
+
process.exitCode = 1;
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
131
|
+
process.stderr.write(`\u2717 ${msg}
|
|
132
|
+
`);
|
|
133
|
+
process.exitCode = 1;
|
|
134
|
+
}
|
|
135
|
+
export {
|
|
136
|
+
extractModelIdHeader,
|
|
137
|
+
readCurrentModelSelection,
|
|
138
|
+
registerModel
|
|
139
|
+
};
|
|
@@ -25,18 +25,20 @@ import {
|
|
|
25
25
|
postSandboxSyncPull,
|
|
26
26
|
postToMainApp,
|
|
27
27
|
uploadToMainApp
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-UOUS37JQ.js";
|
|
29
29
|
import {
|
|
30
30
|
printError
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-GT46FPXN.js";
|
|
32
|
+
import "./chunk-C4MGVGJW.js";
|
|
33
|
+
import "./chunk-4SGZG4XY.js";
|
|
34
|
+
import "./chunk-ZZUOD757.js";
|
|
35
|
+
import "./chunk-UW5UN47B.js";
|
|
36
|
+
import "./chunk-LYVNONC4.js";
|
|
35
37
|
import {
|
|
36
38
|
__commonJS,
|
|
37
39
|
__require,
|
|
38
40
|
__toESM
|
|
39
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-QGM4M3NI.js";
|
|
40
42
|
|
|
41
43
|
// node_modules/process-nextick-args/index.js
|
|
42
44
|
var require_process_nextick_args = __commonJS({
|