@thinkingai/ae-cli 6.0.60 → 6.0.61
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 +4 -1
- package/README.zh.md +6 -1
- package/bin/runtime-capabilities.json +1 -1
- package/dist/{ai-monitor-FCXSLHAP.js → ai-monitor-NUKSJPLE.js} +10 -9
- package/dist/ai-monitor.js +14 -13
- package/dist/{auth-ATK2SLEV.js → auth-MVAEBGBP.js} +18 -10
- package/dist/{automation-FLCPFMN4.js → automation-6L6IAYRK.js} +6 -7
- package/dist/{capability-6KTSOI7L.js → capability-74N7AN5X.js} +10 -9
- package/dist/{chunk-OAWPT7VP.js → chunk-2I5SZ5DS.js} +2 -2
- package/dist/{chunk-5E7MTTFN.js → chunk-7WBCSJL6.js} +23 -9
- 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-CF6JTT2U.js → chunk-EFGUBGA6.js} +1 -1
- package/dist/{chunk-BEYLCUZX.js → chunk-H35VDOAE.js} +3 -3
- package/dist/{chunk-F2VFZUGG.js → chunk-HIMOBNEY.js} +2 -2
- package/dist/{chunk-JEUXDY3B.js → chunk-HQED4YB4.js} +1 -1
- package/dist/{chunk-AXTO4FTM.js → chunk-HRFYYEXR.js} +3 -3
- package/dist/{chunk-2ETRY2CU.js → chunk-JZY6WWAP.js} +9 -8
- package/dist/{chunk-2F64AZYH.js → chunk-KA5WKR5P.js} +2 -2
- package/dist/{chunk-P7QDCWJ6.js → chunk-LFJ7N36I.js} +5 -1
- package/dist/{chunk-SDKW6LYE.js → chunk-LPKIMGIU.js} +3 -3
- package/dist/chunk-NNK3JBH4.js +60 -0
- package/dist/{chunk-VJUXKVRE.js → chunk-OTZ4JQDU.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-HSZAIPUX.js → chunk-RB26WNLM.js} +7 -5
- package/dist/{chunk-VRMGHQKE.js → chunk-SVNED423.js} +11 -11
- 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-LOR4IA26.js → chunk-XPARQSYS.js} +165 -186
- package/dist/{chunk-72NJKS7O.js → chunk-XZDKAR4N.js} +4 -4
- package/dist/{community-report-client-TJVCLZ3K.js → community-report-client-ULRNXLQV.js} +1 -1
- package/dist/{compat-check-XD2U7PZ2.js → compat-check-W4XC27RG.js} +5 -4
- package/dist/{config-U3GDWU6E.js → config-264GB6C7.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 +46 -42
- package/dist/{local-data-upload-client-KCMG6J62.js → local-data-upload-client-YTWMAAGE.js} +1 -1
- package/dist/{memory-WEB27VI6.js → memory-ZLTTULZK.js} +6 -7
- package/dist/{metadata-7FYE4234.js → metadata-EN2IWCDI.js} +10 -9
- package/dist/{model-T7H7Q6BG.js → model-NAKQWK4W.js} +4 -5
- package/dist/{personal-semantic-preference-O6VXM74A.js → personal-semantic-preference-UGN67KTN.js} +45 -14
- package/dist/{project-semantic-2GGFJWW6.js → project-semantic-5OP3YPZD.js} +9 -8
- package/dist/{sync-ULBB7WO5.js → sync-LDJQZRQH.js} +9 -9
- package/dist/{te-agent-6RMF7LUV.js → te-agent-WNNAD4AJ.js} +303 -17
- package/dist/{te-analysis-HSYC7GNV.js → te-analysis-KIMH6AGU.js} +25 -20
- package/dist/{te-community-FLKZGQKB.js → te-community-P7NNBVCS.js} +13 -11
- package/dist/{te-dataops-OQQGTCUA.js → te-dataops-ZRKSG4R7.js} +13 -11
- package/dist/{te-engage-RIEBHL5T.js → te-engage-PVBVNRSU.js} +9 -8
- package/dist/{te-kb-4HG2FMHJ.js → te-kb-W7PRC7QN.js} +68 -17
- package/dist/{te-system-AL4B4XZL.js → te-system-F4ZU2HRQ.js} +6 -7
- package/dist/{te-team-5O4UVUWE.js → te-team-5ONMRGKF.js} +9 -8
- package/dist/{things-TSJ64GBT.js → things-PFENSIF4.js} +9 -8
- package/dist/{update-Q5LURAWV.js → update-EUZ4GNND.js} +8 -6
- package/dist/{workspace-FF2HXJGR.js → workspace-Z7L33OBQ.js} +6 -7
- package/package.json +5 -2
- 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-kb/SKILL.md +4 -2
- package/skills/ae-kb/references/publication.md +45 -0
- package/dist/chunk-Y74WTIKJ.js +0 -10
|
@@ -1,28 +1,30 @@
|
|
|
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
|
printError
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OTZ4JQDU.js";
|
|
8
8
|
import {
|
|
9
|
-
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
sourceLoggedFetch
|
|
10
|
+
} from "./chunk-NNK3JBH4.js";
|
|
11
|
+
import "./chunk-XPARQSYS.js";
|
|
12
|
+
import "./chunk-PUSFEC6B.js";
|
|
12
13
|
import {
|
|
13
14
|
SecureStoreAuthError,
|
|
14
|
-
getCliToken
|
|
15
|
-
|
|
15
|
+
getCliToken,
|
|
16
|
+
internalCallSourceHeaders
|
|
17
|
+
} from "./chunk-PLNS5J33.js";
|
|
16
18
|
import {
|
|
17
19
|
safeJsonParse
|
|
18
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-AMURHMS3.js";
|
|
19
21
|
import {
|
|
20
22
|
CliApiError,
|
|
21
23
|
CliValidationError,
|
|
22
24
|
PermissionError,
|
|
23
25
|
externalCliTokenRequestOptions,
|
|
24
26
|
logger
|
|
25
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-R2SVAO4G.js";
|
|
26
28
|
|
|
27
29
|
// src/commands/te-dataops/shared.ts
|
|
28
30
|
import { randomBytes } from "crypto";
|
|
@@ -172,7 +174,7 @@ async function downloadDataopsApi(ctx, path, params, targetPath) {
|
|
|
172
174
|
const host = resolveHost(ctx.host());
|
|
173
175
|
const token = await getCliToken(host);
|
|
174
176
|
const url = buildUrl(host, path, compactArgs(params));
|
|
175
|
-
const resp = await
|
|
177
|
+
const resp = await sourceLoggedFetch(url, {
|
|
176
178
|
method: "GET",
|
|
177
179
|
...externalCliTokenRequestOptions(url),
|
|
178
180
|
headers: {
|
|
@@ -231,7 +233,7 @@ async function dataopsRequest(ctx, method, path, params = {}, body) {
|
|
|
231
233
|
if (method !== "GET") {
|
|
232
234
|
options.body = JSON.stringify(body ?? {});
|
|
233
235
|
}
|
|
234
|
-
const resp = await
|
|
236
|
+
const resp = await sourceLoggedFetch(url, { ...options, ...externalCliTokenRequestOptions(url) });
|
|
235
237
|
const text = await resp.text();
|
|
236
238
|
const data = parseResponseBody(text, url, resp.status, !resp.ok);
|
|
237
239
|
logger.api(method, url, resp.status, body, data);
|
|
@@ -1,7 +1,7 @@
|
|
|
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-H35VDOAE.js";
|
|
5
5
|
import {
|
|
6
6
|
registerCapabilityGatewayRoute,
|
|
7
7
|
resolveGatewayDomain
|
|
@@ -9,21 +9,22 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
printError,
|
|
11
11
|
withOutputMetadata
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OTZ4JQDU.js";
|
|
13
13
|
import {
|
|
14
14
|
CapabilityGatewayError,
|
|
15
15
|
buildCapabilityGatewayUrl,
|
|
16
16
|
fetchCapabilityGateway,
|
|
17
17
|
requestCapabilityGateway,
|
|
18
18
|
requestCapabilityGatewayWithEnvelope
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-JZY6WWAP.js";
|
|
20
|
+
import "./chunk-NNK3JBH4.js";
|
|
21
|
+
import "./chunk-XPARQSYS.js";
|
|
22
|
+
import "./chunk-PUSFEC6B.js";
|
|
23
|
+
import "./chunk-PLNS5J33.js";
|
|
24
|
+
import "./chunk-AMURHMS3.js";
|
|
24
25
|
import {
|
|
25
26
|
CliValidationError
|
|
26
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-R2SVAO4G.js";
|
|
27
28
|
|
|
28
29
|
// src/commands/te-engage/shared.ts
|
|
29
30
|
function createEngageCapabilityCommand(cliService, config) {
|
|
@@ -2,26 +2,27 @@ import { createRequire as __createRequire } from 'node:module'; const require =
|
|
|
2
2
|
import {
|
|
3
3
|
kbApi,
|
|
4
4
|
kbUpload
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7WBCSJL6.js";
|
|
6
6
|
import {
|
|
7
7
|
TeAgentApiError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VLOGOM7N.js";
|
|
9
9
|
import {
|
|
10
10
|
printError
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OTZ4JQDU.js";
|
|
12
12
|
import {
|
|
13
13
|
CapabilityGatewayError
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-JZY6WWAP.js";
|
|
15
|
+
import "./chunk-NNK3JBH4.js";
|
|
16
|
+
import "./chunk-XPARQSYS.js";
|
|
17
|
+
import "./chunk-PUSFEC6B.js";
|
|
18
|
+
import "./chunk-PLNS5J33.js";
|
|
19
|
+
import "./chunk-AMURHMS3.js";
|
|
19
20
|
import {
|
|
20
21
|
CliApiError,
|
|
21
22
|
CliValidationError,
|
|
22
23
|
PermissionError,
|
|
23
24
|
kbExecutionContextRequired
|
|
24
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-R2SVAO4G.js";
|
|
25
26
|
|
|
26
27
|
// src/commands/te-kb/project-target.ts
|
|
27
28
|
var API_PATH = "/agent/api/project-semantic-target";
|
|
@@ -221,7 +222,15 @@ function createBody(ctx) {
|
|
|
221
222
|
(source) => !source || !["personal", "company", "system"].includes(source.scope) || typeof source.name !== "string" || !source.name || Object.keys(source).some((key) => !["name", "scope"].includes(key))
|
|
222
223
|
)))
|
|
223
224
|
throw new CliValidationError("--sources must be an array of {scope,name}");
|
|
225
|
+
const candidateId = ctx.str("candidate");
|
|
226
|
+
if (candidateId || ctx.has?.("candidate")) {
|
|
227
|
+
if (!/^[A-Za-z0-9_-]{1,191}$/.test(candidateId))
|
|
228
|
+
throw new CliValidationError("Invalid --candidate");
|
|
229
|
+
if (!Array.isArray(sources) || sources.length !== 1 || sources[0].scope !== "company")
|
|
230
|
+
throw new CliValidationError("--candidate requires exactly one company KB in --sources");
|
|
231
|
+
}
|
|
224
232
|
return {
|
|
233
|
+
...candidateId ? { candidateId } : {},
|
|
225
234
|
...sources ? { sources } : {},
|
|
226
235
|
...ctx.str("locale") ? { locale: ctx.str("locale") } : {}
|
|
227
236
|
};
|
|
@@ -231,13 +240,14 @@ var readContextCreate = {
|
|
|
231
240
|
resource: "read-context",
|
|
232
241
|
command: "create",
|
|
233
242
|
risk: "read",
|
|
234
|
-
description: "Pin
|
|
243
|
+
description: "Pin authorized formal KB views or one pending candidate for subsequent reads (15 minutes).",
|
|
235
244
|
flags: [
|
|
236
245
|
{
|
|
237
246
|
name: "sources",
|
|
238
247
|
type: "json",
|
|
239
248
|
desc: "Optional array of {scope,name}; omit to discover authorized published KBs"
|
|
240
249
|
},
|
|
250
|
+
{ ...candidate, required: false },
|
|
241
251
|
{ name: "locale", type: "string", desc: "zh | en | ja | ko" }
|
|
242
252
|
],
|
|
243
253
|
validate: (ctx) => {
|
|
@@ -248,7 +258,16 @@ var readContextCreate = {
|
|
|
248
258
|
url: ctx.host().replace(/\/$/, "") + `${root}/read-contexts`,
|
|
249
259
|
body: createBody(ctx)
|
|
250
260
|
}),
|
|
251
|
-
execute: (ctx) =>
|
|
261
|
+
execute: async (ctx) => {
|
|
262
|
+
const body4 = createBody(ctx);
|
|
263
|
+
const result = await kbApi(ctx, "POST", `${root}/read-contexts`, {}, body4, options);
|
|
264
|
+
if (body4.candidateId && (!result?.readContextId || !Array.isArray(result.views) || result.views.length !== 1 || result.views[0]?.viewKind !== "candidate" || result.views[0]?.candidateId !== body4.candidateId))
|
|
265
|
+
throw new CliApiError("This server did not return the requested candidate read context.", {
|
|
266
|
+
code: "KB_CANDIDATE_READ_CONTEXT_UNSUPPORTED",
|
|
267
|
+
hint: "Use a Host that supports candidate read contexts."
|
|
268
|
+
});
|
|
269
|
+
return result;
|
|
270
|
+
}
|
|
252
271
|
};
|
|
253
272
|
var readContextRelease = {
|
|
254
273
|
service: "kb",
|
|
@@ -1764,6 +1783,26 @@ var kbRead = {
|
|
|
1764
1783
|
execute: async (ctx) => kbApi(ctx, "POST", API_PATH16, {}, buildBody10(ctx))
|
|
1765
1784
|
};
|
|
1766
1785
|
|
|
1786
|
+
// src/commands/te-kb/ask-identity.ts
|
|
1787
|
+
function askIdentity(value) {
|
|
1788
|
+
function invalid() {
|
|
1789
|
+
throw new CliValidationError("Ask response is missing or has inconsistent readViews. This host may not support explicit contexts.", { code: "KB_READ_CONTEXT_MISMATCH" });
|
|
1790
|
+
}
|
|
1791
|
+
if (!Array.isArray(value) || !value.length || value.length > 100) return invalid();
|
|
1792
|
+
const identities = value.map((view) => {
|
|
1793
|
+
if (!view || typeof view !== "object") return invalid();
|
|
1794
|
+
const text = (key) => typeof view[key] === "string" && view[key].trim().length > 0;
|
|
1795
|
+
if (!text("resourceKey") || !text("readIdentity")) return invalid();
|
|
1796
|
+
if (view.viewKind === "candidate") {
|
|
1797
|
+
if (view.consistency !== "candidate_pinned" || !text("candidateId") || !(view.baseVersion === null || text("baseVersion")) || view.versionId !== null || view.versionNumber !== null)
|
|
1798
|
+
return invalid();
|
|
1799
|
+
} else if (view.viewKind !== "snapshot" || view.consistency !== "version_pinned" || !text("versionId") || !Number.isSafeInteger(view.versionNumber) || view.versionNumber < 1) return invalid();
|
|
1800
|
+
return ["resourceKey", "viewKind", "consistency", "readIdentity", "versionId", "versionNumber", "candidateId", "baseVersion"].map((key) => view[key] ?? null);
|
|
1801
|
+
});
|
|
1802
|
+
if (new Set(identities.map((view) => view[0])).size !== identities.length) return invalid();
|
|
1803
|
+
return JSON.stringify(identities.sort((a, b) => String(a[0]).localeCompare(String(b[0]))));
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1767
1806
|
// src/commands/te-kb/ask-shared.ts
|
|
1768
1807
|
var ASK_API_PATH = "/agent/api/external/knowledge-bases/ask";
|
|
1769
1808
|
var ASK_POLL_INTERVAL_MS = 5e3;
|
|
@@ -1818,6 +1857,7 @@ function transformCompletedResponse(response) {
|
|
|
1818
1857
|
answer: response.answer ?? "",
|
|
1819
1858
|
sources: response.sources ?? []
|
|
1820
1859
|
};
|
|
1860
|
+
if (response.readViews !== void 0) result.readViews = response.readViews;
|
|
1821
1861
|
if (response.modelId !== void 0) result.modelId = response.modelId;
|
|
1822
1862
|
if (response.modelUsage !== void 0) result.modelUsage = response.modelUsage;
|
|
1823
1863
|
if (response.toolCallCount !== void 0) result.toolCallCount = response.toolCallCount;
|
|
@@ -1858,6 +1898,7 @@ var ask = {
|
|
|
1858
1898
|
command: "+ask",
|
|
1859
1899
|
description: "Ask knowledge bases via LLM-powered retrieval (POST /agent/api/external/knowledge-bases/ask). Consumes platform tokens. Prefer +index -> +grep -> +read for deterministic, token-free lookup. By default, polls for completion; use --no-wait to return immediately with executionId.",
|
|
1860
1900
|
flags: [
|
|
1901
|
+
{ name: "read-context", type: "string", required: false, desc: "Use an existing formal snapshot or pending candidate context. Omit for existing published Ask behavior." },
|
|
1861
1902
|
{
|
|
1862
1903
|
name: "question",
|
|
1863
1904
|
type: "string",
|
|
@@ -1893,23 +1934,31 @@ var ask = {
|
|
|
1893
1934
|
dryRun: (ctx) => ({
|
|
1894
1935
|
method: "POST",
|
|
1895
1936
|
url: `${ctx.host().replace(/\/$/, "")}${ASK_API_PATH}`,
|
|
1896
|
-
body: buildBody11(ctx)
|
|
1937
|
+
body: buildBody11(ctx),
|
|
1938
|
+
...ctx.str("read-context") ? { headers: { "X-KB-Read-Context": ctx.str("read-context") } } : {}
|
|
1897
1939
|
}),
|
|
1898
1940
|
execute: async (ctx) => {
|
|
1899
1941
|
const noWait = ctx.bool("no-wait");
|
|
1900
|
-
const submitResponse = await kbApi(ctx, "POST", ASK_API_PATH, {}, buildBody11(ctx));
|
|
1942
|
+
const submitResponse = await kbApi(ctx, "POST", ASK_API_PATH, {}, buildBody11(ctx), ctx.str("read-context") ? { preserveErrorMetadata: true } : {});
|
|
1901
1943
|
if (!submitResponse.executionId) {
|
|
1902
1944
|
throw new Error("Invalid submit response: missing executionId");
|
|
1903
1945
|
}
|
|
1904
1946
|
const executionId = submitResponse.executionId;
|
|
1947
|
+
const identity = ctx.str("read-context") ? askIdentity(submitResponse.readViews) : void 0;
|
|
1905
1948
|
if (noWait) {
|
|
1906
1949
|
return {
|
|
1907
1950
|
executionId,
|
|
1908
|
-
status: submitResponse.status
|
|
1951
|
+
status: submitResponse.status,
|
|
1952
|
+
...identity ? { readViews: submitResponse.readViews } : {}
|
|
1909
1953
|
};
|
|
1910
1954
|
}
|
|
1911
1955
|
const finalResponse = await pollUntilSettled(
|
|
1912
|
-
(id) =>
|
|
1956
|
+
async (id) => {
|
|
1957
|
+
const response = await kbApi(ctx, "GET", ASK_API_PATH, { executionId: id }, void 0, identity ? { preserveErrorMetadata: true } : {});
|
|
1958
|
+
if (identity && askIdentity(response.readViews) !== identity)
|
|
1959
|
+
throw new CliValidationError("Ask response changed its version identity.", { code: "KB_READ_CONTEXT_MISMATCH" });
|
|
1960
|
+
return response;
|
|
1961
|
+
},
|
|
1913
1962
|
executionId
|
|
1914
1963
|
);
|
|
1915
1964
|
if (finalResponse.status === "completed") {
|
|
@@ -1984,10 +2033,12 @@ var askStatus = {
|
|
|
1984
2033
|
{ code: "KB_READ_CONTEXT_REFERENCE_FORBIDDEN" }
|
|
1985
2034
|
);
|
|
1986
2035
|
}
|
|
1987
|
-
|
|
2036
|
+
const result = await kbApi(ctx, "GET", ASK_API_PATH, {
|
|
1988
2037
|
executionId,
|
|
1989
2038
|
...sourceIndex !== void 0 ? { sourceIndex } : {}
|
|
1990
|
-
});
|
|
2039
|
+
}, void 0, { preserveErrorMetadata: true });
|
|
2040
|
+
if (result.readViews !== void 0) askIdentity(result.readViews);
|
|
2041
|
+
return result;
|
|
1991
2042
|
}
|
|
1992
2043
|
};
|
|
1993
2044
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
require_archiver
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-2I5SZ5DS.js";
|
|
5
|
+
import "./chunk-HQED4YB4.js";
|
|
6
6
|
import {
|
|
7
7
|
TeAgentApiError,
|
|
8
8
|
deleteFromMainApp,
|
|
@@ -12,19 +12,18 @@ import {
|
|
|
12
12
|
postToMainApp,
|
|
13
13
|
putToMainApp,
|
|
14
14
|
uploadToMainApp
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-HTZ2MLYA.js";
|
|
15
|
+
} from "./chunk-VLOGOM7N.js";
|
|
16
|
+
import "./chunk-PLNS5J33.js";
|
|
18
17
|
import {
|
|
19
18
|
isAeSandboxRuntime,
|
|
20
19
|
readSandboxCliTokenEntry,
|
|
21
20
|
safeJsonParse
|
|
22
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-AMURHMS3.js";
|
|
23
22
|
import {
|
|
24
23
|
CliValidationError,
|
|
25
24
|
PermissionError,
|
|
26
25
|
__toESM
|
|
27
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-R2SVAO4G.js";
|
|
28
27
|
|
|
29
28
|
// src/commands/te-system/shared.ts
|
|
30
29
|
import { readFileSync } from "fs";
|
|
@@ -2,20 +2,21 @@ import { createRequire as __createRequire } from 'node:module'; const require =
|
|
|
2
2
|
import {
|
|
3
3
|
getAuthHeaders,
|
|
4
4
|
kbApi
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7WBCSJL6.js";
|
|
6
6
|
import {
|
|
7
7
|
printError,
|
|
8
8
|
printOutput
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-OTZ4JQDU.js";
|
|
10
|
+
import "./chunk-JZY6WWAP.js";
|
|
11
|
+
import "./chunk-NNK3JBH4.js";
|
|
12
|
+
import "./chunk-XPARQSYS.js";
|
|
13
|
+
import "./chunk-PUSFEC6B.js";
|
|
14
|
+
import "./chunk-PLNS5J33.js";
|
|
15
|
+
import "./chunk-AMURHMS3.js";
|
|
15
16
|
import {
|
|
16
17
|
externalCliTokenRequestOptions,
|
|
17
18
|
redactExternalCliToken
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-R2SVAO4G.js";
|
|
19
20
|
|
|
20
21
|
// src/commands/te-team/shared.ts
|
|
21
22
|
var API_PREFIX = process.env.AE_API_PREFIX ?? "/agent";
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
resolveMemoryApiBaseUrl
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-THTROEGD.js";
|
|
5
|
+
import "./chunk-HIMOBNEY.js";
|
|
6
|
+
import "./chunk-VLOGOM7N.js";
|
|
7
7
|
import {
|
|
8
8
|
CapabilityGatewayError,
|
|
9
9
|
buildCapabilityGatewayUrl,
|
|
10
10
|
callCapabilityApi
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-JZY6WWAP.js";
|
|
12
|
+
import "./chunk-NNK3JBH4.js";
|
|
13
|
+
import "./chunk-PUSFEC6B.js";
|
|
14
|
+
import "./chunk-PLNS5J33.js";
|
|
15
|
+
import "./chunk-AMURHMS3.js";
|
|
15
16
|
import {
|
|
16
17
|
PermissionError
|
|
17
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-R2SVAO4G.js";
|
|
18
19
|
|
|
19
20
|
// src/commands/things/parity-actions.ts
|
|
20
21
|
import { readFileSync } from "fs";
|
|
@@ -5,26 +5,28 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
printError,
|
|
7
7
|
printOutput
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-OTZ4JQDU.js";
|
|
9
9
|
import {
|
|
10
10
|
buildVersionInstallPlan,
|
|
11
11
|
exactVersion,
|
|
12
12
|
fetchCliConfig,
|
|
13
13
|
friendlyVersionSyncFailure,
|
|
14
14
|
getCachedCompatForHost,
|
|
15
|
-
getLocalCliPackageInfo,
|
|
16
15
|
installHost,
|
|
17
16
|
installVersion,
|
|
18
17
|
recordVersionSyncResult,
|
|
19
18
|
rememberBusinessConfig
|
|
20
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-XPARQSYS.js";
|
|
20
|
+
import {
|
|
21
|
+
getLocalCliPackageInfo
|
|
22
|
+
} from "./chunk-PUSFEC6B.js";
|
|
21
23
|
import {
|
|
22
24
|
peekCliToken
|
|
23
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-PLNS5J33.js";
|
|
24
26
|
import {
|
|
25
27
|
getActiveHost
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-AMURHMS3.js";
|
|
29
|
+
import "./chunk-R2SVAO4G.js";
|
|
28
30
|
|
|
29
31
|
// src/commands/update.ts
|
|
30
32
|
var HOST_OPTION_DESC = "Override active AE host URL (e.g., https://ta.thinkingdata.cn)";
|
|
@@ -13,18 +13,17 @@ import {
|
|
|
13
13
|
workspaceResourcePath,
|
|
14
14
|
workspaceTargetFlags,
|
|
15
15
|
workspaceTargetPath
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-COOMXFUG.js";
|
|
17
17
|
import "./chunk-RK6GLDGI.js";
|
|
18
18
|
import {
|
|
19
19
|
getAgentBuffer
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-4PSTYEG5.js";
|
|
20
|
+
} from "./chunk-HIMOBNEY.js";
|
|
21
|
+
import "./chunk-VLOGOM7N.js";
|
|
22
|
+
import "./chunk-PLNS5J33.js";
|
|
23
|
+
import "./chunk-AMURHMS3.js";
|
|
25
24
|
import {
|
|
26
25
|
CliValidationError
|
|
27
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-R2SVAO4G.js";
|
|
28
27
|
|
|
29
28
|
// src/commands/workspace/shared.ts
|
|
30
29
|
var WORKSPACE_SERVICE = "workspace";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thinkingai/ae-cli",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.61",
|
|
4
4
|
"description": "CLI tool for ThinkingAI (AE) analytics platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"verify:analysis-skill": "tsx scripts/generate-analysis-skill-index.mts --check",
|
|
36
36
|
"verify:analysis-four-modules": "tsx tests/dashboard-filter-transport.test.ts && tsx tests/analysis-report-capability-command.test.ts && npm run verify:analysis-presentation && tsx tests/analysis-export-flow-command.test.ts && tsx tests/analysis-dashboard-audience-contract.test.ts",
|
|
37
37
|
"verify:analysis-contract-regressions": "tsx test/analysis-contract-regressions.test.mjs && tsx tests/analysis-sql-special-identifiers.test.ts",
|
|
38
|
+
"verify:personal-semantic": "tsx tests/personal-semantic-preference-command.test.ts && tsx tests/personal-semantic-global-command.test.ts",
|
|
38
39
|
"verify:analysis-agent-contract": "tsx tests/analysis-agent-skill-contract.test.ts",
|
|
39
40
|
"verify:analysis-presentation": "tsx --test tests/analysis-report-presentation.test.ts",
|
|
40
41
|
"verify:analysis-system": "tsx tests/analysis-system-capability-command.test.ts",
|
|
@@ -52,7 +53,8 @@
|
|
|
52
53
|
"verify:analysis-common-tools": "node scripts/verify-te-common-tools.mjs",
|
|
53
54
|
"verify:team-tools": "node scripts/verify-te-team-tools.mjs && node --import tsx --test tests/team-run-watch.test.ts test/team-run-start-command.test.mjs",
|
|
54
55
|
"verify:evaluation-tools": "node scripts/verify-evaluation-tools.mjs && node --import tsx tests/evaluation-client.test.ts && node --import tsx tests/evaluation-sandbox-session.test.ts && node --import tsx tests/evaluation-security.test.ts && node --import tsx tests/evaluation-command-contract.test.ts && node --import tsx --test tests/evaluation-onboarding.test.ts",
|
|
55
|
-
"verify:
|
|
56
|
+
"verify:a2a": "node --import tsx --test tests/a2a-client.test.ts",
|
|
57
|
+
"verify:agent-tools": "npm run verify:a2a && node --test test/agent-command-registry.test.mjs && tsx tests/te-agent-credentials.test.ts && tsx tests/te-agent-unified-auth.test.ts && node --import tsx --test tests/te-agent-env-isolation.test.ts && tsx tests/te-agent-conversations.test.ts && tsx scripts/verify-agent-tools.mjs && npm run verify:resource-package && npm run verify:approval && npm run verify:agent-distribution && npm run verify:agent-context && npm run verify:sandbox-tools && npm run verify:notifications",
|
|
56
58
|
"verify:resource-package": "node --import tsx tests/resource-package-command.test.ts && node --import tsx tests/resource-package-cli.test.ts && node --import tsx tests/resource-package-transfer.test.ts && node --import tsx tests/resource-package-skill.test.ts",
|
|
57
59
|
"verify:agent-context": "tsx tests/agent-context-command.test.ts",
|
|
58
60
|
"verify:cli-agent-model-context": "tsx --test tests/cli-agent-model-context.test.ts",
|
|
@@ -97,6 +99,7 @@
|
|
|
97
99
|
"verify:skill-businesses": "node --test test/release-gate-skill-businesses.test.mjs",
|
|
98
100
|
"verify:notifications": "tsx tests/notification-command.test.ts",
|
|
99
101
|
"verify:mcp-int64-request": "npx tsx tests/mcp-int64-request.test.ts",
|
|
102
|
+
"verify:cli-source-logging": "node --import tsx --test tests/source-logged-fetch.test.ts",
|
|
100
103
|
"verify:capability-api": "npx tsx tests/capability-api.test.ts",
|
|
101
104
|
"verify:community-ux": "npm run build && npx tsx tests/community-ux.test.ts",
|
|
102
105
|
"verify:community-evidence": "node --import tsx tests/community-evidence.test.ts",
|
package/skills/ae-agent/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ae-agent
|
|
3
|
-
version: 2.1.
|
|
4
|
-
description: "AE Agent platform CLI for Agent, resource package import and export, notification, approval, archived conversation, model, MCP, Skill, attachment, and user-memory work. Use when managing these resources, browsing Agent markets, handling approval requests and tasks, restoring archived conversations, persisting user memory, or answering from user preferences, background, stable workflows, or historical conventions."
|
|
3
|
+
version: 2.1.8
|
|
4
|
+
description: "Invoke AE Agents through A2A with automatic CLI authorization; AE Agent platform CLI for Agent, resource package import and export, notification, approval, archived conversation, model, MCP, Skill, attachment, and user-memory work. Use when managing these resources, browsing Agent markets, handling approval requests and tasks, restoring archived conversations, persisting user memory, or answering from user preferences, background, stable workflows, or historical conventions."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# ae-agent
|
|
@@ -41,6 +41,10 @@ User memory commands live under the `memory` service:
|
|
|
41
41
|
ae-cli memory +<command> [options]
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
+
## A2A remote Agent invocation
|
|
45
|
+
|
|
46
|
+
When the user provides an AE A2A link and asks to use that Agent, read [references/a2a.md](references/a2a.md). Use `ae-cli agent a2a +card`, `+send`, `+get`, `list`, `cancel`, and `delete-context` to delegate the task with automatic host-scoped CLI authorization. Never expose the underlying token.
|
|
47
|
+
|
|
44
48
|
## Global AE CLI Rules
|
|
45
49
|
|
|
46
50
|
- Use this skill for Agent platform resource management: Agents, generic approvals, archived conversations, models, MCP servers, Skills, attachments, the MCP/Skill market, Agent and Skill approval/share flows, and user memories.
|
|
@@ -85,7 +89,17 @@ Use `ae-agent` for all Agent platform resource work:
|
|
|
85
89
|
|
|
86
90
|
If the user's intent is data analysis, audience management, metadata governance, TeamRuns, or knowledge bases, switch to `ae-analysis` / `ae-engage` / `ae-dataops` / `ae-team` / `ae-kb`. For AE analysis tasks with an active project scope, user requests to remember a wording, asset choice, working definition, or reusable project workflow belong to `ae-analysis` `personal-semantic-preference`, not the `memory` domain.
|
|
87
91
|
|
|
88
|
-
## Tool Groups (
|
|
92
|
+
## Tool Groups (106 commands)
|
|
93
|
+
|
|
94
|
+
### A2A invocation (6)
|
|
95
|
+
|
|
96
|
+
Read [the A2A workflow](references/a2a.md) first.
|
|
97
|
+
|
|
98
|
+
- `a2a +card` — read target capabilities with automatic CLI authorization
|
|
99
|
+
- `a2a +send` — submit a task to the remote AE Agent
|
|
100
|
+
- `a2a +get` — query task status and artifacts
|
|
101
|
+
- `a2a list` — filter and paginate accessible tasks
|
|
102
|
+
- `a2a cancel` / `a2a delete-context` — cancel a task or delete an owned context with high-risk confirmation
|
|
89
103
|
|
|
90
104
|
### Agents (6)
|
|
91
105
|
|
|
@@ -383,8 +397,8 @@ ae-cli workspace capability set --workspace-id <agent-space-id> --version <revis
|
|
|
383
397
|
|
|
384
398
|
## User Memory Notes
|
|
385
399
|
|
|
386
|
-
-
|
|
387
|
-
- Do not use `memory +create` for a project-scoped AE analysis preference, asset choice, working definition, or reusable workflow. If the current Agent host supplies a project ID, or the conversation has resolved a project for an AE analysis task, switch to `ae-analysis` and use `personal-semantic-preference add|update`; reusable project workflows are `context_type=experience`.
|
|
400
|
+
- This section governs AgentSpace memory, not analysis personal semantics. For AgentSpace memory, only write after the user explicitly asks for future persistence, for example by asking to remember or save something, keep it for future conversations, use it next time, or set it as a default. A preference, personal fact, workflow instruction, or answer style is eligible memory content but is not by itself permission to persist it.
|
|
401
|
+
- Do not use `memory +create` for a project-scoped AE analysis preference, asset choice, working definition, or reusable workflow. If the current Agent host supplies a project ID, or the conversation has resolved a project for an AE analysis task, switch to `ae-analysis` and use `personal-semantic-preference add|update`; reusable project workflows are `context_type=experience`. Analysis-related cross-project preferences, reusable workflows and default query projects use `personal-semantic-preference --project-id -1`; initialize global semantics before selecting a project, then project semantics before querying. Use AgentSpace memory for non-analysis memory only.
|
|
388
402
|
- Requests scoped to the current conversation or task, such as "next", "for this task", or "in this conversation", must not call a memory write command unless the user also explicitly asks for future persistence. An explicit refusal such as "do not remember" or "do not save this" overrides every other cue. If persistence intent is ambiguous, ask for confirmation before writing.
|
|
389
403
|
- After explicit persistence intent is established, create memory in the resolved AgentSpace and only report success after the write returns successfully.
|
|
390
404
|
- Shared-space members submit candidates; Owner/Admin users may activate or review them. Never claim a candidate is active unless the response outcome says so.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Invoke AE Agents through A2A
|
|
2
|
+
|
|
3
|
+
Use these commands when a user asks an external coding Agent to delegate work to an AE Agent through an A2A link. The caller must be able to execute ae-cli. The target must be an AE Agent, and its server must support CLI-token Bearer authentication.
|
|
4
|
+
|
|
5
|
+
The CLI loads the current user's host-scoped CLI credential internally. Never read credential files, print tokens, ask the user to paste a TE token, or construct authenticated curl commands. If authentication is missing, direct the user to `ae-cli auth login --host <AE-host>`.
|
|
6
|
+
|
|
7
|
+
HTTP 401 clears only the selected host's process-local token cache, rereads its credential, and retries once within the same 30-second timeout. The retry preserves the message and JSON-RPC IDs. HTTP 403 is never retried. Stored credentials are not deleted or minted by this recovery; if authorization still fails, log in again for the selected host.
|
|
8
|
+
|
|
9
|
+
## Workflow
|
|
10
|
+
|
|
11
|
+
1. Select the authorized AE host. A link alone never authorizes sending credentials to another deployment. For another deployment, use its explicit `--host` and log in there first. The target URL must be inside that host's configured application path (default `/agent`). Redirects are rejected. Card-advertised interface URLs are not followed.
|
|
12
|
+
2. Read the Card to check the target's capabilities.
|
|
13
|
+
3. Submit the user's task. This is a write operation: the remote Agent can execute tools on the user's behalf. Use a stable `--message-id` if a submission might need to be retried.
|
|
14
|
+
4. Read the returned `task.id` and query it until the task reaches a terminal state. Space polls several seconds apart. Preserve and report the task ID if the task is still running when stopping. Never resubmit a task just because it is still running.
|
|
15
|
+
5. Summarize the returned artifacts/history. `TASK_STATE_COMPLETED` succeeds; `TASK_STATE_FAILED`, `TASK_STATE_CANCELED`, and `TASK_STATE_REJECTED` are terminal failures. For `TASK_STATE_INPUT_REQUIRED`, ask for the required input and send it with the returned `contextId` and task ID. For `TASK_STATE_AUTH_REQUIRED`, report the requested authorization; do not keep polling blindly.
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
ae-cli agent a2a +card --host https://ae.example.com \
|
|
19
|
+
--url https://ae.example.com/agent/api/a2a/agents/AGENT_ID/agent-card.json
|
|
20
|
+
|
|
21
|
+
ae-cli agent a2a +send --host https://ae.example.com \
|
|
22
|
+
--url https://ae.example.com/agent/api/a2a/agents/AGENT_ID/agent-card.json \
|
|
23
|
+
--message 'Summarize the requested data' --message-id REQUEST_UUID
|
|
24
|
+
|
|
25
|
+
ae-cli agent a2a +get --host https://ae.example.com \
|
|
26
|
+
--url https://ae.example.com/agent/api/a2a/agents/AGENT_ID/agent-card.json \
|
|
27
|
+
--id TASK_ID
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The default Agent discovery link is `/agent/.well-known/agent-card.json` under the selected application path. `+card` reads that exact URL; `+send` and `+get` map it to `/agent/api/a2a/agents/system-default-agent`. Explicit Agent Card and RPC links remain supported with the same behavior. Custom deployment paths are preserved. Discovery never follows Card-advertised URLs.
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
ae-cli agent a2a +card --host https://ae.example.com \
|
|
34
|
+
--url https://ae.example.com/agent/.well-known/agent-card.json
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Transition status: transitional
|
|
38
|
+
Owning module: te-claude A2A
|
|
39
|
+
Current transport: A2A 1.0 JSON-RPC with CLI-token Bearer authentication
|
|
40
|
+
Gateway target: TBD
|
|
41
|
+
Review after: 2026-12-01
|
|
42
|
+
Exit condition: equivalent Gateway capabilities exist; retain typed invocation and host-scoping value when migrating.
|
|
43
|
+
|
|
44
|
+
## Commands
|
|
45
|
+
|
|
46
|
+
| Command | Risk | Required flags | Optional flags |
|
|
47
|
+
| --- | --- | --- | --- |
|
|
48
|
+
| `agent a2a +card` | read | `--url` | `--host` |
|
|
49
|
+
| `agent a2a +send` | write | `--url`, `--message` | `--host`, `--message-id`, `--context-id`, `--task-id`, `--space-id`, `--model`, `--history-length` |
|
|
50
|
+
| `agent a2a +get` | read | `--url`, `--id` | `--host`, `--history-length` |
|
|
51
|
+
| `agent a2a list` | read | `--url` | `--context-id`, `--status`, `--page-size`, `--page-token`, `--history-length`, `--status-timestamp-after`, `--include-artifacts` |
|
|
52
|
+
| `agent a2a cancel` | high-risk-write | `--url`, `--id` | `--yes` |
|
|
53
|
+
| `agent a2a delete-context` | high-risk-write | `--url`, `--context-id` | `--yes` |
|
|
54
|
+
|
|
55
|
+
Card and JSON-RPC endpoint URLs are accepted. All commands support global `--dry-run`, which previews the request without loading credentials or making an A2A request. `+send` uses `configuration.returnImmediately: true`; `+get` uses the JSON-RPC `GetTask` method. Results retain the server's A2A shape inside the normal CLI output envelope. No streaming or third-party authentication is provided.
|
|
56
|
+
|
|
57
|
+
The source contract is the AE server's `src/lib/a2a/protocol.ts`, `http.ts`, and `service.ts`: `A2A-Version: 1.0`, `Authorization: Bearer <CLI token>`, JSON-RPC 2.0 `SendMessage` / `GetTask`, and `/api/a2a/agents/<id>/agent-card.json` under the configured application path.
|
|
58
|
+
|
|
59
|
+
## Workspace and model selection
|
|
60
|
+
|
|
61
|
+
Read `capabilities.extensions` in `+card` first. The extension URI
|
|
62
|
+
`https://thinkingdata.cn/a2a/extensions/agent-evaluation/v1` advertises
|
|
63
|
+
`params.spaceSelection.spaces` and `params.modelSelection.models`. Use exact
|
|
64
|
+
IDs from these lists, not display names. Model switching must be advertised;
|
|
65
|
+
a fixed Agent only accepts its configured model. Space IDs contain 1–191
|
|
66
|
+
letters, digits, underscores or hyphens.
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
ae-cli agent a2a +send --host https://ae.example.com \
|
|
70
|
+
--url https://ae.example.com/agent/.well-known/agent-card.json \
|
|
71
|
+
--message 'Summarize the requested data' --space-id SPACE_ID --model MODEL_ID \
|
|
72
|
+
--message-id REQUEST_UUID --history-length 0 --dry-run
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
`--space-id` maps to `message.metadata[extensionURI].agentSpaceId` and
|
|
76
|
+
`--model` to `.model`. The CLI sends both `message.extensions` and the
|
|
77
|
+
`A2A-Extensions` request header. Without these flags the old payload and headers
|
|
78
|
+
remain unchanged. No evaluation source is fabricated. Space/model authorization
|
|
79
|
+
is enforced by the server. For continuations using `--context-id` or `--task-id`, omit `--space-id` or
|
|
80
|
+
repeat the original workspace ID. The server checks that a supplied workspace
|
|
81
|
+
matches the existing conversation and rejects changes. Replies with `--task-id`
|
|
82
|
+
cannot select a model. Keep selections unchanged when retrying a
|
|
83
|
+
message ID. An older server may reject these optional extensions; omit the
|
|
84
|
+
selection flags to retain the previous invocation contract.
|
|
85
|
+
|
|
86
|
+
`--history-length` is a non-negative integer; zero suppresses history and the
|
|
87
|
+
server caps returned history at 100. `list` uses `ListTasks`, returns one page,
|
|
88
|
+
and preserves `nextPageToken`; reuse the same filters on subsequent pages.
|
|
89
|
+
`--page-size` is 1–100. `--status` uses the exact `TASK_STATE_*` enum from the
|
|
90
|
+
protocol. `--include-artifacts false` explicitly excludes artifacts.
|
|
91
|
+
|
|
92
|
+
`cancel` sends `CancelTask`. `delete-context` sends `DeleteContext` with the
|
|
93
|
+
context-lifecycle extension header; inspect the Card for support first.
|
|
94
|
+
Both require high-risk confirmation, or `--yes` after explicit user approval.
|
|
95
|
+
|
|
96
|
+
## Server capability coverage
|
|
97
|
+
|
|
98
|
+
The current server also offers `SendStreamingMessage`, `SubscribeToTask`,
|
|
99
|
+
registered attachment transfer and signed inter-Agent delegation. These require
|
|
100
|
+
SSE/file/proof lifecycles and are not exposed by these JSON commands. Continue
|
|
101
|
+
using `+send` and `+get` for asynchronous text tasks. Push notifications and
|
|
102
|
+
extended Agent Cards are explicitly unsupported by the server. Do not invent
|
|
103
|
+
metadata or credentials to simulate any of these capabilities.
|
|
@@ -32,3 +32,14 @@ This index provides command-level risk metadata for Agent distribution and gener
|
|
|
32
32
|
| `ae-cli agent resource-package download` | CLI-token resource package REST | read | resource-package.md |
|
|
33
33
|
| `ae-cli agent resource-package cancel` | CLI-token resource package REST | high-risk-write | resource-package.md |
|
|
34
34
|
| `ae-cli agent resource-package retry` | CLI-token resource package REST | write | resource-package.md |
|
|
35
|
+
|
|
36
|
+
## A2A invocation
|
|
37
|
+
|
|
38
|
+
| CLI command | Transport | Risk | Reference |
|
|
39
|
+
| --- | --- | --- | --- |
|
|
40
|
+
| `ae-cli agent a2a +card` | A2A 1.0 Bearer CLI token | read | a2a.md |
|
|
41
|
+
| `ae-cli agent a2a +send` | A2A 1.0 JSON-RPC | write | a2a.md |
|
|
42
|
+
| `ae-cli agent a2a +get` | A2A 1.0 JSON-RPC | read | a2a.md |
|
|
43
|
+
| `ae-cli agent a2a list` | A2A 1.0 JSON-RPC | read | a2a.md |
|
|
44
|
+
| `ae-cli agent a2a cancel` | A2A 1.0 JSON-RPC | high-risk-write | a2a.md |
|
|
45
|
+
| `ae-cli agent a2a delete-context` | A2A context lifecycle extension | high-risk-write | a2a.md |
|