@staix/agent-hub 0.31.0 → 0.33.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 +33 -0
- package/README.md +2 -2
- package/docs/agent-notes/bus.md +3 -1
- package/docs/agent-notes/daemon.md +1 -0
- package/docs/agent-notes/tests.md +2 -2
- package/docs/design/bus.md +109 -4
- package/docs/dogfood.md +2 -0
- package/docs/memory.md +9 -3
- package/docs/operations.md +98 -17
- package/docs/quickstart.md +18 -2
- package/docs/security.md +52 -9
- package/docs/specs/2026-09-19-agent-hub-design.md +75 -5
- package/docs/specs/2026-09-20-upgrade-recovery-design.md +7 -3
- package/docs/verification/2026-11-05-hardcoded-values-classification-rules.md +55 -1
- package/docs/verification/2026-11-06-0.32.0.md +149 -0
- package/docs/verification/2026-11-06-0.33.0.md +222 -0
- package/docs/verification/2026-11-06-claude-implementer-2.1.319.md +57 -0
- package/docs/verification/2026-11-06-codex-0167-reviewer-isolation.md +56 -0
- package/docs/verification/2026-11-06-codex-0167-reviewer-tool-call.md +66 -0
- package/docs/verification/2026-11-06-kimi-251-reviewer-compat.md +88 -0
- package/docs/verification/2026-11-06-orca-1.4.250-cli-contract.md +50 -0
- package/docs/verification/2026-11-06-qwen-0268-acp.md +75 -0
- package/docs/verification/2026-11-06-qwen-0268-dual-output.md +44 -0
- package/docs/verification/claude-shell-wrapper-native.py +1 -1
- package/docs/verified.json +11 -11
- package/package.json +2 -2
- package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
- package/plugins/agent-hub/server.js +528 -206
- package/src/adapters/compat.ts +11 -11
- package/src/broker/protocol.ts +5 -0
- package/src/broker/server.ts +54 -4
- package/src/broker/store.ts +6 -3
- package/src/cli/console-state.ts +1 -1
- package/src/cli/output.ts +5 -1
- package/src/cli/room.ts +34 -12
- package/src/cli/status-lines.ts +8 -1
- package/src/cli/terminal-recovery.ts +37 -15
- package/src/hub/bus.ts +25 -0
- package/src/hub/daemon.ts +20 -9
- package/src/rooms/application.ts +15 -0
- package/src/rooms/commands.ts +135 -30
- package/src/rooms/health.ts +32 -0
- package/src/rooms/link.ts +394 -56
- package/src/rooms/liveness.ts +11 -0
- package/src/rooms/remote-peer.ts +18 -3
- package/src/rooms/service.ts +167 -28
- package/src/rooms/status.ts +65 -2
- package/src/rooms/store.ts +30 -1
- package/src/rooms/wire.ts +10 -8
- package/src/ui/index.html +5 -3
|
@@ -321,12 +321,12 @@ var init_compat = __esm(() => {
|
|
|
321
321
|
},
|
|
322
322
|
"claude-implementer": {
|
|
323
323
|
label: "Claude headless implementer",
|
|
324
|
-
verified: ["2.1.309", "2.1.310", "2.1.314", "2.1.316", "2.1.318"],
|
|
324
|
+
verified: ["2.1.309", "2.1.310", "2.1.314", "2.1.316", "2.1.318", "2.1.319"],
|
|
325
325
|
gate: "contract",
|
|
326
326
|
probe: ["claude", "--version"],
|
|
327
327
|
parse: (out) => plain(out.trim().replace(/ \(Claude Code\)$/, "")),
|
|
328
328
|
trustNote: "The native prompt-tool transport and host-wrapper rewrite, environment isolation and replay contract have isolated receipts. No dontAsk/bypass fallback exists; another version's permission or rewrite behavior is unverified.",
|
|
329
|
-
receipt: "docs/verification/2026-11-
|
|
329
|
+
receipt: "docs/verification/2026-11-06-claude-implementer-2.1.319.md"
|
|
330
330
|
},
|
|
331
331
|
"codex-review": {
|
|
332
332
|
label: "Codex reviewer (codex-cli)",
|
|
@@ -336,16 +336,16 @@ var init_compat = __esm(() => {
|
|
|
336
336
|
config: "codex_bin",
|
|
337
337
|
parse: (out) => plain(out.trim().replace(/^codex-cli /, "")),
|
|
338
338
|
trustNote: "Every launch still proves the MCP inventory, Apps/plugins/hooks disabled, sandbox read/write denial and the binary fence; a failed leg still refuses. Trust covers only the source-level claims those probes cannot see (docs/verification/2026-10-19-reviewer-isolation.md).",
|
|
339
|
-
receipt: "docs/verification/2026-
|
|
339
|
+
receipt: "docs/verification/2026-11-06-codex-0167-reviewer-isolation.md"
|
|
340
340
|
},
|
|
341
341
|
"kimi-review": {
|
|
342
342
|
label: "Kimi reviewer (kimi-code)",
|
|
343
|
-
verified: ["2.2.0", "2.3.0", "2.3.1", "2.3.2", "2.4.1"],
|
|
343
|
+
verified: ["2.2.0", "2.3.0", "2.3.1", "2.3.2", "2.4.1", "2.5.1"],
|
|
344
344
|
gate: "isolation",
|
|
345
345
|
probe: ["kimi", "--version"],
|
|
346
346
|
parse: (out) => plain(out.trim()),
|
|
347
347
|
trustNote: "Every launch still builds the private config, exact two-tool agent file and task-bound MCP; the native tool allowlist behaviour of an untested version is not re-proven.",
|
|
348
|
-
receipt: "docs/verification/2026-
|
|
348
|
+
receipt: "docs/verification/2026-11-06-kimi-251-reviewer-compat.md"
|
|
349
349
|
},
|
|
350
350
|
jcode: {
|
|
351
351
|
label: "Jcode",
|
|
@@ -377,13 +377,13 @@ var init_compat = __esm(() => {
|
|
|
377
377
|
},
|
|
378
378
|
qwen: {
|
|
379
379
|
label: "Qwen Code",
|
|
380
|
-
verified: ["0.25.0", "0.26.0", "0.26.1", "0.26.4", "0.26.5"],
|
|
380
|
+
verified: ["0.25.0", "0.26.0", "0.26.1", "0.26.4", "0.26.5", "0.26.8"],
|
|
381
381
|
gate: "contract",
|
|
382
382
|
probe: ["qwen", "--version"],
|
|
383
383
|
config: "qwen_cmd",
|
|
384
384
|
parse: (out) => plain(out.trim()),
|
|
385
|
-
trustNote: "Native ACP identity, mode ids and permission callbacks were re-checked without inference on 0.26.4 and 0.26.
|
|
386
|
-
receipt: "docs/verification/2026-11-
|
|
385
|
+
trustNote: "Native ACP identity, mode ids and permission callbacks were re-checked without inference on 0.26.4, 0.26.5 and 0.26.8 (macOS arm64 and Linux x86_64); real model turns remain unverified. Another version may change those contracts.",
|
|
386
|
+
receipt: "docs/verification/2026-11-06-qwen-0268-acp.md"
|
|
387
387
|
},
|
|
388
388
|
"qwen-dual": {
|
|
389
389
|
label: "Qwen Code dual-output TUI",
|
|
@@ -10248,7 +10248,7 @@ var package_default;
|
|
|
10248
10248
|
var init_package = __esm(() => {
|
|
10249
10249
|
package_default = {
|
|
10250
10250
|
name: "@staix/agent-hub",
|
|
10251
|
-
version: "0.
|
|
10251
|
+
version: "0.33.0",
|
|
10252
10252
|
description: "Native multi-agent hub: Claude Code, Codex, Kimi Code, Pi and local inference as peers in one project",
|
|
10253
10253
|
license: "MIT",
|
|
10254
10254
|
type: "module",
|
|
@@ -10265,7 +10265,7 @@ var init_package = __esm(() => {
|
|
|
10265
10265
|
bun: ">=1.4.2"
|
|
10266
10266
|
},
|
|
10267
10267
|
dependencies: {
|
|
10268
|
-
"@staix/agent-mem": "0.
|
|
10268
|
+
"@staix/agent-mem": "0.22.1"
|
|
10269
10269
|
},
|
|
10270
10270
|
devDependencies: {
|
|
10271
10271
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
@@ -10454,6 +10454,13 @@ var init_aliases = __esm(() => {
|
|
|
10454
10454
|
init_lifecycle_log();
|
|
10455
10455
|
});
|
|
10456
10456
|
|
|
10457
|
+
// node_modules/@staix/agent-mem/src/memory/profile-lock-diagnostic.ts
|
|
10458
|
+
var recognised;
|
|
10459
|
+
var init_profile_lock_diagnostic = __esm(() => {
|
|
10460
|
+
init_platform();
|
|
10461
|
+
recognised = new WeakMap;
|
|
10462
|
+
});
|
|
10463
|
+
|
|
10457
10464
|
// node_modules/@staix/agent-mem/src/memory/shard.ts
|
|
10458
10465
|
var init_shard = __esm(() => {
|
|
10459
10466
|
init_sync_placement_active();
|
|
@@ -10462,6 +10469,7 @@ var init_shard = __esm(() => {
|
|
|
10462
10469
|
init_public_prune_view();
|
|
10463
10470
|
init_generation();
|
|
10464
10471
|
init_aliases();
|
|
10472
|
+
init_profile_lock_diagnostic();
|
|
10465
10473
|
init_aliases();
|
|
10466
10474
|
});
|
|
10467
10475
|
|
|
@@ -10498,6 +10506,7 @@ var init_generation = __esm(() => {
|
|
|
10498
10506
|
init_platform();
|
|
10499
10507
|
init_shard();
|
|
10500
10508
|
init_public_prune_input_chain();
|
|
10509
|
+
init_profile_lock_diagnostic();
|
|
10501
10510
|
});
|
|
10502
10511
|
|
|
10503
10512
|
// node_modules/@staix/agent-mem/src/memory/sync-placement-plan.ts
|
|
@@ -10546,13 +10555,13 @@ var init_sync_placement_active = __esm(() => {
|
|
|
10546
10555
|
init_public_prune_input_chain();
|
|
10547
10556
|
init_shard();
|
|
10548
10557
|
});
|
|
10549
|
-
|
|
10550
10558
|
// node_modules/@staix/agent-mem/src/memory/sync-placement-guard.ts
|
|
10551
10559
|
var init_sync_placement_guard = __esm(() => {
|
|
10552
10560
|
init_sync_placement_active();
|
|
10553
10561
|
init_generation();
|
|
10554
10562
|
init_shard();
|
|
10555
10563
|
init_sync_placement_format();
|
|
10564
|
+
init_profile_lock_diagnostic();
|
|
10556
10565
|
});
|
|
10557
10566
|
|
|
10558
10567
|
// node_modules/@staix/agent-mem/src/memory/formats.ts
|
|
@@ -10943,6 +10952,7 @@ var init_reader_lease = __esm(() => {
|
|
|
10943
10952
|
init_mutation();
|
|
10944
10953
|
init_platform();
|
|
10945
10954
|
init_public_prune_view();
|
|
10955
|
+
init_profile_lock_diagnostic();
|
|
10946
10956
|
open = new Map;
|
|
10947
10957
|
});
|
|
10948
10958
|
|
|
@@ -11146,205 +11156,12 @@ var init_sync_screen = __esm(() => {
|
|
|
11146
11156
|
GENERATED = new Set(["id", "schema", "op", "at", "machine", "actor", "promotedFrom", "supersedes", "expires", "tier", "scope", "kind", "source"]);
|
|
11147
11157
|
});
|
|
11148
11158
|
|
|
11149
|
-
// node_modules/@staix/agent-mem/src/memory/sync-placement-capture.ts
|
|
11150
|
-
var init_sync_placement_capture = __esm(() => {
|
|
11151
|
-
init_sync_placement_journal_format();
|
|
11152
|
-
init_generation();
|
|
11153
|
-
init_sync_placement_format();
|
|
11154
|
-
init_sync_placement_plan();
|
|
11155
|
-
init_public_prune_view();
|
|
11156
|
-
init_platform();
|
|
11157
|
-
init_config();
|
|
11158
|
-
init_policy();
|
|
11159
|
-
init_bridge();
|
|
11160
|
-
init_shard_bridge();
|
|
11161
|
-
init_generation_index();
|
|
11162
|
-
init_prune();
|
|
11163
|
-
init_shard();
|
|
11164
|
-
init_sync_placement_journal_format();
|
|
11165
|
-
});
|
|
11166
|
-
|
|
11167
|
-
// node_modules/@staix/agent-mem/src/memory/sync-placement-projection.ts
|
|
11168
|
-
var init_sync_placement_projection = __esm(() => {
|
|
11169
|
-
init_generation();
|
|
11170
|
-
init_sync_placement_journal_format();
|
|
11171
|
-
});
|
|
11172
|
-
|
|
11173
|
-
// node_modules/@staix/agent-mem/src/memory/sync-placement-publication-plan.ts
|
|
11174
|
-
var init_sync_placement_publication_plan = __esm(() => {
|
|
11175
|
-
init_generation();
|
|
11176
|
-
init_sync_placement_journal_format();
|
|
11177
|
-
});
|
|
11178
|
-
|
|
11179
|
-
// node_modules/@staix/agent-mem/src/memory/sync-placement-journal-storage.ts
|
|
11180
|
-
var inflight, publicationDurability;
|
|
11181
|
-
var init_sync_placement_journal_storage = __esm(() => {
|
|
11182
|
-
init_generation();
|
|
11183
|
-
init_platform();
|
|
11184
|
-
init_mutation();
|
|
11185
|
-
init_sync_placement_plan();
|
|
11186
|
-
init_sync_placement_format();
|
|
11187
|
-
init_sync_placement_journal_format();
|
|
11188
|
-
init_sync_placement_publication_plan();
|
|
11189
|
-
init_sync_placement_projection();
|
|
11190
|
-
inflight = new WeakSet;
|
|
11191
|
-
publicationDurability = new WeakMap;
|
|
11192
|
-
});
|
|
11193
|
-
|
|
11194
|
-
// node_modules/@staix/agent-mem/src/memory/sync-placement-publication-storage.ts
|
|
11195
|
-
var init_sync_placement_publication_storage = __esm(() => {
|
|
11196
|
-
init_generation();
|
|
11197
|
-
init_sync_placement_journal_format();
|
|
11198
|
-
init_sync_placement_journal_storage();
|
|
11199
|
-
init_sync_placement_publication_plan();
|
|
11200
|
-
});
|
|
11201
|
-
|
|
11202
|
-
// node_modules/@staix/agent-mem/src/memory/shard-sync-graph.ts
|
|
11203
|
-
var init_shard_sync_graph = __esm(() => {
|
|
11204
|
-
init_public_prune_inputs();
|
|
11205
|
-
init_shard_sync_format();
|
|
11206
|
-
init_public_prune_witness();
|
|
11207
|
-
});
|
|
11208
|
-
|
|
11209
|
-
// node_modules/@staix/agent-mem/src/memory/shard-sync-history.ts
|
|
11210
|
-
var init_shard_sync_history = __esm(() => {
|
|
11211
|
-
init_generation();
|
|
11212
|
-
init_prune();
|
|
11213
|
-
init_public_prune_witness();
|
|
11214
|
-
init_shard_sync_graph();
|
|
11215
|
-
init_shard_sync_format();
|
|
11216
|
-
});
|
|
11217
|
-
|
|
11218
|
-
// node_modules/@staix/agent-mem/src/memory/public-prune-advance.ts
|
|
11219
|
-
var MAX;
|
|
11220
|
-
var init_public_prune_advance = __esm(() => {
|
|
11221
|
-
init_sync_placement_format();
|
|
11222
|
-
init_generation();
|
|
11223
|
-
init_shard();
|
|
11224
|
-
init_mutation();
|
|
11225
|
-
init_public_prune_inputs();
|
|
11226
|
-
init_public_prune_view();
|
|
11227
|
-
init_platform();
|
|
11228
|
-
MAX = 1024 * 1024;
|
|
11229
|
-
});
|
|
11230
|
-
|
|
11231
|
-
// node_modules/@staix/agent-mem/src/memory/prune-publisher-lineage.ts
|
|
11232
|
-
var init_prune_publisher_lineage = __esm(() => {
|
|
11233
|
-
init_generation();
|
|
11234
|
-
init_mutation();
|
|
11235
|
-
init_platform();
|
|
11236
|
-
init_prune();
|
|
11237
|
-
init_shard();
|
|
11238
|
-
init_sync_screen();
|
|
11239
|
-
});
|
|
11240
|
-
|
|
11241
|
-
// node_modules/@staix/agent-mem/src/memory/shard-sync.ts
|
|
11242
|
-
var zero2, HOLD_MAX_BYTES;
|
|
11243
|
-
var init_shard_sync = __esm(() => {
|
|
11244
|
-
init_sync_placement_transport();
|
|
11245
|
-
init_shard_sync_applications();
|
|
11246
|
-
init_shard_sync_history();
|
|
11247
|
-
init_sync_placement_format();
|
|
11248
|
-
init_sync_placement_guard();
|
|
11249
|
-
init_prune_publisher_lineage();
|
|
11250
|
-
init_public_prune_witness();
|
|
11251
|
-
init_public_prune_inputs();
|
|
11252
|
-
init_generation();
|
|
11253
|
-
init_generation_sync();
|
|
11254
|
-
init_mutation();
|
|
11255
|
-
init_prune();
|
|
11256
|
-
init_shard();
|
|
11257
|
-
init_shard_sync_format();
|
|
11258
|
-
init_sync();
|
|
11259
|
-
zero2 = "0".repeat(40);
|
|
11260
|
-
HOLD_MAX_BYTES = 128 * 1024;
|
|
11261
|
-
});
|
|
11262
|
-
|
|
11263
|
-
// node_modules/@staix/agent-mem/src/memory/shard-sync-applications.ts
|
|
11264
|
-
var init_shard_sync_applications = __esm(() => {
|
|
11265
|
-
init_generation();
|
|
11266
|
-
init_public_prune_advance();
|
|
11267
|
-
init_public_prune_view();
|
|
11268
|
-
init_shard_sync_graph();
|
|
11269
|
-
init_public_prune_inputs();
|
|
11270
|
-
init_shard_sync_format();
|
|
11271
|
-
init_shard_sync();
|
|
11272
|
-
});
|
|
11273
|
-
|
|
11274
|
-
// node_modules/@staix/agent-mem/src/memory/sync-placement-dependencies.ts
|
|
11275
|
-
var init_sync_placement_dependencies = __esm(() => {
|
|
11276
|
-
init_bridge();
|
|
11277
|
-
init_generation();
|
|
11278
|
-
init_ops_contract();
|
|
11279
|
-
init_prune();
|
|
11280
|
-
init_store();
|
|
11281
|
-
init_sync_placement_journal_format();
|
|
11282
|
-
});
|
|
11283
|
-
|
|
11284
|
-
// node_modules/@staix/agent-mem/src/memory/sync-placement-git.ts
|
|
11285
|
-
var typedArrayPrototype, getBuffer, getOffset, getLength, mapSize;
|
|
11286
|
-
var init_sync_placement_git = __esm(() => {
|
|
11287
|
-
init_public_prune_input_chain();
|
|
11288
|
-
init_shard_sync_format();
|
|
11289
|
-
typedArrayPrototype = Object.getPrototypeOf(Uint8Array.prototype);
|
|
11290
|
-
getBuffer = Object.getOwnPropertyDescriptor(typedArrayPrototype, "buffer").get;
|
|
11291
|
-
getOffset = Object.getOwnPropertyDescriptor(typedArrayPrototype, "byteOffset").get;
|
|
11292
|
-
getLength = Object.getOwnPropertyDescriptor(typedArrayPrototype, "byteLength").get;
|
|
11293
|
-
mapSize = Object.getOwnPropertyDescriptor(Map.prototype, "size").get;
|
|
11294
|
-
});
|
|
11295
|
-
|
|
11296
|
-
// node_modules/@staix/agent-mem/src/memory/sync-placement-materialize.ts
|
|
11297
|
-
var init_sync_placement_materialize = __esm(() => {
|
|
11298
|
-
init_generation();
|
|
11299
|
-
init_sync_screen();
|
|
11300
|
-
init_sync_placement_dependencies();
|
|
11301
|
-
init_sync_placement_git();
|
|
11302
|
-
init_sync_placement_format();
|
|
11303
|
-
init_sync_placement_journal_format();
|
|
11304
|
-
init_shard_sync_format();
|
|
11305
|
-
init_public_prune_witness();
|
|
11306
|
-
});
|
|
11307
|
-
|
|
11308
|
-
// node_modules/@staix/agent-mem/src/memory/sync-placement-cache.ts
|
|
11309
|
-
var init_sync_placement_cache = __esm(() => {
|
|
11310
|
-
init_generation();
|
|
11311
|
-
init_sync_placement_journal_format();
|
|
11312
|
-
});
|
|
11313
|
-
|
|
11314
|
-
// node_modules/@staix/agent-mem/src/memory/sync-placement-transport.ts
|
|
11315
|
-
var init_sync_placement_transport = __esm(() => {
|
|
11316
|
-
init_generation();
|
|
11317
|
-
init_generation_sync();
|
|
11318
|
-
init_sync();
|
|
11319
|
-
init_mutation();
|
|
11320
|
-
init_shard();
|
|
11321
|
-
init_policy();
|
|
11322
|
-
init_sync_screen();
|
|
11323
|
-
init_sync_placement_active();
|
|
11324
|
-
init_sync_placement_guard();
|
|
11325
|
-
init_sync_placement_capture();
|
|
11326
|
-
init_sync_placement_format();
|
|
11327
|
-
init_sync_placement_journal_format();
|
|
11328
|
-
init_sync_placement_projection();
|
|
11329
|
-
init_sync_placement_journal_storage();
|
|
11330
|
-
init_sync_placement_publication_storage();
|
|
11331
|
-
init_sync_placement_publication_plan();
|
|
11332
|
-
init_shard_sync_history();
|
|
11333
|
-
init_shard_sync_applications();
|
|
11334
|
-
init_shard_sync();
|
|
11335
|
-
init_shard_sync_format();
|
|
11336
|
-
init_prune_publisher_lineage();
|
|
11337
|
-
init_sync_placement_materialize();
|
|
11338
|
-
init_sync_placement_cache();
|
|
11339
|
-
});
|
|
11340
|
-
|
|
11341
11159
|
// node_modules/@staix/agent-mem/src/memory/sync-binding.ts
|
|
11342
11160
|
var init_sync_binding = () => {};
|
|
11343
11161
|
|
|
11344
11162
|
// node_modules/@staix/agent-mem/src/memory/sync.ts
|
|
11345
11163
|
var liveGroups;
|
|
11346
11164
|
var init_sync = __esm(() => {
|
|
11347
|
-
init_sync_placement_transport();
|
|
11348
11165
|
init_sync_placement_guard();
|
|
11349
11166
|
init_formats();
|
|
11350
11167
|
init_generation();
|
|
@@ -11704,6 +11521,219 @@ var init_sync_policy_inspection = __esm(() => {
|
|
|
11704
11521
|
init_sync_screen();
|
|
11705
11522
|
});
|
|
11706
11523
|
|
|
11524
|
+
// node_modules/@staix/agent-mem/src/memory/public-prune-activation.ts
|
|
11525
|
+
var MAX;
|
|
11526
|
+
var init_public_prune_activation = __esm(() => {
|
|
11527
|
+
init_generation();
|
|
11528
|
+
init_shard();
|
|
11529
|
+
init_mutation();
|
|
11530
|
+
init_reader_lease();
|
|
11531
|
+
init_aliases();
|
|
11532
|
+
init_platform();
|
|
11533
|
+
init_store();
|
|
11534
|
+
init_public_prune_inputs();
|
|
11535
|
+
init_public_prune_view();
|
|
11536
|
+
MAX = 1024 * 1024;
|
|
11537
|
+
});
|
|
11538
|
+
|
|
11539
|
+
// node_modules/@staix/agent-mem/src/memory/sync-placement-activation-storage.ts
|
|
11540
|
+
var MAX_BYTES7;
|
|
11541
|
+
var init_sync_placement_activation_storage = __esm(() => {
|
|
11542
|
+
init_generation();
|
|
11543
|
+
init_platform();
|
|
11544
|
+
init_mutation();
|
|
11545
|
+
init_sync_placement_format();
|
|
11546
|
+
init_sync_placement_plan();
|
|
11547
|
+
init_sync_placement_journal_format();
|
|
11548
|
+
init_public_prune_activation();
|
|
11549
|
+
MAX_BYTES7 = 1024 * 1024;
|
|
11550
|
+
});
|
|
11551
|
+
|
|
11552
|
+
// node_modules/@staix/agent-mem/src/memory/sync-placement-activation-proof.ts
|
|
11553
|
+
var owners, captures;
|
|
11554
|
+
var init_sync_placement_activation_proof = __esm(() => {
|
|
11555
|
+
init_generation();
|
|
11556
|
+
init_mutation();
|
|
11557
|
+
init_platform();
|
|
11558
|
+
init_sync_placement_activation_storage();
|
|
11559
|
+
owners = new WeakMap;
|
|
11560
|
+
captures = new WeakMap;
|
|
11561
|
+
});
|
|
11562
|
+
|
|
11563
|
+
// node_modules/@staix/agent-mem/src/memory/sync-placement-publication-plan.ts
|
|
11564
|
+
var init_sync_placement_publication_plan = __esm(() => {
|
|
11565
|
+
init_generation();
|
|
11566
|
+
init_sync_placement_journal_format();
|
|
11567
|
+
});
|
|
11568
|
+
|
|
11569
|
+
// node_modules/@staix/agent-mem/src/memory/sync-placement-projection.ts
|
|
11570
|
+
var init_sync_placement_projection = __esm(() => {
|
|
11571
|
+
init_generation();
|
|
11572
|
+
init_sync_placement_journal_format();
|
|
11573
|
+
});
|
|
11574
|
+
|
|
11575
|
+
// node_modules/@staix/agent-mem/src/memory/sync-placement-writers.ts
|
|
11576
|
+
var MAX_BYTES8, MAX_PACKAGE;
|
|
11577
|
+
var init_sync_placement_writers = __esm(() => {
|
|
11578
|
+
init_generation();
|
|
11579
|
+
init_platform();
|
|
11580
|
+
init_sync_placement_format();
|
|
11581
|
+
MAX_BYTES8 = 64 * 1024 * 1024;
|
|
11582
|
+
MAX_PACKAGE = 64 * 1024;
|
|
11583
|
+
});
|
|
11584
|
+
|
|
11585
|
+
// node_modules/@staix/agent-mem/src/memory/sync-placement-writer-revision-format.ts
|
|
11586
|
+
var WRITER_REVISION_MAX_BYTES, WRITER_COMMIT_MAX_BYTES, WRITER_RENEWAL_INTENT_MAX_BYTES;
|
|
11587
|
+
var init_sync_placement_writer_revision_format = __esm(() => {
|
|
11588
|
+
init_generation();
|
|
11589
|
+
init_sync_placement_writers();
|
|
11590
|
+
init_sync_placement_format();
|
|
11591
|
+
WRITER_REVISION_MAX_BYTES = 512 * 1024;
|
|
11592
|
+
WRITER_COMMIT_MAX_BYTES = 64 * 1024;
|
|
11593
|
+
WRITER_RENEWAL_INTENT_MAX_BYTES = 1024 * 1024;
|
|
11594
|
+
});
|
|
11595
|
+
|
|
11596
|
+
// node_modules/@staix/agent-mem/src/memory/sync-placement-writer-history.ts
|
|
11597
|
+
var init_sync_placement_writer_history = __esm(() => {
|
|
11598
|
+
init_generation();
|
|
11599
|
+
init_platform();
|
|
11600
|
+
init_mutation();
|
|
11601
|
+
init_sync_placement_writer_revision_format();
|
|
11602
|
+
});
|
|
11603
|
+
|
|
11604
|
+
// node_modules/@staix/agent-mem/src/memory/sync-placement-journal-storage.ts
|
|
11605
|
+
var inflight, publicationDurability;
|
|
11606
|
+
var init_sync_placement_journal_storage = __esm(() => {
|
|
11607
|
+
init_generation();
|
|
11608
|
+
init_platform();
|
|
11609
|
+
init_mutation();
|
|
11610
|
+
init_sync_placement_plan();
|
|
11611
|
+
init_sync_placement_format();
|
|
11612
|
+
init_sync_placement_journal_format();
|
|
11613
|
+
init_sync_placement_publication_plan();
|
|
11614
|
+
init_sync_placement_projection();
|
|
11615
|
+
init_sync_placement_writer_revision_format();
|
|
11616
|
+
init_sync_placement_writer_history();
|
|
11617
|
+
inflight = new WeakSet;
|
|
11618
|
+
publicationDurability = new WeakMap;
|
|
11619
|
+
});
|
|
11620
|
+
|
|
11621
|
+
// node_modules/@staix/agent-mem/src/memory/sync-placement-writer-roots.ts
|
|
11622
|
+
var MAX_BYTES9;
|
|
11623
|
+
var init_sync_placement_writer_roots = __esm(() => {
|
|
11624
|
+
init_generation();
|
|
11625
|
+
init_policy();
|
|
11626
|
+
init_platform();
|
|
11627
|
+
init_mutation();
|
|
11628
|
+
init_sync_placement_guard();
|
|
11629
|
+
init_sync_placement_active();
|
|
11630
|
+
init_sync_placement_journal_storage();
|
|
11631
|
+
init_public_prune_activation();
|
|
11632
|
+
init_sync_placement_writers();
|
|
11633
|
+
init_sync_placement_format();
|
|
11634
|
+
MAX_BYTES9 = 256 * 1024;
|
|
11635
|
+
});
|
|
11636
|
+
|
|
11637
|
+
// node_modules/@staix/agent-mem/src/memory/sync-placement-prerequisites.ts
|
|
11638
|
+
var init_sync_placement_prerequisites = __esm(() => {
|
|
11639
|
+
init_platform();
|
|
11640
|
+
init_generation();
|
|
11641
|
+
init_formats();
|
|
11642
|
+
init_sync_placement_guard();
|
|
11643
|
+
init_sync_placement_active();
|
|
11644
|
+
init_sync_placement_format();
|
|
11645
|
+
});
|
|
11646
|
+
|
|
11647
|
+
// node_modules/@staix/agent-mem/src/memory/sync-placement-effective-writers.ts
|
|
11648
|
+
var init_sync_placement_effective_writers = __esm(() => {
|
|
11649
|
+
init_generation();
|
|
11650
|
+
init_sync_placement_guard();
|
|
11651
|
+
init_sync_placement_active();
|
|
11652
|
+
init_sync_placement_journal_storage();
|
|
11653
|
+
init_sync_placement_writer_history();
|
|
11654
|
+
init_sync_placement_writer_revision_format();
|
|
11655
|
+
init_sync_placement_writer_roots();
|
|
11656
|
+
init_sync_placement_prerequisites();
|
|
11657
|
+
});
|
|
11658
|
+
|
|
11659
|
+
// node_modules/@staix/agent-mem/src/memory/sync-placement-capture.ts
|
|
11660
|
+
var init_sync_placement_capture = __esm(() => {
|
|
11661
|
+
init_sync_placement_journal_format();
|
|
11662
|
+
init_generation();
|
|
11663
|
+
init_sync_placement_format();
|
|
11664
|
+
init_sync_placement_plan();
|
|
11665
|
+
init_public_prune_view();
|
|
11666
|
+
init_platform();
|
|
11667
|
+
init_config();
|
|
11668
|
+
init_policy();
|
|
11669
|
+
init_bridge();
|
|
11670
|
+
init_shard_bridge();
|
|
11671
|
+
init_generation_index();
|
|
11672
|
+
init_prune();
|
|
11673
|
+
init_shard();
|
|
11674
|
+
init_sync_placement_journal_format();
|
|
11675
|
+
init_sync_placement_guard();
|
|
11676
|
+
init_sync_placement_activation_proof();
|
|
11677
|
+
init_sync_placement_effective_writers();
|
|
11678
|
+
init_sync_placement_writer_revision_format();
|
|
11679
|
+
});
|
|
11680
|
+
|
|
11681
|
+
// node_modules/@staix/agent-mem/src/memory/sync-placement-dependencies.ts
|
|
11682
|
+
var init_sync_placement_dependencies = __esm(() => {
|
|
11683
|
+
init_bridge();
|
|
11684
|
+
init_generation();
|
|
11685
|
+
init_ops_contract();
|
|
11686
|
+
init_prune();
|
|
11687
|
+
init_store();
|
|
11688
|
+
init_sync_placement_journal_format();
|
|
11689
|
+
});
|
|
11690
|
+
|
|
11691
|
+
// node_modules/@staix/agent-mem/src/memory/sync-placement-git.ts
|
|
11692
|
+
var typedArrayPrototype, getBuffer, getOffset, getLength, mapSize;
|
|
11693
|
+
var init_sync_placement_git = __esm(() => {
|
|
11694
|
+
init_public_prune_input_chain();
|
|
11695
|
+
init_shard_sync_format();
|
|
11696
|
+
typedArrayPrototype = Object.getPrototypeOf(Uint8Array.prototype);
|
|
11697
|
+
getBuffer = Object.getOwnPropertyDescriptor(typedArrayPrototype, "buffer").get;
|
|
11698
|
+
getOffset = Object.getOwnPropertyDescriptor(typedArrayPrototype, "byteOffset").get;
|
|
11699
|
+
getLength = Object.getOwnPropertyDescriptor(typedArrayPrototype, "byteLength").get;
|
|
11700
|
+
mapSize = Object.getOwnPropertyDescriptor(Map.prototype, "size").get;
|
|
11701
|
+
});
|
|
11702
|
+
|
|
11703
|
+
// node_modules/@staix/agent-mem/src/memory/sync-placement-materialize.ts
|
|
11704
|
+
var init_sync_placement_materialize = __esm(() => {
|
|
11705
|
+
init_generation();
|
|
11706
|
+
init_sync_screen();
|
|
11707
|
+
init_sync_placement_dependencies();
|
|
11708
|
+
init_sync_placement_git();
|
|
11709
|
+
init_sync_placement_format();
|
|
11710
|
+
init_sync_placement_journal_format();
|
|
11711
|
+
init_shard_sync_format();
|
|
11712
|
+
init_public_prune_witness();
|
|
11713
|
+
});
|
|
11714
|
+
|
|
11715
|
+
// node_modules/@staix/agent-mem/src/memory/sync-placement-cache.ts
|
|
11716
|
+
var init_sync_placement_cache = __esm(() => {
|
|
11717
|
+
init_generation();
|
|
11718
|
+
init_sync_placement_journal_format();
|
|
11719
|
+
});
|
|
11720
|
+
|
|
11721
|
+
// node_modules/@staix/agent-mem/src/memory/shard-sync-graph.ts
|
|
11722
|
+
var init_shard_sync_graph = __esm(() => {
|
|
11723
|
+
init_public_prune_inputs();
|
|
11724
|
+
init_shard_sync_format();
|
|
11725
|
+
init_public_prune_witness();
|
|
11726
|
+
});
|
|
11727
|
+
|
|
11728
|
+
// node_modules/@staix/agent-mem/src/memory/shard-sync-history.ts
|
|
11729
|
+
var init_shard_sync_history = __esm(() => {
|
|
11730
|
+
init_generation();
|
|
11731
|
+
init_prune();
|
|
11732
|
+
init_public_prune_witness();
|
|
11733
|
+
init_shard_sync_graph();
|
|
11734
|
+
init_shard_sync_format();
|
|
11735
|
+
});
|
|
11736
|
+
|
|
11707
11737
|
// node_modules/@staix/agent-mem/src/memory/sync-placement-inspection-evidence.ts
|
|
11708
11738
|
var init_sync_placement_inspection_evidence = __esm(() => {
|
|
11709
11739
|
init_sync_placement_journal_storage();
|
|
@@ -11720,6 +11750,16 @@ var init_sync_placement_inspection_evidence = __esm(() => {
|
|
|
11720
11750
|
init_sync_placement_journal_format();
|
|
11721
11751
|
});
|
|
11722
11752
|
|
|
11753
|
+
// node_modules/@staix/agent-mem/src/memory/prune-publisher-lineage.ts
|
|
11754
|
+
var init_prune_publisher_lineage = __esm(() => {
|
|
11755
|
+
init_generation();
|
|
11756
|
+
init_mutation();
|
|
11757
|
+
init_platform();
|
|
11758
|
+
init_prune();
|
|
11759
|
+
init_shard();
|
|
11760
|
+
init_sync_screen();
|
|
11761
|
+
});
|
|
11762
|
+
|
|
11723
11763
|
// node_modules/@staix/agent-mem/src/memory/sync-placement-inspection-pending.ts
|
|
11724
11764
|
var init_sync_placement_inspection_pending = __esm(() => {
|
|
11725
11765
|
init_generation();
|
|
@@ -11748,6 +11788,7 @@ var init_sync_placement_inspection = __esm(() => {
|
|
|
11748
11788
|
init_public_prune_inputs();
|
|
11749
11789
|
init_prune_publisher_lineage();
|
|
11750
11790
|
init_sync_placement_inspection_pending();
|
|
11791
|
+
init_sync_placement_writer_revision_format();
|
|
11751
11792
|
});
|
|
11752
11793
|
|
|
11753
11794
|
// node_modules/@staix/agent-mem/src/memory/sync-placement-journal.ts
|
|
@@ -11766,6 +11807,283 @@ var init_sync_placement_journal = __esm(() => {
|
|
|
11766
11807
|
init_sync_placement_journal_format();
|
|
11767
11808
|
init_sync_placement_projection();
|
|
11768
11809
|
init_sync_placement_journal_storage();
|
|
11810
|
+
init_sync_placement_writer_revision_format();
|
|
11811
|
+
});
|
|
11812
|
+
|
|
11813
|
+
// node_modules/@staix/agent-mem/src/setup-toml.ts
|
|
11814
|
+
var SETUP_CONFIG_BYTES, temporal;
|
|
11815
|
+
var init_setup_toml = __esm(() => {
|
|
11816
|
+
SETUP_CONFIG_BYTES = 8 * 1024 * 1024;
|
|
11817
|
+
temporal = new Set(["[object Temporal.Instant]", "[object Temporal.PlainDate]", "[object Temporal.PlainTime]", "[object Temporal.PlainDateTime]"]);
|
|
11818
|
+
});
|
|
11819
|
+
|
|
11820
|
+
// node_modules/@staix/agent-mem/src/setup-json.ts
|
|
11821
|
+
import { isDeepStrictEqual as isDeepStrictEqual2 } from "util";
|
|
11822
|
+
function createJsonMcpCodec(options) {
|
|
11823
|
+
const { canonicalKey, label } = options, keys = new Set([canonicalKey, ...options.aliases ?? []]);
|
|
11824
|
+
const fail = () => {
|
|
11825
|
+
throw Error(`setup ${label} MCP configuration unavailable or ambiguous; no configuration changed`);
|
|
11826
|
+
};
|
|
11827
|
+
const whitespace = (text, start) => {
|
|
11828
|
+
let at = start;
|
|
11829
|
+
while (at < text.length && /[ \t\r\n]/.test(text[at]))
|
|
11830
|
+
at++;
|
|
11831
|
+
return at;
|
|
11832
|
+
};
|
|
11833
|
+
function stringEnd(text, start) {
|
|
11834
|
+
let at = start + 1;
|
|
11835
|
+
while (at < text.length) {
|
|
11836
|
+
if (text[at] === "\\")
|
|
11837
|
+
at += 2;
|
|
11838
|
+
else if (text[at++] === '"')
|
|
11839
|
+
return at;
|
|
11840
|
+
}
|
|
11841
|
+
return fail();
|
|
11842
|
+
}
|
|
11843
|
+
function valueEnd(text, start) {
|
|
11844
|
+
if (text[start] === '"')
|
|
11845
|
+
return stringEnd(text, start);
|
|
11846
|
+
if (text[start] === "{" || text[start] === "[") {
|
|
11847
|
+
let depth = 0, at = start;
|
|
11848
|
+
while (at < text.length) {
|
|
11849
|
+
const char = text[at];
|
|
11850
|
+
if (char === '"') {
|
|
11851
|
+
at = stringEnd(text, at);
|
|
11852
|
+
continue;
|
|
11853
|
+
}
|
|
11854
|
+
if (char === "{" || char === "[")
|
|
11855
|
+
depth++;
|
|
11856
|
+
else if ((char === "}" || char === "]") && --depth === 0)
|
|
11857
|
+
return at + 1;
|
|
11858
|
+
at++;
|
|
11859
|
+
}
|
|
11860
|
+
return fail();
|
|
11861
|
+
}
|
|
11862
|
+
let at = start;
|
|
11863
|
+
while (at < text.length && !/[ \t\r\n,}\]]/.test(text[at]))
|
|
11864
|
+
at++;
|
|
11865
|
+
return at;
|
|
11866
|
+
}
|
|
11867
|
+
function objectSpan(text, start) {
|
|
11868
|
+
if (text[start] !== "{")
|
|
11869
|
+
return fail();
|
|
11870
|
+
const members = [];
|
|
11871
|
+
let at = whitespace(text, start + 1);
|
|
11872
|
+
while (text[at] !== "}") {
|
|
11873
|
+
const keyStart = at, keyEnd = stringEnd(text, at), key = JSON.parse(text.slice(keyStart, keyEnd));
|
|
11874
|
+
if (typeof key !== "string")
|
|
11875
|
+
return fail();
|
|
11876
|
+
const valueStart = whitespace(text, whitespace(text, keyEnd) + 1), end = valueEnd(text, valueStart), next = whitespace(text, end);
|
|
11877
|
+
const comma = text[next] === "," ? next : undefined;
|
|
11878
|
+
members.push({ key, keyStart, keyEnd, valueStart, valueEnd: end, ...comma === undefined ? {} : { comma } });
|
|
11879
|
+
at = comma === undefined ? next : whitespace(text, comma + 1);
|
|
11880
|
+
}
|
|
11881
|
+
return { close: at, members };
|
|
11882
|
+
}
|
|
11883
|
+
function uniqueOwnedKeys(text, member) {
|
|
11884
|
+
const objects = [];
|
|
11885
|
+
let at = member.valueStart;
|
|
11886
|
+
while (at < member.valueEnd) {
|
|
11887
|
+
const char = text[at];
|
|
11888
|
+
if (char === '"') {
|
|
11889
|
+
const end = stringEnd(text, at), current = objects.at(-1);
|
|
11890
|
+
if (text[whitespace(text, end)] === ":" && current) {
|
|
11891
|
+
const key = JSON.parse(text.slice(at, end));
|
|
11892
|
+
if (current.has(key))
|
|
11893
|
+
return fail();
|
|
11894
|
+
current.add(key);
|
|
11895
|
+
}
|
|
11896
|
+
at = end;
|
|
11897
|
+
} else {
|
|
11898
|
+
if (char === "{")
|
|
11899
|
+
objects.push(new Set);
|
|
11900
|
+
else if (char === "[")
|
|
11901
|
+
objects.push(null);
|
|
11902
|
+
else if (char === "}" || char === "]")
|
|
11903
|
+
objects.pop();
|
|
11904
|
+
at++;
|
|
11905
|
+
}
|
|
11906
|
+
}
|
|
11907
|
+
}
|
|
11908
|
+
function document(image) {
|
|
11909
|
+
let text = "{}";
|
|
11910
|
+
if (image.bytes !== null) {
|
|
11911
|
+
if (image.bytes.length > Math.ceil(SETUP_CONFIG_BYTES / 3) * 4)
|
|
11912
|
+
return fail();
|
|
11913
|
+
const bytes = Buffer.from(image.bytes, "base64");
|
|
11914
|
+
if (bytes.toString("base64") !== image.bytes || bytes.length > SETUP_CONFIG_BYTES)
|
|
11915
|
+
return fail();
|
|
11916
|
+
try {
|
|
11917
|
+
text = decode.decode(bytes);
|
|
11918
|
+
} catch {
|
|
11919
|
+
return fail();
|
|
11920
|
+
}
|
|
11921
|
+
}
|
|
11922
|
+
let value;
|
|
11923
|
+
try {
|
|
11924
|
+
value = JSON.parse(text);
|
|
11925
|
+
} catch {
|
|
11926
|
+
return fail();
|
|
11927
|
+
}
|
|
11928
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
11929
|
+
return fail();
|
|
11930
|
+
const root = objectSpan(text, whitespace(text, 0));
|
|
11931
|
+
const containers = root.members.filter((member) => keys.has(member.key));
|
|
11932
|
+
if (containers.length > 1)
|
|
11933
|
+
return fail();
|
|
11934
|
+
const container = containers[0];
|
|
11935
|
+
if (!container)
|
|
11936
|
+
return { text, root };
|
|
11937
|
+
const servers = objectSpan(text, container.valueStart), owned = servers.members.filter((member) => member.key === "amem");
|
|
11938
|
+
if (owned.length > 1)
|
|
11939
|
+
return fail();
|
|
11940
|
+
if (owned[0])
|
|
11941
|
+
uniqueOwnedKeys(text, owned[0]);
|
|
11942
|
+
return { text, root, container, servers, ...owned[0] ? { owned: owned[0] } : {} };
|
|
11943
|
+
}
|
|
11944
|
+
const entry = (doc) => doc.owned ? JSON.parse(doc.text.slice(doc.owned.valueStart, doc.owned.valueEnd)) : undefined;
|
|
11945
|
+
function readMcp(image) {
|
|
11946
|
+
return entry(document(image));
|
|
11947
|
+
}
|
|
11948
|
+
function insert(object, text) {
|
|
11949
|
+
const last = object.members.at(-1);
|
|
11950
|
+
const at = last?.valueEnd ?? object.close;
|
|
11951
|
+
return { start: at, end: at, text: `${last ? "," : ""}${text}` };
|
|
11952
|
+
}
|
|
11953
|
+
function remove(object, member) {
|
|
11954
|
+
if (member.comma !== undefined)
|
|
11955
|
+
return { start: member.keyStart, end: member.comma + 1, text: "" };
|
|
11956
|
+
const previous = object.members[object.members.indexOf(member) - 1];
|
|
11957
|
+
return { start: previous?.comma ?? member.keyStart, end: member.valueEnd, text: "" };
|
|
11958
|
+
}
|
|
11959
|
+
function publish(image, doc, edits) {
|
|
11960
|
+
let text = doc.text;
|
|
11961
|
+
for (const edit of edits.sort((a, b) => b.start - a.start))
|
|
11962
|
+
text = text.slice(0, edit.start) + edit.text + text.slice(edit.end);
|
|
11963
|
+
if (text === doc.text)
|
|
11964
|
+
return image;
|
|
11965
|
+
if (Buffer.byteLength(text) > SETUP_CONFIG_BYTES)
|
|
11966
|
+
return fail();
|
|
11967
|
+
const result = { bytes: Buffer.from(text).toString("base64"), mode: image.mode };
|
|
11968
|
+
document(result);
|
|
11969
|
+
return result;
|
|
11970
|
+
}
|
|
11971
|
+
function put(image, value, options = {}) {
|
|
11972
|
+
const doc = document(image), edits = [], key = options.key ?? canonicalKey;
|
|
11973
|
+
if (!doc.container) {
|
|
11974
|
+
if (value === undefined && !options.keepEmpty)
|
|
11975
|
+
return image;
|
|
11976
|
+
const body = value === undefined ? options.emptyContainer ?? "{}" : `{"amem":${options.rawValue ?? JSON.stringify(value)}}`;
|
|
11977
|
+
edits.push(insert(doc.root, `${JSON.stringify(key)}:${body}`));
|
|
11978
|
+
} else if (value === undefined && !options.keepEmpty && doc.servers.members.every((member) => member.key === "amem")) {
|
|
11979
|
+
edits.push(remove(doc.root, doc.container));
|
|
11980
|
+
} else {
|
|
11981
|
+
if (doc.container.key !== key)
|
|
11982
|
+
edits.push({ start: doc.container.keyStart, end: doc.container.keyEnd, text: JSON.stringify(key) });
|
|
11983
|
+
if (value === undefined && doc.owned)
|
|
11984
|
+
edits.push(remove(doc.servers, doc.owned));
|
|
11985
|
+
else if (value !== undefined && !isDeepStrictEqual2(entry(doc), value)) {
|
|
11986
|
+
const rendered = options.rawValue ?? JSON.stringify(value);
|
|
11987
|
+
if (rendered === undefined)
|
|
11988
|
+
return fail();
|
|
11989
|
+
edits.push(doc.owned ? { start: doc.owned.valueStart, end: doc.owned.valueEnd, text: rendered } : insert(doc.servers, `"amem":${rendered}`));
|
|
11990
|
+
}
|
|
11991
|
+
}
|
|
11992
|
+
return publish(image, doc, edits);
|
|
11993
|
+
}
|
|
11994
|
+
function putMcp(image, value) {
|
|
11995
|
+
return put(image, value);
|
|
11996
|
+
}
|
|
11997
|
+
function restoreMcp(before, after, current) {
|
|
11998
|
+
const original = document(before), installed = document(after), live = document(current);
|
|
11999
|
+
if (same(current, after))
|
|
12000
|
+
return before;
|
|
12001
|
+
if (same(current, before))
|
|
12002
|
+
return current;
|
|
12003
|
+
const previous = entry(original), expected = entry(installed), present = entry(live);
|
|
12004
|
+
const previousRestored = isDeepStrictEqual2(present, previous);
|
|
12005
|
+
const pendingLayout = !!original.container && !!installed.container && original.container.key !== installed.container.key && live.container?.key === installed.container.key;
|
|
12006
|
+
if (previousRestored && !pendingLayout)
|
|
12007
|
+
return current;
|
|
12008
|
+
if (!previousRestored && !isDeepStrictEqual2(present, expected))
|
|
12009
|
+
throw Error(`setup-owned ${label} MCP entry changed; refusing to overwrite it`);
|
|
12010
|
+
const restored = put(current, previous, {
|
|
12011
|
+
key: original.container?.key ?? canonicalKey,
|
|
12012
|
+
keepEmpty: !!original.container && !original.servers.members.length,
|
|
12013
|
+
...original.owned ? { rawValue: original.text.slice(original.owned.valueStart, original.owned.valueEnd) } : {},
|
|
12014
|
+
...original.container && !original.servers.members.length ? { emptyContainer: original.text.slice(original.container.valueStart, original.container.valueEnd) } : {}
|
|
12015
|
+
});
|
|
12016
|
+
return before.bytes === null && !document(restored).root.members.length ? { bytes: null, mode: current.mode } : restored;
|
|
12017
|
+
}
|
|
12018
|
+
return { read: readMcp, put: putMcp, restore: restoreMcp };
|
|
12019
|
+
}
|
|
12020
|
+
var decode, same = (a, b) => a.bytes === b.bytes && a.mode === b.mode;
|
|
12021
|
+
var init_setup_json = __esm(() => {
|
|
12022
|
+
init_setup_toml();
|
|
12023
|
+
decode = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true });
|
|
12024
|
+
});
|
|
12025
|
+
|
|
12026
|
+
// node_modules/@staix/agent-mem/src/setup-jcode.ts
|
|
12027
|
+
var codec;
|
|
12028
|
+
var init_setup_jcode = __esm(() => {
|
|
12029
|
+
init_setup_json();
|
|
12030
|
+
init_setup_toml();
|
|
12031
|
+
codec = createJsonMcpCodec({ canonicalKey: "servers", aliases: ["mcpServers"], label: "Jcode" });
|
|
12032
|
+
});
|
|
12033
|
+
|
|
12034
|
+
// node_modules/@staix/agent-mem/src/setup-agy.ts
|
|
12035
|
+
var codec2;
|
|
12036
|
+
var init_setup_agy = __esm(() => {
|
|
12037
|
+
init_setup_json();
|
|
12038
|
+
codec2 = createJsonMcpCodec({ canonicalKey: "mcpServers", label: "Antigravity strict JSON" });
|
|
12039
|
+
});
|
|
12040
|
+
|
|
12041
|
+
// node_modules/@staix/agent-mem/src/setup-opencode.ts
|
|
12042
|
+
var codec3;
|
|
12043
|
+
var init_setup_opencode = __esm(() => {
|
|
12044
|
+
init_setup_json();
|
|
12045
|
+
codec3 = createJsonMcpCodec({ canonicalKey: "mcp", label: "OpenCode strict JSON" });
|
|
12046
|
+
});
|
|
12047
|
+
|
|
12048
|
+
// node_modules/@staix/agent-mem/src/setup-owned.ts
|
|
12049
|
+
var qwenHookControls;
|
|
12050
|
+
var init_setup_owned = __esm(() => {
|
|
12051
|
+
init_setup_toml();
|
|
12052
|
+
init_setup_jcode();
|
|
12053
|
+
init_setup_agy();
|
|
12054
|
+
init_setup_opencode();
|
|
12055
|
+
qwenHookControls = new Set(["enabled", "disabled", "notifications"]);
|
|
12056
|
+
});
|
|
12057
|
+
|
|
12058
|
+
// node_modules/@staix/agent-mem/src/setup-gemini.ts
|
|
12059
|
+
var init_setup_gemini = () => {};
|
|
12060
|
+
|
|
12061
|
+
// node_modules/@staix/agent-mem/src/setup-paths.ts
|
|
12062
|
+
var init_setup_paths = __esm(() => {
|
|
12063
|
+
init_platform();
|
|
12064
|
+
init_setup_gemini();
|
|
12065
|
+
});
|
|
12066
|
+
|
|
12067
|
+
// node_modules/@staix/agent-mem/src/setup.ts
|
|
12068
|
+
var SETUP_TARGETS, SETUP_ALL_TARGETS, MAX2, JOURNAL_MAX, PACKAGE_JSON_MAX;
|
|
12069
|
+
var init_setup = __esm(() => {
|
|
12070
|
+
init_cli_attribution();
|
|
12071
|
+
init_config();
|
|
12072
|
+
init_setup_toml();
|
|
12073
|
+
init_setup_owned();
|
|
12074
|
+
init_setup_opencode();
|
|
12075
|
+
init_setup_gemini();
|
|
12076
|
+
init_setup_paths();
|
|
12077
|
+
init_setup_jcode();
|
|
12078
|
+
init_hook_contract();
|
|
12079
|
+
init_home();
|
|
12080
|
+
init_style();
|
|
12081
|
+
init_platform();
|
|
12082
|
+
SETUP_TARGETS = ["claude", "codex", "kimi", "pi", "qwen", "jcode", "opencode", "gemini", "agy"];
|
|
12083
|
+
SETUP_ALL_TARGETS = SETUP_TARGETS.filter((target) => target !== "agy");
|
|
12084
|
+
MAX2 = SETUP_CONFIG_BYTES;
|
|
12085
|
+
JOURNAL_MAX = 12 * MAX2;
|
|
12086
|
+
PACKAGE_JSON_MAX = 64 * 1024;
|
|
11769
12087
|
});
|
|
11770
12088
|
|
|
11771
12089
|
// node_modules/@staix/agent-mem/src/index.ts
|
|
@@ -11775,6 +12093,10 @@ var init_src = __esm(() => {
|
|
|
11775
12093
|
init_candidates();
|
|
11776
12094
|
init_config();
|
|
11777
12095
|
init_sync_screen();
|
|
12096
|
+
init_sync_placement_writers();
|
|
12097
|
+
init_sync_placement_writer_roots();
|
|
12098
|
+
init_sync_placement_effective_writers();
|
|
12099
|
+
init_setup();
|
|
11778
12100
|
init_store();
|
|
11779
12101
|
init_capture();
|
|
11780
12102
|
init_shard();
|
|
@@ -30519,7 +30841,7 @@ var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
|
30519
30841
|
var safeParse4 = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
30520
30842
|
var safeParseAsync2 = /* @__PURE__ */ _safeParseAsync(ZodRealError);
|
|
30521
30843
|
var encode2 = /* @__PURE__ */ _encode(ZodRealError);
|
|
30522
|
-
var
|
|
30844
|
+
var decode3 = /* @__PURE__ */ _decode(ZodRealError);
|
|
30523
30845
|
var encodeAsync2 = /* @__PURE__ */ _encodeAsync(ZodRealError);
|
|
30524
30846
|
var decodeAsync2 = /* @__PURE__ */ _decodeAsync(ZodRealError);
|
|
30525
30847
|
var safeEncode2 = /* @__PURE__ */ _safeEncode(ZodRealError);
|
|
@@ -30677,7 +30999,7 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
30677
30999
|
return encode2(this, data, params, { callee: _encode });
|
|
30678
31000
|
},
|
|
30679
31001
|
decode: function _decode(data, params) {
|
|
30680
|
-
return
|
|
31002
|
+
return decode3(this, data, params, { callee: _decode });
|
|
30681
31003
|
},
|
|
30682
31004
|
encodeAsync: async function _encodeAsync(data, params) {
|
|
30683
31005
|
return await encodeAsync2(this, data, params, { callee: _encodeAsync });
|