@vibefield/puppeteer-imposter 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/bin/ai.mjs +17 -0
- package/dist/cli/argv.d.ts +40 -0
- package/dist/cli/argv.d.ts.map +1 -0
- package/dist/cli/argv.js +62 -0
- package/dist/cli/argv.js.map +1 -0
- package/dist/cli/http-persona.d.ts +15 -0
- package/dist/cli/http-persona.d.ts.map +1 -0
- package/dist/cli/http-persona.js +216 -0
- package/dist/cli/http-persona.js.map +1 -0
- package/dist/cli/main.d.ts +11 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/main.js +671 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/prompt-line.d.ts +27 -0
- package/dist/cli/prompt-line.d.ts.map +1 -0
- package/dist/cli/prompt-line.js +93 -0
- package/dist/cli/prompt-line.js.map +1 -0
- package/dist/control/client.d.ts +51 -0
- package/dist/control/client.d.ts.map +1 -0
- package/dist/control/client.js +206 -0
- package/dist/control/client.js.map +1 -0
- package/dist/control/index.d.ts +10 -0
- package/dist/control/index.d.ts.map +1 -0
- package/dist/control/index.js +10 -0
- package/dist/control/index.js.map +1 -0
- package/dist/control/peer.d.ts +42 -0
- package/dist/control/peer.d.ts.map +1 -0
- package/dist/control/peer.js +174 -0
- package/dist/control/peer.js.map +1 -0
- package/dist/control/protocol.d.ts +207 -0
- package/dist/control/protocol.d.ts.map +1 -0
- package/dist/control/protocol.js +535 -0
- package/dist/control/protocol.js.map +1 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -0
- package/dist/persona/launch.d.ts +7 -0
- package/dist/persona/launch.d.ts.map +1 -0
- package/dist/persona/launch.js +26 -0
- package/dist/persona/launch.js.map +1 -0
- package/dist/persona/load.d.ts +28 -0
- package/dist/persona/load.d.ts.map +1 -0
- package/dist/persona/load.js +705 -0
- package/dist/persona/load.js.map +1 -0
- package/dist/persona/session-id.d.ts +4 -0
- package/dist/persona/session-id.d.ts.map +1 -0
- package/dist/persona/session-id.js +12 -0
- package/dist/persona/session-id.js.map +1 -0
- package/dist/persona/types.d.ts +265 -0
- package/dist/persona/types.d.ts.map +1 -0
- package/dist/persona/types.js +38 -0
- package/dist/persona/types.js.map +1 -0
- package/dist/session/channels/hook.d.ts +31 -0
- package/dist/session/channels/hook.d.ts.map +1 -0
- package/dist/session/channels/hook.js +114 -0
- package/dist/session/channels/hook.js.map +1 -0
- package/dist/session/channels/http-sse.d.ts +67 -0
- package/dist/session/channels/http-sse.d.ts.map +1 -0
- package/dist/session/channels/http-sse.js +212 -0
- package/dist/session/channels/http-sse.js.map +1 -0
- package/dist/session/channels/jsonrpc.d.ts +56 -0
- package/dist/session/channels/jsonrpc.d.ts.map +1 -0
- package/dist/session/channels/jsonrpc.js +196 -0
- package/dist/session/channels/jsonrpc.js.map +1 -0
- package/dist/session/channels/leader-ipc.d.ts +27 -0
- package/dist/session/channels/leader-ipc.d.ts.map +1 -0
- package/dist/session/channels/leader-ipc.js +314 -0
- package/dist/session/channels/leader-ipc.js.map +1 -0
- package/dist/session/channels/native-store.d.ts +31 -0
- package/dist/session/channels/native-store.d.ts.map +1 -0
- package/dist/session/channels/native-store.js +275 -0
- package/dist/session/channels/native-store.js.map +1 -0
- package/dist/session/channels/statusline.d.ts +20 -0
- package/dist/session/channels/statusline.d.ts.map +1 -0
- package/dist/session/channels/statusline.js +48 -0
- package/dist/session/channels/statusline.js.map +1 -0
- package/dist/session/channels/terminal.d.ts +27 -0
- package/dist/session/channels/terminal.d.ts.map +1 -0
- package/dist/session/channels/terminal.js +108 -0
- package/dist/session/channels/terminal.js.map +1 -0
- package/dist/session/channels/transcript.d.ts +16 -0
- package/dist/session/channels/transcript.d.ts.map +1 -0
- package/dist/session/channels/transcript.js +24 -0
- package/dist/session/channels/transcript.js.map +1 -0
- package/dist/session/channels/ws-unix.d.ts +57 -0
- package/dist/session/channels/ws-unix.d.ts.map +1 -0
- package/dist/session/channels/ws-unix.js +396 -0
- package/dist/session/channels/ws-unix.js.map +1 -0
- package/dist/session/http-session-server.d.ts +31 -0
- package/dist/session/http-session-server.d.ts.map +1 -0
- package/dist/session/http-session-server.js +508 -0
- package/dist/session/http-session-server.js.map +1 -0
- package/dist/session/scenario-driver.d.ts +105 -0
- package/dist/session/scenario-driver.d.ts.map +1 -0
- package/dist/session/scenario-driver.js +211 -0
- package/dist/session/scenario-driver.js.map +1 -0
- package/dist/session/scenario.d.ts +119 -0
- package/dist/session/scenario.d.ts.map +1 -0
- package/dist/session/scenario.js +299 -0
- package/dist/session/scenario.js.map +1 -0
- package/dist/session/serve.d.ts +124 -0
- package/dist/session/serve.d.ts.map +1 -0
- package/dist/session/serve.js +136 -0
- package/dist/session/serve.js.map +1 -0
- package/dist/session/session.d.ts +125 -0
- package/dist/session/session.d.ts.map +1 -0
- package/dist/session/session.js +781 -0
- package/dist/session/session.js.map +1 -0
- package/dist/session/template.d.ts +35 -0
- package/dist/session/template.d.ts.map +1 -0
- package/dist/session/template.js +133 -0
- package/dist/session/template.js.map +1 -0
- package/dist/session/timeline.d.ts +81 -0
- package/dist/session/timeline.d.ts.map +1 -0
- package/dist/session/timeline.js +155 -0
- package/dist/session/timeline.js.map +1 -0
- package/dist/tui/app.d.ts +30 -0
- package/dist/tui/app.d.ts.map +1 -0
- package/dist/tui/app.js +72 -0
- package/dist/tui/app.js.map +1 -0
- package/dist/tui/mount.d.ts +37 -0
- package/dist/tui/mount.d.ts.map +1 -0
- package/dist/tui/mount.js +88 -0
- package/dist/tui/mount.js.map +1 -0
- package/dist/tui/store.d.ts +38 -0
- package/dist/tui/store.d.ts.map +1 -0
- package/dist/tui/store.js +56 -0
- package/dist/tui/store.js.map +1 -0
- package/dist/tui/theme.d.ts +40 -0
- package/dist/tui/theme.d.ts.map +1 -0
- package/dist/tui/theme.js +54 -0
- package/dist/tui/theme.js.map +1 -0
- package/package.json +67 -3
- package/personas/antigravity/behavior/happy-turn.json +9 -0
- package/personas/antigravity/ops.json +14 -0
- package/personas/antigravity/persona.json +15 -0
- package/personas/antigravity/runflows.json +6 -0
- package/personas/antigravity/scenarios/happy-turn.json +25 -0
- package/personas/claude/behavior/happy-turn.json +19 -0
- package/personas/claude/ops.json +128 -0
- package/personas/claude/persona.json +29 -0
- package/personas/claude/runflows.json +45 -0
- package/personas/claude/scenarios/channel-disconnect.json +19 -0
- package/personas/claude/scenarios/crash-mid-turn.json +42 -0
- package/personas/claude/scenarios/cross-layer-implementation.json +488 -0
- package/personas/claude/scenarios/deep-research.json +494 -0
- package/personas/claude/scenarios/duplicate-out-of-order.json +57 -0
- package/personas/claude/scenarios/flood.json +11 -0
- package/personas/claude/scenarios/happy-turn.json +57 -0
- package/personas/claude/scenarios/incident-investigation.json +465 -0
- package/personas/claude/scenarios/late-after-exit.json +27 -0
- package/personas/claude/scenarios/permission-allow.json +55 -0
- package/personas/claude/scenarios/permission-deny.json +71 -0
- package/personas/claude/scenarios/token-usage-refresh.json +33 -0
- package/personas/claude/scenarios/unknown-event.json +14 -0
- package/personas/codex/behavior/approval-turn.json +15 -0
- package/personas/codex/behavior/happy-turn.json +10 -0
- package/personas/codex/ops.json +159 -0
- package/personas/codex/persona.json +36 -0
- package/personas/codex/runflows.json +45 -0
- package/personas/codex/scenarios/channel-disconnect.json +31 -0
- package/personas/codex/scenarios/crash-mid-turn.json +30 -0
- package/personas/codex/scenarios/cross-layer-implementation.json +725 -0
- package/personas/codex/scenarios/deep-research.json +684 -0
- package/personas/codex/scenarios/duplicate-out-of-order.json +87 -0
- package/personas/codex/scenarios/flood.json +22 -0
- package/personas/codex/scenarios/happy-turn.json +81 -0
- package/personas/codex/scenarios/incident-investigation.json +695 -0
- package/personas/codex/scenarios/late-after-exit.json +59 -0
- package/personas/codex/scenarios/permission-allow.json +110 -0
- package/personas/codex/scenarios/permission-deny.json +83 -0
- package/personas/codex/scenarios/token-usage-refresh.json +49 -0
- package/personas/codex/scenarios/unknown-event.json +17 -0
- package/personas/codex/serve.json +124 -0
- package/personas/copilot/behavior/happy-turn.json +9 -0
- package/personas/copilot/ops.json +28 -0
- package/personas/copilot/persona.json +17 -0
- package/personas/copilot/runflows.json +6 -0
- package/personas/copilot/scenarios/happy-turn.json +50 -0
- package/personas/grok/behavior/approval-turn.json +16 -0
- package/personas/grok/behavior/happy-turn.json +13 -0
- package/personas/grok/ops.json +330 -0
- package/personas/grok/persona.json +24 -0
- package/personas/grok/runflows.json +25 -0
- package/personas/grok/scenarios/agent-team-lifecycle.json +74 -0
- package/personas/grok/scenarios/compact-lifecycle.json +61 -0
- package/personas/grok/serve.json +57 -0
- package/personas/hermes/behavior/approval-turn.json +11 -0
- package/personas/hermes/behavior/happy-turn.json +9 -0
- package/personas/hermes/ops.json +227 -0
- package/personas/hermes/persona.json +15 -0
- package/personas/hermes/runflows.json +50 -0
- package/personas/hermes/scenarios/happy-turn.json +25 -0
- package/personas/hermes/scenarios/late-after-exit.json +21 -0
- package/personas/hermes/scenarios/permission-deny.json +54 -0
- package/personas/hermes/scenarios/unknown-event.json +14 -0
- package/personas/hermes/serve.json +54 -0
- package/personas/kimi/behavior/happy-turn.json +9 -0
- package/personas/kimi/ops.json +357 -0
- package/personas/kimi/persona.json +23 -0
- package/personas/kimi/runflows.json +84 -0
- package/personas/kimi/scenarios/compaction-lifecycle.json +20 -0
- package/personas/kimi/scenarios/duplicate-out-of-order.json +60 -0
- package/personas/kimi/scenarios/happy-turn.json +66 -0
- package/personas/kimi/scenarios/late-after-end.json +28 -0
- package/personas/kimi/scenarios/tool-failure.json +43 -0
- package/personas/kimi/scenarios/tool-success.json +57 -0
- package/personas/kimi/scenarios/unknown-record.json +15 -0
- package/personas/opencode/README.md +32 -0
- package/personas/opencode/behavior/happy-turn.json +9 -0
- package/personas/opencode/behavior/permission-turn.json +18 -0
- package/personas/opencode/http-serve.json +72 -0
- package/personas/opencode/ops.json +250 -0
- package/personas/opencode/persona.json +22 -0
- package/personas/opencode/runflows.json +45 -0
- package/personas/opencode/scenarios/duplicate-event.json +27 -0
- package/personas/opencode/scenarios/failure.json +30 -0
- package/personas/opencode/scenarios/happy-turn.json +86 -0
- package/personas/opencode/scenarios/late-event.json +29 -0
- package/personas/opencode/scenarios/out-of-order.json +42 -0
- package/personas/opencode/scenarios/permission-allow.json +31 -0
- package/personas/opencode/scenarios/permission-deny.json +31 -0
- package/personas/opencode/scenarios/question-reject.json +37 -0
- package/personas/opencode/scenarios/question-reply.json +38 -0
- package/personas/opencode/scenarios/reconnect.json +22 -0
- package/personas/opencode/scenarios/resume.json +30 -0
- package/personas/opencode/scenarios/unknown-event.json +15 -0
- package/personas/pi/behavior/happy-turn.json +9 -0
- package/personas/pi/ops.json +19 -0
- package/personas/pi/persona.json +16 -0
- package/personas/pi/runflows.json +6 -0
- package/personas/pi/scenarios/happy-turn.json +52 -0
- package/personas/synthetic/behavior/happy-turn.json +12 -0
- package/personas/synthetic/groundtruth.html +164 -0
- package/personas/synthetic/groundtruth.json +380 -0
- package/personas/synthetic/model/behavior.json +27 -0
- package/personas/synthetic/model/channels.json +16 -0
- package/personas/synthetic/model/detection.json +13 -0
- package/personas/synthetic/model/events/agent.action.json +16 -0
- package/personas/synthetic/model/events/agent.boot.json +16 -0
- package/personas/synthetic/model/events/agent.halt.json +16 -0
- package/personas/synthetic/model/events/agent.prompt.json +16 -0
- package/personas/synthetic/model/events/agent.reply.json +16 -0
- package/personas/synthetic/model/events/agent.settled.json +16 -0
- package/personas/synthetic/model/manifest.json +7 -0
- package/personas/synthetic/ops.json +18 -0
- package/personas/synthetic/persona.json +11 -0
- package/README.md +0 -3
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "late-after-exit",
|
|
3
|
+
"then": [
|
|
4
|
+
{
|
|
5
|
+
"at": 0,
|
|
6
|
+
"do": {
|
|
7
|
+
"emit": {
|
|
8
|
+
"event": "thread/closed",
|
|
9
|
+
"with": {
|
|
10
|
+
"threadId": "$threadId"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"at": 25,
|
|
17
|
+
"do": {
|
|
18
|
+
"emit": {
|
|
19
|
+
"event": "item/started",
|
|
20
|
+
"with": {
|
|
21
|
+
"threadId": "$threadId",
|
|
22
|
+
"turnId": "$uuid:turn",
|
|
23
|
+
"startedAtMs": "$nowMs",
|
|
24
|
+
"item": {
|
|
25
|
+
"type": "commandExecution",
|
|
26
|
+
"id": "$uuid:item",
|
|
27
|
+
"command": "echo late",
|
|
28
|
+
"cwd": "$threadCwd",
|
|
29
|
+
"status": "inProgress",
|
|
30
|
+
"commandActions": [
|
|
31
|
+
{
|
|
32
|
+
"type": "unknown",
|
|
33
|
+
"command": "echo late"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"at": 50,
|
|
43
|
+
"do": {
|
|
44
|
+
"emit": {
|
|
45
|
+
"event": "turn/completed",
|
|
46
|
+
"with": {
|
|
47
|
+
"threadId": "$threadId",
|
|
48
|
+
"turn": {
|
|
49
|
+
"id": "$uuid:turn",
|
|
50
|
+
"status": "completed",
|
|
51
|
+
"error": null,
|
|
52
|
+
"items": []
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "permission-allow",
|
|
3
|
+
"then": [
|
|
4
|
+
{
|
|
5
|
+
"at": 0,
|
|
6
|
+
"do": {
|
|
7
|
+
"emit": {
|
|
8
|
+
"event": "turn/started",
|
|
9
|
+
"with": {
|
|
10
|
+
"threadId": "$threadId",
|
|
11
|
+
"turn": {
|
|
12
|
+
"id": "$uuid:turn",
|
|
13
|
+
"status": "inProgress",
|
|
14
|
+
"items": []
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"at": 20,
|
|
22
|
+
"do": {
|
|
23
|
+
"emit": {
|
|
24
|
+
"event": "item/started",
|
|
25
|
+
"with": {
|
|
26
|
+
"threadId": "$threadId",
|
|
27
|
+
"turnId": "$uuid:turn",
|
|
28
|
+
"startedAtMs": "$nowMs",
|
|
29
|
+
"item": {
|
|
30
|
+
"type": "commandExecution",
|
|
31
|
+
"id": "$uuid:item",
|
|
32
|
+
"command": "curl -s https://example.com",
|
|
33
|
+
"cwd": "$threadCwd",
|
|
34
|
+
"status": "inProgress",
|
|
35
|
+
"commandActions": [
|
|
36
|
+
{
|
|
37
|
+
"type": "unknown",
|
|
38
|
+
"command": "curl -s https://example.com"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"at": 40,
|
|
48
|
+
"do": {
|
|
49
|
+
"emit": {
|
|
50
|
+
"request": true,
|
|
51
|
+
"event": "item/commandExecution/requestApproval",
|
|
52
|
+
"with": {
|
|
53
|
+
"threadId": "$threadId",
|
|
54
|
+
"turnId": "$uuid:turn",
|
|
55
|
+
"itemId": "$uuid:item",
|
|
56
|
+
"startedAtMs": "$nowMs",
|
|
57
|
+
"command": "curl -s https://example.com",
|
|
58
|
+
"cwd": "$threadCwd",
|
|
59
|
+
"availableDecisions": ["accept", "cancel"]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"at": 60,
|
|
66
|
+
"do": {
|
|
67
|
+
"emit": {
|
|
68
|
+
"event": "item/completed",
|
|
69
|
+
"with": {
|
|
70
|
+
"threadId": "$threadId",
|
|
71
|
+
"turnId": "$uuid:turn",
|
|
72
|
+
"completedAtMs": "$nowMs",
|
|
73
|
+
"item": {
|
|
74
|
+
"type": "commandExecution",
|
|
75
|
+
"id": "$uuid:item",
|
|
76
|
+
"command": "curl -s https://example.com",
|
|
77
|
+
"cwd": "$threadCwd",
|
|
78
|
+
"status": "completed",
|
|
79
|
+
"exitCode": 0,
|
|
80
|
+
"aggregatedOutput": "<html/>",
|
|
81
|
+
"commandActions": [
|
|
82
|
+
{
|
|
83
|
+
"type": "unknown",
|
|
84
|
+
"command": "curl -s https://example.com"
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"at": 80,
|
|
94
|
+
"do": {
|
|
95
|
+
"emit": {
|
|
96
|
+
"event": "turn/completed",
|
|
97
|
+
"with": {
|
|
98
|
+
"threadId": "$threadId",
|
|
99
|
+
"turn": {
|
|
100
|
+
"id": "$uuid:turn",
|
|
101
|
+
"status": "completed",
|
|
102
|
+
"error": null,
|
|
103
|
+
"items": []
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "permission-deny",
|
|
3
|
+
"then": [
|
|
4
|
+
{
|
|
5
|
+
"at": 0,
|
|
6
|
+
"do": {
|
|
7
|
+
"emit": {
|
|
8
|
+
"event": "turn/started",
|
|
9
|
+
"with": {
|
|
10
|
+
"threadId": "$threadId",
|
|
11
|
+
"turn": {
|
|
12
|
+
"id": "$uuid:turn",
|
|
13
|
+
"status": "inProgress",
|
|
14
|
+
"items": []
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"at": 20,
|
|
22
|
+
"do": {
|
|
23
|
+
"emit": {
|
|
24
|
+
"request": true,
|
|
25
|
+
"event": "item/commandExecution/requestApproval",
|
|
26
|
+
"with": {
|
|
27
|
+
"threadId": "$threadId",
|
|
28
|
+
"turnId": "$uuid:turn",
|
|
29
|
+
"itemId": "$uuid:item",
|
|
30
|
+
"startedAtMs": "$nowMs",
|
|
31
|
+
"command": "rm -rf /",
|
|
32
|
+
"cwd": "$threadCwd",
|
|
33
|
+
"availableDecisions": ["accept", "cancel"]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"at": 40,
|
|
40
|
+
"do": {
|
|
41
|
+
"emit": {
|
|
42
|
+
"event": "item/completed",
|
|
43
|
+
"with": {
|
|
44
|
+
"threadId": "$threadId",
|
|
45
|
+
"turnId": "$uuid:turn",
|
|
46
|
+
"completedAtMs": "$nowMs",
|
|
47
|
+
"item": {
|
|
48
|
+
"type": "commandExecution",
|
|
49
|
+
"id": "$uuid:item",
|
|
50
|
+
"command": "rm -rf /",
|
|
51
|
+
"cwd": "$threadCwd",
|
|
52
|
+
"status": "declined",
|
|
53
|
+
"exitCode": null,
|
|
54
|
+
"commandActions": [
|
|
55
|
+
{
|
|
56
|
+
"type": "unknown",
|
|
57
|
+
"command": "rm -rf /"
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"at": 60,
|
|
67
|
+
"do": {
|
|
68
|
+
"emit": {
|
|
69
|
+
"event": "turn/completed",
|
|
70
|
+
"with": {
|
|
71
|
+
"threadId": "$threadId",
|
|
72
|
+
"turn": {
|
|
73
|
+
"id": "$uuid:turn",
|
|
74
|
+
"status": "completed",
|
|
75
|
+
"error": null,
|
|
76
|
+
"items": []
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "token-usage-refresh",
|
|
3
|
+
"then": [
|
|
4
|
+
{
|
|
5
|
+
"at": 0,
|
|
6
|
+
"do": {
|
|
7
|
+
"emit": {
|
|
8
|
+
"event": "thread/tokenUsage/updated",
|
|
9
|
+
"with": {
|
|
10
|
+
"threadId": "$threadId",
|
|
11
|
+
"turnId": "$uuid:turn",
|
|
12
|
+
"tokenUsage": {
|
|
13
|
+
"total": {
|
|
14
|
+
"totalTokens": 128000,
|
|
15
|
+
"inputTokens": 120000,
|
|
16
|
+
"outputTokens": 8000,
|
|
17
|
+
"cachedInputTokens": 0,
|
|
18
|
+
"reasoningOutputTokens": 0
|
|
19
|
+
},
|
|
20
|
+
"last": {
|
|
21
|
+
"totalTokens": 128000,
|
|
22
|
+
"inputTokens": 120000,
|
|
23
|
+
"outputTokens": 8000,
|
|
24
|
+
"cachedInputTokens": 0,
|
|
25
|
+
"reasoningOutputTokens": 0
|
|
26
|
+
},
|
|
27
|
+
"modelContextWindow": 128000
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"at": 20,
|
|
35
|
+
"do": {
|
|
36
|
+
"emit": {
|
|
37
|
+
"event": "account/rateLimits/updated",
|
|
38
|
+
"with": {
|
|
39
|
+
"rateLimits": {
|
|
40
|
+
"primary": {
|
|
41
|
+
"usedPercent": 87
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$server": {
|
|
3
|
+
"command": "app-server",
|
|
4
|
+
"listen": { "flag": "--listen", "transports": ["unix"] },
|
|
5
|
+
"notification": { "emittedAtMs": "$nowMs" },
|
|
6
|
+
"gate": { "until": "initialize", "error": { "code": -32600, "message": "Not initialized" } }
|
|
7
|
+
},
|
|
8
|
+
|
|
9
|
+
"initialize": {
|
|
10
|
+
"result": {
|
|
11
|
+
"userAgent": "$vendorVersion",
|
|
12
|
+
"codexHome": "$imposterHome",
|
|
13
|
+
"platformFamily": "$platformFamily",
|
|
14
|
+
"platformOs": "$platformOs"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
"model/list": { "result": { "data": [] } },
|
|
19
|
+
"account/rateLimits/read": { "result": { "rateLimits": {} } },
|
|
20
|
+
|
|
21
|
+
"thread/start": {
|
|
22
|
+
"bind": {
|
|
23
|
+
"$threadId": "$uuid:thread",
|
|
24
|
+
"$threadCwd": "$params.cwd",
|
|
25
|
+
"$threadModel": "$params.model",
|
|
26
|
+
"$threadModelProvider": "$params.modelProvider",
|
|
27
|
+
"$threadApprovalPolicy": "$params.approvalPolicy",
|
|
28
|
+
"$threadApprovalsReviewer": "$params.approvalsReviewer"
|
|
29
|
+
},
|
|
30
|
+
"result": {
|
|
31
|
+
"thread": {
|
|
32
|
+
"id": "$threadId",
|
|
33
|
+
"sessionId": "$threadId",
|
|
34
|
+
"cwd": "$threadCwd",
|
|
35
|
+
"status": { "type": "idle" },
|
|
36
|
+
"cliVersion": "$vendorVersion",
|
|
37
|
+
"createdAt": "$threadCreatedAt",
|
|
38
|
+
"updatedAt": "$threadUpdatedAt",
|
|
39
|
+
"ephemeral": false,
|
|
40
|
+
"modelProvider": "$threadModelProvider",
|
|
41
|
+
"preview": "",
|
|
42
|
+
"projectId": null,
|
|
43
|
+
"source": "appServer",
|
|
44
|
+
"turns": []
|
|
45
|
+
},
|
|
46
|
+
"model": "$threadModel",
|
|
47
|
+
"modelProvider": "$threadModelProvider",
|
|
48
|
+
"cwd": "$threadCwd",
|
|
49
|
+
"approvalPolicy": "$threadApprovalPolicy",
|
|
50
|
+
"approvalsReviewer": "$threadApprovalsReviewer",
|
|
51
|
+
"sandbox": "$threadSandbox",
|
|
52
|
+
"runtimeWorkspaceRoots": ["$threadCwd"],
|
|
53
|
+
"instructionSources": []
|
|
54
|
+
},
|
|
55
|
+
"then": [{ "op": "session.start" }, { "op": "session.ready" }]
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
"thread/resume": {
|
|
59
|
+
"$comment": "Resume ADOPTS the id it was handed. Minting a fresh one here was the bug that made `ai --codex` look dead in a Godview pane: the native TUI joins with thread/resume, the imposter rebound $threadId, and every notification the pane's turn produced named a thread the observer was not watching. Nothing errored — the adapter simply filtered it all out.",
|
|
60
|
+
"bind": { "$threadId": "$params.threadId" },
|
|
61
|
+
"restore": true,
|
|
62
|
+
"result": {
|
|
63
|
+
"thread": {
|
|
64
|
+
"id": "$threadId",
|
|
65
|
+
"sessionId": "$threadId",
|
|
66
|
+
"cwd": "$threadCwd",
|
|
67
|
+
"status": { "type": "idle" },
|
|
68
|
+
"cliVersion": "$vendorVersion",
|
|
69
|
+
"createdAt": "$threadCreatedAt",
|
|
70
|
+
"updatedAt": "$threadUpdatedAt",
|
|
71
|
+
"ephemeral": false,
|
|
72
|
+
"modelProvider": "$threadModelProvider",
|
|
73
|
+
"preview": "",
|
|
74
|
+
"projectId": null,
|
|
75
|
+
"source": "appServer",
|
|
76
|
+
"turns": []
|
|
77
|
+
},
|
|
78
|
+
"model": "$threadModel",
|
|
79
|
+
"modelProvider": "$threadModelProvider",
|
|
80
|
+
"cwd": "$threadCwd",
|
|
81
|
+
"approvalPolicy": "$threadApprovalPolicy",
|
|
82
|
+
"approvalsReviewer": "$threadApprovalsReviewer",
|
|
83
|
+
"sandbox": "$threadSandbox",
|
|
84
|
+
"runtimeWorkspaceRoots": ["$threadCwd"],
|
|
85
|
+
"instructionSources": []
|
|
86
|
+
},
|
|
87
|
+
"then": [{ "op": "session.start" }, { "op": "session.ready" }]
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
"thread/read": {
|
|
91
|
+
"result": {
|
|
92
|
+
"thread": {
|
|
93
|
+
"id": "$threadId",
|
|
94
|
+
"sessionId": "$threadId",
|
|
95
|
+
"cwd": "$threadCwd",
|
|
96
|
+
"status": { "type": "idle" },
|
|
97
|
+
"cliVersion": "$vendorVersion",
|
|
98
|
+
"createdAt": "$threadCreatedAt",
|
|
99
|
+
"updatedAt": "$threadUpdatedAt",
|
|
100
|
+
"ephemeral": false,
|
|
101
|
+
"modelProvider": "$threadModelProvider",
|
|
102
|
+
"preview": "",
|
|
103
|
+
"projectId": null,
|
|
104
|
+
"source": "appServer",
|
|
105
|
+
"turns": []
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
"thread/inject_items": {
|
|
111
|
+
"result": {}
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
"turn/start": {
|
|
115
|
+
"bind": {
|
|
116
|
+
"$turnId": "$uuid:turn",
|
|
117
|
+
"$clientUserMessageId": "$params.clientUserMessageId"
|
|
118
|
+
},
|
|
119
|
+
"result": {
|
|
120
|
+
"turn": { "id": "$turnId", "items": [], "itemsView": "notLoaded", "status": "inProgress", "error": null }
|
|
121
|
+
},
|
|
122
|
+
"then": "$behavior"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"session.start": [
|
|
3
|
+
{ "channel": "native-log", "event": "session.start", "with": { "sessionId": "$sessionId", "version": 1, "producer": "copilot-agent", "copilotVersion": "$vendorVersion", "startTime": "$now", "contextTier": null, "context": { "cwd": "$cwd" }, "alreadyInUse": false, "remoteSteerable": false } },
|
|
4
|
+
{ "channel": "native-log", "event": "session.permissions_changed", "with": { "previousAllowAllPermissions": false, "allowAllPermissions": true, "previousAllowAllPermissionMode": "off", "allowAllPermissionMode": "on" } },
|
|
5
|
+
{ "channel": "native-log", "event": "session.model_change", "with": { "contextTier": null, "newModel": "$modelId", "reasoningEffort": null } }
|
|
6
|
+
],
|
|
7
|
+
"turn.start": [
|
|
8
|
+
{ "channel": "native-log", "event": "user.message", "with": { "content": "$op.text", "attachments": [], "supportedNativeDocumentMimeTypes": [], "delivery": "idle", "interactionId": "$uuid:interaction" } },
|
|
9
|
+
{ "channel": "native-log", "event": "assistant.turn_start", "with": { "turnId": "$string:$turnIndex", "interactionId": "$uuid:interaction" } }
|
|
10
|
+
],
|
|
11
|
+
"assistant.delta": [
|
|
12
|
+
{ "channel": "native-log", "event": "assistant.message", "with": { "messageId": "$uuid:assistant-message", "model": "$modelId", "content": "$op.text", "toolRequests": [], "interactionId": "$uuid:interaction", "turnId": "$string:$turnIndex", "outputTokens": 4, "rte": false } }
|
|
13
|
+
],
|
|
14
|
+
"tool.start": [
|
|
15
|
+
{ "channel": "native-log", "event": "assistant.message", "with": { "messageId": "$uuid:tool-message", "model": "$modelId", "content": "", "toolRequests": [{ "toolCallId": "$op.toolId", "name": "$op.tool", "arguments": "$op.input", "type": "function" }], "interactionId": "$uuid:interaction", "turnId": "$string:$turnIndex", "outputTokens": 4, "rte": false } },
|
|
16
|
+
{ "channel": "native-log", "event": "tool.execution_start", "with": { "toolCallId": "$op.toolId", "toolName": "$op.tool", "arguments": "$op.input", "turnId": "$string:$turnIndex", "model": "$modelId", "rte": false } }
|
|
17
|
+
],
|
|
18
|
+
"tool.end": [
|
|
19
|
+
{ "channel": "native-log", "event": "tool.execution_complete", "with": { "toolCallId": "$op.toolId", "model": "$modelId", "interactionId": "$uuid:interaction", "turnId": "$string:$turnIndex", "rte": false, "success": true, "result": "$op.output" } },
|
|
20
|
+
{ "channel": "native-log", "event": "assistant.turn_end", "with": { "turnId": "$string:$turnIndex" } }
|
|
21
|
+
],
|
|
22
|
+
"turn.end": [
|
|
23
|
+
{ "channel": "native-log", "event": "assistant.turn_end", "with": { "turnId": "$string:$turnIndex" } }
|
|
24
|
+
],
|
|
25
|
+
"session.end": [
|
|
26
|
+
{ "channel": "native-log", "event": "session.shutdown", "with": { "shutdownType": "user", "sessionStartTime": "$now", "totalApiDurationMs": 0, "modelMetrics": {}, "codeChanges": { "filesModified": [], "linesAdded": 0, "linesRemoved": 0 } } }
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"vendor": "copilot",
|
|
3
|
+
"asm": { "package": "@vibefield/puppeteer-surface", "path": "vendors/copilot" },
|
|
4
|
+
"shimNames": ["copilot"],
|
|
5
|
+
"envelope": {},
|
|
6
|
+
"nativeStore": {
|
|
7
|
+
"rootEnv": "COPILOT_HOME",
|
|
8
|
+
"sessionPath": ["session-state", "$sessionId"],
|
|
9
|
+
"updatesFile": "events.jsonl",
|
|
10
|
+
"recordFormat": "flat-record",
|
|
11
|
+
"recordPayloadField": "data",
|
|
12
|
+
"recordTimestamp": { "field": "timestamp", "format": "iso" },
|
|
13
|
+
"recordIdentity": { "idField": "id", "parentField": "parentId" },
|
|
14
|
+
"singletonEvents": ["session.start", "session.permissions_changed", "session.model_change"]
|
|
15
|
+
},
|
|
16
|
+
"boot": [{ "op": "session.start" }, { "op": "session.ready" }]
|
|
17
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"flows": [
|
|
4
|
+
{ "id": "happy-turn", "intent": "turn.basic", "scenario": "happy-turn", "title": "Basic Copilot interaction", "summary": "One interactionId spanning the durable assistant cycle.", "kind": "typical", "danger": "safe", "tags": ["events", "interaction"], "defaultStimulus": { "text": "hello" }, "defaultSpeed": 4 }
|
|
5
|
+
]
|
|
6
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "happy-turn",
|
|
3
|
+
"steps": [
|
|
4
|
+
{
|
|
5
|
+
"at": 0,
|
|
6
|
+
"do": {
|
|
7
|
+
"emit": {
|
|
8
|
+
"channel": "events",
|
|
9
|
+
"event": "user.message",
|
|
10
|
+
"with": { "content": "$stimulus.text", "interactionId": "$uuid:interaction" }
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"at": 20,
|
|
16
|
+
"do": {
|
|
17
|
+
"emit": {
|
|
18
|
+
"channel": "events",
|
|
19
|
+
"event": "assistant.turn_start",
|
|
20
|
+
"with": { "turnId": "0", "interactionId": "$uuid:interaction" }
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"at": 40,
|
|
26
|
+
"do": {
|
|
27
|
+
"emit": {
|
|
28
|
+
"channel": "events",
|
|
29
|
+
"event": "assistant.message",
|
|
30
|
+
"with": {
|
|
31
|
+
"messageId": "$uuid:message",
|
|
32
|
+
"model": "$modelId",
|
|
33
|
+
"content": "imposter: ok",
|
|
34
|
+
"toolRequests": [],
|
|
35
|
+
"interactionId": "$uuid:interaction",
|
|
36
|
+
"turnId": "0",
|
|
37
|
+
"outputTokens": 4,
|
|
38
|
+
"rte": false
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"at": 60,
|
|
45
|
+
"do": {
|
|
46
|
+
"emit": { "channel": "events", "event": "assistant.turn_end", "with": { "turnId": "0" } }
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "approval-turn",
|
|
3
|
+
"reply": "imposter: approved",
|
|
4
|
+
"ops": [
|
|
5
|
+
{ "op": "turn.start", "with": { "text": "$stimulus.text" } },
|
|
6
|
+
{ "op": "tool.start", "with": { "toolId": "$uuid:tool", "command": "echo ok" } },
|
|
7
|
+
{ "op": "permission.ask", "with": { "toolId": "$uuid:tool", "command": "echo ok" } },
|
|
8
|
+
{ "op": "tool.end", "with": { "toolId": "$uuid:tool", "command": "echo ok", "output": "ok" } },
|
|
9
|
+
{ "op": "assistant.delta", "with": { "text": "$reply" } },
|
|
10
|
+
{ "op": "turn.end" },
|
|
11
|
+
{
|
|
12
|
+
"op": "usage.refresh",
|
|
13
|
+
"with": { "addedTokens": 16 }
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "happy-turn",
|
|
3
|
+
"reply": "imposter: ok",
|
|
4
|
+
"ops": [
|
|
5
|
+
{ "op": "turn.start", "with": { "text": "$stimulus.text" } },
|
|
6
|
+
{ "op": "assistant.delta", "with": { "text": "$reply" } },
|
|
7
|
+
{ "op": "turn.end" },
|
|
8
|
+
{
|
|
9
|
+
"op": "usage.refresh",
|
|
10
|
+
"with": { "addedTokens": 16 }
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|