maka-agent 0.2.0-dev.24.20260907 → 0.2.0-dev.26.20260909
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 +38 -19
- package/README.zh-CN.md +34 -19
- package/dist/mcp-capability-provider.js +4 -1
- package/dist/pi-transcript-tools.js +6 -0
- package/dist/pi-tui-layout.js +56 -10
- package/dist/pi-tui-mcp-status.js +2 -2
- package/dist/pi-tui-pickers.js +121 -30
- package/dist/pi-tui-runner.js +156 -42
- package/dist/pi-tui-todo.js +221 -0
- package/dist/pi-tui-transcript-viewer.js +134 -7
- package/dist/runtime-host-cli-context.js +70 -13
- package/dist/runtime-host-handoff-surface.js +51 -26
- package/dist/runtime-host-local-handoff.js +11 -1
- package/dist/runtime-host-service-manager.js +0 -3
- package/dist/runtime-host-session-channel.js +13 -0
- package/dist/runtime-host-session-driver.js +42 -1
- package/dist/tui-autocomplete-layout.js +3 -1
- package/dist/tui-copy-catalog.js +85 -6
- package/dist/tui-editor-render.js +36 -0
- package/dist/tui-mcp-control.js +41 -6
- package/native/runtime-host-windows-task-launcher/prebuilds/win32-x64/maka-runtime-host-task-launcher.exe +0 -0
- package/node_modules/@maka/core/dist/agent-run.js +1 -0
- package/node_modules/@maka/core/dist/attachments.js +3 -0
- package/node_modules/@maka/core/dist/canonical-json.js +27 -0
- package/node_modules/@maka/core/dist/capabilities.js +35 -0
- package/node_modules/@maka/core/dist/computer-use.js +0 -1
- package/node_modules/@maka/core/dist/display-redaction.js +18 -0
- package/node_modules/@maka/core/dist/llm-connections.js +13 -0
- package/node_modules/@maka/core/dist/model-call-attempt.js +2 -0
- package/node_modules/@maka/core/dist/model-metadata.js +4 -0
- package/node_modules/@maka/core/dist/redaction.js +35 -0
- package/node_modules/@maka/core/dist/run-composition.js +77 -2
- package/node_modules/@maka/core/dist/runtime-event.js +3 -0
- package/node_modules/@maka/core/dist/session.js +57 -6
- package/node_modules/@maka/core/dist/slash-command-catalog.js +1 -0
- package/node_modules/@maka/core/dist/tool-result-record-schema.js +2 -1
- package/node_modules/@maka/core/dist/workhub-action-result.js +68 -0
- package/node_modules/@maka/core/package.json +3 -3
- package/node_modules/@maka/eval/dist/experiment-directory.js +4 -13
- package/node_modules/@maka/eval/dist/toolchain-verification.js +1 -1
- package/node_modules/@maka/mcp/dist/form-elicitation.js +213 -0
- package/node_modules/@maka/mcp/dist/index.js +337 -71
- package/node_modules/@maka/runtime/dist/agent-run-inspect.js +0 -13
- package/node_modules/@maka/runtime/dist/agent-run.js +90 -2
- package/node_modules/@maka/runtime/dist/ai-sdk-backend.js +16 -8
- package/node_modules/@maka/runtime/dist/ai-sdk-turn.js +57 -50
- package/node_modules/@maka/runtime/dist/archive-read-tool.js +2 -2
- package/node_modules/@maka/runtime/dist/context-budget-helpers.js +0 -16
- package/node_modules/@maka/runtime/dist/conversation-copy.js +153 -11
- package/node_modules/@maka/runtime/dist/github-copilot-oauth-enrollment.js +3 -3
- package/node_modules/@maka/runtime/dist/goal-continuation.js +5 -1
- package/node_modules/@maka/runtime/dist/ledger-tool-result-archive-reader.js +69 -1
- package/node_modules/@maka/runtime/dist/mcp-tools.js +7 -2
- package/node_modules/@maka/runtime/dist/model-fetcher.js +42 -2
- package/node_modules/@maka/runtime/dist/model-history.js +0 -112
- package/node_modules/@maka/runtime/dist/plugin-runtime.js +20 -10
- package/node_modules/@maka/runtime/dist/plugin-tool-service.js +205 -0
- package/node_modules/@maka/runtime/dist/provider-request-telemetry.js +8 -1
- package/node_modules/@maka/runtime/dist/request-shape.js +23 -0
- package/node_modules/@maka/runtime/dist/runtime-event-backfill.js +1 -1
- package/node_modules/@maka/runtime/dist/runtime-event-read-model.js +24 -1
- package/node_modules/@maka/runtime/dist/runtime-kernel.js +127 -13
- package/node_modules/@maka/runtime/dist/session-manager.js +20 -36
- package/node_modules/@maka/runtime/dist/stream-graph-coordinator.js +21 -0
- package/node_modules/@maka/runtime/dist/stream-graph-supervisor-tools.js +0 -5
- package/node_modules/@maka/runtime/dist/test-connection.js +0 -1
- package/node_modules/@maka/runtime/dist/tool-activation-identity.js +41 -0
- package/node_modules/@maka/runtime/dist/tool-availability.js +11 -1
- package/node_modules/@maka/runtime/dist/tool-result-archive-resource.js +63 -1
- package/node_modules/@maka/runtime/dist/tool-result-archive-transition.js +42 -12
- package/node_modules/@maka/runtime/dist/tool-result-archive.js +27 -4
- package/node_modules/@maka/runtime/package.json +1 -0
- package/node_modules/@maka/runtime-host/dist/client/connection.js +30 -5
- package/node_modules/@maka/runtime-host/dist/client/host-handoff-copy.js +52 -13
- package/node_modules/@maka/runtime-host/dist/client/host-handoff.js +2 -0
- package/node_modules/@maka/runtime-host/dist/client/host-retirement.js +4 -2
- package/node_modules/@maka/runtime-host/dist/client/peer-client.js +18 -1
- package/node_modules/@maka/runtime-host/dist/client/session-subscription.js +19 -0
- package/node_modules/@maka/runtime-host/dist/control/endpoint.js +1 -3
- package/node_modules/@maka/runtime-host/dist/node-error.js +22 -0
- package/node_modules/@maka/runtime-host/dist/operator/managed-deployment.js +1 -3
- package/node_modules/@maka/runtime-host/dist/peer-mesh/limits.js +0 -1
- package/node_modules/@maka/runtime-host/dist/peer-mesh/model.js +1 -1
- package/node_modules/@maka/runtime-host/dist/peer-reachability/publisher.js +1 -3
- package/node_modules/@maka/runtime-host/dist/protocol/index.js +9 -1
- package/node_modules/@maka/runtime-host/dist/protocol/operations.js +3 -2
- package/node_modules/@maka/runtime-host/dist/protocol/plan.js +1 -0
- package/node_modules/@maka/runtime-host/dist/protocol/plugin-platform.js +27 -5
- package/node_modules/@maka/runtime-host/dist/protocol/project-catalog.js +2 -2
- package/node_modules/@maka/runtime-host/dist/protocol/session-continuity.js +1 -0
- package/node_modules/@maka/runtime-host/dist/protocol/workhub-coordination.js +86 -157
- package/node_modules/@maka/runtime-host/dist/server/access-credential-store.js +4 -0
- package/node_modules/@maka/runtime-host/dist/server/agent-graph-coordinator.js +0 -3
- package/node_modules/@maka/runtime-host/dist/server/canonical-session-projection.js +2 -1
- package/node_modules/@maka/runtime-host/dist/server/connection-session.js +28 -8
- package/node_modules/@maka/runtime-host/dist/server/daily-review-coordinator.js +112 -56
- package/node_modules/@maka/runtime-host/dist/server/execution-artifacts.js +32 -32
- package/node_modules/@maka/runtime-host/dist/server/execution-composition.js +85 -25
- package/node_modules/@maka/runtime-host/dist/server/execution-model-composition.js +42 -14
- package/node_modules/@maka/runtime-host/dist/server/failure-diagnostic.js +24 -0
- package/node_modules/@maka/runtime-host/dist/server/goal-coordinator.js +7 -3
- package/node_modules/@maka/runtime-host/dist/server/host-kernel.js +3 -3
- package/node_modules/@maka/runtime-host/dist/server/host-session-availability.js +5 -2
- package/node_modules/@maka/runtime-host/dist/server/hosted-execution-recovery.js +3 -2
- package/node_modules/@maka/runtime-host/dist/server/hosted-execution-tool-profile.js +34 -4
- package/node_modules/@maka/runtime-host/dist/server/interactive-run-composer.js +51 -23
- package/node_modules/@maka/runtime-host/dist/server/operation-dispatcher.js +2 -7
- package/node_modules/@maka/runtime-host/dist/server/plugin-platform-coordinator.js +6 -0
- package/node_modules/@maka/runtime-host/dist/server/plugin-platform.js +6 -0
- package/node_modules/@maka/runtime-host/dist/server/root-turn-coordinator.js +110 -14
- package/node_modules/@maka/runtime-host/dist/server/runtime-resource-coordinator.js +11 -8
- package/node_modules/@maka/runtime-host/dist/server/scheduled-task-coordinator.js +31 -21
- package/node_modules/@maka/runtime-host/dist/server/serial-outbound-writer.js +1 -1
- package/node_modules/@maka/runtime-host/dist/server/session-catalog-coordinator.js +20 -8
- package/node_modules/@maka/runtime-host/dist/server/session-retirement-coordinator.js +5 -2
- package/node_modules/@maka/runtime-host/dist/server/session-revision-coordinator.js +4 -0
- package/node_modules/@maka/runtime-host/dist/server/session-transcript-reader.js +15 -104
- package/node_modules/@maka/runtime-host/dist/server/shared-session-transcript.js +3 -0
- package/node_modules/@maka/runtime-host/dist/server/workhub-coordination-action-gate.js +59 -82
- package/node_modules/@maka/runtime-host/dist/server/workhub-coordination-coordinator.js +132 -139
- package/node_modules/@maka/runtime-host/dist/server/workhub-message-attachments.js +46 -0
- package/node_modules/@maka/storage/dist/agent-run-store.js +14 -1
- package/node_modules/@maka/storage/dist/artifact-store.js +40 -3
- package/node_modules/@maka/storage/dist/atomic-file-write.js +74 -0
- package/node_modules/@maka/storage/dist/claude-code-session-adapter.js +0 -1
- package/node_modules/@maka/storage/dist/codex-session-adapter.js +284 -196
- package/node_modules/@maka/storage/dist/credential-store.js +12 -63
- package/node_modules/@maka/storage/dist/execution-stores.js +4 -1
- package/node_modules/@maka/storage/dist/git-exec.js +61 -0
- package/node_modules/@maka/storage/dist/git-worktree-child-executor.js +8 -35
- package/node_modules/@maka/storage/dist/goal-authority.js +2 -2
- package/node_modules/@maka/storage/dist/interaction-store.js +2 -2
- package/node_modules/@maka/storage/dist/mcp-config-store.js +10 -25
- package/node_modules/@maka/storage/dist/project-catalog.js +2 -23
- package/node_modules/@maka/storage/dist/runtime-event-invariants.js +2 -2
- package/node_modules/@maka/storage/dist/runtime-policy/connection-catalog-document.js +8 -3
- package/node_modules/@maka/storage/dist/scheduled-task-store.js +249 -283
- package/node_modules/@maka/storage/dist/session-bundle-manifest.js +5 -17
- package/node_modules/@maka/storage/dist/session-bundle-policy.js +2 -1
- package/node_modules/@maka/storage/dist/session-copy-cleanup.js +2 -1
- package/node_modules/@maka/storage/dist/session-store.js +14 -2
- package/node_modules/@maka/storage/dist/settings-store.js +8 -4
- package/node_modules/@maka/storage/dist/sqlite-artifact-metadata.js +11 -0
- package/node_modules/@maka/storage/dist/sqlite-runtime-store.js +1 -2
- package/node_modules/@maka/storage/dist/sqlite-session-metadata-schema.js +12 -1
- package/node_modules/@maka/storage/dist/sqlite-session-metadata-store.js +67 -3
- package/node_modules/@maka/storage/dist/stable-storage.js +14 -1
- package/node_modules/@maka/storage/dist/storage-id.js +28 -0
- package/node_modules/@maka/storage/dist/tool-result-archive-evidence.js +31 -4
- package/node_modules/@maka/storage/dist/workspace-identity.js +2 -15
- package/node_modules/@maka/storage/dist/workspace-version-authority-internal.js +1 -8
- package/package.json +1 -1
- package/node_modules/@maka/core/dist/workhub-creation-intent.js +0 -990
- package/node_modules/@maka/core/dist/workhub-session-resolver.js +0 -50
package/README.md
CHANGED
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
[简体中文](https://github.com/apache/maka/blob/main/packages/cli/README.zh-CN.md)
|
|
25
25
|
|
|
26
26
|
Maka is a local-first agent workspace. The `maka-agent` npm package installs the interactive
|
|
27
|
-
terminal UI, the non-interactive CLI, Runtime Host tooling, and the Eval command.
|
|
27
|
+
terminal UI, the non-interactive CLI, Runtime Host tooling, and the Eval command. That package is
|
|
28
|
+
published under the `nightly` dist-tag; `latest` holds an early alpha stub (see [Install](#install)).
|
|
28
29
|
|
|
29
30
|
## Apache Incubation Disclaimer
|
|
30
31
|
|
|
@@ -79,16 +80,24 @@ release gate. Real Eval executor validation currently runs on Linux x64 with Nod
|
|
|
79
80
|
|
|
80
81
|
## Install
|
|
81
82
|
|
|
82
|
-
|
|
83
|
+
Two dist-tags are live on npm, and they are not interchangeable:
|
|
83
84
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
- `nightly` carries the complete CLI. The line moves daily — resolve the tag (or query its
|
|
86
|
+
current version) instead of copying a version number from any document:
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
npm install --global maka-agent@nightly
|
|
90
|
+
maka --version
|
|
91
|
+
maka --help
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
- `latest` points at an early alpha (`0.0.0-alpha.0`) whose command surface is limited to
|
|
95
|
+
`doctor`, help, and version. Because of that split, do not use a bare
|
|
96
|
+
`npm update --global maka-agent`: it follows `latest` and may switch the installation to the
|
|
97
|
+
other release line.
|
|
89
98
|
|
|
90
99
|
The public command is `maka`. For a one-off invocation, use
|
|
91
|
-
`npx --yes --package maka-agent@
|
|
100
|
+
`npx --yes --package maka-agent@nightly maka`; the unrelated `maka` package on npm is not this project.
|
|
92
101
|
`runtime-host service install` uses the persistent global installation above; `runtime-host setup`
|
|
93
102
|
creates its own managed copy from the exact package invoked by `npx`.
|
|
94
103
|
|
|
@@ -124,26 +133,31 @@ modify.
|
|
|
124
133
|
|
|
125
134
|
## Upgrade
|
|
126
135
|
|
|
127
|
-
|
|
136
|
+
Update within the nightly line by pinning the exact release (`--target` accepts `latest`,
|
|
137
|
+
`next`, or an exact Maka version — there is no `nightly` channel name). Resolve the current
|
|
138
|
+
nightly version first and pass that exact value: the updater refuses downgrades, so a copied
|
|
139
|
+
version number goes stale as soon as the nightly line moves on.
|
|
128
140
|
|
|
129
141
|
```sh
|
|
130
|
-
maka
|
|
142
|
+
version="$(npm view maka-agent@nightly version --registry=https://registry.npmjs.org)"
|
|
143
|
+
maka update --target "$version"
|
|
131
144
|
maka --version
|
|
132
145
|
```
|
|
133
146
|
|
|
147
|
+
Do not use a bare `npm update --global maka-agent` to upgrade: it follows `latest`, which holds
|
|
148
|
+
the early alpha stub, and may switch the installation to the other release line.
|
|
149
|
+
|
|
134
150
|
The update stages and verifies the exact release before replacing the local Runtime Host or the
|
|
135
151
|
npm-global package. It refuses to interrupt active or durable work by default. Use
|
|
136
152
|
`--allow-interrupt-active-tasks` only after deciding that interruption is safe. A direct
|
|
137
|
-
`npm install --global maka-agent@
|
|
138
|
-
`npm update --global maka-agent`, because it follows `latest` and may select a different release
|
|
139
|
-
line. After a stable release is available, select it with `maka update --target latest`.
|
|
153
|
+
`npm install --global maka-agent@nightly` remains available for installation repair.
|
|
140
154
|
|
|
141
155
|
## Remote Runtime Host setup
|
|
142
156
|
|
|
143
157
|
To set up a persistent remote Runtime Host from an exact released package on Linux or macOS:
|
|
144
158
|
|
|
145
159
|
```sh
|
|
146
|
-
npx --yes --package maka-agent@
|
|
160
|
+
npx --yes --package maka-agent@nightly maka runtime-host setup \
|
|
147
161
|
--principal my-client \
|
|
148
162
|
--preset terminal-client
|
|
149
163
|
```
|
|
@@ -151,10 +165,12 @@ npx --yes --package maka-agent@next maka runtime-host setup \
|
|
|
151
165
|
Rerunning setup replaces that Client credential. The service no longer depends on the temporary
|
|
152
166
|
`npx` cache after setup succeeds.
|
|
153
167
|
|
|
154
|
-
Check a managed service against
|
|
168
|
+
Check a managed service against the nightly release it should track, without changing the
|
|
169
|
+
running Host — pass the exact version resolved above rather than `latest`, which holds the
|
|
170
|
+
early alpha:
|
|
155
171
|
|
|
156
172
|
```sh
|
|
157
|
-
maka runtime-host service check-update --target
|
|
173
|
+
maka runtime-host service check-update --target "$version" --json
|
|
158
174
|
```
|
|
159
175
|
|
|
160
176
|
The result pins the selected channel to an exact version and package integrity. It also reports
|
|
@@ -165,10 +181,13 @@ to the existing exact-package update transaction, and does not mutate a candidat
|
|
|
165
181
|
manual review.
|
|
166
182
|
|
|
167
183
|
The installation owner can persist one update target and reconcile it with the same verified
|
|
168
|
-
transaction:
|
|
184
|
+
transaction. Pin the exact nightly version resolved above: there is no `nightly` target name,
|
|
185
|
+
and `latest` holds the early alpha, which the reconciliation assesses as a downgrade for a
|
|
186
|
+
nightly installation. Following successive nightlies therefore means resolving the current
|
|
187
|
+
version again and re-running `update-policy` with the fresh value:
|
|
169
188
|
|
|
170
189
|
```sh
|
|
171
|
-
maka runtime-host service update-policy --target
|
|
190
|
+
maka runtime-host service update-policy --target "$version" \
|
|
172
191
|
--expected-service-id <service-id> \
|
|
173
192
|
--expected-root-path <state-root> \
|
|
174
193
|
--expected-root-id <root-id>
|
|
@@ -182,7 +201,7 @@ bounded one-shot command: it never interrupts active work and does not install a
|
|
|
182
201
|
|
|
183
202
|
```sh
|
|
184
203
|
# When a managed Runtime Host service was installed on Linux or macOS
|
|
185
|
-
npx --yes --package maka-agent@
|
|
204
|
+
npx --yes --package maka-agent@nightly maka runtime-host service uninstall
|
|
186
205
|
|
|
187
206
|
# If Maka was installed globally
|
|
188
207
|
npm uninstall --global maka-agent
|
package/README.zh-CN.md
CHANGED
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
[English](./README.md)
|
|
25
25
|
|
|
26
26
|
Maka 是一个本地优先的 Agent 工作空间。`maka-agent` npm 包包含交互式终端界面、非交互
|
|
27
|
-
CLI、Runtime Host 工具和 Eval
|
|
27
|
+
CLI、Runtime Host 工具和 Eval 命令。该包发布在 `nightly` dist-tag 上;`latest` 指向一个
|
|
28
|
+
早期 alpha stub(见[安装](#安装))。
|
|
28
29
|
|
|
29
30
|
## Apache 孵化免责声明
|
|
30
31
|
|
|
@@ -57,15 +58,21 @@ release commit 中的 [DISCLAIMER-WIP](https://github.com/apache/maka/blob/main/
|
|
|
57
58
|
|
|
58
59
|
## 安装
|
|
59
60
|
|
|
60
|
-
|
|
61
|
+
npm 上有两条 dist-tag,且二者不可互换:
|
|
61
62
|
|
|
62
|
-
|
|
63
|
-
npm install --global maka-agent@next
|
|
64
|
-
maka --version
|
|
65
|
-
maka --help
|
|
66
|
-
```
|
|
63
|
+
- `nightly` 承载完整的 CLI。该发布线每日推进——请解析 tag 本身(或查询其当前版本),不要誊写任何文档里的版本号:
|
|
67
64
|
|
|
68
|
-
|
|
65
|
+
```sh
|
|
66
|
+
npm install --global maka-agent@nightly
|
|
67
|
+
maka --version
|
|
68
|
+
maka --help
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
- `latest` 指向一个早期 alpha(`0.0.0-alpha.0`),命令面只有 `doctor`、帮助与版本命令。
|
|
72
|
+
因此不要使用裸的 `npm update --global maka-agent`:它跟随 `latest`,可能把安装切换到
|
|
73
|
+
另一条发布线。
|
|
74
|
+
|
|
75
|
+
公开命令只有 `maka`。一次性运行请使用 `npx --yes --package maka-agent@nightly maka`;npm 上与本项目
|
|
69
76
|
无关的 `maka` 包不是本项目。`runtime-host service install` 使用上面的持久全局安装;
|
|
70
77
|
`runtime-host setup` 会从 `npx` 调用的精确 package 创建自己的托管副本。
|
|
71
78
|
|
|
@@ -98,35 +105,40 @@ Maka 默认会在执行高权限工具操作前询问。`maka run --yolo` 会授
|
|
|
98
105
|
|
|
99
106
|
## 升级
|
|
100
107
|
|
|
101
|
-
|
|
108
|
+
在 nightly 线内更新时固定精确版本(`--target` 只接受 `latest`、`next` 或精确的 Maka
|
|
109
|
+
版本号——不存在 `nightly` 这个 channel 名)。先解析当前 nightly 版本再传入精确值:
|
|
110
|
+
updater 拒绝降级,nightly 前进之后誊写的旧版本号会被直接拒绝。
|
|
102
111
|
|
|
103
112
|
```sh
|
|
104
|
-
maka
|
|
113
|
+
version="$(npm view maka-agent@nightly version --registry=https://registry.npmjs.org)"
|
|
114
|
+
maka update --target "$version"
|
|
105
115
|
maka --version
|
|
106
116
|
```
|
|
107
117
|
|
|
118
|
+
不要使用裸的 `npm update --global maka-agent` 来升级:它跟随 `latest`(早期 alpha stub),
|
|
119
|
+
可能把安装切换到另一条发布线。
|
|
120
|
+
|
|
108
121
|
更新流程会先 stage 并验证精确 release,再替换本地 Runtime Host 与 npm-global package;
|
|
109
122
|
默认不会中断 active 或 durable work。只有在你确认可以安全中断后,才使用
|
|
110
|
-
`--allow-interrupt-active-tasks`。`npm install --global maka-agent@
|
|
111
|
-
不要使用不带 tag 的 `npm update --global maka-agent`,因为它会跟随 `latest`,可能选中
|
|
112
|
-
不同的发布线。稳定版发布后,使用 `maka update --target latest`。
|
|
123
|
+
`--allow-interrupt-active-tasks`。`npm install --global maka-agent@nightly` 仍可用于修复安装。
|
|
113
124
|
|
|
114
125
|
## 设置远程 Runtime Host
|
|
115
126
|
|
|
116
127
|
在 Linux 或 macOS 上从精确的发布 package 设置持久 remote Runtime Host:
|
|
117
128
|
|
|
118
129
|
```sh
|
|
119
|
-
npx --yes --package maka-agent@
|
|
130
|
+
npx --yes --package maka-agent@nightly maka runtime-host setup \
|
|
120
131
|
--principal my-client \
|
|
121
132
|
--preset terminal-client
|
|
122
133
|
```
|
|
123
134
|
|
|
124
135
|
重复设置会替换该 Client credential。设置成功后,service 不再依赖临时 `npx` cache。
|
|
125
136
|
|
|
126
|
-
|
|
137
|
+
检查 managed service 应跟随的 nightly 发布,且不改变当前运行中的 Host——传入上面解析出的
|
|
138
|
+
精确版本,而不是指向早期 alpha 的 `latest`:
|
|
127
139
|
|
|
128
140
|
```sh
|
|
129
|
-
maka runtime-host service check-update --target
|
|
141
|
+
maka runtime-host service check-update --target "$version" --json
|
|
130
142
|
```
|
|
131
143
|
|
|
132
144
|
结果会把频道固定为精确版本和 package integrity,并说明 package 是否提供足够的兼容性证据,
|
|
@@ -134,10 +146,13 @@ maka runtime-host service check-update --target next --json
|
|
|
134
146
|
selector 传给 `service update --target`。该路径会先校验 archive 与解包后的 manifest,再委托给
|
|
135
147
|
现有的精确 package 更新事务;需要人工审查的候选不会改变当前 Host。
|
|
136
148
|
|
|
137
|
-
Installation owner 可以持久化一个更新目标,并通过同一套已验证事务执行 reconciliation
|
|
149
|
+
Installation owner 可以持久化一个更新目标,并通过同一套已验证事务执行 reconciliation。持久化
|
|
150
|
+
上面解析出的精确 nightly 版本:不存在 `nightly` 这个 target 名,而 `latest` 指向早期 alpha,
|
|
151
|
+
reconciliation 会把对一个 nightly 安装而言更旧的候选判为降级。因此要跟随每日推进的 nightly,
|
|
152
|
+
就需要重新解析当前版本,并用新值再次运行 `update-policy`:
|
|
138
153
|
|
|
139
154
|
```sh
|
|
140
|
-
maka runtime-host service update-policy --target
|
|
155
|
+
maka runtime-host service update-policy --target "$version" \
|
|
141
156
|
--expected-service-id <service-id> \
|
|
142
157
|
--expected-root-path <state-root> \
|
|
143
158
|
--expected-root-id <root-id>
|
|
@@ -151,7 +166,7 @@ maka runtime-host service reconcile-update --json
|
|
|
151
166
|
|
|
152
167
|
```sh
|
|
153
168
|
# 仅限安装过 managed Runtime Host service 的 Linux 或 macOS
|
|
154
|
-
npx --yes --package maka-agent@
|
|
169
|
+
npx --yes --package maka-agent@nightly maka runtime-host service uninstall
|
|
155
170
|
|
|
156
171
|
# 如果曾全局安装 Maka
|
|
157
172
|
npm uninstall --global maka-agent
|
|
@@ -73,7 +73,10 @@ export function createMcpCapabilityProvider(manager) {
|
|
|
73
73
|
if (!binding)
|
|
74
74
|
throw new Error('MCP capability is not part of the published snapshot');
|
|
75
75
|
await options.accept({ kind: 'none' });
|
|
76
|
-
return projectMcpResult(await manager.callTool(binding, frame.arguments, {
|
|
76
|
+
return projectMcpResult(await manager.callTool(binding, frame.arguments, {
|
|
77
|
+
signal: options.signal,
|
|
78
|
+
requestInteraction: options.requestInteraction,
|
|
79
|
+
}));
|
|
77
80
|
},
|
|
78
81
|
};
|
|
79
82
|
}
|
|
@@ -267,6 +267,12 @@ function compactToolSummary(entry) {
|
|
|
267
267
|
isReadBodyResult(result)) {
|
|
268
268
|
return { text: linesText(readBodyLineCount(text)), protect: true };
|
|
269
269
|
}
|
|
270
|
+
const status = makaPiToolPresentationStatus(entry);
|
|
271
|
+
// Error-text size is not a successful read's size. Show only the outcome,
|
|
272
|
+
// including under NO_COLOR; the full reason remains in expanded details.
|
|
273
|
+
if (status === 'error' || status === 'failed' || status === 'aborted') {
|
|
274
|
+
return { text: status === 'error' ? 'failed' : status, protect: true };
|
|
275
|
+
}
|
|
270
276
|
return textResultSummary(text);
|
|
271
277
|
}
|
|
272
278
|
function compactTerminalSummary(content) {
|
package/dist/pi-tui-layout.js
CHANGED
|
@@ -48,8 +48,8 @@ export class MakaTranscriptComponent {
|
|
|
48
48
|
* by the live terminal-scrollback reconciliation path.
|
|
49
49
|
*/
|
|
50
50
|
createDocumentRenderer() {
|
|
51
|
-
// The detached keys and their rendered-line cache
|
|
52
|
-
//
|
|
51
|
+
// The detached keys and their rendered-line cache belong to one Session's
|
|
52
|
+
// reader. Reopening keeps its position; switching Sessions releases it.
|
|
53
53
|
const entryClones = new WeakMap();
|
|
54
54
|
const documentEntry = (entry) => {
|
|
55
55
|
const cached = entryClones.get(entry);
|
|
@@ -61,11 +61,35 @@ export class MakaTranscriptComponent {
|
|
|
61
61
|
entryClones.set(entry, clone);
|
|
62
62
|
return clone;
|
|
63
63
|
};
|
|
64
|
-
return (width) =>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
return (width, expanded) => {
|
|
65
|
+
const entries = this.state.entries.map(documentEntry);
|
|
66
|
+
if (expanded !== undefined) {
|
|
67
|
+
for (const entry of entries) {
|
|
68
|
+
if (entry.kind === 'tool' || entry.kind === 'thinking')
|
|
69
|
+
entry.expanded = expanded;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
const detachedState = {
|
|
73
|
+
...this.state,
|
|
74
|
+
entries,
|
|
75
|
+
renderGeometry: { entryFirstLine: undefined, viewportTop: 0 },
|
|
76
|
+
};
|
|
77
|
+
const lines = renderMakaPiTranscript(detachedState, this.metadata(), width);
|
|
78
|
+
const anchors = entries.flatMap((entry, index) => {
|
|
79
|
+
if (entry.kind === 'tool' && entry.suppressed)
|
|
80
|
+
return [];
|
|
81
|
+
const line = detachedState.renderGeometry.entryFirstLine?.get(entry);
|
|
82
|
+
if (line === undefined)
|
|
83
|
+
return [];
|
|
84
|
+
const id = entry.kind === 'tool'
|
|
85
|
+
? `tool:${entry.turnId ?? ''}:${entry.toolUseId}`
|
|
86
|
+
: 'messageId' in entry
|
|
87
|
+
? `${entry.kind}:${entry.messageId}`
|
|
88
|
+
: `${entry.kind}:${index}`;
|
|
89
|
+
return [{ id, line }];
|
|
90
|
+
});
|
|
91
|
+
return { lines, anchors };
|
|
92
|
+
};
|
|
69
93
|
}
|
|
70
94
|
}
|
|
71
95
|
export class MakaStatusLineComponent {
|
|
@@ -121,11 +145,12 @@ export class MakaPiLayoutComponent extends Container {
|
|
|
121
145
|
editor;
|
|
122
146
|
statusLine;
|
|
123
147
|
terminal;
|
|
148
|
+
todoIndicator;
|
|
124
149
|
/** Composed lines of the previous render, for the viewport-top shadow diff. */
|
|
125
150
|
previousLines;
|
|
126
151
|
previousRows;
|
|
127
152
|
previousWidth;
|
|
128
|
-
constructor(state, transcript, activityStrip, pendingQueue, editor, statusLine, terminal) {
|
|
153
|
+
constructor(state, transcript, activityStrip, pendingQueue, editor, statusLine, terminal, todoIndicator) {
|
|
129
154
|
super();
|
|
130
155
|
this.state = state;
|
|
131
156
|
this.transcript = transcript;
|
|
@@ -134,9 +159,12 @@ export class MakaPiLayoutComponent extends Container {
|
|
|
134
159
|
this.editor = editor;
|
|
135
160
|
this.statusLine = statusLine;
|
|
136
161
|
this.terminal = terminal;
|
|
162
|
+
this.todoIndicator = todoIndicator;
|
|
137
163
|
this.addChild(transcript);
|
|
138
164
|
this.addChild(activityStrip);
|
|
139
165
|
this.addChild(pendingQueue);
|
|
166
|
+
if (todoIndicator)
|
|
167
|
+
this.addChild(todoIndicator);
|
|
140
168
|
this.addChild(editor);
|
|
141
169
|
this.addChild(statusLine);
|
|
142
170
|
}
|
|
@@ -145,14 +173,27 @@ export class MakaPiLayoutComponent extends Container {
|
|
|
145
173
|
const activityLines = this.activityStrip.render(width);
|
|
146
174
|
const allPendingLines = this.pendingQueue.render(width);
|
|
147
175
|
const statusLines = this.statusLine.render(width);
|
|
176
|
+
// Supplementary information must not steal the composer's minimum space.
|
|
177
|
+
const todoLines = this.terminal.rows >
|
|
178
|
+
activityLines.length +
|
|
179
|
+
allPendingLines.length +
|
|
180
|
+
statusLines.length +
|
|
181
|
+
this.editor.minimumViewportRows()
|
|
182
|
+
? (this.todoIndicator?.render(width) ?? []).slice(0, 1)
|
|
183
|
+
: [];
|
|
148
184
|
const pendingRowsAvailable = this.editor.isShowingAutocomplete()
|
|
149
185
|
? Math.max(0, this.terminal.rows -
|
|
150
186
|
activityLines.length -
|
|
151
187
|
statusLines.length -
|
|
188
|
+
todoLines.length -
|
|
152
189
|
this.editor.minimumViewportRows())
|
|
153
190
|
: allPendingLines.length;
|
|
154
191
|
const pendingLines = fitPendingQueueLines(allPendingLines, pendingRowsAvailable);
|
|
155
|
-
this.editor.setViewportRows(this.terminal.rows -
|
|
192
|
+
this.editor.setViewportRows(this.terminal.rows -
|
|
193
|
+
activityLines.length -
|
|
194
|
+
pendingLines.length -
|
|
195
|
+
statusLines.length -
|
|
196
|
+
todoLines.length);
|
|
156
197
|
const editorLines = this.editor.render(width);
|
|
157
198
|
// #1064: when the activity strip is showing (a turn is running), separate
|
|
158
199
|
// it from the last transcript line with a blank row. Without this, a
|
|
@@ -162,7 +203,11 @@ export class MakaPiLayoutComponent extends Container {
|
|
|
162
203
|
const lastTranscriptLine = transcriptLines[transcriptLines.length - 1];
|
|
163
204
|
const needGap = activityActive && lastTranscriptLine !== undefined && lastTranscriptLine.length > 0;
|
|
164
205
|
const paddedTranscript = needGap ? [...transcriptLines, ''] : transcriptLines;
|
|
165
|
-
const chromeRows = activityLines.length +
|
|
206
|
+
const chromeRows = activityLines.length +
|
|
207
|
+
pendingLines.length +
|
|
208
|
+
todoLines.length +
|
|
209
|
+
editorLines.length +
|
|
210
|
+
statusLines.length;
|
|
166
211
|
const viewportRows = Math.max(0, this.terminal.rows - chromeRows);
|
|
167
212
|
const paddingRows = Math.max(0, viewportRows - paddedTranscript.length);
|
|
168
213
|
const lines = [
|
|
@@ -170,6 +215,7 @@ export class MakaPiLayoutComponent extends Container {
|
|
|
170
215
|
...Array.from({ length: paddingRows }, () => ''),
|
|
171
216
|
...activityLines,
|
|
172
217
|
...pendingLines,
|
|
218
|
+
...todoLines,
|
|
173
219
|
...editorLines,
|
|
174
220
|
...statusLines,
|
|
175
221
|
];
|
|
@@ -210,7 +210,7 @@ export class McpManagementOverlay {
|
|
|
210
210
|
return;
|
|
211
211
|
const protocol = matchesKey(data, '1')
|
|
212
212
|
? 'legacy'
|
|
213
|
-
: matchesKey(data, '2')
|
|
213
|
+
: matchesKey(data, '2') || matchesKey(data, 'enter')
|
|
214
214
|
? 'auto'
|
|
215
215
|
: matchesKey(data, '3')
|
|
216
216
|
? '2026-07-28'
|
|
@@ -371,7 +371,7 @@ export class McpManagementOverlay {
|
|
|
371
371
|
return [ansi.bold(editor.transportTitle), '', '1 stdio', '2 Streamable HTTP'];
|
|
372
372
|
}
|
|
373
373
|
if (this.phase.kind === 'protocol') {
|
|
374
|
-
return [ansi.bold(editor.protocolTitle), '', '1 legacy', '2 auto', '3 2026-07-28'];
|
|
374
|
+
return [ansi.bold(editor.protocolTitle), '', '1 legacy', '2 auto (Enter)', '3 2026-07-28'];
|
|
375
375
|
}
|
|
376
376
|
if (this.phase.kind === 'confirm_add') {
|
|
377
377
|
return confirmAddDocument(this.phase.draft, this.input.locale);
|
package/dist/pi-tui-pickers.js
CHANGED
|
@@ -16,11 +16,12 @@
|
|
|
16
16
|
* specific language governing permissions and limitations
|
|
17
17
|
* under the License.
|
|
18
18
|
*/
|
|
19
|
-
import { CombinedAutocompleteProvider, Editor, Key, SelectList, decodeKittyPrintable, isKeyRepeat, matchesKey, truncateToWidth, visibleWidth, wrapTextWithAnsi, } from '@earendil-works/pi-tui';
|
|
19
|
+
import { CombinedAutocompleteProvider, Editor, Key, SelectList, decodeKittyPrintable, isKeyRelease, isKeyRepeat, matchesKey, truncateToWidth, visibleWidth, wrapTextWithAnsi, } from '@earendil-works/pi-tui';
|
|
20
20
|
import { defineUiMessageCatalog, formatUiMessage, resolveUiMessageCatalog, } from '@maka/core/ui-locale';
|
|
21
21
|
import { providerDefaultsOf, validateSlug, } from '@maka/core/llm-connections';
|
|
22
22
|
import { CONNECTION_NAME_MAX_LENGTH } from '@maka/core/runtime-policy';
|
|
23
23
|
import { ansi, editorTheme, selectListTheme, stripAnsi } from './tui-ansi.js';
|
|
24
|
+
import { stripUnfocusedCursorStyle } from './tui-editor-render.js';
|
|
24
25
|
import { TUI_COPY_RESOURCES } from './tui-copy-catalog.js';
|
|
25
26
|
const TUI_PICKER_COPY = resolveUiMessageCatalog(defineUiMessageCatalog()(TUI_COPY_RESOURCES.pickers));
|
|
26
27
|
export function onboardingFailureMessage(failure, locale) {
|
|
@@ -433,22 +434,13 @@ export class UserQuestionOverlay {
|
|
|
433
434
|
return assemble(cappedTitle, optionRows.map((rows) => clampRowsWithEllipsis(rows, perOption, safeWidth)));
|
|
434
435
|
}
|
|
435
436
|
renderInputRow(width) {
|
|
436
|
-
const
|
|
437
|
-
|
|
438
|
-
// Focused only while the input row is highlighted: that both shows the block
|
|
439
|
-
// cursor and emits the hardware-cursor marker (#1064) so IME candidate windows
|
|
440
|
-
// anchor to the edited text instead of the terminal bottom.
|
|
437
|
+
const marker = this.onInputRow ? '→' : ' ';
|
|
438
|
+
// Focus controls the IME marker and our cursor-visibility adapter (#1064).
|
|
441
439
|
this.editor.focused = this.onInputRow;
|
|
442
440
|
if (!this.onInputRow && this.editor.getText().length === 0) {
|
|
443
|
-
return [padLine(`${
|
|
441
|
+
return [padLine(`${marker} ${ansi.dim(this.input.placeholder)}`, width)];
|
|
444
442
|
}
|
|
445
|
-
|
|
446
|
-
// so the answer reads as one row of the list.
|
|
447
|
-
const editorLines = this.editor.render(contentWidth).slice(1, -1);
|
|
448
|
-
if (editorLines.length === 0) {
|
|
449
|
-
return [padLine(`${prefix}${ansi.dim(this.input.placeholder)}`, width)];
|
|
450
|
-
}
|
|
451
|
-
return editorLines.map((line, index) => padLine(`${index === 0 ? prefix : ' '}${line}`, width));
|
|
443
|
+
return renderFieldRow(this.editor, marker, width);
|
|
452
444
|
}
|
|
453
445
|
}
|
|
454
446
|
export function modelPickerItems(currentModel, models, locale) {
|
|
@@ -552,6 +544,107 @@ function matchesModelChoice(choice, query) {
|
|
|
552
544
|
return true;
|
|
553
545
|
return false;
|
|
554
546
|
}
|
|
547
|
+
export class SessionSearchOverlay {
|
|
548
|
+
tui;
|
|
549
|
+
input;
|
|
550
|
+
renderWidth = 0;
|
|
551
|
+
searchEditor;
|
|
552
|
+
copy;
|
|
553
|
+
choices;
|
|
554
|
+
filtered;
|
|
555
|
+
list;
|
|
556
|
+
selectedValue;
|
|
557
|
+
scopeLabel;
|
|
558
|
+
constructor(tui, input) {
|
|
559
|
+
this.tui = tui;
|
|
560
|
+
this.input = input;
|
|
561
|
+
this.copy = getTuiPickerCopy(input.locale);
|
|
562
|
+
this.choices = input.choices;
|
|
563
|
+
this.filtered = input.choices;
|
|
564
|
+
this.scopeLabel = input.scopeLabel;
|
|
565
|
+
this.list = this.buildList();
|
|
566
|
+
this.searchEditor = new Editor(tui, editorTheme(), { paddingX: 0 });
|
|
567
|
+
this.searchEditor.onChange = (text) => this.applyQuery(text);
|
|
568
|
+
}
|
|
569
|
+
updateChoices(choices, scopeLabel) {
|
|
570
|
+
this.choices = choices;
|
|
571
|
+
this.scopeLabel = scopeLabel;
|
|
572
|
+
this.applyQuery(this.searchEditor.getText());
|
|
573
|
+
}
|
|
574
|
+
buildList() {
|
|
575
|
+
const list = new SelectList(this.filtered.map(({ item }) => item), 10, selectListTheme(), {
|
|
576
|
+
minPrimaryColumnWidth: 20,
|
|
577
|
+
maxPrimaryColumnWidth: Math.max(20, this.renderWidth - 30),
|
|
578
|
+
});
|
|
579
|
+
const selectedIndex = this.filtered.findIndex(({ item }) => item.value === this.selectedValue);
|
|
580
|
+
if (selectedIndex >= 0)
|
|
581
|
+
list.setSelectedIndex(selectedIndex);
|
|
582
|
+
list.onSelectionChange = (item) => {
|
|
583
|
+
this.selectedValue = item.value;
|
|
584
|
+
};
|
|
585
|
+
list.onSelect = (item) => {
|
|
586
|
+
this.selectedValue = item.value;
|
|
587
|
+
this.input.onSelect(item);
|
|
588
|
+
};
|
|
589
|
+
list.onCancel = () => this.input.onCancel();
|
|
590
|
+
return list;
|
|
591
|
+
}
|
|
592
|
+
applyQuery(text) {
|
|
593
|
+
const query = text.trim().toLocaleLowerCase();
|
|
594
|
+
this.filtered = query
|
|
595
|
+
? this.choices.filter((choice) => choice.searchText.includes(query))
|
|
596
|
+
: this.choices;
|
|
597
|
+
this.list = this.buildList();
|
|
598
|
+
}
|
|
599
|
+
invalidate() {
|
|
600
|
+
this.searchEditor.invalidate();
|
|
601
|
+
this.list.invalidate();
|
|
602
|
+
}
|
|
603
|
+
handleInput(data) {
|
|
604
|
+
if (matchesKey(data, Key.escape) || matchesKey(data, Key.ctrl('c'))) {
|
|
605
|
+
this.input.onCancel();
|
|
606
|
+
return;
|
|
607
|
+
}
|
|
608
|
+
if (matchesKey(data, Key.tab) && !isKeyRelease(data) && !isKeyRepeat(data)) {
|
|
609
|
+
this.input.onToggleScope();
|
|
610
|
+
return;
|
|
611
|
+
}
|
|
612
|
+
if (matchesKey(data, Key.up) || matchesKey(data, Key.down) || matchesKey(data, Key.enter)) {
|
|
613
|
+
if (matchesKey(data, Key.enter) && isKeyRepeat(data))
|
|
614
|
+
return;
|
|
615
|
+
this.list.handleInput(data);
|
|
616
|
+
return;
|
|
617
|
+
}
|
|
618
|
+
this.searchEditor.handleInput(data);
|
|
619
|
+
}
|
|
620
|
+
render(width) {
|
|
621
|
+
const safeWidth = Math.max(1, width);
|
|
622
|
+
if (safeWidth !== this.renderWidth) {
|
|
623
|
+
this.renderWidth = safeWidth;
|
|
624
|
+
this.list = this.buildList();
|
|
625
|
+
}
|
|
626
|
+
this.searchEditor.focused = true;
|
|
627
|
+
return [
|
|
628
|
+
padLine(`${this.copy.resumeSessionTitle} ${ansi.accent(this.scopeLabel)}`, safeWidth),
|
|
629
|
+
padLine(ansi.dim(this.copy.sessionSearchHint), safeWidth),
|
|
630
|
+
padLine('', safeWidth),
|
|
631
|
+
...this.renderFieldRow(safeWidth),
|
|
632
|
+
padLine('', safeWidth),
|
|
633
|
+
...(this.filtered.length === 0
|
|
634
|
+
? [padLine(ansi.dim(this.copy.noMatchingSessions), safeWidth)]
|
|
635
|
+
: this.list.render(safeWidth).map((line) => formatPickerItemLine(line, safeWidth))),
|
|
636
|
+
padLine(ansi.accent('-'.repeat(safeWidth)), safeWidth),
|
|
637
|
+
];
|
|
638
|
+
}
|
|
639
|
+
renderFieldRow(width) {
|
|
640
|
+
const prefix = `${this.copy.searchLabel} `;
|
|
641
|
+
const contentWidth = Math.max(1, width - visibleWidth(prefix));
|
|
642
|
+
const editorLines = this.searchEditor.render(contentWidth).slice(1, -1);
|
|
643
|
+
return editorLines.length > 0
|
|
644
|
+
? editorLines.map((line, index) => padLine(`${index === 0 ? prefix : ' '.repeat(prefix.length)}${line}`, width))
|
|
645
|
+
: [padLine(prefix, width)];
|
|
646
|
+
}
|
|
647
|
+
}
|
|
555
648
|
export function getTuiPickerCopy(locale) {
|
|
556
649
|
return TUI_PICKER_COPY[locale];
|
|
557
650
|
}
|
|
@@ -649,14 +742,7 @@ export class ModelSearchOverlay {
|
|
|
649
742
|
];
|
|
650
743
|
}
|
|
651
744
|
renderFieldRow(editor, label, width) {
|
|
652
|
-
|
|
653
|
-
const prefixWidth = visibleWidth(prefix);
|
|
654
|
-
const contentWidth = Math.max(1, width - prefixWidth);
|
|
655
|
-
const editorLines = editor.render(contentWidth).slice(1, -1);
|
|
656
|
-
if (editorLines.length === 0) {
|
|
657
|
-
return [padLine(prefix, width)];
|
|
658
|
-
}
|
|
659
|
-
return editorLines.map((line, index) => padLine(`${index === 0 ? prefix : ' '.repeat(prefixWidth)}${line}`, width));
|
|
745
|
+
return renderFieldRow(editor, label, width);
|
|
660
746
|
}
|
|
661
747
|
}
|
|
662
748
|
/**
|
|
@@ -772,6 +858,18 @@ function padLine(text, width) {
|
|
|
772
858
|
const trimmed = visibleWidth(text) > safeWidth ? truncateToWidth(text, safeWidth, '') : text;
|
|
773
859
|
return `${trimmed}${' '.repeat(Math.max(0, safeWidth - visibleWidth(trimmed)))}`;
|
|
774
860
|
}
|
|
861
|
+
function renderFieldRow(editor, label, width) {
|
|
862
|
+
const prefix = `${label} `;
|
|
863
|
+
const prefixWidth = visibleWidth(prefix);
|
|
864
|
+
const contentWidth = Math.max(1, width - prefixWidth);
|
|
865
|
+
// These field editors have no autocomplete rows. Keep Editor's wrapping and
|
|
866
|
+
// scrolling, but omit its top/bottom borders.
|
|
867
|
+
const lines = editor.render(contentWidth).slice(1, -1);
|
|
868
|
+
const editorLines = stripUnfocusedCursorStyle(lines, editor.focused);
|
|
869
|
+
if (editorLines.length === 0)
|
|
870
|
+
return [padLine(prefix, width)];
|
|
871
|
+
return editorLines.map((line, index) => padLine(`${index === 0 ? prefix : ' '.repeat(prefixWidth)}${line}`, width));
|
|
872
|
+
}
|
|
775
873
|
function keyEntryHint(copy, hasConnection, returnsTo) {
|
|
776
874
|
const action = hasConnection ? 'reuse' : 'enter';
|
|
777
875
|
return copy.keyHints[action][returnsTo];
|
|
@@ -1445,13 +1543,6 @@ export class OnboardingWizard {
|
|
|
1445
1543
|
];
|
|
1446
1544
|
}
|
|
1447
1545
|
renderFieldRow(editor, label, width) {
|
|
1448
|
-
|
|
1449
|
-
const prefixWidth = visibleWidth(prefix);
|
|
1450
|
-
const contentWidth = Math.max(1, width - prefixWidth);
|
|
1451
|
-
const editorLines = editor.render(contentWidth).slice(1, -1);
|
|
1452
|
-
if (editorLines.length === 0) {
|
|
1453
|
-
return [padLine(prefix, width)];
|
|
1454
|
-
}
|
|
1455
|
-
return editorLines.map((line, index) => padLine(`${index === 0 ? prefix : ' '.repeat(prefixWidth)}${line}`, width));
|
|
1546
|
+
return renderFieldRow(editor, label, width);
|
|
1456
1547
|
}
|
|
1457
1548
|
}
|