@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
|
@@ -0,0 +1,72 @@
|
|
|
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": "session_new",
|
|
12
|
+
"cwd": "/work/repo",
|
|
13
|
+
"workspaceKey": "workspace-1",
|
|
14
|
+
"correlationId": "correlation-1",
|
|
15
|
+
"request": {
|
|
16
|
+
"resume": "agent-session-0",
|
|
17
|
+
"fork": true,
|
|
18
|
+
"settingSources": [
|
|
19
|
+
"project"
|
|
20
|
+
],
|
|
21
|
+
"plugins": [
|
|
22
|
+
{
|
|
23
|
+
"type": "local",
|
|
24
|
+
"path": "/plugins/one",
|
|
25
|
+
"skipMcpDiscovery": false
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"mcpServers": {
|
|
29
|
+
"docs": {
|
|
30
|
+
"type": "stdio",
|
|
31
|
+
"command": "docs-server",
|
|
32
|
+
"args": []
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"strictMcpConfig": true,
|
|
36
|
+
"includePartialMessages": false,
|
|
37
|
+
"thinking": {
|
|
38
|
+
"type": "enabled",
|
|
39
|
+
"budgetTokens": 2048
|
|
40
|
+
},
|
|
41
|
+
"forwardSubagentText": true,
|
|
42
|
+
"env": {
|
|
43
|
+
"extraAllowedKeys": [
|
|
44
|
+
"CI"
|
|
45
|
+
],
|
|
46
|
+
"extraDeniedKeys": [
|
|
47
|
+
"SECRET"
|
|
48
|
+
],
|
|
49
|
+
"extraEnv": {
|
|
50
|
+
"FLAG": "1"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"model": "model-id",
|
|
54
|
+
"systemPrompt": {
|
|
55
|
+
"type": "preset",
|
|
56
|
+
"preset": "claude_code",
|
|
57
|
+
"append": "Answer briefly."
|
|
58
|
+
},
|
|
59
|
+
"effort": "high",
|
|
60
|
+
"permissionMode": "default"
|
|
61
|
+
},
|
|
62
|
+
"gate": {
|
|
63
|
+
"decisionTimeoutMs": 30000,
|
|
64
|
+
"holdAfterMs": 5000,
|
|
65
|
+
"matcherTimeoutSeconds": 60
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"name": "session_new.full",
|
|
70
|
+
"protocolVersion": 9,
|
|
71
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"session_new\",\"cwd\":\"/work/repo\",\"workspaceKey\":\"workspace-1\",\"correlationId\":\"correlation-1\",\"request\":{\"resume\":\"agent-session-0\",\"fork\":true,\"settingSources\":[\"project\"],\"plugins\":[{\"type\":\"local\",\"path\":\"/plugins/one\",\"skipMcpDiscovery\":false}],\"mcpServers\":{\"docs\":{\"type\":\"stdio\",\"command\":\"docs-server\",\"args\":[]}},\"strictMcpConfig\":true,\"includePartialMessages\":false,\"thinking\":{\"type\":\"enabled\",\"budgetTokens\":2048},\"forwardSubagentText\":true,\"env\":{\"extraAllowedKeys\":[\"CI\"],\"extraDeniedKeys\":[\"SECRET\"],\"extraEnv\":{\"FLAG\":\"1\"}},\"model\":\"model-id\",\"systemPrompt\":{\"type\":\"preset\",\"preset\":\"claude_code\",\"append\":\"Answer briefly.\"},\"effort\":\"high\",\"permissionMode\":\"default\"},\"gate\":{\"decisionTimeoutMs\":30000,\"holdAfterMs\":5000,\"matcherTimeoutSeconds\":60}}}"
|
|
72
|
+
}
|
|
@@ -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": "session_new",
|
|
12
|
+
"cwd": null,
|
|
13
|
+
"workspaceKey": null,
|
|
14
|
+
"correlationId": null,
|
|
15
|
+
"request": null,
|
|
16
|
+
"gate": null
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"name": "session_new.minimal",
|
|
20
|
+
"protocolVersion": 9,
|
|
21
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"session_new\",\"cwd\":null,\"workspaceKey\":null,\"correlationId\":null,\"request\":null,\"gate\":null}}"
|
|
22
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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": "session_new",
|
|
12
|
+
"cwd": "/work/repo",
|
|
13
|
+
"workspaceKey": null,
|
|
14
|
+
"correlationId": null,
|
|
15
|
+
"request": {
|
|
16
|
+
"resume": null,
|
|
17
|
+
"fork": null,
|
|
18
|
+
"settingSources": null,
|
|
19
|
+
"plugins": null,
|
|
20
|
+
"mcpServers": null,
|
|
21
|
+
"strictMcpConfig": null,
|
|
22
|
+
"includePartialMessages": null,
|
|
23
|
+
"thinking": null,
|
|
24
|
+
"forwardSubagentText": null,
|
|
25
|
+
"env": null,
|
|
26
|
+
"model": null,
|
|
27
|
+
"systemPrompt": null,
|
|
28
|
+
"effort": null,
|
|
29
|
+
"permissionMode": null
|
|
30
|
+
},
|
|
31
|
+
"gate": {
|
|
32
|
+
"decisionTimeoutMs": null,
|
|
33
|
+
"holdAfterMs": null,
|
|
34
|
+
"matcherTimeoutSeconds": null
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"name": "session_new.request-all-null",
|
|
39
|
+
"protocolVersion": 9,
|
|
40
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"session_new\",\"cwd\":\"/work/repo\",\"workspaceKey\":null,\"correlationId\":null,\"request\":{\"resume\":null,\"fork\":null,\"settingSources\":null,\"plugins\":null,\"mcpServers\":null,\"strictMcpConfig\":null,\"includePartialMessages\":null,\"thinking\":null,\"forwardSubagentText\":null,\"env\":null,\"model\":null,\"systemPrompt\":null,\"effort\":null,\"permissionMode\":null},\"gate\":{\"decisionTimeoutMs\":null,\"holdAfterMs\":null,\"matcherTimeoutSeconds\":null}}}"
|
|
41
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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": "session_prompt",
|
|
12
|
+
"text": ""
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"name": "session_prompt.empty",
|
|
16
|
+
"protocolVersion": 9,
|
|
17
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"session_prompt\",\"text\":\"\"}}"
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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": "session_prompt",
|
|
12
|
+
"text": "café über"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"name": "session_prompt.multibyte",
|
|
16
|
+
"protocolVersion": 9,
|
|
17
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"session_prompt\",\"text\":\"café über\"}}"
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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": "session_prompt",
|
|
12
|
+
"text": "list the open files"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"name": "session_prompt.text",
|
|
16
|
+
"protocolVersion": 9,
|
|
17
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"session_prompt\",\"text\":\"list the open files\"}}"
|
|
18
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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": "session_prompt",
|
|
9
|
+
"text": "hello"
|
|
10
|
+
},
|
|
11
|
+
"futureField": "from a newer peer"
|
|
12
|
+
},
|
|
13
|
+
"expect": {
|
|
14
|
+
"decode": "ok"
|
|
15
|
+
},
|
|
16
|
+
"frame": null,
|
|
17
|
+
"name": "session_prompt.unknown-frame-key",
|
|
18
|
+
"protocolVersion": 9,
|
|
19
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"session_prompt\",\"text\":\"hello\"},\"futureField\":\"from a newer peer\"}"
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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": "session_prompt",
|
|
9
|
+
"text": "hello",
|
|
10
|
+
"futureField": "from a newer peer"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"expect": {
|
|
14
|
+
"decode": "ok"
|
|
15
|
+
},
|
|
16
|
+
"frame": null,
|
|
17
|
+
"name": "session_prompt.unknown-payload-key",
|
|
18
|
+
"protocolVersion": 9,
|
|
19
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"session_prompt\",\"text\":\"hello\",\"futureField\":\"from a newer peer\"}}"
|
|
20
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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": "session_update",
|
|
12
|
+
"body": {
|
|
13
|
+
"update": "agent_message",
|
|
14
|
+
"message": {
|
|
15
|
+
"type": "result",
|
|
16
|
+
"subtype": "success",
|
|
17
|
+
"is_error": false,
|
|
18
|
+
"num_turns": 1
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"name": "session_update.agent-message",
|
|
24
|
+
"protocolVersion": 9,
|
|
25
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"session_update\",\"body\":{\"update\":\"agent_message\",\"message\":{\"type\":\"result\",\"subtype\":\"success\",\"is_error\":false,\"num_turns\":1}}}}"
|
|
26
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expect": {
|
|
3
|
+
"decode": "ok"
|
|
4
|
+
},
|
|
5
|
+
"frame": {
|
|
6
|
+
"frame": "session",
|
|
7
|
+
"sessionId": "session-1",
|
|
8
|
+
"seq": 2,
|
|
9
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
10
|
+
"payload": {
|
|
11
|
+
"kind": "session_update",
|
|
12
|
+
"body": {
|
|
13
|
+
"update": "state_transition",
|
|
14
|
+
"transition": {
|
|
15
|
+
"sessionId": "agent-session-1",
|
|
16
|
+
"seq": 3,
|
|
17
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
18
|
+
"from": "ready",
|
|
19
|
+
"to": "working",
|
|
20
|
+
"activity": {
|
|
21
|
+
"kind": "tool",
|
|
22
|
+
"name": "Bash"
|
|
23
|
+
},
|
|
24
|
+
"entryId": "toolu_1",
|
|
25
|
+
"cause": {
|
|
26
|
+
"kind": "hook",
|
|
27
|
+
"event": "PreToolUse",
|
|
28
|
+
"detail": "Bash"
|
|
29
|
+
},
|
|
30
|
+
"where": {
|
|
31
|
+
"cwd": "/work/plain",
|
|
32
|
+
"worktree": null,
|
|
33
|
+
"branch": null,
|
|
34
|
+
"unknownReason": "not-a-repository"
|
|
35
|
+
},
|
|
36
|
+
"correlationId": null
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"name": "session_update.state-transition-with-activity",
|
|
42
|
+
"protocolVersion": 9,
|
|
43
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":2,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"session_update\",\"body\":{\"update\":\"state_transition\",\"transition\":{\"sessionId\":\"agent-session-1\",\"seq\":3,\"at\":\"2000-01-01T00:00:00.000Z\",\"from\":\"ready\",\"to\":\"working\",\"activity\":{\"kind\":\"tool\",\"name\":\"Bash\"},\"entryId\":\"toolu_1\",\"cause\":{\"kind\":\"hook\",\"event\":\"PreToolUse\",\"detail\":\"Bash\"},\"where\":{\"cwd\":\"/work/plain\",\"worktree\":null,\"branch\":null,\"unknownReason\":\"not-a-repository\"},\"correlationId\":null}}}}"
|
|
44
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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": "session_update",
|
|
12
|
+
"body": {
|
|
13
|
+
"update": "state_transition",
|
|
14
|
+
"transition": {
|
|
15
|
+
"sessionId": "agent-session-1",
|
|
16
|
+
"seq": 2,
|
|
17
|
+
"at": "2000-01-01T00:00:00.000Z",
|
|
18
|
+
"from": "spawning",
|
|
19
|
+
"to": "ready",
|
|
20
|
+
"activity": null,
|
|
21
|
+
"entryId": null,
|
|
22
|
+
"cause": {
|
|
23
|
+
"kind": "sdk-message",
|
|
24
|
+
"event": "system/init",
|
|
25
|
+
"detail": "the agent reported itself"
|
|
26
|
+
},
|
|
27
|
+
"where": {
|
|
28
|
+
"cwd": "/work/repo",
|
|
29
|
+
"worktree": "/work/repo",
|
|
30
|
+
"branch": "main",
|
|
31
|
+
"unknownReason": null
|
|
32
|
+
},
|
|
33
|
+
"correlationId": "correlation-1"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"name": "session_update.state-transition",
|
|
39
|
+
"protocolVersion": 9,
|
|
40
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"session_update\",\"body\":{\"update\":\"state_transition\",\"transition\":{\"sessionId\":\"agent-session-1\",\"seq\":2,\"at\":\"2000-01-01T00:00:00.000Z\",\"from\":\"spawning\",\"to\":\"ready\",\"activity\":null,\"entryId\":null,\"cause\":{\"kind\":\"sdk-message\",\"event\":\"system/init\",\"detail\":\"the agent reported itself\"},\"where\":{\"cwd\":\"/work/repo\",\"worktree\":\"/work/repo\",\"branch\":\"main\",\"unknownReason\":null},\"correlationId\":\"correlation-1\"}}}}"
|
|
41
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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": "session_update",
|
|
12
|
+
"body": {
|
|
13
|
+
"update": "wire_refusal",
|
|
14
|
+
"refusal": {
|
|
15
|
+
"reason": "seq-gap",
|
|
16
|
+
"detail": "expected 4, received 6"
|
|
17
|
+
},
|
|
18
|
+
"expected": 4,
|
|
19
|
+
"received": 6
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"name": "session_update.wire-refusal",
|
|
24
|
+
"protocolVersion": 9,
|
|
25
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"session_update\",\"body\":{\"update\":\"wire_refusal\",\"refusal\":{\"reason\":\"seq-gap\",\"detail\":\"expected 4, received 6\"},\"expected\":4,\"received\":6}}}"
|
|
26
|
+
}
|
|
@@ -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": "transcript_failed",
|
|
12
|
+
"requestId": "request-4",
|
|
13
|
+
"refusal": {
|
|
14
|
+
"reason": "transcript-path-escape",
|
|
15
|
+
"detail": "refused by the allowlist"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"name": "transcript_failed.declared-reason",
|
|
20
|
+
"protocolVersion": 9,
|
|
21
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"transcript_failed\",\"requestId\":\"request-4\",\"refusal\":{\"reason\":\"transcript-path-escape\",\"detail\":\"refused by the allowlist\"}}}"
|
|
22
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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": "transcript_list",
|
|
12
|
+
"requestId": "request-2",
|
|
13
|
+
"fromIndex": 0
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"name": "transcript_list.from-start",
|
|
17
|
+
"protocolVersion": 9,
|
|
18
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"transcript_list\",\"requestId\":\"request-2\",\"fromIndex\":0}}"
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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": "transcript_list",
|
|
12
|
+
"requestId": "request-2",
|
|
13
|
+
"fromIndex": 100
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"name": "transcript_list.paged",
|
|
17
|
+
"protocolVersion": 9,
|
|
18
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"transcript_list\",\"requestId\":\"request-2\",\"fromIndex\":100}}"
|
|
19
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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": "transcript_list_result",
|
|
9
|
+
"requestId": "request-2",
|
|
10
|
+
"entries": [
|
|
11
|
+
{
|
|
12
|
+
"projectSlug": "C--work-repo",
|
|
13
|
+
"sessionId": "agent-session-1",
|
|
14
|
+
"sizeBytes": 12,
|
|
15
|
+
"mtimeMs": 1700000000000,
|
|
16
|
+
"cwd": null
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"totalCount": 1,
|
|
20
|
+
"nextIndex": null
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"expect": {
|
|
24
|
+
"decode": "ok"
|
|
25
|
+
},
|
|
26
|
+
"frame": null,
|
|
27
|
+
"name": "transcript_list_result.entry-without-cwd",
|
|
28
|
+
"protocolVersion": 9,
|
|
29
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"transcript_list_result\",\"requestId\":\"request-2\",\"entries\":[{\"projectSlug\":\"C--work-repo\",\"sessionId\":\"agent-session-1\",\"sizeBytes\":12,\"mtimeMs\":1700000000000}],\"totalCount\":1,\"nextIndex\":null}}"
|
|
30
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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": "transcript_list_result",
|
|
12
|
+
"requestId": "request-2",
|
|
13
|
+
"entries": [
|
|
14
|
+
{
|
|
15
|
+
"projectSlug": "C--work-repo",
|
|
16
|
+
"sessionId": "agent-session-1",
|
|
17
|
+
"sizeBytes": 4608,
|
|
18
|
+
"mtimeMs": 1700000000000,
|
|
19
|
+
"cwd": "C:/work/repo"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"totalCount": 370,
|
|
23
|
+
"nextIndex": 100
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"name": "transcript_list_result.full",
|
|
27
|
+
"protocolVersion": 9,
|
|
28
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"transcript_list_result\",\"requestId\":\"request-2\",\"entries\":[{\"projectSlug\":\"C--work-repo\",\"sessionId\":\"agent-session-1\",\"sizeBytes\":4608,\"mtimeMs\":1700000000000,\"cwd\":\"C:/work/repo\"}],\"totalCount\":370,\"nextIndex\":100}}"
|
|
29
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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": "transcript_list_result",
|
|
12
|
+
"requestId": "request-2",
|
|
13
|
+
"entries": [
|
|
14
|
+
{
|
|
15
|
+
"projectSlug": "C--work-repo",
|
|
16
|
+
"sessionId": "agent-session-2",
|
|
17
|
+
"sizeBytes": 12,
|
|
18
|
+
"mtimeMs": 1700000000000,
|
|
19
|
+
"cwd": null
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"totalCount": 1,
|
|
23
|
+
"nextIndex": null
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"name": "transcript_list_result.last-page",
|
|
27
|
+
"protocolVersion": 9,
|
|
28
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"transcript_list_result\",\"requestId\":\"request-2\",\"entries\":[{\"projectSlug\":\"C--work-repo\",\"sessionId\":\"agent-session-2\",\"sizeBytes\":12,\"mtimeMs\":1700000000000,\"cwd\":null}],\"totalCount\":1,\"nextIndex\":null}}"
|
|
29
|
+
}
|
|
@@ -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": "transcript_tail",
|
|
12
|
+
"requestId": "request-3",
|
|
13
|
+
"projectSlug": "C--work-repo",
|
|
14
|
+
"sessionId": "agent-session-1",
|
|
15
|
+
"fromOffset": 0,
|
|
16
|
+
"needle": null
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"name": "transcript_tail.any-user-entry",
|
|
20
|
+
"protocolVersion": 9,
|
|
21
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"transcript_tail\",\"requestId\":\"request-3\",\"projectSlug\":\"C--work-repo\",\"sessionId\":\"agent-session-1\",\"fromOffset\":0,\"needle\":null}}"
|
|
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": "transcript_tail",
|
|
12
|
+
"requestId": "request-3",
|
|
13
|
+
"projectSlug": "C--work-repo",
|
|
14
|
+
"sessionId": "agent-session-1",
|
|
15
|
+
"fromOffset": 4096,
|
|
16
|
+
"needle": "the needle"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"name": "transcript_tail.with-needle",
|
|
20
|
+
"protocolVersion": 9,
|
|
21
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"transcript_tail\",\"requestId\":\"request-3\",\"projectSlug\":\"C--work-repo\",\"sessionId\":\"agent-session-1\",\"fromOffset\":4096,\"needle\":\"the needle\"}}"
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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": "transcript_tail_result",
|
|
12
|
+
"requestId": "request-3",
|
|
13
|
+
"found": false,
|
|
14
|
+
"absent": true,
|
|
15
|
+
"newOffset": 0,
|
|
16
|
+
"sizeBytes": null,
|
|
17
|
+
"mtimeMs": null
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"name": "transcript_tail_result.absent",
|
|
21
|
+
"protocolVersion": 9,
|
|
22
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"transcript_tail_result\",\"requestId\":\"request-3\",\"found\":false,\"absent\":true,\"newOffset\":0,\"sizeBytes\":null,\"mtimeMs\":null}}"
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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": "transcript_tail_result",
|
|
12
|
+
"requestId": "request-3",
|
|
13
|
+
"found": true,
|
|
14
|
+
"absent": false,
|
|
15
|
+
"newOffset": 8192,
|
|
16
|
+
"sizeBytes": 8192,
|
|
17
|
+
"mtimeMs": 1700000000000
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"name": "transcript_tail_result.found",
|
|
21
|
+
"protocolVersion": 9,
|
|
22
|
+
"wire": "{\"frame\":\"session\",\"sessionId\":\"session-1\",\"seq\":1,\"at\":\"2000-01-01T00:00:00.000Z\",\"payload\":{\"kind\":\"transcript_tail_result\",\"requestId\":\"request-3\",\"found\":true,\"absent\":false,\"newOffset\":8192,\"sizeBytes\":8192,\"mtimeMs\":1700000000000}}"
|
|
23
|
+
}
|