@naswerks/periscope 1.0.0 → 1.0.1
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 +6 -0
- package/README.md +2 -2
- package/contracts/wire-vectors/bulk_delivered.full.json +21 -0
- package/contracts/wire-vectors/bulk_delivered.minimal.json +21 -0
- package/contracts/wire-vectors/bulk_delivered.without-stat-pair.json +22 -0
- package/contracts/wire-vectors/bulk_failed.declared-reason.json +22 -0
- package/contracts/wire-vectors/bulk_failed.unknown-reason.json +23 -0
- package/contracts/wire-vectors/bulk_request.full.json +21 -0
- package/contracts/wire-vectors/host_configure.set-and-remove.json +28 -0
- package/contracts/wire-vectors/host_configure_result.applied.json +34 -0
- package/contracts/wire-vectors/host_configure_result.refused.json +33 -0
- package/contracts/wire-vectors/link_ack.cursors.json +25 -0
- package/contracts/wire-vectors/link_ack.empty.json +16 -0
- package/contracts/wire-vectors/link_bye.cause.json +16 -0
- package/contracts/wire-vectors/link_hello.empty.json +33 -0
- package/contracts/wire-vectors/link_hello.full.json +44 -0
- package/contracts/wire-vectors/link_ping.nonce.json +16 -0
- package/contracts/wire-vectors/link_ping.unknown-payload-key.json +18 -0
- package/contracts/wire-vectors/link_pong.nonce.json +16 -0
- package/contracts/wire-vectors/link_welcome.empty.json +18 -0
- package/contracts/wire-vectors/link_welcome.full.json +25 -0
- package/contracts/wire-vectors/refused.empty.json +10 -0
- package/contracts/wire-vectors/refused.encode.empty-at.json +18 -0
- package/contracts/wire-vectors/refused.encode.empty-session-id.json +18 -0
- package/contracts/wire-vectors/refused.encode.missing-member.json +22 -0
- package/contracts/wire-vectors/refused.encode.seq-zero.json +18 -0
- package/contracts/wire-vectors/refused.encode.undeclared-configure-refusal.json +34 -0
- package/contracts/wire-vectors/refused.encode.undeclared-wire-refusal.json +27 -0
- package/contracts/wire-vectors/refused.missing-member.json +10 -0
- package/contracts/wire-vectors/refused.not-json.json +10 -0
- package/contracts/wire-vectors/refused.over-limit.json +10 -0
- package/contracts/wire-vectors/refused.seq-zero.json +10 -0
- package/contracts/wire-vectors/refused.unknown-frame.json +10 -0
- package/contracts/wire-vectors/refused.unknown-kind.json +10 -0
- package/contracts/wire-vectors/repository_list.root.json +19 -0
- package/contracts/wire-vectors/repository_list.subdirectory.json +19 -0
- package/contracts/wire-vectors/repository_list_result.entries.json +34 -0
- package/contracts/wire-vectors/repository_list_result.refused.json +24 -0
- package/contracts/wire-vectors/repository_read.head.json +20 -0
- package/contracts/wire-vectors/repository_read_result.refused.json +25 -0
- package/contracts/wire-vectors/repository_read_result.truncated.json +22 -0
- package/contracts/wire-vectors/session_cancel.bare.json +17 -0
- package/contracts/wire-vectors/session_configure.full.json +22 -0
- package/contracts/wire-vectors/session_configure.minimal.json +20 -0
- package/contracts/wire-vectors/session_delta.agent-message.json +27 -0
- package/contracts/wire-vectors/session_list.request.json +18 -0
- package/contracts/wire-vectors/session_list_result.empty.json +21 -0
- package/contracts/wire-vectors/session_list_result.full.json +36 -0
- package/contracts/wire-vectors/session_new.full.json +72 -0
- package/contracts/wire-vectors/session_new.minimal.json +22 -0
- package/contracts/wire-vectors/session_new.request-all-null.json +41 -0
- package/contracts/wire-vectors/session_prompt.empty.json +18 -0
- package/contracts/wire-vectors/session_prompt.multibyte.json +18 -0
- package/contracts/wire-vectors/session_prompt.text.json +18 -0
- package/contracts/wire-vectors/session_prompt.unknown-frame-key.json +20 -0
- package/contracts/wire-vectors/session_prompt.unknown-payload-key.json +20 -0
- package/contracts/wire-vectors/session_update.agent-message.json +26 -0
- package/contracts/wire-vectors/session_update.state-transition-with-activity.json +44 -0
- package/contracts/wire-vectors/session_update.state-transition.json +41 -0
- package/contracts/wire-vectors/session_update.wire-refusal.json +26 -0
- package/contracts/wire-vectors/transcript_failed.declared-reason.json +22 -0
- package/contracts/wire-vectors/transcript_list.from-start.json +19 -0
- package/contracts/wire-vectors/transcript_list.paged.json +19 -0
- package/contracts/wire-vectors/transcript_list_result.entry-without-cwd.json +30 -0
- package/contracts/wire-vectors/transcript_list_result.full.json +29 -0
- package/contracts/wire-vectors/transcript_list_result.last-page.json +29 -0
- package/contracts/wire-vectors/transcript_tail.any-user-entry.json +22 -0
- package/contracts/wire-vectors/transcript_tail.with-needle.json +22 -0
- package/contracts/wire-vectors/transcript_tail_result.absent.json +23 -0
- package/contracts/wire-vectors/transcript_tail_result.found.json +23 -0
- package/contracts/wire-vectors/workspace_list.from-start.json +19 -0
- package/contracts/wire-vectors/workspace_list_result.page.json +48 -0
- package/contracts/wire-vectors/workspace_list_result.refused.json +26 -0
- package/contracts/wire-vectors/workspace_release.by-path-delete-branch.json +22 -0
- package/contracts/wire-vectors/workspace_release.request.json +22 -0
- package/contracts/wire-vectors/workspace_release_bulk.two-entries.json +32 -0
- package/contracts/wire-vectors/workspace_release_bulk_result.mixed.json +37 -0
- package/contracts/wire-vectors/workspace_release_result.partial.json +26 -0
- package/contracts/wire-vectors/workspace_release_result.refused.json +26 -0
- package/contracts/wire-vectors/workspace_release_result.released.json +23 -0
- package/package.json +6 -1
- package/src/bin/command.ts +198 -0
- package/src/bin/config.ts +104 -0
- package/src/bin/login.ts +149 -0
- package/src/bin/main.ts +204 -0
- package/src/bin/pair.ts +246 -0
- package/src/bin/periscope.ts +3 -0
- package/src/bin/posture.ts +232 -0
- package/src/bin/reconfigure.ts +266 -0
- package/src/bin/serve.ts +615 -0
- package/src/bin/status.ts +61 -0
- package/src/bin/workspaces.ts +280 -0
- package/src/control/backoff.ts +40 -0
- package/src/control/codec.ts +557 -0
- package/src/control/credential.ts +33 -0
- package/src/control/frames.ts +1586 -0
- package/src/control/link-state.ts +67 -0
- package/src/control/link.ts +894 -0
- package/src/control/queue.ts +248 -0
- package/src/control/seq.ts +76 -0
- package/src/control/stream-routing.ts +216 -0
- package/src/control/stream.ts +149 -0
- package/src/core/async-queue.ts +63 -0
- package/src/core/failure.ts +61 -0
- package/src/core/index.ts +22 -0
- package/src/core/keyed-turns.ts +47 -0
- package/src/core/paths.ts +84 -0
- package/src/core/refusal.ts +430 -0
- package/src/core/result.ts +27 -0
- package/src/core/time.ts +34 -0
- package/src/core/vocab.ts +44 -0
- package/src/core/workspace-id.ts +11 -0
- package/src/gate/command.ts +617 -0
- package/src/gate/decision.ts +173 -0
- package/src/gate/escalate.ts +164 -0
- package/src/gate/gate.ts +635 -0
- package/src/gate/index.ts +53 -0
- package/src/gate/jail.ts +210 -0
- package/src/gate/local.ts +115 -0
- package/src/gate/outcome.ts +164 -0
- package/src/gate/shell.ts +295 -0
- package/src/host/agent-process.ts +694 -0
- package/src/host/bulk-post.ts +166 -0
- package/src/host/claude-transcripts.ts +404 -0
- package/src/host/config-file.ts +246 -0
- package/src/host/git-facts.ts +119 -0
- package/src/host/hooks.ts +102 -0
- package/src/host/host.ts +1901 -0
- package/src/host/index.ts +92 -0
- package/src/host/link-state-file.ts +79 -0
- package/src/host/loopback.ts +177 -0
- package/src/host/machine.ts +27 -0
- package/src/host/mcp-server.ts +66 -0
- package/src/host/package-facts.ts +25 -0
- package/src/host/paired-credential-store.ts +140 -0
- package/src/host/paths.ts +175 -0
- package/src/host/repository-read.ts +245 -0
- package/src/host/session-store.ts +133 -0
- package/src/host/sign-in.ts +352 -0
- package/src/host/telemetry.ts +105 -0
- package/src/host/token-cache.ts +214 -0
- package/src/host/transcript-fs.ts +110 -0
- package/src/host/wire-request.ts +285 -0
- package/src/host/workspace-fs.ts +90 -0
- package/src/host/workspace-trust.ts +92 -0
- package/src/identity/authorize.ts +127 -0
- package/src/identity/config.ts +227 -0
- package/src/identity/credential.ts +176 -0
- package/src/identity/device-code.ts +217 -0
- package/src/identity/index.ts +84 -0
- package/src/identity/mode.ts +161 -0
- package/src/identity/paired-credential.ts +89 -0
- package/src/identity/pkce.ts +113 -0
- package/src/identity/store.ts +98 -0
- package/src/identity/token.ts +203 -0
- package/src/index.ts +140 -0
- package/src/mcp/descriptor.ts +75 -0
- package/src/mcp/index.ts +23 -0
- package/src/mcp/schema.ts +214 -0
- package/src/mcp/server.ts +180 -0
- package/src/persistence/entry.ts +142 -0
- package/src/persistence/index.ts +47 -0
- package/src/persistence/key.ts +77 -0
- package/src/persistence/mirror.ts +118 -0
- package/src/persistence/receipt.ts +182 -0
- package/src/persistence/retention.ts +118 -0
- package/src/persistence/store.ts +183 -0
- package/src/persistence/transition-log.ts +176 -0
- package/src/protocol.ts +215 -0
- package/src/sessions/index.ts +27 -0
- package/src/sessions/registry.ts +392 -0
- package/src/sessions/session.ts +440 -0
- package/src/sessions/spawn-env.ts +318 -0
- package/src/state/coverage.ts +360 -0
- package/src/state/index.ts +58 -0
- package/src/state/machine.ts +359 -0
- package/src/state/model.ts +417 -0
- package/src/state/observer.ts +499 -0
- package/src/state/reporter.ts +60 -0
- package/src/state/store.ts +157 -0
- package/src/telemetry/index.ts +10 -0
- package/src/telemetry/usage.ts +117 -0
- package/src/workspace/git-worktree.ts +551 -0
- package/src/workspace/index.ts +17 -0
- package/src/workspace/plain-dir.ts +132 -0
- package/src/workspace/provider.ts +159 -0
- package/src/workspace/worktree-porcelain.ts +118 -0
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,12 @@ removed export. The package version and the wire protocol version are separate n
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [1.0.1] - 2026-09-17
|
|
12
|
+
|
|
13
|
+
- The package carries `src/` (without its tests) and `contracts/wire-vectors/`, so a controller in
|
|
14
|
+
another language, and a consumer that generates types from the wire, read the contract from the
|
|
15
|
+
installed package rather than from the repository. No wire or API change.
|
|
16
|
+
|
|
11
17
|
## [1.0.0] - 2026-09-17
|
|
12
18
|
|
|
13
19
|
Initial public release.
|
package/README.md
CHANGED
|
@@ -67,8 +67,8 @@ with a signed-in identity instead of a machine credential: [identity](docs/ident
|
|
|
67
67
|
A controller serves two transports: the WebSocket the host dials, and an HTTP endpoint the host
|
|
68
68
|
POSTs each permission decision to. The second is easy to miss, because nothing on the wire announces
|
|
69
69
|
it. `@naswerks/periscope/protocol` ships the wire types and the codec without anything that can
|
|
70
|
-
reach a process or a disk; `contracts/wire-vectors
|
|
71
|
-
in any language.
|
|
70
|
+
reach a process or a disk; `contracts/wire-vectors/`, shipped in the package, is the same contract
|
|
71
|
+
as bytes, for a controller in any language.
|
|
72
72
|
|
|
73
73
|
```sh
|
|
74
74
|
git clone https://github.com/naswerks/periscope && cd periscope && npm ci && npm run build
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"decode": "ok"
|
|
4
|
+
},
|
|
5
|
+
"frame": {
|
|
6
|
+
"frame": "session",
|
|
7
|
+
"sessionId": "session-1",
|
|
8
|
+
"seq": 1,
|
|
9
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
10
|
+
"payload": {
|
|
11
|
+
"kind": "bulk_delivered",
|
|
12
|
+
"deliveryId": "delivery-1",
|
|
13
|
+
"byteCount": 512,
|
|
14
|
+
"sizeBytes": 4608,
|
|
15
|
+
"mtimeMs": 1700000000000
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"name": "bulk_delivered.full",
|
|
19
|
+
"protocolVersion": 9,
|
|
20
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"bulk_delivered\",\"deliveryId\":\"delivery-1\",\"byteCount\":512,\"sizeBytes\":4608,\"mtimeMs\":1700000000000}}"
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"decode": "ok"
|
|
4
|
+
},
|
|
5
|
+
"frame": {
|
|
6
|
+
"frame": "session",
|
|
7
|
+
"sessionId": "session-1",
|
|
8
|
+
"seq": 1,
|
|
9
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
10
|
+
"payload": {
|
|
11
|
+
"kind": "bulk_delivered",
|
|
12
|
+
"deliveryId": "delivery-1",
|
|
13
|
+
"byteCount": 0,
|
|
14
|
+
"sizeBytes": null,
|
|
15
|
+
"mtimeMs": null
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"name": "bulk_delivered.minimal",
|
|
19
|
+
"protocolVersion": 9,
|
|
20
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"bulk_delivered\",\"deliveryId\":\"delivery-1\",\"byteCount\":0,\"sizeBytes\":null,\"mtimeMs\":null}}"
|
|
21
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"decoded": {
|
|
3
|
+
"frame": "session",
|
|
4
|
+
"sessionId": "session-1",
|
|
5
|
+
"seq": 1,
|
|
6
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
7
|
+
"payload": {
|
|
8
|
+
"kind": "bulk_delivered",
|
|
9
|
+
"deliveryId": "delivery-1",
|
|
10
|
+
"byteCount": 7,
|
|
11
|
+
"sizeBytes": null,
|
|
12
|
+
"mtimeMs": null
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"expect": {
|
|
16
|
+
"decode": "ok"
|
|
17
|
+
},
|
|
18
|
+
"frame": null,
|
|
19
|
+
"name": "bulk_delivered.without-stat-pair",
|
|
20
|
+
"protocolVersion": 9,
|
|
21
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"bulk_delivered\",\"deliveryId\":\"delivery-1\",\"byteCount\":7}}"
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"decode": "ok"
|
|
4
|
+
},
|
|
5
|
+
"frame": {
|
|
6
|
+
"frame": "session",
|
|
7
|
+
"sessionId": "session-1",
|
|
8
|
+
"seq": 1,
|
|
9
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
10
|
+
"payload": {
|
|
11
|
+
"kind": "bulk_failed",
|
|
12
|
+
"deliveryId": "delivery-1",
|
|
13
|
+
"refusal": {
|
|
14
|
+
"reason": "bulk-delivery-failed",
|
|
15
|
+
"detail": "the controller answered 503"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"name": "bulk_failed.declared-reason",
|
|
20
|
+
"protocolVersion": 9,
|
|
21
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"bulk_failed\",\"deliveryId\":\"delivery-1\",\"refusal\":{\"reason\":\"bulk-delivery-failed\",\"detail\":\"the controller answered 503\"}}}"
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"decoded": {
|
|
3
|
+
"frame": "session",
|
|
4
|
+
"sessionId": "session-1",
|
|
5
|
+
"seq": 1,
|
|
6
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
7
|
+
"payload": {
|
|
8
|
+
"kind": "bulk_failed",
|
|
9
|
+
"deliveryId": "delivery-1",
|
|
10
|
+
"refusal": {
|
|
11
|
+
"reason": "a-reason-from-a-newer-peer",
|
|
12
|
+
"detail": "the controller answered 503"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"expect": {
|
|
17
|
+
"decode": "ok"
|
|
18
|
+
},
|
|
19
|
+
"frame": null,
|
|
20
|
+
"name": "bulk_failed.unknown-reason",
|
|
21
|
+
"protocolVersion": 9,
|
|
22
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"bulk_failed\",\"deliveryId\":\"delivery-1\",\"refusal\":{\"reason\":\"a-reason-from-a-newer-peer\",\"detail\":\"the controller answered 503\"}}}"
|
|
23
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"decode": "ok"
|
|
4
|
+
},
|
|
5
|
+
"frame": {
|
|
6
|
+
"frame": "session",
|
|
7
|
+
"sessionId": "session-1",
|
|
8
|
+
"seq": 1,
|
|
9
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
10
|
+
"payload": {
|
|
11
|
+
"kind": "bulk_request",
|
|
12
|
+
"deliveryId": "delivery-1",
|
|
13
|
+
"what": "claude-transcript:slug/agent-session-1",
|
|
14
|
+
"fromOffset": 4096,
|
|
15
|
+
"postUrl": "https://controller.example/bulk/delivery-1"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"name": "bulk_request.full",
|
|
19
|
+
"protocolVersion": 9,
|
|
20
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"bulk_request\",\"deliveryId\":\"delivery-1\",\"what\":\"claude-transcript:slug/agent-session-1\",\"fromOffset\":4096,\"postUrl\":\"https://controller.example/bulk/delivery-1\"}}"
|
|
21
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"decode": "ok"
|
|
4
|
+
},
|
|
5
|
+
"frame": {
|
|
6
|
+
"frame": "session",
|
|
7
|
+
"sessionId": "session-1",
|
|
8
|
+
"seq": 1,
|
|
9
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
10
|
+
"payload": {
|
|
11
|
+
"kind": "host_configure",
|
|
12
|
+
"requestId": "request-6",
|
|
13
|
+
"entries": [
|
|
14
|
+
{
|
|
15
|
+
"key": "PERISCOPE_BRANCH_SCHEME",
|
|
16
|
+
"value": "{repo}/{key}"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"key": "PERISCOPE_AGENT_HOME",
|
|
20
|
+
"value": null
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"name": "host_configure.set-and-remove",
|
|
26
|
+
"protocolVersion": 9,
|
|
27
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"host_configure\",\"requestId\":\"request-6\",\"entries\":[{\"key\":\"PERISCOPE_BRANCH_SCHEME\",\"value\":\"{repo}/{key}\"},{\"key\":\"PERISCOPE_AGENT_HOME\",\"value\":null}]}}"
|
|
28
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"decode": "ok"
|
|
4
|
+
},
|
|
5
|
+
"frame": {
|
|
6
|
+
"frame": "session",
|
|
7
|
+
"sessionId": "session-1",
|
|
8
|
+
"seq": 1,
|
|
9
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
10
|
+
"payload": {
|
|
11
|
+
"kind": "host_configure_result",
|
|
12
|
+
"requestId": "request-6",
|
|
13
|
+
"configuration": {
|
|
14
|
+
"repositoryRoot": "/srv/repo",
|
|
15
|
+
"workspaceRoot": "/srv/repo-workspaces",
|
|
16
|
+
"branchScheme": "{repo}/{key}",
|
|
17
|
+
"transcriptsRoot": "/home/agent/.claude/projects",
|
|
18
|
+
"controllerUrl": "wss://controller.example/periscope/link",
|
|
19
|
+
"decisionUrl": "https://controller.example/periscope/decision",
|
|
20
|
+
"agentHome": "/home/agent/.claude"
|
|
21
|
+
},
|
|
22
|
+
"overriddenByEnvironment": [
|
|
23
|
+
"PERISCOPE_REPOSITORY_ROOT"
|
|
24
|
+
],
|
|
25
|
+
"pendingRestart": [
|
|
26
|
+
"PERISCOPE_CONTROLLER_URL"
|
|
27
|
+
],
|
|
28
|
+
"refusal": null
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"name": "host_configure_result.applied",
|
|
32
|
+
"protocolVersion": 9,
|
|
33
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"host_configure_result\",\"requestId\":\"request-6\",\"configuration\":{\"repositoryRoot\":\"/srv/repo\",\"workspaceRoot\":\"/srv/repo-workspaces\",\"branchScheme\":\"{repo}/{key}\",\"transcriptsRoot\":\"/home/agent/.claude/projects\",\"controllerUrl\":\"wss://controller.example/periscope/link\",\"decisionUrl\":\"https://controller.example/periscope/decision\",\"agentHome\":\"/home/agent/.claude\"},\"overriddenByEnvironment\":[\"PERISCOPE_REPOSITORY_ROOT\"],\"pendingRestart\":[\"PERISCOPE_CONTROLLER_URL\"],\"refusal\":null}}"
|
|
34
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"decode": "ok"
|
|
4
|
+
},
|
|
5
|
+
"frame": {
|
|
6
|
+
"frame": "session",
|
|
7
|
+
"sessionId": "session-1",
|
|
8
|
+
"seq": 1,
|
|
9
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
10
|
+
"payload": {
|
|
11
|
+
"kind": "host_configure_result",
|
|
12
|
+
"requestId": "request-6",
|
|
13
|
+
"configuration": {
|
|
14
|
+
"repositoryRoot": null,
|
|
15
|
+
"workspaceRoot": null,
|
|
16
|
+
"branchScheme": null,
|
|
17
|
+
"transcriptsRoot": null,
|
|
18
|
+
"controllerUrl": null,
|
|
19
|
+
"decisionUrl": null,
|
|
20
|
+
"agentHome": null
|
|
21
|
+
},
|
|
22
|
+
"overriddenByEnvironment": [],
|
|
23
|
+
"pendingRestart": [],
|
|
24
|
+
"refusal": {
|
|
25
|
+
"reason": "config-key-unknown",
|
|
26
|
+
"detail": "PERISCOPE_HOST_ID is not a key this host takes over the wire"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"name": "host_configure_result.refused",
|
|
31
|
+
"protocolVersion": 9,
|
|
32
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"host_configure_result\",\"requestId\":\"request-6\",\"configuration\":{\"repositoryRoot\":null,\"workspaceRoot\":null,\"branchScheme\":null,\"transcriptsRoot\":null,\"controllerUrl\":null,\"decisionUrl\":null,\"agentHome\":null},\"overriddenByEnvironment\":[],\"pendingRestart\":[],\"refusal\":{\"reason\":\"config-key-unknown\",\"detail\":\"PERISCOPE_HOST_ID is not a key this host takes over the wire\"}}}"
|
|
33
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"decode": "ok"
|
|
4
|
+
},
|
|
5
|
+
"frame": {
|
|
6
|
+
"frame": "control",
|
|
7
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
8
|
+
"payload": {
|
|
9
|
+
"kind": "link_ack",
|
|
10
|
+
"cursors": [
|
|
11
|
+
{
|
|
12
|
+
"sessionId": "session-1",
|
|
13
|
+
"seq": 4
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"sessionId": "session-2",
|
|
17
|
+
"seq": 0
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"name": "link_ack.cursors",
|
|
23
|
+
"protocolVersion": 9,
|
|
24
|
+
"wire": "{\"frame\":\"control\",\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"link_ack\",\"cursors\":[{\"sessionId\":\"session-1\",\"seq\":4},{\"sessionId\":\"session-2\",\"seq\":0}]}}"
|
|
25
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"decode": "ok"
|
|
4
|
+
},
|
|
5
|
+
"frame": {
|
|
6
|
+
"frame": "control",
|
|
7
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
8
|
+
"payload": {
|
|
9
|
+
"kind": "link_ack",
|
|
10
|
+
"cursors": []
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"name": "link_ack.empty",
|
|
14
|
+
"protocolVersion": 9,
|
|
15
|
+
"wire": "{\"frame\":\"control\",\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"link_ack\",\"cursors\":[]}}"
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"decode": "ok"
|
|
4
|
+
},
|
|
5
|
+
"frame": {
|
|
6
|
+
"frame": "control",
|
|
7
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
8
|
+
"payload": {
|
|
9
|
+
"kind": "link_bye",
|
|
10
|
+
"cause": "shutdown"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"name": "link_bye.cause",
|
|
14
|
+
"protocolVersion": 9,
|
|
15
|
+
"wire": "{\"frame\":\"control\",\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"link_bye\",\"cause\":\"shutdown\"}}"
|
|
16
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"decode": "ok"
|
|
4
|
+
},
|
|
5
|
+
"frame": {
|
|
6
|
+
"frame": "control",
|
|
7
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
8
|
+
"payload": {
|
|
9
|
+
"kind": "link_hello",
|
|
10
|
+
"protocolVersion": 9,
|
|
11
|
+
"hostId": "host-1",
|
|
12
|
+
"capabilities": [],
|
|
13
|
+
"cursors": [],
|
|
14
|
+
"configuration": {
|
|
15
|
+
"repositoryRoot": null,
|
|
16
|
+
"workspaceRoot": null,
|
|
17
|
+
"branchScheme": null,
|
|
18
|
+
"transcriptsRoot": null,
|
|
19
|
+
"controllerUrl": null,
|
|
20
|
+
"decisionUrl": null,
|
|
21
|
+
"agentHome": null
|
|
22
|
+
},
|
|
23
|
+
"pendingRestart": [],
|
|
24
|
+
"protocolRange": {
|
|
25
|
+
"min": 9,
|
|
26
|
+
"max": 9
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"name": "link_hello.empty",
|
|
31
|
+
"protocolVersion": 9,
|
|
32
|
+
"wire": "{\"frame\":\"control\",\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"link_hello\",\"protocolVersion\":9,\"hostId\":\"host-1\",\"capabilities\":[],\"cursors\":[],\"configuration\":{\"repositoryRoot\":null,\"workspaceRoot\":null,\"branchScheme\":null,\"transcriptsRoot\":null,\"controllerUrl\":null,\"decisionUrl\":null,\"agentHome\":null},\"pendingRestart\":[],\"protocolRange\":{\"min\":9,\"max\":9}}}"
|
|
33
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"decode": "ok"
|
|
4
|
+
},
|
|
5
|
+
"frame": {
|
|
6
|
+
"frame": "control",
|
|
7
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
8
|
+
"payload": {
|
|
9
|
+
"kind": "link_hello",
|
|
10
|
+
"protocolVersion": 9,
|
|
11
|
+
"hostId": "host-1",
|
|
12
|
+
"capabilities": [
|
|
13
|
+
"bulk-post",
|
|
14
|
+
"workspace:git-worktree",
|
|
15
|
+
"workspace:branch-scheme"
|
|
16
|
+
],
|
|
17
|
+
"cursors": [
|
|
18
|
+
{
|
|
19
|
+
"sessionId": "session-1",
|
|
20
|
+
"seq": 4
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"configuration": {
|
|
24
|
+
"repositoryRoot": "/srv/repo",
|
|
25
|
+
"workspaceRoot": "/srv/repo-workspaces",
|
|
26
|
+
"branchScheme": "{repo}/{key}",
|
|
27
|
+
"transcriptsRoot": "/home/agent/.claude/projects",
|
|
28
|
+
"controllerUrl": "wss://controller.example/periscope/link",
|
|
29
|
+
"decisionUrl": "https://controller.example/periscope/decision",
|
|
30
|
+
"agentHome": "/home/agent/.claude"
|
|
31
|
+
},
|
|
32
|
+
"pendingRestart": [
|
|
33
|
+
"PERISCOPE_DECISION_URL"
|
|
34
|
+
],
|
|
35
|
+
"protocolRange": {
|
|
36
|
+
"min": 9,
|
|
37
|
+
"max": 9
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"name": "link_hello.full",
|
|
42
|
+
"protocolVersion": 9,
|
|
43
|
+
"wire": "{\"frame\":\"control\",\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"link_hello\",\"protocolVersion\":9,\"hostId\":\"host-1\",\"capabilities\":[\"bulk-post\",\"workspace:git-worktree\",\"workspace:branch-scheme\"],\"cursors\":[{\"sessionId\":\"session-1\",\"seq\":4}],\"configuration\":{\"repositoryRoot\":\"/srv/repo\",\"workspaceRoot\":\"/srv/repo-workspaces\",\"branchScheme\":\"{repo}/{key}\",\"transcriptsRoot\":\"/home/agent/.claude/projects\",\"controllerUrl\":\"wss://controller.example/periscope/link\",\"decisionUrl\":\"https://controller.example/periscope/decision\",\"agentHome\":\"/home/agent/.claude\"},\"pendingRestart\":[\"PERISCOPE_DECISION_URL\"],\"protocolRange\":{\"min\":9,\"max\":9}}}"
|
|
44
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"decode": "ok"
|
|
4
|
+
},
|
|
5
|
+
"frame": {
|
|
6
|
+
"frame": "control",
|
|
7
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
8
|
+
"payload": {
|
|
9
|
+
"kind": "link_ping",
|
|
10
|
+
"nonce": "nonce-1"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"name": "link_ping.nonce",
|
|
14
|
+
"protocolVersion": 9,
|
|
15
|
+
"wire": "{\"frame\":\"control\",\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"link_ping\",\"nonce\":\"nonce-1\"}}"
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"decoded": {
|
|
3
|
+
"frame": "control",
|
|
4
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
5
|
+
"payload": {
|
|
6
|
+
"kind": "link_ping",
|
|
7
|
+
"nonce": "nonce-1",
|
|
8
|
+
"futureField": "from a newer peer"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"expect": {
|
|
12
|
+
"decode": "ok"
|
|
13
|
+
},
|
|
14
|
+
"frame": null,
|
|
15
|
+
"name": "link_ping.unknown-payload-key",
|
|
16
|
+
"protocolVersion": 9,
|
|
17
|
+
"wire": "{\"frame\":\"control\",\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"link_ping\",\"nonce\":\"nonce-1\",\"futureField\":\"from a newer peer\"}}"
|
|
18
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"decode": "ok"
|
|
4
|
+
},
|
|
5
|
+
"frame": {
|
|
6
|
+
"frame": "control",
|
|
7
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
8
|
+
"payload": {
|
|
9
|
+
"kind": "link_pong",
|
|
10
|
+
"nonce": "nonce-1"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"name": "link_pong.nonce",
|
|
14
|
+
"protocolVersion": 9,
|
|
15
|
+
"wire": "{\"frame\":\"control\",\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"link_pong\",\"nonce\":\"nonce-1\"}}"
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"decode": "ok"
|
|
4
|
+
},
|
|
5
|
+
"frame": {
|
|
6
|
+
"frame": "control",
|
|
7
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
8
|
+
"payload": {
|
|
9
|
+
"kind": "link_welcome",
|
|
10
|
+
"protocolVersion": 9,
|
|
11
|
+
"capabilities": [],
|
|
12
|
+
"cursors": []
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"name": "link_welcome.empty",
|
|
16
|
+
"protocolVersion": 9,
|
|
17
|
+
"wire": "{\"frame\":\"control\",\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"link_welcome\",\"protocolVersion\":9,\"capabilities\":[],\"cursors\":[]}}"
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"decode": "ok"
|
|
4
|
+
},
|
|
5
|
+
"frame": {
|
|
6
|
+
"frame": "control",
|
|
7
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
8
|
+
"payload": {
|
|
9
|
+
"kind": "link_welcome",
|
|
10
|
+
"protocolVersion": 9,
|
|
11
|
+
"capabilities": [
|
|
12
|
+
"bulk-post"
|
|
13
|
+
],
|
|
14
|
+
"cursors": [
|
|
15
|
+
{
|
|
16
|
+
"sessionId": "session-1",
|
|
17
|
+
"seq": 3
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"name": "link_welcome.full",
|
|
23
|
+
"protocolVersion": 9,
|
|
24
|
+
"wire": "{\"frame\":\"control\",\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"link_welcome\",\"protocolVersion\":9,\"capabilities\":[\"bulk-post\"],\"cursors\":[{\"sessionId\":\"session-1\",\"seq\":3}]}}"
|
|
25
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"encode": "refused",
|
|
4
|
+
"reason": "frame-malformed"
|
|
5
|
+
},
|
|
6
|
+
"frame": {
|
|
7
|
+
"frame": "session",
|
|
8
|
+
"sessionId": "session-1",
|
|
9
|
+
"seq": 1,
|
|
10
|
+
"at": "",
|
|
11
|
+
"payload": {
|
|
12
|
+
"kind": "session_cancel"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"name": "refused.encode.empty-at",
|
|
16
|
+
"protocolVersion": 9,
|
|
17
|
+
"wire": null
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"encode": "refused",
|
|
4
|
+
"reason": "frame-malformed"
|
|
5
|
+
},
|
|
6
|
+
"frame": {
|
|
7
|
+
"frame": "session",
|
|
8
|
+
"sessionId": "",
|
|
9
|
+
"seq": 1,
|
|
10
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
11
|
+
"payload": {
|
|
12
|
+
"kind": "session_cancel"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"name": "refused.encode.empty-session-id",
|
|
16
|
+
"protocolVersion": 9,
|
|
17
|
+
"wire": null
|
|
18
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"encode": "refused",
|
|
4
|
+
"reason": "frame-malformed"
|
|
5
|
+
},
|
|
6
|
+
"frame": {
|
|
7
|
+
"frame": "session",
|
|
8
|
+
"sessionId": "session-1",
|
|
9
|
+
"seq": 1,
|
|
10
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
11
|
+
"payload": {
|
|
12
|
+
"kind": "session_new",
|
|
13
|
+
"cwd": "/work/repo",
|
|
14
|
+
"correlationId": null,
|
|
15
|
+
"request": null,
|
|
16
|
+
"gate": null
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"name": "refused.encode.missing-member",
|
|
20
|
+
"protocolVersion": 9,
|
|
21
|
+
"wire": null
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"encode": "refused",
|
|
4
|
+
"reason": "frame-malformed"
|
|
5
|
+
},
|
|
6
|
+
"frame": {
|
|
7
|
+
"frame": "session",
|
|
8
|
+
"sessionId": "session-1",
|
|
9
|
+
"seq": 0,
|
|
10
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
11
|
+
"payload": {
|
|
12
|
+
"kind": "session_cancel"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"name": "refused.encode.seq-zero",
|
|
16
|
+
"protocolVersion": 9,
|
|
17
|
+
"wire": null
|
|
18
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"encode": "refused",
|
|
4
|
+
"reason": "frame-malformed"
|
|
5
|
+
},
|
|
6
|
+
"frame": {
|
|
7
|
+
"frame": "session",
|
|
8
|
+
"sessionId": "session-1",
|
|
9
|
+
"seq": 1,
|
|
10
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
11
|
+
"payload": {
|
|
12
|
+
"kind": "host_configure_result",
|
|
13
|
+
"requestId": "request-1",
|
|
14
|
+
"configuration": {
|
|
15
|
+
"repositoryRoot": null,
|
|
16
|
+
"workspaceRoot": null,
|
|
17
|
+
"branchScheme": null,
|
|
18
|
+
"transcriptsRoot": null,
|
|
19
|
+
"controllerUrl": null,
|
|
20
|
+
"decisionUrl": null,
|
|
21
|
+
"agentHome": null
|
|
22
|
+
},
|
|
23
|
+
"overriddenByEnvironment": [],
|
|
24
|
+
"pendingRestart": [],
|
|
25
|
+
"refusal": {
|
|
26
|
+
"reason": "a-reason-this-host-does-not-declare",
|
|
27
|
+
"detail": ""
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"name": "refused.encode.undeclared-configure-refusal",
|
|
32
|
+
"protocolVersion": 9,
|
|
33
|
+
"wire": null
|
|
34
|
+
}
|