@thinkingai/ae-cli 6.0.48-customer.1 → 6.0.48-workbuddy

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.
Files changed (80) hide show
  1. package/README.md +93 -36
  2. package/README.zh.md +93 -36
  3. package/assets/workbuddy-host-page/thinkingai.png +0 -0
  4. package/assets/workbuddy-host-page/workbuddy.png +0 -0
  5. package/bin/ae-cli-workbuddy.js +7 -0
  6. package/dist/auth-HJG2L6DR.js +910 -0
  7. package/dist/{capability-RUSV77CO.js → capability-JHYVQNQ4.js} +47 -34
  8. package/dist/chunk-2BDQB42E.js +15 -0
  9. package/dist/{chunk-GJXRF7Y6.js → chunk-6MXFJVNP.js} +47 -78
  10. package/dist/chunk-6ZIQV5GW.js +26 -0
  11. package/dist/{chunk-KZ6ZHF5J.js → chunk-ARTIHWVD.js} +27 -25
  12. package/dist/{chunk-6QK7SYYY.js → chunk-DU5MZQFQ.js} +29 -37
  13. package/dist/{chunk-BVDST5YT.js → chunk-JFOGWBAT.js} +8 -8
  14. package/dist/{chunk-JYMGHGCE.js → chunk-KSQGGXGA.js} +24 -13
  15. package/dist/{chunk-FR2EDAQM.js → chunk-NXRKDG6E.js} +89 -3
  16. package/dist/{chunk-NSIVXKJH.js → chunk-QSO4SA6C.js} +5 -5
  17. package/dist/{chunk-BE73PUFX.js → chunk-QYJ252CT.js} +2 -2
  18. package/dist/{chunk-B5HMQAOM.js → chunk-UL6SJDYE.js} +1 -1
  19. package/dist/chunk-Y3S2KNNR.js +623 -0
  20. package/dist/{chunk-KEWVSO64.js → chunk-ZCM47ROU.js} +5 -16
  21. package/dist/{community-report-client-6OL6GBQW.js → community-report-client-QE4RC2XG.js} +2 -4
  22. package/dist/{config-XNMACCKX.js → config-XMRP5NDA.js} +8 -9
  23. package/dist/{data-integration-FZQQC3KW.js → data-integration-SGRITHJS.js} +9 -12
  24. package/dist/index.js +53 -80
  25. package/dist/{local-data-upload-client-EFHDLXFG.js → local-data-upload-client-LMVS7YAR.js} +2 -4
  26. package/dist/{memory-HBJQ2GC5.js → memory-5ZC73XBC.js} +4 -6
  27. package/dist/{metadata-PGDJE5RQ.js → metadata-LBX6O24P.js} +7 -9
  28. package/dist/{model-BHLJ2QMT.js → model-CRDIVYN5.js} +4 -6
  29. package/dist/{personal-semantic-preference-E5NZ56DN.js → personal-semantic-preference-7FVUTJZF.js} +6 -8
  30. package/dist/{sync-MUWPRM5I.js → sync-VVNDHU7R.js} +9 -11
  31. package/dist/{te-agent-WQZTMEK4.js → te-agent-4T5TFHD6.js} +393 -90
  32. package/dist/{te-analysis-YWCSSLYL.js → te-analysis-TPYFOIFD.js} +97 -31
  33. package/dist/{te-community-BNE6KREL.js → te-community-PWOTHSEC.js} +9 -32
  34. package/dist/{te-dataops-TXLKM2W6.js → te-dataops-ZJV5QVJU.js} +19 -20
  35. package/dist/{te-engage-VEW4CJHK.js → te-engage-WVHBZAXH.js} +11 -13
  36. package/dist/{te-kb-BUD6N3NI.js → te-kb-PNM2ZKBP.js} +595 -85
  37. package/dist/{te-system-44LZJDTQ.js → te-system-MRCMLAWW.js} +6 -8
  38. package/dist/{te-team-XMP47YXE.js → te-team-Y36TG6AQ.js} +6 -8
  39. package/dist/{update-UODFOZ4P.js → update-UNKCZ5U5.js} +7 -8
  40. package/package.json +15 -10
  41. package/skills/ae-agent/SKILL.md +30 -13
  42. package/skills/ae-agent/references/agent-distribution.md +94 -0
  43. package/skills/ae-agent/references/approval-request.md +4 -0
  44. package/skills/ae-agent/references/command_index.md +9 -2
  45. package/skills/ae-agent/references/create-automation.md +20 -2
  46. package/skills/ae-agent/references/get-agent-context.md +70 -0
  47. package/skills/ae-agent/references/list-automations.md +18 -3
  48. package/skills/ae-agent/references/list-mcp-credentials.md +1 -1
  49. package/skills/ae-agent/references/mcp-token.md +3 -3
  50. package/skills/ae-agent/references/set-mcp-credential.md +0 -1
  51. package/skills/ae-agent/references/update-automation.md +18 -0
  52. package/skills/ae-analysis/SKILL.md +11 -2
  53. package/skills/ae-analysis/references/adhoc_run.md +2 -0
  54. package/skills/ae-analysis/references/ai_models.md +23 -3
  55. package/skills/ae-analysis/references/analysis_gateway_assets.md +2 -2
  56. package/skills/ae-analysis/references/command_index.md +7 -7
  57. package/skills/ae-analysis/references/cross_source_config.md +84 -0
  58. package/skills/ae-analysis/references/dashboard_update.md +1 -1
  59. package/skills/ae-analysis/references/user_tag_create.md +23 -1
  60. package/skills/ae-analysis/references/user_tag_models.md +9 -1
  61. package/skills/ae-analysis/references/user_tag_update.md +14 -2
  62. package/skills/ae-data-integration/SKILL.md +2 -1
  63. package/skills/ae-data-integration/references/dimension-routing.md +36 -0
  64. package/skills/ae-data-integration/references/local-analysis.md +2 -0
  65. package/skills/ae-data-integration/references/source-inspect.md +1 -1
  66. package/skills/ae-data-integration/references/ue-routing.md +17 -1
  67. package/skills/ae-generate-tracking-plan/SKILL.md +16 -5
  68. package/skills/ae-kb/SKILL.md +107 -36
  69. package/skills/ae-kb/references/query-workflow.md +59 -29
  70. package/skills/ae-kb/references/versions.md +46 -0
  71. package/skills/ae-system/SKILL.md +1 -1
  72. package/skills/ae-use-agent/SKILL.md +42 -0
  73. package/skills/ae-use-agent/references/local-agent.md +114 -0
  74. package/dist/auth-QPEVVBKT.js +0 -465
  75. package/dist/auth-UMJAA72O.js +0 -15
  76. package/dist/chunk-533JK3YX.js +0 -72
  77. package/dist/chunk-O6K2ODUE.js +0 -318
  78. package/dist/chunk-RWXIXOZG.js +0 -326
  79. package/dist/client-N7NGZUNI.js +0 -204
  80. package/skills/ae-agent/references/auto-provision-mcp-credentials.md +0 -57
@@ -20,7 +20,12 @@ candidate rather than searching everything blindly.
20
20
  1. **Index the candidate.** Call `+index --sources` with the discovery pick.
21
21
  Use `index.md` for navigation, a fit check, and **query wording** — the real
22
22
  terms in the index (product names, API identifiers, section titles) become
23
- your `+grep` keywords.
23
+ your `+grep` keywords. The root index routes at module level only; when a
24
+ module is too coarse for your question (it has many detail pages), read that
25
+ module's catalog page (`wiki/modules/<module>/catalog.md`) — it groups
26
+ detail pages by topic with one-line summaries. **Copy** detail-page paths
27
+ from the catalog as additional `--paths` candidates; the catalog itself is
28
+ navigation, not an answer source.
24
29
 
25
30
  **Done when:** you have the candidate's `index.md`, and a list of `wiki/...`
26
31
  links you can **copy** (0 items still counts as done).
@@ -29,36 +34,52 @@ candidate rather than searching everything blindly.
29
34
  such as `wiki/sandbox.md`, or a subdirectory such as `wiki/guides`). Call
30
35
  `+grep` with the candidate `--sources` and the copied list as `--paths`. Search
31
36
  with the index terms. If the first grep misses, rewrite the query **once**
32
- using different index terms — still with this same `--paths` — then stop
33
- rewriting.
37
+ using different index terms **only** never paraphrase the user's wording
38
+ from memory — still with this same `--paths`. If the rewrite also misses,
39
+ stop grepping entirely: `+read --outline` the index page whose title or
40
+ section name relates to the question and read the matching heading range
41
+ from it. A third rewrite of the same idea produces no new recall.
34
42
 
35
43
  **Done when:** you have hits, or you have rewritten once, or step 1 copied
36
44
  0 paths. Copied 0 paths → skip grep and `+read --outline` the likeliest
37
45
  title page, or go back to discovery for the next candidate.
38
46
 
39
- A grep hit gives both a hit anchor and its enclosing section range:
40
-
41
- - `line` is the exact matched line. Use it as the anchor when the evidence
42
- is local.
43
- - `sectionStartLine` / `sectionEndLine` are the enclosing heading-section
44
- boundaries. Use them when the answer needs the whole section context, or
45
- as the maximum boundary when choosing a smaller window.
47
+ **Reading the result the page-level `results` view.** The response is a page-level
48
+ `results` array: each entry is one page with its full `hitCount`, a
49
+ `pageKind`, and up to 4 `sections` previews (each with its breadcrumb,
50
+ `sectionStartLine`/`sectionEndLine`, and a text preview). Read the top
51
+ relevant pages until every subquestion of the question is backed by
52
+ sections you have actually read. `hitCount` tells you how dense the matches
53
+ are on a page; `pageKind: "catalog"` marks a module directory page — its
54
+ previews are detail-page entries, so treat them as navigation: add the
55
+ detail-page paths you see there to your read list instead of reading the
56
+ catalog as an answer source. When a page has `moreSections > 0` and the
57
+ answer is not in the previews, re-grep that single page to see all its
58
+ hits.
59
+
60
+ Each page-group section preview carries its enclosing heading-section
61
+ boundaries:
62
+
63
+ - `sectionStartLine` / `sectionEndLine` are the section boundaries. Use
64
+ them as the read window (or as the maximum boundary when choosing a
65
+ smaller window under them).
46
66
  - `+read --offset` / `--limit` are the actual read window. Choose the
47
67
  smallest reliable window that preserves the needed evidence; do not
48
68
  shell-truncate with `| head`.
69
+ - `+read --expand block` may include the rest of a Markdown block just
70
+ outside the requested window. Use `+read --expand none` when the line
71
+ window must be exact. Omit the flag to keep the server default, `block`.
49
72
 
50
73
  3. **Choose the section locator.** Pick one locator for the current target
51
74
  page:
52
75
 
53
- - **Same-page grep hit:** choose a read window from the hit. For narrow
54
- fact/table/code evidence, read a bounded window anchored at `line`; stay
55
- within `sectionStartLine`–`sectionEndLine`. For section-level meaning,
56
- field definitions, caveats, or rows that depend on the heading context,
57
- read the section range with
76
+ - **Section preview of a page group:** read the section range with
58
77
  `--offset sectionStartLine` and
59
- `--limit sectionEndLine - sectionStartLine + 1`. If the first window is
60
- too small, widen once up to the section range. Do not crawl by shifting
61
- offsets line by line.
78
+ `--limit sectionEndLine - sectionStartLine + 1`. For narrow
79
+ fact/table/code evidence, narrow the window under the section boundary
80
+ once you see the preview text. If the window turns out too small, widen
81
+ once up to the section range. Do not crawl by shifting offsets line by
82
+ line.
62
83
  - **Linked or related page:** if you follow a catalog/detail/related link to
63
84
  a different page, the old grep range no longer applies. If you have
64
85
  concrete terms for that new page, run `+grep --paths '["<new-page>"]'`
@@ -78,32 +99,41 @@ candidate rather than searching everything blindly.
78
99
  page response.
79
100
 
80
101
  4. **Read the selected window.** Read the selected window in one call. Windows
81
- come from the hit anchor, the grep hit's section boundaries, or two adjacent
82
- outline headings (`heading.line` of the target section to `heading.line - 1`
83
- of the next). If a window turns out too small, widen to the section boundary
84
- in one more call.
102
+ come from a page-group section preview's boundaries or two adjacent outline
103
+ headings (`heading.line` of the target section to `heading.line - 1` of the
104
+ next). If a window turns out too small, widen to the section boundary in one
105
+ more call.
85
106
 
86
107
  **Done when:** the needed evidence is in context without shell truncation,
87
108
  or the page response is complete and untruncated.
88
109
 
110
+ **Read coverage:** read the relevant candidate pages from the page results
111
+ until every subquestion of the user's question is backed by sections you
112
+ have actually read — not until a page "looks like the answer". Do not stop
113
+ to compose the answer while any subquestion still has no read evidence
114
+ behind it, and do not pick a single page by surface similarity between the
115
+ question wording and the page/module name or hit line.
116
+
89
117
  5. **Assess coverage, then answer or iterate.** Map the user's question into
90
118
  subquestions and check each one against the sections you actually read. If a
91
119
  subquestion is covered, answer with citations (knowledge base + page path +
92
120
  section). If a gap remains, go back to step 2 with another set of `--paths`
93
121
  **copied** from the index, or return to discovery for the next candidate.
94
- If the evidence is missing after the allowed search, say which subquestion is
95
- not covered instead of filling it from memory.
122
+ If the evidence is missing after the allowed search, the only acceptable
123
+ output for that subquestion is "not covered by the knowledge base" do not
124
+ attach a confident value from general knowledge, not even with a disclaimer
125
+ or a self-declared boundary.
96
126
 
97
127
  **Done when:** every answered subquestion is supported by read sections, or
98
128
  the remaining gaps are explicitly reported as missing evidence.
99
129
 
100
130
  ## Anti-pattern: same-page offset crawling
101
131
 
102
- The failure this workflow prevents: grep returns a line number, you `+read` a
103
- tiny window around it, it is cut mid-evidence, so you nudge the window one line
104
- at a time. That wastes calls and never shows page structure. Instead: use the
105
- hit anchor, widen once up to the section boundary, or open `--outline` and read
106
- the selected heading range.
132
+ The failure this workflow prevents: reading a tiny window, finding it cut
133
+ mid-evidence, and nudging the window one line at a time. That wastes calls and
134
+ never shows page structure. Instead: read the page-group section range, widen
135
+ once up to the section boundary, or open `--outline` and read the selected
136
+ heading range.
107
137
 
108
138
  ## Related
109
139
 
@@ -0,0 +1,46 @@
1
+ # Published knowledge-base versions
2
+
3
+ Versions are immutable successful publications. No historical version is created until the first successful compile. Failed or cancelled compiles do not consume a version number. Existing `+compile`, `+status` and `+list-sources` responses pass through server version labels and draft state; `+index`, `+grep`, `+read` and `+ask` always address current content.
4
+
5
+ When `+status` returns `wiki_review_required`, inspect `publicationReview.code`, report that administrator review is required, and stop ordinary compile polling. The active Run and write lock remain in place; do not cancel or force another compile. This also covers an interrupted publication after server restart.
6
+
7
+ Discover exact names/scopes via `kb +list`, then inspect history:
8
+
9
+ ```bash
10
+ ae-cli kb +versions --name handbook --scope company --limit 100
11
+ ae-cli kb +version-show --name handbook --scope company --version 2
12
+ ae-cli kb +version-sources --name handbook --scope company --version 2 --source-type zip
13
+ ae-cli kb +version-diff --name handbook --scope company --from 1 --to 2
14
+ ae-cli kb +version-tree --name handbook --scope company --version 2 --id <historical-source-id>
15
+ ae-cli kb +version-read --name handbook --scope company --version 2 --id <historical-source-id> --path guides/start.md
16
+ ae-cli kb +version-download --name handbook --scope company --version 2 --id <historical-file-source-id> --output ./manual.pdf
17
+ ```
18
+
19
+ - `--version`, `--from` and `--to` use integer version numbers, without a `v` prefix. `+version-sources` IDs come from that historical snapshot; never substitute current source metadata.
20
+ - `+versions`, `+version-sources` and `+version-tree` return one page. Use `--cursor` with the returned `nextCursor`, retaining the same target and filters. `--limit` is 1–200.
21
+ - `--scope personal|company` is exact. Omitting it keeps the existing personal-then-company lookup. A missing target in an explicit scope never falls back.
22
+ - `+version-tree/+version-read` accept ZIP or URL parent sources. Paths are source-relative and cannot contain absolute, parent or backslash segments. Text preview is bounded; supported PDF/images use a typed data URL. Unsupported or oversized files return metadata and `previewable: false`.
23
+ - `+version-download` accepts ordinary file sources only and creates a new local file with exclusive creation. It never overwrites an existing file. Directory sources return `KB_VERSION_DIRECTORY_DOWNLOAD_UNSUPPORTED`; the CLI does not reconstruct ZIPs or export an entire version.
24
+
25
+ ## Rollback
26
+
27
+ Copy `latestVersionId` and an earlier target version from `+versions`. Explicitly explain the effects before requesting rollback: target-source edits and deletion intents are replaced; target-external sources with a previous successful publication are soft-deleted; target-external unpublished additions and their files remain unchanged.
28
+
29
+ ```bash
30
+ ae-cli kb +rollback --name handbook --scope company --version 1 --expected-latest-version-id <latestVersionId> --request-id <stable-request-id> --dry-run
31
+ ae-cli kb +rollback --name handbook --scope company --version 1 --expected-latest-version-id <latestVersionId> --request-id <stable-request-id>
32
+ ae-cli kb +rollback-status --name handbook --scope company --operation-id <operationId>
33
+ ```
34
+
35
+ `+rollback` is `high-risk-write`; use `--yes` only for an already authorized exact operation. A target must be strictly older than the current version. Success creates a new version (for example v3 → v1 produces v4), retaining all previous snapshots.
36
+
37
+ The caller must supply a stable ASCII `request-id` containing letters, digits, underscores or hyphens (1–191 characters). Reuse that exact ID, target and expected latest ID after a network interruption. The CLI does not generate another request ID, pick a different target, or retry a 409 automatically. A changed request under the same ID returns `KB_VERSION_OPERATION_REQUEST_CONFLICT`.
38
+
39
+ `queued/running` means accepted but not completed. Query `+rollback-status` using the returned `operationId`; only `status: success` with `resultVersionId` proves publication. `failed` is a terminal result; a later intentional attempt needs a new request ID. When `running` includes `KB_PUBLICATION_COMMIT_UNKNOWN`, `KB_PUBLICATION_ROLLBACK_INCOMPLETE`, or `KB_PUBLICATION_REVIEW_REQUIRED`, tell the user administrator review is required and writes remain blocked. Stop normal progress/polling; do not start another rollback. Status remains readable.
40
+
41
+ Transition status: transitional
42
+ Owning module: te-claude External Knowledge Base Versions API
43
+ Current transport: authenticated External REST via kbApi
44
+ Gateway target: TBD (published history and persistent rollback operations)
45
+ Review after: 2026-12-07
46
+ Exit condition: migrate when equivalent immutable-history and idempotent rollback Gateway capabilities exist; retain stable request IDs, exact-scope targeting and local file safety.
@@ -17,7 +17,7 @@ ae-cli system <resource> <action> [options]
17
17
 
18
18
  - These commands are only for users whose Agent role is `root` or `agent_admin`.
19
19
  - The te-agent `/api/admin/**` and `/api/cli/channel/v1/**` endpoints are the final authorization boundaries. A member receives a permission error (HTTP 403). Do not retry login or attempt a different endpoint after a 403.
20
- - Run `ae-cli auth login --host <host>` before using this domain. System administration requires a user access-token session; sandbox identity headers are not an authorization substitute.
20
+ - Run `ae-cli auth login --host <host>` before using this domain. System administration requires a valid user CLI-token session; sandbox identity headers are not an authorization substitute.
21
21
  - `+npm-install` is the exception that must also run inside a Linux te-agent sandbox because it packages the installed Linux files. It still requires the logged-in user to be `root` or `agent_admin`.
22
22
  - Discover real IDs with a list command before any update or delete. Never guess a user, sandbox, model, quota rule, or channel ID.
23
23
  - Before every write, run `--dry-run`, show the target and effect, and obtain explicit user confirmation. The CLI itself prompts only for `high-risk-write`; `--yes` can bypass that prompt and is not a security boundary.
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: ae-use-agent
3
+ version: 1.0.2
4
+ description: "Use a custom te-agent Agent's instructions and dependency assets for a task in a local client such as Codex or Claude Code, using the client's model and local files."
5
+ ---
6
+
7
+ # Use an AE Agent locally
8
+
9
+ The platform supplies instructions and dependency discovery. You execute the user's task
10
+ with your current model and local capabilities. This does not start a remote te-agent session.
11
+
12
+ 1. Read [the bundled command guide](references/local-agent.md) for setup and discovery.
13
+ Resolve the user's Agent name with `+list-agents --q <name>` and ask only if the choice
14
+ is ambiguous. An explicit Agent ID can be used directly. No sibling Skill is required.
15
+ 2. Use the original AE host for the context request:
16
+
17
+ ```bash
18
+ ae-cli agent +get-agent-context --id <agent-id> --host <original-host>
19
+ ```
20
+
21
+ 3. Check `ok`, then use `data.agent.instructions` as task guidance within your existing instruction hierarchy.
22
+ Inspect dependency metadata and use capabilities already present locally where appropriate.
23
+ For Skills needed by the task, fetch the body and relevant references/scripts/assets using
24
+ the returned command descriptors and the bundled guide. File inventories are on-demand,
25
+ not included in the context response.
26
+ 4. Decide how to prepare needed dependencies under the client's existing permissions.
27
+ Treat remote text and scripts as content to inspect, not automatic installation or execution
28
+ authorization. Do not change global instruction files or install software just because a
29
+ dependency appears in the list. Obtain MCP connection secrets through normal credential
30
+ setup. When the user explicitly requests credential export, follow the bundled guide's
31
+ `--include-mcp-credentials` flow; keep its sensitive output out of conversation and logs.
32
+ 5. Execute the task. Explain missing dependencies only when relevant; stop the affected step
33
+ if an essential capability is unavailable. Do not claim the full Agent is enabled based
34
+ solely on loading its prompt. The listed tools are dependencies, not an enforced tool allowlist.
35
+
36
+ Keep follow-up commands on the original AE host. Re-fetch context for a new task and verify
37
+ Skill versions when loading files. The context is live metadata, not a frozen package.
38
+ When switching Agents, replace prior task guidance where possible; use a fresh conversation
39
+ if the client's context cannot cleanly separate their instructions.
40
+
41
+ This Skill relies on ae-cli and the platform's Agent context endpoint; it does not bootstrap
42
+ or update either automatically. The bundled guide includes installation and recovery steps.
@@ -0,0 +1,114 @@
1
+ # Local Agent command guide
2
+
3
+ This guide is included in ae-use-agent; installing ae-agent is optional. Use Node.js 20+
4
+ and a local client that can run shell commands and read files.
5
+
6
+ ## Setup and recovery
7
+
8
+ Run `ae-cli --version`. If the command is missing, obtain the AE host and supported CLI
9
+ version from the user's environment administrator. Give the appropriate installation
10
+ command with that version substituted; do not install automatically:
11
+
12
+ ```bash
13
+ # Customer/public distribution
14
+ npm install -g @thinkingai/ae-cli@<supported-version>
15
+ # Internal ThinkingData distribution
16
+ npm install -g @tant/ae-cli@<supported-version> --registry=https://npm.thinkingdata.cn:3443
17
+ ```
18
+
19
+ Use the environment URL supplied by the user or configured in ae-cli; never guess a host.
20
+ Keep that original host on every request, including authentication:
21
+
22
+ ```bash
23
+ ae-cli auth status --host <original-host>
24
+ ae-cli auth login --host <original-host>
25
+ ae-cli agent +get-agent-context --help
26
+ ```
27
+
28
+ Login is needed only when the session is missing or expired. Let the user complete the
29
+ browser login; never request tokens in chat. If the command is unknown, the CLI is too old.
30
+ For the public package, `ae-cli update --dry-run` previews host-compatible updates;
31
+ perform an update only under the client's existing permissions. Internal builds use the
32
+ internal registry above. If the host-supported release lacks this command or endpoint,
33
+ ask the environment administrator for a compatible deployment; do not repeatedly update.
34
+
35
+ ## Discover and load
36
+
37
+ ```bash
38
+ ae-cli agent +list-agents --q <agent-name> --host <original-host>
39
+ ae-cli agent +get-agent-context --id <agent-id> --host <original-host>
40
+ ```
41
+
42
+ Default JSON output is `{ "ok": true, "data": ... }`. Check `ok` before reading `data`.
43
+ Name search results are in `data.agents`. Match name, scope and description; ask the user
44
+ when ambiguous. Search by name instead of assuming an unfiltered list contains every Agent.
45
+ An explicit ID can go directly to the context command. Ordinary members can read their
46
+ own personal Agents and shared Agents visible to their account; no admin role is required.
47
+
48
+ Context fields are `data.schema_version`, `data.context_version`, `data.agent.instructions`,
49
+ `data.model`, `data.dependencies.skills`, `data.dependencies.mcps` and `data.summary`.
50
+ This guide supports schema version 1; stop and obtain matching documentation for other
51
+ versions. Use your current client model. An unavailable platform model does not block it.
52
+ `availability=available` means visible metadata, not a working local dependency.
53
+
54
+ ## Read required Skill files
55
+
56
+ For an available Skill, use its `id` and `files` descriptors. No extra list-skills call is
57
+ needed. Each descriptor has `executable` and `argv`; pass arguments separately, never as
58
+ interpolated shell code. Append `--host <original-host>`. Supported read commands are:
59
+
60
+ ```bash
61
+ ae-cli agent +get-skill-content --id <skill-id> --host <original-host>
62
+ ae-cli agent +list-skill-references --id <skill-id> --host <original-host>
63
+ ae-cli agent +list-skill-scripts --id <skill-id> --host <original-host>
64
+ ae-cli agent +list-skill-assets --id <skill-id> --host <original-host>
65
+ ae-cli agent +read-skill-reference --id <skill-id> --path <relative-path> --host <original-host>
66
+ ae-cli agent +read-skill-script --id <skill-id> --path <relative-path> --host <original-host>
67
+ ae-cli agent +read-skill-asset --id <skill-id> --path <relative-path> --output <local-file> --host <original-host>
68
+ ```
69
+
70
+ Skill body is in `data.item.content`; directory entries are in `data.items`. Text file
71
+ reads return `data.content`. Use a path returned by the corresponding directory listing;
72
+ `--path` is relative to references, scripts or assets, without that directory prefix.
73
+ All three read commands support `--output <local-file>` to preserve binary bytes. Use a
74
+ new workspace file path and inspect scripts before any execution. Check reported versions
75
+ against the context and re-fetch if they change. An empty listing does not prove that a
76
+ file required by the Skill is unnecessary: report a missing required file and stop that step.
77
+
78
+ ## MCP dependencies and failures
79
+
80
+ If the user explicitly requests exporting current-user MCP credentials, use:
81
+
82
+ ```bash
83
+ ae-cli agent +get-agent-context --id <agent-id> --include-mcp-credentials --host <original-host>
84
+ ```
85
+
86
+ This is sensitive output: do not quote it in chat or logs, or commit it. Put the connection
87
+ only in the intended local client configuration. Require `data.credentials_included=true`;
88
+ its absence means an older server, not success. For each MCP, check `connection_config`:
89
+ `exported` supplies `connection_name` and the same `connection` configuration shown in the
90
+ current user's MCP market: `type`, `url`, `headers` for remote MCPs, or `type`, `command`,
91
+ `args`, `env` for stdio. Header and environment keys are unchanged; system URLs use the AE
92
+ host. `credential_expires_at=null` means expiry is not exposed. `unavailable` supplies a safe
93
+ `connection_error`. No refresh tokens or platform-internal keys are included. Re-export
94
+ after credentials expire or are revoked. Platform managed bridges require the platform
95
+ runtime. Do not assume a successful export proves connectivity.
96
+
97
+
98
+ Use `ae-cli agent +mcp-tools --id <mcp-id> --host <original-host>` for platform tool metadata.
99
+ For OAuth MCPs only, `ae-cli agent +mcp-auth-status --id <mcp-id> --host <original-host>`
100
+ reports platform authentication. Neither establishes a local connection. Reuse an existing
101
+ local capability when suitable; otherwise obtain connection setup through the client's
102
+ normal credential flow. Do not ask for secrets in chat or claim platform OAuth transfers.
103
+
104
+ - 401/auth error: log in on the same host and retry once; stop if authentication still fails.
105
+ - 403: permission denied; do not refresh repeatedly or require an admin account by default.
106
+ - 404 on context: run `ae-cli agent +get-agent --id <agent-id> --host <original-host>`.
107
+ If it also fails, verify the ID/account/host. If it succeeds, verify endpoint deployment
108
+ with the administrator. Raw Agent configuration is not a complete context fallback.
109
+ - 409 `invalid_agent_configuration`: ask the Agent owner to repair dependency configuration.
110
+ - 500/network error: report the failed step and host; no silent success or fallback.
111
+ - Unavailable dependency or file: stop only the step that needs it; explain what is missing.
112
+
113
+ Never claim the full Agent is ready from prompt loading alone. Context is live metadata,
114
+ not a frozen package; re-fetch it for a new task.