@ai-matrx/desktop-protocol 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/client.cjs +17 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +17 -1
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +21 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +36 -2
- package/dist/index.d.ts +36 -2
- package/dist/index.js +21 -1
- package/dist/index.js.map +1 -1
- package/dist/react.d.cts +13 -0
- package/dist/react.d.ts +13 -0
- package/dist/{registry-DQ5_mP_5.d.cts → registry-CI-NpQ6L.d.cts} +78 -1
- package/dist/{registry-DQ5_mP_5.d.ts → registry-CI-NpQ6L.d.ts} +78 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
fs.patch reports every edit, as the cloud sandbox daemon does (recorded from a live sandbox:
|
|
6
|
+
matrx-desktop `test/fixtures/sandbox-daemon/observed.json`, `patch_cases`).
|
|
7
|
+
|
|
8
|
+
- `FsPatchResult` gains `edits_applied` (`{ edit_index, mode: "create" | "replace" |
|
|
9
|
+
"replace_all", matches_replaced? }`, `matches_replaced` only for replace_all) and `edits_failed`
|
|
10
|
+
(`{ edit_index, reason }`, the daemon's reason text verbatim). `applied` stays (= the count).
|
|
11
|
+
- When every edit fails (CONFLICT, reason `patch_no_match` / `patch_ambiguous`), the error's
|
|
12
|
+
`data.edits_failed` lists them — the daemon's 422 `failures`.
|
|
13
|
+
|
|
14
|
+
Consumer action: none required (additive). Read `edits_failed` instead of reconstructing it from
|
|
15
|
+
`applied`.
|
|
16
|
+
|
|
3
17
|
## 0.3.0
|
|
4
18
|
|
|
5
19
|
SPEC 6.1 sandbox parity: every search and list op now answers exactly what the cloud sandbox
|
package/dist/client.cjs
CHANGED
|
@@ -184,6 +184,7 @@ var ErrorReason = import_zod2.z.enum([
|
|
|
184
184
|
// another client of the same user took control
|
|
185
185
|
"window_exhausted"
|
|
186
186
|
]);
|
|
187
|
+
var FsPatchEditFailure = import_zod2.z.strictObject({ edit_index: nonNegInt, reason: import_zod2.z.string().max(300) });
|
|
187
188
|
var ProtocolErrorBody = import_zod2.z.strictObject({
|
|
188
189
|
code: ErrorCode,
|
|
189
190
|
message: import_zod2.z.string().max(300),
|
|
@@ -198,6 +199,8 @@ var ProtocolErrorBody = import_zod2.z.strictObject({
|
|
|
198
199
|
// PERMISSION_DENIED_OS deep link
|
|
199
200
|
retry_after_ms: nonNegInt.optional(),
|
|
200
201
|
limit_bytes: nonNegInt.optional(),
|
|
202
|
+
/** fs.patch when every edit failed (CONFLICT, patch_no_match / patch_ambiguous): the daemon's 422 `failures`. */
|
|
203
|
+
edits_failed: import_zod2.z.array(FsPatchEditFailure).max(256).optional(),
|
|
201
204
|
upgrade: import_zod2.z.strictObject({
|
|
202
205
|
min_version: ProtocolVersion,
|
|
203
206
|
max_version: ProtocolVersion,
|
|
@@ -489,7 +492,20 @@ var FsPatchParams = import_zod6.z.strictObject({
|
|
|
489
492
|
).min(1).max(256),
|
|
490
493
|
create_if_missing: import_zod6.z.boolean().default(false)
|
|
491
494
|
});
|
|
492
|
-
var
|
|
495
|
+
var FsPatchEditApplied = import_zod6.z.strictObject({
|
|
496
|
+
edit_index: nonNegInt,
|
|
497
|
+
mode: import_zod6.z.enum(["create", "replace", "replace_all"]),
|
|
498
|
+
/** Present for replace_all only, as the daemon sends it. */
|
|
499
|
+
matches_replaced: nonNegInt.optional()
|
|
500
|
+
});
|
|
501
|
+
var FsPatchResult = import_zod6.z.strictObject({
|
|
502
|
+
path: AbsPath,
|
|
503
|
+
applied: nonNegInt,
|
|
504
|
+
size: nonNegInt,
|
|
505
|
+
mtime_ms: epochMs,
|
|
506
|
+
edits_applied: import_zod6.z.array(FsPatchEditApplied).max(256),
|
|
507
|
+
edits_failed: import_zod6.z.array(FsPatchEditFailure).max(256)
|
|
508
|
+
});
|
|
493
509
|
var FsSearchPathsParams = import_zod6.z.strictObject({
|
|
494
510
|
pattern: import_zod6.z.string().min(1).max(512),
|
|
495
511
|
cwd: AbsPath,
|