@thinkingai/ae-cli 6.0.48-customer.1 → 6.1.0-project-role-upsert.1
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/README.md +96 -36
- package/README.zh.md +96 -36
- package/dist/{auth-QPEVVBKT.js → auth-FUM37MHF.js} +236 -127
- package/dist/{capability-RUSV77CO.js → capability-AXFQW5WM.js} +49 -33
- package/dist/{chunk-FR2EDAQM.js → chunk-4P355ZWB.js} +69 -1
- package/dist/chunk-6ZIQV5GW.js +26 -0
- package/dist/chunk-ATSM5XAW.js +623 -0
- package/dist/{chunk-6QK7SYYY.js → chunk-BBEFP4SB.js} +29 -37
- package/dist/{chunk-KEWVSO64.js → chunk-CZU3V3DQ.js} +4 -15
- package/dist/chunk-ECBLHAZO.js +15 -0
- package/dist/{chunk-B5HMQAOM.js → chunk-I4WQAEYB.js} +1 -1
- package/dist/{chunk-NSIVXKJH.js → chunk-JDPEVVHR.js} +5 -4
- package/dist/{chunk-BE73PUFX.js → chunk-LNZBEQXW.js} +2 -2
- package/dist/{chunk-GJXRF7Y6.js → chunk-QJQZH5GQ.js} +47 -78
- package/dist/{chunk-BVDST5YT.js → chunk-RSG4ONOI.js} +7 -7
- package/dist/{chunk-JYMGHGCE.js → chunk-VXNMYUXU.js} +24 -13
- package/dist/{chunk-KZ6ZHF5J.js → chunk-WZ6YVQSF.js} +14 -14
- package/dist/{community-report-client-6OL6GBQW.js → community-report-client-XXWGSBSD.js} +2 -4
- package/dist/{config-XNMACCKX.js → config-EXUGQN5T.js} +8 -9
- package/dist/{data-integration-FZQQC3KW.js → data-integration-4NZ53OMT.js} +7 -9
- package/dist/index.js +61 -78
- package/dist/{local-data-upload-client-EFHDLXFG.js → local-data-upload-client-KYOKVYZV.js} +2 -4
- package/dist/{memory-HBJQ2GC5.js → memory-ATNKZNW5.js} +4 -6
- package/dist/{metadata-PGDJE5RQ.js → metadata-SOALPEA7.js} +7 -9
- package/dist/{model-BHLJ2QMT.js → model-E4JMQ4V2.js} +4 -6
- package/dist/{personal-semantic-preference-E5NZ56DN.js → personal-semantic-preference-LOF33N5X.js} +6 -8
- package/dist/project-semantic-RV6NA5LN.js +1113 -0
- package/dist/{sync-MUWPRM5I.js → sync-YV3E66IF.js} +6 -8
- package/dist/{te-agent-WQZTMEK4.js → te-agent-JB5T3PO7.js} +393 -90
- package/dist/{te-analysis-YWCSSLYL.js → te-analysis-TV2YZ4IC.js} +112 -30
- package/dist/{te-community-BNE6KREL.js → te-community-UDBI672N.js} +9 -32
- package/dist/{te-dataops-TXLKM2W6.js → te-dataops-ZLYOCXZ4.js} +19 -20
- package/dist/{te-engage-VEW4CJHK.js → te-engage-EUVMTUDJ.js} +67 -11
- package/dist/te-experiment-ESEYE2SK.js +1059 -0
- package/dist/{te-kb-BUD6N3NI.js → te-kb-WYQWHFSC.js} +595 -85
- package/dist/{te-system-44LZJDTQ.js → te-system-7G6F2LJA.js} +6 -8
- package/dist/{te-team-XMP47YXE.js → te-team-E7FBBXMQ.js} +6 -8
- package/dist/{update-UODFOZ4P.js → update-D47BUG25.js} +7 -8
- package/package.json +13 -9
- package/skills/ae-agent/SKILL.md +30 -13
- package/skills/ae-agent/references/agent-distribution.md +94 -0
- package/skills/ae-agent/references/approval-request.md +4 -0
- package/skills/ae-agent/references/command_index.md +9 -2
- package/skills/ae-agent/references/create-automation.md +20 -2
- package/skills/ae-agent/references/get-agent-context.md +70 -0
- package/skills/ae-agent/references/list-automations.md +18 -3
- package/skills/ae-agent/references/list-mcp-credentials.md +1 -1
- package/skills/ae-agent/references/mcp-token.md +3 -3
- package/skills/ae-agent/references/set-mcp-credential.md +0 -1
- package/skills/ae-agent/references/update-automation.md +18 -0
- package/skills/ae-analysis/SKILL.md +28 -3
- package/skills/ae-analysis/references/adhoc_run.md +2 -0
- package/skills/ae-analysis/references/ai_models.md +23 -3
- package/skills/ae-analysis/references/analysis_gateway_assets.md +2 -2
- package/skills/ae-analysis/references/command_index.md +8 -8
- package/skills/ae-analysis/references/cross_source_config.md +84 -0
- package/skills/ae-analysis/references/dashboard_update.md +1 -1
- package/skills/ae-analysis/references/personal_semantic_preference_add.md +1 -1
- package/skills/ae-analysis/references/personal_semantic_preference_get.md +3 -1
- package/skills/ae-analysis/references/personal_semantic_preference_list.md +3 -1
- package/skills/ae-analysis/references/personal_semantic_preference_update.md +1 -1
- package/skills/ae-analysis/references/project_role_upsert.md +32 -2
- package/skills/ae-analysis/references/user_tag_create.md +23 -1
- package/skills/ae-analysis/references/user_tag_models.md +9 -1
- package/skills/ae-analysis/references/user_tag_update.md +14 -2
- package/skills/ae-data-integration/SKILL.md +2 -1
- package/skills/ae-data-integration/references/dimension-routing.md +36 -0
- package/skills/ae-data-integration/references/local-analysis.md +2 -0
- package/skills/ae-data-integration/references/source-inspect.md +1 -1
- package/skills/ae-data-integration/references/ue-routing.md +17 -1
- package/skills/ae-engage/SKILL.md +2 -0
- package/skills/ae-engage/references/save-flow.md +37 -1
- package/skills/ae-experiment/SKILL.md +117 -0
- package/skills/ae-experiment/references/batch_delete_experiment.md +11 -0
- package/skills/ae-experiment/references/batch_delete_feature.md +11 -0
- package/skills/ae-experiment/references/batch_delete_traffic_layer.md +11 -0
- package/skills/ae-experiment/references/cancel_experiment_query_by_request_id.md +11 -0
- package/skills/ae-experiment/references/check_experiment_ready.md +17 -0
- package/skills/ae-experiment/references/check_experiment_traffic_layer_conflict.md +37 -0
- package/skills/ae-experiment/references/delete_metric.md +13 -0
- package/skills/ae-experiment/references/manage_experiment.md +17 -0
- package/skills/ae-experiment/references/manage_feature_status.md +11 -0
- package/skills/ae-experiment/references/manage_feature_whitelist.md +66 -0
- package/skills/ae-experiment/references/manage_guardrail_metrics.md +26 -0
- package/skills/ae-experiment/references/query_bucket_list.md +12 -0
- package/skills/ae-experiment/references/query_experiment_detail.md +19 -0
- package/skills/ae-experiment/references/query_experiment_list.md +22 -0
- package/skills/ae-experiment/references/query_experiment_list_archived.md +18 -0
- package/skills/ae-experiment/references/query_experiment_metric_trend.md +12 -0
- package/skills/ae-experiment/references/query_experiment_operation_log.md +17 -0
- package/skills/ae-experiment/references/query_experiment_report_summary.md +12 -0
- package/skills/ae-experiment/references/query_experiment_sample_size_report.md +13 -0
- package/skills/ae-experiment/references/query_feature_detail.md +14 -0
- package/skills/ae-experiment/references/query_feature_list.md +12 -0
- package/skills/ae-experiment/references/query_feature_operation_log.md +19 -0
- package/skills/ae-experiment/references/query_feature_version_list.md +20 -0
- package/skills/ae-experiment/references/query_metric_detail.md +18 -0
- package/skills/ae-experiment/references/query_metric_list.md +15 -0
- package/skills/ae-experiment/references/query_traffic_layer_detail.md +13 -0
- package/skills/ae-experiment/references/query_traffic_layer_list.md +12 -0
- package/skills/ae-experiment/references/save_build_guide.md +39 -0
- package/skills/ae-experiment/references/save_experiment.md +210 -0
- package/skills/ae-experiment/references/save_feature.md +13 -0
- package/skills/ae-experiment/references/save_metric.md +91 -0
- package/skills/ae-experiment/references/save_submit_experiment.md +16 -0
- package/skills/ae-experiment/references/save_traffic_layer.md +13 -0
- package/skills/ae-experiment/references/save_validate.md +33 -0
- package/skills/ae-experiment/references/update_experiment_group.md +20 -0
- package/skills/ae-experiment-design/SKILL.md +149 -0
- package/skills/ae-experiment-design/agents/openai.yaml +4 -0
- package/skills/ae-experiment-design/references/client-experiment-sdk.md +147 -0
- package/skills/ae-experiment-design/references/experiment-creation.md +108 -0
- package/skills/ae-experiment-design/references/experiment-sdk-contract.md +100 -0
- package/skills/ae-experiment-design/references/exposure-contract.md +91 -0
- package/skills/ae-experiment-design/references/hybrid-experiment-sdk.md +74 -0
- package/skills/ae-experiment-design/references/metric-readiness.md +143 -0
- package/skills/ae-experiment-design/references/platform-operations.md +105 -0
- package/skills/ae-experiment-design/references/sdk-index.md +76 -0
- package/skills/ae-experiment-design/references/sdk-integration.md +114 -0
- package/skills/ae-experiment-design/references/sdk-troubleshooting.md +139 -0
- package/skills/ae-experiment-design/references/server-experiment-sdk.md +78 -0
- package/skills/ae-experiment-design/scripts/calculate_experiment_plan.py +450 -0
- package/skills/ae-experiment-insight/SKILL.md +149 -0
- package/skills/ae-experiment-insight/agents/openai.yaml +4 -0
- package/skills/ae-experiment-insight/references/decision-framework.md +69 -0
- package/skills/ae-experiment-insight/references/diagnostic-playbook.md +225 -0
- package/skills/ae-experiment-insight/references/platform-operations.md +82 -0
- package/skills/ae-experiment-insight/scripts/analyze_experiment.py +478 -0
- package/skills/ae-generate-tracking-plan/SKILL.md +16 -5
- package/skills/ae-kb/SKILL.md +107 -36
- package/skills/ae-kb/references/query-workflow.md +59 -29
- package/skills/ae-kb/references/versions.md +46 -0
- package/skills/ae-project-semantic/SKILL.md +193 -0
- package/skills/ae-project-semantic/references/query-routing-v5.md +165 -0
- package/skills/ae-project-semantic/references/recommendation-quality.md +68 -0
- package/skills/ae-system/SKILL.md +1 -1
- package/skills/ae-use-agent/SKILL.md +42 -0
- package/skills/ae-use-agent/references/local-agent.md +114 -0
- package/dist/auth-UMJAA72O.js +0 -15
- package/dist/chunk-533JK3YX.js +0 -72
- package/dist/chunk-O6K2ODUE.js +0 -318
- package/dist/chunk-RWXIXOZG.js +0 -326
- package/dist/client-N7NGZUNI.js +0 -204
- package/skills/ae-agent/references/auto-provision-mcp-credentials.md +0 -57
|
@@ -3,36 +3,38 @@ import {
|
|
|
3
3
|
normalizeRiskLevel,
|
|
4
4
|
requiresConfirmation
|
|
5
5
|
} from "./chunk-AMBFK2K3.js";
|
|
6
|
-
import {
|
|
7
|
-
printError,
|
|
8
|
-
printOutput
|
|
9
|
-
} from "./chunk-KEWVSO64.js";
|
|
10
6
|
import {
|
|
11
7
|
CapabilityGatewayError,
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
dryRunCapabilityWithEnvelope,
|
|
9
|
+
executeCapabilityWithEnvelope,
|
|
14
10
|
inspectCapability,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
inspectCapabilityWithEnvelope,
|
|
12
|
+
listCapabilitiesWithEnvelope,
|
|
13
|
+
validateCapabilityWithEnvelope
|
|
14
|
+
} from "./chunk-QJQZH5GQ.js";
|
|
18
15
|
import {
|
|
19
16
|
findGatewayDomain,
|
|
20
17
|
listRegisteredCapabilityDomains,
|
|
21
18
|
resolveGatewayDomain
|
|
22
19
|
} from "./chunk-TKHSULJT.js";
|
|
23
|
-
import "./chunk-Y74WTIKJ.js";
|
|
24
|
-
import "./chunk-RWXIXOZG.js";
|
|
25
20
|
import {
|
|
26
|
-
SecureStoreAuthError,
|
|
27
21
|
resolveHost
|
|
28
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-ECBLHAZO.js";
|
|
23
|
+
import {
|
|
24
|
+
printError,
|
|
25
|
+
printOutput,
|
|
26
|
+
withOutputMetadata
|
|
27
|
+
} from "./chunk-CZU3V3DQ.js";
|
|
28
|
+
import "./chunk-Y74WTIKJ.js";
|
|
29
|
+
import {
|
|
30
|
+
SecureStoreAuthError
|
|
31
|
+
} from "./chunk-ATSM5XAW.js";
|
|
29
32
|
import {
|
|
30
33
|
safeJsonParse
|
|
31
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-WZ6YVQSF.js";
|
|
32
35
|
import {
|
|
33
36
|
PermissionError
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import "./chunk-FR2EDAQM.js";
|
|
37
|
+
} from "./chunk-4P355ZWB.js";
|
|
36
38
|
|
|
37
39
|
// src/commands/capability/index.ts
|
|
38
40
|
import * as readline from "readline";
|
|
@@ -178,43 +180,48 @@ function registerCapability(program) {
|
|
|
178
180
|
await executeAndPrint(program, async (host) => {
|
|
179
181
|
const gatewayDomain = resolveCapabilityListDomain(opts.domain);
|
|
180
182
|
const projectId = parseOptionalProjectId(opts.projectId);
|
|
181
|
-
const
|
|
183
|
+
const envelope = await listCapabilitiesWithEnvelope(host, gatewayDomain, projectId);
|
|
184
|
+
const catalog = normalizeCapabilityList(envelope.data);
|
|
182
185
|
const capabilities = filterCapabilities(catalog, opts.domain);
|
|
183
186
|
const warning = emptyCapabilityCatalogWarning(catalog);
|
|
184
|
-
return {
|
|
187
|
+
return withOutputMetadata({
|
|
185
188
|
domain: opts.domain,
|
|
186
189
|
count: capabilities.length,
|
|
187
190
|
capabilities,
|
|
188
191
|
...warning ? { warning } : {}
|
|
189
|
-
};
|
|
192
|
+
}, envelope.meta);
|
|
190
193
|
});
|
|
191
194
|
}).addHelpText(
|
|
192
195
|
"after",
|
|
193
196
|
"\nExamples:\n ae-cli capability list --domain analysis\n ae-cli capability list --domain analysis --project-id 1"
|
|
194
197
|
);
|
|
195
|
-
capability.command("search").description("Search capability IDs and descriptions in a domain").argument("<query>", "Case-insensitive search terms").requiredOption(
|
|
198
|
+
capability.command("search").description("Search capability IDs and descriptions in a domain").argument("<query>", "Case-insensitive search terms").requiredOption(
|
|
199
|
+
"--domain <domain>",
|
|
200
|
+
"Capability namespace. One of: analysis, project, system, tracking, metadata, experiment, engage-flow, engage-task, engage-setting, engage-scene, engage-activity, engage-workbench, community"
|
|
201
|
+
).option("--project-id <project-id>", "Filter by project membership, permissions, and enabled features").action(async (query, opts) => {
|
|
196
202
|
await executeAndPrint(program, async (host) => {
|
|
197
203
|
const gatewayDomain = resolveCapabilityListDomain(opts.domain);
|
|
198
204
|
const projectId = parseOptionalProjectId(opts.projectId);
|
|
199
|
-
const
|
|
205
|
+
const envelope = await listCapabilitiesWithEnvelope(host, gatewayDomain, projectId);
|
|
206
|
+
const catalog = normalizeCapabilityList(envelope.data);
|
|
200
207
|
const capabilities = filterCapabilities(catalog, opts.domain, query);
|
|
201
208
|
const warning = emptyCapabilityCatalogWarning(catalog);
|
|
202
|
-
return {
|
|
209
|
+
return withOutputMetadata({
|
|
203
210
|
domain: opts.domain,
|
|
204
211
|
query,
|
|
205
212
|
count: capabilities.length,
|
|
206
213
|
capabilities,
|
|
207
214
|
...warning ? { warning } : {}
|
|
208
|
-
};
|
|
215
|
+
}, envelope.meta);
|
|
209
216
|
});
|
|
210
217
|
}).addHelpText(
|
|
211
218
|
"after",
|
|
212
|
-
'\nExamples:\n ae-cli capability search "dashboard list" --domain analysis\n ae-cli capability search "dashboard list" --domain analysis --project-id 1'
|
|
219
|
+
'\nDomains (--domain):\n analysis, project, system, tracking, metadata,\n experiment, engage-flow, engage-task, engage-setting,\n engage-scene, engage-activity, engage-workbench, community\n\nExamples:\n ae-cli capability search "dashboard list" --domain analysis\n ae-cli capability search "dashboard list" --domain analysis --project-id 1\n ae-cli capability search "info list" --domain project\n ae-cli capability search "usage" --domain system\n ae-cli capability search "plan" --domain tracking\n ae-cli capability search "data_table" --domain metadata\n ae-cli capability search "report" --domain experiment\n ae-cli capability search "flow" --domain engage-flow\n ae-cli capability search "task" --domain engage-task\n ae-cli capability search "channel" --domain engage-setting\n ae-cli capability search "strategy" --domain engage-scene\n ae-cli capability search "topic" --domain engage-activity\n ae-cli capability search "workbench" --domain engage-workbench\n ae-cli capability search "post" --domain community'
|
|
213
220
|
);
|
|
214
221
|
capability.command("inspect").description("Inspect one capability schema, risk, auth, and output metadata").argument("<capability-id>", "Capability ID, such as analysis.report.list").option("--domain <domain>", "Override the capability namespace used for gateway routing").option("--project-id <project-id>", "Check availability in a project before returning metadata").action(async (capabilityId, opts) => {
|
|
215
222
|
await executeAndPrint(program, async (host) => {
|
|
216
223
|
const gatewayDomain = resolveCapabilityGatewayDomain(capabilityId, opts.domain);
|
|
217
|
-
return
|
|
224
|
+
return gatewayOutput(await inspectCapabilityWithEnvelope(host, gatewayDomain, capabilityId, parseOptionalProjectId(opts.projectId)), host);
|
|
218
225
|
});
|
|
219
226
|
}).addHelpText(
|
|
220
227
|
"after",
|
|
@@ -225,7 +232,7 @@ function registerCapability(program) {
|
|
|
225
232
|
).argument("<capability-id>", "Capability ID, such as metadata.data_table.sql_write").option("--domain <domain>", "Override the capability namespace used for gateway routing").option("--input <json-or-path>", "Input JSON object, file path, @<path>, or - for stdin").action(async (capabilityId, opts) => {
|
|
226
233
|
await executeAndPrint(program, async (host) => {
|
|
227
234
|
const gatewayDomain = resolveCapabilityGatewayDomain(capabilityId, opts.domain);
|
|
228
|
-
return
|
|
235
|
+
return gatewayOutput(await validateCapabilityWithEnvelope(host, gatewayDomain, capabilityId, parseCapabilityInput(opts.input)), host);
|
|
229
236
|
});
|
|
230
237
|
}).addHelpText(
|
|
231
238
|
"after",
|
|
@@ -247,7 +254,7 @@ Examples:
|
|
|
247
254
|
).argument("<capability-id>", "Capability ID, such as analysis.query.export").option("--domain <domain>", "Override the capability namespace used for gateway routing").option("--input <json-or-path>", "Input JSON object, file path, @<path>, or - for stdin").action(async (capabilityId, opts) => {
|
|
248
255
|
await executeAndPrint(program, async (host) => {
|
|
249
256
|
const gatewayDomain = resolveCapabilityGatewayDomain(capabilityId, opts.domain);
|
|
250
|
-
return
|
|
257
|
+
return gatewayOutput(await dryRunCapabilityWithEnvelope(host, gatewayDomain, capabilityId, parseCapabilityInput(opts.input)), host);
|
|
251
258
|
});
|
|
252
259
|
}).addHelpText(
|
|
253
260
|
"after",
|
|
@@ -267,10 +274,10 @@ Examples:
|
|
|
267
274
|
);
|
|
268
275
|
}
|
|
269
276
|
if (globalOpts.validate) {
|
|
270
|
-
return
|
|
277
|
+
return gatewayOutput(await validateCapabilityWithEnvelope(host, gatewayDomain, capabilityId, input), host);
|
|
271
278
|
}
|
|
272
279
|
if (globalOpts.dryRun) {
|
|
273
|
-
return
|
|
280
|
+
return gatewayOutput(await dryRunCapabilityWithEnvelope(host, gatewayDomain, capabilityId, input), host);
|
|
274
281
|
}
|
|
275
282
|
if (!globalOpts.yes) {
|
|
276
283
|
const metadata = await inspectCapability(host, gatewayDomain, capabilityId);
|
|
@@ -283,7 +290,7 @@ Examples:
|
|
|
283
290
|
}
|
|
284
291
|
}
|
|
285
292
|
}
|
|
286
|
-
return
|
|
293
|
+
return gatewayOutput(await executeCapabilityWithEnvelope(host, gatewayDomain, capabilityId, input), host);
|
|
287
294
|
});
|
|
288
295
|
}).addHelpText(
|
|
289
296
|
"after",
|
|
@@ -293,6 +300,15 @@ Examples:
|
|
|
293
300
|
ae-cli capability run analysis.dashboard.list --input input.json`
|
|
294
301
|
);
|
|
295
302
|
}
|
|
303
|
+
function gatewayOutput(envelope, host) {
|
|
304
|
+
return withOutputMetadata(withPageUrl(envelope.data, host), envelope.meta);
|
|
305
|
+
}
|
|
306
|
+
function withPageUrl(value, host) {
|
|
307
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return value;
|
|
308
|
+
const record = value;
|
|
309
|
+
if (typeof record.page_path !== "string" || !/^\/(?![\\/])/.test(record.page_path) || record.page_url !== void 0) return value;
|
|
310
|
+
return { ...record, page_url: new URL(record.page_path, host).toString() };
|
|
311
|
+
}
|
|
296
312
|
async function executeAndPrint(program, action) {
|
|
297
313
|
const globalOpts = program.opts();
|
|
298
314
|
const host = resolveHost(globalOpts.host);
|
|
@@ -312,11 +328,11 @@ async function executeAndPrint(program, action) {
|
|
|
312
328
|
process.exitCode = 1;
|
|
313
329
|
return;
|
|
314
330
|
}
|
|
315
|
-
printCapabilityError(error);
|
|
331
|
+
printCapabilityError(error, host);
|
|
316
332
|
process.exitCode = 1;
|
|
317
333
|
}
|
|
318
334
|
}
|
|
319
|
-
function printCapabilityError(error) {
|
|
335
|
+
function printCapabilityError(error, host) {
|
|
320
336
|
if (error instanceof CapabilityCommandValidationError) {
|
|
321
337
|
printError("validation", error.message, error.hint, error.code);
|
|
322
338
|
return;
|
|
@@ -330,7 +346,7 @@ function printCapabilityError(error) {
|
|
|
330
346
|
return;
|
|
331
347
|
}
|
|
332
348
|
if (error instanceof CapabilityGatewayError) {
|
|
333
|
-
printError("api", error.message, error.hint, error.code);
|
|
349
|
+
printError("api", error.message, error.hint, error.code, withPageUrl(error.meta, host));
|
|
334
350
|
return;
|
|
335
351
|
}
|
|
336
352
|
const message = error instanceof Error ? error.message : String(error);
|
|
@@ -114,9 +114,77 @@ var Logger = class {
|
|
|
114
114
|
};
|
|
115
115
|
var logger = new Logger();
|
|
116
116
|
|
|
117
|
+
// src/core/errors.ts
|
|
118
|
+
var PermissionError = class extends Error {
|
|
119
|
+
constructor(message, code, hint) {
|
|
120
|
+
super(message);
|
|
121
|
+
this.code = code;
|
|
122
|
+
this.hint = hint;
|
|
123
|
+
this.name = "PermissionError";
|
|
124
|
+
}
|
|
125
|
+
code;
|
|
126
|
+
hint;
|
|
127
|
+
};
|
|
128
|
+
var CliValidationError = class extends Error {
|
|
129
|
+
code;
|
|
130
|
+
hint;
|
|
131
|
+
location;
|
|
132
|
+
constructor(message, options = {}) {
|
|
133
|
+
super(message);
|
|
134
|
+
this.name = "CliValidationError";
|
|
135
|
+
this.code = options.code;
|
|
136
|
+
this.hint = options.hint;
|
|
137
|
+
if (options.location) {
|
|
138
|
+
const location = {};
|
|
139
|
+
if (typeof options.location.segment === "number" && Number.isFinite(options.location.segment)) {
|
|
140
|
+
location.segment = options.location.segment;
|
|
141
|
+
}
|
|
142
|
+
if (typeof options.location.record === "number" && Number.isFinite(options.location.record)) {
|
|
143
|
+
location.record = options.location.record;
|
|
144
|
+
}
|
|
145
|
+
if (typeof options.location.field === "string" && options.location.field.length > 0) {
|
|
146
|
+
location.field = options.location.field;
|
|
147
|
+
}
|
|
148
|
+
if (Object.keys(location).length > 0) this.location = location;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
var CommunityReportError = class extends Error {
|
|
153
|
+
code;
|
|
154
|
+
httpStatus;
|
|
155
|
+
hint;
|
|
156
|
+
meta;
|
|
157
|
+
constructor(message, options = {}) {
|
|
158
|
+
super(message, options.cause === void 0 ? void 0 : { cause: options.cause });
|
|
159
|
+
this.name = "CommunityReportError";
|
|
160
|
+
this.code = options.code;
|
|
161
|
+
this.httpStatus = options.httpStatus;
|
|
162
|
+
this.hint = options.hint;
|
|
163
|
+
this.meta = options.meta;
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
var LocalDataUploadError = class extends Error {
|
|
167
|
+
code;
|
|
168
|
+
httpStatus;
|
|
169
|
+
hint;
|
|
170
|
+
meta;
|
|
171
|
+
constructor(message, options = {}) {
|
|
172
|
+
super(message, options.cause === void 0 ? void 0 : { cause: options.cause });
|
|
173
|
+
this.name = "LocalDataUploadError";
|
|
174
|
+
this.code = options.code;
|
|
175
|
+
this.httpStatus = options.httpStatus;
|
|
176
|
+
this.hint = options.hint;
|
|
177
|
+
this.meta = options.meta;
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
|
|
117
181
|
export {
|
|
118
182
|
__require,
|
|
119
183
|
__commonJS,
|
|
120
184
|
__toESM,
|
|
121
|
-
logger
|
|
185
|
+
logger,
|
|
186
|
+
PermissionError,
|
|
187
|
+
CliValidationError,
|
|
188
|
+
CommunityReportError,
|
|
189
|
+
LocalDataUploadError
|
|
122
190
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// src/core/host-guidance.ts
|
|
4
|
+
var AE_TRIAL_URL = "https://thinkingai.cn/request-demo";
|
|
5
|
+
var AE_HOST_SETUP_COMMAND = "ae-cli config set-host <url>";
|
|
6
|
+
function missingAeHostHint(additionalAction) {
|
|
7
|
+
const actions = [
|
|
8
|
+
`If your organization already uses AgenticEngine, ask your administrator for its AE URL, then run: ${AE_HOST_SETUP_COMMAND}.`,
|
|
9
|
+
`If you do not have an AgenticEngine environment, request a trial: ${AE_TRIAL_URL}`
|
|
10
|
+
];
|
|
11
|
+
if (additionalAction) actions.push(additionalAction);
|
|
12
|
+
return actions.join(" ");
|
|
13
|
+
}
|
|
14
|
+
function missingAeHostGuidance() {
|
|
15
|
+
return {
|
|
16
|
+
configure_host: AE_HOST_SETUP_COMMAND,
|
|
17
|
+
existing_customer: "Ask your AgenticEngine administrator for the AE environment URL.",
|
|
18
|
+
request_trial_url: AE_TRIAL_URL
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
AE_TRIAL_URL,
|
|
24
|
+
missingAeHostHint,
|
|
25
|
+
missingAeHostGuidance
|
|
26
|
+
};
|