@thinkingai/ae-cli 6.0.46 → 6.0.48-customer.1
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 +2 -0
- package/README.zh.md +6 -0
- package/dist/{auth-ROB2EDYV.js → auth-QPEVVBKT.js} +13 -7
- package/dist/auth-UMJAA72O.js +15 -0
- package/dist/{capability-GQ47BCFI.js → capability-RUSV77CO.js} +11 -10
- package/dist/{chunk-UW5UN47B.js → chunk-533JK3YX.js} +2 -0
- package/dist/{chunk-4XXOWOTA.js → chunk-6QK7SYYY.js} +5 -4
- package/dist/{chunk-TUKQZTMI.js → chunk-7K24F7T2.js} +2 -0
- package/dist/{chunk-OO6XR6LK.js → chunk-AMBFK2K3.js} +2 -0
- package/dist/{sync-HKIOZXQE.js → chunk-B5HMQAOM.js} +31 -540
- package/dist/chunk-BE73PUFX.js +25216 -0
- package/dist/{chunk-DQRPU6EE.js → chunk-BVDST5YT.js} +5 -4
- package/dist/{chunk-VTWMIC5L.js → chunk-E2JKXMVO.js} +2 -0
- package/dist/{chunk-JHENBQ5B.js → chunk-FR2EDAQM.js} +1 -0
- package/dist/{chunk-ZQ47LWTI.js → chunk-GJXRF7Y6.js} +6 -5
- package/dist/{chunk-DWO43OIB.js → chunk-JQ3ENZZH.js} +2 -0
- package/dist/chunk-JYMGHGCE.js +191 -0
- package/dist/{chunk-BYYS3ANB.js → chunk-KEWVSO64.js} +5 -4
- package/dist/{chunk-3FY3RJ26.js → chunk-KZ6ZHF5J.js} +2 -1
- package/dist/{chunk-2MN54X6H.js → chunk-NSIVXKJH.js} +4 -3
- package/dist/{chunk-ZQKDZXDO.js → chunk-O6K2ODUE.js} +3 -2
- package/dist/{chunk-J2DEBMRF.js → chunk-RWXIXOZG.js} +22 -9
- package/dist/{chunk-4NN5IWVN.js → chunk-T6OSFQZD.js} +2 -0
- package/dist/{chunk-3KWQYGYI.js → chunk-TKHSULJT.js} +2 -0
- package/dist/{chunk-6EIJSNBD.js → chunk-Y74WTIKJ.js} +2 -0
- package/dist/{client-L2YDMHQ6.js → client-N7NGZUNI.js} +4 -3
- package/dist/{community-report-client-C7WDGET3.js → community-report-client-6OL6GBQW.js} +3 -2
- package/dist/{config-BMYZX2UE.js → config-XNMACCKX.js} +8 -7
- package/dist/{data-integration-QEKDWQDY.js → data-integration-FZQQC3KW.js} +923 -98
- package/dist/index.js +36 -34
- package/dist/{local-data-upload-client-4YYHSYD6.js → local-data-upload-client-EFHDLXFG.js} +3 -2
- package/dist/{memory-3ORCR7JH.js → memory-HBJQ2GC5.js} +8 -7
- package/dist/{metadata-A6QLH3IS.js → metadata-PGDJE5RQ.js} +12 -11
- package/dist/{model-UGRDX4MW.js → model-BHLJ2QMT.js} +10 -9
- package/dist/{personal-semantic-preference-QZFAJWGE.js → personal-semantic-preference-E5NZ56DN.js} +11 -10
- package/dist/sync-MUWPRM5I.js +522 -0
- package/dist/{te-agent-BR6VDBNX.js → te-agent-WQZTMEK4.js} +10 -9
- package/dist/{te-analysis-MUKUXJL4.js → te-analysis-YWCSSLYL.js} +107 -20
- package/dist/{te-community-ISDQWJU7.js → te-community-BNE6KREL.js} +8 -7
- package/dist/{te-dataops-6P5IKWNJ.js → te-dataops-TXLKM2W6.js} +467 -67
- package/dist/{te-engage-ELA3C5BM.js → te-engage-VEW4CJHK.js} +26 -10
- package/dist/{te-kb-RCLSSH2Q.js → te-kb-BUD6N3NI.js} +311 -24
- package/dist/{te-system-FXITO2JG.js → te-system-44LZJDTQ.js} +573 -37
- package/dist/{te-team-ADOC2ROP.js → te-team-XMP47YXE.js} +10 -7
- package/dist/{update-YCYCKJOO.js → update-UODFOZ4P.js} +7 -6
- package/package.json +18 -9
- package/skills/ae-analysis/references/analysis_gateway_assets.md +1 -1
- package/skills/ae-analysis/references/audience_models.md +18 -0
- package/skills/ae-analysis/references/command_index.md +2 -2
- package/skills/ae-analysis/references/project_timezone_update.md +13 -4
- package/skills/ae-analysis/references/property_create.md +2 -0
- package/skills/ae-analysis/references/super_metadata_batch_create.md +2 -0
- package/skills/ae-analysis/references/user_cluster_models.md +2 -0
- package/skills/ae-analysis/references/user_cluster_update.md +8 -4
- package/skills/ae-analysis/references/user_tag_create.md +7 -1
- package/skills/ae-analysis/references/user_tag_models.md +8 -2
- package/skills/ae-data-integration/SKILL.md +1 -0
- package/skills/ae-data-integration/references/error-handling.md +54 -1
- package/skills/ae-data-integration/references/source-inspect.md +18 -2
- package/skills/ae-data-integration/references/tracking-plan.md +1 -1
- package/skills/ae-data-integration/references/transform.md +4 -2
- package/skills/ae-data-integration/references/ue-mapping.md +5 -2
- package/skills/ae-data-integration/references/ue-routing.md +23 -0
- package/skills/ae-dataops/SKILL.md +11 -1
- package/skills/ae-dataops/references/dataops-backfill.md +135 -0
- package/skills/ae-engage/SKILL.md +3 -0
- package/skills/ae-engage/references/build-task-save-guide.md +5 -1
- package/skills/ae-engage/references/save-task.md +6 -0
- package/skills/ae-generate-tracking-plan/SKILL.md +9 -8
- package/skills/ae-generate-tracking-plan/references/business-dimension-mapping.md +1 -1
- package/skills/ae-kb/SKILL.md +120 -9
- package/skills/ae-system/SKILL.md +28 -30
- package/skills/ae-system/references/channel-management.md +303 -0
- package/dist/auth-GBMV6TEJ.js +0 -14
- package/dist/capability-IINANQJA.js +0 -349
- package/dist/chunk-GJLGIMAO.js +0 -556
- package/dist/chunk-OMPRXM3V.js +0 -349
- package/dist/chunk-QNOLN2LJ.js +0 -509
- package/dist/chunk-RJDU7NYP.js +0 -1198
- package/dist/chunk-RNAALWJK.js +0 -98
- package/dist/chunk-SERWF6G5.js +0 -13
- package/dist/chunk-XNVMVIUI.js +0 -71
- package/dist/memory-I2WXDTV2.js +0 -893
- package/dist/metadata-HC7GBTTD.js +0 -339
- package/dist/model-HLHIEFMU.js +0 -139
- package/dist/personal-semantic-preference-YXAZBFVW.js +0 -239
- package/dist/sync-TFHU2UTG.js +0 -10261
- package/dist/te-agent-VLYOV7S4.js +0 -3894
- package/dist/te-analysis-JECYCV6K.js +0 -9357
- package/dist/te-community-5DMNKJWY.js +0 -1859
- package/dist/te-dataops-CVULXNVB.js +0 -2209
- package/dist/te-engage-MC5IQZIU.js +0 -4898
- package/dist/te-system-K2GYMCTB.js +0 -2213
|
@@ -66,12 +66,14 @@ Each mapped system field carries a value spec, enforced at both inspect (warning
|
|
|
66
66
|
| Field | Value spec | On violation (convert) |
|
|
67
67
|
| --- | --- | --- |
|
|
68
68
|
| `#account_id` / `#distinct_id` | Non-empty string, at most 128 characters | Row error `MISSING_USER_ID` (absent) / `USER_ID_TOO_LONG` (>128) |
|
|
69
|
-
| `#event_name` | `^[
|
|
69
|
+
| `#event_name` | `^[A-Za-z][A-Za-z0-9_]{0,49}$` (letter-leading letters/digits/underscore, ≤50 chars; lowercase by default, uppercase kept only on user request) | Row error `INVALID_EVENT_NAME` |
|
|
70
70
|
| `#time` | One of the supported formats, within 3 years back / 3 days forward | Row error `INVALID_TIME` / `TIME_OUT_OF_RANGE` |
|
|
71
71
|
| `#ip` | Valid IPv4 or IPv6. Event data only | Field skip `INVALID_IP`; a private/LAN IP is kept and reported — AE cannot geolocate it |
|
|
72
72
|
| `#zone_offset` | Integer -12..14 (or an IANA name for `zone_offset_value`). Event data only | Row error `INVALID_ZONE_OFFSET` |
|
|
73
73
|
| `#uuid` | Standard 36-character UUID (`xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`). Both data kinds | Field skip `INVALID_UUID` |
|
|
74
74
|
|
|
75
|
+
Event-name case is decided entirely by the mapping, never by the CLI — the CLI performs no case conversion and has no flag for it. The name AE receives is the source `event_name_field` value (or `default_event_name` when there is no event column), optionally replaced by a `value_mapping.event_name` target; `data-integration plan --event-name` passes each name through unchanged. Lowercase is the default: lowercase the name when writing the mapping (a `value_mapping.event_name` entry such as `Purchase` → `purchase`, or a lowercase `default_event_name`). To keep uppercase, skip that lowercasing: leave a legal uppercase source value unmapped so it passes through, write an uppercase `value_mapping.event_name` target only when the source value is not itself a legal name (e.g. `购买` → `Purchase`), or write an uppercase `default_event_name` / `--event-name`.
|
|
76
|
+
|
|
75
77
|
A field skip is not a row failure: the row is kept with its other fields, and the count is reported in `manifest.output.skipped_fields` so the agent tells the user at the end. `#uuid` is never auto-generated — it comes only from a mapped source column.
|
|
76
78
|
|
|
77
79
|
Mapping keys: `account_id_field`, `distinct_id_field`, `time.field`, `event_name_field` (or a reviewed `default_event_name`), `ip_field`, `uuid_field`. Inspect surfaces every identity-shaped column in `identity_candidates` (name, `account`/`distinct` kind, unique and missing ratios) so the agent can present all candidates for confirmation. When the required identity column is absent, use an explicit `account_id_value`/`distinct_id_value` placeholder or `random_pool` — a user decision, never invented.
|
|
@@ -147,7 +149,8 @@ Values with an explicit offset or `Z` are parsed by the JavaScript `Date` constr
|
|
|
147
149
|
- Identity values remain strings and are at most 128 characters.
|
|
148
150
|
- Source timezone is an IANA name derived from user/project context.
|
|
149
151
|
- `#zone_offset`, when set, is a whole-hour integer in -12..14 (or an IANA name/column that resolves to one) and is emitted inside `properties`, never at the top level.
|
|
150
|
-
- Event
|
|
152
|
+
- Event names begin with a letter and are at most 50 characters; lowercase is the default, uppercase is kept only when the user asks to preserve it.
|
|
153
|
+
- Property names are lowercase snake_case (letter-leading, at most 50 characters).
|
|
151
154
|
- Target property names are unique and do not collide with UE system fields.
|
|
152
155
|
- Types are one of `string`, `number`, `boolean`, `datetime`, `list`, `object`, or `array_row`.
|
|
153
156
|
- Text is at most 2 KB; numbers stay within -9E15..9E15.
|
|
@@ -22,6 +22,28 @@ Classification order:
|
|
|
22
22
|
|
|
23
23
|
Aggregated metrics, pivot tables, cross-tabs, model outputs, free-form documents, and records without real identity/time should normally use local analysis.
|
|
24
24
|
|
|
25
|
+
### Time coverage is not native granularity
|
|
26
|
+
|
|
27
|
+
A parseable time column establishes only when the rows are stamped, not what period each metric
|
|
28
|
+
covers. A daily report and a cumulative snapshot both look like one row per user per point in time,
|
|
29
|
+
so they satisfy every condition above and are then ingested as per-period events — inflating totals
|
|
30
|
+
in a way that stays invisible in ratios, because numerator and denominator scale together.
|
|
31
|
+
|
|
32
|
+
Native granularity must come from the user, a data dictionary, or a complete period structure in the
|
|
33
|
+
data itself. Do not infer it from the file name, the first/last date, the interval between rows, or
|
|
34
|
+
the row count; none of those is evidence.
|
|
35
|
+
|
|
36
|
+
When the data carries numeric columns and any of the following holds, ask the user to state whether
|
|
37
|
+
each row's value is the amount that occurred in that period or the total accumulated up to that
|
|
38
|
+
point, and do not proceed until they answer:
|
|
39
|
+
|
|
40
|
+
- Paired start/end time columns (`start_date`/`end_date`, `period_begin`/`period_end`).
|
|
41
|
+
- Values for one identity that never decrease over time.
|
|
42
|
+
- Column names carrying a to-date sense (`cumulative`, `total`, `ltv`, `累计`, `总`).
|
|
43
|
+
|
|
44
|
+
An unanswered question, a cumulative snapshot, or overlapping periods route to local analysis
|
|
45
|
+
instead.
|
|
46
|
+
|
|
25
47
|
## Route to local analysis
|
|
26
48
|
|
|
27
49
|
Choose local analysis when:
|
|
@@ -29,6 +51,7 @@ Choose local analysis when:
|
|
|
29
51
|
- The user wants insights, not project ingestion.
|
|
30
52
|
- UE identity or time prerequisites are missing.
|
|
31
53
|
- Each row is an aggregate rather than a user/event record.
|
|
54
|
+
- The rows are a cumulative snapshot, or their native granularity could not be established.
|
|
32
55
|
- Conversion would invent semantics or discard important structure.
|
|
33
56
|
- The user declines an uncertain mapping or destination.
|
|
34
57
|
|
|
@@ -20,6 +20,7 @@ The AE Data Development and Operations domain provides capabilities for data war
|
|
|
20
20
|
| `dataops_flow` | Flow creation, node deletion, and orchestration | `dataops-flow-create` |
|
|
21
21
|
| `dataops_flow` | Flow execution and monitoring | `dataops-flow-monitor` |
|
|
22
22
|
| `dataops_operations` | Operations instance search, details, and task logs | `dataops-flow-monitor` |
|
|
23
|
+
| `dataops_operations` | Backfill job creation, full draft update, deletion, execution, plans, stop, and rerun | `dataops-backfill` |
|
|
23
24
|
| `dataops_ide` | Data exploration and SQL queries | `dataops-query` |
|
|
24
25
|
| `dataops_integration` | Datasource and data integration | `dataops-integration` |
|
|
25
26
|
|
|
@@ -63,6 +64,7 @@ You must understand the following key concepts before use, otherwise errors are
|
|
|
63
64
|
|----|--------|-------------|
|
|
64
65
|
| **executeId** | Returned by `dataops_flow +execute_flow` | Early stop handle before the scheduler `flowInstanceId` is available |
|
|
65
66
|
| **flowInstanceId** | Returned by `dataops_operations +search_flow_instances` | Operations perspective instance inspection and stop |
|
|
67
|
+
| **jobId** | Returned by `dataops_operations +create_backfill_job` or `+search_backfill_jobs` | Persistent backfill job detail and lifecycle actions |
|
|
66
68
|
|
|
67
69
|
### Environment and Defaults
|
|
68
70
|
|
|
@@ -73,6 +75,8 @@ You must understand the following key concepts before use, otherwise errors are
|
|
|
73
75
|
| `dataops_operations +get_flow_instance_detail` | Instance detail | Inspect one instance DAG and task statuses |
|
|
74
76
|
| `dataops_operations +get_task_instance_detail` | Task detail/logs | Inspect one task and include logs only when needed |
|
|
75
77
|
| `dataops_operations +stop_flow_instance` | Instance stop | Stop by exactly one of `executeId` or `flowInstanceId` |
|
|
78
|
+
| `dataops_operations +list_backfill_flows` | Backfill source discovery | Returns eligible PROD flows and whether ST is required |
|
|
79
|
+
| `dataops_operations +search_backfill_jobs` | Backfill job search | Filter persistent jobs and obtain `jobId` |
|
|
76
80
|
|
|
77
81
|
### Schema Naming Rules
|
|
78
82
|
|
|
@@ -92,6 +96,8 @@ You must understand the following key concepts before use, otherwise errors are
|
|
|
92
96
|
Create DEV Flow → Create/Update DEV SQL, Integration, Workflow Instance Check, or Task Instance Check Tasks → Configure Dependencies/Schedule → Preview Release → Release to PROD → PROD Manual Execution / Operations Troubleshooting
|
|
93
97
|
```
|
|
94
98
|
|
|
99
|
+
Backfill lifecycle: Discover eligible PROD flow → Create or fully update DRAFT job → Run explicitly → Search / inspect plans → Stop or rerun the complete job; delete only after target inspection
|
|
100
|
+
|
|
95
101
|
### CRON Format (6 fields)
|
|
96
102
|
|
|
97
103
|
`second minute hour day month weekday` — Note: one more "second" field than standard 5-field format.
|
|
@@ -115,6 +121,7 @@ Choose the appropriate scenario skill based on user intent to get complete step-
|
|
|
115
121
|
| Create flow, add or delete nodes, configure schedule, release | `dataops-flow-create` | create flow, new workflow, configure schedule, add task node, delete task node, release, cron, scheduled execution |
|
|
116
122
|
| View execution status, troubleshoot failures, view logs | `dataops-flow-monitor` | execute flow, running instance, monitor, logs, stop, DAG, troubleshoot |
|
|
117
123
|
| Search operation instances across a space | `dataops-flow-monitor` | operations instance, flow instance search, status statistics, owner statistics |
|
|
124
|
+
| Create or operate a persistent multi-date backfill job | `dataops-backfill` | backfill, fill historical data, base date range, backfill plans, stop backfill, rerun backfill |
|
|
118
125
|
| Create datasource, configure sync solution, execute sync | `dataops-integration` | datasource, sync, integration, field mapping, data ingestion, MySQL, ClickHouse, DatabricksJdbc |
|
|
119
126
|
| Browse metadata, search tables, execute SQL queries | `dataops-query` | query, SQL, data exploration, search tables, view table structure, IDE, catalog, select |
|
|
120
127
|
| Create tables and views | `dataops-table` | create table, table creation, view, data dictionary, table details, DDL |
|
|
@@ -155,13 +162,16 @@ Flow orchestration is divided into two scenario skills: **creation and configura
|
|
|
155
162
|
|
|
156
163
|
**Lifecycle: DEV configuration and preview → Release to PROD → PROD manual execution and operations troubleshooting**
|
|
157
164
|
|
|
158
|
-
Detailed creation/configuration commands live in [`references/dataops-flow-create.md`](references/dataops-flow-create.md). Detailed execution, monitoring, operation instance, task log, and stop commands live in [`references/dataops-flow-monitor.md`](references/dataops-flow-monitor.md).
|
|
165
|
+
Detailed creation/configuration commands live in [`references/dataops-flow-create.md`](references/dataops-flow-create.md). Detailed execution, monitoring, operation instance, task log, and stop commands live in [`references/dataops-flow-monitor.md`](references/dataops-flow-monitor.md). Persistent multi-date backfill jobs live in [`references/dataops-backfill.md`](references/dataops-backfill.md).
|
|
159
166
|
|
|
160
167
|
Key constraints:
|
|
161
168
|
- Create and update tasks in DEV, preview/release before PROD execution.
|
|
162
169
|
- Treat `+delete_task` as high-risk: verify the target with `+get_flow_overview`, preview with `--dry-run`, and use `--yes` only after explicit user confirmation. Deletion affects DEV; release the flow to apply it to PROD.
|
|
163
170
|
- `+execute_flow` always runs PROD; it returns `executeId` for early stop.
|
|
164
171
|
- Prefer `flowInstanceId` from operations search for stable inspection and troubleshooting.
|
|
172
|
+
- A backfill job is persistent and batches multiple base dates; do not emulate it by looping `+execute_flow`.
|
|
173
|
+
- Create and run backfill jobs as separate steps. `+rerun_backfill_job` reruns the complete job, not only failed plans.
|
|
174
|
+
- `+update_backfill_job` replaces a DRAFT job's complete configuration; inspect the job first and do not treat it as a partial patch. Treat `+delete_backfill_job` as high-risk and preview it with `--dry-run` before confirmation.
|
|
165
175
|
- Reference workspace parameters in task SQL as `${paramKey}`.
|
|
166
176
|
|
|
167
177
|
---
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dataops-backfill
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
description: "Backfill job lifecycle: discover eligible PROD flows, create or update drafts, delete jobs, run jobs, inspect plans, stop running jobs, and rerun complete jobs."
|
|
5
|
+
metadata:
|
|
6
|
+
requires:
|
|
7
|
+
bins: ["ae-cli"]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# DataOps Backfill Jobs
|
|
11
|
+
|
|
12
|
+
> **Prerequisites:** Read [`ae-dataops/SKILL.md`](../SKILL.md) for authentication, output, and safety rules.
|
|
13
|
+
|
|
14
|
+
A backfill job is a persistent operations object that runs one PROD task flow for multiple base dates. It is not a single manual flow execution and is not a retry of an existing failed flow instance.
|
|
15
|
+
|
|
16
|
+
## Lifecycle
|
|
17
|
+
|
|
18
|
+
### 1. Discover an eligible PROD flow
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
ae-cli dataops_operations +list_backfill_flows --spaceCode "${spaceCode}"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Use only a returned flow whose `completeDataInfo.canRun` is true. When `completeDataInfo.hasSt` is true, pass `--stTime` while creating the job.
|
|
25
|
+
|
|
26
|
+
### 2. Create a draft
|
|
27
|
+
|
|
28
|
+
Always pass the backfill date range. For manual selection, also pass `--completeDates`; every selected date must be inside that inclusive range.
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Range mode
|
|
32
|
+
ae-cli dataops_operations +create_backfill_job --spaceCode "${spaceCode}" \
|
|
33
|
+
--jobName "August backfill" --flowCode ${flowCode} \
|
|
34
|
+
--startDate "2026-08-01" --endDate "2026-08-07"
|
|
35
|
+
|
|
36
|
+
# Custom-date mode
|
|
37
|
+
ae-cli dataops_operations +create_backfill_job --spaceCode "${spaceCode}" \
|
|
38
|
+
--jobName "Selected dates" --flowCode ${flowCode} \
|
|
39
|
+
--startDate "2026-08-01" --endDate "2026-08-07" \
|
|
40
|
+
--completeDates '["2026-08-01","2026-08-03"]'
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Creation returns a `DRAFT` job and does not run it. Defaults are `jobType=TASK_ALL`, `failureStrategy=END`, `parallel=true`, `reverse=false`, `step=1`, and `unit=DAY`. For `TASK_ONLY`, `TASK_PRE`, or `TASK_POST`, also pass `--startNode`.
|
|
44
|
+
|
|
45
|
+
### 3. Update a draft when needed
|
|
46
|
+
|
|
47
|
+
Update is a complete replacement, not a partial patch. Inspect the DRAFT job first, then pass `--jobId`, `--jobName`, `--flowCode`, and the complete date and strategy configuration just as for creation. Updating does not run the job.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
ae-cli dataops_operations +update_backfill_job --spaceCode "${spaceCode}" \
|
|
51
|
+
--jobId ${jobId} --jobName "Revised August backfill" --flowCode ${flowCode} \
|
|
52
|
+
--startDate "2026-08-01" --endDate "2026-08-10" \
|
|
53
|
+
--failureStrategy END --parallel true --reverse false
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 4. Run the draft explicitly
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
ae-cli dataops_operations +run_backfill_job --spaceCode "${spaceCode}" \
|
|
60
|
+
--jobId ${jobId}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### 5. Search jobs and inspect plans
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
ae-cli dataops_operations +search_backfill_jobs --spaceCode "${spaceCode}" \
|
|
67
|
+
--status "RUNNING,FAIL,SUCCESS" --pageNum 1 --pageSize 20
|
|
68
|
+
|
|
69
|
+
ae-cli dataops_operations +get_backfill_job_detail --spaceCode "${spaceCode}" \
|
|
70
|
+
--jobId ${jobId}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Detail returns the job and its plans together. A draft has an empty plan list.
|
|
74
|
+
|
|
75
|
+
### 6. Stop, rerun, or delete
|
|
76
|
+
|
|
77
|
+
Stopping affects every unfinished plan in the running job. Inspect the job, preview the request, obtain explicit confirmation, and then pass `--yes`.
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
ae-cli dataops_operations +stop_backfill_job --spaceCode "${spaceCode}" \
|
|
81
|
+
--jobId ${jobId} --dry-run
|
|
82
|
+
# After explicit confirmation, execute the same target; the CLI prompts before dispatch.
|
|
83
|
+
ae-cli dataops_operations +stop_backfill_job --spaceCode "${spaceCode}" \
|
|
84
|
+
--jobId ${jobId}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Rerun applies to every plan only when the job is `FAIL` or `STOP`. A `SUCCESS` job cannot be rerun. Rerun reuses the same job and does not create a new backfill job. The CLI does not support rerunning only failed plans.
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
ae-cli dataops_operations +rerun_backfill_job --spaceCode "${spaceCode}" \
|
|
91
|
+
--jobId ${jobId} --dry-run
|
|
92
|
+
ae-cli dataops_operations +rerun_backfill_job --spaceCode "${spaceCode}" \
|
|
93
|
+
--jobId ${jobId}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Deletion is high-risk. The server accepts only supported `DRAFT`, `FAIL`, or `SUCCESS` jobs. Inspect the exact target and preview the scoped request before confirmation; the CLI sends only `spaceCode` and `jobId` and does not pre-query or guess state.
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
ae-cli dataops_operations +delete_backfill_job --spaceCode "${spaceCode}" \
|
|
100
|
+
--jobId ${jobId} --dry-run
|
|
101
|
+
ae-cli dataops_operations +delete_backfill_job --spaceCode "${spaceCode}" \
|
|
102
|
+
--jobId ${jobId}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Command Reference
|
|
106
|
+
|
|
107
|
+
| Command | Purpose | Flags |
|
|
108
|
+
|---|---|---|
|
|
109
|
+
| `+list_backfill_flows` | List eligible PROD flows | `--spaceCode` |
|
|
110
|
+
| `+create_backfill_job` | Create a draft | `--spaceCode` `--jobName` `--flowCode` `--startDate` `--endDate`; optional in-range `--completeDates`, scope, failure, parallel, order, and ST flags |
|
|
111
|
+
| `+update_backfill_job` | Replace a DRAFT job's complete configuration | `--spaceCode` `--jobId` `--jobName` `--flowCode` and the same complete configuration as create |
|
|
112
|
+
| `+delete_backfill_job` | Delete a supported job | `--spaceCode` `--jobId`; high-risk, requires confirmation or `--yes` |
|
|
113
|
+
| `+run_backfill_job` | Run a draft | `--spaceCode` `--jobId` |
|
|
114
|
+
| `+search_backfill_jobs` | Search jobs | `--spaceCode` plus optional keyword, date, type, status, owner, sort, and paging filters |
|
|
115
|
+
| `+get_backfill_job_detail` | Get job and plans | `--spaceCode` `--jobId` |
|
|
116
|
+
| `+stop_backfill_job` | Stop a running job | `--spaceCode` `--jobId`; high-risk, requires confirmation or `--yes` |
|
|
117
|
+
| `+rerun_backfill_job` | Rerun the complete job | `--spaceCode` `--jobId` |
|
|
118
|
+
|
|
119
|
+
Statuses are `DRAFT`, `RUNNING`, `STOP`, `FAIL`, `SUCCESS`, and `READY_STOP`. Range units are `DAY`, `WEEK`, and `MONTH`. Custom dates must be a non-empty JSON array of unique `yyyy-MM-dd` strings inside the configured date range.
|
|
120
|
+
|
|
121
|
+
## Transport Status
|
|
122
|
+
|
|
123
|
+
Transition status: transitional
|
|
124
|
+
|
|
125
|
+
Owning module: Gaia operations
|
|
126
|
+
|
|
127
|
+
Current transport: DataOps CLI REST
|
|
128
|
+
|
|
129
|
+
Covered tools: `operations_list_backfill_flows`, `operations_create_backfill_job`, `operations_update_backfill_job`, `operations_delete_backfill_job`, `operations_run_backfill_job`, `operations_search_backfill_jobs`, `operations_get_backfill_job_detail`, `operations_stop_backfill_job`, and `operations_rerun_backfill_job`
|
|
130
|
+
|
|
131
|
+
Gateway target: TBD after the DataOps operations Capability Gateway schema review
|
|
132
|
+
|
|
133
|
+
Review after: 2026-11-20
|
|
134
|
+
|
|
135
|
+
Exit condition: Migrate these commands after Gaia exposes equivalent capabilities and the command contract tests pass against the Capability Gateway transport.
|
|
@@ -585,6 +585,9 @@ For task draft creation or update, use this workflow:
|
|
|
585
585
|
and every-completion events use count/eq/1. Completion target and experiment main-goal event
|
|
586
586
|
filters must not use properties whose metadata `select_type` is `datetime`. Never construct
|
|
587
587
|
persisted QP fields.
|
|
588
|
+
Select the audience by delivery side: server-side channels allow custom (`1`) or existing (`2`)
|
|
589
|
+
and reject all users (`3`); `client_push` (`channelType=3`) allows custom (`1`) or all users (`3`)
|
|
590
|
+
and rejects existing (`2`). Do not infer audience support from `triggerType` alone.
|
|
588
591
|
4. `ae-cli engage-task task save --project-id <projectId> --req '{...}'`
|
|
589
592
|
5. `ae-cli engage-task task submit-approval --project-id <projectId> --task-id <taskId>`
|
|
590
593
|
|
|
@@ -36,12 +36,16 @@ compounds when reusing `definition_request`; flattening them changes audience se
|
|
|
36
36
|
For the second sequence step, omit `relative_to_first` or set it to `false`; use `true` only
|
|
37
37
|
from the third step onward when its window must be measured from step 1.
|
|
38
38
|
|
|
39
|
-
For existing-cluster audiences (`targetClusterType=2`), you may copy server-authored definitions via:
|
|
39
|
+
For server-side existing-cluster audiences (`targetClusterType=2`), you may copy server-authored definitions via:
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
42
|
ae-cli analysis user-cluster get --project-id <projectId> --cluster-names '["<cluster_name>"]'
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
+
Server-side channels allow custom (`1`) or existing (`2`) audiences and reject all users (`3`).
|
|
46
|
+
`client_push` (`channelType=3`) allows custom (`1`) or all users (`3`) and rejects existing (`2`).
|
|
47
|
+
Always pass `channelType` in `context` so the guide can validate this matrix.
|
|
48
|
+
|
|
45
49
|
4. Build the final grouped `save_task.req`.
|
|
46
50
|
5. Submit with `ae-cli engage-task task save --project-id <projectId> --req '{...}'`.
|
|
47
51
|
|
|
@@ -245,6 +245,12 @@ Use the guide to decide which audience shape applies:
|
|
|
245
245
|
- `targetClusterType=2`: existing cluster, requires `clusterKey`
|
|
246
246
|
- `targetClusterType=3`: all users, forbids `definitionRequest` and `clusterKey`
|
|
247
247
|
|
|
248
|
+
Audience availability depends on delivery side:
|
|
249
|
+
|
|
250
|
+
- Server-side channels support `targetClusterType=1` (custom) and `2` (existing), but not `3` (all users).
|
|
251
|
+
- `client_push` (`channelType=3`) supports `targetClusterType=1` (custom) and `3` (all users), but not `2` (existing).
|
|
252
|
+
- Determine the delivery side from the selected real channel; do not infer audience support from `triggerType` alone.
|
|
253
|
+
|
|
248
254
|
For a custom audience, pass the semantic definition directly. Do not create an intermediate
|
|
249
255
|
cluster or copy persisted QP.
|
|
250
256
|
|
|
@@ -79,7 +79,7 @@ Phase 0 → 1 → 2 → 3 → 4, do not skip steps.
|
|
|
79
79
|
> CLI messages, and auto-track/i18n-owned labels must come from `src/tracking/i18n` via `AE_LANG=<user_lang>` and `draft.meta.lang`.
|
|
80
80
|
> When a localized label is needed, inspect `src/tracking/i18n` and use the existing resource key/value; do not invent translations from the model.
|
|
81
81
|
> If template business text needs localization and the CLI/i18n resources do not provide it, preserve the imported text and ask the user before rewriting business semantics.
|
|
82
|
-
> Only identifier fields like `event_name`, `prop_name` remain in English snake_case
|
|
82
|
+
> Only identifier fields like `event_name`, `prop_name` remain in English. Property names are `snake_case`; event names are lowercase by default, uppercase only when the user asks to preserve it.
|
|
83
83
|
> This skill only cares about command behavior, not internal implementation.
|
|
84
84
|
|
|
85
85
|
---
|
|
@@ -210,7 +210,7 @@ Based on user selection, determine source material type and record to `meta.sour
|
|
|
210
210
|
| Severity | Examples | Handling | User Action |
|
|
211
211
|
|---|---|---|---|
|
|
212
212
|
| 🔧 **Minor** (auto-fixable) | `display_name` duplicate, `array_row` sub-property inconsistency, event name duplicate | `--fix` auto-fixes, writes to `draft.json`. Inform user of what was fixed. | None (informed) |
|
|
213
|
-
| ⚠️ **Medium** (needs confirmation) | snake_case violation, property name duplicate, invalid property type, nested property parent is not a composite type | List each issue with current value → suggested fix. User confirms item by item before writing to `draft.json`. | Confirm each fix |
|
|
213
|
+
| ⚠️ **Medium** (needs confirmation) | property name snake_case violation, property name duplicate, invalid property type, nested property parent is not a composite type | List each issue with current value → suggested fix. User confirms item by item before writing to `draft.json`. | Confirm each fix |
|
|
214
214
|
| 🛑 **Severe** | File cannot be parsed, or events array is empty after import | Reject. Tell user the specific issue. User fixes **original file** and re-imports. | Fix original file |
|
|
215
215
|
|
|
216
216
|
**Medium issue confirmation format**:
|
|
@@ -219,7 +219,7 @@ Based on user selection, determine source material type and record to `meta.sour
|
|
|
219
219
|
|
|
220
220
|
| # | Issue | Location | Current | Suggested |
|
|
221
221
|
|---|-------|----------|---------|------------|
|
|
222
|
-
| 1 | snake_case | event_name | UserLogin | user_login |
|
|
222
|
+
| 1 | snake_case | event_name | UserLogin | user_login (keep UserLogin only if the user asked to preserve case) |
|
|
223
223
|
| 2 | snake_case | prop_name | vipLevel | vip_level |
|
|
224
224
|
| 3 | invalid type | property "level" | integer | number |
|
|
225
225
|
|
|
@@ -242,7 +242,7 @@ Based on user selection, determine source material type and record to `meta.sour
|
|
|
242
242
|
- **Events**: Player interaction actions (click/swipe/trigger), scene transitions, game state changes (start/pause/end), business flow nodes (purchase/upgrade/unlock)
|
|
243
243
|
- **Event Properties**: Action parameters (bullet type/enemy level/item ID), state values (score/HP/coins), context (level ID/difficulty/mode)
|
|
244
244
|
- **User Properties**: Persistent state (level/experience/VIP/cumulative spend)
|
|
245
|
-
5. Map extracted results to AE naming conventions (
|
|
245
|
+
5. Map extracted results to AE naming conventions (event names lowercase by default, uppercase only on request; property names `snake_case`; + `display_name` in user's language)
|
|
246
246
|
6. Confirm extracted results with user, supplement missing items
|
|
247
247
|
|
|
248
248
|
**Business Dimension Confirmation**:
|
|
@@ -386,7 +386,7 @@ When the user selects the **Data sample / file profile** option (`source_type =
|
|
|
386
386
|
3. **Column → property mapping draft**:
|
|
387
387
|
- Identify system columns first: time field, `distinct_id` / `account_id`, event-name column, user-property-name column.
|
|
388
388
|
- Map the remaining columns to event properties / user properties / super properties.
|
|
389
|
-
- Naming: `snake_case`
|
|
389
|
+
- Naming: `snake_case` property names, event names lowercase by default (uppercase only on request) + `display_name` + `desc` + `event_tag` (language follows the user's input).
|
|
390
390
|
- Type inference: CSV columns default to `string`; infer `number` / `bool` / `datetime` / enum from field name + value distribution + business doc/prompt priors. **Uncertain or conflicting columns are marked "to-confirm" and asked only inside the gate** (do not ask column-by-column beforehand).
|
|
391
391
|
4. **Single confirmation gate** (replaces Phase 2, see below).
|
|
392
392
|
5. **Merge with existing plan** (reuse Phase 4.1/4.2 conflict detection).
|
|
@@ -656,7 +656,7 @@ Draft
|
|
|
656
656
|
**Property types** (enum): `string` / `number` / `bool` / `datetime` /
|
|
657
657
|
`object` (single object, with sub-properties) / `array_row` (object array, supports `parent.child` nesting) / `array_string` (string array)
|
|
658
658
|
|
|
659
|
-
**Naming rules**:
|
|
659
|
+
**Naming rules**: Property names must be `snake_case`; event names are lowercase by default, and uppercase is kept only when the user asks to preserve it. Use `display_name` for human-readable names.
|
|
660
660
|
|
|
661
661
|
### 1.2 Merge Source Materials
|
|
662
662
|
|
|
@@ -817,7 +817,8 @@ AE_LANG=<user_lang> ae-cli tracking plan draft --in .ae-cli/draft.json --out .ae
|
|
|
817
817
|
|---|---|---|
|
|
818
818
|
| Display name uniqueness | Within same property pool, `display_name` must not repeat | ✅ Add distinguishing prefix |
|
|
819
819
|
| Object array consistency | Same `array_row` across different events must have identical sub-properties | ✅ Fill missing sub-properties |
|
|
820
|
-
| snake_case |
|
|
820
|
+
| Property name snake_case | Property names must match `^[a-z][a-z0-9_]*$` | ❌ Manual fix needed |
|
|
821
|
+
| Event name format | Event names match `^[A-Za-z][A-Za-z0-9_]*$`; lowercase by default, uppercase kept on request | ❌ Manual fix needed |
|
|
821
822
|
| Property name uniqueness | Property names must not repeat | ❌ Manual fix needed |
|
|
822
823
|
| Event name uniqueness | Event names must not repeat | ✅ Remove later duplicates |
|
|
823
824
|
|
|
@@ -1255,7 +1256,7 @@ Continue append (without fixing) / Modify draft / Switch to replace?
|
|
|
1255
1256
|
|
|
1256
1257
|
#### Conflict Type B: Same-name events (advisory)
|
|
1257
1258
|
|
|
1258
|
-
AE merge-by-name: Same-name events are not overwritten; new-name events are added.
|
|
1259
|
+
AE merge-by-name: Same-name events are not overwritten; new-name events are added. Event names are case-sensitive (`Purchase` ≠ `purchase`) — changing only the case creates a new event, not a rename.
|
|
1259
1260
|
|
|
1260
1261
|
**Detection logic**:
|
|
1261
1262
|
|
package/skills/ae-kb/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ae-kb
|
|
3
3
|
version: 1.0.0
|
|
4
|
-
description:
|
|
4
|
+
description: 'AE/TE knowledge base CLI manual for creating, importing read-only compiled snapshots, querying, LLM-powered ask, listing accessible knowledge bases and their sources, deterministic index/grep/read retrieval, checking status, uploading, compiling, schema generation, URL sources, source deletion, and knowledge base deletion. Use when the user asks to manage TE/AE/ThinkingEngine knowledge bases, import a compiled Markdown ZIP snapshot, upload documents or URLs to a knowledge base, query knowledge, ask knowledge bases with an LLM, list accessible knowledge bases or source metadata, inspect knowledge base indexes, search knowledge base pages, read a specific knowledge base page, check knowledge base status, generate schemas, compile knowledge, remove sources, or delete a knowledge base. To choose which knowledge base is worth searching, use the ae-kb-discovery skill first; this skill runs the retrieval once a target is chosen. Must use ae-cli kb commands and must not guess knowledge base names, scopes, page paths, source IDs, source display names, JSON payload shapes, or URL formats.'
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# ae-kb
|
|
@@ -14,11 +14,11 @@ ae-cli kb +<command> [options]
|
|
|
14
14
|
|
|
15
15
|
## Global Rules
|
|
16
16
|
|
|
17
|
-
- Use this skill for TE/AE knowledge base tasks: create, query, ask with LLM, list accessible knowledge bases, inspect indexes, grep pages, read pages, check status, upload sources, add URL sources, generate schema, compile, remove source files, and delete knowledge bases.
|
|
17
|
+
- Use this skill for TE/AE knowledge base tasks: create, import a compiled snapshot, query, ask with LLM, list accessible knowledge bases and their sources, inspect indexes, grep pages, read pages, check status, upload sources, add URL sources, generate schema, compile, remove source files, and delete knowledge bases.
|
|
18
18
|
- **Searching a knowledge base for an answer is the most common task. If that is what you are doing, go straight to [Explore Knowledge Base Pages](#explore-knowledge-base-pages) and read [`references/query-workflow.md`](references/query-workflow.md) first — it is the retrieval procedure. The other commands below are for managing knowledge bases, not answering from them.**
|
|
19
19
|
- Read operations can run directly after required inputs are known. Write operations require explicit user intent and normally keep the confirmation prompt unless the user asks to bypass it.
|
|
20
20
|
- Prefer `--dry-run` before destructive or broad writes when the user has not already validated the target.
|
|
21
|
-
- Do not invent knowledge base names, scopes, source display names, or JSON payloads. Ask the user or query known context when values are missing.
|
|
21
|
+
- Do not invent knowledge base names, scopes, source IDs, source display names, or JSON payloads. Ask the user or query known context when values are missing.
|
|
22
22
|
- When building a `--sources` ref (or `+read --source`), copy the exact `scope` and `name` from `+list` output — run `ae-cli kb +list` first when the scope of a named knowledge base is unknown.
|
|
23
23
|
- JSON flags must be valid JSON strings, usually wrapped in single quotes in shell commands.
|
|
24
24
|
- Successful commands return JSON by default. Use `--format table` only when a table is easier for a human to scan. Envelope may include optional `_notice.host_compat`.
|
|
@@ -33,16 +33,19 @@ ae-cli kb +<command> [options]
|
|
|
33
33
|
| `+ask` | read | LLM-powered Q&A over knowledge bases; for multi-page synthesis or multi-hop questions. |
|
|
34
34
|
| `+ask-status` | read | Query the current status of an ask execution by `--execution-id` without polling. |
|
|
35
35
|
| `+list` | read | List accessible knowledge bases filtered by buildStatus (default: compiled). |
|
|
36
|
+
| `+list-sources` | read | List source metadata for one knowledge base so exact source identifiers can be discovered safely. |
|
|
36
37
|
| `+index` | read | List accessible knowledge bases and their `index.md` navigation maps. |
|
|
37
38
|
| `+grep` | read | Keyword-search knowledge base pages and return matched lines with context. |
|
|
38
39
|
| `+read` | read | Read a full knowledge base page, a line window, or (with `--outline`) only the page heading tree. |
|
|
39
40
|
| `+new` | write | Create a new personal or company knowledge base. |
|
|
41
|
+
| `+import` | write | Import a compiled Markdown ZIP as a personal read-only snapshot. |
|
|
42
|
+
| `+import-status` | read | Query one snapshot import task by `--request-id` without polling. |
|
|
40
43
|
| `+add` | write | Upload local files, a non-recursive directory, or HTTP(S) pages converted to markdown. |
|
|
41
44
|
| `+url` | write | Upload a URL source directly with optional display name and parsing instruction. |
|
|
42
45
|
| `+schema` | write | Generate the compile schema for a knowledge base. |
|
|
43
46
|
| `+compile` | write | Compile a knowledge base in incremental or full mode. |
|
|
44
47
|
| `+status` | read | Query the current status of a knowledge base. |
|
|
45
|
-
| `+rm-source` | write | Delete one source
|
|
48
|
+
| `+rm-source` | high-risk-write | Delete one source from a knowledge base by stable ID; exact display name is legacy compatibility only. |
|
|
46
49
|
| `+remove` | write | Delete an entire knowledge base. |
|
|
47
50
|
|
|
48
51
|
## Common Workflows
|
|
@@ -67,6 +70,36 @@ Optional fields:
|
|
|
67
70
|
- `--project-id`: optional project ID to bind.
|
|
68
71
|
- `--project-name`: optional project display name.
|
|
69
72
|
|
|
73
|
+
### Import a Compiled Snapshot
|
|
74
|
+
|
|
75
|
+
Use `+import` only for a ZIP whose root contains `index.md` and at least one
|
|
76
|
+
`wiki/**/*.md` page. The server validates all archive paths, limits, UTF-8 text, and Wiki links.
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
ae-cli kb +import \
|
|
80
|
+
--file ./knowledge-base.zip \
|
|
81
|
+
--name "Imported handbook" \
|
|
82
|
+
--description "Compiled documentation snapshot" \
|
|
83
|
+
--tags '["docs","handbook"]'
|
|
84
|
+
|
|
85
|
+
# The submission returns requestId + queued. Query one snapshot later:
|
|
86
|
+
ae-cli kb +import-status --request-id <requestId>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
- The result is always a `personal` read-only snapshot; there is no `--scope`, `--force`, or replace option.
|
|
90
|
+
- Imported snapshots support list, Index/Wiki reading, grep/read, Ask, and deletion. They do not expose source, Schema, usage, compile, member, settings, ownership-transfer, or company-publish operations.
|
|
91
|
+
- The ZIP is limited to 50 MB and supports Markdown text only. Local images, attachments, other binaries, broken Wiki links, and ambiguous Wiki links are rejected by the server.
|
|
92
|
+
- Submission returns `{requestId, status: "queued"}` immediately. It does not wait for ZIP validation or publication.
|
|
93
|
+
- `+import-status` returns one of `queued`, `running`, `succeeded`, or `failed`; success includes `knowledgeBaseId`, and failure includes a stable error code/message.
|
|
94
|
+
- If a `requestId` was returned, query it before retrying. If no request ID was received, run `ae-cli kb +list` before retrying the same name. A repeated same-name import is rejected.
|
|
95
|
+
|
|
96
|
+
- Transition status: transitional
|
|
97
|
+
- Owning module: te-claude External Knowledge Base Import API
|
|
98
|
+
- Current transport: authenticated KB external REST through `kbUpload` for submission and `kbApi` for status lookup.
|
|
99
|
+
- Gateway target: TBD (`kb.snapshot.import` proposed)
|
|
100
|
+
- Review after: 2026-12-01
|
|
101
|
+
- Exit condition: migrate to a typed Gateway capability when the equivalent multipart import capability is available, or remove this command if dynamic Gateway execution provides the same file-handling and output contract.
|
|
102
|
+
|
|
70
103
|
### Upload Files or Directories
|
|
71
104
|
|
|
72
105
|
Use `+add` when sources are local files, local directories, or pages that should be fetched and converted to markdown before upload.
|
|
@@ -107,7 +140,17 @@ Generate the schema first when the knowledge base needs a compile schema.
|
|
|
107
140
|
ae-cli kb +schema --name engineering-handbook
|
|
108
141
|
```
|
|
109
142
|
|
|
110
|
-
Use `--force` only
|
|
143
|
+
Use `--force` only when `+status` reports `schema_generating` and the user explicitly wants to replace the current generation attempt. The replacement may consume additional tokens. Use `--model` only when the user provides the model display name.
|
|
144
|
+
|
|
145
|
+
To add one-time guidance for this generation without changing stored knowledge base metadata, pass `--custom-instructions`. The server trims the value, treats whitespace-only input as absent, and accepts up to 10,000 Unicode characters. Do not include secrets or credentials.
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
ae-cli kb +schema \
|
|
149
|
+
--name engineering-handbook \
|
|
150
|
+
--custom-instructions "Prioritize troubleshooting workflows and preserve command examples"
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Use `--dry-run` to inspect the request body before sending it. While generation is running, a request without `--force` is idempotent only when it supplies no new model or effective custom instructions; otherwise it fails with `KB_SCHEMA_GENERATION_IN_PROGRESS`. With `--force`, the selected model and custom instructions apply to the replacement attempt. Invalid text fails with `KB_SCHEMA_CUSTOM_INSTRUCTIONS_INVALID`.
|
|
111
154
|
|
|
112
155
|
Compile after sources and schema are ready:
|
|
113
156
|
|
|
@@ -213,9 +256,34 @@ ae-cli kb +read \
|
|
|
213
256
|
--limit 60
|
|
214
257
|
```
|
|
215
258
|
|
|
259
|
+
### List Sources
|
|
260
|
+
|
|
261
|
+
List sources first to discover the stable identifier for the intended source:
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
ae-cli kb +list-sources --name engineering-handbook
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Copy the exact `id` from the response into `+rm-source`. Do not guess a source ID from a local filename, URL, display name, or an older upload response.
|
|
268
|
+
|
|
269
|
+
- Transition status: transitional
|
|
270
|
+
- Owning module: te-claude External Knowledge Base Sources API
|
|
271
|
+
- Current transport: authenticated KB external REST through `kbApi`.
|
|
272
|
+
- Gateway target: TBD (`kb.source.list` proposed)
|
|
273
|
+
- Review after: 2026-12-03
|
|
274
|
+
- Exit condition: migrate to a typed Gateway capability when an equivalent source-list capability is available, or remove this command if dynamic Gateway execution provides the same discoverability and safe output contract.
|
|
275
|
+
|
|
216
276
|
### Remove One Source
|
|
217
277
|
|
|
218
|
-
Use `+rm-source`
|
|
278
|
+
Use `+rm-source --id` with the exact ID returned by the current `+list-sources` response. This is a `high-risk-write`; keep the interactive confirmation unless the user has explicitly authorized `--yes`.
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
ae-cli kb +rm-source \
|
|
282
|
+
--name engineering-handbook \
|
|
283
|
+
--id cm-source-id
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
`--display-name` is retained for legacy compatibility only when a stable source ID is unavailable:
|
|
219
287
|
|
|
220
288
|
```bash
|
|
221
289
|
ae-cli kb +rm-source \
|
|
@@ -223,7 +291,7 @@ ae-cli kb +rm-source \
|
|
|
223
291
|
--display-name kb-1780046712-guide.md
|
|
224
292
|
```
|
|
225
293
|
|
|
226
|
-
If the user only gives a loose source name, do not guess.
|
|
294
|
+
If the user only gives a loose source name, do not guess a source ID. Run `+list-sources`, identify the intended row from returned metadata, and ask only when multiple rows remain ambiguous.
|
|
227
295
|
|
|
228
296
|
### Delete a Knowledge Base
|
|
229
297
|
|
|
@@ -316,6 +384,30 @@ ae-cli kb +new --name "<name>" [--scope personal|company] [--description "..."]
|
|
|
316
384
|
ae-cli kb +add --name "<name>" --files '["./a.md","./docs","https://example.com/page"]'
|
|
317
385
|
```
|
|
318
386
|
|
|
387
|
+
### `+import`
|
|
388
|
+
|
|
389
|
+
```bash
|
|
390
|
+
ae-cli kb +import --file "./knowledge-base.zip" --name "<name>" [--description "..."] [--tags '["t1","t2"]'] [--project-id "..."]
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
- `--file`: required local `.zip` file.
|
|
394
|
+
- `--name`: required personal knowledge-base name, up to 30 characters.
|
|
395
|
+
- `--description`: optional, up to 200 characters.
|
|
396
|
+
- `--tags`: optional JSON array, max 2 unique tags, each up to 15 characters.
|
|
397
|
+
- `--project-id`: optional project binding.
|
|
398
|
+
- Scope and terminal build state are generated by the server and cannot be supplied by the client.
|
|
399
|
+
- Output: `{requestId, status: "queued"}`. Use `+import-status`; the command does not poll.
|
|
400
|
+
|
|
401
|
+
### `+import-status`
|
|
402
|
+
|
|
403
|
+
```bash
|
|
404
|
+
ae-cli kb +import-status --request-id <requestId>
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
- `--request-id`: required ID returned by `+import`.
|
|
408
|
+
- Output: `{requestId, status, knowledgeBaseId?, errorCode?, errorMessage?}`.
|
|
409
|
+
- Returns a single snapshot and does not poll. A failed import is returned as `status: "failed"` with its stable error code/message; an unknown or inaccessible request exits non-zero.
|
|
410
|
+
|
|
319
411
|
### `+url`
|
|
320
412
|
|
|
321
413
|
```bash
|
|
@@ -325,9 +417,14 @@ ae-cli kb +url --name "<name>" --url "https://example.com/page" [--display-name
|
|
|
325
417
|
### `+schema`
|
|
326
418
|
|
|
327
419
|
```bash
|
|
328
|
-
ae-cli kb +schema --name "<name>" [--force] [--model "<model displayName>"]
|
|
420
|
+
ae-cli kb +schema --name "<name>" [--force] [--model "<model displayName>"] [--custom-instructions "<one-time guidance>"]
|
|
329
421
|
```
|
|
330
422
|
|
|
423
|
+
- `--custom-instructions`: Optional per-run schema-generation guidance. It is not persisted; whitespace-only input is omitted. The server allows at most 10,000 Unicode characters and rejects disallowed control characters. Do not include secrets or credentials.
|
|
424
|
+
- `--force`: Replace the current attempt only when schema generation is already running and the user explicitly requests the replacement. The selected model and custom instructions apply to the new attempt, which may consume additional tokens.
|
|
425
|
+
- `--dry-run`: Shows the same `customInstructions` request field that execution will send.
|
|
426
|
+
- Errors: `KB_SCHEMA_CUSTOM_INSTRUCTIONS_INVALID` means the field failed validation. `KB_SCHEMA_GENERATION_IN_PROGRESS` means generation is active and a request without `--force` supplied a new model or effective custom instructions.
|
|
427
|
+
|
|
331
428
|
### `+compile`
|
|
332
429
|
|
|
333
430
|
```bash
|
|
@@ -340,12 +437,26 @@ ae-cli kb +compile --name "<name>" [--mode incremental|full]
|
|
|
340
437
|
ae-cli kb +status --name "<name>"
|
|
341
438
|
```
|
|
342
439
|
|
|
440
|
+
### `+list-sources`
|
|
441
|
+
|
|
442
|
+
```bash
|
|
443
|
+
ae-cli kb +list-sources --name "<name>"
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
- `--name`: required knowledge base name.
|
|
447
|
+
- Output: Safe source metadata including the stable `id` needed by `+rm-source`; raw paths, hashes, credentials, and source content are not returned.
|
|
448
|
+
- Copy the exact `id` from the current response before deleting a source; never guess it.
|
|
449
|
+
|
|
343
450
|
### `+rm-source`
|
|
344
451
|
|
|
345
452
|
```bash
|
|
346
|
-
ae-cli kb +rm-source --name "<name>" --
|
|
453
|
+
ae-cli kb +rm-source --name "<name>" --id "<source-id>"
|
|
347
454
|
```
|
|
348
455
|
|
|
456
|
+
- `--id`: preferred stable source identifier copied from `+list-sources`.
|
|
457
|
+
- `--display-name`: legacy compatibility selector used only when an ID is unavailable.
|
|
458
|
+
- If both are supplied, `--id` wins. The command removes one source only.
|
|
459
|
+
|
|
349
460
|
### `+remove`
|
|
350
461
|
|
|
351
462
|
```bash
|