@thinkingai/ae-cli 6.0.63 → 6.0.64
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 +8 -3
- package/README.zh.md +8 -3
- package/dist/{ai-monitor-X5GL44JT.js → ai-monitor-ABPXAOYL.js} +5 -5
- package/dist/ai-monitor.js +6 -6
- package/dist/{auth-SPQ46XQ3.js → auth-EV4FSIFI.js} +3 -3
- package/dist/{capability-JZP4KXZC.js → capability-B35ZQSSB.js} +3 -3
- package/dist/{chunk-E457FREE.js → chunk-434DSEOC.js} +6 -5
- package/dist/{chunk-F7TCQPQX.js → chunk-4COJB2CS.js} +1 -1
- package/dist/{chunk-YJYC5PLL.js → chunk-4CRZ2YUC.js} +2 -1
- package/dist/{chunk-RYY5NJK3.js → chunk-66F7SOGR.js} +2 -2
- package/dist/{chunk-PRCHMOWT.js → chunk-7AQ5Y6F2.js} +1 -1
- package/dist/{chunk-FGGEF7MI.js → chunk-7TENODN4.js} +2 -2
- package/dist/{chunk-VR2D54AA.js → chunk-7XTWP3NB.js} +1 -1
- package/dist/{chunk-6HOM2FOJ.js → chunk-A3PREN6Q.js} +4 -14
- package/dist/{chunk-2VKMHNUU.js → chunk-KVTFUP5T.js} +3 -3
- package/dist/{compat-check-JD5D77ET.js → compat-check-V3NGDQA5.js} +1 -1
- package/dist/{config-IIMRATTP.js → config-7OPBS5RW.js} +3 -3
- package/dist/context-WAR22IGB.js +349 -0
- package/dist/index.js +22 -22
- package/dist/{metadata-ZVPG2MIA.js → metadata-OROUBOO5.js} +5 -5
- package/dist/{personal-semantic-preference-YNCV4QG3.js → personal-semantic-preference-UQXUQJO3.js} +40 -15
- package/dist/{project-semantic-E7ZAQL5S.js → project-semantic-LEU2SN6J.js} +262 -14
- package/dist/{sync-Y4OZRQAY.js → sync-JXJUSBN3.js} +2 -2
- package/dist/{te-agent-RKAUTYJZ.js → te-agent-W67K6QTR.js} +1 -1
- package/dist/{te-analysis-7N5VC4JB.js → te-analysis-TJ7XHW6J.js} +306 -49
- package/dist/{te-community-SIA2UHTS.js → te-community-YNFYG42J.js} +4 -4
- package/dist/{te-dataops-5MJQCODU.js → te-dataops-GASA7SEG.js} +721 -217
- package/dist/{te-engage-ZTLOMKO3.js → te-engage-4CGFYLP6.js} +4 -4
- package/dist/{te-kb-LDL3MF2Y.js → te-kb-2ZYZKMDW.js} +27 -7
- package/dist/{te-team-JOWHCMZA.js → te-team-ZFQANIPN.js} +4 -4
- package/dist/{things-DOQ2L3O2.js → things-AYKSVWGZ.js} +1 -1
- package/dist/{update-KUS6TCPB.js → update-EDWNZQ6B.js} +2 -2
- package/package.json +4 -3
- package/skills/ae-analysis/SKILL.md +41 -16
- package/skills/ae-analysis/references/adhoc_export.md +1 -1
- package/skills/ae-analysis/references/adhoc_run.md +8 -2
- package/skills/ae-analysis/references/analysis_drilldown_contract.md +1 -1
- package/skills/ae-analysis/references/audience_scheduling.md +30 -0
- package/skills/ae-analysis/references/business_semantics_workspace.md +57 -0
- package/skills/ae-analysis/references/command_index.md +18 -13
- package/skills/ae-analysis/references/context_prepare.md +49 -0
- package/skills/ae-analysis/references/drilldown_entities_export.md +1 -1
- package/skills/ae-analysis/references/drilldown_entities_run.md +1 -1
- package/skills/ae-analysis/references/drilldown_user_events_export.md +3 -1
- package/skills/ae-analysis/references/drilldown_user_events_run.md +2 -1
- package/skills/ae-analysis/references/governance_recommendation_export.md +1 -1
- package/skills/ae-analysis/references/personal_semantic_preference_add.md +5 -1
- package/skills/ae-analysis/references/personal_semantic_preference_get.md +4 -2
- package/skills/ae-analysis/references/personal_semantic_preference_list.md +7 -6
- package/skills/ae-analysis/references/personal_semantic_preference_submit.md +1 -1
- package/skills/ae-analysis/references/personal_semantic_preference_update.md +5 -1
- package/skills/ae-analysis/references/project_info_get.md +4 -0
- package/skills/ae-analysis/references/project_semantic_knowledge_wiki.md +1 -1
- package/skills/ae-analysis/references/project_semantic_setup.md +60 -0
- package/skills/ae-analysis/references/report_get.md +2 -0
- package/skills/ae-analysis/references/report_presentation.md +55 -0
- package/skills/ae-analysis/references/report_update.md +4 -2
- package/skills/ae-analysis/references/system_openapi_token_batch_generate.md +20 -0
- package/skills/ae-analysis/references/system_openapi_token_get.md +14 -0
- package/skills/ae-analysis/references/user_cluster_create.md +3 -1
- package/skills/ae-analysis/references/user_cluster_models.md +2 -0
- package/skills/ae-analysis/references/user_cluster_update.md +5 -3
- package/skills/ae-analysis/references/user_tag_create.md +4 -22
- package/skills/ae-analysis/references/user_tag_models.md +8 -0
- package/skills/ae-analysis/references/user_tag_update.md +6 -14
- package/skills/ae-analysis/scripts/read-semantic-catalog.mjs +40 -0
- package/skills/ae-dataops/SKILL.md +9 -6
- package/skills/ae-dataops/references/dataops-flow-create.md +64 -47
- package/skills/ae-dataops/references/dataops-flow-monitor.md +4 -2
- package/skills/ae-dataops/references/dataops-flow-python.md +109 -0
- package/skills/ae-kb/SKILL.md +10 -5
- package/skills/ae-kb/references/analysis-workflow.md +19 -10
- package/skills/ae-kb/references/query-workflow.md +34 -17
- package/skills/ae-kb-discovery/SKILL.md +4 -3
- package/dist/context-BXHIPIIX.js +0 -138
package/README.md
CHANGED
|
@@ -124,7 +124,7 @@ The table covers every current root command individually. Use `ae-cli --help` fo
|
|
|
124
124
|
| Analysis and projects | `project` | Project information, members, roles, permissions, entities, time zones, and handover settings |
|
|
125
125
|
| Analysis and projects | `metadata` | Capability-backed data-table, property, and dimension-table binding operations |
|
|
126
126
|
| Analysis and projects | `personal-semantic-preference` | Current-user semantic preferences for a project or across projects (`--project-id -1`) |
|
|
127
|
-
| Analysis and projects | `project-semantic` |
|
|
127
|
+
| Analysis and projects | `project-semantic` | Project-semantics setup evidence and reusable asset-package export |
|
|
128
128
|
| 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)) |
|
|
129
129
|
| Data and tracking | `tracking` | Tracking plans, SDK samples, checks, ingestion diagnostics, code generation, and bundled wiki |
|
|
130
130
|
| Data and tracking | `data-integration` | Inspect, plan, convert, upload, hand off, and reuse local CSV/JSON/Excel data |
|
|
@@ -161,6 +161,9 @@ The table covers every current root command individually. Use `ae-cli --help` fo
|
|
|
161
161
|
| Agent platform | `automation` | Automation configuration, execution, history, and results |
|
|
162
162
|
<!-- root-command-surface:end -->
|
|
163
163
|
|
|
164
|
+
For project business-semantics setup, use the bundled [setup workflow](skills/ae-analysis/references/project_semantic_setup.md). `ae-cli project-semantic setup --project-id 5 --asset-scope certified --output ./project-evidence` prepares a private evidence workspace; it does not generate or save semantics. Choose `frequent`, `all`, `specified` (with exact `--asset-refs`) or `none` (with `--materials`) as needed. The CLI Agent reviews complete catalogs and source definitions, proposes a background draft and distinct entries, then saves only user-confirmed changes through existing capabilities. Background publication remains a separate action.
|
|
165
|
+
|
|
166
|
+
|
|
164
167
|
Review collected analysis questions with `ae-cli analysis scenario list --project-id 1 --days 7`. The `ae-analysis` Skill can deduplicate questions and assess badcases with concise, evidence-based reasons. See the [scenario review guide](skills/ae-analysis/references/scenario_list.md). Answers can include elapsed time; use `ae-cli analysis scenario get --help` to query linked command execution details.
|
|
165
168
|
|
|
166
169
|
To save and review Bad Cases, use `ae-cli analysis bad-case --help`. The Agent semantically deduplicates each batch against all historical states. Review in CLI or explicitly submit to the page; each batch reports discovered, duplicate, and new counts. Notes are optional. Approval adds the case to the bound AE dataset; revoking approval removes it. See the [Bad Case workflow](skills/ae-analysis/references/bad_case_review.md).
|
|
@@ -190,11 +193,11 @@ Use `validate` while fixing complex nested input. Use `dry-run` when you need th
|
|
|
190
193
|
|
|
191
194
|
Gateway-backed features follow the [Capability command admission rules](docs/capability-command-admission.md). Common workflows may have curated commands; long-tail capabilities remain dynamically discoverable.
|
|
192
195
|
|
|
193
|
-
Event-report presentation is separate from its query definition: `analysis report create|update --presentation '{"chart_type":"bar","table_layout":"event"}'` sets the source chart/result-table layout, and `report get` returns its effective presentation. On same-model updates, omit presentation to preserve the saved chart and result-table layout. For a table card on an analysis board, use `analysis dashboard-report get|update` with exact project/dashboard/report IDs; `update --chart-type table --table-layout event --date-outside false` changes only that card, preserving the source definition and other boards.
|
|
196
|
+
Event-report presentation is separate from its query definition: `analysis report create|update --presentation '{"chart_type":"bar","table_layout":"event"}'` sets the source chart/result-table layout, and `report get` returns its effective presentation. On same-model updates, omit presentation to preserve the saved chart and result-table layout. For a table card on an analysis board, use `analysis dashboard-report get|update` with exact project/dashboard/report IDs; `update --chart-type table --table-layout event --date-outside false` changes only that card, preserving the source definition and other boards. Source report update also supports ordinary-model labels, retention key periods, funnel/pie display, date annotations and other bounded display options; see [source presentation](skills/ae-analysis/references/report_presentation.md) for applicability. Dashboard presentation remains event-only. See [report update](skills/ae-analysis/references/report_update.md) and [card update](skills/ae-analysis/references/dashboard_report_update.md).
|
|
194
197
|
|
|
195
198
|
Event combination charts use source `presentation.chart_type=combo` and `series` items `{metric_index:1,type:"bar",axis:"primary"}` (`type=bar|line`, `axis=primary|secondary`). Indexes are current 1-based `definition.metrics` positions; updates use the current report version, subset patches, or explicit `series: []`/`chart_type=line` resets. Board trends inherit source series, so source edits affect its other trend cards; `dashboard-report update --chart-type combo` selects existing combo, not a card-local override. Cumulative line is not combo. See [combination-chart scope and safety](skills/ae-analysis/references/event_report_presentation.md).
|
|
196
199
|
|
|
197
|
-
`analysis user-tag create|update` supports periodic refresh in one command: pass `--auto-refresh-schedule '{"frequency":"daily","time":"02:30"}'` (also weekly
|
|
200
|
+
`analysis user-tag create|update` supports periodic refresh in one command: pass `--auto-refresh-schedule '{"frequency":"daily","time":"02:30"}'` (also daily_multiple, weekly, and monthly). Use `--enable-auto-refresh false` to disable it. Scheduling-only updates do not recompute; omitted settings preserve the existing plan. See the [tag create](skills/ae-analysis/references/user_tag_create.md) and [tag update](skills/ae-analysis/references/user_tag_update.md) references.
|
|
198
201
|
|
|
199
202
|
## Authentication and Environments
|
|
200
203
|
|
|
@@ -250,6 +253,8 @@ The new CLI persists only CLI tokens, never access or refresh tokens. Multiple a
|
|
|
250
253
|
Login uses a cross-platform device-code flow. Use `--no-browser` when the environment cannot open a browser.
|
|
251
254
|
Trial guidance is emitted only when no Host is configured; normal commands and authentication flows for configured environments do not display it.
|
|
252
255
|
|
|
256
|
+
Before every business action, the analysis Skill runs `ae-cli context prepare` for company background and the full global personal directory, then `ae-cli context prepare --project-id <id>` after project selection for project background and personal/public catalogs. Context is cached per conversation, shared duplicates are folded, and every returned page must be consumed. Existing business commands remain independent. See [context preparation](skills/ae-analysis/references/context_prepare.md).
|
|
257
|
+
|
|
253
258
|
## Output and Safety
|
|
254
259
|
|
|
255
260
|
Commands return a stable envelope:
|
package/README.zh.md
CHANGED
|
@@ -128,7 +128,7 @@ ae-cli capability list --domain analysis --jq '.capabilities[] | .id'
|
|
|
128
128
|
| 分析与项目 | `project` | 项目信息、成员、角色、权限、实体、时区和交接配置 |
|
|
129
129
|
| 分析与项目 | `metadata` | 基于 Capability Gateway 的数据表、属性及维度表绑定 |
|
|
130
130
|
| 分析与项目 | `personal-semantic-preference` | 当前用户的项目内或跨项目个人语义偏好(`--project-id -1`) |
|
|
131
|
-
| 分析与项目 | `project-semantic` |
|
|
131
|
+
| 分析与项目 | `project-semantic` | 项目业务语义搭建资料准备及资产包导出 |
|
|
132
132
|
| 可观测性 | `ai-monitor` | 查询 Trace、会话、Bad Trace、指标、成本、安全与已有诊断报告,导出校验后的 ZIP([指南](skills/ae-ai-monitor/SKILL.md)) |
|
|
133
133
|
| 数据与埋点 | `tracking` | 埋点方案、SDK 示例、检查、采集诊断、代码生成和内置 Wiki |
|
|
134
134
|
| 数据与埋点 | `data-integration` | 检查、规划、转换、上传、交接和复用本地 CSV/JSON/Excel 数据 |
|
|
@@ -165,6 +165,9 @@ ae-cli capability list --domain analysis --jq '.capabilities[] | .id'
|
|
|
165
165
|
| Agent 平台 | `automation` | 自动化配置、执行、历史和结果 |
|
|
166
166
|
<!-- root-command-surface:end -->
|
|
167
167
|
|
|
168
|
+
项目业务语义首次搭建使用随 CLI 分发的[专项流程](skills/ae-analysis/references/project_semantic_setup.md)。`ae-cli project-semantic setup --project-id 5 --asset-scope certified --output ./project-evidence` 只准备私有资料目录,不自动生成或保存语义。可选择高频资产 `frequent`、全部资产 `all`、指定资产 `specified`(传入准确的 `--asset-refs`),或仅业务资料 `none`(传入 `--materials`)。CLI Agent 完整读取目录和来源定义,整理背景草稿与条目提案,经用户确认后通过现有能力保存;背景发布单独确认。
|
|
169
|
+
|
|
170
|
+
|
|
168
171
|
使用 `ae-cli analysis scenario list --project-id 1 --days 7` 查询已采集的分析问题,由 `ae-analysis` Skill 指导 Agent 去重、判断 badcase 并简要说明原因和证据。详见[分析问题复盘指南](skills/ae-analysis/references/scenario_list.md)。 回答可附带耗时;使用 `ae-cli analysis scenario get --help` 查看关联命令执行明细的查询方式。
|
|
169
172
|
|
|
170
173
|
需保存并审核 Bad Case 时,使用 `ae-cli analysis bad-case --help`。Agent 按语义对同批及所有历史状态去重;CLI 可直接审核,也可显式提交页面。每批汇报发现、重复、新增数量,补充说明选填。认证后将案例加入已绑定的 AE 评测集,取消认证后移除。详见[Bad Case 工作流](skills/ae-analysis/references/bad_case_review.md)。
|
|
@@ -194,11 +197,11 @@ ae-cli capability run analysis.report.list --input input.json
|
|
|
194
197
|
|
|
195
198
|
Gateway 命令遵循 [Capability 命令收录规则](docs/capability-command-admission.md)。常见工作流可以提供精选命令,长尾能力则保持动态发现。
|
|
196
199
|
|
|
197
|
-
事件报表的展示配置与查询定义分开:`analysis report create|update --presentation '{"chart_type":"bar","table_layout":"event"}'` 设置原报表图形及结果表布局,`report get` 返回实际生效的展示配置。同模型更新时省略 presentation 可保留原有图形和结果表布局。看板表格卡片使用 `analysis dashboard-report get|update`,明确项目、看板和报表 ID;`update --chart-type table --table-layout event --date-outside false`
|
|
200
|
+
事件报表的展示配置与查询定义分开:`analysis report create|update --presentation '{"chart_type":"bar","table_layout":"event"}'` 设置原报表图形及结果表布局,`report get` 返回实际生效的展示配置。同模型更新时省略 presentation 可保留原有图形和结果表布局。看板表格卡片使用 `analysis dashboard-report get|update`,明确项目、看板和报表 ID;`update --chart-type table --table-layout event --date-outside false` 只改变该卡片,保留原报表定义及其他看板。源报表更新还支持常规模型的数值标签、留存关键周期、漏斗及饼图展示、日期标注等配置,适用范围见[源报表展示](skills/ae-analysis/references/report_presentation.md);看板展示配置仍限事件报表。详见[报表更新](skills/ae-analysis/references/report_update.md)和[卡片更新](skills/ae-analysis/references/dashboard_report_update.md)。
|
|
198
201
|
|
|
199
202
|
事件组合图使用原报表 `presentation.chart_type=combo` 和 `series` 项 `{metric_index:1,type:"bar",axis:"primary"}`(`type=bar|line`,`axis=primary|secondary`)。索引是当前 `definition.metrics` 从 1 开始的位置;更新使用当前报表版本,支持部分指标补丁及显式 `series: []` / `chart_type=line` 重置。看板趋势图继承原报表系列,修改源系列会影响该报表的其他趋势卡片;`dashboard-report update --chart-type combo` 选择已有组合图,不提供卡片独立覆盖。累计折线不等于组合图。详见[组合图作用域与安全规则](skills/ae-analysis/references/event_report_presentation.md)。
|
|
200
203
|
|
|
201
|
-
`analysis user-tag create|update` 支持一次配置自动更新:传入 `--auto-refresh-schedule '{"frequency":"daily","time":"02:30"}'
|
|
204
|
+
`analysis user-tag create|update` 支持一次配置自动更新:传入 `--auto-refresh-schedule '{"frequency":"daily","time":"02:30"}'`(也支持每天多次、每周、每月)。用 `--enable-auto-refresh false` 关闭自动更新。仅修改调度计划不触发即时重算;省略调度参数则保留原计划。详见[创建标签](skills/ae-analysis/references/user_tag_create.md)和[更新标签](skills/ae-analysis/references/user_tag_update.md)。
|
|
202
205
|
|
|
203
206
|
## 认证与多环境
|
|
204
207
|
|
|
@@ -254,6 +257,8 @@ Token 文件是只读 JSON 对象:`{"url":"https://host-a.example.com","token"
|
|
|
254
257
|
登录使用跨平台设备码流程。当前环境无法打开浏览器时,可使用 `--no-browser`。
|
|
255
258
|
试用引导仅在尚未配置 Host 时出现;已配置环境的正常命令和认证流程不会展示该提示。
|
|
256
259
|
|
|
260
|
+
分析 Skill 在所有业务动作前先执行 `ae-cli context prepare`,读取公司背景与完整个人全局目录;确定项目后执行 `ae-cli context prepare --project-id <id>`,读取项目背景、个人与公共语义目录。上下文按会话缓存,重复共享条目折叠展示;请消费全部返回页。现有业务命令保持独立。详见[上下文准备](skills/ae-analysis/references/context_prepare.md)。
|
|
261
|
+
|
|
257
262
|
## 输出与安全
|
|
258
263
|
|
|
259
264
|
命令返回稳定的输出信封:
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
traceCount,
|
|
10
10
|
traceGet,
|
|
11
11
|
traceList
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-7TENODN4.js";
|
|
13
|
+
import "./chunk-434DSEOC.js";
|
|
14
14
|
import "./chunk-AWW2T2WL.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-7XTWP3NB.js";
|
|
16
|
+
import "./chunk-A3PREN6Q.js";
|
|
17
17
|
import "./chunk-NNK3JBH4.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-4CRZ2YUC.js";
|
|
19
19
|
import "./chunk-PUSFEC6B.js";
|
|
20
20
|
import "./chunk-PLNS5J33.js";
|
|
21
21
|
import "./chunk-AMURHMS3.js";
|
package/dist/ai-monitor.js
CHANGED
|
@@ -3,19 +3,19 @@ import {
|
|
|
3
3
|
configureBusinessCommands,
|
|
4
4
|
parseProgram,
|
|
5
5
|
runCommand
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KVTFUP5T.js";
|
|
7
7
|
import "./chunk-EFGUBGA6.js";
|
|
8
8
|
import "./chunk-ETQXIZFP.js";
|
|
9
9
|
import {
|
|
10
10
|
ai_monitor_default
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7TENODN4.js";
|
|
12
12
|
import "./chunk-LFJ7N36I.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-434DSEOC.js";
|
|
14
14
|
import "./chunk-AWW2T2WL.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-7XTWP3NB.js";
|
|
16
|
+
import "./chunk-A3PREN6Q.js";
|
|
17
17
|
import "./chunk-NNK3JBH4.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-4CRZ2YUC.js";
|
|
19
19
|
import "./chunk-PUSFEC6B.js";
|
|
20
20
|
import "./chunk-PLNS5J33.js";
|
|
21
21
|
import "./chunk-AMURHMS3.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
environmentRefreshOutput,
|
|
4
4
|
invalidateBusinessSkillSynchronization,
|
|
5
5
|
refreshEnvironmentAfterLogin
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7AQ5Y6F2.js";
|
|
7
7
|
import {
|
|
8
8
|
MultiselectCancelled,
|
|
9
9
|
promptSingleSelect
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
printError,
|
|
20
20
|
printOutput
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-7XTWP3NB.js";
|
|
22
22
|
import {
|
|
23
23
|
runHostCompatCheck
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-4CRZ2YUC.js";
|
|
25
25
|
import {
|
|
26
26
|
getLocalCliPackageInfo
|
|
27
27
|
} from "./chunk-PUSFEC6B.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
printError,
|
|
18
18
|
printOutput,
|
|
19
19
|
withOutputMetadata
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-7XTWP3NB.js";
|
|
21
21
|
import {
|
|
22
22
|
CapabilityGatewayError,
|
|
23
23
|
dryRunCapabilityWithEnvelope,
|
|
@@ -26,14 +26,14 @@ import {
|
|
|
26
26
|
inspectCapabilityWithEnvelope,
|
|
27
27
|
listCapabilitiesWithEnvelope,
|
|
28
28
|
validateCapabilityWithEnvelope
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-A3PREN6Q.js";
|
|
30
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-4CRZ2YUC.js";
|
|
37
37
|
import "./chunk-PUSFEC6B.js";
|
|
38
38
|
import {
|
|
39
39
|
CredentialStoreUnreadableError,
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
} from "./chunk-AWW2T2WL.js";
|
|
5
5
|
import {
|
|
6
6
|
withOutputMetadata
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7XTWP3NB.js";
|
|
8
8
|
import {
|
|
9
9
|
dryRunCapabilityWithEnvelope,
|
|
10
10
|
executeCapabilityWithEnvelope,
|
|
11
11
|
validateCapabilityWithEnvelope
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-A3PREN6Q.js";
|
|
13
13
|
import {
|
|
14
14
|
CliValidationError
|
|
15
15
|
} from "./chunk-R2SVAO4G.js";
|
|
@@ -130,9 +130,10 @@ function createCapabilityCommand(config) {
|
|
|
130
130
|
const preparedInput = config.prepareInput ? await config.prepareInput(ctx, input) : input;
|
|
131
131
|
const evidence = config.intentConsistency ? verifyDefinitionIntent(ctx, config.intentConsistency) : void 0;
|
|
132
132
|
const intentMeta = evidence ? { intent_consistency: evidence } : void 0;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
const
|
|
133
|
+
const executeInput = config.prepareExecuteInput ? await config.prepareExecuteInput(ctx, preparedInput) : preparedInput;
|
|
134
|
+
announceDispatch(config.capabilityId, executeInput);
|
|
135
|
+
const result = await executeCapabilityWithEnvelope(requestHost, gatewayDomain, config.capabilityId, executeInput);
|
|
136
|
+
const data = config.postProcess ? await config.postProcess(result.data, executeInput, ctx) : result.data;
|
|
136
137
|
return withOutputMetadata(data, { ...result.meta, ...intentMeta });
|
|
137
138
|
}
|
|
138
139
|
};
|
|
@@ -552,6 +552,7 @@ function normalizeBusinesses(value) {
|
|
|
552
552
|
}
|
|
553
553
|
function businessForCommand(commandPath) {
|
|
554
554
|
const [service, resource] = commandPath;
|
|
555
|
+
if (service === "context" && (!resource || resource === "prepare")) return void 0;
|
|
555
556
|
if (service === "system") return AGENT_SYSTEM_COMMANDS.has(resource) ? "agent" : void 0;
|
|
556
557
|
return COMMAND_BUSINESSES[service];
|
|
557
558
|
}
|
|
@@ -1585,7 +1586,7 @@ async function readBusinessConfigForExecution(hostOverride, synchronizeSkills =
|
|
|
1585
1586
|
const token = peekCliToken(host);
|
|
1586
1587
|
if (!token) return {};
|
|
1587
1588
|
return await resolveBusinessConfig(host, token, async () => {
|
|
1588
|
-
const { fetchCliConfig: fetchCliConfig2 } = await import("./compat-check-
|
|
1589
|
+
const { fetchCliConfig: fetchCliConfig2 } = await import("./compat-check-V3NGDQA5.js");
|
|
1589
1590
|
return fetchCliConfig2(host, token);
|
|
1590
1591
|
}, Date.now(), synchronizeSkills);
|
|
1591
1592
|
} catch {
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
readOutputMetadata,
|
|
7
7
|
unwrapOutputData,
|
|
8
8
|
withOutputMetadata
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7XTWP3NB.js";
|
|
10
10
|
import {
|
|
11
11
|
CapabilityGatewayError,
|
|
12
12
|
fetchCapabilityGateway,
|
|
13
13
|
requestCapabilityGateway
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-A3PREN6Q.js";
|
|
15
15
|
import {
|
|
16
16
|
PermissionError
|
|
17
17
|
} from "./chunk-R2SVAO4G.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
createCapabilityCommand
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-434DSEOC.js";
|
|
5
5
|
import {
|
|
6
6
|
registerCapabilityGatewayRoute
|
|
7
7
|
} from "./chunk-AWW2T2WL.js";
|
|
8
8
|
import {
|
|
9
9
|
executeCapabilityWithEnvelope
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-A3PREN6Q.js";
|
|
11
11
|
import {
|
|
12
12
|
CliApiError,
|
|
13
13
|
CliValidationError
|
|
@@ -301,24 +301,14 @@ function buildCapabilityGatewayUrl(host, domain, pathAfterV1, queryParams = {},
|
|
|
301
301
|
}
|
|
302
302
|
return url.toString();
|
|
303
303
|
}
|
|
304
|
-
async function permissionMessage(resp) {
|
|
305
|
-
const text = await resp.text().catch(() => "");
|
|
306
|
-
try {
|
|
307
|
-
const d = safeJsonParse(text);
|
|
308
|
-
const msg = d && (d.error?.message || (typeof d.error === "string" ? d.error : void 0) || d.message);
|
|
309
|
-
if (msg && typeof msg === "string") return msg;
|
|
310
|
-
} catch {
|
|
311
|
-
}
|
|
312
|
-
return "Permission denied for this resource (HTTP 403)";
|
|
313
|
-
}
|
|
314
304
|
async function permissionError(resp) {
|
|
315
|
-
const
|
|
316
|
-
const
|
|
317
|
-
const body = safeJsonParse(await codeResponse.text());
|
|
305
|
+
const parsed = parseCapabilityResponse(await resp.text().catch(() => ""));
|
|
306
|
+
const body = isRecord(parsed) ? parsed : void 0;
|
|
318
307
|
const error = isRecord(body?.error) ? body.error : void 0;
|
|
308
|
+
const message = error?.message || (typeof body?.error === "string" ? body.error : void 0) || body?.message;
|
|
319
309
|
const code = nonEmptyString(error?.code) ?? nonEmptyString(body?.code);
|
|
320
310
|
return new PermissionError(
|
|
321
|
-
message,
|
|
311
|
+
typeof message === "string" && message ? message : "Permission denied for this resource (HTTP 403)",
|
|
322
312
|
code,
|
|
323
313
|
nonEmptyString(error?.hint),
|
|
324
314
|
void 0,
|
|
@@ -13,17 +13,17 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
printError,
|
|
15
15
|
printOutput
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7XTWP3NB.js";
|
|
17
17
|
import {
|
|
18
18
|
CapabilityGatewayError
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-A3PREN6Q.js";
|
|
20
20
|
import {
|
|
21
21
|
BusinessDisabledError,
|
|
22
22
|
assertBusinessEnabled,
|
|
23
23
|
businessForCommand,
|
|
24
24
|
formatCapabilityMissCompatHint,
|
|
25
25
|
readCurrentBusinessConfig
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-4CRZ2YUC.js";
|
|
27
27
|
import {
|
|
28
28
|
CredentialStoreUnreadableError,
|
|
29
29
|
SecureStoreAuthError
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
invalidateBusinessSkillSynchronization,
|
|
5
5
|
refreshEnvironmentAfterLogin,
|
|
6
6
|
refreshEnvironmentConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7AQ5Y6F2.js";
|
|
8
8
|
import {
|
|
9
9
|
MultiselectCancelled,
|
|
10
10
|
promptSingleSelect
|
|
@@ -16,12 +16,12 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
printError,
|
|
18
18
|
printOutput
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-7XTWP3NB.js";
|
|
20
20
|
import {
|
|
21
21
|
fetchCliConfig,
|
|
22
22
|
readCurrentBusinessConfig,
|
|
23
23
|
resolveKbAutoDiscoveryFeature
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-4CRZ2YUC.js";
|
|
25
25
|
import "./chunk-PUSFEC6B.js";
|
|
26
26
|
import {
|
|
27
27
|
peekCliToken
|