@thinkingai/ae-cli 6.1.25 → 6.1.26
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 +28 -9
- package/README.zh.md +25 -9
- package/bin/ae-cli.js +6 -1
- package/cli-installation-guide.md +91 -0
- package/dist/{auth-LHM7NQPR.js → auth-YHMC3GDH.js} +6 -8
- package/dist/automation-NWWVLWG2.js +459 -0
- package/dist/{capability-SJI5KOCK.js → capability-3QLLIVFB.js} +6 -6
- package/dist/chunk-4655PUNX.js +43 -0
- package/dist/{chunk-KS4DE3MX.js → chunk-5XJYLEVC.js} +4 -4
- package/dist/{chunk-N4BLPJC7.js → chunk-7QXISROD.js} +1 -1
- package/dist/{chunk-7WZACOAI.js → chunk-AP7YP2NX.js} +2 -2
- package/dist/{chunk-SO5LKIWP.js → chunk-CT7QDJS6.js} +2 -2
- package/dist/chunk-D6ACFILC.js +56 -0
- package/dist/{chunk-QYXDJOLA.js → chunk-EOYSKMXN.js} +19 -11
- package/dist/{chunk-5XRQ3CZR.js → chunk-FMNNGNYO.js} +43 -8
- package/dist/{chunk-DU72X2IO.js → chunk-GIK6EDUG.js} +22 -10
- package/dist/chunk-HVHR4SCP.js +133 -0
- package/dist/{chunk-2FJM4HRV.js → chunk-KAEHZZH4.js} +3 -3
- package/dist/{chunk-BW7JUDEI.js → chunk-KFNMQTZI.js} +514 -213
- package/dist/{chunk-KJDOTPYU.js → chunk-PLE722AJ.js} +28 -11
- package/dist/chunk-RK6GLDGI.js +27 -0
- package/dist/{chunk-GK7WDY7E.js → chunk-S6M42KND.js} +1 -1
- package/dist/{chunk-IG3DYEIR.js → chunk-UQ77JXYH.js} +4 -3
- package/dist/{chunk-YVGXGTD6.js → chunk-WNGFSIOB.js} +7 -1
- package/dist/{chunk-XKIW3QMF.js → chunk-XCHAYMSF.js} +3 -3
- package/dist/{community-report-client-6VJDDMJJ.js → community-report-client-PEERQCX2.js} +1 -1
- package/dist/{config-XQWOPDHN.js → config-AHPMEW5A.js} +4 -4
- package/dist/context-YAE3QXP3.js +136 -0
- package/dist/{data-integration-XBTCGXQT.js → data-integration-HESZET7E.js} +6 -6
- package/dist/index.js +123 -46
- package/dist/{local-data-upload-client-3P7NIVQ4.js → local-data-upload-client-TWMHFLUA.js} +1 -1
- package/dist/memory-62BJOULV.js +580 -0
- package/dist/{metadata-JRYKNUS5.js → metadata-C7CEDHOJ.js} +7 -7
- package/dist/{model-ZS7HVGKN.js → model-SBV2JFJI.js} +9 -5
- package/dist/{personal-semantic-preference-IDE2GE5T.js → personal-semantic-preference-QECDPHND.js} +117 -11
- package/dist/{project-semantic-36KOCYN7.js → project-semantic-Z4QAMBWF.js} +6 -6
- package/dist/{sync-EQLSTUS7.js → sync-SU33KYX7.js} +12 -8
- package/dist/{te-agent-Z3HCTKR7.js → te-agent-F5QBZSQA.js} +90 -454
- package/dist/{te-analysis-5ZZ6YHVH.js → te-analysis-2ECAAIFK.js} +297 -20
- package/dist/{te-community-Z7JACGF3.js → te-community-PFLDLPP4.js} +3 -3
- package/dist/{te-dataops-F7GQOIS6.js → te-dataops-FOQSRIAZ.js} +5 -5
- package/dist/{te-engage-RNRMYDO3.js → te-engage-QKUGIWSR.js} +6 -6
- package/dist/{te-experiment-BTAC2UNK.js → te-experiment-26PXR2UO.js} +6 -6
- package/dist/{te-kb-QJLJEX5K.js → te-kb-MHDOST62.js} +494 -214
- package/dist/{te-system-IXC43QHZ.js → te-system-J2FQF5ER.js} +6 -6
- package/dist/{te-team-BIZIKIHZ.js → te-team-5UOZPTU3.js} +6 -6
- package/dist/things-VPPXXLHB.js +1091 -0
- package/dist/{update-W2SGQNKT.js → update-EEUTEI6R.js} +59 -51
- package/dist/workspace-O3EEIYQM.js +554 -0
- package/package.json +21 -9
- package/skills/ae-agent/SKILL.md +89 -139
- package/skills/ae-agent/references/add-model.md +1 -1
- package/skills/ae-agent/references/create-agent.md +1 -1
- package/skills/ae-agent/references/find-archived-conversations.md +12 -5
- package/skills/ae-agent/references/get-agent.md +1 -1
- package/skills/ae-agent/references/list-agents.md +2 -2
- package/skills/ae-agent/references/list-models.md +2 -2
- package/skills/ae-agent/references/restore-conversation.md +3 -1
- package/skills/ae-analysis/SKILL.md +15 -6
- package/skills/ae-analysis/references/ai_models/funnel.md +5 -3
- package/skills/ae-analysis/references/ai_models.md +27 -0
- package/skills/ae-analysis/references/command_index.md +12 -4
- package/skills/ae-analysis/references/dashboard_move.md +21 -0
- package/skills/ae-analysis/references/dashboard_report_add.md +2 -0
- package/skills/ae-analysis/references/dashboard_report_get.md +19 -0
- package/skills/ae-analysis/references/dashboard_report_update.md +27 -0
- package/skills/ae-analysis/references/dashboard_update.md +1 -1
- package/skills/ae-analysis/references/event_report_presentation.md +76 -0
- package/skills/ae-analysis/references/feedback_submit.md +37 -0
- package/skills/ae-analysis/references/metadata_resolution.md +15 -0
- package/skills/ae-analysis/references/personal_semantic_preference_review.md +9 -0
- package/skills/ae-analysis/references/personal_semantic_preference_review_list.md +7 -0
- package/skills/ae-analysis/references/personal_semantic_preference_submit.md +7 -0
- package/skills/ae-analysis/references/project_semantic_knowledge_wiki.md +68 -27
- package/skills/ae-analysis/references/project_semantic_knowledge_wiki_plan_schema.md +40 -1
- package/skills/ae-analysis/references/report_create.md +13 -3
- package/skills/ae-analysis/references/report_get.md +5 -1
- package/skills/ae-analysis/references/report_update.md +15 -4
- package/skills/ae-analysis/references/system_query_monitor_overview.md +2 -0
- package/skills/ae-analysis/references/system_query_task_cancel.md +2 -0
- package/skills/ae-analysis/references/system_query_task_export.md +6 -2
- package/skills/ae-analysis/references/system_query_task_get.md +2 -0
- package/skills/ae-analysis/references/system_query_task_list.md +7 -3
- package/skills/ae-analysis/references/system_query_task_options.md +2 -2
- package/skills/ae-analysis/references/system_query_task_realtime_list.md +15 -0
- package/skills/ae-analysis/references/user_tag_models.md +2 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-empty-skeleton.mjs +105 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-project-semantic-wiki.mjs +337 -22
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/company-kb.mjs +21 -8
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-rules.md +24 -11
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-schema.md +66 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/generate-build-ir.mjs +1 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/package-wiki-source-zip.mjs +109 -40
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/plan-kb-source-sync.mjs +1 -1
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/prepare-compile-schema.mjs +64 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/refresh-state-parts.mjs +91 -0
- package/skills/ae-automation/SKILL.md +16 -0
- package/skills/ae-automation/references/cli.md +53 -0
- package/skills/ae-automation/references/command_index.md +17 -0
- package/skills/ae-capability/SKILL.md +15 -6
- package/skills/ae-current-context/SKILL.md +3 -2
- package/skills/ae-kb/SKILL.md +62 -12
- package/skills/ae-kb/references/analysis-workflow.md +73 -36
- package/skills/ae-kb/references/query-workflow.md +67 -33
- package/skills/ae-kb/references/schema-import.md +5 -3
- package/skills/ae-kb/references/source-mutations.md +6 -4
- package/skills/ae-kb/references/text-sources.md +53 -0
- package/skills/ae-kb-discovery/SKILL.md +1 -1
- package/skills/ae-team/SKILL.md +23 -17
- package/skills/ae-things/SKILL.md +85 -0
- package/skills/ae-things/references/cli.md +103 -0
- package/skills/ae-things-progress/SKILL.md +43 -0
- package/skills/ae-things-review/SKILL.md +42 -0
- package/skills/ae-workspace/SKILL.md +43 -0
- package/skills/ae-workspace/references/commands.md +51 -0
- package/dist/chunk-E2JKXMVO.js +0 -29
- package/dist/context-M3HDGEIR.js +0 -46
- package/dist/memory-6APEB2JB.js +0 -892
- package/skills/ae-agent/references/create-automation.md +0 -125
- package/skills/ae-agent/references/list-automations.md +0 -56
- package/skills/ae-agent/references/update-automation.md +0 -107
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# ae-kb deterministic query workflow
|
|
2
2
|
|
|
3
3
|
How to answer a knowledge question with the deterministic retrieval primitives
|
|
4
|
-
(`+list` / `+index` / `+grep` / `+read`) instead of `+ask`.
|
|
5
|
-
|
|
6
|
-
page line by line.
|
|
4
|
+
(`+list` / `+index` / `+grep` / `+read`) instead of `+ask`. Choose the next step
|
|
5
|
+
from the evidence already returned; these are branches, not commands to run on
|
|
6
|
+
every page. Reach relevant evidence without crawling a page line by line.
|
|
7
7
|
|
|
8
8
|
Use `+ask` when the question requires synthesizing across multiple pages or
|
|
9
9
|
multi-hop reasoning; simple factual lookups are served by the steps below.
|
|
@@ -17,7 +17,17 @@ and ranked candidates. Start here with a chosen candidate; scope every `+index`
|
|
|
17
17
|
turns out not to cover the question, go back to `ae-kb-discovery` for the next
|
|
18
18
|
candidate rather than searching everything blindly.
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
**Known-page fast path:** within the same host, identity, KB and published revision,
|
|
21
|
+
reuse navigation and read evidence already obtained in this task. Copy exact
|
|
22
|
+
links returned by `+index`, `+grep` or `+read`; go to step 3 for a relevant page
|
|
23
|
+
whose path is known. Do not guess filenames. Once a path is known,
|
|
24
|
+
do not repeat indexing or broad directory searches to rediscover it;
|
|
25
|
+
only read a domain, catalog or parent page when its additional
|
|
26
|
+
context is needed to resolve scope, applicability or an uncovered requirement.
|
|
27
|
+
A revision or access-context change requires revalidation, not silent reuse.
|
|
28
|
+
|
|
29
|
+
1. **Index the candidate.** If no usable navigation is in context, call
|
|
30
|
+
`+index --sources` with the discovery pick.
|
|
21
31
|
Use `index.md` for navigation, a fit check, and **query wording** — the real
|
|
22
32
|
terms in the index (product names, API identifiers, section titles) become
|
|
23
33
|
your `+grep` keywords. The root index routes at module level only; when a
|
|
@@ -30,32 +40,33 @@ candidate rather than searching everything blindly.
|
|
|
30
40
|
**Done when:** you have the candidate's `index.md`, and a list of `wiki/...`
|
|
31
41
|
links you can **copy** (0 items still counts as done).
|
|
32
42
|
|
|
33
|
-
2. **Grep copied paths.**
|
|
43
|
+
2. **Grep copied paths.** When no sufficiently specific page link is known,
|
|
44
|
+
copy 1–3 `wiki/...` entries from the navigation already returned (a page
|
|
34
45
|
such as `wiki/sandbox.md`, or a subdirectory such as `wiki/guides`). Call
|
|
35
46
|
`+grep` with the candidate `--sources` and the copied list as `--paths`. Search
|
|
36
|
-
with the
|
|
37
|
-
using different
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
from it. A third rewrite of the same idea produces no new recall.
|
|
47
|
+
with the terms in the returned navigation. If the first grep misses, rewrite
|
|
48
|
+
the query **once** using different terms from that navigation, still with
|
|
49
|
+
the same `--paths`. If the rewrite also misses, choose the likeliest linked
|
|
50
|
+
page and use step 3, or return to discovery. A third rewrite of the same
|
|
51
|
+
idea produces no new recall.
|
|
42
52
|
|
|
43
53
|
**Done when:** you have hits, or you have rewritten once, or step 1 copied
|
|
44
|
-
0 paths. Copied 0 paths → skip grep and
|
|
45
|
-
|
|
54
|
+
0 paths. Copied 0 paths → skip grep and go back to discovery rather than
|
|
55
|
+
constructing a path from a title.
|
|
46
56
|
|
|
47
57
|
**Reading the result — the page-level `results` view.** The response is a page-level
|
|
48
58
|
`results` array: each entry is one page with its full `hitCount`, a
|
|
49
59
|
`pageKind`, and up to 4 `sections` previews (each with its breadcrumb,
|
|
50
60
|
`sectionStartLine`/`sectionEndLine`, and a text preview). Read the top
|
|
51
61
|
relevant pages until every subquestion of the question is backed by
|
|
52
|
-
sections you have actually read
|
|
62
|
+
sections you have actually read (step 4 distinguishes business analysis
|
|
63
|
+
from knowledge-only coverage). `hitCount` tells you how dense the matches
|
|
53
64
|
are on a page; `pageKind: "catalog"` marks a module directory page — its
|
|
54
65
|
previews are detail-page entries, so treat them as navigation: add the
|
|
55
66
|
detail-page paths you see there to your read list instead of reading the
|
|
56
67
|
catalog as an answer source. When a page has `moreSections > 0` and the
|
|
57
|
-
answer is not in the previews,
|
|
58
|
-
|
|
68
|
+
answer is not in the previews, locate the missing evidence on that single
|
|
69
|
+
page using step 3 rather than searching its entire directory again.
|
|
59
70
|
|
|
60
71
|
Each page-group section preview carries its enclosing heading-section
|
|
61
72
|
boundaries:
|
|
@@ -73,6 +84,15 @@ candidate rather than searching everything blindly.
|
|
|
73
84
|
3. **Choose the section locator.** Pick one locator for the current target
|
|
74
85
|
page:
|
|
75
86
|
|
|
87
|
+
- **Short or unknown-length linked page:** for a focused recall card or
|
|
88
|
+
asset-definition page, read once with
|
|
89
|
+
`--offset 1 --limit 200 --expand none`; an outline is not a prerequisite.
|
|
90
|
+
If a response already shows a longer page or a precise relevant section,
|
|
91
|
+
use the section branches below instead. Check the returned coverage:
|
|
92
|
+
`startLine: 1`, `endLine: totalLines`, and `truncated: false` prove a
|
|
93
|
+
complete page. If partial, locate only the missing evidence on the same page
|
|
94
|
+
with scoped grep or an outline; a bounded prefix is not proof of full
|
|
95
|
+
coverage. Do not reuse a range from another page.
|
|
76
96
|
- **Section preview of a page group:** read the section range with
|
|
77
97
|
`--offset sectionStartLine` and
|
|
78
98
|
`--limit sectionEndLine - sectionStartLine + 1`. For narrow
|
|
@@ -80,10 +100,10 @@ candidate rather than searching everything blindly.
|
|
|
80
100
|
once you see the preview text. If the window turns out too small, widen
|
|
81
101
|
once up to the section range. Do not crawl by shifting offsets line by
|
|
82
102
|
line.
|
|
83
|
-
- **Linked or related page
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
103
|
+
- **Linked or related page needing section localization:** if the direct
|
|
104
|
+
read branch does not apply and you have concrete terms for that new page,
|
|
105
|
+
run `+grep --paths '["<new-page>"]'` scoped to that page and use the new
|
|
106
|
+
hit range. An explicit child link needs no catalog or directory lookup.
|
|
87
107
|
- **No reliable range:** if the new page has no concrete grep terms, its
|
|
88
108
|
grep misses, or headings are needed to choose the right section, call
|
|
89
109
|
`+read --outline` for that page. It returns only the heading tree
|
|
@@ -102,30 +122,44 @@ candidate rather than searching everything blindly.
|
|
|
102
122
|
come from a page-group section preview's boundaries or two adjacent outline
|
|
103
123
|
headings (`heading.line` of the target section to `heading.line - 1` of the
|
|
104
124
|
next). If a window turns out too small, widen to the section boundary in one
|
|
105
|
-
more call.
|
|
125
|
+
more call. A completed direct read in step 3 needs no additional read or
|
|
126
|
+
outline. Independent, already identified pages may be read in parallel;
|
|
127
|
+
follow only links needed for the question, not every related page.
|
|
106
128
|
|
|
107
129
|
**Done when:** the needed evidence is in context without shell truncation,
|
|
108
130
|
or the page response is complete and untruncated.
|
|
109
131
|
|
|
110
|
-
**Read coverage:** read
|
|
111
|
-
until every subquestion
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
132
|
+
**Read coverage:** for knowledge-only answers, read relevant candidate pages
|
|
133
|
+
until every answered subquestion is backed by sections actually read — not
|
|
134
|
+
until a page "looks like the answer". For business data analysis, read the
|
|
135
|
+
relevant definitions and boundaries, then hand off verified coverage and
|
|
136
|
+
remaining gaps in step 5; live values do not need KB text as their source.
|
|
137
|
+
Do not pick a single page by surface similarity between the question wording
|
|
138
|
+
and the page/module name or hit line.
|
|
116
139
|
|
|
117
140
|
5. **Assess coverage, then answer or iterate.** Map the user's question into
|
|
118
141
|
subquestions and check each one against the sections you actually read. If a
|
|
119
142
|
subquestion is covered, answer with citations (knowledge base + page path +
|
|
120
143
|
section). If a gap remains, go back to step 2 with another set of `--paths`
|
|
121
|
-
**copied** from
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
144
|
+
**copied** from current navigation, or return to discovery for the next candidate.
|
|
145
|
+
For a knowledge-only question, missing evidence after the allowed search
|
|
146
|
+
means "not covered by the knowledge base" — do not attach a confident fact
|
|
147
|
+
from general knowledge, even with a disclaimer. For business data analysis,
|
|
148
|
+
this is a KB coverage gap, not completion of the original task. Preserve the
|
|
149
|
+
read KB evidence and continue through `ae-analysis` using
|
|
150
|
+
[`analysis-workflow.md`](analysis-workflow.md): verify suitable saved assets,
|
|
151
|
+
resolve only missing metadata, and execute an independently supported,
|
|
152
|
+
authorized query. Never attribute that live result to unread KB content.
|
|
153
|
+
|
|
154
|
+
Once relevant definitions, parameters and boundaries are covered, proceed
|
|
155
|
+
to the analysis handoff. Do not keep navigating to validate already verified
|
|
156
|
+
links or to seek live numbers in a semantic snapshot. Return to KB retrieval
|
|
157
|
+
only for a concrete unresolved semantic question.
|
|
126
158
|
|
|
127
159
|
**Done when:** every answered subquestion is supported by read sections, or
|
|
128
|
-
the remaining gaps are explicitly reported as missing evidence.
|
|
160
|
+
the remaining knowledge gaps are explicitly reported as missing evidence.
|
|
161
|
+
A business data request still requires the analysis handoff and its task
|
|
162
|
+
completion check; routing or definition-only coverage is not a live answer.
|
|
129
163
|
|
|
130
164
|
## Anti-pattern: same-page offset crawling
|
|
131
165
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
| Command | Required flags | Purpose |
|
|
6
6
|
| --- | --- | --- |
|
|
7
7
|
| `+schema-download` | `--name --output` | Download original formal bytes |
|
|
8
|
-
| `+schema-import` | `--name --file --request-id` | Upload Markdown;
|
|
8
|
+
| `+schema-import` | `--name --file --request-id` | Upload Markdown with basic checks; AI validation is explicit |
|
|
9
9
|
| `+schema-import-list` | `--name` | List pending candidates; `--cursor/--limit` |
|
|
10
10
|
| `+schema-import-status` | `--import-id` | Read report, revision and receipt |
|
|
11
11
|
| `+schema-import-content` | `--import-id` | Read full candidate; `--target/--output` |
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
| `+schema-import-validate` | `--import-id --revision --request-id --hash` | Explicit validation |
|
|
15
15
|
| `+schema-import-optimize` | `--import-id --revision --request-id --hash` | One repair and independent revalidation; repeat `--issue-id` |
|
|
16
16
|
| `+schema-import-reject` | `--import-id --revision --request-id` | Restore latest repair input; no recursive undo |
|
|
17
|
-
| `+schema-import-apply` | `--import-id --revision --request-id --hash
|
|
17
|
+
| `+schema-import-apply` | `--import-id --revision --request-id --hash` and exactly one of `--schema-hash/--schema-absent` | Explicit formal replacement; optional `--report-id` |
|
|
18
18
|
| `+schema-import-abandon` | `--import-id --revision --request-id` | Abandon draft; high-risk write |
|
|
19
19
|
|
|
20
20
|
Use `--scope personal|company` for name lookup. All subsequent operations use the returned import ID, never resolve a name again. Upload may explicitly replace one pending import with `--replaces-import-id/--replaced-revision`; otherwise it creates an additional draft.
|
|
@@ -23,7 +23,9 @@ Upload, validation, optimization and status support `--wait --timeout <seconds>`
|
|
|
23
23
|
|
|
24
24
|
Before applying, read `+schema-import-diff --baseline current-schema`, the entire candidate and advisories. Use the returned formal hash. `KB_SCHEMA_IMPORT_BASE_CHANGED` requires reviewing a fresh diff and explicit confirmation; never refresh the hash and automatically replay apply. Revision/request conflicts preserve your file. `settlementPending/recoveryRequired` means an administrator must inspect the operation; it is not an applied success. Applying does not compile or create a published version. Existing Wiki content needs a later compilation.
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Normal initialization can apply a reviewed, release-accepted preset without a new AI report. Existing valid formal rules are reused on refresh without upload, application, generation or AI validation. Legacy callers may still pass `--report-id`; it is omitted from JSON when absent. Servers with an older mandatory-report contract reject this fast path; surface that incompatibility rather than invent a report or silently generate rules.
|
|
27
|
+
|
|
28
|
+
Candidates are shared between Web and CLI for the same user. Closing either client does not abandon saved work. Save makes a new human baseline only when bytes change. Application admission follows the current server's basic checks and `canApply` response. AI validation is explicit and optional; it is recommended once when authoring a reusable preset. Keep its complete passing report and exact content hash before releasing that preset. No automatic model retry loop exists.
|
|
27
29
|
|
|
28
30
|
## Transitional transport
|
|
29
31
|
|
|
@@ -11,6 +11,8 @@ These commands require a host exposing the External KB source-mutation and previ
|
|
|
11
11
|
|
|
12
12
|
All new commands use `kb source <action>`. Existing `+source-put`, `+source-rm` and whole-KB `+rollback` keep their original behavior.
|
|
13
13
|
|
|
14
|
+
For ordinary `.md`, `.markdown` and `.txt` sources, [the text workflow](text-sources.md) also supports `replace --text` or `--stdin` using the complete text API and the same required revision. `--file` continues to use the original multipart replacement contract below.
|
|
15
|
+
|
|
14
16
|
## Replace a file source
|
|
15
17
|
|
|
16
18
|
```bash
|
|
@@ -88,8 +90,8 @@ Keep the structured `error.code` and `hint`. `SOURCE_CONTENT_REVISION_CONFLICT`,
|
|
|
88
90
|
## Transitional admission
|
|
89
91
|
|
|
90
92
|
- Transition status: transitional
|
|
91
|
-
- Owning module: te-claude
|
|
92
|
-
- Current transport:
|
|
93
|
-
- Gateway target: TBD
|
|
94
|
-
- Review after: 2026-12
|
|
93
|
+
- Owning module: te-claude knowledge-base source management
|
|
94
|
+
- Current transport: External Knowledge Base REST API
|
|
95
|
+
- Gateway target: TBD
|
|
96
|
+
- Review after: 2026-11-12
|
|
95
97
|
- Exit condition: migrate to equivalent Gateway capabilities while retaining typed file handling, revision guards, preview confirmation and stable outcomes, or remove redundant wrappers when dynamic invocation provides the same contract
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Ordinary text sources
|
|
2
|
+
|
|
3
|
+
Use these commands for ordinary `.md`, `.markdown` and `.txt` sources, including existing uploads. Text is a content filter on `sourceType=file`, not a new source type. ZIP children and URL collection output use their original commands.
|
|
4
|
+
|
|
5
|
+
## Create
|
|
6
|
+
|
|
7
|
+
Copy the exact knowledge base name and `personal` or `company` scope from `kb +list`. Choose exactly one input:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ae-cli kb source create-text --name "Handbook" --scope company --text "Release notes" --dry-run
|
|
11
|
+
ae-cli kb source create-text --name "Handbook" --scope company --title "Release notes" --file ./notes.md
|
|
12
|
+
cat ./notes.txt | ae-cli kb source create-text --name "Handbook" --scope company --stdin
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Each request creates one independent Markdown file source. `--file` reads one UTF-8 `.md`, `.markdown` or `.txt` file (case-insensitive); the server generates a title from the content unless `--title` is supplied, adds `.md`, and resolves duplicate names with a sequence number. To retain a local filename or upload other formats, use `kb +add`. The response `item` contains the final display name, stable ID, current `contentRevision` and pending compilation state.
|
|
16
|
+
|
|
17
|
+
Transport: `POST /agent/api/external/knowledge-bases/sources/text`, JSON `{name, scope, content, title?, inputMethod:"text_input"}`.
|
|
18
|
+
|
|
19
|
+
## Read and edit the same source
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
ae-cli kb +list-sources --name "Handbook" --scope company --content-type text
|
|
23
|
+
ae-cli kb source read-text --name "Handbook" --scope company --id <source-id>
|
|
24
|
+
ae-cli kb source read-text --name "Handbook" --scope company --id <source-id> --out ./original.md
|
|
25
|
+
ae-cli kb source replace --name "Handbook" --scope company --id <source-id> \
|
|
26
|
+
--source-type file --expected-revision <contentRevision> --text "Revised notes"
|
|
27
|
+
cat ./revised.md | ae-cli kb source replace --name "Handbook" --scope company --id <source-id> \
|
|
28
|
+
--source-type file --expected-revision <contentRevision> --stdin
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`read-text` returns complete `{item, content, contentFormat}` in the standard JSON envelope. `item.contentRevision` corresponds to these exact bytes; `contentFormat` is `markdown` or `text`. `--out` exclusively creates a new local file and returns only `{item, contentFormat, out}`. Existing files and symlinks are never overwritten. A read does not establish write permission.
|
|
32
|
+
|
|
33
|
+
Text replacement sends `PUT .../sources/<id>/text?name=...&scope=...` with `{content, expectedRevision, inputMethod:"text_input"}`. It preserves the existing source ID, name and format. The original `replace --file` path continues to send multipart data to `/raw` or prepare a ZIP preview, as described in [source mutations](source-mutations.md).
|
|
34
|
+
|
|
35
|
+
Read after saving and compare the complete bytes and revision. An unchanged save reports `outcome=unchanged` without increasing the revision; a real change reports the actual mutation result and new revision. `SOURCE_CONTENT_REVISION_CONFLICT` exits nonzero: retain local input, read current content and explicitly resolve the conflict. The CLI never obtains a new revision or retries a write automatically.
|
|
36
|
+
|
|
37
|
+
## Encoding, limits and outcomes
|
|
38
|
+
|
|
39
|
+
- File and stdin input must be strict UTF-8. BOM, LF/CRLF/CR, mixed line endings and the presence or absence of a trailing newline are preserved. Quotes, backticks and Unicode remain business data. `--stdin` is explicit and requires a pipe; missing input never waits for interactive text.
|
|
40
|
+
- Empty or whitespace-only text is rejected. The limit is 50 MiB (52,428,800 UTF-8 bytes), including BOM and newlines. Exactly the limit is allowed. JSON escaping overhead is separate; valid content is never truncated.
|
|
41
|
+
- Creation and replacement are ordinary `write` commands without a second confirmation. A `--dry-run` validates local input and previews the request with content redacted, sends no business request, and cannot prove host permissions or a current revision.
|
|
42
|
+
- Text flags are sensitive. Text input, full read responses and server error details are excluded from command and HTTP diagnostics; structured errors retain the server code and safe recovery guidance. Explicit `read-text` JSON or `--out` content is the requested business result.
|
|
43
|
+
- An unsupported host fails explicitly; the CLI does not fall back to upload or delete/re-add. If the outcome is unknown, inspect `+list-sources` and read the source before deciding on another request; retrying creation can create another independent source.
|
|
44
|
+
- Saving does not compile or publish. After reviewing all changes, explicitly use `kb +compile` and inspect `kb +status`. Failed compilation preserves prior published knowledge. Deletion uses existing `+rm-source` confirmation and publication semantics.
|
|
45
|
+
|
|
46
|
+
## Admission record
|
|
47
|
+
|
|
48
|
+
- Transition status: transitional
|
|
49
|
+
- Owning module: te-claude knowledge-base source management
|
|
50
|
+
- Current transport: External Knowledge Base REST API
|
|
51
|
+
- Gateway target: TBD
|
|
52
|
+
- Review after: 2026-11-12
|
|
53
|
+
- Exit condition: when equivalent text and revision capabilities enter the Gateway, migrate the typed commands to the shared transport where their file, stdin, revision and output handling adds value, while preserving released command compatibility.
|
|
@@ -72,7 +72,7 @@ A candidate returned by `+list`, navigation returned by `+index`, a successful c
|
|
|
72
72
|
|
|
73
73
|
## Use Knowledge Base Evidence in Analysis
|
|
74
74
|
|
|
75
|
-
For project-scoped business data analysis, the `analysis-workflow.md` handoff above is mandatory after relevant source pages have been read.
|
|
75
|
+
For project-scoped business data analysis, the `analysis-workflow.md` handoff above is mandatory after relevant source pages have been read. Attempt an exact, semantically applicable saved asset first. If definition inspection proves it unsuitable, or execution cannot produce the requested result, continue ordinary analysis for the uncovered requirements without discarding verified KB evidence. A KB statement that current values require execution does not require running a known mismatching asset or asking the user to repeat the data request.
|
|
76
76
|
|
|
77
77
|
When using internal context to explain data analysis results, anomalies, or trends:
|
|
78
78
|
|
package/skills/ae-team/SKILL.md
CHANGED
|
@@ -16,20 +16,22 @@ AE CLI (`ae-cli`) is the command-line tool for the AE (Agentic Engine) analysis
|
|
|
16
16
|
|
|
17
17
|
Global parameters:
|
|
18
18
|
|
|
19
|
-
| Parameter
|
|
20
|
-
|
|
21
|
-
| `--format <json\|table>` | Output format. Default is JSON.
|
|
22
|
-
| `--jq <expr>`
|
|
23
|
-
| `--host <url>`
|
|
24
|
-
| `--yes`
|
|
25
|
-
| `--dry-run`
|
|
19
|
+
| Parameter | Description |
|
|
20
|
+
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| `--format <json\|table>` | Output format. Default is JSON. |
|
|
22
|
+
| `--jq <expr>` | jq filter expression for JSON output. |
|
|
23
|
+
| `--host <url>` | Override the active AE host. Available on every command and may be placed after the subcommand, e.g. `ae-cli team +<command> --host <url>`. |
|
|
24
|
+
| `--yes` | Skip confirmation for `high-risk-write` (delete) operations. |
|
|
25
|
+
| `--dry-run` | Show request details without executing. |
|
|
26
26
|
|
|
27
27
|
Output and errors:
|
|
28
|
+
|
|
28
29
|
- Successful commands return machine-readable JSON by default. Envelope may include optional `_notice.host_compat`.
|
|
29
30
|
- Failed commands return `{ "ok": false, "error": { "type": "...", "message": "...", "hint": "..." } }` and exit non-zero.
|
|
30
31
|
- **CRITICAL — Host compat (do this first):** If stderr or `_notice.host_compat` has a version warning, open the user reply with ⚠️ and **quote `npm i -g` / `npx skills add` (or update-cluster) lines verbatim**, then list projects/results. Never omit when summarizing. Soft tip; `ok: true` may still include the notice.
|
|
31
32
|
|
|
32
33
|
Safety constraints:
|
|
34
|
+
|
|
33
35
|
- Read commands (`+list`, `+list-templates`, `+list-projects`, `+run-result`, `+run-artifacts`, `+ai-generate`) can execute directly once required IDs are known.
|
|
34
36
|
- Ordinary `write` commands require explicit user intent but no CLI confirmation. Only `high-risk-write` commands use the confirmation gate and may receive `--yes` after explicit user authorization.
|
|
35
37
|
- Never invent team IDs, run IDs, `agentId` values, `mcpServerIds`, `skillIds`, `knowledgeBaseIds`, project IDs, or any resource identifiers. Discover them with list commands or accept them from the user.
|
|
@@ -81,16 +83,16 @@ ae-cli team +run-start --help
|
|
|
81
83
|
|
|
82
84
|
## TeamRun Status Reference
|
|
83
85
|
|
|
84
|
-
| Status
|
|
85
|
-
|
|
86
|
-
| `pending`
|
|
87
|
-
| `running`
|
|
88
|
-
| `waiting_user`
|
|
89
|
-
| `waiting_approval` | Paused — waiting for approval
|
|
90
|
-
| `paused`
|
|
91
|
-
| `completed`
|
|
92
|
-
| `failed`
|
|
93
|
-
| `cancelled`
|
|
86
|
+
| Status | Description |
|
|
87
|
+
| ------------------ | -------------------------------------------------------------------------------------------------------------------- |
|
|
88
|
+
| `pending` | Queued, waiting to start |
|
|
89
|
+
| `running` | Actively executing |
|
|
90
|
+
| `waiting_user` | Paused — `+run-watch` exits with code 2; read `pendingQuestion` from stdout, present to user, then call `+run-reply` |
|
|
91
|
+
| `waiting_approval` | Paused — waiting for approval |
|
|
92
|
+
| `paused` | Manually paused |
|
|
93
|
+
| `completed` | Finished successfully |
|
|
94
|
+
| `failed` | Execution failed |
|
|
95
|
+
| `cancelled` | Cancelled by user |
|
|
94
96
|
|
|
95
97
|
Terminal statuses: `completed`, `failed`, `cancelled`. Poll `+run-result` until one of these is reached.
|
|
96
98
|
|
|
@@ -163,3 +165,7 @@ ae-cli team +create --name "我的分析团队" --config '<template_config>'
|
|
|
163
165
|
```bash
|
|
164
166
|
ae-cli team --help
|
|
165
167
|
```
|
|
168
|
+
|
|
169
|
+
## Automation lifecycle
|
|
170
|
+
|
|
171
|
+
For Agent or team automation schedules, immediate execution, stop, retry, deletion, history and read-only results, use [ae-automation](../ae-automation/SKILL.md). Existing Agent automation aliases remain compatible.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ae-things
|
|
3
|
+
description: "工作空间事项(things):在明确的 AgentSpace 中用 ae-cli things 创建、查询、更新和推进事项。当对话出现分工指派(谁负责什么)、要交付的产出、推进节奏、待办、下一步、里程碑或阶段计划时主动使用——不需要用户显式说「创建事项」。"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 工作空间事项
|
|
7
|
+
|
|
8
|
+
使用 `ae-cli things` 操作当前明确指定的 TE 空间事项。先读 [CLI reference](references/cli.md),不猜 ID,不自动选择其他空间。
|
|
9
|
+
|
|
10
|
+
## 何时创建事项
|
|
11
|
+
|
|
12
|
+
**由你自己判断要不要建,不要等「帮我创建事项」这种显式指令。** 个人空间与共享空间一视同仁。
|
|
13
|
+
|
|
14
|
+
出现下列任一信号就直接创建,不必先问:
|
|
15
|
+
|
|
16
|
+
- 出现「谁做什么」的分工指派,例如「让 A 梳理 X,B 梳理 Y」。
|
|
17
|
+
- 出现要交付的产出加上推进意图,例如「输出一份最终方案」「按这个节奏推进」「安排一下」。
|
|
18
|
+
- 出现承诺、待办、下一步、里程碑或多阶段计划。
|
|
19
|
+
- 用户在复述已经定下来的事,并指向后续执行。
|
|
20
|
+
|
|
21
|
+
下列情况不要创建:
|
|
22
|
+
|
|
23
|
+
- 纯信息问答、概念解释、闲聊。
|
|
24
|
+
- 还在比较方案、假设性推演,或用户明确说「先不定」。
|
|
25
|
+
- 查重命中已有同义事项——指出已存在,不重复建。
|
|
26
|
+
- 用户说过不要建。
|
|
27
|
+
|
|
28
|
+
**不确定时,把拟建清单(标题、负责人、描述要点)在回复里列出来,一次性问用户确认。不允许什么都不做就把分工排版成清单交差。**
|
|
29
|
+
|
|
30
|
+
### 创建时的动作顺序
|
|
31
|
+
|
|
32
|
+
1. 确认已绑定明确的 AgentSpace;没有绑定就不创建。
|
|
33
|
+
2. `members` 取成员列表,把对话里提到的人名映射到成员 ID。唯一命中就直接作为 `--assignee-id`;命中 0 个或多个时该事项负责人留空(服务端默认当前用户),并在回复里点名待确认。
|
|
34
|
+
3. `list --query` 或 `options --query` 查重。
|
|
35
|
+
4. 逐个 `create`:标题写可交付物而不是原话复述,描述写清目标与验收要点,带 `--command-id` 保证重试幂等。
|
|
36
|
+
5. 需要时用 `conversation bind` 绑定主事项,或 `link-conversation` 建普通引用。
|
|
37
|
+
6. 在回复里报告已创建的事项编号、标题、负责人,以及哪些负责人待确认。
|
|
38
|
+
|
|
39
|
+
**粒度**:按「可独立交付、可独立负责」的单位建事项。没有子事项和分组,不要试图建层级。例如「A、B、C 各自梳理一块,然后合成一份总方案」对应 4 个事项,而不是 1 个,也不是每句话一个。
|
|
40
|
+
|
|
41
|
+
### 授权边界
|
|
42
|
+
|
|
43
|
+
自主执行:创建新事项;为自己刚建的事项补第一条记录。
|
|
44
|
+
|
|
45
|
+
用户已授权推进/完成的事项:直接追加或更新相应进展,并自动关联本次涉及的交付附件,按下节完成发布与回读。个人与共享空间一致,发布仍传 `--confirm-share`;授权事项交付即包含向该事项所在空间共享这些交付文件。
|
|
46
|
+
|
|
47
|
+
其他已有事项改写、负责人变更、归档/恢复、解绑及永久删除仍需明确授权;历史绑定本身不是授权。不自动发消息或创建定时任务。
|
|
48
|
+
|
|
49
|
+
### 交付附件闭环
|
|
50
|
+
|
|
51
|
+
追加/更新进展时,逐个核对本次实际交付文件:
|
|
52
|
+
|
|
53
|
+
1. 用 `asset available` 查本空间文件并翻完分页。已登记文件按 assetId 关联,未登记文件按返回的相对 path 关联。
|
|
54
|
+
2. 尚未进入空间的新文件用 `asset publish`:本轮未登记产物使用 `--conversation-id --run-id --source-path`;已有产物使用 `--artifact-id` 或 `--file-token`。每个文件保存独立 commandId,重试原样复用。
|
|
55
|
+
3. `linked:false` 表示已发布未关联,只用返回 assetId 补 `asset link`,不重复复制。只发布本次交付文件,不发布临时文件或整个会话目录。
|
|
56
|
+
4. `asset list --id` 回读,核实每个附件存在且 availability=available,再回读进展记录。只有两者均成功才报告“进展和附件已更新”;失败明确区分已发布、已关联、待恢复。
|
|
57
|
+
|
|
58
|
+
附件使用上述文件关联接口;本地路径文本链接不能代替附件,仅复制文件也不算交付完成。完整参数见 CLI reference。
|
|
59
|
+
|
|
60
|
+
## 当前会话绑定与执行快照
|
|
61
|
+
|
|
62
|
+
以本轮冻结的绑定声明确定本轮默认事项。涉及当前事项执行、审查、总结或更新前,按声明中的 `readCommand` 读取本次执行快照;普通聊天无需读取。运行中切换或解绑只立即改变会话归属,本轮(含等待、恢复、重试)仍用原快照;原先无事项则本轮继续无默认事项,下一次新 Run 才使用最新绑定。用户明确指定其他事项时仍按权限读取和操作,不将会话最新归属误认为本轮快照。
|
|
63
|
+
|
|
64
|
+
用户明确要求将当前对话绑定到某事项时,唯一定位目标后执行 `conversation bind`,再用 `conversation primary` 回读确认;同名事项不能唯一确定时询问用户。成功说明「已绑定,事项上下文从下一轮生效」。解绑也须回读确认。不得将 `link-conversation` 普通引用当成主事项绑定成功的替代;接口失败应如实说明,不绕过权限。
|
|
65
|
+
|
|
66
|
+
`context --id <thing-id> --run-id <run-id>` 返回执行受理时的业务文本和版本。需要最新事实或写入前版本时额外读取不带 `--run-id` 的实时上下文,并明确区分采集时间与快照版本。读取失败时披露缺失,不凭标题猜测,也不自动改读实时数据。具体契约见 [CLI reference](references/cli.md#执行快照与实时上下文)。
|
|
67
|
+
|
|
68
|
+
- 字段为标题、描述、标签、状态、负责人、协作者。状态 open/paused/done;归档与恢复是独立动作。新建描述必填,创建时省略负责人默认本人,显式 null 被拒绝。
|
|
69
|
+
- 用 members/options 查询成员和事项候选;创建、编辑和协作者管理遵循服务端权限。修改前读最新 version,409 后比较变化,不仅替换版本号。
|
|
70
|
+
- 记录使用 url/note/progress;省略类型时服务端将单个 HTTP(S) URL 保存为链接,其余为备注。更新进展用 entry append --type progress;修改记录用 entry update 和 expected-updated-at,支持单独修改标题、类型或正文;--clear-title 清空标题。
|
|
71
|
+
- 从会话消息整理事项用 from-message,提供已核实的 conversation-id/message-id 和确认正文;按上面的创建信号判断是否该整理,不要求用户显式点名该命令。推断出来的内容先在会话中呈现建议;不使用已删除的持久化修改草稿命令。
|
|
72
|
+
- 主事项使用 conversation primary/bind/unbind,普通引用用 link-conversation,conversations 查询关联。关联不改变会话隐私和权限。
|
|
73
|
+
- 阶段成果使用进展记录;交接使用备注写清已完成内容、证据和下一步。负责人和协作者是唯一人员协作关系,不额外认领。
|
|
74
|
+
- 文件使用 asset available/list/link/unlink/publish,遵循上面的授权边界与交付附件闭环;解除关联不删除文件。
|
|
75
|
+
- 永久删除先读最新版本,解释不可恢复及会话/文件保留边界,明确确认后使用 delete --confirm-delete --yes。运行冲突时等待,不自动终止运行。
|
|
76
|
+
- 已获明确授权的具体修改直接执行,不重复询问。
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
ae-cli things create --agent-space-id <space-id> --title '接口验收' --description '验证权限与数据一致性' --format json
|
|
80
|
+
ae-cli things entry append --agent-space-id <space-id> --id <thing-id> --type progress --content '已完成接口联调' --format json
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
审查使用 [ae-things-review](../ae-things-review/SKILL.md),周期汇总使用 [ae-things-progress](../ae-things-progress/SKILL.md)。二者按完整采集事实归纳,保留未读文件、截断和非事务采集边界。
|
|
84
|
+
|
|
85
|
+
Use `things conversations` to list linked conversations and `things conversation get` to read one. Start new conversations from the workspace UI; Things CLI only manages thing links and primary-thing binding.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# 工作空间事项 CLI reference
|
|
2
|
+
|
|
3
|
+
本 reference 描述已实现命令,不重复维护权限和数据业务规则。[主 Spec](https://gitlab.thinkingdata.cn/te-ai/te-claude/-/blob/feat/workspace-issues-convergence/docs/specs/2026-09-17-workspace-issues-convergence/spec.md)。
|
|
4
|
+
|
|
5
|
+
Transition status: transitional
|
|
6
|
+
Owning module: te-claude / src/lib/agent-space-things
|
|
7
|
+
Current transport: TE REST /api/cli/things/v1; cli-token
|
|
8
|
+
Gateway target: Capability Gateway things domain (TBD)
|
|
9
|
+
Review after: 2026-10-14
|
|
10
|
+
Exit condition: Gateway 提供等价空间校验、幂等、权限、分页和会话关联能力后迁移 transport。
|
|
11
|
+
|
|
12
|
+
事项尚未接入 Gateway。类型化 flags、JSON/stdin、正文脱敏 dry-run、默认值和目标一致性检查提供必要的 Transitional 入口。
|
|
13
|
+
|
|
14
|
+
## 公共参数
|
|
15
|
+
|
|
16
|
+
`--agent-space-id` 在会话外必填,会话内须与当前会话空间一致。`--id` 为事项 ID。写请求用 `--command-id <uuid>` 支持原样重试,省略时生成;编辑、归档和恢复须带 `--expected-version`。分页为 `--limit 1..100 --cursor <opaque>`,默认 50。通用 `--format json` 输出结构化结果;`--dry-run` 不请求业务 API、不读取文件/stdin、不泄露正文。主事项解除、删除资产关联或协作者属于 high-risk-write,已获授权的脚本使用 `--yes`。
|
|
17
|
+
|
|
18
|
+
## 字段和记录
|
|
19
|
+
|
|
20
|
+
事项字段仅为 title、description、tags、status、assigneeId、collaboratorIds。新建标题 1–200 字符、描述 1–10000 字符必填。活跃状态 `open | paused | done`,归档和恢复使用独立动作。个人或共享空间创建时省略负责人均默认当前用户;更新省略保持不变,`null` 被拒绝。`--tags '["标签"]'`、`--collaborator-ids '["member-id"]'`,空数组清空。`--assignee-id` 只能指定有效空间成员。
|
|
21
|
+
|
|
22
|
+
新建/更新可用 `--file fields.json` 或 `--stdin` 读取 camelCase 字段对象,显式 flags 覆盖同名字段。失效的验收、优先级、分组、截止时间、进展快照、阻塞、下一步、父子事项字段被拒绝;group 和 draft 命令已移除。
|
|
23
|
+
|
|
24
|
+
| 命令 | 参数和结果 |
|
|
25
|
+
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
26
|
+
| `list` | `--query --status open\|paused\|done\|archived --assignee-id`;返回 items/nextCursor |
|
|
27
|
+
| `get` | `--id`;字段、权限、version、协作者及 latestProgress |
|
|
28
|
+
| `create` | `--title --description` 和可选业务字段 |
|
|
29
|
+
| `update` | `--id --expected-version` 和业务字段 |
|
|
30
|
+
| `archive/restore` | `--id --expected-version` |
|
|
31
|
+
| `delete` | `--id --expected-version --confirm-delete --yes`;不可恢复,清理事项及所有关联,保留会话、消息、历史运行快照与空间文件;活动运行冲突返回 THING_RUNNING_CONFLICT |
|
|
32
|
+
| `members/options` | 分页查询成员/事项候选;options 支持 `--query` |
|
|
33
|
+
| `collaborator add/remove` | `--id --user-id` |
|
|
34
|
+
| `entry list` | `--id` 和分页,按 createdAt、id 倒序 |
|
|
35
|
+
| `entry append` | `--id --type url\|note\|progress`;省略时服务端自动识别链接或备注,可选 `--title`;`--content`、`--file`、`--stdin` 三选一 |
|
|
36
|
+
| `entry update` | `--id --entry-id --expected-updated-at`;至少一个修改字段:`--title`、`--clear-title`、`--type note\|url\|progress` 或正文输入;可只改标题或类型,title 与 clear-title 互斥 |
|
|
37
|
+
| `from-message` | `--conversation-id --message-id` 和正文;`--id` 追加或 `--title` 新建二选一;仅 `--id` 追加模式可选 `--entry-type note\|progress`,默认 note;`--title` 新建模式传入会报错,新建以正文作为描述,不生成额外进展记录 |
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
ae-cli things create --agent-space-id <space-id> --title '验收事项' --description '验证成员操作与权限' --format json
|
|
41
|
+
ae-cli things entry append --agent-space-id <space-id> --id <thing-id> --type progress --content '完成接口联调' --format json
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## 会话
|
|
45
|
+
|
|
46
|
+
| 命令 | 参数和含义 |
|
|
47
|
+
| -------------------------- | ----------------------------------------------------- |
|
|
48
|
+
| `conversation get` | `--conversation-id`;读取可访问会话快照及当前模型投影 |
|
|
49
|
+
| `conversation primary` | `--conversation-id`;读取主事项关联 |
|
|
50
|
+
| `conversation bind/unbind` | `--conversation-id`;bind 额外需要 `--id` |
|
|
51
|
+
| `conversations` | `--id` 和分页;关联会话 |
|
|
52
|
+
| `link-conversation` | `--id --conversation-id`;追加引用,不替换主事项 |
|
|
53
|
+
|
|
54
|
+
关联不授予会话访问权;不能读取其他用户私有会话。会话排队、运行或等待交互时允许绑定/解绑,立即更新归属但不修改已受理 Run 的冻结上下文,下一次新 Run 生效。绑定后用 `conversation primary` 回读,不使用普通引用代替主事项绑定。
|
|
55
|
+
|
|
56
|
+
## 进展与汇总
|
|
57
|
+
|
|
58
|
+
阶段成果写 `entry append --type progress`;交接写 `--type note`,用标题和正文说明已完成内容、证据、下一步。人员关系使用负责人和协作者,不需要认领。
|
|
59
|
+
|
|
60
|
+
`+detail --id` 收集事项、全部可读 entries/assets 和实时 context。`+digest` 支持负责人筛选或 `--thing-ids id-a,id-b`,不能同时指定两种范围;可选 `--from --to --time-zone`,时间须带时区,窗口左闭右开。默认分别分页采集活动与归档事项,跨集合按 ID 去重。返回 open/paused/done 三态 counts、archivedCount、items 和采集边界。latestProgress 使用服务端最新 progress 记录;effectiveProgressCount 只统计 progress 记录,不代表模型已核实内容;status 时间线的 before/after 用于重建基线。
|
|
61
|
+
|
|
62
|
+
每链最多 100 页/10000 条。异常、重复游标、空页继续或达到上限标 truncated;重复 ID 不解释为完整。报告核对 fetchedCount、truncated、consistency、collectedAt。non_transactional 不是事务快照;changed_during_collection 或截断时 baseline 为 null。counts 是采集时状态,不能当周期末状态。未记录不等于未推进,附件可用不表示已读取或已验收。
|
|
63
|
+
|
|
64
|
+
## 错误与恢复
|
|
65
|
+
|
|
66
|
+
THING_INVALID_INPUT 修正参数;THING_FORBIDDEN/THING_NOT_FOUND 不推断不可见资源;THING_READ_ONLY 表示资源只读:归档事项需恢复后编辑,不可用空间需先恢复空间可用性,操作日志不可编辑、应追加新记录;THING_VERSION_CONFLICT/记录时间戳冲突重读并比较,不能只换版本号;THING_COMMAND_CONFLICT 表示同 UUID 不同请求;THING_RATE_LIMITED 等待后用原 commandId 重试。主事项绑定不因运行中而拒绝;永久删除仍保留 THING_RUNNING_CONFLICT 活动运行保护。
|
|
67
|
+
|
|
68
|
+
## 文件与交付物(阶段4)
|
|
69
|
+
|
|
70
|
+
`asset available` 分页合并当前空间实际文件和登记元数据;已登记项返回稳定 `assetId`,未登记项 assetId=null、path 为相对路径。`asset link` 接受 `--asset-id` 或 `--path` 二选一,路径关联时校验、登记并关联,列表读取不登记。`asset list --id` 分页读取事项关联。核对 availability 及 scanStatus/scanReason;部分扫描不代表目录完整。
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
ae-cli things asset available --agent-space-id <space-id> --limit 100 --format json
|
|
74
|
+
ae-cli things asset list --agent-space-id <space-id> --id <thing-id> --format json
|
|
75
|
+
ae-cli things asset link --agent-space-id <space-id> --id <thing-id> --asset-id <asset-id> --role attachment --command-id <uuid> --format json
|
|
76
|
+
ae-cli things asset publish --id <thing-id> --conversation-id <conversation-id> --artifact-id <artifact-id> --confirm-share --command-id <uuid> --format json
|
|
77
|
+
ae-cli things asset publish --id <thing-id> --conversation-id <conversation-id> --run-id <run-id> --source-path <absolute-delivered-file> --confirm-share --command-id <uuid> --format json
|
|
78
|
+
ae-cli things asset link --agent-space-id <space-id> --id <thing-id> --path <space-relative-path> --command-id <uuid> --format json
|
|
79
|
+
ae-cli things asset unlink --agent-space-id <space-id> --id <thing-id> --asset-id <asset-id> --command-id <uuid> --format json
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
- `role` 仅接受 attachment(默认);deliverable 在正常执行与 dry-run 的参数校验阶段均被拒绝。同一事项与资产只有一个关联。
|
|
83
|
+
- 发布传 `--confirm-share`,授权边界见 Skill。来源为 artifact-id、file-token、source-path 三选一;source-path 必须同时带 run-id,服务端验证执行归属、真实沙箱文件及会话 artifacts 目录边界。发布到空间后所有成员可见。
|
|
84
|
+
- 发布使用既有会话产物发布器。发布回执与资产元数据同事务,使用原 commandId 重试不会再复制。返回 `linked:false, assetId, code:THING_ASSET_LINK_FAILED` 时文件已经共享,用 asset link 只补关联;不重复发布、不声称已交付。
|
|
85
|
+
- 解除关联不删除文件、不恢复私有;被引用的资产删除返回 `AGENT_SPACE_ASSET_REFERENCED`,须先解除关联。
|
|
86
|
+
- `THING_ASSET_UNAVAILABLE` 表示文件缺失或不能验证,`THING_ASSET_PUBLISH_FAILED` 表示发布未完成。文件引用只冻结 ID 和引用文本,不代表不可变正文。上下文最多选取前10份引用,超出会明确提示,完整文件列表按需读取。
|
|
87
|
+
|
|
88
|
+
## 执行快照与实时上下文
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# 本次执行使用的冻结事实;参数取自本轮绑定声明
|
|
92
|
+
ae-cli things context --agent-space-id <space-id> --id <thing-id> --run-id <run-id> --format json
|
|
93
|
+
# 显式读取当前事实;不带 run-id 的既有行为保持不变
|
|
94
|
+
ae-cli things context --agent-space-id <space-id> --id <thing-id> --format json
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
带 `--run-id` 时请求现有 GET context 的 `runId` 参数,返回保存的快照及 `source: {kind: "run_snapshot", runId}`、`currentFiles`、`fileReferencePolicy`。`thing.version`/`capturedAt` 为受理时版本/时间,`currentFiles` 为当前可用路径;文件正文不保证版本冻结,使用前读取。原 `notices` 保留。无参数时返回原实时上下文;不从环境变量自动选择执行,`+detail`/`+digest` 也继续实时采集。
|
|
98
|
+
|
|
99
|
+
执行、会话、空间及快照中的原事项必须匹配,且操作者仍有访问权限;执行 ID 不是授权。会话当前主事项可以已切换或解除,本轮等待/恢复/重试仍读取原快照。`THING_TARGET_CONFLICT` 表示快照与请求目标不一致,应重新确认目标;`THING_CONTEXT_UNAVAILABLE` 表示快照缺失或损坏,应重新发起执行,不自动降级实时读取。`THING_NOT_FOUND` 不区分不存在和不可见。归档或不可用文件沿用 `THING_READ_ONLY` / `THING_ASSET_UNAVAILABLE`。
|
|
100
|
+
|
|
101
|
+
切换或解绑保留历史和 provider session,只改变会话归属及下一新 Run 默认目标;不是遗忘或撤权。普通聊天无需查事项,具体事项工作先读快照;当前状态及写入前版本需额外显式实时读取。工具失败时披露缺失。**对已有事项的修改**只按用户明确授权或确认执行,不能因为历史关联过就默认回写;创建新事项不受此限,按 [SKILL 的创建信号](../SKILL.md#何时创建事项)自主判断。
|
|
102
|
+
|
|
103
|
+
维护模块沿用 Things Transitional transport;新增参数不创建同义命令或独立 Gateway 入口,迁移出口沿用本 reference 的收录记录。跨仓实施契约见 te-claude `docs/specs/2026-09-17-workspace-issues-convergence/spec.md`;应用与 CLI/Skill 配套交付。
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ae-things-progress
|
|
3
|
+
description: "工作空间事项进展、日报和周报:使用 ae-cli things 采集当前空间、负责人或显式事项集合的周期事实,由当前会话模型归纳并披露数据边界。"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 事项进展汇总
|
|
7
|
+
|
|
8
|
+
从 aha-links 的事实采集和输出契约适配;先读 [事项操作](../ae-things/SKILL.md) 和 [CLI reference](../ae-things/references/cli.md)。CLI 收事实,当前模型做归纳,不调用独立报告后台。
|
|
9
|
+
|
|
10
|
+
涉及本轮绑定事项时,先遵循 [执行快照与实时上下文](../ae-things/references/cli.md#执行快照与实时上下文) 读取本次执行快照,再按以下流程采集最新审查或周期事实;两种来源分开表述。无绑定时仅使用用户明确指定的范围。
|
|
11
|
+
|
|
12
|
+
## 范围和时间
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
ae-cli things +digest --agent-space-id <space-id> --from 2026-09-07T00:00:00+08:00 --to 2026-09-14T00:00:00+08:00 --time-zone Asia/Shanghai --format json
|
|
16
|
+
ae-cli things +digest --agent-space-id <space-id> --assignee-id <member-id> --format json
|
|
17
|
+
ae-cli things +digest --agent-space-id <space-id> --thing-ids <id-a>,<id-b> --format json
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
不猜 ID、不选择个人默认空间;不支持关注清单、群或跨空间汇总。日报按自然日,周报按周一 00:00 到下周一 00:00,默认 Asia/Shanghai。今日/本周的截止点用当前时刻,昨日/上周用完整周期。自定义区间必须明确;命令的 from/to 都必须含时区,区间为左闭右开。
|
|
21
|
+
|
|
22
|
+
输出时将记录的 ISO 时间转换为报告时区,并在时间窗、采集时间和证据日期旁明确标注时区。例:`2026-09-10T04:50:00Z` 在 Asia/Shanghai 应展示为 `2026-09-10 12:50(Asia/Shanghai)`;不能删除 Z 后直接写成“上海时间 04:50”。无法可靠转换时保留原始 ISO 并标注 UTC,披露尚未转换,不能伪造本地时刻。
|
|
23
|
+
|
|
24
|
+
## 证据和完整性
|
|
25
|
+
|
|
26
|
+
核对 `fetchedCount`、`truncated`、`consistency`、`collectedAt`;显式集合再核对 `requestedCount` 和 `unreadable`。字段缺失停止生成全量结论。CLI 自动分页最多每链 100 页/10000 项,异常和上限会标记截断;不能换成单页 list 冒充完整采集。
|
|
27
|
+
|
|
28
|
+
- `thing` 是当前状态,`entries` 是时间窗内记录,`baseline` 是利用完整业务变更记录倒推的窗口前状态;没有基线或采集发生版本变化时不要补造。
|
|
29
|
+
- `lastEffectiveRecordBeforeWindow` 供定位窗口前证据。当前状态不等于周期内变化,周期末状态也不能直接用当前状态代替。
|
|
30
|
+
- 输出前比较 `collectedAt` 与窗口 `to`。当 `collectedAt < to`(包括用户指定尚未结束的完整自然周)时,报告必须注明“截至采集时刻的阶段汇总,周期尚未结束”;三态统计标为“采集时状态”,禁止写“周期末状态”或“无后续更新”。例:9月10日采集9月7日至14日的周报,不能断言9月14日状态与当前相同。即使窗口已经结束,也只有完整的窗口后变更证据支持时才能还原周期末状态。
|
|
31
|
+
- open/paused/done 分别统计,归档另列;最新进展来自 thing.latestProgress,历史变化读取 progress/status 记录。
|
|
32
|
+
- 备注和重复过程描述不算有效进展;`effectiveProgressCount` 是待核查候选,正文没有新信息时排除。
|
|
33
|
+
- 没有记录只能说“未记录更新”。此约束同样适用于摘要和下一步建议;open 不能证明尚未开始,只能报告当前状态和未记录事实。附件未读、不可读取、截断及多次请求的非事务采集边界必须披露。`changed_during_collection` 时先重读;仍有变化则保留限制,不声称静态全量。
|
|
34
|
+
|
|
35
|
+
## 输出与写回
|
|
36
|
+
|
|
37
|
+
先写范围、时间窗、采集时间及覆盖边界,再给三态和归档统计、周期变化、阻塞、下一步。每个重要判断附事项来源和日期,区分事实、推断与建议。不默认展示内部记录 ID。
|
|
38
|
+
|
|
39
|
+
默认只输出到会话。明确要求写回时:用 `+detail` 完整读取目标事项的报告记录,检查同范围同周期标题,再用 `ae-cli things entry append --id <target-id> --type note --title "事项周报|起止日期|范围" --stdin --command-id <uuid> --format json` 写入最终正文。建议标题为 `事项周报|起止日期|范围`(日报同理)。已有同范围同周期报告时提示修订,不静默覆盖或重复追加;用户明确要求追加修订后才写新记录,保留原报告。写回已授权无需再问同一许可。
|
|
40
|
+
|
|
41
|
+
不自动发送消息、修改状态、指派负责人或建立定时任务。
|
|
42
|
+
|
|
43
|
+
文件证据:+detail/+digest 自动翻页收集资产关联,availability=missing 或 verification_failed 的文件不算可用交付;即使 available,也只代表引用可用,不代表已读取正文或验收通过。披露未读文件及非事务采集边界。私有会话来源只在当前用户有权时读取,报告引用共享事项事实,不能把私有历史自动公开。
|