@thinkingai/ae-cli 6.1.42 → 6.1.43
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 +14 -4
- package/README.zh.md +14 -4
- package/bin/ae-cli.js +3 -0
- package/bin/heari/commander-LICENSE +22 -0
- package/bin/heari/engine.mjs +6136 -0
- package/bin/heari/package.json +6 -0
- package/bin/heari.mjs +29 -0
- package/cli-installation-guide.md +3 -5
- package/dist/{ai-monitor-E62FT3TT.js → ai-monitor-4VPHXQTL.js} +7 -6
- package/dist/ai-monitor.js +10 -9
- package/dist/{auth-SDK5OAGP.js → auth-RDSS2LUT.js} +18 -16
- package/dist/{automation-IMDCJUML.js → automation-VLIWG2XY.js} +5 -4
- package/dist/{capability-F6YWGPZZ.js → capability-CUOEIB5F.js} +5 -4
- package/dist/{chunk-KE5WGBXS.js → chunk-3DTMWDJX.js} +1 -1
- package/dist/{chunk-KAZ5FWPB.js → chunk-3FSYICDW.js} +6 -5
- package/dist/{chunk-ZK6KEGUR.js → chunk-3TV24AVQ.js} +10 -10
- package/dist/{chunk-DTODOQ6T.js → chunk-3U75VLCP.js} +1 -1
- package/dist/{chunk-N2QILIGH.js → chunk-4MOCV6HU.js} +1 -1
- package/dist/{chunk-M2OCZRVX.js → chunk-6VLHJKDD.js} +2 -2
- package/dist/{chunk-WG27BD67.js → chunk-7KBENPQF.js} +8 -16
- package/dist/{chunk-CDBW5RE6.js → chunk-BFSWGXM2.js} +3 -3
- package/dist/{chunk-UK7HQ4IL.js → chunk-CBNE2S44.js} +2 -2
- package/dist/{chunk-UWQXGF44.js → chunk-FEYZBUFQ.js} +4 -353
- package/dist/chunk-FKTVD63C.js +369 -0
- package/dist/{chunk-2H3SFJE3.js → chunk-FKVG7LOP.js} +5 -3
- package/dist/{chunk-GTENC5CO.js → chunk-IAZ4AMVY.js} +6 -4
- package/dist/{chunk-ZSKLELL7.js → chunk-LSELMDKQ.js} +2 -2
- package/dist/{chunk-2RORKIF6.js → chunk-NJGB4YOH.js} +2 -2
- package/dist/{chunk-L7MT53VM.js → chunk-PWG5IGCP.js} +1 -1
- package/dist/{chunk-DIYDOOBL.js → chunk-TFEGYB4X.js} +2 -2
- package/dist/{chunk-DZRQGI2Z.js → chunk-ZPAOEDK7.js} +5 -3
- package/dist/{compat-check-J5K3NO5G.js → compat-check-L3C7HCVG.js} +4 -3
- package/dist/{config-O3W6XLHO.js → config-LAF5MMYK.js} +6 -5
- package/dist/context-E4YKECC4.js +350 -0
- package/dist/{evaluation-OZM54MES.js → evaluation-I4IJ25CY.js} +4 -3
- package/dist/heari-cli-login.js +83 -0
- package/dist/index.js +42 -34
- package/dist/{memory-VPOPSU52.js → memory-Y7LPCRP4.js} +5 -4
- package/dist/{metadata-3GA2N27I.js → metadata-T6HYAU7E.js} +7 -6
- package/dist/{model-2F2354QP.js → model-2BNN72MN.js} +7 -6
- package/dist/{personal-semantic-preference-T2HFF2V4.js → personal-semantic-preference-WCZBOA7V.js} +42 -16
- package/dist/{project-semantic-WJOP2HGJ.js → project-semantic-WW5AZST3.js} +266 -17
- package/dist/{sync-K65X7ODO.js → sync-6PL25V42.js} +13 -12
- package/dist/{te-agent-QWZC36YS.js → te-agent-KXLDW4NE.js} +6 -5
- package/dist/{te-analysis-7E2GVKOR.js → te-analysis-KKRECQ7F.js} +311 -52
- package/dist/{te-community-NQNSLNON.js → te-community-6RGX7IWH.js} +8 -6
- package/dist/{te-dataops-PMI7UX36.js → te-dataops-RSPBC6WJ.js} +726 -220
- package/dist/{te-engage-EZBV5IPQ.js → te-engage-FIPP5L2Z.js} +6 -5
- package/dist/{te-experiment-RDB3TYBG.js → te-experiment-KQ5CBYKI.js} +86 -10
- package/dist/{te-kb-OWPJB243.js → te-kb-XYSDXZUG.js} +32 -11
- package/dist/{te-system-Z4VEB6PL.js → te-system-QSOHAP7M.js} +7 -6
- package/dist/{te-team-NCMN34IL.js → te-team-R6MZ4RK2.js} +6 -5
- package/dist/{things-UBMLTY3S.js → things-DEONFUGS.js} +6 -5
- package/dist/{update-LYVYF3KJ.js → update-C6G4P3C7.js} +5 -4
- package/dist/{web-runtime-XJWDFVP3.js → web-runtime-UGKPTBOK.js} +12 -10
- package/dist/{workspace-W5ZPVWJS.js → workspace-OBIIE5FN.js} +5 -4
- package/package.json +7 -5
- 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-capability/SKILL.md +5 -1
- 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-experiment/SKILL.md +9 -1
- package/skills/ae-experiment/references/manage_feature_fixed_value.md +73 -0
- package/skills/ae-experiment/references/save_feature.md +14 -1
- package/skills/ae-heari-research/SKILL.md +40 -0
- package/skills/ae-heari-research/references/design.md +35 -0
- package/skills/ae-heari-research/references/examples.md +46 -0
- package/skills/ae-heari-research/references/platform-auth.md +35 -0
- package/skills/ae-heari-research/references/platform-research.md +74 -0
- package/skills/ae-heari-research/references/platform-results.md +73 -0
- package/skills/ae-heari-research/references/platform.md +34 -0
- package/skills/ae-heari-research/references/probing-screening.md +31 -0
- package/skills/ae-heari-research/references/quality.md +44 -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/skills/ae-onboarding/SKILL.md +3 -3
- package/dist/context-WJQGJD6F.js +0 -139
- package/dist/{data-integration-KMJWYAKK.js → data-integration-SCYYZLWI.js} +4 -4
package/bin/heari.mjs
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export async function runHearI(args) {
|
|
2
|
+
if (Number(process.versions.node.split('.')[0]) < 22) {
|
|
3
|
+
console.error('HearI requires Node.js 22 or later. Select a supported runtime and rerun ae-cli heari.');
|
|
4
|
+
return 1;
|
|
5
|
+
}
|
|
6
|
+
const { run } = await import('./heari/engine.mjs');
|
|
7
|
+
const controller = new AbortController();
|
|
8
|
+
const cancel = () => controller.abort();
|
|
9
|
+
process.on('SIGINT', cancel);
|
|
10
|
+
process.on('SIGTERM', cancel);
|
|
11
|
+
try {
|
|
12
|
+
// The AE runtime appends its own telemetry option before the optional '--' separator.
|
|
13
|
+
const tail = args.indexOf('--');
|
|
14
|
+
const head = args.slice(0, tail === -1 ? args.length : tail);
|
|
15
|
+
if (head.at(-2) === '--agent-context') head.splice(-2);
|
|
16
|
+
else if (head.at(-1)?.startsWith('--agent-context=')) head.pop();
|
|
17
|
+
const forwarded = tail === -1 ? head : [...head, ...args.slice(tail)];
|
|
18
|
+
return await run(['--lang', 'en-US', ...forwarded], {
|
|
19
|
+
signal: controller.signal,
|
|
20
|
+
aeCredentials: async (signal, checkEndpoint) => {
|
|
21
|
+
const { exchangeHeariCredentials } = await import('../dist/heari-cli-login.js');
|
|
22
|
+
return exchangeHeariCredentials(signal, checkEndpoint);
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
} finally {
|
|
26
|
+
process.off('SIGINT', cancel);
|
|
27
|
+
process.off('SIGTERM', cancel);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -35,7 +35,7 @@ Verification parses YAML/frontmatter and compares expected files in the shared g
|
|
|
35
35
|
- Unrelated PromptScript/Eve project-only diagnostics and their failure summary are handled internally and not displayed as user warnings after verification succeeds.
|
|
36
36
|
- YAML errors, missing or stale files, supported-client installation errors, CLI version mismatch, and unsuccessful processes remain failures.
|
|
37
37
|
|
|
38
|
-
`--format json` emits one report on stdout. Progress goes to stderr; raw subprocess logs are not forwarded. Reports include `ok`, `dry_run`, `cli.package/version/path/verified`, `skills.directory/expected_count/installed_count/missing/source/version/failures/attempts`, `auth.host/authenticated`, and `next_steps`. When provided, `onboarding_skill_path` points to the onboarding Skill in the verified package. Counts refer to unique Skills in the global directory. Use `--format table` for a human summary. Dry runs make no subprocess calls or installation/configuration writes.
|
|
38
|
+
`--format json` emits one report on stdout. Progress goes to stderr; raw subprocess logs are not forwarded. Reports include `ok`, `dry_run`, `cli.package/version/path/verified`, `skills.directory/expected_count/installed_count/missing/source/version/failures/attempts`, `auth.host/authenticated`, and `next_steps`. A verified installation can also report `next_action`, localized choices in `interaction`, and `local_language`. When provided, `onboarding_skill_path` points to the onboarding Skill in the verified package. Counts refer to unique Skills in the global directory. Use `--format table` for a human summary. Dry runs make no subprocess calls or installation/configuration writes.
|
|
39
39
|
|
|
40
40
|
`install --dry-run --format json` returns that report directly, with a root-level `commands` array. `update --dry-run --format json` keeps the command envelope (`ok` and `data`); its `data` includes `action`, `dryRun`, `target`, optional `host`, `commands`, and `skillsSources`.
|
|
41
41
|
|
|
@@ -128,8 +128,6 @@ Choose the specific Skill you are troubleshooting. The onboarding Skill is loade
|
|
|
128
128
|
|
|
129
129
|
## AI installation prompt
|
|
130
130
|
|
|
131
|
-
> Install AE CLI and its matching global Skills with `npx @thinkingai/ae-cli@latest install --format json`. Use the version and registry I supply, if any. Verify the installation and report the CLI version and Skill count. Follow [Start using AE in an Agent](#start-using-ae-in-an-agent)
|
|
131
|
+
> Install AE CLI and its matching global Skills with `npx @thinkingai/ae-cli@latest install --format json`. Use the version and registry I supply, if any. Verify the installation and report the CLI version and Skill count. After a verified fresh 6.1 install, use `next_action` to continue in this turn. If it is `choose_account`, show the account choices from `interaction` and wait for my selection. Follow [Start using AE in an Agent](#start-using-ae-in-an-agent) for the next step or when I ask for onboarding, signup, or sign-in.
|
|
132
132
|
|
|
133
|
-
To
|
|
134
|
-
|
|
135
|
-
> Install AE CLI and its matching global Skills with `npx @thinkingai/ae-cli@latest-6.1 install`.
|
|
133
|
+
To select the 6.1 release line explicitly, use `npx @thinkingai/ae-cli@latest-6.1 install --format json` in the same prompt.
|
|
@@ -9,13 +9,14 @@ import {
|
|
|
9
9
|
traceCount,
|
|
10
10
|
traceGet,
|
|
11
11
|
traceList
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-TFEGYB4X.js";
|
|
13
|
+
import "./chunk-3FSYICDW.js";
|
|
14
14
|
import "./chunk-AWW2T2WL.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-4MOCV6HU.js";
|
|
16
|
+
import "./chunk-IAZ4AMVY.js";
|
|
17
|
+
import "./chunk-7KBENPQF.js";
|
|
18
|
+
import "./chunk-FKTVD63C.js";
|
|
19
|
+
import "./chunk-FEYZBUFQ.js";
|
|
19
20
|
import "./chunk-IGU3R2JD.js";
|
|
20
21
|
import "./chunk-MTK4ZE7W.js";
|
|
21
22
|
import "./chunk-3ZQY7SLZ.js";
|
package/dist/ai-monitor.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
ai_monitor_default
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-TFEGYB4X.js";
|
|
5
|
+
import "./chunk-3FSYICDW.js";
|
|
6
6
|
import "./chunk-AWW2T2WL.js";
|
|
7
7
|
import {
|
|
8
8
|
configureBusinessCommands,
|
|
9
9
|
parseProgram,
|
|
10
10
|
runCommand
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3TV24AVQ.js";
|
|
12
12
|
import "./chunk-GYODT7C4.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-PWG5IGCP.js";
|
|
14
|
+
import "./chunk-3DTMWDJX.js";
|
|
15
|
+
import "./chunk-4MOCV6HU.js";
|
|
16
|
+
import "./chunk-IAZ4AMVY.js";
|
|
17
|
+
import "./chunk-7KBENPQF.js";
|
|
18
|
+
import "./chunk-FKTVD63C.js";
|
|
19
|
+
import "./chunk-FEYZBUFQ.js";
|
|
19
20
|
import "./chunk-IGU3R2JD.js";
|
|
20
21
|
import {
|
|
21
22
|
readExternalCliToken,
|
|
@@ -3,18 +3,11 @@ import {
|
|
|
3
3
|
environmentRefreshOutput,
|
|
4
4
|
invalidateBusinessSkillSynchronization,
|
|
5
5
|
refreshEnvironmentAfterLogin
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BFSWGXM2.js";
|
|
7
7
|
import {
|
|
8
8
|
MultiselectCancelled,
|
|
9
9
|
promptSingleSelect
|
|
10
10
|
} from "./chunk-7K24F7T2.js";
|
|
11
|
-
import {
|
|
12
|
-
resolveHost
|
|
13
|
-
} from "./chunk-Z6WSCIHM.js";
|
|
14
|
-
import {
|
|
15
|
-
printError,
|
|
16
|
-
printOutput
|
|
17
|
-
} from "./chunk-N2QILIGH.js";
|
|
18
11
|
import {
|
|
19
12
|
DeviceFlowUnsupportedError,
|
|
20
13
|
authorizeLoginDevice,
|
|
@@ -23,31 +16,40 @@ import {
|
|
|
23
16
|
resolveDeviceSessionRoute,
|
|
24
17
|
resolveLegacyLoginBase,
|
|
25
18
|
runDeviceFlow
|
|
26
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-FKVG7LOP.js";
|
|
20
|
+
import {
|
|
21
|
+
resolveHost
|
|
22
|
+
} from "./chunk-Z6WSCIHM.js";
|
|
23
|
+
import {
|
|
24
|
+
printError,
|
|
25
|
+
printOutput
|
|
26
|
+
} from "./chunk-4MOCV6HU.js";
|
|
27
27
|
import {
|
|
28
28
|
missingAeHostGuidance,
|
|
29
29
|
missingAeHostHint,
|
|
30
30
|
runHostCompatCheck
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-IAZ4AMVY.js";
|
|
32
32
|
import {
|
|
33
33
|
getLocalCliPackageInfo
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-7KBENPQF.js";
|
|
35
35
|
import {
|
|
36
36
|
CliTokenValidationUnavailableError,
|
|
37
|
+
clearCliTokenCache,
|
|
38
|
+
mintCliToken,
|
|
39
|
+
validateCliTokenOnServer
|
|
40
|
+
} from "./chunk-FKTVD63C.js";
|
|
41
|
+
import {
|
|
37
42
|
CredentialStoreUnreadableError,
|
|
38
43
|
SecureStoreAuthError,
|
|
39
44
|
activateCredential,
|
|
40
45
|
assertCredentialsReadable,
|
|
41
46
|
clearAllCredentials,
|
|
42
|
-
clearCliTokenCache,
|
|
43
47
|
getActiveCredential,
|
|
44
48
|
listCredentials,
|
|
45
|
-
mintCliToken,
|
|
46
49
|
removeActiveCredential,
|
|
47
50
|
saveCredential,
|
|
48
|
-
updateCredentialMetadata
|
|
49
|
-
|
|
50
|
-
} from "./chunk-UWQXGF44.js";
|
|
51
|
+
updateCredentialMetadata
|
|
52
|
+
} from "./chunk-FEYZBUFQ.js";
|
|
51
53
|
import {
|
|
52
54
|
getFallbackCliToken,
|
|
53
55
|
loadConfig,
|
|
@@ -1,11 +1,11 @@
|
|
|
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-NJGB4YOH.js";
|
|
5
5
|
import {
|
|
6
6
|
currentAgentSpaceId
|
|
7
7
|
} from "./chunk-RK6GLDGI.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-CBNE2S44.js";
|
|
9
9
|
import {
|
|
10
10
|
detectCliLocale
|
|
11
11
|
} from "./chunk-N2MAYIRU.js";
|
|
@@ -15,8 +15,9 @@ import {
|
|
|
15
15
|
getFromMainApp,
|
|
16
16
|
patchToMainApp,
|
|
17
17
|
postToMainApp
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-3DTMWDJX.js";
|
|
19
|
+
import "./chunk-FKTVD63C.js";
|
|
20
|
+
import "./chunk-FEYZBUFQ.js";
|
|
20
21
|
import "./chunk-IGU3R2JD.js";
|
|
21
22
|
import "./chunk-MTK4ZE7W.js";
|
|
22
23
|
import {
|
|
@@ -17,13 +17,13 @@ import {
|
|
|
17
17
|
printError,
|
|
18
18
|
printOutput,
|
|
19
19
|
withOutputMetadata
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-4MOCV6HU.js";
|
|
21
21
|
import {
|
|
22
22
|
assertBusinessEnabled,
|
|
23
23
|
businessForCapability,
|
|
24
24
|
readBusinessConfigForExecution,
|
|
25
25
|
readCurrentBusinessConfig
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-IAZ4AMVY.js";
|
|
27
27
|
import {
|
|
28
28
|
CapabilityGatewayError,
|
|
29
29
|
dryRunCapabilityWithEnvelope,
|
|
@@ -32,11 +32,12 @@ import {
|
|
|
32
32
|
inspectCapabilityWithEnvelope,
|
|
33
33
|
listCapabilitiesWithEnvelope,
|
|
34
34
|
validateCapabilityWithEnvelope
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-7KBENPQF.js";
|
|
36
|
+
import "./chunk-FKTVD63C.js";
|
|
36
37
|
import {
|
|
37
38
|
CredentialStoreUnreadableError,
|
|
38
39
|
SecureStoreAuthError
|
|
39
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-FEYZBUFQ.js";
|
|
40
41
|
import {
|
|
41
42
|
parseJsonRequest
|
|
42
43
|
} from "./chunk-IGU3R2JD.js";
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
} from "./chunk-AWW2T2WL.js";
|
|
5
5
|
import {
|
|
6
6
|
withOutputMetadata
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4MOCV6HU.js";
|
|
8
8
|
import {
|
|
9
9
|
dryRunCapabilityWithEnvelope,
|
|
10
10
|
executeCapabilityWithEnvelope,
|
|
11
11
|
validateCapabilityWithEnvelope
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7KBENPQF.js";
|
|
13
13
|
import {
|
|
14
14
|
CliValidationError
|
|
15
15
|
} from "./chunk-3ZQY7SLZ.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
|
};
|
|
@@ -5,29 +5,29 @@ import {
|
|
|
5
5
|
} from "./chunk-GYODT7C4.js";
|
|
6
6
|
import {
|
|
7
7
|
EvalApiError
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import {
|
|
10
|
-
printError,
|
|
11
|
-
printOutput
|
|
12
|
-
} from "./chunk-N2QILIGH.js";
|
|
8
|
+
} from "./chunk-PWG5IGCP.js";
|
|
13
9
|
import {
|
|
14
10
|
TeAgentApiError,
|
|
15
11
|
TeAgentCredentialsError
|
|
16
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3DTMWDJX.js";
|
|
13
|
+
import {
|
|
14
|
+
printError,
|
|
15
|
+
printOutput
|
|
16
|
+
} from "./chunk-4MOCV6HU.js";
|
|
17
17
|
import {
|
|
18
18
|
BusinessDisabledError,
|
|
19
19
|
assertBusinessEnabled,
|
|
20
20
|
businessForCommand,
|
|
21
21
|
formatCapabilityMissCompatHint,
|
|
22
22
|
readCurrentBusinessConfig
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-IAZ4AMVY.js";
|
|
24
24
|
import {
|
|
25
25
|
CapabilityGatewayError
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-7KBENPQF.js";
|
|
27
27
|
import {
|
|
28
28
|
CredentialStoreUnreadableError,
|
|
29
29
|
SecureStoreAuthError
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-FEYZBUFQ.js";
|
|
31
31
|
import {
|
|
32
32
|
getActiveHost,
|
|
33
33
|
safeJsonParse
|
|
@@ -470,7 +470,7 @@ function createRuntimeContext(cmd, opts, globalOpts) {
|
|
|
470
470
|
}
|
|
471
471
|
const ctx = {
|
|
472
472
|
async onboarding(action, input) {
|
|
473
|
-
const { invokeOnboarding } = await import("./web-runtime-
|
|
473
|
+
const { invokeOnboarding } = await import("./web-runtime-UGKPTBOK.js");
|
|
474
474
|
return invokeOnboarding(action, input);
|
|
475
475
|
},
|
|
476
476
|
has(name) {
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
evalRequest,
|
|
7
7
|
evaluationResponseStatus,
|
|
8
8
|
resolveEvaluationHost
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PWG5IGCP.js";
|
|
10
10
|
import {
|
|
11
11
|
getCliToken,
|
|
12
12
|
internalCallSourceHeaders
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FKTVD63C.js";
|
|
14
14
|
import {
|
|
15
15
|
isAeSandboxRuntime
|
|
16
16
|
} from "./chunk-IGU3R2JD.js";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
-
SecureStoreAuthError,
|
|
4
3
|
clearCliTokenCache,
|
|
5
4
|
getCliToken,
|
|
6
5
|
internalCallSourceHeaders
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FKTVD63C.js";
|
|
7
|
+
import {
|
|
8
|
+
SecureStoreAuthError
|
|
9
|
+
} from "./chunk-FEYZBUFQ.js";
|
|
8
10
|
import {
|
|
9
11
|
getAeSandboxDetectionReason,
|
|
10
12
|
safeJsonParse,
|
|
@@ -374,24 +376,14 @@ function buildCapabilityGatewayUrl(host, domain, pathAfterV1, queryParams = {},
|
|
|
374
376
|
}
|
|
375
377
|
return url.toString();
|
|
376
378
|
}
|
|
377
|
-
async function permissionMessage(resp) {
|
|
378
|
-
const text = await resp.text().catch(() => "");
|
|
379
|
-
try {
|
|
380
|
-
const d = safeJsonParse(text);
|
|
381
|
-
const msg = d && (d.error?.message || (typeof d.error === "string" ? d.error : void 0) || d.message);
|
|
382
|
-
if (msg && typeof msg === "string") return msg;
|
|
383
|
-
} catch {
|
|
384
|
-
}
|
|
385
|
-
return "Permission denied for this resource (HTTP 403)";
|
|
386
|
-
}
|
|
387
379
|
async function permissionError(resp) {
|
|
388
|
-
const
|
|
389
|
-
const
|
|
390
|
-
const body = safeJsonParse(await codeResponse.text());
|
|
380
|
+
const parsed = parseCapabilityResponse(await resp.text().catch(() => ""));
|
|
381
|
+
const body = isRecord(parsed) ? parsed : void 0;
|
|
391
382
|
const error = isRecord(body?.error) ? body.error : void 0;
|
|
383
|
+
const message = error?.message || (typeof body?.error === "string" ? body.error : void 0) || body?.message;
|
|
392
384
|
const code = nonEmptyString(error?.code) ?? nonEmptyString(body?.code);
|
|
393
385
|
return new PermissionError(
|
|
394
|
-
message,
|
|
386
|
+
typeof message === "string" && message ? message : "Permission denied for this resource (HTTP 403)",
|
|
395
387
|
code,
|
|
396
388
|
nonEmptyString(error?.hint) ?? nonEmptyString(body?.hint),
|
|
397
389
|
void 0,
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
rememberBusinessConfig,
|
|
7
7
|
reserveBusinessSkillContext,
|
|
8
8
|
syncBusinessSkills
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IAZ4AMVY.js";
|
|
10
10
|
import {
|
|
11
11
|
getLocalCliPackageInfo
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7KBENPQF.js";
|
|
13
13
|
import {
|
|
14
14
|
peekCliToken
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-FKTVD63C.js";
|
|
16
16
|
import {
|
|
17
17
|
getActiveHost,
|
|
18
18
|
getConfigDir
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
postToMainApp,
|
|
11
11
|
putToMainApp,
|
|
12
12
|
uploadToMainApp
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3DTMWDJX.js";
|
|
14
14
|
import {
|
|
15
15
|
clearCliTokenCache
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-FKTVD63C.js";
|
|
17
17
|
|
|
18
18
|
// src/core/resource-package-client.ts
|
|
19
19
|
function checkPath(path) {
|