@ai-matrx/desktop-protocol 0.21.35 → 0.21.36
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 +19 -2
- package/dist/client.d.cts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/index.cjs +33 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -4
- package/dist/index.d.ts +14 -4
- package/dist/index.js +33 -9
- package/dist/index.js.map +1 -1
- package/dist/{models-Sz1BEet6.d.cts → models-MgdG4k-4.d.cts} +2 -0
- package/dist/{models-Sz1BEet6.d.ts → models-MgdG4k-4.d.ts} +2 -0
- package/generated/desktop-protocol.schema.json +5 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.21.36
|
|
4
|
+
### Unreleased
|
|
5
|
+
|
|
6
|
+
- `ToolLevelResult.calls_made` (optional): at the chat level, how many tool calls the agent's turn
|
|
7
|
+
made. `buildToolStatus` never lets a result that made zero calls, or a `skip`, replace a decisive
|
|
8
|
+
pass or fail: such a run never exercised the tool, so it is no evidence about it. Before this, one
|
|
9
|
+
chat turn that answered in prose (0/0 calls) turned 15 proven macOS tools red. Additive; no
|
|
10
|
+
consumer action, except harnesses should now send `calls_made` on chat results.
|
|
11
|
+
|
|
3
12
|
## 0.21.35
|
|
4
13
|
|
|
5
|
-
|
|
6
|
-
|
|
14
|
+
SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
|
|
15
|
+
so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
|
|
16
|
+
Diff: `git diff 6782472662 9e65b0b7ac -- apps/shared/desktop-protocol/src`
|
|
17
|
+
|
|
18
|
+
Changed shipped source files (5):
|
|
19
|
+
- `apps/shared/desktop-protocol/src/contract.ts`
|
|
20
|
+
- `apps/shared/desktop-protocol/src/schema/personal.ts`
|
|
21
|
+
- `apps/shared/desktop-protocol/src/schema/primitives.ts`
|
|
22
|
+
- `apps/shared/desktop-protocol/src/schema/registry.ts`
|
|
23
|
+
- `apps/shared/desktop-protocol/src/tools/catalog.ts`
|
|
7
24
|
|
|
8
25
|
## 0.21.34
|
|
9
26
|
|
package/dist/client.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BackoffOptions } from '@ai-matrx/realtime';
|
|
2
2
|
export { RECONNECT_ALARM_ATTEMPTS } from '@ai-matrx/realtime';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-
|
|
5
|
-
export { i as isDesktopProtocolError } from './models-
|
|
4
|
+
import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-MgdG4k-4.cjs';
|
|
5
|
+
export { i as isDesktopProtocolError } from './models-MgdG4k-4.cjs';
|
|
6
6
|
import { FrameHeader } from './frame.cjs';
|
|
7
7
|
|
|
8
8
|
/** The subset of the WHATWG WebSocket the client uses — browser, React Native, `ws` and Workers all fit. */
|
package/dist/client.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BackoffOptions } from '@ai-matrx/realtime';
|
|
2
2
|
export { RECONNECT_ALARM_ATTEMPTS } from '@ai-matrx/realtime';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-
|
|
5
|
-
export { i as isDesktopProtocolError } from './models-
|
|
4
|
+
import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-MgdG4k-4.js';
|
|
5
|
+
export { i as isDesktopProtocolError } from './models-MgdG4k-4.js';
|
|
6
6
|
import { FrameHeader } from './frame.js';
|
|
7
7
|
|
|
8
8
|
/** The subset of the WHATWG WebSocket the client uses — browser, React Native, `ws` and Workers all fit. */
|
package/dist/index.cjs
CHANGED
|
@@ -838,6 +838,7 @@ __export(src_exports, {
|
|
|
838
838
|
hasFlag: () => hasFlag,
|
|
839
839
|
isConnectionEnd: () => isConnectionEnd,
|
|
840
840
|
isDesktopProtocolError: () => isDesktopProtocolError,
|
|
841
|
+
isInconclusive: () => isInconclusive,
|
|
841
842
|
isTerminalClose: () => isTerminalClose,
|
|
842
843
|
knows: () => knows,
|
|
843
844
|
negotiate: () => negotiate,
|
|
@@ -2637,7 +2638,13 @@ var ToolLevelResult = import_zod16.z.strictObject({
|
|
|
2637
2638
|
suite: import_zod16.z.string().min(1).max(200),
|
|
2638
2639
|
/** The test case inside the suite. */
|
|
2639
2640
|
test: import_zod16.z.string().min(1).max(300),
|
|
2640
|
-
run_at_ms: import_zod16.z.int().min(0)
|
|
2641
|
+
run_at_ms: import_zod16.z.int().min(0),
|
|
2642
|
+
/**
|
|
2643
|
+
* Chat level: how many tool calls the agent's turn made, of any tool. `0` means the turn never
|
|
2644
|
+
* exercised a tool (the model answered in prose, or the chat request failed), so the result is
|
|
2645
|
+
* no evidence about the tool: it never turns a cell red. Absent on older results.
|
|
2646
|
+
*/
|
|
2647
|
+
calls_made: import_zod16.z.int().min(0).optional()
|
|
2641
2648
|
});
|
|
2642
2649
|
var ToolResultsFile = import_zod16.z.strictObject({
|
|
2643
2650
|
schema: import_zod16.z.literal("matrx.tool-results.v1"),
|
|
@@ -6288,7 +6295,7 @@ function forPeer(op, part, value, version) {
|
|
|
6288
6295
|
var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
|
|
6289
6296
|
|
|
6290
6297
|
// src/contract.ts
|
|
6291
|
-
var CONTRACT_SHA256 = "
|
|
6298
|
+
var CONTRACT_SHA256 = "43847f57bce65d9ec349363f4a27cf88bf6bf627931a077e3c0a97b7317ca9c0";
|
|
6292
6299
|
|
|
6293
6300
|
// src/close-policy.ts
|
|
6294
6301
|
var CLOSE_RULES = {
|
|
@@ -6542,6 +6549,9 @@ function builtOps() {
|
|
|
6542
6549
|
var TOOL_LEVELS = ["programmatic", "protocol", "chat"];
|
|
6543
6550
|
var TOOL_PLATFORMS = ["darwin", "win32", "linux"];
|
|
6544
6551
|
var UUID_IN_NAME = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi;
|
|
6552
|
+
function isInconclusive(e) {
|
|
6553
|
+
return e.outcome === "skip" || e.calls_made === 0;
|
|
6554
|
+
}
|
|
6545
6555
|
var REQUIRED = {
|
|
6546
6556
|
programmatic: [{ label: "in process", ok: (e) => e.transport === "in_process" }],
|
|
6547
6557
|
protocol: [
|
|
@@ -6554,18 +6564,22 @@ var REQUIRED = {
|
|
|
6554
6564
|
function cellFor(tool2, platform, level, evidence) {
|
|
6555
6565
|
if (!tool2.platforms.includes(platform)) return { state: "unsupported", missing: [], last_run_at_ms: null, evidence: [] };
|
|
6556
6566
|
const latest = /* @__PURE__ */ new Map();
|
|
6567
|
+
const latestInconclusive = /* @__PURE__ */ new Map();
|
|
6557
6568
|
for (const e of evidence) {
|
|
6558
6569
|
const key = `${e.suite}\0${e.test.replace(UUID_IN_NAME, "<id>")}\0${e.transport}\0${e.remote_network}`;
|
|
6559
|
-
const
|
|
6560
|
-
|
|
6570
|
+
const into = isInconclusive(e) ? latestInconclusive : latest;
|
|
6571
|
+
const prev = into.get(key);
|
|
6572
|
+
if (!prev || prev.run_at_ms < e.run_at_ms) into.set(key, e);
|
|
6561
6573
|
}
|
|
6562
|
-
const runs = [...latest.values()].
|
|
6574
|
+
const runs = [...latest.values()].sort((a, b) => b.run_at_ms - a.run_at_ms);
|
|
6575
|
+
const unproven = [...latestInconclusive].filter(([k, e]) => (latest.get(k)?.run_at_ms ?? -1) < e.run_at_ms).map(([, e]) => e);
|
|
6576
|
+
const shown = [...runs, ...unproven].sort((a, b) => b.run_at_ms - a.run_at_ms);
|
|
6563
6577
|
const last = runs[0]?.run_at_ms ?? null;
|
|
6564
6578
|
if (tool2.state === "planned" && runs.length === 0) return { state: "not_built", missing: [], last_run_at_ms: null, evidence: [] };
|
|
6565
|
-
if (runs.length === 0) return { state: "untested", missing: REQUIRED[level].map((r) => r.label), last_run_at_ms: null, evidence:
|
|
6566
|
-
if (runs.some((e) => e.outcome === "fail")) return { state: "fail", missing: [], last_run_at_ms: last, evidence:
|
|
6579
|
+
if (runs.length === 0) return { state: "untested", missing: REQUIRED[level].map((r) => r.label), last_run_at_ms: null, evidence: shown };
|
|
6580
|
+
if (runs.some((e) => e.outcome === "fail")) return { state: "fail", missing: [], last_run_at_ms: last, evidence: shown };
|
|
6567
6581
|
const missing = REQUIRED[level].filter((r) => !runs.some((e) => e.outcome === "pass" && r.ok(e))).map((r) => r.label);
|
|
6568
|
-
return { state: missing.length === 0 ? "pass" : "partial", missing, last_run_at_ms: last, evidence:
|
|
6582
|
+
return { state: missing.length === 0 ? "pass" : "partial", missing, last_run_at_ms: last, evidence: shown };
|
|
6569
6583
|
}
|
|
6570
6584
|
function buildToolStatus(files, opts) {
|
|
6571
6585
|
const parsed = files.map((f, i) => {
|
|
@@ -6580,7 +6594,17 @@ function buildToolStatus(files, opts) {
|
|
|
6580
6594
|
if (!known.has(r.tool)) throw new Error(`a result names ${r.tool}, which is not in the tool catalog`);
|
|
6581
6595
|
const key = `${r.tool}|${r.platform}|${r.level}`;
|
|
6582
6596
|
const list = byKey.get(key) ?? [];
|
|
6583
|
-
list.push({
|
|
6597
|
+
list.push({
|
|
6598
|
+
suite: r.suite,
|
|
6599
|
+
test: r.test,
|
|
6600
|
+
transport: r.transport,
|
|
6601
|
+
outcome: r.outcome,
|
|
6602
|
+
remote_network: r.remote_network,
|
|
6603
|
+
commit: file.commit,
|
|
6604
|
+
run_at_ms: r.run_at_ms,
|
|
6605
|
+
detail: r.detail,
|
|
6606
|
+
...r.calls_made === void 0 ? {} : { calls_made: r.calls_made }
|
|
6607
|
+
});
|
|
6584
6608
|
byKey.set(key, list);
|
|
6585
6609
|
}
|
|
6586
6610
|
}
|