glasspane-mcp 1.16.4 → 1.19.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/README.md CHANGED
@@ -36,9 +36,13 @@ MCP 客户端配置:
36
36
 
37
37
  ## What ships in this package / 包里有什么
38
38
 
39
- `dist/index.js` 是 esbuild 单文件产物:`@iterate/kernel`(schema 真源)在发布时
40
- 已捆绑内联,包内不存在指向源码仓库的 `file:` 依赖;`schemas/` 是 kernel schema
41
- 的发布副本,每次 `npm run bundle` 重新同步。
39
+ `dist/index.js` 是 esbuild 单文件产物:已发布的 `iterate-kernel`(schema 真源,devDependency,
40
+ 只按 `iterate-kernel/<module>` 子路径引入)在发布时已捆绑内联,包内不存在指向源码仓库的
41
+ `file:` 依赖,也不残留一个裸的 `import "iterate-kernel"`——后者会让装到本机的产物去解析一份
42
+ 没人拿这份产物对照过的内核,比 `ERR_MODULE_NOT_FOUND` 安静,但不更安全;发布档的
43
+ bundle-shape 闸专拒这一条。`schemas/` 是内核契约的发布副本,每次 `npm run bundle` 由
44
+ `scripts/bundle-kernel-schemas.mjs` 从**装好的那一份包**重新同步,并核
45
+ manifest 声明 = 装到的 = fork 的 pin 三者同号。
42
46
 
43
47
  两个入口,各自是什么就按什么用 / two entries, each with one job:
44
48
 
@@ -26,7 +26,7 @@ export declare const MCP_PROTOCOL_VERSION: "2025-06-18";
26
26
  export declare const SUPPORTED_PROTOCOL_VERSIONS: readonly string[];
27
27
  export declare const SERVER_INFO: {
28
28
  readonly name: "glasspane-mcp";
29
- readonly version: "1.16.4";
29
+ readonly version: "1.19.0";
30
30
  };
31
31
  export declare const PARSE_ERROR = -32700;
32
32
  export declare const INVALID_REQUEST = -32600;
@@ -92,6 +92,22 @@ export declare class McpServer {
92
92
  private asParams;
93
93
  private isRequestBody;
94
94
  private result;
95
+ /**
96
+ * The example for the two `tools/call` **shape** refusals, taken from the list this server
97
+ * actually answers. A JSON-RPC reader cannot open a source symbol, and an example naming a
98
+ * tool this surface does not publish would be a second refusal waiting to happen — so the
99
+ * preference is a published tool that is legal to call with an empty `arguments`.
100
+ * `test/dispatch.test.mjs` checks every name in this sentence against `tools/list`, and
101
+ * checks it again on a server deliberately built with a one-tool list.
102
+ */
103
+ private callShapeRemedy;
104
+ /**
105
+ * The names this server actually answers with, nearest the caller's guess first. Every
106
+ * name offered here is one `tools/list` just advertised: a suggestion the caller cannot
107
+ * call is worse than no suggestion, and the point of the sentence is to end the guessing
108
+ * loop a bare `Unknown tool: gp_acti` left the caller in.
109
+ */
110
+ private publishedNamesNear;
95
111
  private error;
96
112
  }
97
113
  /**
@@ -184,6 +184,28 @@ export declare const RESTORE_BASE_DEADLINE_MS = 30000;
184
184
  export declare function isReplayUnsafeMethod(method: string): boolean;
185
185
  /** The non-replayable methods, for gates that must see the set change on purpose. */
186
186
  export declare const REPLAY_UNSAFE_METHOD_NAMES: readonly string[];
187
+ /**
188
+ * The answer this shell gives when the daemon's error frame carries no remedy at all.
189
+ *
190
+ * It used to be one sentence for every method — "check the daemon log (stderr) and retry" —
191
+ * which made the transport order by words the re-send it refuses by behaviour: `act`,
192
+ * `restore` and `attach` are the methods {@link REPLAY_UNSAFE_REASONS} exists to keep off
193
+ * the wire a second time, `slowEngineRemedy` says *do NOT re-issue* for them, and
194
+ * `writeBacklogRemedy` refuses even to name a probe while one is outstanding. An error
195
+ * frame is the daemon's answer to *this* request, so the request did reach the service —
196
+ * and whether the change took effect before the error was raised is a thing no error frame
197
+ * says, which is exactly why the sentence may not spend that unknown on a second copy.
198
+ * `snapshot` is the third case and the one a blanket "retry" also got wrong: nothing is
199
+ * pressed twice, but every accepted copy writes another entry into the daemon's bounded
200
+ * ring and can evict the baseline an earlier snapshot returned — the one a later restore
201
+ * still needs. Membership comes from the two lists this file already keeps, so a method
202
+ * moving between them moves this answer with it.
203
+ *
204
+ * `null` is the unattributed case: an id-less frame this client could not tie to a request
205
+ * it still tracks, where naming a method would be a guess and authorising a re-send on top
206
+ * of the guess would be worse.
207
+ */
208
+ export declare function noRemedyFallback(method: string | null): string;
187
209
  /**
188
210
  * `hello.capabilities` 的第一个读者(2026-10-11)。
189
211
  *
@@ -410,6 +432,26 @@ export declare class EngineJsonRpcClient {
410
432
  * unexposed; `index.ts` supplies the real list.
411
433
  */
412
434
  expectedDaemonMethods?: readonly string[]);
435
+ /**
436
+ * The state root the daemon named in its own `hello` (additive since 1.15.0), or null
437
+ * when no handshake answered that key. `null` means "this daemon does not report it" —
438
+ * never "therefore it is the home default"; callers say which of the two they used.
439
+ */
440
+ private helloStateRoot;
441
+ get reportedStateRoot(): string | null;
442
+ /**
443
+ * The version the daemon named in its own `hello`, or null when no handshake on this
444
+ * connection has reported one.
445
+ *
446
+ * This is the *producer's* measurement, and it is what the provider attribution line
447
+ * states (`providers.ts`'s `attributeCapability`): the verdict an agent is being told
448
+ * about came out of the daemon's build, not this package's. Read rather than assumed —
449
+ * `null` means "not measured on this connection", never "therefore it is the shell's
450
+ * own version", which is the mistake that made an app bundle older than the shell
451
+ * report a verdict from a build that did not produce it.
452
+ */
453
+ private helloVersion;
454
+ get reportedEngineVersion(): string | null;
413
455
  /**
414
456
  * Sink for facts that cannot be attached to any request of the caller: a
415
457
  * late reply, a frame with an id this client never issued, a daemon that
package/dist/errors.d.ts CHANGED
@@ -81,4 +81,5 @@ export interface ToolErrorText {
81
81
  */
82
82
  export declare function formatToolError(code: string, message: string, remedy: string): string;
83
83
  export declare function formatToolErrorShape(error: ToolErrorText): string;
84
+ export declare function quoteShellArg(value: string): string;
84
85
  //# sourceMappingURL=errors.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { EvidencePack } from "@iterate/kernel";
1
+ import type { EvidencePack } from "iterate-kernel/evidence-pack";
2
2
  /**
3
3
  * What a report may be handed: a validated pack, or the same structure with
4
4
  * `schemaVersion` widened so it can carry provenance text