@vibefield/puppeteer-imposter 0.3.3 → 0.3.4

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.
Files changed (35) hide show
  1. package/dist/cli/main.d.ts.map +1 -1
  2. package/dist/cli/main.js +2 -1
  3. package/dist/cli/main.js.map +1 -1
  4. package/dist/session/channels/jsonrpc.d.ts +4 -0
  5. package/dist/session/channels/jsonrpc.d.ts.map +1 -1
  6. package/dist/session/channels/jsonrpc.js +7 -2
  7. package/dist/session/channels/jsonrpc.js.map +1 -1
  8. package/dist/session/serve.d.ts +5 -0
  9. package/dist/session/serve.d.ts.map +1 -1
  10. package/dist/session/serve.js.map +1 -1
  11. package/package.json +8 -8
  12. package/personas/claude/persona.json +3 -1
  13. package/personas/claude/scenarios/compact-lifecycle.json +1 -1
  14. package/personas/claude/scenarios/compact-summary-retry.json +94 -0
  15. package/personas/codex/persona.json +15 -6
  16. package/personas/copilot/ops.json +6 -7
  17. package/personas/copilot/persona.json +32 -7
  18. package/personas/hermes/behavior/approval-turn.json +42 -5
  19. package/personas/hermes/ops.json +60 -55
  20. package/personas/hermes/persona.json +11 -2
  21. package/personas/hermes/runflows.json +4 -2
  22. package/personas/hermes/scenarios/permission-deny.json +18 -4
  23. package/personas/hermes/serve.json +49 -13
  24. package/personas/kimi/ops.json +46 -12
  25. package/personas/kimi/persona.json +34 -7
  26. package/personas/kimi/scenarios/compaction-lifecycle.json +8 -3
  27. package/personas/kimi/scenarios/duplicate-out-of-order.json +3 -0
  28. package/personas/kimi/scenarios/happy-turn.json +12 -3
  29. package/personas/kimi/scenarios/late-after-end.json +8 -1
  30. package/personas/kimi/scenarios/tool-failure.json +2 -0
  31. package/personas/kimi/scenarios/tool-success.json +14 -2
  32. package/personas/opencode/README.md +1 -1
  33. package/personas/opencode/persona.json +26 -5
  34. package/personas/pi/ops.json +5 -4
  35. package/personas/pi/persona.json +34 -7
@@ -4,7 +4,9 @@
4
4
  "package": "@vibefield/puppeteer-surface",
5
5
  "path": "vendors/kimi"
6
6
  },
7
- "shimNames": ["kimi"],
7
+ "shimNames": [
8
+ "kimi"
9
+ ],
8
10
  "envelope": {},
9
11
  "bindings": {
10
12
  "$workdirKey": "$workdirKey:$cwd",
@@ -12,12 +14,37 @@
12
14
  },
13
15
  "nativeStore": {
14
16
  "rootEnv": "KIMI_CODE_HOME",
15
- "sessionPath": ["sessions", "$workdirKey", "$sessionId"],
16
- "updatesPath": ["agents", "main", "wire.jsonl"],
17
- "indexPath": ["session_index.jsonl"],
17
+ "sessionPath": [
18
+ "sessions",
19
+ "$workdirKey",
20
+ "$sessionId"
21
+ ],
22
+ "updatesPath": [
23
+ "agents",
24
+ "main",
25
+ "wire.jsonl"
26
+ ],
27
+ "indexPath": [
28
+ "session_index.jsonl"
29
+ ],
18
30
  "recordFormat": "flat-record",
19
- "recordTimestamp": { "field": "time", "format": "epoch-ms", "omitFor": ["metadata"] },
20
- "singletonEvents": ["metadata"]
31
+ "recordTimestamp": {
32
+ "field": "time",
33
+ "format": "epoch-ms",
34
+ "omitFor": [
35
+ "metadata"
36
+ ]
37
+ },
38
+ "singletonEvents": [
39
+ "metadata"
40
+ ]
21
41
  },
22
- "boot": [{ "op": "session.start" }, { "op": "session.ready" }]
42
+ "boot": [
43
+ {
44
+ "op": "session.start"
45
+ },
46
+ {
47
+ "op": "session.ready"
48
+ }
49
+ ]
23
50
  }
@@ -3,7 +3,9 @@
3
3
  "steps": [
4
4
  {
5
5
  "at": 0,
6
- "do": { "emit": { "channel": "wire", "event": "full_compaction.begin", "with": { "source": "auto" } } }
6
+ "do": {
7
+ "emit": { "channel": "wire", "event": "full_compaction.begin", "with": { "agentId": "main", "source": "auto" } }
8
+ }
7
9
  },
8
10
  {
9
11
  "at": 30,
@@ -11,10 +13,13 @@
11
13
  "emit": {
12
14
  "channel": "wire",
13
15
  "event": "context.apply_compaction",
14
- "with": { "summary": "imposter summary", "compactedCount": 3 }
16
+ "with": { "agentId": "main", "summary": "imposter summary", "compactedCount": 3 }
15
17
  }
16
18
  }
17
19
  },
18
- { "at": 60, "do": { "emit": { "channel": "wire", "event": "full_compaction.complete", "with": {} } } }
20
+ {
21
+ "at": 60,
22
+ "do": { "emit": { "channel": "wire", "event": "full_compaction.complete", "with": { "agentId": "main" } } }
23
+ }
19
24
  ]
20
25
  }
@@ -8,6 +8,7 @@
8
8
  "channel": "wire",
9
9
  "event": "context.append_loop_event",
10
10
  "with": {
11
+ "agentId": "main",
11
12
  "event": {
12
13
  "type": "tool.result",
13
14
  "parentUuid": "$uuid:tool-event",
@@ -25,6 +26,7 @@
25
26
  "channel": "wire",
26
27
  "event": "context.append_loop_event",
27
28
  "with": {
29
+ "agentId": "main",
28
30
  "event": {
29
31
  "type": "tool.call",
30
32
  "uuid": "$uuid:tool-event",
@@ -46,6 +48,7 @@
46
48
  "channel": "wire",
47
49
  "event": "context.append_loop_event",
48
50
  "with": {
51
+ "agentId": "main",
49
52
  "event": {
50
53
  "type": "tool.result",
51
54
  "parentUuid": "$uuid:tool-event",
@@ -7,7 +7,11 @@
7
7
  "emit": {
8
8
  "channel": "wire",
9
9
  "event": "turn.prompt",
10
- "with": { "input": [{ "type": "text", "text": "$stimulus.text" }], "origin": { "kind": "user" } }
10
+ "with": {
11
+ "agentId": "main",
12
+ "input": [{ "type": "text", "text": "$stimulus.text" }],
13
+ "origin": { "kind": "user" }
14
+ }
11
15
  }
12
16
  }
13
17
  },
@@ -17,7 +21,10 @@
17
21
  "emit": {
18
22
  "channel": "wire",
19
23
  "event": "context.append_loop_event",
20
- "with": { "event": { "type": "step.begin", "uuid": "$uuid:step", "turnId": "0", "step": 1 } }
24
+ "with": {
25
+ "agentId": "main",
26
+ "event": { "type": "step.begin", "uuid": "$uuid:step", "turnId": "0", "step": 1 }
27
+ }
21
28
  }
22
29
  }
23
30
  },
@@ -28,6 +35,7 @@
28
35
  "channel": "wire",
29
36
  "event": "context.append_loop_event",
30
37
  "with": {
38
+ "agentId": "main",
31
39
  "event": {
32
40
  "type": "content.part",
33
41
  "uuid": "$uuid:content",
@@ -47,6 +55,7 @@
47
55
  "channel": "wire",
48
56
  "event": "context.append_loop_event",
49
57
  "with": {
58
+ "agentId": "main",
50
59
  "event": { "type": "step.end", "uuid": "$uuid:step", "turnId": "0", "step": 1, "finishReason": "end_turn" }
51
60
  }
52
61
  }
@@ -58,7 +67,7 @@
58
67
  "emit": {
59
68
  "channel": "wire",
60
69
  "event": "turn.ended",
61
- "with": { "turnId": 0, "reason": "completed", "durationMs": 80 }
70
+ "with": { "agentId": "main", "turnId": 0, "reason": "completed", "durationMs": 80 }
62
71
  }
63
72
  }
64
73
  }
@@ -3,7 +3,13 @@
3
3
  "steps": [
4
4
  {
5
5
  "at": 0,
6
- "do": { "emit": { "channel": "wire", "event": "turn.ended", "with": { "turnId": 0, "reason": "completed" } } }
6
+ "do": {
7
+ "emit": {
8
+ "channel": "wire",
9
+ "event": "turn.ended",
10
+ "with": { "agentId": "main", "turnId": 0, "reason": "completed" }
11
+ }
12
+ }
7
13
  },
8
14
  {
9
15
  "at": 30,
@@ -12,6 +18,7 @@
12
18
  "channel": "wire",
13
19
  "event": "context.append_loop_event",
14
20
  "with": {
21
+ "agentId": "main",
15
22
  "event": {
16
23
  "type": "content.part",
17
24
  "uuid": "$uuid:late",
@@ -8,6 +8,7 @@
8
8
  "channel": "wire",
9
9
  "event": "context.append_loop_event",
10
10
  "with": {
11
+ "agentId": "main",
11
12
  "event": {
12
13
  "type": "tool.call",
13
14
  "uuid": "$uuid:tool-event",
@@ -29,6 +30,7 @@
29
30
  "channel": "wire",
30
31
  "event": "context.append_loop_event",
31
32
  "with": {
33
+ "agentId": "main",
32
34
  "event": {
33
35
  "type": "tool.result",
34
36
  "parentUuid": "$uuid:tool-event",
@@ -7,7 +7,11 @@
7
7
  "emit": {
8
8
  "channel": "wire",
9
9
  "event": "turn.prompt",
10
- "with": { "input": [{ "type": "text", "text": "$stimulus.text" }], "origin": { "kind": "user" } }
10
+ "with": {
11
+ "agentId": "main",
12
+ "input": [{ "type": "text", "text": "$stimulus.text" }],
13
+ "origin": { "kind": "user" }
14
+ }
11
15
  }
12
16
  }
13
17
  },
@@ -18,6 +22,7 @@
18
22
  "channel": "wire",
19
23
  "event": "context.append_loop_event",
20
24
  "with": {
25
+ "agentId": "main",
21
26
  "event": {
22
27
  "type": "tool.call",
23
28
  "uuid": "$uuid:tool-event",
@@ -39,6 +44,7 @@
39
44
  "channel": "wire",
40
45
  "event": "context.append_loop_event",
41
46
  "with": {
47
+ "agentId": "main",
42
48
  "event": {
43
49
  "type": "tool.result",
44
50
  "parentUuid": "$uuid:tool-event",
@@ -51,7 +57,13 @@
51
57
  },
52
58
  {
53
59
  "at": 60,
54
- "do": { "emit": { "channel": "wire", "event": "turn.ended", "with": { "turnId": 0, "reason": "completed" } } }
60
+ "do": {
61
+ "emit": {
62
+ "channel": "wire",
63
+ "event": "turn.ended",
64
+ "with": { "agentId": "main", "turnId": 0, "reason": "completed" }
65
+ }
66
+ }
55
67
  }
56
68
  ]
57
69
  }
@@ -1,6 +1,6 @@
1
1
  # OpenCode Imposter persona
2
2
 
3
- This persona impersonates OpenCode 1.18.16 on its native loopback REST and SSE
3
+ This persona impersonates OpenCode 1.19.5 on its native loopback REST and SSE
4
4
  surface. Native paths and operation ids live in `http-serve.json`; the shared
5
5
  transport contains no OpenCode route names. All requests, successful results,
6
6
  SSE properties, and complete `{id,type,properties}` carriers validate against
@@ -4,19 +4,40 @@
4
4
  "package": "@vibefield/puppeteer-surface",
5
5
  "path": "vendors/opencode"
6
6
  },
7
- "shimNames": ["opencode"],
7
+ "shimNames": [
8
+ "opencode"
9
+ ],
8
10
  "envelope": {},
9
11
  "sessionIdTemplate": "$nativeId:ses:session",
10
12
  "bindings": {
11
13
  "$projectId": "imposter-project",
12
14
  "$sessionSlug": "$uuid:session-slug",
13
- "$sessionModel": { "id": "opencode-imposter", "providerID": "imposter" },
14
- "$sessionPermission": [{ "permission": "*", "pattern": "*", "action": "allow" }],
15
+ "$sessionModel": {
16
+ "id": "opencode-imposter",
17
+ "providerID": "imposter"
18
+ },
19
+ "$sessionPermission": [
20
+ {
21
+ "permission": "*",
22
+ "pattern": "*",
23
+ "action": "allow"
24
+ }
25
+ ],
15
26
  "$sessionCreatedAt": "$nowMs",
16
27
  "$sessionUpdatedAt": "$nowMs",
17
28
  "$promptCreatedAt": "$nowMs",
18
29
  "$promptAgent": "build",
19
- "$promptModel": { "providerID": "imposter", "modelID": "opencode-imposter" }
30
+ "$promptModel": {
31
+ "providerID": "imposter",
32
+ "modelID": "opencode-imposter"
33
+ }
20
34
  },
21
- "boot": [{ "op": "session.start" }, { "op": "session.ready" }]
35
+ "boot": [
36
+ {
37
+ "op": "session.start"
38
+ },
39
+ {
40
+ "op": "session.ready"
41
+ }
42
+ ]
22
43
  }
@@ -2,18 +2,19 @@
2
2
  "session.start": [
3
3
  { "channel": "native-log", "event": "session", "with": { "version": 3, "id": "$sessionId", "cwd": "$cwd" } },
4
4
  { "channel": "native-log", "event": "model_change", "with": { "parentId": null, "provider": "imposter", "modelId": "$modelId" } },
5
- { "channel": "native-log", "event": "thinking_level_change", "with": { "thinkingLevel": "off" } }
5
+ { "channel": "native-log", "event": "thinking_level_change", "with": { "thinkingLevel": "off" } },
6
+ { "channel": "native-log", "event": "message", "with": { "message": { "role": "system", "content": "", "sections": { "preamble": "imposter: synthetic Pi system prompt" }, "toolsAdded": [], "timestamp": "$nowMs" } } }
6
7
  ],
7
8
  "turn.start": [
8
9
  { "channel": "native-log", "event": "message", "with": { "message": { "role": "user", "content": [{ "type": "text", "text": "$op.text" }], "timestamp": "$nowMs" } } }
9
10
  ],
10
11
  "assistant.delta": [
11
- { "channel": "native-log", "event": "message", "with": { "message": { "role": "assistant", "content": [{ "type": "text", "text": "$op.text" }], "api": "openai-completions", "provider": "imposter", "model": "$modelId", "usage": { "input": 12, "output": 4, "cacheRead": 0, "cacheWrite": 0, "reasoning": 0, "totalTokens": 16, "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0 } }, "stopReason": "stop", "timestamp": "$nowMs", "responseId": "$uuid:response", "rawStopReason": "stop" } } }
12
+ { "channel": "native-log", "event": "message", "with": { "message": { "role": "assistant", "content": [{ "type": "text", "text": "$op.text" }], "api": "openai-completions", "provider": "imposter", "model": "$modelId", "usage": { "input": 12, "output": 4, "cacheRead": 0, "cacheWrite": 0, "reasoning": 0, "totalTokens": 16, "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0 } }, "stopReason": "stop", "timestamp": "$nowMs", "durationMs": 1, "thinkingLevel": "off", "responseId": "$uuid:response", "rawStopReason": "stop" } } }
12
13
  ],
13
14
  "tool.start": [
14
- { "channel": "native-log", "event": "message", "with": { "message": { "role": "assistant", "content": [{ "type": "toolCall", "id": "$op.toolId", "name": "$op.tool", "arguments": "$op.input" }], "api": "openai-completions", "provider": "imposter", "model": "$modelId", "usage": { "input": 12, "output": 4, "cacheRead": 0, "cacheWrite": 0, "reasoning": 0, "totalTokens": 16, "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0 } }, "stopReason": "toolUse", "timestamp": "$nowMs", "responseId": "$uuid:tool-response", "rawStopReason": "tool_calls" } } }
15
+ { "channel": "native-log", "event": "message", "with": { "message": { "role": "assistant", "content": [{ "type": "toolCall", "id": "$op.toolId", "name": "$op.tool", "arguments": "$op.input" }], "api": "openai-completions", "provider": "imposter", "model": "$modelId", "usage": { "input": 12, "output": 4, "cacheRead": 0, "cacheWrite": 0, "reasoning": 0, "totalTokens": 16, "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0 } }, "stopReason": "toolUse", "timestamp": "$nowMs", "durationMs": 1, "thinkingLevel": "off", "responseId": "$uuid:tool-response", "rawStopReason": "tool_calls" } } }
15
16
  ],
16
17
  "tool.end": [
17
- { "channel": "native-log", "event": "message", "with": { "message": { "role": "toolResult", "toolCallId": "$op.toolId", "toolName": "$op.tool", "content": [{ "type": "text", "text": "$op.output" }], "isError": false, "timestamp": "$nowMs" } } }
18
+ { "channel": "native-log", "event": "message", "with": { "message": { "role": "toolResult", "toolCallId": "$op.toolId", "toolName": "$op.tool", "content": [{ "type": "text", "text": "$op.output" }], "isError": false, "timestamp": "$nowMs", "durationMs": 1 } } }
18
19
  ]
19
20
  }
@@ -1,16 +1,43 @@
1
1
  {
2
2
  "vendor": "pi",
3
- "asm": { "package": "@vibefield/puppeteer-surface", "path": "vendors/pi" },
4
- "shimNames": ["pi"],
3
+ "asm": {
4
+ "package": "@vibefield/puppeteer-surface",
5
+ "path": "vendors/pi"
6
+ },
7
+ "shimNames": [
8
+ "pi"
9
+ ],
5
10
  "envelope": {},
6
11
  "nativeStore": {
7
12
  "rootEnv": "PI_CODING_AGENT_DIR",
8
- "sessionPath": ["sessions"],
13
+ "sessionPath": [
14
+ "sessions"
15
+ ],
9
16
  "updatesFile": "$concat:$sessionId:.jsonl",
10
17
  "recordFormat": "flat-record",
11
- "recordTimestamp": { "field": "timestamp", "format": "iso" },
12
- "recordIdentity": { "idField": "id", "parentField": "parentId", "omitParentFor": ["session"] },
13
- "singletonEvents": ["session", "model_change", "thinking_level_change"]
18
+ "recordTimestamp": {
19
+ "field": "timestamp",
20
+ "format": "iso"
21
+ },
22
+ "recordIdentity": {
23
+ "idField": "id",
24
+ "parentField": "parentId",
25
+ "omitParentFor": [
26
+ "session"
27
+ ]
28
+ },
29
+ "singletonEvents": [
30
+ "session",
31
+ "model_change",
32
+ "thinking_level_change"
33
+ ]
14
34
  },
15
- "boot": [{ "op": "session.start" }, { "op": "session.ready" }]
35
+ "boot": [
36
+ {
37
+ "op": "session.start"
38
+ },
39
+ {
40
+ "op": "session.ready"
41
+ }
42
+ ]
16
43
  }