paseo-plugin-zcode-provider 0.4.4 → 0.5.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.
Files changed (51) hide show
  1. package/NOTICE.md +2 -2
  2. package/README.md +14 -12
  3. package/client/account.tsx +13 -22
  4. package/index.server.ts +1 -3
  5. package/package.json +4 -4
  6. package/paseo-plugin.json +1 -1
  7. package/server/build-info.ts +1 -1
  8. package/server/diagnostics.ts +4 -1
  9. package/server/discovery/manifest.ts +2 -2
  10. package/server/errors.ts +1 -0
  11. package/server/host/bridge.ts +3 -0
  12. package/server/mapping.ts +23 -6
  13. package/server/provider-status.ts +3 -3
  14. package/server/provider.ts +16 -1
  15. package/server/runtime/pins.ts +3 -3
  16. package/server/session.ts +49 -13
  17. package/server/turn-failure.ts +6 -1
  18. package/server/usage.ts +1 -3
  19. package/server/vendor/zcode/NOTICE.md +1 -1
  20. package/server/vendor/zcode/packages/rpc/src/channelClient.ts +18 -3
  21. package/server/vendor/zcode/packages/rpc/src/channelServer.ts +32 -12
  22. package/server/vendor/zcode/packages/rpc/src/channels.shared.ts +8 -1
  23. package/server/vendor/zcode/packages/rpc/src/serialization.ts +9 -3
  24. package/server/vendor/zcode/packages/shared/src/browser-use/command-metadata.ts +2 -0
  25. package/server/vendor/zcode/packages/shared/src/browser-use/commands.ts +2 -0
  26. package/server/vendor/zcode/packages/shared/src/browser-use/result.ts +4 -0
  27. package/server/vendor/zcode/packages/shared/src/gen-ui/contract.ts +246 -0
  28. package/server/vendor/zcode/packages/shared/src/gen-ui/tweakProtocol.ts +143 -0
  29. package/server/vendor/zcode/packages/shared/src/{localTtft.ts → local-ttft/contract.ts} +56 -1
  30. package/server/vendor/zcode/packages/shared/src/mcp-apps/contract.ts +8 -0
  31. package/server/vendor/zcode/packages/shared/src/official-mcp-auth.ts +8 -0
  32. package/server/vendor/zcode/packages/shared/src/protocol.ts +2 -0
  33. package/server/vendor/zcode/packages/shared/src/request-security-edition/verification-policy.ts +9 -1
  34. package/server/vendor/zcode/packages/shared/src/runtimeEnv.ts +10 -0
  35. package/server/vendor/zcode/packages/shared/src/server-remote.ts +2 -0
  36. package/server/vendor/zcode/packages/shared/src/source-server/compatibility.ts +11 -0
  37. package/server/vendor/zcode/packages/shared/src/source-server/contracts.ts +21 -1
  38. package/server/vendor/zcode/packages/shared/src/source-server/errorCodes.ts +27 -9
  39. package/server/vendor/zcode/packages/shared/src/subagent-profile.ts +5 -0
  40. package/server/vendor/zcode/packages/shared/src/validationAppSettings.ts +1 -0
  41. package/server/vendor/zcode/packages/shared/src/zcode-protocol/index.ts +164 -11
  42. package/server/vendor/zcode/packages/shared/src/zcode-protocol-legacy-types.ts +1 -0
  43. package/server/vendor/zcode/packages/shared/src/zcode-protocol-v4/apply.ts +4 -2
  44. package/server/vendor/zcode/packages/shared/src/zcode-protocol-v4/command.ts +11 -7
  45. package/server/vendor/zcode/packages/shared/src/zcode-protocol-v4/delta.ts +2 -0
  46. package/server/vendor/zcode/packages/shared/src/zcode-protocol-v4/input-intent.ts +2 -0
  47. package/server/vendor/zcode/packages/shared/src/zcode-protocol-v4/rows.ts +19 -1
  48. package/server/vendor/zcode/packages/shared/src/zcode-protocol-v4/snapshot.ts +11 -0
  49. package/server/vendor/zcode/packages/shared/src/zcode-protocol-v4/transport.ts +20 -1
  50. package/server/vendor/zcode/packages/shared/src/zcode-protocol-v4/workflow-row-meta.ts +8 -0
  51. package/server/vendor/zcode/provenance.json +71 -63
package/NOTICE.md CHANGED
@@ -16,11 +16,11 @@ ZCode は統合 CLI を配布していないため、このリポジトリは `z
16
16
 
17
17
  Node.js は利用者のマシンが nodejs.org の公式成果物を直接取得します。このリポジトリは Node.js を再配布しません。
18
18
 
19
- `server/vendor/zcode` は [zai-org/ZCode](https://github.com/zai-org/ZCode/tree/3c5b227649371507ddc4eb46ac5133afe6db1cab) の RPC、V4 契約、wire 組み立てと純粋な差分適用、および必要なスキーマ依存を含みます。第一者コードは [上流 LICENSE](server/vendor/zcode/LICENSE) の Apache-2.0、RPC と wire codec の VS Code 由来部分は [MIT の通知](server/vendor/zcode/THIRD-PARTY-NOTICES.md) の条件を保持します。[上流 NOTICE](server/vendor/zcode/NOTICE.md) は全文を保持しており、上流製品全体の説明です。そこに記載された全機能・依存がプラグインへ同梱されることを意味しません。
19
+ `server/vendor/zcode` は [zai-org/ZCode](https://github.com/zai-org/ZCode/tree/a9fe401eede6e6e5e01be9048679c206fe6f02d9) の RPC、V4 契約、wire 組み立てと純粋な差分適用、および必要なスキーマ依存を含みます。第一者コードは [上流 LICENSE](server/vendor/zcode/LICENSE) の Apache-2.0、RPC と wire codec の VS Code 由来部分は [MIT の通知](server/vendor/zcode/THIRD-PARTY-NOTICES.md) の条件を保持します。[上流 NOTICE](server/vendor/zcode/NOTICE.md) は全文を保持しており、上流製品全体の説明です。そこに記載された全機能・依存がプラグインへ同梱されることを意味しません。
20
20
 
21
21
  ファイルごとの出典・SHA-256、private workspace import の変更、第三者通知の抽出範囲を [provenance.json](server/vendor/zcode/provenance.json) に記録しています。取得・照合は `scripts/sync-zcode-source.mjs` で行います。`npm run build` はこれらのライセンス・通知を `dist/licenses/zcode` にも配置します。
22
22
 
23
- 開発 SDK は `@getpaseo/plugin@0.12.0` です。ビルドは `@getpaseo/plugin/server/provider` と `zod` を外部モジュールとして維持し、Paseo に解決させます。
23
+ 開発 SDK は `@getpaseo/plugin@0.15.3` です。ビルドは `@getpaseo/plugin/server/provider` と `zod` を外部モジュールとして維持し、Paseo に解決させます。
24
24
 
25
25
  `icon.svg` は [Paseo main c424f829 の glm-acp-agent.svg](https://github.com/getpaseo/paseo/blob/c424f82922fcd36aa9cc9e473644bca04417b420/packages/app/src/assets/acp-provider-icons/glm-acp-agent.svg) のコピーです。この SVG は [ACP Registry の glm-acp-agent/icon.svg](https://github.com/agentclientprotocol/registry/blob/f3826ddd6e35951ea9b7fd0cf43c35a30c3c64cd/glm-acp-agent/icon.svg) とバイト単位で一致します。ACP Registry は Apache-2.0 で配布されており、その [LICENSE](vendor/acp-registry/LICENSE) を保持しています。アイコンは変更していません。商標への権利や公式の承認を示すものではありません。
26
26
 
package/README.md CHANGED
@@ -10,10 +10,10 @@ This is an unofficial plugin. It is not endorsed or maintained by ZCode or Z.ai.
10
10
 
11
11
  | Setting | Requirement |
12
12
  | -------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
13
- | Paseo | 0.9.0 or later; development SDK 0.12.0 |
13
+ | Paseo | 0.15.0 or later; development SDK 0.15.3 |
14
14
  | Plugin Node.js | 22.12.0 or later (the Paseo daemon's runtime) |
15
15
  | Managed setup | darwin-arm64, linux-x64, linux-arm64, win-x64, win-arm64 |
16
- | ZCode | Managed: 3.16.2 (release `3.16.2-paseo.1`) with Node.js 24.21.0. Overrides: stable Server 3.14.0+ / Agent 0.16.9+ with Node.js 24.14.0+ |
16
+ | ZCode | Managed: 3.17.2 (release `3.17.2-paseo.1`) with Node.js 24.21.0. Overrides: stable Server 3.14.0+ / Agent 0.16.9+ with Node.js 24.14.0+ |
17
17
 
18
18
  ## Installation
19
19
 
@@ -24,9 +24,9 @@ paseo plugin add npm:paseo-plugin-zcode-provider
24
24
  paseo plugin ls
25
25
  ```
26
26
 
27
- You can also paste `npm:paseo-plugin-zcode-provider` into **Settings → Plugins → Plugin source**. npm packages require Paseo 0.9.0 or later and npm on the daemon host. Paseo installs the released version and compiles the plugin. Update with `paseo plugin update zcode-provider`. Plugins execute with the daemon user's permissions.
27
+ You can also paste `npm:paseo-plugin-zcode-provider` into **Settings → Plugins → Plugin source**. npm packages require npm on the daemon host. Paseo installs the released version and compiles the plugin. Update with `paseo plugin update zcode-provider`. Plugins execute with the daemon user's permissions.
28
28
 
29
- To follow the `main` branch instead, install the Git repository with `paseo plugin add github:supermomonga/paseo-plugin-zcode-provider` (Paseo 0.9.0 or later). Since Paseo 0.11.0, the form without `github:` looks the plugin up in Paseo's plugin registry, which does not list it. Paseo prepares the checkout with `npm ci`.
29
+ To follow the `main` branch instead, install the Git repository with `paseo plugin add github:supermomonga/paseo-plugin-zcode-provider`. The form without `github:` looks the plugin up in Paseo's plugin registry, which does not list it. Paseo prepares the checkout with `npm ci`.
30
30
 
31
31
  ## Setup
32
32
 
@@ -35,7 +35,7 @@ Open **Settings → Plugins → zcode-provider → Settings**. The screen has th
35
35
  On the **Runtime** tab, choose **Download and install**. The screen lists every download, its SHA-256, size and license before you start. Setup runs on the machine hosting the daemon:
36
36
 
37
37
  - Node.js 24.21.0 from nodejs.org.
38
- - The ZCode runtime 3.16.2 from this repository's [releases](https://github.com/supermomonga/paseo-plugin-zcode-provider/releases/tag/zcode-runtime-v3.16.2-paseo.1) (`3.16.2-paseo.1`). ZCode does not publish its integrated CLI, so this is an **unofficial build** of the public source with the patches in [patches/zcode](patches/zcode) applied (ADR 19), made and verified by CI. The patches hide Computer Use, Browser Use and Visualize, which cannot run or render here. It is not endorsed or maintained by ZCode or Z.ai.
38
+ - The ZCode runtime 3.17.2 from this repository's [releases](https://github.com/supermomonga/paseo-plugin-zcode-provider/releases/tag/zcode-runtime-v3.17.2-paseo.1) (`3.17.2-paseo.1`). ZCode does not publish its integrated CLI, so this is an **unofficial build** of the public source with the patches in [patches/zcode](patches/zcode) applied (ADR 19), made and verified by CI. The patches hide Computer Use, Browser Use and Visualize, which cannot run or render here. It is not endorsed or maintained by ZCode or Z.ai.
39
39
 
40
40
  Both archives are verified against SHA-256 values pinned in the plugin and extracted to the daemon user's data directory:
41
41
 
@@ -55,7 +55,7 @@ The **Account** tab uses ZCode's own account and provider services, the same one
55
55
  - **Sign in**: choose Z.ai (international) or BigModel (China) and press **Sign in**. The sign-in page opens in your browser; the link is also shown, so you can finish on any device. The daemon receives the result, then selects the account's Coding Plan unless a plan is already chosen. The **Plans** section shows which of the account's plans (Coding Plan, Start Plan) are available. ZCode allows one signed-in account at a time.
56
56
  - **Model providers**: add any number of providers that use an API key, from a ZCode template (Z.ai, BigModel, Kimi, MiniMax, DeepSeek, Alibaba Cloud, OpenAI, Anthropic, xAI, OpenRouter and others) or a custom endpoint with its base URL, API format and model IDs. Providers and models can be turned off, edited and deleted.
57
57
 
58
- API keys are sent to ZCode, which stores them as Desktop does, and are never shown again. The plugin itself stores no credentials. Afterwards, choose **ZCode** when creating an agent; the model list is refreshed after each change on Paseo 0.9 or later.
58
+ API keys are sent to ZCode, which stores them as Desktop does, and are never shown again. The plugin itself stores no credentials. Afterwards, choose **ZCode** when creating an agent; the model list is refreshed after each change.
59
59
 
60
60
  ### Timeline
61
61
 
@@ -63,7 +63,7 @@ ZCode adds a line when a turn runs on a different model than the previous turn,
63
63
 
64
64
  ### Coding Plan usage
65
65
 
66
- On Paseo 0.11 and later, Paseo's **Usage** screen and sidebar usage summary show a **ZCode** card for the signed-in account's Individual Coding Plan (Z.ai or BigModel). It lists the 5-hour, weekly, monthly tool-call and ZCode MCP quotas with their reset times, as ZCode Desktop does. The plugin asks ZCode's official usage service for this plan only, on the same ZCode Server as the Account tab. The service never uses an API key from the environment. Team Plan and Start Plan are not shown. Paseo 0.12.0 does not yet show usage in a ZCode agent's popover.
66
+ Paseo's **Usage** screen and sidebar usage summary show a **ZCode** card for the signed-in account's Individual Coding Plan (Z.ai or BigModel). It lists the 5-hour, weekly, monthly tool-call and ZCode MCP quotas with their reset times, as ZCode Desktop does. The plugin asks ZCode's official usage service for this plan only, on the same ZCode Server as the Account tab. The service never uses an API key from the environment. Team Plan and Start Plan are not shown. Nothing is requested while **Check usage** is off for the host. Paseo 0.15.3 does not yet show usage in a ZCode agent's popover.
67
67
 
68
68
  ### Using your own runtime
69
69
 
@@ -76,9 +76,9 @@ export PASEO_ZCODE_NODE=/absolute/path/to/node # ordinary Node.js 24.14.0
76
76
 
77
77
  `PASEO_ZCODE_RUNTIME` must contain `server/remote/zcode-server.cjs`, `agent/zcode.cjs`, its provider configuration, and `package.json`. Setting only one variable is an error. Newer stable versions are allowed, including major versions; passing the minimum check does not certify compatibility. A terminal export does not change an already running Desktop application. Electron, `process.execPath` and Desktop discovery are never used.
78
78
 
79
- Session environment variables are forwarded, subject to ZCode's own proxy, certificate and runtime environment handling.
79
+ Session environment variables are forwarded, subject to ZCode's own proxy, certificate and runtime environment handling. As Desktop does, the plugin sets `ZCODE_APP_VERSION` to the runtime's ZCode version, so model requests report it instead of the CLI's version.
80
80
 
81
- The source baseline is `3c5b227649371507ddc4eb46ac5133afe6db1cab` (ZCode 3.16.2, an untagged upstream `main` commit; see ADR 20). The managed runtime passed the stdio runtime contract on all five managed platforms in CI. See the [verification record](docs/verification.md) for exact coverage.
81
+ The source baseline is `a9fe401eede6e6e5e01be9048679c206fe6f02d9` (ZCode 3.17.2, upstream tag `v3.17.2`). The managed runtime passed the stdio runtime contract on all five managed platforms in CI. See the [verification record](docs/verification.md) for exact coverage.
82
82
 
83
83
  ## Behavior
84
84
 
@@ -86,13 +86,15 @@ The source baseline is `3c5b227649371507ddc4eb46ac5133afe6db1cab` (ZCode 3.16.2,
86
86
  - Text, thoughts, tools, subagent progress, usage and history use V4 snapshots and deltas. Tool output is marked when ZCode truncates it. Usage is cumulative; repeated snapshots do not add it again.
87
87
  - Text submitted during generation uses native guidance. Attachments use the native queue. Paseo reports one run across these native turns and completes it only after all accepted input has been consumed and foreground work has ended.
88
88
  - Paseo sends every message typed in the app during a run as a steer that asks to clear pending permissions. The plugin queues it first, then declines pending permissions, questions and Plan approvals with their deny action until ZCode reads the message, including requests opened in the meantime. Requests that appear after it is read are left to the user. Declining a Plan approval in Plan mode ends ZCode's turn; the message then starts the next native turn in the same Paseo run (ADR 22).
89
- - A failed turn reports a code classified from the attribution of ZCode's error: `MODEL_RATE_LIMITED`, `MODEL_AUTH_FAILED`, `MODEL_CONTEXT_EXCEEDED`, `MODEL_NETWORK_ERROR`, `MODEL_PROVIDER_ERROR` or `MODEL_REQUEST_FAILED` when the model provider or network failed, and `NATIVE_TURN_FAILED` otherwise. The message is the plugin's own text with the HTTP status and the provider's error code when known. The provider's own message, which can include a quota reset time, is not shown; Coding Plan reset times appear on Paseo 0.11's Usage screen (ADR 23).
89
+ - A failed turn reports a code classified from the attribution of ZCode's error: `MODEL_RATE_LIMITED`, `MODEL_AUTH_FAILED`, `MODEL_CONTEXT_EXCEEDED`, `MODEL_NETWORK_ERROR`, `MODEL_PROVIDER_ERROR`, `MODEL_CONTENT_FILTERED` or `MODEL_REQUEST_FAILED` when the model provider or network failed, and `NATIVE_TURN_FAILED` otherwise. The message is the plugin's own text with the HTTP status and the provider's error code when known. The provider's own message, which can include a quota reset time, is not shown; Coding Plan reset times appear on Paseo's Usage screen (ADR 23).
90
90
  - Acceptance is reported once, after the native acknowledgement. Unknown delivery results are never automatically resent. Stop identifies the current native execution, disables automatic queue execution and removes pending input. A new explicit run enables the queue again.
91
91
  - As in ZCode Desktop, successful hooks are not shown. A finished hook invocation appears once, as a notification, only when a hook was blocked, failed, timed out or was cancelled; context compaction also appears once, when it ends. Paseo appends every notification it receives, so progress is not reported. Model changes appear only when turned on (see [Timeline](#timeline)).
92
92
  - Native permission IDs, option values, questions and Plan approval retain their meanings. Question auto-resolution is disabled for each owned Server. Workspace hook trust is reviewed through the official CLI; it is not represented as “allow once.”
93
+ - From ZCode 3.17, a project's own MCP servers start only after they are trusted in ZCode Desktop (Settings → MCP Servers); ZCode has no CLI command for it. A session that uses the project's MCP configuration shows a warning while any of them awaits trust. MCP servers that Paseo passes to a session replace ZCode's MCP configuration, as before, and are marked as the user's, so the project's trust review does not block them.
93
94
  - Each session owns its Server process and environment. Metadata requests use temporary Servers. Closing stdin gives ZCode time to clean up before process termination.
95
+ - With **Release idle agents** (Host settings → Agents, on by default), Paseo closes an agent's session after an hour of inactivity and reopens it on the next message. The plugin keeps the session while ZCode still has a foreground turn, queued input, a pending question or approval, a running background command, subagent or workflow, or a goal that is active or being verified (ADR 25). A finished background command's result that ZCode has not yet delivered is not distinguishable and does not keep it. **Resume agents after restart** reopens agents interrupted by a host restart and sends the resume prompt. Both reopen the saved conversation with Paseo's saved mode and Plan settings ([ADR 14](docs/adr/0014-paseoの保存設定を再適用する復元を保証範囲とする.md)).
94
96
 
95
- The plugin uses ZCode's own skills, MCP configuration and tools. Browser Use and Computer Use cannot run in the plugin's ZCode, even when ZCode Desktop has them enabled: the Computer Use helper accepts only the signed Desktop app, and only Desktop provides browsers. ZCode's Visualize (interactive views in the conversation) renders only in Desktop. The plugin therefore hides all three from the model (ADR 19, ADR 21); Desktop is not affected. Generic rewind, independent Paseo child agents, hook-review UI and Goal/Workflow controls are outside this migration. `prompt.output_schema`, custom system prompts and `persist:false` are unsupported. A system prompt makes session creation fail with `INVALID_CONFIGURATION` and a message explaining why, including one appended by Paseo's Orchestration → System prompt setting or by another plugin that adds one to new agents. MCP `alwaysLoad` is unsupported; stdio MCP commands must be absolute paths. Provider options are unsupported: in Paseo 0.11 and later, `agents.providers.zcode.options` in Paseo's `config.json` makes sessions fail with `INVALID_CONFIGURATION`, and the `command` and `env` overrides there are not applied. Paseo does not show context usage reported before the first turn, and the plugin adds no substitute display; Coding Plan quota appears in Paseo 0.11's Usage screen (see [Coding Plan usage](#coding-plan-usage)).
97
+ The plugin uses ZCode's own skills, MCP configuration and tools. Browser Use and Computer Use cannot run in the plugin's ZCode, even when ZCode Desktop has them enabled: the Computer Use helper accepts only the signed Desktop app, and only Desktop provides browsers. ZCode's Visualize (interactive views in the conversation) renders only in Desktop. The plugin therefore hides all three from the model (ADR 19, ADR 21); Desktop is not affected. Generic rewind, independent Paseo child agents, hook-review UI and Goal/Workflow controls are outside this migration. `prompt.output_schema`, custom system prompts and `persist:false` are unsupported. A system prompt makes session creation fail with `INVALID_CONFIGURATION` and a message explaining why, including one appended by Paseo's Orchestration → System prompt setting or by another plugin that adds one to new agents. MCP `alwaysLoad` is unsupported; stdio MCP commands must be absolute paths. Provider options are unsupported: `agents.providers.zcode.options` in Paseo's `config.json` makes sessions fail with `INVALID_CONFIGURATION`, and the `command` and `env` overrides there are not applied. Paseo does not show context usage reported before the first turn, and the plugin adds no substitute display; Coding Plan quota appears in Paseo's Usage screen (see [Coding Plan usage](#coding-plan-usage)).
96
98
 
97
99
  ## Persistence
98
100
 
@@ -104,7 +106,7 @@ New conversations support listing, resume and paged V4 history. From ZCode 3.16,
104
106
 
105
107
  ## Diagnostics
106
108
 
107
- **Settings → Plugins → zcode-provider → Diagnostics** shows whether the managed runtime or the environment override is in use, the runtime and Node.js paths and versions, Server/Agent versions and hashes, minimum-version assessment and mapping location. The screen is read-only. Its optional version check does not prove that authentication or a model call succeeds. On Paseo 0.11 and later, **Settings → Providers** also shows ZCode as not installed until the runtime is set up and supported. Its diagnostic lists the runtime source, Server, Agent and Node.js versions and platform, or the reason the runtime cannot be used. This check reuses its result for 30 seconds and does not start ZCode, so sign-in problems still appear when a session starts.
109
+ **Settings → Plugins → zcode-provider → Diagnostics** shows whether the managed runtime or the environment override is in use, the runtime and Node.js paths and versions, Server/Agent versions and hashes, minimum-version assessment and mapping location. The screen is read-only. Its optional version check does not prove that authentication or a model call succeeds. **Settings → Providers** also shows ZCode as not installed until the runtime is set up and supported. Its diagnostic lists the runtime source, Server, Agent and Node.js versions and platform, or the reason the runtime cannot be used. This check reuses its result for 30 seconds and does not start ZCode, so sign-in problems still appear when a session starts.
108
110
 
109
111
  ```bash
110
112
  paseo plugin logs zcode-provider
@@ -1,13 +1,13 @@
1
1
  import { useCallback, useEffect, useRef, useState } from "react";
2
- import { Linking, Platform, Text, View } from "react-native";
2
+ import { Platform, Text, View } from "react-native";
3
3
  import {
4
4
  getPaseoClient,
5
5
  openExternalUrl,
6
6
  type PluginSurfaceProps,
7
7
  useRpc,
8
8
  } from "@getpaseo/plugin/client";
9
- import { copyText } from "@getpaseo/plugin/client/react-native";
10
9
  import {
10
+ copyText,
11
11
  SettingsAction,
12
12
  SettingsCard,
13
13
  SettingsInput,
@@ -56,18 +56,9 @@ const CUSTOM = "custom";
56
56
  const failure = (cause: unknown) =>
57
57
  cause instanceof Error ? cause.message : "The account request failed.";
58
58
 
59
- // openExternalUrl, copyText and getPaseoClient arrived in Paseo 0.9; 0.8
60
- // hosts omit them.
61
- async function openUrl(url: string): Promise<void> {
62
- if (typeof openExternalUrl === "function") await openExternalUrl(url);
63
- else await Linking.openURL(url);
64
- }
65
- const canCopy = typeof copyText === "function";
66
-
67
59
  // Paseo caches provider catalogs, so new models would otherwise appear only
68
60
  // after a manual refresh.
69
61
  function refreshCatalog(serverId: string): void {
70
- if (typeof getPaseoClient !== "function") return;
71
62
  getPaseoClient(serverId)
72
63
  .providers.refresh({ providers: ["zcode"] })
73
64
  .catch(() => {});
@@ -152,7 +143,7 @@ function Account({
152
143
  const { account, signIn } = view;
153
144
  const open = (url: string) => {
154
145
  setOpenError(null);
155
- openUrl(url).catch(() =>
146
+ openExternalUrl(url).catch(() =>
156
147
  setOpenError("The browser could not be opened. Copy the link instead."),
157
148
  );
158
149
  };
@@ -216,14 +207,12 @@ function Account({
216
207
  actionLabel="Open"
217
208
  onPress={() => open(signIn.authorizeUrl)}
218
209
  />,
219
- canCopy ? (
220
- <SettingsAction
221
- key="copy"
222
- label="Sign-in link"
223
- actionLabel="Copy"
224
- onPress={() => void copyText(signIn.authorizeUrl)}
225
- />
226
- ) : null,
210
+ <SettingsAction
211
+ key="copy"
212
+ label="Sign-in link"
213
+ actionLabel="Copy"
214
+ onPress={() => void copyText(signIn.authorizeUrl)}
215
+ />,
227
216
  <SettingsAction
228
217
  key="cancel"
229
218
  label="Cancel sign-in"
@@ -415,7 +404,7 @@ function NewProvider({
415
404
  label="Get an API key"
416
405
  hint={template.apiKeyManagementUrl}
417
406
  actionLabel="Open"
418
- onPress={() => void openUrl(template.apiKeyManagementUrl!)}
407
+ onPress={() => void openExternalUrl(template.apiKeyManagementUrl!)}
419
408
  />
420
409
  ) : null}
421
410
  <SettingsAction
@@ -554,7 +543,9 @@ function ProviderEditor({
554
543
  label="Get an API key"
555
544
  hint={provider.apiKeyManagementUrl}
556
545
  actionLabel="Open"
557
- onPress={() => void openUrl(provider.apiKeyManagementUrl!)}
546
+ onPress={() =>
547
+ void openExternalUrl(provider.apiKeyManagementUrl!)
548
+ }
558
549
  />
559
550
  ) : null}
560
551
  <SettingsAction
package/index.server.ts CHANGED
@@ -34,10 +34,8 @@ export default function contribute(server: PluginServerContext): () => void {
34
34
  );
35
35
  server.handle(zcodeAccountView, () => account.view());
36
36
  server.handle(zcodeAccountChange, (input) => account.change(input));
37
- // Usage sources arrived in Paseo 0.11; older daemons do not offer them.
38
37
  const usage = createUsageSource(account);
39
- if (typeof server.registerUsageSource === "function")
40
- server.registerUsageSource(usage.source);
38
+ server.registerUsageSource(usage.source);
41
39
  return () => {
42
40
  usage.dispose();
43
41
  timeline.dispose();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paseo-plugin-zcode-provider",
3
- "version": "0.4.4",
3
+ "version": "0.5.0",
4
4
  "description": "Unofficial Paseo provider plugin for ZCode, using the official stdio Services Server of the integrated ZCode CLI.",
5
5
  "keywords": [
6
6
  "paseo",
@@ -60,9 +60,9 @@
60
60
  "semver": "7.8.5"
61
61
  },
62
62
  "devDependencies": {
63
- "@getpaseo/client": "0.12.0",
64
- "@getpaseo/plugin": "0.12.0",
65
- "@getpaseo/protocol": "0.12.0",
63
+ "@getpaseo/client": "0.15.3",
64
+ "@getpaseo/plugin": "0.15.3",
65
+ "@getpaseo/protocol": "0.15.3",
66
66
  "@types/node": "22.18.3",
67
67
  "@types/react": "~19.2.0",
68
68
  "@types/semver": "7.8.0",
package/paseo-plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "zcode-provider",
3
3
  "requirements": {
4
- "paseo": ">=0.9.0"
4
+ "paseo": ">=0.15.0"
5
5
  }
6
6
  }
@@ -1,2 +1,2 @@
1
1
  // Generated from package.json by npm prepare / prebuild.
2
- export const PROVIDER_VERSION = "0.4.4";
2
+ export const PROVIDER_VERSION = "0.5.0";
@@ -17,8 +17,11 @@ const stages = [
17
17
  "session",
18
18
  "turn",
19
19
  ] as const;
20
- // ZCode's ModelFailureReason (apps/zcode-cli/packages/contracts/src/model/index.ts at 3c5b227).
20
+ // ZCode's ModelFailureReason (apps/zcode-cli/packages/contracts/src/model/index.ts at
21
+ // a9fe401), plus content_filter, which 3.17 sets outside that list for a reply
22
+ // the provider's content filter blocked (core/src/runtime/helpers/model-errors.ts).
21
23
  export const modelFailureReasons = [
24
+ "content_filter",
22
25
  "rate_limited",
23
26
  "provider_overloaded",
24
27
  "server_error",
@@ -1,7 +1,7 @@
1
1
  import { gte, parse } from "semver";
2
2
  import type { RuntimeIdentity } from "./types.js";
3
3
 
4
- export const ZCODE_SOURCE_COMMIT = "3c5b227649371507ddc4eb46ac5133afe6db1cab";
4
+ export const ZCODE_SOURCE_COMMIT = "a9fe401eede6e6e5e01be9048679c206fe6f02d9";
5
5
  export const MINIMUM_ZCODE_VERSION = { app: "3.14.0", cli: "0.16.9" } as const;
6
6
  export const MINIMUM_NODE_VERSION = "24.14.0";
7
7
 
@@ -33,4 +33,4 @@ export function assessCompatibility(identity: RuntimeIdentity): {
33
33
  }
34
34
 
35
35
  // Last reviewed public changelog release; source versions are not releases.
36
- export const LAST_REVIEWED_ZCODE_RELEASE = "3.16.2";
36
+ export const LAST_REVIEWED_ZCODE_RELEASE = "3.17.2";
package/server/errors.ts CHANGED
@@ -20,6 +20,7 @@ export type ZCodeErrorCode =
20
20
  | "MODEL_CONTEXT_EXCEEDED"
21
21
  | "MODEL_NETWORK_ERROR"
22
22
  | "MODEL_PROVIDER_ERROR"
23
+ | "MODEL_CONTENT_FILTERED"
23
24
  | "MODEL_REQUEST_FAILED"
24
25
  | "AUTH_REQUIRED"
25
26
  | "UNSUPPORTED_CONTENT"
@@ -144,6 +144,9 @@ export class ZCodeHostBridge implements HostBridge {
144
144
  env: {
145
145
  ...runtimeEnvironment(environment),
146
146
  ...UNSUPPORTED_CAPABILITY_ENVIRONMENT,
147
+ // The Agent inherits this and reports it in model request headers, or
148
+ // its CLI version without it. Desktop and the remote Core set it too.
149
+ ZCODE_APP_VERSION: runtime.identity.appVersion,
147
150
  ZCODE_SERVICE_AUTHORITY_MODE: "standalone-server",
148
151
  ZCODE_AGENT_SERVER_COMMAND: runtime.paths.executable,
149
152
  ZCODE_AGENT_SERVER_ARGS_JSON: JSON.stringify([
package/server/mapping.ts CHANGED
@@ -38,13 +38,22 @@ export const ZCODE_MODES: ProviderMode[] = [
38
38
  // ZCode 3.15.1 added guarded ("Autonomous mode"); older Servers reject it.
39
39
  const GUARDED_MINIMUM_APP_VERSION = "3.15.1";
40
40
 
41
- // The modes the runtime with this Server version supports.
42
- export function zcodeModes(appVersion: string | undefined): ProviderMode[] {
43
- const guarded =
41
+ // ZCode 3.17.1 added the MCP server `scope`; older Servers reject it.
42
+ const MCP_SCOPE_MINIMUM_APP_VERSION = "3.17.1";
43
+
44
+ function atLeast(appVersion: string | undefined, minimum: string): boolean {
45
+ return (
44
46
  appVersion !== undefined &&
45
47
  valid(appVersion) !== null &&
46
- gte(appVersion, GUARDED_MINIMUM_APP_VERSION);
47
- return guarded ? ZCODE_MODES : ZCODE_MODES.filter((m) => m.id !== "guarded");
48
+ gte(appVersion, minimum)
49
+ );
50
+ }
51
+
52
+ // The modes the runtime with this Server version supports.
53
+ export function zcodeModes(appVersion: string | undefined): ProviderMode[] {
54
+ return atLeast(appVersion, GUARDED_MINIMUM_APP_VERSION)
55
+ ? ZCODE_MODES
56
+ : ZCODE_MODES.filter((m) => m.id !== "guarded");
48
57
  }
49
58
 
50
59
  export function requireConfigurableMode(
@@ -151,7 +160,14 @@ export function catalogModels(
151
160
 
152
161
  export function mapMcpServers(
153
162
  servers: Record<string, ProviderMcpServerConfig> | undefined,
163
+ appVersion: string | undefined,
154
164
  ): Array<Record<string, unknown>> {
165
+ // Paseo's servers are not project declarations. Without a scope, ZCode
166
+ // treats them as such when the project declares the same name or its
167
+ // configuration is unreadable, and blocks them until the project is trusted.
168
+ const scope = atLeast(appVersion, MCP_SCOPE_MINIMUM_APP_VERSION)
169
+ ? { scope: "user" }
170
+ : {};
155
171
  return Object.entries(servers ?? {}).map(([name, server]) => {
156
172
  if (name.trim() === "") {
157
173
  throw new AdapterError(
@@ -174,6 +190,7 @@ export function mapMcpServers(
174
190
  }
175
191
  return {
176
192
  name,
193
+ ...scope,
177
194
  command: server.command,
178
195
  args: server.args ?? [],
179
196
  env: Object.entries(server.env ?? {}).map(([key, value]) => ({
@@ -189,7 +206,7 @@ export function mapMcpServers(
189
206
  }),
190
207
  );
191
208
  if (server.type === "http" || server.type === "sse") {
192
- return { type: server.type, name, url: server.url, headers };
209
+ return { type: server.type, name, ...scope, url: server.url, headers };
193
210
  }
194
211
  throw new AdapterError(
195
212
  "INVALID_CONFIGURATION",
@@ -62,9 +62,9 @@ async function check(
62
62
  }
63
63
 
64
64
  /**
65
- * Availability for Paseo's provider snapshot and diagnostics (Paseo 0.11+;
66
- * older daemons ignore it). It inspects the runtime without starting a Server,
67
- * so sign-in problems still surface when a session opens.
65
+ * Availability for Paseo's provider snapshot and diagnostics. It inspects the
66
+ * runtime without starting a Server, so sign-in problems still surface when a
67
+ * session opens.
68
68
  */
69
69
  export function createRuntimeStatus(options: RuntimeStatusOptions = {}) {
70
70
  const environment = options.environment ?? process.env;
@@ -62,6 +62,7 @@ export const CAPABILITIES = [
62
62
  "prompt.command",
63
63
  "prompt.image",
64
64
  "prompt.steer",
65
+ "session.can_stop_runtime",
65
66
  "session.configure",
66
67
  "session.list",
67
68
  "session.persistence",
@@ -478,6 +479,15 @@ export class ZCodeConnection implements ProviderConnection {
478
479
  case "session.interrupt":
479
480
  await entry.native.interrupt();
480
481
  break;
482
+ // Paseo asks before releasing an idle runtime; the answer is the reply.
483
+ case "session.can_stop_runtime":
484
+ this.emit({
485
+ type: "session.can_stop_runtime",
486
+ requestId: input.requestId,
487
+ sessionId: input.sessionId,
488
+ canStop: entry.native.canStopRuntime(),
489
+ });
490
+ return;
481
491
  case "session.permission":
482
492
  await entry.native.respondToPermission(
483
493
  input.permissionId,
@@ -553,7 +563,10 @@ export class ZCodeConnection implements ProviderConnection {
553
563
  }
554
564
  : {}),
555
565
  }),
556
- mcpServers: mapMcpServers(config.mcpServers),
566
+ mcpServers: mapMcpServers(
567
+ config.mcpServers,
568
+ host.diagnostic.appVersion,
569
+ ),
557
570
  },
558
571
  SessionSnapshotSchema,
559
572
  60000,
@@ -568,6 +581,8 @@ export class ZCodeConnection implements ProviderConnection {
568
581
  modelCatalog: selection.models,
569
582
  timeline: this.timeline,
570
583
  onClose() {},
584
+ // A non-empty list replaces ZCode's MCP configuration files.
585
+ projectMcpServers: Object.keys(config.mcpServers ?? {}).length === 0,
571
586
  });
572
587
  if (
573
588
  initialModel &&
@@ -55,12 +55,12 @@ export const MANAGED_NODE_ARCHIVES: Readonly<
55
55
  // Published by .github/workflows/zcode-runtime-release.yml from the pinned
56
56
  // source with patches/zcode applied (ADR 19). The same archive serves every
57
57
  // managed platform.
58
- export const MANAGED_ZCODE_VERSION = "3.16.2";
58
+ export const MANAGED_ZCODE_VERSION = "3.17.2";
59
59
  const MANAGED_ZCODE_RELEASE = `${MANAGED_ZCODE_VERSION}-paseo.1`;
60
60
  export const MANAGED_ZCODE_ARCHIVE: PinnedArchive = {
61
61
  url: `https://github.com/supermomonga/paseo-plugin-zcode-provider/releases/download/zcode-runtime-v${MANAGED_ZCODE_RELEASE}/zcode-runtime-${MANAGED_ZCODE_RELEASE}.tar.gz`,
62
- sha256: "01f3ee802f4c0b24c4023e366485120416a6acc92ec899a9edf7f2fc76eaa17d",
63
- size: 82_516_181,
62
+ sha256: "24e3a9b03260d7b800958ccba4cfdc8233eee67936170636da79d440245bd15d",
63
+ size: 83_086_942,
64
64
  };
65
65
 
66
66
  export function managedPlatform(
package/server/session.ts CHANGED
@@ -99,6 +99,8 @@ export class ZCodeSession {
99
99
  private modelCatalog: readonly ModelOption[],
100
100
  private readonly timeline: () => TimelinePreferences,
101
101
  private readonly onClose: () => void,
102
+ /** False when Paseo's MCP servers replace the project's configuration. */
103
+ private readonly projectMcpServers: boolean,
102
104
  ) {
103
105
  assertSnapshotWorkspace(snapshot, workspace);
104
106
  this.id = snapshot.session.sessionId;
@@ -114,6 +116,7 @@ export class ZCodeSession {
114
116
  modelCatalog: readonly ModelOption[];
115
117
  timeline: () => TimelinePreferences;
116
118
  onClose: () => void;
119
+ projectMcpServers: boolean;
117
120
  }): Promise<ZCodeSession> {
118
121
  const session = new ZCodeSession(
119
122
  options.bridge,
@@ -123,6 +126,7 @@ export class ZCodeSession {
123
126
  options.modelCatalog,
124
127
  options.timeline,
125
128
  options.onClose,
129
+ options.projectMcpServers,
126
130
  );
127
131
  session.unlistenFailure = options.bridge.onFailure((error) =>
128
132
  session.runtimeFailed(error),
@@ -316,19 +320,18 @@ export class ZCodeSession {
316
320
  this.state.pendingInteractions.some(
317
321
  (i) => i.kind === "workspaceHookReview",
318
322
  )
319
- ) {
320
- const item: ProviderTimelineItem = {
321
- id: "zcode:hook-trust",
322
- type: "notification",
323
- level: "warning",
324
- message:
325
- "ZCode workspace hooks require trust review. Review them with the official zcode hooks trust command.",
326
- };
327
- if (!this.presented.has(item.id)) {
328
- this.presented.set(item.id, { item });
329
- this.runEvent({ type: "timeline", item });
330
- }
331
- }
323
+ )
324
+ this.warnOnce(
325
+ "zcode:hook-trust",
326
+ "ZCode workspace hooks require trust review. Review them with the official zcode hooks trust command.",
327
+ );
328
+ // ZCode 3.17 counts the project's declarations even when Paseo's servers
329
+ // replace them, so the warning only applies to the project's configuration.
330
+ if (this.projectMcpServers && this.state.workspaceMcpAdmission)
331
+ this.warnOnce(
332
+ "zcode:mcp-trust",
333
+ "ZCode has not started this project's MCP servers because they are not trusted. Trust them in ZCode Desktop under Settings → MCP Servers, then start a new session.",
334
+ );
332
335
  this.changed();
333
336
  const run = this.active;
334
337
  if (
@@ -371,6 +374,17 @@ export class ZCodeSession {
371
374
  );
372
375
  }
373
376
  }
377
+ private warnOnce(id: string, message: string): void {
378
+ if (this.presented.has(id)) return;
379
+ const item: ProviderTimelineItem = {
380
+ id,
381
+ type: "notification",
382
+ level: "warning",
383
+ message,
384
+ };
385
+ this.presented.set(id, { item });
386
+ this.runEvent({ type: "timeline", item });
387
+ }
374
388
  private maybeComplete(): void {
375
389
  const run = this.active;
376
390
  if (
@@ -466,6 +480,28 @@ export class ZCodeSession {
466
480
  hasActiveTurn(): boolean {
467
481
  return !!this.active;
468
482
  }
483
+ /**
484
+ * Whether closing loses no native work (Paseo's idle runtime cleanup).
485
+ * Background Bash, subagents and workflow runs outlive the foreground turn,
486
+ * and an active goal continues on its own. Only `running` work counts, as in
487
+ * ZCode's own `hasBackgroundWork`: a finished one stays `resultPending` even
488
+ * after the turn that delivered its result.
489
+ */
490
+ canStopRuntime(): boolean {
491
+ this.assertOpen();
492
+ const state = this.state;
493
+ return (
494
+ !this.active &&
495
+ !this.pendingAdmissions &&
496
+ this.conversation.idle &&
497
+ !state.pendingInteractions.length &&
498
+ !state.pendingCommands.length &&
499
+ !state.backgroundWorks.some((w) => w.status === "running") &&
500
+ !state.subagents?.running.length &&
501
+ state.goal?.status !== "active" &&
502
+ state.goal?.status !== "verifying"
503
+ );
504
+ }
469
505
  subscribe(listener: (event: NativeSessionEvent) => void): () => void {
470
506
  this.listeners.add(listener);
471
507
  listener({ type: "usage_updated", usage: usage(this.state) });
@@ -29,6 +29,7 @@ const reasonCodes: Partial<Record<ModelFailureReason, TurnFailureCode>> = {
29
29
  tls_error: "MODEL_NETWORK_ERROR",
30
30
  server_error: "MODEL_PROVIDER_ERROR",
31
31
  provider_overloaded: "MODEL_PROVIDER_ERROR",
32
+ content_filter: "MODEL_CONTENT_FILTERED",
32
33
  };
33
34
 
34
35
  const messages: Record<
@@ -38,7 +39,7 @@ const messages: Record<
38
39
  NATIVE_TURN_FAILED: ["ZCode turn failed"],
39
40
  MODEL_RATE_LIMITED: [
40
41
  "The model provider's usage or rate limit was reached",
41
- "Wait for it to reset or switch models. For a ZCode Coding Plan, Paseo 0.11 and later show the reset times on the Usage screen.",
42
+ "Wait for it to reset or switch models. For a ZCode Coding Plan, Paseo shows the reset times on the Usage screen.",
42
43
  ],
43
44
  MODEL_AUTH_FAILED: [
44
45
  "The model provider is not signed in or rejected the credentials",
@@ -56,6 +57,10 @@ const messages: Record<
56
57
  "The model provider returned a server error or is overloaded",
57
58
  "Try again later.",
58
59
  ],
60
+ MODEL_CONTENT_FILTERED: [
61
+ "The model provider's content filter blocked the reply",
62
+ "Rephrase the request or switch models.",
63
+ ],
59
64
  MODEL_REQUEST_FAILED: ["The model provider rejected the request"],
60
65
  };
61
66
 
package/server/usage.ts CHANGED
@@ -1,6 +1,4 @@
1
1
  import { createHash } from "node:crypto";
2
- // Types only, from the module every supported Paseo resolves; Paseo 0.9–0.10
3
- // reject `@getpaseo/plugin/server/usage` even as a type import.
4
2
  import type {
5
3
  UsageReport,
6
4
  UsageSourceRegistration,
@@ -234,7 +232,7 @@ export interface UsageSourceOptions {
234
232
  }
235
233
 
236
234
  /**
237
- * Coding Plan quota for Paseo's Usage screen (Paseo 0.11+), read through
235
+ * Coding Plan quota for Paseo's Usage screen, read through
238
236
  * ZCode's official usage-stats service on the account Server (ADR 18).
239
237
  */
240
238
  export function createUsageSource(
@@ -49,7 +49,7 @@ AI 生成的代码、命令、解释、文件和建议可能存在错误、遗
49
49
  | 手机远程控制 | 启用远程控制并完成配对后,桌面与手机网页经外部 relay 交换会话内容、输入、任务状态、权限请求与附件预览等协议消息;relay 负责鉴权、配对、心跳与消息透传,不运行任务。配对与连接会发送设备、窗口与会话标识。relay 地址随发行配置确定,可由 `ZCODE_WEB_REMOTE_CONTROL_RELAY_WS_URL` 覆盖。 |
50
50
  | Bots 第三方聊天接入 | 配置 Bot 后,所选第三方聊天平台(如 Telegram、飞书/Lark)的消息可驱动任务;Bot 按回复模式把助手回复、工具调用、文件变更摘要及权限请求发送到该平台,平台方可获得这些内容。Bot 凭据保存在本地凭据服务,配置文件只保存引用。 |
51
51
  | 营销触达与奖励中心 | 登录后可从业务服务获取营销 Banner/弹窗配置及资源包并展示;点击、关闭等操作会上报确认/取消事件,领取类操作会调用套餐领取接口。奖励中心以内嵌网页打开,桥接接口向该页面提供主题、语言和登录状态。 |
52
- | 安装、插件获取、远端部署与更新 | 安装、发现、认证、部署和更新会访问仓库、包服务、插件市场、CDN 或更新服务器;统一 CLI 安装脚本会从配置的分发源读取版本清单并下载发行包。桌面自动更新受发行形态和运行条件控制,启用后可在启动及周期检查时请求更新清单,携带平台、渠道、设备等信息;平台取值可区分架构,版本信息还会影响更新选择。开源构建默认不启用自动更新(构建期可选能力);启用时,开发构建与打包版都接受 `ZCODE_UPDATE_FEED_URL` 环境变量及 `--zcode-update-feed-url` 启动参数覆盖更新源,用于诊断与应急。下载的代码可能随后被安装或执行,远端部署还可能将本地已有或下载的组件上传/复制到目标环境。下载检查、实际安装及运行组件的控制条件不同,不能统一描述成每步都先弹出确认。 |
52
+ | 安装、插件获取、远端部署与更新 | 安装、发现、认证、部署和更新会访问仓库、包服务、插件市场、CDN 或更新服务器;统一 CLI 安装脚本会从配置的分发源读取版本清单并下载发行包。桌面自动更新受发行形态和运行条件控制,启用后可在启动及周期检查时请求更新清单,携带平台、渠道、设备等信息;平台取值可区分架构,版本信息还会影响更新选择。开源构建默认不启用自动更新(构建期可选能力);启用时,仅未打包开发态接受 `ZCODE_UPDATE_FEED_URL` 环境变量及 `--zcode-update-feed-url` 启动参数覆盖更新源,用于诊断;打包应用忽略这两个入口,继续使用既有服务端 manifest 入口。下载的代码可能随后被安装或执行,远端部署还可能将本地已有或下载的组件上传/复制到目标环境。下载检查、实际安装及运行组件的控制条件不同,不能统一描述成每步都先弹出确认。 |
53
53
  | 工具、Hook、工作流与自动任务的交付或发布 | Shell、终端、Git、Node REPL、浏览器、插件、MCP 或工作流可以读取任务涉及的数据、向相应目标服务上传文件或生成物,并改变外部服务状态;生命周期 Hook 和已配置的定时/后台任务也可触发程序。权限规则、模式、插件配置及系统账号决定执行范围,不能保证每份外发内容都由用户逐项选择或每次外发都有独立确认。发布、发送、购买或部署完成后,本地取消或撤销不一定能恢复外部状态;权限边界见第二节。 |
54
54
  | 开发测试、调试与请求录制 | 显式运行相关开发工具时,可向配置的真实模型或工具服务发送测试提示、样例资料及认证头;配置为真实上游的录制代理可转发请求,不能因名称含测试/录制就认为完全离线。请求轨迹和调试文件还可能在本地保存模型内容;这些工具的触发入口与普通产品运行不同。 |
55
55
  | 构建、签名与维护者发布 | 显式运行安装、构建或发布脚本时,可下载依赖、原生二进制和运行时,将构建材料复制到发布共享目录、推送 Git,或交给签名工具、Apple 公证服务处理。外部签名工具及另行配置的 CI、存储和分发服务具有自己的网络行为;本仓未展开的流程不能仅凭脚本名称推定已核验。相关调用具有不同的启动入口、环境和凭据要求。CLI SEA 共享目录发布与上传会先校验第三方声明材料,校验失败会阻断该发布流程。当前 native-search 准备步骤按目标平台校验并解包仓库内置归档,本步骤不下载这些归档;Node 等其他组件有各自的下载链路。 |