@thinkingai/ae-cli 6.1.32 → 6.1.33
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 +6 -3
- package/README.zh.md +8 -3
- package/bin/runtime-capabilities.json +1 -1
- package/dist/{ai-monitor-MKMHSSNI.js → ai-monitor-OHTSU6SV.js} +10 -9
- package/dist/ai-monitor.js +14 -13
- package/dist/{auth-CZHHPZOQ.js → auth-2MOK4OI6.js} +18 -9
- package/dist/{automation-FLCPFMN4.js → automation-6L6IAYRK.js} +6 -7
- package/dist/{capability-64KVJFIA.js → capability-EMIHQJA3.js} +10 -9
- package/dist/{chunk-OAWPT7VP.js → chunk-2I5SZ5DS.js} +2 -2
- package/dist/{chunk-4XKTRCRK.js → chunk-4IQYPWCX.js} +9 -8
- package/dist/{chunk-T7WF4HYW.js → chunk-7DHSB3FL.js} +3 -3
- package/dist/{chunk-4PSTYEG5.js → chunk-AMURHMS3.js} +11 -7
- package/dist/{chunk-6M7ZEDT2.js → chunk-BQFLABJQ.js} +11 -7
- package/dist/{chunk-KTJXD27G.js → chunk-COOMXFUG.js} +3 -3
- package/dist/{chunk-NLEXY2TM.js → chunk-DWAG2QJM.js} +7 -5
- package/dist/{chunk-DWBYNGSR.js → chunk-E3ONSFUN.js} +165 -186
- package/dist/{chunk-CF6JTT2U.js → chunk-EFGUBGA6.js} +1 -1
- package/dist/{chunk-BNBCMCYN.js → chunk-EWVEAERM.js} +11 -11
- package/dist/{chunk-F2VFZUGG.js → chunk-HIMOBNEY.js} +2 -2
- package/dist/{chunk-JEUXDY3B.js → chunk-HQED4YB4.js} +1 -1
- package/dist/{chunk-2F64AZYH.js → chunk-KA5WKR5P.js} +2 -2
- package/dist/{chunk-FCAA7I2D.js → chunk-KD5UC33N.js} +23 -9
- package/dist/{chunk-P7QDCWJ6.js → chunk-LFJ7N36I.js} +5 -1
- package/dist/chunk-NNK3JBH4.js +60 -0
- package/dist/{chunk-3ULDJJTZ.js → chunk-O45NOIWR.js} +2 -2
- package/dist/{chunk-HTZ2MLYA.js → chunk-PLNS5J33.js} +11 -5
- package/dist/chunk-PUSFEC6B.js +29 -0
- package/dist/{chunk-Z3Q2AEIN.js → chunk-R2SVAO4G.js} +14 -2
- package/dist/{chunk-TMQGS4TO.js → chunk-RC3PPCYD.js} +3 -3
- package/dist/{chunk-HVMCPKOZ.js → chunk-THTROEGD.js} +1 -1
- package/dist/{chunk-QVRIDN42.js → chunk-UCMO4LKL.js} +2 -2
- package/dist/{chunk-5M5LBRR3.js → chunk-VLOGOM7N.js} +13 -7
- package/dist/{chunk-72NJKS7O.js → chunk-XZDKAR4N.js} +4 -4
- package/dist/{chunk-IDDWEZ7F.js → chunk-YE6MJB5V.js} +3 -3
- package/dist/{community-report-client-TJVCLZ3K.js → community-report-client-ULRNXLQV.js} +1 -1
- package/dist/{compat-check-ZJNCMNQV.js → compat-check-CADG7GND.js} +5 -4
- package/dist/{config-FSH2NMNZ.js → config-PFD3KWQG.js} +7 -6
- package/dist/{context-YAQG6YQC.js → context-SOQDFZIB.js} +8 -6
- package/dist/{data-integration-QE37EQ3A.js → data-integration-UNJ7EPW2.js} +6 -6
- package/dist/{evaluation-2JSF4V47.js → evaluation-Q3AIGFOG.js} +5 -5
- package/dist/index.js +47 -43
- package/dist/{local-data-upload-client-KCMG6J62.js → local-data-upload-client-YTWMAAGE.js} +1 -1
- package/dist/{memory-VEZZVAAP.js → memory-HKNGUIPK.js} +6 -7
- package/dist/{metadata-3IWHX3V4.js → metadata-GFWR5ZHC.js} +10 -9
- package/dist/{model-T7H7Q6BG.js → model-NAKQWK4W.js} +4 -5
- package/dist/{personal-semantic-preference-YITU23SA.js → personal-semantic-preference-JCTKXLC3.js} +45 -14
- package/dist/{project-semantic-MHEXJF3C.js → project-semantic-B2NWQOKK.js} +9 -8
- package/dist/{sync-AQHVCSPI.js → sync-UQH4J4BD.js} +9 -9
- package/dist/{te-agent-RXI7WOH4.js → te-agent-L6EYFQCC.js} +303 -17
- package/dist/{te-analysis-CZY74HVF.js → te-analysis-U7NNOY66.js} +25 -20
- package/dist/{te-community-DKCYUBCM.js → te-community-3UQEW3KD.js} +13 -11
- package/dist/{te-dataops-QEH6VE56.js → te-dataops-SUNYXF5G.js} +13 -11
- package/dist/{te-engage-WK7WKDKF.js → te-engage-KMXZJ2KN.js} +9 -8
- package/dist/{te-experiment-LH3RPIOE.js → te-experiment-IEYKP6VC.js} +215 -28
- package/dist/{te-kb-UPORIOVN.js → te-kb-MT3V5ZMH.js} +68 -17
- package/dist/{te-system-AL4B4XZL.js → te-system-F4ZU2HRQ.js} +6 -7
- package/dist/{te-team-LLVTO2G4.js → te-team-M6E6XQ5H.js} +9 -8
- package/dist/{things-XLMLBYQR.js → things-FRLBZV2Z.js} +9 -8
- package/dist/{update-7J5UQHSK.js → update-NULYHVE6.js} +8 -6
- package/dist/{workspace-FF2HXJGR.js → workspace-Z7L33OBQ.js} +6 -7
- package/package.json +6 -3
- package/skills/ae-agent/SKILL.md +19 -5
- package/skills/ae-agent/references/a2a.md +103 -0
- package/skills/ae-agent/references/command_index.md +11 -0
- package/skills/ae-analysis/SKILL.md +35 -23
- package/skills/ae-analysis/references/analysis_data_retrieval.md +1 -1
- package/skills/ae-analysis/references/asset_authentication_export.md +1 -1
- package/skills/ae-analysis/references/asset_authentication_update.md +6 -2
- package/skills/ae-analysis/references/bad_case_review.md +4 -4
- package/skills/ae-analysis/references/command_index.md +7 -7
- package/skills/ae-analysis/references/governance_recommendation_export.md +2 -2
- package/skills/ae-analysis/references/personal_semantic_preference_add.md +9 -1
- package/skills/ae-analysis/references/personal_semantic_preference_delete.md +2 -0
- package/skills/ae-analysis/references/personal_semantic_preference_get.md +2 -0
- package/skills/ae-analysis/references/personal_semantic_preference_list.md +10 -2
- package/skills/ae-analysis/references/personal_semantic_preference_update.md +8 -0
- package/skills/ae-analysis/references/project_owner_update.md +5 -1
- package/skills/ae-analysis/references/scenario_evaluation.md +17 -1
- package/skills/ae-analysis/references/scenario_list.md +5 -6
- package/skills/ae-capability/SKILL.md +8 -4
- package/skills/ae-experiment/SKILL.md +45 -16
- package/skills/ae-experiment/references/experiment_approval.md +87 -29
- package/skills/ae-experiment/references/manage_experiment.md +7 -3
- package/skills/ae-experiment/references/manage_traffic_domains.md +131 -0
- package/skills/ae-experiment/references/query_experiment_detail.md +8 -0
- package/skills/ae-experiment/references/query_experiment_list.md +6 -0
- package/skills/ae-experiment/references/save_experiment.md +39 -13
- package/skills/ae-experiment/references/save_metric.md +29 -2
- package/skills/ae-experiment/references/save_submit_experiment.md +11 -7
- package/skills/ae-experiment/references/save_submit_external_experiment.md +16 -14
- package/skills/ae-experiment/references/save_traffic_layer.md +17 -1
- package/skills/ae-kb/SKILL.md +4 -2
- package/skills/ae-kb/references/publication.md +45 -0
- package/dist/chunk-Y74WTIKJ.js +0 -10
package/README.md
CHANGED
|
@@ -119,12 +119,12 @@ The table covers every current root command individually. Use `ae-cli --help` fo
|
|
|
119
119
|
| Category | Root command | Purpose |
|
|
120
120
|
|---|---|---|
|
|
121
121
|
| Analysis and projects | `analysis` | Reports, dashboards, ad-hoc analysis, drilldowns, details, alerts, tags, and cohorts |
|
|
122
|
-
| Analysis and projects | `experiment` | Atlas experiments, reports, traffic layers, buckets, Features, metrics, and operation logs |
|
|
122
|
+
| Analysis and projects | `experiment` | Atlas experiments, reports, traffic domains and layers, buckets, Features, metrics, and operation logs |
|
|
123
123
|
| Analysis and projects | `analysis-meta` | Event/property catalogs, metrics, virtual metadata, tracking governance, and project analysis settings |
|
|
124
124
|
| Analysis and projects | `analysis-governance` | Data-asset search, lineage, impact analysis, certification, and governance |
|
|
125
125
|
| Analysis and projects | `project` | Project information, members, roles, permissions, entities, time zones, and handover settings |
|
|
126
126
|
| Analysis and projects | `metadata` | Capability-backed data-table, property, and dimension-table binding operations |
|
|
127
|
-
| Analysis and projects | `personal-semantic-preference` |
|
|
127
|
+
| Analysis and projects | `personal-semantic-preference` | Current-user semantic preferences for a project or across projects (`--project-id -1`) |
|
|
128
128
|
| Analysis and projects | `project-semantic` | Governed project semantics, knowledge-base asset packages, candidate validation, review, and publishing |
|
|
129
129
|
| Observability | `ai-monitor` | Read traces, conversations, Bad Traces, metrics, cost, security and existing diagnosis reports; export verified ZIPs ([guide](skills/ae-ai-monitor/SKILL.md)) |
|
|
130
130
|
| Data and tracking | `tracking` | Tracking plans, SDK samples, checks, ingestion diagnostics, code generation, and bundled wiki |
|
|
@@ -179,7 +179,7 @@ ae-cli experiment experiment manage --project-id 1 --exp-id exp_123 --target-sta
|
|
|
179
179
|
ae-cli experiment experiment get --project-id 1 --exp-id exp_123
|
|
180
180
|
```
|
|
181
181
|
|
|
182
|
-
This submission path works on older and approval-
|
|
182
|
+
This submission path works on older and approval-capable servers. Saving a draft does not start it. On updated servers, Feature experiments require approval only when the project approver roster is non-empty; external experiments are exempt. Exempt Feature submissions retain the existing manual or scheduled start. When approval is required, approval can start a due Feature experiment; scheduled starts are checked every half hour. Verify runtime status and any approval with `experiment experiment get`. Before using dedicated approval commands, check [server compatibility](skills/ae-experiment/references/experiment_approval.md#server-compatibility); submit only once. See [Feature timing](skills/ae-experiment/references/save_experiment.md#feature-timing) for scheduling.
|
|
183
183
|
|
|
184
184
|
## Capability Gateway
|
|
185
185
|
|
|
@@ -450,3 +450,6 @@ npm run verify:install
|
|
|
450
450
|
## License
|
|
451
451
|
|
|
452
452
|
MIT
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
Use `ae-cli agent a2a +card --url <A2A-link>` to discover authorized workspaces and models, then pass `--space-id <id>` and `--model <id>` to `agent a2a +send`. Use `agent a2a list`, `cancel`, and `delete-context` to manage tasks and conversations. See the [A2A command reference](skills/ae-agent/references/a2a.md).
|
package/README.zh.md
CHANGED
|
@@ -123,12 +123,12 @@ ae-cli capability list --domain analysis --jq '.capabilities[] | .id'
|
|
|
123
123
|
| 类别 | 根命令 | 用途 |
|
|
124
124
|
|---|---|---|
|
|
125
125
|
| 分析与项目 | `analysis` | 报告、看板、即席分析、下钻、详情、告警、标签和分群 |
|
|
126
|
-
| 分析与项目 | `experiment` | Atlas
|
|
126
|
+
| 分析与项目 | `experiment` | Atlas 实验、报表、流量域与流量层、分桶、Feature、指标和操作日志 |
|
|
127
127
|
| 分析与项目 | `analysis-meta` | 事件/属性目录、指标、虚拟元数据、埋点治理和项目分析配置 |
|
|
128
128
|
| 分析与项目 | `analysis-governance` | 数据资产搜索、血缘、影响分析、认证和治理 |
|
|
129
129
|
| 分析与项目 | `project` | 项目信息、成员、角色、权限、实体、时区和交接配置 |
|
|
130
130
|
| 分析与项目 | `metadata` | 基于 Capability Gateway 的数据表、属性及维度表绑定 |
|
|
131
|
-
| 分析与项目 | `personal-semantic-preference` |
|
|
131
|
+
| 分析与项目 | `personal-semantic-preference` | 当前用户的项目内或跨项目个人语义偏好(`--project-id -1`) |
|
|
132
132
|
| 分析与项目 | `project-semantic` | 项目语义治理、知识库资产包、候选校验、审核和发布 |
|
|
133
133
|
| 可观测性 | `ai-monitor` | 查询 Trace、会话、Bad Trace、指标、成本、安全与已有诊断报告,导出校验后的 ZIP([指南](skills/ae-ai-monitor/SKILL.md)) |
|
|
134
134
|
| 数据与埋点 | `tracking` | 埋点方案、SDK 示例、检查、采集诊断、代码生成和内置 Wiki |
|
|
@@ -183,7 +183,7 @@ ae-cli experiment experiment manage --project-id 1 --exp-id exp_123 --target-sta
|
|
|
183
183
|
ae-cli experiment experiment get --project-id 1 --exp-id exp_123
|
|
184
184
|
```
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
此提交流程兼容旧服务端和支持审批的服务端。保存草稿不会开启实验。新版服务端仅在项目审批人名单非空时要求 Feature 实验审批,外部实验免审批;免审批的 Feature 提交沿用原有手动或预约开启流程。需要审批时,批准可能开启已到开始时间的 Feature 实验,预约由服务端每半小时检查。使用 `experiment experiment get` 确认实际运行状态及审批信息。使用专用审批命令前,按 [服务端兼容性指引](skills/ae-experiment/references/experiment_approval.md#server-compatibility) 确认能力支持,同一次提交只执行一次。时间配置见 [Feature 时间配置](skills/ae-experiment/references/save_experiment.md#feature-timing)。
|
|
187
187
|
|
|
188
188
|
## Capability Gateway
|
|
189
189
|
|
|
@@ -451,3 +451,8 @@ npm run verify:install
|
|
|
451
451
|
## 许可证
|
|
452
452
|
|
|
453
453
|
MIT
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
### 通过 A2A 调用 Agent
|
|
457
|
+
|
|
458
|
+
先登录目标部署,再用 `ae-cli agent a2a +card --url <A2A-link>` 查看可用空间和模型;调用 `agent a2a +send` 时可指定 `--space-id <id>` 和 `--model <id>`。用 `agent a2a +get` 查询结果,`list`、`cancel` 和 `delete-context` 管理任务及会话。CLI 自动使用当前用户的授权。详见 [A2A 命令参考](skills/ae-agent/references/a2a.md)。
|
|
@@ -9,16 +9,17 @@ import {
|
|
|
9
9
|
traceCount,
|
|
10
10
|
traceGet,
|
|
11
11
|
traceList
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-YE6MJB5V.js";
|
|
13
|
+
import "./chunk-RC3PPCYD.js";
|
|
14
14
|
import "./chunk-AWW2T2WL.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-O45NOIWR.js";
|
|
16
|
+
import "./chunk-4IQYPWCX.js";
|
|
17
|
+
import "./chunk-NNK3JBH4.js";
|
|
18
|
+
import "./chunk-E3ONSFUN.js";
|
|
19
|
+
import "./chunk-PUSFEC6B.js";
|
|
20
|
+
import "./chunk-PLNS5J33.js";
|
|
21
|
+
import "./chunk-AMURHMS3.js";
|
|
22
|
+
import "./chunk-R2SVAO4G.js";
|
|
22
23
|
export {
|
|
23
24
|
conversationCount,
|
|
24
25
|
conversationGet,
|
package/dist/ai-monitor.js
CHANGED
|
@@ -3,25 +3,26 @@ import {
|
|
|
3
3
|
configureBusinessCommands,
|
|
4
4
|
parseProgram,
|
|
5
5
|
runCommand
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-EWVEAERM.js";
|
|
7
|
+
import "./chunk-EFGUBGA6.js";
|
|
8
|
+
import "./chunk-VLOGOM7N.js";
|
|
9
9
|
import {
|
|
10
10
|
ai_monitor_default
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-YE6MJB5V.js";
|
|
12
|
+
import "./chunk-LFJ7N36I.js";
|
|
13
|
+
import "./chunk-RC3PPCYD.js";
|
|
14
14
|
import "./chunk-AWW2T2WL.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-O45NOIWR.js";
|
|
16
|
+
import "./chunk-4IQYPWCX.js";
|
|
17
|
+
import "./chunk-NNK3JBH4.js";
|
|
18
|
+
import "./chunk-E3ONSFUN.js";
|
|
19
|
+
import "./chunk-PUSFEC6B.js";
|
|
20
|
+
import "./chunk-PLNS5J33.js";
|
|
21
|
+
import "./chunk-AMURHMS3.js";
|
|
21
22
|
import {
|
|
22
23
|
readExternalCliToken,
|
|
23
24
|
setExternalCliTokenFile
|
|
24
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-R2SVAO4G.js";
|
|
25
26
|
|
|
26
27
|
// src/ai-monitor.ts
|
|
27
28
|
import { Command as CommanderCommand, Option } from "commander";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
environmentRefreshOutput,
|
|
4
4
|
invalidateBusinessSkillSynchronization,
|
|
5
5
|
refreshEnvironmentAfterLogin
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DWAG2QJM.js";
|
|
7
7
|
import {
|
|
8
8
|
MultiselectCancelled,
|
|
9
9
|
promptSingleSelect
|
|
@@ -14,15 +14,17 @@ import {
|
|
|
14
14
|
} from "./chunk-6ZIQV5GW.js";
|
|
15
15
|
import {
|
|
16
16
|
resolveHost
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KA5WKR5P.js";
|
|
18
18
|
import {
|
|
19
19
|
printError,
|
|
20
20
|
printOutput
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-O45NOIWR.js";
|
|
22
22
|
import {
|
|
23
|
-
getLocalCliPackageInfo,
|
|
24
23
|
runHostCompatCheck
|
|
25
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-E3ONSFUN.js";
|
|
25
|
+
import {
|
|
26
|
+
getLocalCliPackageInfo
|
|
27
|
+
} from "./chunk-PUSFEC6B.js";
|
|
26
28
|
import {
|
|
27
29
|
CliTokenValidationUnavailableError,
|
|
28
30
|
CredentialStoreUnreadableError,
|
|
@@ -32,25 +34,26 @@ import {
|
|
|
32
34
|
clearAllCredentials,
|
|
33
35
|
clearCliTokenCache,
|
|
34
36
|
getActiveCredential,
|
|
37
|
+
internalCallSourceHeaders,
|
|
35
38
|
listCredentials,
|
|
36
39
|
mintCliToken,
|
|
37
40
|
removeActiveCredential,
|
|
38
41
|
saveCredential,
|
|
39
42
|
updateCredentialMetadata,
|
|
40
43
|
validateCliTokenOnServer
|
|
41
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-PLNS5J33.js";
|
|
42
45
|
import {
|
|
43
46
|
getFallbackCliToken,
|
|
44
47
|
loadConfig,
|
|
45
48
|
saveConfig
|
|
46
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-AMURHMS3.js";
|
|
47
50
|
import {
|
|
48
51
|
ExternalCliTokenError,
|
|
49
52
|
PermissionError,
|
|
50
53
|
logger,
|
|
51
54
|
normalizeUrl,
|
|
52
55
|
readExternalCliToken
|
|
53
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-R2SVAO4G.js";
|
|
54
57
|
|
|
55
58
|
// src/core/device-auth.ts
|
|
56
59
|
import { execFileSync } from "child_process";
|
|
@@ -132,6 +135,7 @@ async function authorizeDevice(host, protocol = "legacy") {
|
|
|
132
135
|
method: "POST",
|
|
133
136
|
headers: {
|
|
134
137
|
"Content-Type": "application/json",
|
|
138
|
+
...internalCallSourceHeaders(),
|
|
135
139
|
...protocol === "uba" ? { "X-CLI-Verification-Origin": new URL(host).origin } : {}
|
|
136
140
|
},
|
|
137
141
|
redirect: "error",
|
|
@@ -181,7 +185,7 @@ async function pollDeviceToken(host, deviceCode, protocol = "legacy") {
|
|
|
181
185
|
try {
|
|
182
186
|
resp = await fetch(url, {
|
|
183
187
|
method: "POST",
|
|
184
|
-
headers: { "Content-Type": "application/json" },
|
|
188
|
+
headers: { "Content-Type": "application/json", ...internalCallSourceHeaders() },
|
|
185
189
|
body: JSON.stringify({ device_code: deviceCode }),
|
|
186
190
|
redirect: "error",
|
|
187
191
|
signal: AbortSignal.timeout(1e4)
|
|
@@ -368,6 +372,11 @@ async function validateExistingCliToken(host, cliToken, external = false) {
|
|
|
368
372
|
return { valid: true, trusted: false, details: await validateCliTokenOnServer(host, cliToken) };
|
|
369
373
|
} catch (error) {
|
|
370
374
|
if (error instanceof CliTokenValidationUnavailableError) {
|
|
375
|
+
if (external && readExternalCliToken(host)?.taskContext) {
|
|
376
|
+
printError("auth", error.message, "Retry when the gateway is available; managed execution credentials cannot be trusted without validation.", "CLI_TOKEN_VALIDATION_UNAVAILABLE");
|
|
377
|
+
process.exitCode = 1;
|
|
378
|
+
return { valid: false, trusted: false, details: {} };
|
|
379
|
+
}
|
|
371
380
|
logger.warn(`auth status: ${error.message}; trusting the stored CLI token for compatibility`);
|
|
372
381
|
return { valid: true, trusted: true, details: {} };
|
|
373
382
|
}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
resolveWorkspaceTarget
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-COOMXFUG.js";
|
|
5
5
|
import {
|
|
6
6
|
currentAgentSpaceId
|
|
7
7
|
} from "./chunk-RK6GLDGI.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-HIMOBNEY.js";
|
|
9
9
|
import {
|
|
10
10
|
TeAgentApiError,
|
|
11
11
|
deleteFromMainApp,
|
|
12
12
|
getFromMainApp,
|
|
13
13
|
patchToMainApp,
|
|
14
14
|
postToMainApp
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-Z3Q2AEIN.js";
|
|
15
|
+
} from "./chunk-VLOGOM7N.js";
|
|
16
|
+
import "./chunk-PLNS5J33.js";
|
|
17
|
+
import "./chunk-AMURHMS3.js";
|
|
18
|
+
import "./chunk-R2SVAO4G.js";
|
|
20
19
|
|
|
21
20
|
// src/commands/automation/index.ts
|
|
22
21
|
import { randomUUID } from "crypto";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
resolveHost
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KA5WKR5P.js";
|
|
5
5
|
import {
|
|
6
6
|
confirmHighRiskWrite,
|
|
7
7
|
normalizeRiskLevel,
|
|
8
8
|
requiresConfirmation
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EFGUBGA6.js";
|
|
10
10
|
import {
|
|
11
11
|
findGatewayDomain,
|
|
12
12
|
listCapabilityDiscoveryPrefixes,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
printError,
|
|
18
18
|
printOutput,
|
|
19
19
|
withOutputMetadata
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-O45NOIWR.js";
|
|
21
21
|
import {
|
|
22
22
|
CapabilityGatewayError,
|
|
23
23
|
dryRunCapabilityWithEnvelope,
|
|
@@ -26,26 +26,27 @@ import {
|
|
|
26
26
|
inspectCapabilityWithEnvelope,
|
|
27
27
|
listCapabilitiesWithEnvelope,
|
|
28
28
|
validateCapabilityWithEnvelope
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-
|
|
29
|
+
} from "./chunk-4IQYPWCX.js";
|
|
30
|
+
import "./chunk-NNK3JBH4.js";
|
|
31
31
|
import {
|
|
32
32
|
assertBusinessEnabled,
|
|
33
33
|
businessForCapability,
|
|
34
34
|
readBusinessConfigForExecution,
|
|
35
35
|
readCurrentBusinessConfig
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-E3ONSFUN.js";
|
|
37
|
+
import "./chunk-PUSFEC6B.js";
|
|
37
38
|
import {
|
|
38
39
|
CredentialStoreUnreadableError,
|
|
39
40
|
SecureStoreAuthError
|
|
40
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-PLNS5J33.js";
|
|
41
42
|
import {
|
|
42
43
|
parseJsonRequest
|
|
43
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-AMURHMS3.js";
|
|
44
45
|
import {
|
|
45
46
|
CliValidationError,
|
|
46
47
|
ExternalCliTokenError,
|
|
47
48
|
PermissionError
|
|
48
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-R2SVAO4G.js";
|
|
49
50
|
|
|
50
51
|
// src/commands/capability/helpers.ts
|
|
51
52
|
import { readFileSync } from "fs";
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
require_node,
|
|
6
6
|
require_process_nextick_args,
|
|
7
7
|
require_util
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HQED4YB4.js";
|
|
9
9
|
import {
|
|
10
10
|
__commonJS,
|
|
11
11
|
__esm,
|
|
12
12
|
__export,
|
|
13
13
|
__require,
|
|
14
14
|
__toCommonJS
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-R2SVAO4G.js";
|
|
16
16
|
|
|
17
17
|
// node_modules/readdir-glob/node_modules/minimatch/lib/path.js
|
|
18
18
|
var require_path = __commonJS({
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
sourceLoggedFetch
|
|
4
|
+
} from "./chunk-NNK3JBH4.js";
|
|
5
5
|
import {
|
|
6
6
|
SecureStoreAuthError,
|
|
7
7
|
clearCliTokenCache,
|
|
8
|
-
getCliToken
|
|
9
|
-
|
|
8
|
+
getCliToken,
|
|
9
|
+
internalCallSourceHeaders
|
|
10
|
+
} from "./chunk-PLNS5J33.js";
|
|
10
11
|
import {
|
|
11
12
|
safeJsonParse,
|
|
12
13
|
stringifyJsonRequest
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-AMURHMS3.js";
|
|
14
15
|
import {
|
|
15
16
|
PermissionError,
|
|
16
17
|
externalCliTokenRequestOptions
|
|
17
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-R2SVAO4G.js";
|
|
18
19
|
|
|
19
20
|
// src/core/cli-agent-context.ts
|
|
20
21
|
import { readFileSync, statSync } from "fs";
|
|
@@ -439,10 +440,10 @@ async function requestOnce(url, method, token, body, accept = "application/json"
|
|
|
439
440
|
headers["Content-Type"] = "application/json";
|
|
440
441
|
init.body = stringifyJsonRequest(includeClientContextInBody ? withCliAgentContextBody(body, agentContext) : body);
|
|
441
442
|
}
|
|
442
|
-
return
|
|
443
|
+
return sourceLoggedFetch(url, { ...init, ...externalCliTokenRequestOptions(url), signal });
|
|
443
444
|
}
|
|
444
445
|
async function requestMultipartOnce(url, token, form) {
|
|
445
|
-
return
|
|
446
|
+
return sourceLoggedFetch(url, {
|
|
446
447
|
method: "POST",
|
|
447
448
|
...externalCliTokenRequestOptions(url),
|
|
448
449
|
headers: {
|
|
@@ -6,15 +6,15 @@ import {
|
|
|
6
6
|
readOutputMetadata,
|
|
7
7
|
unwrapOutputData,
|
|
8
8
|
withOutputMetadata
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-O45NOIWR.js";
|
|
10
10
|
import {
|
|
11
11
|
CapabilityGatewayError,
|
|
12
12
|
fetchCapabilityGateway,
|
|
13
13
|
requestCapabilityGateway
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4IQYPWCX.js";
|
|
15
15
|
import {
|
|
16
16
|
PermissionError
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-R2SVAO4G.js";
|
|
18
18
|
|
|
19
19
|
// src/core/analysis-async-artifact.ts
|
|
20
20
|
import { randomBytes } from "crypto";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
logger,
|
|
4
4
|
normalizeUrl,
|
|
5
5
|
readExternalCliToken
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-R2SVAO4G.js";
|
|
7
7
|
|
|
8
8
|
// src/core/sandbox-runtime.ts
|
|
9
9
|
import { homedir } from "os";
|
|
@@ -26,19 +26,22 @@ function getSandboxCliTokenFilePath() {
|
|
|
26
26
|
return join(getSandboxAeConfigDir(), "cli-token.json");
|
|
27
27
|
}
|
|
28
28
|
function isAeSandboxRuntime() {
|
|
29
|
+
return getAeSandboxDetectionReason() !== "not_detected";
|
|
30
|
+
}
|
|
31
|
+
function getAeSandboxDetectionReason() {
|
|
29
32
|
if (process.env.SANDBOX_RUNTIME_ROOT) {
|
|
30
|
-
return
|
|
33
|
+
return "runtime_root_env";
|
|
31
34
|
}
|
|
32
35
|
if (process.platform !== "linux") {
|
|
33
|
-
return
|
|
36
|
+
return "not_detected";
|
|
34
37
|
}
|
|
35
38
|
try {
|
|
36
39
|
if (fs.existsSync(getSandboxCliTokenFilePath())) {
|
|
37
|
-
return
|
|
40
|
+
return "cli_token_file";
|
|
38
41
|
}
|
|
39
42
|
} catch {
|
|
40
43
|
}
|
|
41
|
-
return
|
|
44
|
+
return "not_detected";
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
// src/core/config.ts
|
|
@@ -285,12 +288,13 @@ function getConfigDir() {
|
|
|
285
288
|
}
|
|
286
289
|
|
|
287
290
|
export {
|
|
291
|
+
getSandboxRuntimeRoot,
|
|
292
|
+
isAeSandboxRuntime,
|
|
293
|
+
getAeSandboxDetectionReason,
|
|
288
294
|
safeJsonParse,
|
|
289
295
|
safeReadJsonFile,
|
|
290
296
|
stringifyJsonRequest,
|
|
291
297
|
parseJsonRequest,
|
|
292
|
-
getSandboxRuntimeRoot,
|
|
293
|
-
isAeSandboxRuntime,
|
|
294
298
|
readSandboxCliTokenEntry,
|
|
295
299
|
getFallbackCliToken,
|
|
296
300
|
loadConfig,
|
|
@@ -6,17 +6,19 @@ import {
|
|
|
6
6
|
evalRequest,
|
|
7
7
|
evaluationResponseStatus,
|
|
8
8
|
resolveEvaluationHost
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LFJ7N36I.js";
|
|
10
10
|
import {
|
|
11
|
-
getCliToken
|
|
12
|
-
|
|
11
|
+
getCliToken,
|
|
12
|
+
internalCallSourceHeaders
|
|
13
|
+
} from "./chunk-PLNS5J33.js";
|
|
13
14
|
import {
|
|
14
15
|
isAeSandboxRuntime
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-AMURHMS3.js";
|
|
16
17
|
import {
|
|
17
18
|
CliValidationError,
|
|
18
|
-
externalCliTokenRequestOptions
|
|
19
|
-
|
|
19
|
+
externalCliTokenRequestOptions,
|
|
20
|
+
readExternalCliToken
|
|
21
|
+
} from "./chunk-R2SVAO4G.js";
|
|
20
22
|
|
|
21
23
|
// src/core/eval-session.ts
|
|
22
24
|
var SESSION_PATH = "/api/sandbox/agent/evaluation/session";
|
|
@@ -30,7 +32,7 @@ async function requestSandboxEvaluationSession(host, cliToken, teProjectId, fetc
|
|
|
30
32
|
response = await fetchImpl(url, {
|
|
31
33
|
...credentialOptions,
|
|
32
34
|
method: "POST",
|
|
33
|
-
headers: { Accept: "application/json", "Content-Type": "application/json", "cli-token": cliToken },
|
|
35
|
+
headers: { Accept: "application/json", "Content-Type": "application/json", "cli-token": cliToken, ...internalCallSourceHeaders() },
|
|
34
36
|
body: JSON.stringify(teProjectId ? { te_project_id: teProjectId } : {}),
|
|
35
37
|
redirect: "error",
|
|
36
38
|
signal
|
|
@@ -113,6 +115,8 @@ function evalHeaders(environment = process.env, onboarding) {
|
|
|
113
115
|
return { Authorization: `Bearer ${accessToken}` };
|
|
114
116
|
}
|
|
115
117
|
async function resolveEvalHeaders(ctx, environment = process.env, teProjectId) {
|
|
118
|
+
if (readExternalCliToken(ctx.host())?.taskContext && environment.AE_EVAL_ACCESS_TOKEN?.trim())
|
|
119
|
+
throw new CliValidationError("Managed executions must use the current user evaluation session, not AE_EVAL_ACCESS_TOKEN.", { code: "EVAL_MANAGED_TOKEN_OVERRIDE" });
|
|
116
120
|
if (environment.AE_EVAL_ACCESS_TOKEN?.trim()) return evalHeaders(environment);
|
|
117
121
|
if (!isAeSandboxRuntime()) {
|
|
118
122
|
const baseUrl = resolveEvalBaseUrl(ctx, environment);
|
|
@@ -9,15 +9,15 @@ import {
|
|
|
9
9
|
postAgentApi,
|
|
10
10
|
putAgentApi,
|
|
11
11
|
uploadAgentApi
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HIMOBNEY.js";
|
|
13
13
|
import {
|
|
14
14
|
TeAgentApiError,
|
|
15
15
|
createTeAgentApiError
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-VLOGOM7N.js";
|
|
17
17
|
import {
|
|
18
18
|
CliValidationError,
|
|
19
19
|
isApiErrorType
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-R2SVAO4G.js";
|
|
21
21
|
|
|
22
22
|
// src/commands/workspace/client.ts
|
|
23
23
|
var DEFAULT_TE_CLAUDE_BASE_PATH = "/agent";
|
|
@@ -2,22 +2,24 @@ import { createRequire as __createRequire } from 'node:module'; const require =
|
|
|
2
2
|
import {
|
|
3
3
|
canManageGlobalSkills,
|
|
4
4
|
fetchCliConfig,
|
|
5
|
-
getLocalCliPackageInfo,
|
|
6
5
|
isBusinessSkillContextCurrent,
|
|
7
6
|
rememberBusinessConfig,
|
|
8
7
|
reserveBusinessSkillContext,
|
|
9
8
|
syncBusinessSkills
|
|
10
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-E3ONSFUN.js";
|
|
10
|
+
import {
|
|
11
|
+
getLocalCliPackageInfo
|
|
12
|
+
} from "./chunk-PUSFEC6B.js";
|
|
11
13
|
import {
|
|
12
14
|
peekCliToken
|
|
13
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-PLNS5J33.js";
|
|
14
16
|
import {
|
|
15
17
|
getActiveHost,
|
|
16
18
|
getConfigDir
|
|
17
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-AMURHMS3.js";
|
|
18
20
|
import {
|
|
19
21
|
normalizeUrl
|
|
20
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-R2SVAO4G.js";
|
|
21
23
|
|
|
22
24
|
// src/core/environment-refresh.ts
|
|
23
25
|
import crypto from "crypto";
|