tmux-ide 2.9.2 → 2.9.3
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 +1 -1
- package/bin/cli.js +2071 -625
- package/package.json +14 -5
- package/packages/contracts/src/desktop-host.ts +3 -0
- package/packages/contracts/src/saved-machines.ts +19 -0
- package/packages/contracts/src/terminal-replica.ts +1 -1
- package/packages/core/package.json +3 -2
- package/packages/core/src/terminal-delivery.ts +51 -3
- package/packages/core/src/terminal-fnv64-wasm.ts +4 -3
- package/packages/core/src/terminal-replica-hash-cache.ts +129 -31
- package/packages/core/src/terminal-replica-owned-row.ts +27 -0
- package/packages/core/src/terminal-replica.ts +13 -28
- package/packages/daemon/dist/command-center/daemon-fleet-facts-observer.js +96 -10
- package/packages/daemon/dist/command-center/resources/saved-machine-route.js +40 -1
- package/packages/daemon/dist/command-center/ws-events.js +5 -24
- package/packages/daemon/dist/lib/canonical-daemon-bootstrap.js +8 -0
- package/packages/daemon/dist/lib/canonical-daemon.js +28 -2
- package/packages/daemon/dist/lib/daemon-embed.js +1 -1
- package/packages/daemon/dist/lib/daemon-service-manager.js +122 -0
- package/packages/daemon/dist/lib/daemon-service-plan.js +127 -0
- package/packages/daemon/dist/lib/daemon-service.js +259 -0
- package/packages/daemon/dist/lib/install-origin.js +2 -0
- package/packages/daemon/dist/lib/local-fleet-request.js +9 -3
- package/packages/daemon/dist/lib/log.js +6 -10
- package/packages/daemon/dist/lib/managed-installer-update.js +67 -0
- package/packages/daemon/dist/lib/{tui-download-lock.js → private-operation-lock.js} +11 -11
- package/packages/daemon/dist/lib/remote-daemon-info.js +3 -2
- package/packages/daemon/dist/lib/remote-daemon-lifecycle.js +4 -4
- package/packages/daemon/dist/lib/remote-tmux-command.js +10 -0
- package/packages/daemon/dist/lib/runtime-namespace.js +28 -16
- package/packages/daemon/dist/lib/saved-machines.js +40 -2
- package/packages/daemon/dist/lib/ssh-daemon-transport.js +24 -9
- package/packages/daemon/dist/lib/tmux-server-owner.js +1 -1
- package/packages/daemon/dist/lib/tmux-server-registration.js +21 -3
- package/packages/daemon/dist/lib/tui-binary.js +2 -2
- package/packages/daemon/dist/lib/update.js +18 -0
- package/packages/daemon/dist/lib/workspace-multiplexer-verbs.js +24 -1
- package/packages/daemon/dist/machines.js +40 -4
- package/packages/daemon/dist/native/TmuxIdeNotifier.app/Contents/Info.plist +2 -2
- package/packages/daemon/dist/native/TmuxIdeNotifier.app/Contents/MacOS/tmux-ide-notifier +0 -0
- package/packages/daemon/dist/native/TmuxIdeNotifier.app/Contents/Resources/Assets.car +0 -0
- package/packages/daemon/dist/native/TmuxIdeNotifier.app/Contents/_CodeSignature/CodeResources +2 -2
- package/packages/daemon/dist/terminal/attachments/direct-websocket.js +4 -1
- package/packages/daemon/dist/terminal/attachments/native-runtime.js +22 -13
- package/packages/daemon/dist/terminal/mirror/mirror-service.js +101 -3
- package/packages/daemon/dist/terminal/mirror/registered-window-guard.js +62 -0
- package/packages/daemon/dist/terminal/mirror/session-channel.js +75 -4
- package/packages/daemon/dist/terminal/mirror/shared-window-index.js +45 -0
- package/packages/daemon/dist/terminal/pane-stream/pane-stream-websocket.js +11 -1
- package/packages/daemon/dist/terminal/session-runtime/multiplexer-backend.js +1 -0
- package/packages/daemon/dist/terminal/session-runtime/registry.js +56 -7
- package/packages/daemon/dist/terminal/session-runtime/semantic-mutation-executor.js +3 -1
- package/packages/daemon/dist/tui/mirror/dialog-model.js +2 -35
- package/packages/daemon/dist/tui/mirror/runtime/application-daemon-authority-owner.js +8 -0
- package/packages/daemon/dist/tui/mirror/runtime/application-home-fleet.js +20 -2
- package/packages/daemon/dist/tui/mirror/runtime/application-machine-agents.js +7 -1
- package/packages/daemon/dist/tui/mirror/runtime/application-machine-authority.js +59 -9
- package/packages/daemon/dist/tui/mirror/runtime/application-machine-navigation.js +27 -19
- package/packages/daemon/dist/tui/mirror/runtime/application-machine-sidebar.jsx +23 -18
- package/packages/daemon/dist/tui/mirror/runtime/application-machine-startup.js +31 -2
- package/packages/daemon/dist/tui/mirror/runtime/application-palette-search-owner.js +7 -3
- package/packages/daemon/dist/tui/mirror/runtime/application-performance-log.js +3 -0
- package/packages/daemon/dist/tui/mirror/runtime/application-terminal-input-ingress.js +146 -2
- package/packages/daemon/dist/tui/mirror/runtime/application-terminal-interaction-controller.js +201 -50
- package/packages/daemon/dist/tui/mirror/runtime/bounded-performance-record-writer.js +50 -10
- package/packages/daemon/dist/tui/mirror/runtime/terminal-fast-lane-renderer-adapter.js +6 -5
- package/packages/daemon/dist/tui/mirror/runtime/terminal-pane-input-router.js +3 -0
- package/packages/daemon/dist/tui/mirror/runtime/workspace-terminal-fast-lane.js +8 -2
- package/packages/daemon/dist/tui/mirror/terminal-text.js +35 -0
- package/packages/daemon/dist/tui/mirror/workspace/connection-feedback.js +5 -3
- package/packages/daemon/src/command-center/daemon-fleet-facts-observer.ts +100 -10
- package/packages/daemon/src/command-center/resources/saved-machine-route.ts +48 -1
- package/packages/daemon/src/command-center/ws-events.ts +5 -25
- package/packages/daemon/src/lib/canonical-daemon-bootstrap.ts +12 -0
- package/packages/daemon/src/lib/canonical-daemon.ts +44 -2
- package/packages/daemon/src/lib/daemon-embed.ts +1 -0
- package/packages/daemon/src/lib/daemon-service-manager.ts +152 -0
- package/packages/daemon/src/lib/daemon-service-plan.ts +153 -0
- package/packages/daemon/src/lib/daemon-service.ts +301 -0
- package/packages/daemon/src/lib/install-origin.ts +5 -0
- package/packages/daemon/src/lib/local-fleet-request.ts +19 -3
- package/packages/daemon/src/lib/log.ts +13 -9
- package/packages/daemon/src/lib/managed-installer-update.ts +79 -0
- package/packages/daemon/src/lib/{tui-download-lock.ts → private-operation-lock.ts} +15 -11
- package/packages/daemon/src/lib/remote-daemon-info.ts +3 -3
- package/packages/daemon/src/lib/remote-daemon-lifecycle.ts +4 -4
- package/packages/daemon/src/lib/remote-tmux-command.ts +12 -0
- package/packages/daemon/src/lib/runtime-namespace.ts +27 -18
- package/packages/daemon/src/lib/saved-machines.ts +40 -1
- package/packages/daemon/src/lib/ssh-daemon-transport.ts +25 -7
- package/packages/daemon/src/lib/tmux-server-owner.ts +1 -0
- package/packages/daemon/src/lib/tmux-server-registration.ts +21 -3
- package/packages/daemon/src/lib/tui-binary.ts +2 -2
- package/packages/daemon/src/lib/update.ts +24 -0
- package/packages/daemon/src/lib/workspace-multiplexer-verbs.ts +22 -0
- package/packages/daemon/src/machines.ts +53 -5
- package/packages/daemon/src/terminal/attachments/direct-websocket.ts +8 -2
- package/packages/daemon/src/terminal/attachments/native-runtime.ts +28 -13
- package/packages/daemon/src/terminal/mirror/mirror-service.ts +105 -3
- package/packages/daemon/src/terminal/mirror/registered-window-guard.ts +66 -0
- package/packages/daemon/src/terminal/mirror/session-channel.ts +92 -4
- package/packages/daemon/src/terminal/mirror/shared-window-index.ts +42 -0
- package/packages/daemon/src/terminal/pane-stream/pane-stream-websocket.ts +12 -1
- package/packages/daemon/src/terminal/session-runtime/multiplexer-backend.ts +2 -0
- package/packages/daemon/src/terminal/session-runtime/registry.ts +70 -8
- package/packages/daemon/src/terminal/session-runtime/semantic-mutation-executor.ts +3 -1
- package/packages/daemon/src/tui/mirror/dialog-model.ts +2 -32
- package/packages/daemon/src/tui/mirror/runtime/application-daemon-authority-owner.ts +8 -0
- package/packages/daemon/src/tui/mirror/runtime/application-home-fleet.ts +19 -2
- package/packages/daemon/src/tui/mirror/runtime/application-machine-agents.ts +6 -1
- package/packages/daemon/src/tui/mirror/runtime/application-machine-authority.ts +60 -11
- package/packages/daemon/src/tui/mirror/runtime/application-machine-navigation.ts +39 -33
- package/packages/daemon/src/tui/mirror/runtime/application-machine-sidebar.tsx +31 -23
- package/packages/daemon/src/tui/mirror/runtime/application-machine-startup.ts +38 -2
- package/packages/daemon/src/tui/mirror/runtime/application-palette-search-owner.ts +7 -4
- package/packages/daemon/src/tui/mirror/runtime/application-performance-log.ts +3 -0
- package/packages/daemon/src/tui/mirror/runtime/application-root-v2.tsx +1 -1
- package/packages/daemon/src/tui/mirror/runtime/application-shell-view.tsx +47 -46
- package/packages/daemon/src/tui/mirror/runtime/application-terminal-input-ingress.ts +165 -2
- package/packages/daemon/src/tui/mirror/runtime/application-terminal-interaction-controller.ts +207 -53
- package/packages/daemon/src/tui/mirror/runtime/bounded-performance-record-writer.ts +49 -9
- package/packages/daemon/src/tui/mirror/runtime/terminal-fast-lane-renderer-adapter.ts +6 -5
- package/packages/daemon/src/tui/mirror/runtime/terminal-pane-input-router.ts +4 -0
- package/packages/daemon/src/tui/mirror/runtime/workspace-terminal-fast-lane.ts +8 -3
- package/packages/daemon/src/tui/mirror/terminal-text.ts +32 -0
- package/packages/daemon/src/tui/mirror/workspace/connection-feedback.ts +6 -3
- package/packages/daemon-client/src/fleet-connection-status.ts +10 -1
- package/packages/daemon-client/src/workspace-client.ts +4 -1
- package/packages/contracts/src/__tests__/actions-contract.test.ts +0 -119
- package/packages/contracts/src/__tests__/agent-graph-overlay.test.ts +0 -428
- package/packages/contracts/src/__tests__/app-window-mutation.test.ts +0 -51
- package/packages/contracts/src/__tests__/app-window-state.test.ts +0 -34
- package/packages/contracts/src/__tests__/application-shell.test.ts +0 -645
- package/packages/contracts/src/__tests__/automation-operations.test.ts +0 -78
- package/packages/contracts/src/__tests__/causal-cell.test.ts +0 -47
- package/packages/contracts/src/__tests__/client-view-state.test.ts +0 -115
- package/packages/contracts/src/__tests__/cohesion-fixture.test.ts +0 -106
- package/packages/contracts/src/__tests__/commands.test.ts +0 -86
- package/packages/contracts/src/__tests__/control.test.ts +0 -154
- package/packages/contracts/src/__tests__/daemon-events.test.ts +0 -405
- package/packages/contracts/src/__tests__/daemon-resources.test.ts +0 -143
- package/packages/contracts/src/__tests__/daemon-wire.test.ts +0 -149
- package/packages/contracts/src/__tests__/desktop-host.test.ts +0 -269
- package/packages/contracts/src/__tests__/desktop-missions.test.ts +0 -215
- package/packages/contracts/src/__tests__/experience-conformance.test.ts +0 -153
- package/packages/contracts/src/__tests__/experience-kernel-boundary.test.ts +0 -113
- package/packages/contracts/src/__tests__/experience-shell.test.ts +0 -65
- package/packages/contracts/src/__tests__/fixtures/daemon-wire-v2.json +0 -35
- package/packages/contracts/src/__tests__/fixtures/daemon-wire-v3.json +0 -35
- package/packages/contracts/src/__tests__/fixtures/daemon-wire-v4.json +0 -35
- package/packages/contracts/src/__tests__/fixtures/scoped-receipt.ts +0 -62
- package/packages/contracts/src/__tests__/fleet-agent-graph.test.ts +0 -231
- package/packages/contracts/src/__tests__/fleet-catalog.test.ts +0 -270
- package/packages/contracts/src/__tests__/fleet-lifecycle.test.ts +0 -62
- package/packages/contracts/src/__tests__/focus-overlay.test.ts +0 -110
- package/packages/contracts/src/__tests__/ide-config.test.ts +0 -64
- package/packages/contracts/src/__tests__/interaction-evidence.test.ts +0 -288
- package/packages/contracts/src/__tests__/interaction-receipt-v2.test.ts +0 -72
- package/packages/contracts/src/__tests__/issue-error.test.ts +0 -78
- package/packages/contracts/src/__tests__/mission-projections.test.ts +0 -186
- package/packages/contracts/src/__tests__/missions.test.ts +0 -272
- package/packages/contracts/src/__tests__/multiplexer-verbs.test.ts +0 -242
- package/packages/contracts/src/__tests__/pane-appearance.test.ts +0 -146
- package/packages/contracts/src/__tests__/pane-read-result.test.ts +0 -55
- package/packages/contracts/src/__tests__/pane-stream.test.ts +0 -536
- package/packages/contracts/src/__tests__/pane-widget-marker.test.ts +0 -327
- package/packages/contracts/src/__tests__/performance-metrics.test.ts +0 -73
- package/packages/contracts/src/__tests__/performance-qualification.test.ts +0 -137
- package/packages/contracts/src/__tests__/rich-card-widget.test.ts +0 -29
- package/packages/contracts/src/__tests__/session-runtime.test.ts +0 -512
- package/packages/contracts/src/__tests__/startup-readiness.test.ts +0 -409
- package/packages/contracts/src/__tests__/terminal-attachment-stream.test.ts +0 -72
- package/packages/contracts/src/__tests__/terminal-attachments.test.ts +0 -329
- package/packages/contracts/src/__tests__/terminal-delivery.test.ts +0 -88
- package/packages/contracts/src/__tests__/terminal-runtime-inventory.test.ts +0 -68
- package/packages/contracts/src/__tests__/terminals.test.ts +0 -87
- package/packages/contracts/src/__tests__/tmux-server-scope.test.ts +0 -166
- package/packages/contracts/src/__tests__/transport-contract-loading.test.ts +0 -91
- package/packages/contracts/src/__tests__/visual-tokens.test.ts +0 -224
- package/packages/contracts/src/__tests__/window-links.test.ts +0 -243
- package/packages/contracts/src/__tests__/workspace-changes-resource.test.ts +0 -317
- package/packages/contracts/src/__tests__/workspace-changes-view.test.ts +0 -122
- package/packages/contracts/src/__tests__/workspace-config.test.ts +0 -294
- package/packages/contracts/src/__tests__/workspace-files-resource.test.ts +0 -261
- package/packages/contracts/src/__tests__/workspace-files-tree.test.ts +0 -147
- package/packages/contracts/src/__tests__/workspace-pane-creation.test.ts +0 -249
- package/packages/contracts/src/__tests__/workspace-promotion.test.ts +0 -94
- package/packages/contracts/src/__tests__/workspace-resource-identity.test.ts +0 -90
- package/packages/contracts/src/daemon-resource-request.test.ts +0 -192
- package/packages/contracts/src/native-operation-identity.test.ts +0 -23
- package/packages/contracts/src/workspace-admission.test.ts +0 -21
- package/packages/contracts/src/workspace-catalog-resource.test.ts +0 -146
- package/packages/core/src/agent-provisioning.test.ts +0 -42
- package/packages/core/src/application-shell-session.test.ts +0 -105
- package/packages/core/src/interaction-evidence.test.ts +0 -134
- package/packages/core/src/interaction-flow.test.ts +0 -66
- package/packages/core/src/interaction-receipts.test.ts +0 -671
- package/packages/core/src/navigator.test.ts +0 -34
- package/packages/core/src/optimistic-projection-conformance.test.ts +0 -75
- package/packages/core/src/optimistic-projection.test.ts +0 -118
- package/packages/core/src/performance-metrics.test.ts +0 -121
- package/packages/core/src/performance-qualification.test.ts +0 -283
- package/packages/core/src/saved-machines.test.ts +0 -80
- package/packages/core/src/terminal-compact-cold.test.ts +0 -87
- package/packages/core/src/terminal-conformance.test.ts +0 -48
- package/packages/core/src/terminal-delivery-cache-lifetime.test.ts +0 -167
- package/packages/core/src/terminal-delivery-encode-cooperative.test.ts +0 -140
- package/packages/core/src/terminal-delivery-representation-hash.test.ts +0 -77
- package/packages/core/src/terminal-delivery.test.ts +0 -1471
- package/packages/core/src/terminal-fnv64-wasm.test.ts +0 -61
- package/packages/core/src/terminal-replica-cold.test.ts +0 -31
- package/packages/core/src/terminal-replica-cooperative.test.ts +0 -170
- package/packages/core/src/terminal-replica-hash-cache.test.ts +0 -283
- package/packages/core/src/terminal-replica.test.ts +0 -347
- package/packages/core/src/workspace-selection.test.ts +0 -63
- package/packages/daemon/dist/__tests__/support.js +0 -33
- package/packages/daemon/dist/lib/__tests__/fixtures/workspace-state-writer.js +0 -58
- package/packages/daemon/dist/lib/__tests__/installed-recovery-fixture.js +0 -400
- package/packages/daemon/dist/terminal/__tests__/MockPtyAdapter.js +0 -182
- package/packages/daemon/dist/terminal/mirror/__tests__/scripted-channel.js +0 -98
- package/packages/daemon/dist/terminal/mirror/__tests__/simulated-channel.js +0 -156
- package/packages/daemon/src/tui/mirror/__snapshots__/activity-surface-renderer.test.tsx.snap +0 -42
- package/packages/daemon/src/tui/mirror/__snapshots__/changes-terminal-surface-renderer.test.tsx.snap +0 -267
- package/packages/daemon/src/tui/mirror/__snapshots__/home-files-surface-renderer.test.tsx.snap +0 -267
- package/packages/daemon/src/tui/mirror/__snapshots__/missions-surface-renderer.test.tsx.snap +0 -134
- package/packages/daemon/src/tui/mirror/__snapshots__/recipes-gallery-renderer.test.tsx.snap +0 -141
- package/packages/daemon/src/tui/mirror/__snapshots__/shell-chrome-renderer.test.tsx.snap +0 -134
- package/packages/daemon/src/tui/mirror/runtime/__snapshots__/application-shell-view-renderer.test.tsx.snap +0 -87
- package/packages/daemon/src/tui/mirror/workspace/__snapshots__/agent-terminal-canvas-renderer.test.tsx.snap +0 -348
- package/packages/daemon/src/tui/mirror/workspace/__snapshots__/application-shell-renderer.test.tsx.snap +0 -134
- package/packages/daemon/src/tui/mirror/workspace/__snapshots__/command-palette-surface-renderer.test.tsx.snap +0 -255
- package/packages/daemon/src/tui/mirror/workspace/__snapshots__/pane-frame-renderer.test.tsx.snap +0 -525
- package/packages/daemon/src/tui/mirror/workspace/__snapshots__/terminal-pane-header-polish-renderer.test.tsx.snap +0 -31
- package/packages/daemon/src/tui/mirror/workspace/__snapshots__/workbench-shell-renderer.test.tsx.snap +0 -134
- package/packages/daemon-client/src/application-shell-session.test.ts +0 -196
- package/packages/daemon-client/src/automation-client.test.ts +0 -214
- package/packages/daemon-client/src/bootstrap-coordinator.test.ts +0 -145
- package/packages/daemon-client/src/connection-supervisor.test.ts +0 -109
- package/packages/daemon-client/src/direct-application-shell-transport.test.ts +0 -941
- package/packages/daemon-client/src/first-latest-coordinator.test.ts +0 -175
- package/packages/daemon-client/src/fleet-dial-scheduler.test.ts +0 -114
- package/packages/daemon-client/src/fleet-environments.test.ts +0 -40
- package/packages/daemon-client/src/generation-bound-store-timers.test.ts +0 -74
- package/packages/daemon-client/src/owner-action-client.test.ts +0 -245
- package/packages/daemon-client/src/pane-stream-client.test.ts +0 -2841
- package/packages/daemon-client/src/pane-stream-clock-calibration.test.ts +0 -207
- package/packages/daemon-client/src/pane-stream-loopback-benchmark.test.ts +0 -51
- package/packages/daemon-client/src/push-resource-session.test.ts +0 -509
- package/packages/daemon-client/src/resource-replica.test.ts +0 -186
- package/packages/daemon-client/src/runtime-resource-ledger.test.ts +0 -18
- package/packages/daemon-client/src/scoped-tmux-server-transport.test.ts +0 -114
- package/packages/daemon-client/src/terminal-fast-lane.test.ts +0 -835
- package/packages/daemon-client/src/tmux-server-client.test.ts +0 -279
- package/packages/daemon-client/src/tmux-server-interaction-events.test.ts +0 -230
- package/packages/daemon-client/src/workspace-catalog-v2.test.ts +0 -109
- package/packages/daemon-client/src/workspace-client-boundaries.test.ts +0 -59
- package/packages/daemon-client/src/workspace-client-operations.test.ts +0 -96
- package/packages/daemon-client/src/workspace-client.test.ts +0 -2912
- package/packages/daemon-client/src/workspace-event-supervisor.test.ts +0 -1086
- package/packages/daemon-client/src/workspace-pane-client.test.ts +0 -80
- package/packages/presentation/src/presentation-contract.test.ts +0 -63
- package/packages/tmux-bridge/src/runner.test.ts +0 -614
- package/packages/tmux-bridge/src/targeting.test.ts +0 -107
|
@@ -1,512 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from "vitest";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
SessionRuntimeAuthorityLeaseSchemaZ,
|
|
5
|
-
SessionRuntimeAuthoritySnapshotSchemaZ,
|
|
6
|
-
SessionRuntimeControllerLeaseSchemaZ,
|
|
7
|
-
SessionRuntimeControllerSnapshotSchemaZ,
|
|
8
|
-
SessionRuntimeSemanticIntentSchemaZ,
|
|
9
|
-
SessionRuntimeTerminalInputSchemaZ,
|
|
10
|
-
} from "../session-runtime.ts";
|
|
11
|
-
import { InteractionReceiptSchemaZ } from "../interaction-receipts.ts";
|
|
12
|
-
import { scopedReceiptFixture } from "./fixtures/scoped-receipt.ts";
|
|
13
|
-
// Existing structural/privacy cases use a declared synthetic inventory. Missing/forged
|
|
14
|
-
// provenance is exercised against the raw schema in interaction-receipt-v2.test.ts.
|
|
15
|
-
const ScopedReceiptFixture = {
|
|
16
|
-
parse: (raw: Record<string, unknown>) =>
|
|
17
|
-
InteractionReceiptSchemaZ.parse(scopedReceiptFixture(raw)),
|
|
18
|
-
safeParse: (raw: Record<string, unknown>) =>
|
|
19
|
-
InteractionReceiptSchemaZ.safeParse(scopedReceiptFixture(raw)),
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
describe("session runtime architecture contract", () => {
|
|
23
|
-
it("bounds exact binary input and rejects ambiguous or executable encodings", () => {
|
|
24
|
-
expect(SessionRuntimeTerminalInputSchemaZ.parse({ kind: "bytes", data: "00aAFF" })).toEqual({
|
|
25
|
-
kind: "bytes",
|
|
26
|
-
data: "00aAFF",
|
|
27
|
-
});
|
|
28
|
-
expect(
|
|
29
|
-
SessionRuntimeTerminalInputSchemaZ.safeParse({ kind: "bytes", data: "ff".repeat(1024) })
|
|
30
|
-
.success,
|
|
31
|
-
).toBe(true);
|
|
32
|
-
for (const data of ["", "f", "0x01", "ff zz", "ff; kill-server", "ff".repeat(1025)])
|
|
33
|
-
expect(SessionRuntimeTerminalInputSchemaZ.safeParse({ kind: "bytes", data }).success).toBe(
|
|
34
|
-
false,
|
|
35
|
-
);
|
|
36
|
-
});
|
|
37
|
-
it("keeps terminal text and named keys as one closed canonical input union", () => {
|
|
38
|
-
expect(SessionRuntimeTerminalInputSchemaZ.parse({ kind: "text", data: "paste界" })).toEqual({
|
|
39
|
-
kind: "text",
|
|
40
|
-
data: "paste界",
|
|
41
|
-
});
|
|
42
|
-
for (const key of ["Up", "Enter", "C-c"]) {
|
|
43
|
-
expect(SessionRuntimeTerminalInputSchemaZ.parse({ kind: "key", data: key })).toEqual({
|
|
44
|
-
kind: "key",
|
|
45
|
-
data: key,
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
expect(
|
|
49
|
-
SessionRuntimeTerminalInputSchemaZ.safeParse({ kind: "text", data: "a\0b" }).success,
|
|
50
|
-
).toBe(false);
|
|
51
|
-
expect(
|
|
52
|
-
SessionRuntimeTerminalInputSchemaZ.safeParse({ kind: "key", data: "Enter; kill-server" })
|
|
53
|
-
.success,
|
|
54
|
-
).toBe(false);
|
|
55
|
-
expect(
|
|
56
|
-
SessionRuntimeTerminalInputSchemaZ.safeParse({ kind: "key", data: "\u001b[A" }).success,
|
|
57
|
-
).toBe(false);
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
it("pins controller capabilities to one client, session, revision, and daemon generation", () => {
|
|
61
|
-
const lease = {
|
|
62
|
-
generation: "11111111-1111-4111-8111-111111111111",
|
|
63
|
-
session: "alpha",
|
|
64
|
-
clientId: "web:stable-client",
|
|
65
|
-
token: "22222222-2222-4222-8222-222222222222",
|
|
66
|
-
revision: 1,
|
|
67
|
-
};
|
|
68
|
-
expect(SessionRuntimeControllerLeaseSchemaZ.parse(lease)).toEqual(lease);
|
|
69
|
-
expect(SessionRuntimeControllerLeaseSchemaZ.safeParse({ ...lease, revision: 0 }).success).toBe(
|
|
70
|
-
false,
|
|
71
|
-
);
|
|
72
|
-
expect(
|
|
73
|
-
SessionRuntimeControllerLeaseSchemaZ.safeParse({ ...lease, clientId: "%7\n" }).success,
|
|
74
|
-
).toBe(false);
|
|
75
|
-
expect(
|
|
76
|
-
SessionRuntimeControllerSnapshotSchemaZ.parse({
|
|
77
|
-
generation: lease.generation,
|
|
78
|
-
session: lease.session,
|
|
79
|
-
controllerClientId: null,
|
|
80
|
-
revision: 0,
|
|
81
|
-
}),
|
|
82
|
-
).toMatchObject({ controllerClientId: null, revision: 0 });
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
it("pins separated authority leases to one capability and generation", () => {
|
|
86
|
-
const lease = {
|
|
87
|
-
generation: "11111111-1111-4111-8111-111111111111",
|
|
88
|
-
session: "alpha",
|
|
89
|
-
clientId: "client:web",
|
|
90
|
-
authority: "geometry" as const,
|
|
91
|
-
token: "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
|
|
92
|
-
revision: 3,
|
|
93
|
-
};
|
|
94
|
-
expect(SessionRuntimeAuthorityLeaseSchemaZ.parse(lease)).toEqual(lease);
|
|
95
|
-
expect(
|
|
96
|
-
SessionRuntimeAuthorityLeaseSchemaZ.safeParse({ ...lease, authority: "controller" }).success,
|
|
97
|
-
).toBe(false);
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
it("represents input, focus, and geometry owners independently", () => {
|
|
101
|
-
const snapshot = SessionRuntimeAuthoritySnapshotSchemaZ.parse({
|
|
102
|
-
generation: "11111111-1111-4111-8111-111111111111",
|
|
103
|
-
session: "alpha",
|
|
104
|
-
revision: 7,
|
|
105
|
-
owners: { input: "client:web", focus: null, geometry: "client:tui" },
|
|
106
|
-
nativeGeometryYieldUntilMs: 0,
|
|
107
|
-
clients: [
|
|
108
|
-
{
|
|
109
|
-
clientId: "client:web",
|
|
110
|
-
surface: "web",
|
|
111
|
-
state: "foreground",
|
|
112
|
-
connectedRevision: 1,
|
|
113
|
-
activityRevision: 4,
|
|
114
|
-
},
|
|
115
|
-
],
|
|
116
|
-
});
|
|
117
|
-
expect(snapshot.owners).toEqual({
|
|
118
|
-
input: "client:web",
|
|
119
|
-
focus: null,
|
|
120
|
-
geometry: "client:tui",
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
it("accepts semantic intents and refuses raw tmux addresses", () => {
|
|
125
|
-
const intent = {
|
|
126
|
-
verb: "workspace.pane.read",
|
|
127
|
-
workspaceName: "project",
|
|
128
|
-
semanticPaneId: "pane.editor",
|
|
129
|
-
origin: "tui",
|
|
130
|
-
};
|
|
131
|
-
expect(SessionRuntimeSemanticIntentSchemaZ.parse(intent)).toEqual(intent);
|
|
132
|
-
expect(SessionRuntimeSemanticIntentSchemaZ.safeParse({ ...intent, paneId: "%7" }).success).toBe(
|
|
133
|
-
false,
|
|
134
|
-
);
|
|
135
|
-
expect(
|
|
136
|
-
SessionRuntimeSemanticIntentSchemaZ.safeParse({
|
|
137
|
-
verb: "workspace.window.split",
|
|
138
|
-
workspaceName: "project",
|
|
139
|
-
semanticPaneId: "pane.editor",
|
|
140
|
-
direction: "right",
|
|
141
|
-
}).success,
|
|
142
|
-
).toBe(true);
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
it.each(["accepted", "observed", "rejected", "timed-out"] as const)(
|
|
146
|
-
"models the %s receipt phase",
|
|
147
|
-
(phase) => {
|
|
148
|
-
expect(
|
|
149
|
-
ScopedReceiptFixture.parse({
|
|
150
|
-
type: "interaction.receipt",
|
|
151
|
-
operationId: "2a50f1d4-6f57-4f02-8b10-b94bf24967ec",
|
|
152
|
-
sequence: 1,
|
|
153
|
-
phase,
|
|
154
|
-
origin: "tui",
|
|
155
|
-
workspaceName: "project",
|
|
156
|
-
target: { kind: "pane", semanticPaneId: "pane.editor" },
|
|
157
|
-
sourceSemanticPaneId: null,
|
|
158
|
-
operationKind: "workspace.pane.read",
|
|
159
|
-
summary: { operationKind: "workspace.pane.read", observedOnly: true },
|
|
160
|
-
proof:
|
|
161
|
-
phase === "observed"
|
|
162
|
-
? {
|
|
163
|
-
operationKind: "workspace.pane.read",
|
|
164
|
-
observed: true,
|
|
165
|
-
semanticPaneId: "pane.editor",
|
|
166
|
-
}
|
|
167
|
-
: null,
|
|
168
|
-
at: "2026-08-11T10:00:00.000Z",
|
|
169
|
-
resourceRevision: null,
|
|
170
|
-
}).phase,
|
|
171
|
-
).toBe(phase);
|
|
172
|
-
},
|
|
173
|
-
);
|
|
174
|
-
|
|
175
|
-
it("publishes authenticated source identity only on the final observed receipt", () => {
|
|
176
|
-
const base = {
|
|
177
|
-
type: "interaction.receipt" as const,
|
|
178
|
-
operationId: "2a50f1d4-6f57-4f02-8b10-b94bf24967ec",
|
|
179
|
-
sequence: 1,
|
|
180
|
-
origin: "sdk" as const,
|
|
181
|
-
workspaceName: "project",
|
|
182
|
-
target: { kind: "pane" as const, semanticPaneId: "pane.tests" },
|
|
183
|
-
sourceSemanticPaneId: "pane.editor",
|
|
184
|
-
operationKind: "workspace.pane.send" as const,
|
|
185
|
-
summary: {
|
|
186
|
-
operationKind: "workspace.pane.send" as const,
|
|
187
|
-
characterCount: 4,
|
|
188
|
-
byteCount: 4,
|
|
189
|
-
submitted: true,
|
|
190
|
-
},
|
|
191
|
-
proof: {
|
|
192
|
-
operationKind: "workspace.pane.send" as const,
|
|
193
|
-
observed: true as const,
|
|
194
|
-
semanticPaneId: "pane.tests",
|
|
195
|
-
},
|
|
196
|
-
at: "2026-08-11T10:00:00.000Z",
|
|
197
|
-
resourceRevision: null,
|
|
198
|
-
};
|
|
199
|
-
expect(ScopedReceiptFixture.safeParse({ ...base, phase: "observed" }).success).toBe(true);
|
|
200
|
-
expect(
|
|
201
|
-
ScopedReceiptFixture.safeParse({ ...base, phase: "accepted", proof: null }).success,
|
|
202
|
-
).toBe(false);
|
|
203
|
-
expect(
|
|
204
|
-
ScopedReceiptFixture.safeParse({ ...base, origin: "external", phase: "observed" }).success,
|
|
205
|
-
).toBe(false);
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
it("contracts every structural verb with a semantic target and privacy-safe proof", () => {
|
|
209
|
-
const receipt = ScopedReceiptFixture.parse({
|
|
210
|
-
type: "interaction.receipt",
|
|
211
|
-
operationId: "3a50f1d4-6f57-4f02-8b10-b94bf24967ec",
|
|
212
|
-
sequence: 2,
|
|
213
|
-
phase: "observed",
|
|
214
|
-
origin: "gui",
|
|
215
|
-
workspaceName: "project",
|
|
216
|
-
sourceSemanticPaneId: null,
|
|
217
|
-
target: { kind: "pane", semanticPaneId: "pane.editor" },
|
|
218
|
-
operationKind: "workspace.pane.resize",
|
|
219
|
-
summary: { operationKind: "workspace.pane.resize", axis: "cols", cells: 120 },
|
|
220
|
-
proof: {
|
|
221
|
-
operationKind: "workspace.pane.resize",
|
|
222
|
-
outcome: "applied",
|
|
223
|
-
semanticPaneId: "pane.editor",
|
|
224
|
-
axis: "cols",
|
|
225
|
-
cells: 118,
|
|
226
|
-
},
|
|
227
|
-
at: "2026-08-11T10:00:00.000Z",
|
|
228
|
-
resourceRevision: 4,
|
|
229
|
-
});
|
|
230
|
-
expect(receipt.proof).toMatchObject({ cells: 118 });
|
|
231
|
-
expect(JSON.stringify(receipt)).not.toMatch(/text|name|path|runtime/u);
|
|
232
|
-
expect(
|
|
233
|
-
ScopedReceiptFixture.safeParse({
|
|
234
|
-
...receipt,
|
|
235
|
-
target: { kind: "session" },
|
|
236
|
-
}).success,
|
|
237
|
-
).toBe(false);
|
|
238
|
-
});
|
|
239
|
-
|
|
240
|
-
it.each([
|
|
241
|
-
[
|
|
242
|
-
"workspace.window.split",
|
|
243
|
-
{ kind: "pane", semanticPaneId: "pane.editor" },
|
|
244
|
-
{ operationKind: "workspace.window.split", direction: "right" },
|
|
245
|
-
{
|
|
246
|
-
operationKind: "workspace.window.split",
|
|
247
|
-
outcome: "applied",
|
|
248
|
-
direction: "right",
|
|
249
|
-
semanticPaneId: "pane.created",
|
|
250
|
-
},
|
|
251
|
-
],
|
|
252
|
-
[
|
|
253
|
-
"workspace.window.kill",
|
|
254
|
-
{ kind: "window", target: { by: "pane", semanticPaneId: "pane.editor" } },
|
|
255
|
-
{ operationKind: "workspace.window.kill" },
|
|
256
|
-
{ operationKind: "workspace.window.kill", outcome: "applied", remainingWindowCount: 2 },
|
|
257
|
-
],
|
|
258
|
-
[
|
|
259
|
-
"workspace.pane.kill",
|
|
260
|
-
{ kind: "pane", semanticPaneId: "pane.editor" },
|
|
261
|
-
{ operationKind: "workspace.pane.kill" },
|
|
262
|
-
{
|
|
263
|
-
operationKind: "workspace.pane.kill",
|
|
264
|
-
outcome: "applied",
|
|
265
|
-
semanticPaneId: "pane.editor",
|
|
266
|
-
windowClosed: false,
|
|
267
|
-
remainingWindowCount: 2,
|
|
268
|
-
},
|
|
269
|
-
],
|
|
270
|
-
[
|
|
271
|
-
"workspace.session.kill",
|
|
272
|
-
{ kind: "session" },
|
|
273
|
-
{ operationKind: "workspace.session.kill" },
|
|
274
|
-
{ operationKind: "workspace.session.kill", outcome: "applied" },
|
|
275
|
-
],
|
|
276
|
-
[
|
|
277
|
-
"workspace.rename",
|
|
278
|
-
{ kind: "window", target: { by: "window", semanticWindowId: "window.editor" } },
|
|
279
|
-
{ operationKind: "workspace.rename", scope: "window" },
|
|
280
|
-
{ operationKind: "workspace.rename", outcome: "applied", scope: "window" },
|
|
281
|
-
],
|
|
282
|
-
[
|
|
283
|
-
"workspace.pane.zoom.toggle",
|
|
284
|
-
{ kind: "pane", semanticPaneId: "pane.editor" },
|
|
285
|
-
{ operationKind: "workspace.pane.zoom.toggle", desired: "zoomed" },
|
|
286
|
-
{
|
|
287
|
-
operationKind: "workspace.pane.zoom.toggle",
|
|
288
|
-
outcome: "applied",
|
|
289
|
-
semanticPaneId: "pane.editor",
|
|
290
|
-
zoomed: true,
|
|
291
|
-
},
|
|
292
|
-
],
|
|
293
|
-
[
|
|
294
|
-
"workspace.pane.select",
|
|
295
|
-
{ kind: "pane", semanticPaneId: "pane.editor" },
|
|
296
|
-
{ operationKind: "workspace.pane.select" },
|
|
297
|
-
{
|
|
298
|
-
operationKind: "workspace.pane.select",
|
|
299
|
-
outcome: "unchanged",
|
|
300
|
-
semanticPaneId: "pane.editor",
|
|
301
|
-
},
|
|
302
|
-
],
|
|
303
|
-
[
|
|
304
|
-
"workspace.pane.send",
|
|
305
|
-
{ kind: "pane", semanticPaneId: "pane.editor" },
|
|
306
|
-
{
|
|
307
|
-
operationKind: "workspace.pane.send",
|
|
308
|
-
characterCount: 4,
|
|
309
|
-
byteCount: 4,
|
|
310
|
-
submitted: true,
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
operationKind: "workspace.pane.send",
|
|
314
|
-
observed: true,
|
|
315
|
-
semanticPaneId: "pane.editor",
|
|
316
|
-
},
|
|
317
|
-
],
|
|
318
|
-
[
|
|
319
|
-
"workspace.pane.swap",
|
|
320
|
-
{ kind: "pane", semanticPaneId: "pane.editor" },
|
|
321
|
-
{ operationKind: "workspace.pane.swap", targetSemanticPaneId: "pane.tests" },
|
|
322
|
-
{
|
|
323
|
-
operationKind: "workspace.pane.swap",
|
|
324
|
-
outcome: "applied",
|
|
325
|
-
sourceSemanticPaneId: "pane.editor",
|
|
326
|
-
targetSemanticPaneId: "pane.tests",
|
|
327
|
-
},
|
|
328
|
-
],
|
|
329
|
-
[
|
|
330
|
-
"workspace.pane.resize",
|
|
331
|
-
{ kind: "pane", semanticPaneId: "pane.editor" },
|
|
332
|
-
{ operationKind: "workspace.pane.resize", axis: "cols", cells: 120 },
|
|
333
|
-
{
|
|
334
|
-
operationKind: "workspace.pane.resize",
|
|
335
|
-
outcome: "applied",
|
|
336
|
-
semanticPaneId: "pane.editor",
|
|
337
|
-
axis: "cols",
|
|
338
|
-
cells: 118,
|
|
339
|
-
},
|
|
340
|
-
],
|
|
341
|
-
[
|
|
342
|
-
"workspace.pane.read",
|
|
343
|
-
{ kind: "pane", semanticPaneId: "pane.editor" },
|
|
344
|
-
{ operationKind: "workspace.pane.read", observedOnly: true },
|
|
345
|
-
{
|
|
346
|
-
operationKind: "workspace.pane.read",
|
|
347
|
-
observed: true,
|
|
348
|
-
semanticPaneId: "pane.editor",
|
|
349
|
-
},
|
|
350
|
-
],
|
|
351
|
-
] as const)("accepts %s target, summary, and proof", (operationKind, target, summary, proof) => {
|
|
352
|
-
expect(
|
|
353
|
-
ScopedReceiptFixture.safeParse({
|
|
354
|
-
type: "interaction.receipt",
|
|
355
|
-
operationId: "4a50f1d4-6f57-4f02-8b10-b94bf24967ec",
|
|
356
|
-
sequence: 3,
|
|
357
|
-
phase: "observed",
|
|
358
|
-
origin: "gui",
|
|
359
|
-
workspaceName: "project",
|
|
360
|
-
sourceSemanticPaneId: null,
|
|
361
|
-
target,
|
|
362
|
-
operationKind,
|
|
363
|
-
summary,
|
|
364
|
-
proof,
|
|
365
|
-
at: "2026-08-11T10:00:00.000Z",
|
|
366
|
-
resourceRevision: 4,
|
|
367
|
-
}).success,
|
|
368
|
-
).toBe(true);
|
|
369
|
-
});
|
|
370
|
-
|
|
371
|
-
it("rejects cross-verb semantic proof mismatches while allowing clamped resize cells", () => {
|
|
372
|
-
const resize = {
|
|
373
|
-
type: "interaction.receipt" as const,
|
|
374
|
-
operationId: "5a50f1d4-6f57-4f02-8b10-b94bf24967ec",
|
|
375
|
-
sequence: 4,
|
|
376
|
-
phase: "observed" as const,
|
|
377
|
-
origin: "gui" as const,
|
|
378
|
-
workspaceName: "project",
|
|
379
|
-
sourceSemanticPaneId: null,
|
|
380
|
-
target: { kind: "pane" as const, semanticPaneId: "pane.editor" },
|
|
381
|
-
operationKind: "workspace.pane.resize" as const,
|
|
382
|
-
summary: {
|
|
383
|
-
operationKind: "workspace.pane.resize" as const,
|
|
384
|
-
axis: "cols" as const,
|
|
385
|
-
cells: 120,
|
|
386
|
-
},
|
|
387
|
-
proof: {
|
|
388
|
-
operationKind: "workspace.pane.resize" as const,
|
|
389
|
-
outcome: "applied" as const,
|
|
390
|
-
semanticPaneId: "pane.editor",
|
|
391
|
-
axis: "cols" as const,
|
|
392
|
-
cells: 80,
|
|
393
|
-
},
|
|
394
|
-
at: "2026-08-11T10:00:00.000Z",
|
|
395
|
-
resourceRevision: 4,
|
|
396
|
-
};
|
|
397
|
-
expect(ScopedReceiptFixture.safeParse(resize).success).toBe(true);
|
|
398
|
-
expect(
|
|
399
|
-
ScopedReceiptFixture.safeParse({
|
|
400
|
-
...resize,
|
|
401
|
-
proof: { ...resize.proof, semanticPaneId: "pane.other" },
|
|
402
|
-
}).success,
|
|
403
|
-
).toBe(false);
|
|
404
|
-
expect(
|
|
405
|
-
ScopedReceiptFixture.safeParse({
|
|
406
|
-
...resize,
|
|
407
|
-
proof: { ...resize.proof, axis: "rows" },
|
|
408
|
-
}).success,
|
|
409
|
-
).toBe(false);
|
|
410
|
-
|
|
411
|
-
const split = {
|
|
412
|
-
...resize,
|
|
413
|
-
operationKind: "workspace.window.split" as const,
|
|
414
|
-
summary: { operationKind: "workspace.window.split" as const, direction: "right" as const },
|
|
415
|
-
proof: {
|
|
416
|
-
operationKind: "workspace.window.split" as const,
|
|
417
|
-
outcome: "applied" as const,
|
|
418
|
-
direction: "down" as const,
|
|
419
|
-
semanticPaneId: "pane.created",
|
|
420
|
-
},
|
|
421
|
-
};
|
|
422
|
-
expect(ScopedReceiptFixture.safeParse(split).success).toBe(false);
|
|
423
|
-
|
|
424
|
-
const rename = {
|
|
425
|
-
...resize,
|
|
426
|
-
target: {
|
|
427
|
-
kind: "window" as const,
|
|
428
|
-
target: { by: "pane" as const, semanticPaneId: "pane.editor" },
|
|
429
|
-
},
|
|
430
|
-
operationKind: "workspace.rename" as const,
|
|
431
|
-
summary: { operationKind: "workspace.rename" as const, scope: "window" as const },
|
|
432
|
-
proof: {
|
|
433
|
-
operationKind: "workspace.rename" as const,
|
|
434
|
-
outcome: "applied" as const,
|
|
435
|
-
scope: "session" as const,
|
|
436
|
-
},
|
|
437
|
-
};
|
|
438
|
-
expect(ScopedReceiptFixture.safeParse(rename).success).toBe(false);
|
|
439
|
-
|
|
440
|
-
const swap = {
|
|
441
|
-
...resize,
|
|
442
|
-
operationKind: "workspace.pane.swap" as const,
|
|
443
|
-
summary: {
|
|
444
|
-
operationKind: "workspace.pane.swap" as const,
|
|
445
|
-
targetSemanticPaneId: "pane.tests",
|
|
446
|
-
},
|
|
447
|
-
proof: {
|
|
448
|
-
operationKind: "workspace.pane.swap" as const,
|
|
449
|
-
outcome: "applied" as const,
|
|
450
|
-
sourceSemanticPaneId: "pane.editor",
|
|
451
|
-
targetSemanticPaneId: "pane.other",
|
|
452
|
-
},
|
|
453
|
-
};
|
|
454
|
-
expect(ScopedReceiptFixture.safeParse(swap).success).toBe(false);
|
|
455
|
-
|
|
456
|
-
const zoom = {
|
|
457
|
-
...resize,
|
|
458
|
-
operationKind: "workspace.pane.zoom.toggle" as const,
|
|
459
|
-
summary: {
|
|
460
|
-
operationKind: "workspace.pane.zoom.toggle" as const,
|
|
461
|
-
desired: "zoomed" as const,
|
|
462
|
-
},
|
|
463
|
-
proof: {
|
|
464
|
-
operationKind: "workspace.pane.zoom.toggle" as const,
|
|
465
|
-
outcome: "applied" as const,
|
|
466
|
-
semanticPaneId: "pane.editor",
|
|
467
|
-
zoomed: false,
|
|
468
|
-
},
|
|
469
|
-
};
|
|
470
|
-
expect(ScopedReceiptFixture.safeParse(zoom).success).toBe(false);
|
|
471
|
-
expect(
|
|
472
|
-
ScopedReceiptFixture.safeParse({
|
|
473
|
-
...zoom,
|
|
474
|
-
summary: { ...zoom.summary, desired: "toggle" },
|
|
475
|
-
}).success,
|
|
476
|
-
).toBe(true);
|
|
477
|
-
});
|
|
478
|
-
|
|
479
|
-
it("requires presence-only summaries for external pane observations", () => {
|
|
480
|
-
const external = {
|
|
481
|
-
type: "interaction.receipt" as const,
|
|
482
|
-
operationId: "6a50f1d4-6f57-4f02-8b10-b94bf24967ec",
|
|
483
|
-
sequence: 5,
|
|
484
|
-
phase: "observed" as const,
|
|
485
|
-
origin: "external" as const,
|
|
486
|
-
workspaceName: "project",
|
|
487
|
-
sourceSemanticPaneId: null,
|
|
488
|
-
target: { kind: "pane" as const, semanticPaneId: "pane.editor" },
|
|
489
|
-
operationKind: "workspace.pane.send" as const,
|
|
490
|
-
summary: {
|
|
491
|
-
operationKind: "workspace.pane.send" as const,
|
|
492
|
-
characterCount: 4,
|
|
493
|
-
byteCount: 4,
|
|
494
|
-
submitted: true,
|
|
495
|
-
},
|
|
496
|
-
proof: {
|
|
497
|
-
operationKind: "workspace.pane.send" as const,
|
|
498
|
-
observed: true as const,
|
|
499
|
-
semanticPaneId: "pane.editor",
|
|
500
|
-
},
|
|
501
|
-
at: "2026-08-11T10:00:00.000Z",
|
|
502
|
-
resourceRevision: null,
|
|
503
|
-
};
|
|
504
|
-
expect(ScopedReceiptFixture.safeParse(external).success).toBe(false);
|
|
505
|
-
expect(
|
|
506
|
-
ScopedReceiptFixture.safeParse({
|
|
507
|
-
...external,
|
|
508
|
-
summary: { operationKind: "workspace.pane.send", observedOnly: true },
|
|
509
|
-
}).success,
|
|
510
|
-
).toBe(true);
|
|
511
|
-
});
|
|
512
|
-
});
|