@thinkingai/ae-cli 6.1.12 → 6.1.13
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 +0 -2
- package/README.zh.md +0 -2
- package/dist/{auth-NN55553T.js → auth-GBMV6TEJ.js} +2 -2
- package/dist/{auth-GDV3H5I4.js → auth-NDSXE54J.js} +4 -4
- package/dist/{capability-DRLGDVS4.js → capability-TAMDRZYV.js} +18 -8
- package/dist/{capability-P6GK3AQH.js → capability-U7TDEEEG.js} +18 -8
- package/dist/{chunk-GJJA4CQZ.js → chunk-3FY3RJ26.js} +0 -4
- package/dist/{chunk-GS2P7LFD.js → chunk-5XUSIK27.js} +2 -2
- package/dist/{chunk-7KQWSBSL.js → chunk-753BUTNZ.js} +3 -3
- package/dist/{chunk-VTXHDCBW.js → chunk-AFXA7BRK.js} +2 -2
- package/dist/chunk-IBH3LDAH.js +556 -0
- package/dist/{chunk-RBNKI5ZW.js → chunk-JUW4AJXN.js} +2 -2
- package/dist/{chunk-TS6BUGUY.js → chunk-QATA32VR.js} +3 -3
- package/dist/{chunk-Z3OXWCIA.js → chunk-S5NTSDBS.js} +2 -2
- package/dist/chunk-UIHQJK5E.js +556 -0
- package/dist/{chunk-VKD5WQKN.js → chunk-VLWOLBGZ.js} +142 -24
- package/dist/{chunk-YTG6Q75E.js → chunk-WZRX4KOH.js} +25 -3
- package/dist/{chunk-YV52FB5G.js → chunk-ZQKDZXDO.js} +1 -1
- package/dist/{cli-token-GL5MS5FK.js → cli-token-4UPER74P.js} +3 -3
- package/dist/{chunk-6A2FUCIS.js → client-L2YDMHQ6.js} +5 -6
- package/dist/{config-4VZNLBKF.js → config-OL2LWGBV.js} +4 -33
- package/dist/index.js +25 -38
- package/dist/{memory-RWJW4XFO.js → memory-MUP7PPL7.js} +4 -4
- package/dist/{memory-VO2ZJCRT.js → memory-U4O5PMXH.js} +4 -4
- package/dist/{metadata-YGTHR2XJ.js → metadata-UORZTW3T.js} +21 -11
- package/dist/{metadata-ZRN2GHPN.js → metadata-VVQ3AQT5.js} +21 -11
- package/dist/{model-CLUIK3K5.js → model-JTUEO5M4.js} +2 -2
- package/dist/{sync-3REDHGY6.js → sync-MOSFNBVR.js} +5 -5
- package/dist/{te-agent-XNPELAKX.js → te-agent-IFKZDHZI.js} +25 -18
- package/dist/{te-analysis-GJI5FZUL.js → te-analysis-KOKHJJPE.js} +1225 -450
- package/dist/{te-analysis-N2BRDJZ5.js → te-analysis-LLOCCBJ4.js} +1225 -450
- package/dist/{te-community-SQXKE5OO.js → te-community-HNKVTERD.js} +207 -12
- package/dist/{te-community-TYSNU3NQ.js → te-community-IWE5B7W6.js} +208 -12
- package/dist/{te-dataops-OWIADNSM.js → te-dataops-KQPYNAE3.js} +262 -145
- package/dist/{te-dataops-5TM7WZDI.js → te-dataops-KXCEB4CS.js} +262 -145
- package/dist/{te-engage-L72HWRGO.js → te-engage-BRLSRVQT.js} +565 -16
- package/dist/{te-engage-QWM4GFS7.js → te-engage-HE4OPZIT.js} +565 -16
- package/dist/{te-experiment-2T2HEZML.js → te-experiment-K5US7RMG.js} +6 -6
- package/dist/{te-experiment-PVEY7AEZ.js → te-experiment-WA7TFMEL.js} +6 -6
- package/dist/{te-kb-VRMEY3D4.js → te-kb-OIH3T6CS.js} +4 -4
- package/dist/{te-system-XGS5EQIQ.js → te-system-AZ3URMUO.js} +515 -11
- package/dist/{te-team-BZRDV2CM.js → te-team-GZPU6UWA.js} +5 -5
- package/dist/{update-HEDXGOJH.js → update-TOBFXF2V.js} +4 -4
- package/package.json +5 -5
- package/skills/ae-agent/SKILL.md +3 -3
- package/skills/ae-agent/references/list-skill-references.md +4 -4
- package/skills/ae-agent/references/read-skill-reference.md +10 -7
- package/skills/ae-agent/references/upload-skill-reference.md +11 -9
- package/skills/ae-analysis/SKILL.md +15 -12
- package/skills/ae-analysis/metadata_resolution.md +150 -0
- package/skills/ae-analysis/references/adhoc_export.md +17 -2
- package/skills/ae-analysis/references/adhoc_run.md +12 -8
- package/skills/ae-analysis/references/ai_models.md +31 -5
- package/skills/ae-analysis/references/analysis_data_retrieval.md +104 -16
- package/skills/ae-analysis/references/analysis_drilldown_contract.md +4 -4
- package/skills/ae-analysis/references/analysis_gateway_assets.md +12 -10
- package/skills/ae-analysis/references/artifact_download.md +4 -3
- package/skills/ae-analysis/references/asset_abnormal_list.md +5 -3
- package/skills/ae-analysis/references/asset_authentication_list.md +5 -3
- package/skills/ae-analysis/references/asset_search.md +5 -3
- package/skills/ae-analysis/references/bi_panel_page_data_export.md +1 -1
- package/skills/ae-analysis/references/bi_panel_page_data_run.md +4 -4
- package/skills/ae-analysis/references/catalog_export.md +28 -0
- package/skills/ae-analysis/references/catalog_list.md +44 -0
- package/skills/ae-analysis/references/command_index.md +72 -63
- package/skills/ae-analysis/references/dashboard_report_data_run.md +11 -4
- package/skills/ae-analysis/references/datatable_version_list.md +5 -3
- package/skills/ae-analysis/references/drilldown_entities_run.md +4 -4
- package/skills/ae-analysis/references/drilldown_events_run.md +2 -2
- package/skills/ae-analysis/references/drilldown_user_events_export.md +1 -1
- package/skills/ae-analysis/references/drilldown_user_events_run.md +2 -2
- package/skills/ae-analysis/references/entity_detail_run.md +4 -4
- package/skills/ae-analysis/references/entity_id_import_options.md +1 -1
- package/skills/ae-analysis/references/event_detail_run.md +4 -4
- package/skills/ae-analysis/references/event_export.md +21 -0
- package/skills/ae-analysis/references/event_list.md +7 -6
- package/skills/ae-analysis/references/exchange_rule_list.md +5 -3
- package/skills/ae-analysis/references/history_tag_data_drilldown_export.md +4 -2
- package/skills/ae-analysis/references/history_tag_data_drilldown_run.md +2 -2
- package/skills/ae-analysis/references/history_tag_data_run.md +2 -2
- package/skills/ae-analysis/references/metric_export.md +21 -0
- package/skills/ae-analysis/references/metric_list.md +8 -7
- package/skills/ae-analysis/references/property_export.md +21 -0
- package/skills/ae-analysis/references/property_list.md +9 -8
- package/skills/ae-analysis/references/query_context_get.md +20 -0
- package/skills/ae-analysis/references/query_create_result_cluster.md +1 -1
- package/skills/ae-analysis/references/report_change_log_list.md +1 -1
- package/skills/ae-analysis/references/report_create.md +3 -3
- package/skills/ae-analysis/references/report_data_run.md +8 -8
- package/skills/ae-analysis/references/report_update.md +3 -3
- package/skills/ae-analysis/references/report_version_rollback.md +1 -1
- package/skills/ae-analysis/references/rule_list.md +6 -4
- package/skills/ae-analysis/references/run_inspect.md +8 -5
- package/skills/ae-analysis/references/run_wait.md +37 -0
- package/skills/ae-analysis/references/user_cluster_export.md +13 -0
- package/skills/ae-analysis/references/user_cluster_list.md +6 -2
- package/skills/ae-analysis/references/user_cluster_member_export.md +5 -3
- package/skills/ae-analysis/references/user_cluster_member_list.md +4 -4
- package/skills/ae-analysis/references/user_tag_export.md +13 -0
- package/skills/ae-analysis/references/user_tag_list.md +6 -2
- package/skills/ae-analysis/references/user_tag_member_export.md +5 -3
- package/skills/ae-analysis/references/user_tag_member_list.md +4 -4
- package/skills/ae-analysis/references/virtual_property_create.md +2 -2
- package/skills/ae-community/SKILL.md +2 -2
- package/skills/ae-dataops/SKILL.md +4 -3
- package/skills/ae-dataops/references/dataops-flow-create.md +47 -3
- package/skills/ae-engage/SKILL.md +46 -6
- package/skills/ae-engage/references/build-task-save-guide.md +12 -0
- package/skills/ae-engage/references/cancel-query-run.md +31 -0
- package/skills/ae-engage/references/config-item-analysis-report.md +14 -1
- package/skills/ae-engage/references/config-item-strategy-comparison.md +11 -1
- package/skills/ae-engage/references/config-item-trigger-report.md +15 -1
- package/skills/ae-engage/references/flow-metric-detail-report.md +134 -0
- package/skills/ae-engage/references/flow-metric-update.md +77 -0
- package/skills/ae-engage/references/flow-metric-user.md +118 -0
- package/skills/ae-engage/references/flow-node-metric-user.md +122 -0
- package/skills/ae-engage/references/flow-node-user.md +122 -0
- package/skills/ae-engage/references/push-record-query.md +32 -1
- package/skills/ae-engage/references/save-task.md +9 -0
- package/skills/ae-engage/references/task-data-detail.md +9 -2
- package/skills/ae-engage/references/task-metric-detail.md +9 -2
- package/skills/ae-engage/references/task-submit-approval.md +3 -0
- package/skills/ae-experiment/references/save_experiment.md +4 -0
- package/skills/ae-experiment-design/SKILL.md +1 -1
- package/skills/ae-experiment-design/references/platform-operations.md +1 -1
- package/skills/ae-experiment-insight/references/platform-operations.md +1 -1
- package/skills/ae-metadata/SKILL.md +2 -1
- package/skills/ae-metadata/references/metadata_data_table_download.md +10 -2
- package/skills/ae-metadata/references/metadata_data_table_list.md +5 -2
- package/skills/ae-system/SKILL.md +66 -3
- package/dist/chunk-DT6Y3TD7.js +0 -232
- package/dist/chunk-MVDZ7DBQ.js +0 -231
- package/dist/chunk-NBPKWKRA.js +0 -51
- package/dist/client-DAIPF7XN.js +0 -23
- package/dist/raw-52B4UKO4.js +0 -71
- package/dist/te-meta-53BVXPFI.js +0 -95
- package/dist/te-meta-TOCBPBXI.js +0 -95
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildCapabilityGatewayUrl,
|
|
3
3
|
callCapabilityApi
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-5XUSIK27.js";
|
|
5
|
+
import "./chunk-S5NTSDBS.js";
|
|
6
|
+
import "./chunk-ZQKDZXDO.js";
|
|
7
|
+
import "./chunk-3FY3RJ26.js";
|
|
8
8
|
import "./chunk-AXDXJTPC.js";
|
|
9
9
|
import "./chunk-JHENBQ5B.js";
|
|
10
10
|
|
|
@@ -1,23 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
withAsyncArtifactLifecycle
|
|
3
|
+
} from "./chunk-IBH3LDAH.js";
|
|
1
4
|
import {
|
|
2
5
|
createCapabilityCommand
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QATA32VR.js";
|
|
4
7
|
import {
|
|
5
8
|
registerCapabilityGatewayRoute
|
|
6
9
|
} from "./chunk-PTE56QPL.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-WZRX4KOH.js";
|
|
11
|
+
import "./chunk-JUW4AJXN.js";
|
|
12
|
+
import "./chunk-S5NTSDBS.js";
|
|
13
|
+
import "./chunk-ZQKDZXDO.js";
|
|
14
|
+
import "./chunk-3FY3RJ26.js";
|
|
12
15
|
import "./chunk-AXDXJTPC.js";
|
|
13
16
|
import "./chunk-JHENBQ5B.js";
|
|
14
17
|
|
|
15
18
|
// src/commands/metadata/shared.ts
|
|
16
19
|
function createCapabilityCommand2(config) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
const { asyncArtifact, ...coreConfig } = config;
|
|
21
|
+
const command = createCapabilityCommand({
|
|
22
|
+
...coreConfig,
|
|
23
|
+
cliService: coreConfig.cliService ?? "metadata"
|
|
20
24
|
});
|
|
25
|
+
return asyncArtifact ? withAsyncArtifactLifecycle(command) : command;
|
|
21
26
|
}
|
|
22
27
|
function optionalString(ctx, name) {
|
|
23
28
|
const value = ctx.str(name);
|
|
@@ -123,6 +128,7 @@ var dataTableDownload = createCapabilityCommand2({
|
|
|
123
128
|
resource: "data-table",
|
|
124
129
|
command: "download",
|
|
125
130
|
capabilityId: "metadata.data_table.download",
|
|
131
|
+
asyncArtifact: true,
|
|
126
132
|
description: "Download a metadata data table export artifact.",
|
|
127
133
|
flags: [
|
|
128
134
|
{ name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" },
|
|
@@ -165,11 +171,15 @@ var dataTableList = createCapabilityCommand2({
|
|
|
165
171
|
capabilityId: "metadata.data_table.list",
|
|
166
172
|
description: "List metadata data tables in a project. Requires metadata view permission.",
|
|
167
173
|
flags: [
|
|
168
|
-
{ name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" }
|
|
174
|
+
{ name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" },
|
|
175
|
+
{ name: "limit", type: "number", required: false, desc: "Page size. Default: 50, max: 200.", alias: "l", min: 1, max: 200 },
|
|
176
|
+
{ name: "offset", type: "number", required: false, desc: "Zero-based page offset. Default: 0.", alias: "o", min: 0 }
|
|
169
177
|
],
|
|
170
178
|
risk: "read",
|
|
171
179
|
buildInput: (ctx) => ({
|
|
172
|
-
project_id: ctx.num("project-id")
|
|
180
|
+
project_id: ctx.num("project-id"),
|
|
181
|
+
limit: optionalNumber(ctx, "limit"),
|
|
182
|
+
offset: optionalNumber(ctx, "offset")
|
|
173
183
|
})
|
|
174
184
|
});
|
|
175
185
|
|
|
@@ -1,23 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
withAsyncArtifactLifecycle
|
|
3
|
+
} from "./chunk-UIHQJK5E.js";
|
|
1
4
|
import {
|
|
2
5
|
createCapabilityCommand
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-753BUTNZ.js";
|
|
4
7
|
import {
|
|
5
8
|
registerCapabilityGatewayRoute
|
|
6
9
|
} from "./chunk-PTE56QPL.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-WZRX4KOH.js";
|
|
11
|
+
import "./chunk-5XUSIK27.js";
|
|
12
|
+
import "./chunk-S5NTSDBS.js";
|
|
13
|
+
import "./chunk-ZQKDZXDO.js";
|
|
14
|
+
import "./chunk-3FY3RJ26.js";
|
|
12
15
|
import "./chunk-AXDXJTPC.js";
|
|
13
16
|
import "./chunk-JHENBQ5B.js";
|
|
14
17
|
|
|
15
18
|
// src/commands/metadata/shared.ts
|
|
16
19
|
function createCapabilityCommand2(config) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
const { asyncArtifact, ...coreConfig } = config;
|
|
21
|
+
const command = createCapabilityCommand({
|
|
22
|
+
...coreConfig,
|
|
23
|
+
cliService: coreConfig.cliService ?? "metadata"
|
|
20
24
|
});
|
|
25
|
+
return asyncArtifact ? withAsyncArtifactLifecycle(command) : command;
|
|
21
26
|
}
|
|
22
27
|
function optionalString(ctx, name) {
|
|
23
28
|
const value = ctx.str(name);
|
|
@@ -123,6 +128,7 @@ var dataTableDownload = createCapabilityCommand2({
|
|
|
123
128
|
resource: "data-table",
|
|
124
129
|
command: "download",
|
|
125
130
|
capabilityId: "metadata.data_table.download",
|
|
131
|
+
asyncArtifact: true,
|
|
126
132
|
description: "Download a metadata data table export artifact.",
|
|
127
133
|
flags: [
|
|
128
134
|
{ name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" },
|
|
@@ -165,11 +171,15 @@ var dataTableList = createCapabilityCommand2({
|
|
|
165
171
|
capabilityId: "metadata.data_table.list",
|
|
166
172
|
description: "List metadata data tables in a project. Requires metadata view permission.",
|
|
167
173
|
flags: [
|
|
168
|
-
{ name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" }
|
|
174
|
+
{ name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" },
|
|
175
|
+
{ name: "limit", type: "number", required: false, desc: "Page size. Default: 50, max: 200.", alias: "l", min: 1, max: 200 },
|
|
176
|
+
{ name: "offset", type: "number", required: false, desc: "Zero-based page offset. Default: 0.", alias: "o", min: 0 }
|
|
169
177
|
],
|
|
170
178
|
risk: "read",
|
|
171
179
|
buildInput: (ctx) => ({
|
|
172
|
-
project_id: ctx.num("project-id")
|
|
180
|
+
project_id: ctx.num("project-id"),
|
|
181
|
+
limit: optionalNumber(ctx, "limit"),
|
|
182
|
+
offset: optionalNumber(ctx, "offset")
|
|
173
183
|
})
|
|
174
184
|
});
|
|
175
185
|
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
getClaudeConfigDir,
|
|
12
12
|
getSandboxModels,
|
|
13
13
|
postSandboxModelSelection
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-VLWOLBGZ.js";
|
|
15
|
+
import "./chunk-3FY3RJ26.js";
|
|
16
16
|
import "./chunk-JHENBQ5B.js";
|
|
17
17
|
|
|
18
18
|
// src/commands/model/index.ts
|
|
@@ -25,13 +25,13 @@ import {
|
|
|
25
25
|
postSandboxSyncPull,
|
|
26
26
|
postToMainApp,
|
|
27
27
|
uploadToMainApp
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-VLWOLBGZ.js";
|
|
29
29
|
import {
|
|
30
30
|
printError
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-WZRX4KOH.js";
|
|
32
|
+
import "./chunk-S5NTSDBS.js";
|
|
33
|
+
import "./chunk-ZQKDZXDO.js";
|
|
34
|
+
import "./chunk-3FY3RJ26.js";
|
|
35
35
|
import {
|
|
36
36
|
__commonJS,
|
|
37
37
|
__require,
|
|
@@ -9,8 +9,11 @@ import {
|
|
|
9
9
|
postToMainApp,
|
|
10
10
|
putToMainApp,
|
|
11
11
|
uploadToMainApp
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-VLWOLBGZ.js";
|
|
13
|
+
import "./chunk-3FY3RJ26.js";
|
|
14
|
+
import {
|
|
15
|
+
CliValidationError
|
|
16
|
+
} from "./chunk-AXDXJTPC.js";
|
|
14
17
|
import "./chunk-JHENBQ5B.js";
|
|
15
18
|
|
|
16
19
|
// src/commands/te-agent/agents.ts
|
|
@@ -1562,15 +1565,11 @@ function makeAssetListCommand(commandName, description, dirName) {
|
|
|
1562
1565
|
}
|
|
1563
1566
|
};
|
|
1564
1567
|
}
|
|
1565
|
-
function makeAssetUploadCommand(commandName, description, dirName
|
|
1568
|
+
function makeAssetUploadCommand(commandName, description, dirName) {
|
|
1566
1569
|
const validate = (ctx) => {
|
|
1567
1570
|
const filePath = ctx.str("file");
|
|
1568
1571
|
if (!filePath) throw new Error("--file is required");
|
|
1569
1572
|
if (!existsSync(resolve(filePath))) throw new Error(`File not found: ${resolve(filePath)}`);
|
|
1570
|
-
if (mdOnly) {
|
|
1571
|
-
const ext = extname(filePath).toLowerCase();
|
|
1572
|
-
if (ext !== ".md") throw new Error("--file must be a .md file for references");
|
|
1573
|
-
}
|
|
1574
1573
|
};
|
|
1575
1574
|
return {
|
|
1576
1575
|
service: "agent",
|
|
@@ -1587,7 +1586,7 @@ function makeAssetUploadCommand(commandName, description, dirName, mdOnly) {
|
|
|
1587
1586
|
name: "file",
|
|
1588
1587
|
type: "string",
|
|
1589
1588
|
required: true,
|
|
1590
|
-
desc:
|
|
1589
|
+
desc: "Local file path to upload (max 1MB)"
|
|
1591
1590
|
},
|
|
1592
1591
|
{
|
|
1593
1592
|
name: "sub-path",
|
|
@@ -1609,6 +1608,11 @@ function makeAssetUploadCommand(commandName, description, dirName, mdOnly) {
|
|
|
1609
1608
|
}
|
|
1610
1609
|
};
|
|
1611
1610
|
}
|
|
1611
|
+
function isTextContentType(contentType) {
|
|
1612
|
+
const mediaType = contentType?.split(";", 1)[0]?.trim().toLowerCase();
|
|
1613
|
+
if (!mediaType) return false;
|
|
1614
|
+
return mediaType.startsWith("text/") || mediaType === "application/json" || mediaType.endsWith("+json") || mediaType === "application/xml" || mediaType.endsWith("+xml");
|
|
1615
|
+
}
|
|
1612
1616
|
function makeAssetReadCommand(commandName, description, dirName) {
|
|
1613
1617
|
return {
|
|
1614
1618
|
service: "agent",
|
|
@@ -1643,13 +1647,19 @@ function makeAssetReadCommand(commandName, description, dirName) {
|
|
|
1643
1647
|
const filePath = ctx.str("path");
|
|
1644
1648
|
const encodedPath = filePath.split("/").map((seg) => encodeURIComponent(seg)).join("/");
|
|
1645
1649
|
const url = `${BASE_PATH5}/${encodeURIComponent(ctx.str("id"))}/${dirName}/${encodedPath}`;
|
|
1646
|
-
const { buffer, fileName } = await getBufferFromMainApp(url);
|
|
1650
|
+
const { buffer, fileName, contentType } = await getBufferFromMainApp(url);
|
|
1647
1651
|
const outputPath = ctx.str("output");
|
|
1648
1652
|
if (outputPath) {
|
|
1649
1653
|
const resolved = resolve(outputPath);
|
|
1650
1654
|
writeFileSync(resolved, buffer);
|
|
1651
1655
|
return { saved: true, path: resolved, size: buffer.length, fileName };
|
|
1652
1656
|
}
|
|
1657
|
+
if (dirName === "references" && !isTextContentType(contentType)) {
|
|
1658
|
+
throw new CliValidationError("Binary content requires --output", {
|
|
1659
|
+
code: "output_required",
|
|
1660
|
+
hint: "Re-run with --output <path> to preserve the original bytes."
|
|
1661
|
+
});
|
|
1662
|
+
}
|
|
1653
1663
|
const content = buffer.toString("utf8");
|
|
1654
1664
|
return { content, fileName };
|
|
1655
1665
|
}
|
|
@@ -1829,8 +1839,7 @@ var listSkillAssets = makeAssetListCommand(
|
|
|
1829
1839
|
var uploadSkillAsset = makeAssetUploadCommand(
|
|
1830
1840
|
"+upload-skill-asset",
|
|
1831
1841
|
"Upload a single file to a Skill assets directory (max 1MB)",
|
|
1832
|
-
"assets"
|
|
1833
|
-
false
|
|
1842
|
+
"assets"
|
|
1834
1843
|
);
|
|
1835
1844
|
var readSkillAsset = makeAssetReadCommand(
|
|
1836
1845
|
"+read-skill-asset",
|
|
@@ -1844,18 +1853,17 @@ var delSkillAsset = makeAssetDelCommand(
|
|
|
1844
1853
|
);
|
|
1845
1854
|
var listSkillReferences = makeAssetListCommand(
|
|
1846
1855
|
"+list-skill-references",
|
|
1847
|
-
"List all
|
|
1856
|
+
"List all files in a Skill references directory",
|
|
1848
1857
|
"references"
|
|
1849
1858
|
);
|
|
1850
1859
|
var uploadSkillReference = makeAssetUploadCommand(
|
|
1851
1860
|
"+upload-skill-reference",
|
|
1852
|
-
"Upload a single
|
|
1853
|
-
"references"
|
|
1854
|
-
true
|
|
1861
|
+
"Upload a single file to a Skill references directory (max 1MB)",
|
|
1862
|
+
"references"
|
|
1855
1863
|
);
|
|
1856
1864
|
var readSkillReference = makeAssetReadCommand(
|
|
1857
1865
|
"+read-skill-reference",
|
|
1858
|
-
"Read a Skill reference
|
|
1866
|
+
"Read a Skill reference file (binary-safe; use --output for non-text files)",
|
|
1859
1867
|
"references"
|
|
1860
1868
|
);
|
|
1861
1869
|
var delSkillReference = makeAssetDelCommand(
|
|
@@ -1871,8 +1879,7 @@ var listSkillScripts = makeAssetListCommand(
|
|
|
1871
1879
|
var uploadSkillScript = makeAssetUploadCommand(
|
|
1872
1880
|
"+upload-skill-script",
|
|
1873
1881
|
"Upload a single file to a Skill scripts directory (max 1MB)",
|
|
1874
|
-
"scripts"
|
|
1875
|
-
false
|
|
1882
|
+
"scripts"
|
|
1876
1883
|
);
|
|
1877
1884
|
var readSkillScript = makeAssetReadCommand(
|
|
1878
1885
|
"+read-skill-script",
|