@qoder-ai/qmind-cli 4.0.0 → 4.2.0

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/CHANGELOG.md CHANGED
@@ -4,6 +4,20 @@ English (default) | [简体中文](CHANGELOG.zh-CN.md)
4
4
 
5
5
  Published versions below describe the Global CLI/shared implementation, not historical CN releases. CN will join the shared history with the future joint release.
6
6
 
7
+ ## 4.2.0
8
+
9
+ ### Minor Changes
10
+
11
+ - 38beef0: Support non-interactive Qoder PAT login via `login --pat-stdin`, `login --pat`, and region/environment-specific PAT variables in `qmind` and `qmind-cn`. Persist validated credentials, reuse Job Tokens, and exchange again on expiry or HTTP 401. Add `login --no-browser` for manual browser authorization.
12
+
13
+ ## 4.1.0
14
+
15
+ ### Minor Changes
16
+
17
+ - 17bb94f: Add notebook discovery with summaries, single-page URL import, scheduled-task CRUD and pause/resume, bounded Source reads, directory filtering and batch deletion to `qmind-cn` and its Global counterpart. New workflows reuse Agent Core validation and confirmed/unknown mutation results. Existing notebook output retains overview and counts; deletion supports JSON/NDJSON receipts and stops on failed preflight.
18
+
19
+ Use `retrieve --unified` or `--targets` for unified single/multi-notebook retrieval with per-notebook Source filters; `--score-threshold` also works on the existing retrieval path. Use `source mkdir --derive-path` and `source mv --to/--to-root` for derived paths and validated destinations. Existing retrieval, full-content and low-level Source patch behavior remains available. Unconfirmed direct writes report `outcome_unknown` with `retryable:false`; inspect current state before another call.
20
+
7
21
  ## 4.0.0
8
22
 
9
23
  ### Major Changes
@@ -4,6 +4,20 @@
4
4
 
5
5
  以下已发布版本属于 Global CLI / 共享实现,不代表 CN 曾发布过这些版本。CN 将在后续共同发行版加入同一历史。
6
6
 
7
+ ## 4.2.0
8
+
9
+ ### Minor Changes
10
+
11
+ - 38beef0: 支持在 `qmind` 和 `qmind-cn` 中通过 `login --pat-stdin`、`login --pat` 及按地域、环境选择的 PAT 变量无交互登录。验证成功后保存凭据,复用 Job Token,并在过期或 HTTP 401 时重新交换。新增 `login --no-browser`,支持手动打开浏览器授权。
12
+
13
+ ## 4.1.0
14
+
15
+ ### Minor Changes
16
+
17
+ - 17bb94f: 为 `qmind-cn` 及对应 Global CLI 增加带摘要的知识库发现、单页 URL 导入、定时任务 CRUD 与暂停/恢复、有界 Source 正文读取、目录过滤和批量删除。新 workflow 复用 Agent Core 校验及确定/未知写入结果。既有知识库输出保留 overview 和数量;删除支持 JSON/NDJSON 回执,预读失败时停止。
18
+
19
+ 使用 `retrieve --unified` 或 `--targets` 进行统一单库/多库检索并按库过滤 Source;既有检索入口也支持 `--score-threshold`。使用 `source mkdir --derive-path` 和 `source mv --to/--to-root` 推导路径并校验目标。原检索、全文读取与低层 Source patch 行为继续保留。未确认的直接写入返回 `outcome_unknown` 和 `retryable:false`;再次操作前先查询当前状态。
20
+
7
21
  ## 4.0.0
8
22
 
9
23
  ### Major Changes
package/README.md CHANGED
@@ -54,6 +54,21 @@ qmind retrieve --nb <notebook-id> --format agent "What is the deployment process
54
54
 
55
55
  Do not put tokens in command arguments, repositories, or logs. Run `qmind logout` to remove the current local session.
56
56
 
57
+ ### Login without a browser or interactive terminal
58
+
59
+ Create a PAT on the [Qoder PAT management page](https://qoder.com/account/integrations), then sign in through standard input (`--non-interactive` is also supported):
60
+
61
+ ```sh
62
+ qmind login --pat-stdin < /path/to/pat-secret
63
+ qmind notebook list --non-interactive --format json
64
+ ```
65
+
66
+ Alternatively, inject `QODER_PROD_PAT` from your secret manager and run `qmind login --non-interactive`. `login --pat <token>` accepts an explicit PAT; prefer stdin or environment variables to keep secrets out of shell history and process arguments. PAT login exchanges a Job Token before saving the PAT, Job Token, and expiry in the current target's file vault. Later commands reuse the cached Job Token and exchange again on expiry or HTTP 401. Business requests use only the Job Token. `logout` removes the current target's local credentials without revoking the remote PAT.
67
+
68
+ For CI, inject a PAT and run commands directly without saving it to the vault. This product uses `QODER_PROD_PAT` for production and `QODER_TEST_PAT` for `--env test`, with `QODER_PERSONAL_ACCESS_TOKEN` as a fallback. Global `--env daily` uses only the generic variable. Dedicated PATs are never borrowed across regions or environments. Custom targets do not automatically read these PAT variables; explicitly use `--pat-stdin` or `--token`.
69
+
70
+ For browser login, `qmind login --no-browser` prints the authorization URL to open on another machine; it still requires an interactive terminal.
71
+
57
72
  ## Commands
58
73
 
59
74
  | Command | Purpose |
@@ -64,6 +79,7 @@ Do not put tokens in command arguments, repositories, or logs. Run `qmind logout
64
79
  | `retrieve` | Retrieve context without invoking an LLM |
65
80
  | `rag` | Ask questions using a knowledge base |
66
81
  | `task` | Manage task runs |
82
+ | `scheduled-task` | Manage notebook schedule configurations |
67
83
  | `upload-folder` / `sync` | Synchronize a local directory |
68
84
  | `image` | Obtain image upload or access URLs |
69
85
  | `version` | Print version and build information |
@@ -109,7 +125,7 @@ QMIND_DEBUG_TOKEN='<debug-token>' qmind notebook list --env test --non-interacti
109
125
  qmind login --sash http://localhost:8080 --dashboard http://localhost:3000
110
126
  ```
111
127
 
112
- Production token priority is `--token > QMIND_TOKEN > current production vault`. Debug token priority is `--token > QMIND_DEBUG_TOKEN > current debug vault`; credentials are never borrowed across targets.
128
+ Production token priority is `--token > QMIND_TOKEN > selected Qoder PAT variable > current production vault`. Debug token priority is `--token > QMIND_DEBUG_TOKEN > selected Qoder PAT variable > current debug vault`; credentials are never borrowed across targets.
113
129
 
114
130
  State is stored under `<state-root>/cli/global/<target>/`, where the state root is `QMIND_HOME` or `~/.qmind`. The CLI does not install, load, or access the OS Keyring. Credential files are plaintext JSON, not encrypted storage. On POSIX, partition directories use mode `0700` and files use `0600`; these modes do not represent Windows ACLs. Writes use atomic replacement, file locking, and compare-and-swap protection for refreshes.
115
131
 
@@ -128,3 +144,66 @@ qmind notebook get <notebook-id> --format json
128
144
  ```
129
145
 
130
146
  Both notebook collections support `--page` and `--page-size`. `--shared` cannot be combined with `--filter-client`. Shared results use the same flat `notebooks` output as the ordinary list and preserve the membership `permission`. JSON/NDJSON preserve server-provided `access` (current role, member count and action permissions); Agent output expands these fields. Table lists show role and member count, while details show action permissions. Missing permissions are not inferred and display as `unknown` in tables.
147
+
148
+ ## Commands aligned with Agent tools
149
+
150
+ Core-backed workflows (`notebook discover`, `source import-url/read/delete-batch`, `mkdir --derive-path`, `mv --to/--to-root`, unified retrieval, and `scheduled-task`) return `{ ok, data/error, meta }` after entering Agent Core, with `meta.operationId` identifying the operation. `--format ndjson` emits one complete result per line; `table` and `agent` also use this JSON result. CLI validation and host/credential failures before Core keep the existing CLI error format: `{ error }` on stdout for JSON/NDJSON, or text on stderr otherwise. Command usage errors and declined confirmations go to stderr. `source list --parent` keeps the existing Source-list output. Exit codes are 0 for success, 1 for partial success/runtime failure/cancellation, and 2 for invalid arguments. A successful write does not mean Source ingestion or a scheduled run has completed.
151
+
152
+ ```sh
153
+ # Select retrieval-eligible owned/shared notebooks; continue with nextCursor when hasMore is true
154
+ qmind notebook discover --relationship all --page-size 20
155
+ qmind notebook discover --relationship all --cursor '<nextCursor>'
156
+
157
+ # Import a single page; inspect ingestion and content with source get / source read
158
+ qmind source import-url --nb <notebook-id> --url https://example.com/guide
159
+ qmind source list --nb <notebook-id> --parent <directory-id>
160
+ qmind source read <source-id> --nb <notebook-id> --offset 0 --max-chars 20000
161
+
162
+ # Derive paths from the actual parent and preserve the original basename when moving
163
+ qmind source mkdir --nb <notebook-id> --title guides --parent <directory-id> --derive-path
164
+ qmind source mv <source-id> --nb <notebook-id> --to <directory-id>
165
+ qmind source mv <source-id> --nb <notebook-id> --to-root
166
+
167
+ # 1..100 distinct IDs; confirm interactively or explicitly pass --force
168
+ qmind source delete-batch <source-id-1> <source-id-2> --nb <notebook-id> --force
169
+ ```
170
+
171
+ `notebook list/get` JSON/NDJSON preserve the server's overview, sourceCount and materialCount. Agent output expands summary/topics; table lists include summaries and Source counts. `discover` supports owned/shared/all and cursors, defaults to all, and lists retrieval-eligible notebooks; use `list` for the management collection. An empty page may still have `hasMore:true`; continue with the same relationship.
172
+
173
+ `source read` checks ingestion status and returns `content/contentType/truncated/nextOffset`. It still fetches the entire body before slicing, so only output size is bounded. Existing `source content` full-text/download behavior is unchanged. `source list --parent` cannot be combined with `--all`.
174
+
175
+ `mkdir --derive-path` conflicts with `--path`. `mv --to/--to-root` conflicts with the legacy parent/path/rename/status options and only moves eligible leaf documents within one notebook, preserving the basename. Existing low-level mkdir/mv patch operations remain available.
176
+
177
+ Batch deletion returns the submitted sourceIds and successCount/failureCount; sourceIds is not a list of successfully deleted IDs. Partial failure exits 1. Reconcile current state before another call; do not guess failed IDs or replay the entire batch.
178
+
179
+ ## Precise and unified retrieval
180
+
181
+ Existing `retrieve --nb` defaults and output remain unchanged. Explicit `--unified` or `--targets` selects the same unified retrieval workflow used by Agent tools, including notebook identity in single-notebook chunks:
182
+
183
+ ```sh
184
+ qmind retrieve --nb <notebook-id> --unified --score-threshold 0.6 'Deployment process'
185
+ qmind retrieve --targets '[{"notebookId":"nb-1","sourceIds":["source-1"]},{"notebookId":"nb-2","sourceIds":["source-2"]}]' --max-results 8 'Deployment process'
186
+ ```
187
+
188
+ `--targets` conflicts with `--nb` and `--sources` and supports independent Source filters per notebook. Unified retrieval defaults to maxResults=8 (1..50), with optional topK (1..100); zero selects the workflow default. There may be at most five unique targets. Results use the envelope above: read `data.chunks/data.promptContext`. `--score-threshold` accepts 0..1 and also works on the existing retrieval path. Zero budgets on the existing path still use server defaults; scripts are not silently migrated.
189
+
190
+ ## Scheduled task configuration
191
+
192
+ ```sh
193
+ qmind scheduled-task create --nb <notebook-id> --scene source_refresh --schedule 'CRON_TZ=Asia/Shanghai 0 9 * * *'
194
+ qmind scheduled-task list --nb <notebook-id> --enabled true --page 1 --page-size 20
195
+ qmind scheduled-task update <task-id> --nb <notebook-id> --schedule 'CRON_TZ=Asia/Shanghai 0 10 * * *'
196
+ qmind scheduled-task pause <task-id> --nb <notebook-id>
197
+ qmind scheduled-task resume <task-id> --nb <notebook-id>
198
+ qmind scheduled-task delete <task-id> --nb <notebook-id>
199
+ ```
200
+
201
+ `update --enabled false/true` also pauses/resumes. Creation defaults to enabled with empty config; arbitrary prompt/config inputs are not accepted. Updates only change schedule or enabled. Scenes are compilation, condensation, lint, source_refresh and source_binding_sync; the server decides actual availability and full Cron validity. An explicit IANA timezone is required. Compilation may be retired; source_binding_sync is currently a per-notebook singleton with a minimum five-minute interval. `list` supports `--task/--scene/--enabled`, with pageSize at most 20; the backend still reads all configurations for the notebook. Oversized config is marked `configTruncated:true`.
202
+
203
+ Configuration is separate from execution: use `task list --scheduled-task <task-id>` for run history. Pausing/deleting does not cancel dispatched runs; resuming an overdue schedule may trigger a run immediately. Execution retains the original creator identity; revoking membership does not guarantee schedules stop automatically.
204
+
205
+ ## Unconfirmed writes
206
+
207
+ When a new command returns `error.code=outcome_unknown` and `retryable:false`, inspect current state before deciding what to do next; do not retry automatically. Existing direct-write commands also distinguish this state in JSON/NDJSON errors and retain the original causeCode/requestId. Unknown outcomes do not prove a request reached the server; a same-name resource does not prove this call created it.
208
+
209
+ `notebook delete` and `source delete` support JSON/NDJSON success receipts. Single-Source deletion stops if preflight cannot read the Source; only explicit `--force` skips directory confirmation. Default text output remains `deleted`.
package/README.zh-CN.md CHANGED
@@ -54,6 +54,21 @@ qmind retrieve --nb <notebook-id> --format agent "部署流程是什么?"
54
54
 
55
55
  不要把 token 写进命令参数、仓库或日志。使用完本机凭证后执行 `qmind logout`。
56
56
 
57
+ ### 无浏览器 / 无交互终端登录
58
+
59
+ 在 [Qoder PAT 管理页](https://qoder.com/account/integrations) 创建 PAT,然后通过标准输入登录(同样支持 `--non-interactive`):
60
+
61
+ ```sh
62
+ qmind login --pat-stdin < /path/to/pat-secret
63
+ qmind notebook list --non-interactive --format json
64
+ ```
65
+
66
+ 也可从密钥管理工具注入 `QODER_PROD_PAT` 后执行 `qmind login --non-interactive`。`login --pat <token>` 可显式传入 PAT;优先使用标准输入或环境变量,避免令牌出现在 shell 历史或进程参数中。PAT 登录会先交换 Job Token,成功后才在当前目标的文件 vault 保存 PAT、Job Token 及有效期;后续命令复用未过期的 Job Token,过期或收到 401 时用 PAT 重新交换。业务请求仅使用 Job Token。`logout` 删除当前目标的本地凭证,不撤销远端 PAT。
67
+
68
+ CI 也可以只注入 PAT 并直接运行命令,此时不写入 vault。当前产品正式环境使用 `QODER_PROD_PAT`,`--env test` 使用 `QODER_TEST_PAT`,均可回退到 `QODER_PERSONAL_ACCESS_TOKEN`。Global `--env daily` 只使用通用变量。不会跨地域或环境借用专用 PAT。自定义目标不自动读取这些 PAT 变量,须显式使用 `--pat-stdin` 或 `--token`。
69
+
70
+ 浏览器登录可用 `qmind login --no-browser` 仅打印授权 URL,在其他机器打开;它仍要求交互终端。
71
+
57
72
  ## 命令
58
73
 
59
74
  | 命令 | 用途 |
@@ -64,6 +79,7 @@ qmind retrieve --nb <notebook-id> --format agent "部署流程是什么?"
64
79
  | `retrieve` | 检索上下文,不发起 LLM 调用 |
65
80
  | `rag` | 基于知识库提问 |
66
81
  | `task` | 管理任务运行 |
82
+ | `scheduled-task` | 管理知识库定时任务配置 |
67
83
  | `upload-folder` / `sync` | 同步本地目录 |
68
84
  | `image` | 获取图片上传地址或访问地址 |
69
85
  | `version` | 查看版本和构建信息 |
@@ -109,7 +125,7 @@ QMIND_DEBUG_TOKEN='<debug-token>' qmind notebook list --env test --non-interacti
109
125
  qmind login --sash http://localhost:8080 --dashboard http://localhost:3000
110
126
  ```
111
127
 
112
- 正式环境 Token 优先级为 `--token > QMIND_TOKEN > 当前正式 vault`;调试环境为 `--token > QMIND_DEBUG_TOKEN > 当前调试 vault`,不会跨目标借用凭证。
128
+ 正式环境 Token 优先级为 `--token > QMIND_TOKEN > 当前环境 Qoder PAT 变量 > 当前正式 vault`;调试环境为 `--token > QMIND_DEBUG_TOKEN > 当前环境 Qoder PAT 变量 > 当前调试 vault`,不会跨目标借用凭证。
113
129
 
114
130
  状态保存在 `<状态根>/cli/global/<目标>/`,状态根为 `QMIND_HOME` 或 `~/.qmind`。CLI 不安装、加载或访问 OS Keyring。凭证文件是明文 JSON,不是加密存储。POSIX 平台分区目录为 `0700`、文件为 `0600`;这些 mode 不代表 Windows ACL。写入使用原子替换、文件锁及 refresh compare-and-swap 保护。
115
131
 
@@ -128,3 +144,66 @@ qmind notebook get <notebook-id> --format json
128
144
  ```
129
145
 
130
146
  普通列表和共享列表均支持 `--page`、`--page-size`;`--shared` 不可与 `--filter-client` 组合。共享列表使用与普通列表一致的扁平 `notebooks` 输出,并保留共享关系的 `permission`。JSON/NDJSON 保留服务端返回的 `access`(当前角色、成员数及各操作权限);Agent 输出展开这些字段,表格列表显示角色与成员数,详情显示操作权限。缺失的权限不进行推断,表格显示 `unknown`。
147
+
148
+ ## 与 Agent 工具一致的命令
149
+
150
+ 复用 Core 的 workflow(`notebook discover`、`source import-url/read/delete-batch`、`mkdir --derive-path`、`mv --to/--to-root`、统一检索和 `scheduled-task`)在进入 Agent Core 后返回 `{ ok, data/error, meta }`,其中 `meta.operationId` 标识本次操作。`--format ndjson` 每次操作输出一行完整结果;`table` 和 `agent` 也使用这个 JSON 结果。进入 Core 前的 CLI 参数校验、Host/凭据错误沿用原 CLI 错误格式:JSON/NDJSON 向 stdout 输出 `{ error }`,其他格式向 stderr 输出文本。命令用法错误和取消确认写入 stderr。`source list --parent` 保留原 Source 列表输出。成功退出 0,部分成功/运行失败/取消退出 1,参数错误退出 2。写入成功不表示 Source 已完成解析或调度任务已执行。
151
+
152
+ ```sh
153
+ # 从可检索的自有/共享库中选库;有 hasMore 时继续使用 nextCursor
154
+ qmind notebook discover --relationship all --page-size 20
155
+ qmind notebook discover --relationship all --cursor '<nextCursor>'
156
+
157
+ # 普通单页导入;上传后用 source get / source read 查看状态和正文
158
+ qmind source import-url --nb <notebook-id> --url https://example.com/guide
159
+ qmind source list --nb <notebook-id> --parent <directory-id>
160
+ qmind source read <source-id> --nb <notebook-id> --offset 0 --max-chars 20000
161
+
162
+ # 按真实目录推导路径,移动时保留原始 basename
163
+ qmind source mkdir --nb <notebook-id> --title guides --parent <directory-id> --derive-path
164
+ qmind source mv <source-id> --nb <notebook-id> --to <directory-id>
165
+ qmind source mv <source-id> --nb <notebook-id> --to-root
166
+
167
+ # 1..100 个不同 ID;交互确认或显式 --force 后执行
168
+ qmind source delete-batch <source-id-1> <source-id-2> --nb <notebook-id> --force
169
+ ```
170
+
171
+ `notebook list/get` 的 JSON/NDJSON 保留服务端 overview、sourceCount 和 materialCount;Agent 输出展开 summary/topics,表格列表增加摘要与 Source 数量。`discover` 支持 owned/shared/all 和游标,默认 all,只返回检索可用库;管理清单仍用 `list`。空页也可能 `hasMore:true`,不要直接判断已结束,续页须保持 relationship。
172
+
173
+ `source read` 先检查解析状态,返回 `content/contentType/truncated/nextOffset`。它仍取回全文再切片,只限制输出大小。原 `source content` 的全文输出/下载不变。`source list --parent` 不能与 `--all` 组合。
174
+
175
+ `mkdir --derive-path` 不能与 `--path` 组合;`mv --to/--to-root` 不能与旧 parent/path/rename/status 参数组合,仅移动当前库内可操作的叶子文档,保留原 basename。原来的低层 mkdir/mv patch 入口仍可使用。
176
+
177
+ 批删返回提交的 sourceIds 和 successCount/failureCount,sourceIds 不是成功 ID 清单。部分失败退出 1,不能猜测失败对象或重放整批;先重新查询对账。
178
+
179
+ ## 精确与统一检索
180
+
181
+ 旧的 `retrieve --nb` 默认行为和输出形状保持不变。显式 `--unified` 或 `--targets` 使用与 Agent 工具一致的统一检索,单库也返回携带 Notebook 身份的 chunks:
182
+
183
+ ```sh
184
+ qmind retrieve --nb <notebook-id> --unified --score-threshold 0.6 '部署流程'
185
+ qmind retrieve --targets '[{"notebookId":"nb-1","sourceIds":["source-1"]},{"notebookId":"nb-2","sourceIds":["source-2"]}]' --max-results 8 '部署流程'
186
+ ```
187
+
188
+ `--targets` 不能与 `--nb` 或 `--sources` 组合,每库可独立过滤 Source。统一检索默认 maxResults=8(1..50),topK 可选(1..100),0 表示使用该 workflow 的默认值;最多五个唯一目标。结果采用上述结构化 envelope,读取 `data.chunks/data.promptContext`;`--score-threshold` 范围为 0..1,旧检索入口也支持。旧路径的零预算继续使用服务端默认值,不隐式切换旧脚本。
189
+
190
+ ## 定时任务配置
191
+
192
+ ```sh
193
+ qmind scheduled-task create --nb <notebook-id> --scene source_refresh --schedule 'CRON_TZ=Asia/Shanghai 0 9 * * *'
194
+ qmind scheduled-task list --nb <notebook-id> --enabled true --page 1 --page-size 20
195
+ qmind scheduled-task update <task-id> --nb <notebook-id> --schedule 'CRON_TZ=Asia/Shanghai 0 10 * * *'
196
+ qmind scheduled-task pause <task-id> --nb <notebook-id>
197
+ qmind scheduled-task resume <task-id> --nb <notebook-id>
198
+ qmind scheduled-task delete <task-id> --nb <notebook-id>
199
+ ```
200
+
201
+ `update --enabled false/true` 等价于暂停/恢复。创建默认启用、config 固定为空,不能提交任意 prompt/config;更新仅支持时间或 enabled。scene 为 compilation、condensation、lint、source_refresh、source_binding_sync,实际可用性和完整 Cron 语法由服务端裁决。必须显式提供 IANA 时区,不能依赖本机时区。compilation 可能已退役;source_binding_sync 当前是单库单例且间隔至少五分钟。`list` 可用 `--task/--scene/--enabled` 过滤,pageSize 最大 20;底层仍读取本库全量配置。过大的 config 会显示 `configTruncated:true`。
202
+
203
+ 定时配置与执行记录分开:`task list --scheduled-task <task-id>` 查看执行记录。暂停/删除不取消已派发任务;恢复过期任务可能立即触发一次。调度沿用最初创建者身份,成员撤权不保证自动停任务。
204
+
205
+ ## 写入结果不确定
206
+
207
+ 新命令返回 `error.code=outcome_unknown`、`retryable:false` 时,先查询当前状态再决定后续操作,不能自动重试。旧直接写入命令在 JSON/NDJSON 错误中也区分该状态并保留原 causeCode/requestId。未知结果不证明请求已到达服务器;同名资源也不能证明是本次创建。
208
+
209
+ `notebook delete` 和 `source delete` 支持 JSON/NDJSON 成功回执。单 Source 删除的预读失败会停止,只有显式 `--force` 才跳过目录确认;原默认文本成功输出保持 `deleted`。
@@ -68,7 +68,7 @@ function createImportOperations(context) {
68
68
  idempotent: false,
69
69
  method: "POST",
70
70
  operation: "imports.fullSiteURL.confirm",
71
- path: context.profile.mindPath("notebooks", notebook, "full-site-url-import", "discoveries", discovery, "confirm"),
71
+ path: context.profile.apiPath("mind", "notebooks", notebook, "full-site-url-import", "discoveries", discovery, "confirm"),
72
72
  schema: fullSiteURLImportConfirmationSchema
73
73
  });
74
74
  },
@@ -83,7 +83,7 @@ function createImportOperations(context) {
83
83
  idempotent: true,
84
84
  method: "POST",
85
85
  operation: "imports.fullSiteURL.discover",
86
- path: context.profile.mindPath("notebooks", notebook, "full-site-url-import", "discoveries"),
86
+ path: context.profile.apiPath("mind", "notebooks", notebook, "full-site-url-import", "discoveries"),
87
87
  schema: fullSiteURLImportDiscoverySchema
88
88
  });
89
89
  },
@@ -97,7 +97,7 @@ function createImportOperations(context) {
97
97
  idempotent: true,
98
98
  method: "GET",
99
99
  operation: "imports.aliDing.getRun",
100
- path: context.profile.mindPath("notebooks", notebook, "aliding", "import-runs", run),
100
+ path: context.profile.apiPath("mind", "notebooks", notebook, "aliding", "import-runs", run),
101
101
  schema: aliDingImportRunSchema
102
102
  });
103
103
  },
@@ -106,7 +106,7 @@ function createImportOperations(context) {
106
106
  const run = requiredString(runId, "runId");
107
107
  const normalizedPage = pagination(input);
108
108
  assertCapability(context.profile, "imports.aliDing", "imports.aliDing.listRunItems");
109
- const base = context.profile.mindPath("notebooks", notebook, "aliding", "import-runs", run, "items");
109
+ const base = context.profile.apiPath("mind", "notebooks", notebook, "aliding", "import-runs", run, "items");
110
110
  return call(context, {
111
111
  callOptions: options,
112
112
  capability: "imports.aliDing",
@@ -131,7 +131,7 @@ function createImportOperations(context) {
131
131
  idempotent: true,
132
132
  method: "GET",
133
133
  operation: "imports.discover",
134
- path: context.profile.mindPath("import-sources"),
134
+ path: context.profile.apiPath("mind", "import-sources"),
135
135
  schema: importProvidersSchema
136
136
  });
137
137
  },
@@ -146,7 +146,7 @@ function createImportOperations(context) {
146
146
  idempotent: false,
147
147
  method: "POST",
148
148
  operation: "imports.aliDing.createKnowledgeBaseRun",
149
- path: context.profile.mindPath("notebooks", notebook, "aliding", "knowledge-base-import-runs"),
149
+ path: context.profile.apiPath("mind", "notebooks", notebook, "aliding", "knowledge-base-import-runs"),
150
150
  schema: aliDingImportRunSchema
151
151
  });
152
152
  },
@@ -161,7 +161,7 @@ function createImportOperations(context) {
161
161
  idempotent: false,
162
162
  method: "POST",
163
163
  operation: "imports.aliDing.createNodeSubtreeRun",
164
- path: context.profile.mindPath("notebooks", notebook, "aliding", "node-subtree-import-runs"),
164
+ path: context.profile.apiPath("mind", "notebooks", notebook, "aliding", "node-subtree-import-runs"),
165
165
  schema: aliDingImportRunSchema
166
166
  });
167
167
  }
@@ -188,7 +188,7 @@ function createManagementOperations(context) {
188
188
  permission: memberPermission(input?.permission, "permission")
189
189
  },
190
190
  callOptions: options,
191
- capability: hasUserId ? "members.search" : "members",
191
+ capability: "members",
192
192
  idempotent: false,
193
193
  method: "POST",
194
194
  operation: "members.add",