@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,357 @@
|
|
|
1
|
+
{
|
|
2
|
+
"session.start": [
|
|
3
|
+
{
|
|
4
|
+
"channel": "native-log",
|
|
5
|
+
"event": "metadata",
|
|
6
|
+
"with": { "protocol_version": "1.5", "created_at": "$sessionCreatedAt" }
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"channel": "native-log",
|
|
10
|
+
"event": "profile.bind",
|
|
11
|
+
"with": {
|
|
12
|
+
"modelAlias": "kimi-imposter",
|
|
13
|
+
"profileName": "agent",
|
|
14
|
+
"thinkingEffort": "on",
|
|
15
|
+
"systemPrompt": "Kimi Imposter system prompt",
|
|
16
|
+
"environmentDisclosure": { "cwd": "$cwd", "date": { "disclosed": false } },
|
|
17
|
+
"agentsMdPaths": [],
|
|
18
|
+
"activeToolNames": ["Bash"],
|
|
19
|
+
"disallowedTools": []
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"channel": "native-log",
|
|
24
|
+
"event": "permission.set_mode",
|
|
25
|
+
"with": { "mode": "manual" }
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"channel": "hook",
|
|
29
|
+
"event": "SessionStart",
|
|
30
|
+
"with": {
|
|
31
|
+
"hook_event_name": "SessionStart",
|
|
32
|
+
"session_id": "$sessionId",
|
|
33
|
+
"cwd": "$cwd",
|
|
34
|
+
"client_type": "kimi_code_cli",
|
|
35
|
+
"source": "startup",
|
|
36
|
+
"model": "kimi-imposter",
|
|
37
|
+
"profile": "agent"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"session.ready": [
|
|
42
|
+
{
|
|
43
|
+
"channel": "native-state",
|
|
44
|
+
"event": "state.json",
|
|
45
|
+
"with": {
|
|
46
|
+
"id": "$sessionId",
|
|
47
|
+
"version": 2,
|
|
48
|
+
"cwd": "$cwd",
|
|
49
|
+
"createdAt": "$sessionCreatedAt",
|
|
50
|
+
"updatedAt": "$nowMs",
|
|
51
|
+
"archived": false,
|
|
52
|
+
"agents": { "main": { "homedir": "$cwd", "type": "main" } },
|
|
53
|
+
"custom": {}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"channel": "native-index",
|
|
58
|
+
"event": "session_index.entry",
|
|
59
|
+
"with": { "sessionId": "$sessionId", "sessionDir": "$nativeSessionDir", "workDir": "$cwd" }
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"session.end": [
|
|
63
|
+
{
|
|
64
|
+
"channel": "hook",
|
|
65
|
+
"event": "SessionEnd",
|
|
66
|
+
"with": {
|
|
67
|
+
"hook_event_name": "SessionEnd",
|
|
68
|
+
"session_id": "$sessionId",
|
|
69
|
+
"cwd": "$cwd",
|
|
70
|
+
"client_type": "kimi_code_cli",
|
|
71
|
+
"reason": "$op.reason"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"channel": "native-state",
|
|
76
|
+
"event": "state.json",
|
|
77
|
+
"with": {
|
|
78
|
+
"id": "$sessionId",
|
|
79
|
+
"version": 2,
|
|
80
|
+
"cwd": "$cwd",
|
|
81
|
+
"createdAt": "$sessionCreatedAt",
|
|
82
|
+
"updatedAt": "$nowMs",
|
|
83
|
+
"archived": false,
|
|
84
|
+
"agents": { "main": { "homedir": "$cwd", "type": "main" } },
|
|
85
|
+
"custom": {},
|
|
86
|
+
"lastTurnReason": "completed"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"turn.start": [
|
|
91
|
+
{
|
|
92
|
+
"channel": "native-log",
|
|
93
|
+
"event": "turn.prompt",
|
|
94
|
+
"with": { "input": [{ "type": "text", "text": "$op.text" }], "origin": { "kind": "user" } }
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"channel": "native-log",
|
|
98
|
+
"event": "context.append_message",
|
|
99
|
+
"with": {
|
|
100
|
+
"message": {
|
|
101
|
+
"role": "user",
|
|
102
|
+
"content": [{ "type": "text", "text": "$op.text" }],
|
|
103
|
+
"toolCalls": [],
|
|
104
|
+
"origin": { "kind": "user" },
|
|
105
|
+
"id": "$uuid:user-message"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"channel": "native-log",
|
|
111
|
+
"event": "context.append_message",
|
|
112
|
+
"with": {
|
|
113
|
+
"message": {
|
|
114
|
+
"role": "user",
|
|
115
|
+
"content": [{ "type": "text", "text": "Permission mode: manual" }],
|
|
116
|
+
"toolCalls": [],
|
|
117
|
+
"origin": { "kind": "injection", "variant": "permission_mode" }
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"channel": "native-log",
|
|
123
|
+
"event": "context.append_loop_event",
|
|
124
|
+
"with": {
|
|
125
|
+
"event": {
|
|
126
|
+
"type": "step.begin",
|
|
127
|
+
"uuid": "$uuid:step-one",
|
|
128
|
+
"turnId": "$string:$turnIndex",
|
|
129
|
+
"step": 1
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"channel": "native-log",
|
|
135
|
+
"event": "llm.tools_snapshot",
|
|
136
|
+
"with": { "hash": "imposter-tools", "tools": [] }
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"channel": "native-log",
|
|
140
|
+
"event": "llm.request",
|
|
141
|
+
"with": {
|
|
142
|
+
"kind": "loop",
|
|
143
|
+
"provider": "imposter",
|
|
144
|
+
"model": "kimi-imposter",
|
|
145
|
+
"modelAlias": "kimi-imposter",
|
|
146
|
+
"thinkingEffort": "on",
|
|
147
|
+
"thinkingKeep": "all",
|
|
148
|
+
"maxTokens": 32768,
|
|
149
|
+
"toolSelect": false,
|
|
150
|
+
"systemPromptHash": "imposter-system",
|
|
151
|
+
"toolsHash": "imposter-tools",
|
|
152
|
+
"messageCount": 2,
|
|
153
|
+
"turnStep": "$turnStep"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"channel": "native-log",
|
|
158
|
+
"event": "usage.record",
|
|
159
|
+
"with": {
|
|
160
|
+
"model": "kimi-imposter",
|
|
161
|
+
"usage": { "inputOther": 12, "output": 4, "inputCacheRead": 0, "inputCacheCreation": 0 },
|
|
162
|
+
"usageScope": "turn"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"channel": "hook",
|
|
167
|
+
"event": "UserPromptSubmit",
|
|
168
|
+
"with": {
|
|
169
|
+
"hook_event_name": "UserPromptSubmit",
|
|
170
|
+
"session_id": "$sessionId",
|
|
171
|
+
"cwd": "$cwd",
|
|
172
|
+
"client_type": "kimi_code_cli",
|
|
173
|
+
"prompt": [{ "type": "text", "text": "$op.text" }],
|
|
174
|
+
"is_steer": false
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"channel": "hook",
|
|
179
|
+
"event": "TurnStarted",
|
|
180
|
+
"with": {
|
|
181
|
+
"hook_event_name": "TurnStarted",
|
|
182
|
+
"session_id": "$sessionId",
|
|
183
|
+
"cwd": "$cwd",
|
|
184
|
+
"client_type": "kimi_code_cli",
|
|
185
|
+
"turn_id": "$turnIndex",
|
|
186
|
+
"origin_kind": "user",
|
|
187
|
+
"prompt": "$op.text"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"assistant.delta": [
|
|
192
|
+
{
|
|
193
|
+
"channel": "native-log",
|
|
194
|
+
"event": "context.append_loop_event",
|
|
195
|
+
"with": {
|
|
196
|
+
"event": {
|
|
197
|
+
"type": "content.part",
|
|
198
|
+
"uuid": "$uuid:content",
|
|
199
|
+
"turnId": "$string:$turnIndex",
|
|
200
|
+
"step": 1,
|
|
201
|
+
"stepUuid": "$uuid:step-one",
|
|
202
|
+
"part": { "type": "text", "text": "$op.text" }
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
"tool.start": [
|
|
208
|
+
{
|
|
209
|
+
"channel": "native-log",
|
|
210
|
+
"event": "context.append_loop_event",
|
|
211
|
+
"with": {
|
|
212
|
+
"event": {
|
|
213
|
+
"type": "tool.call",
|
|
214
|
+
"uuid": "$uuid:tool-event",
|
|
215
|
+
"turnId": "$string:$turnIndex",
|
|
216
|
+
"step": 1,
|
|
217
|
+
"stepUuid": "$uuid:step-one",
|
|
218
|
+
"toolCallId": "$op.toolId",
|
|
219
|
+
"name": "$op.tool",
|
|
220
|
+
"args": "$op.input"
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"channel": "hook",
|
|
226
|
+
"event": "PreToolUse",
|
|
227
|
+
"with": {
|
|
228
|
+
"hook_event_name": "PreToolUse",
|
|
229
|
+
"session_id": "$sessionId",
|
|
230
|
+
"cwd": "$cwd",
|
|
231
|
+
"client_type": "kimi_code_cli",
|
|
232
|
+
"tool_name": "$op.tool",
|
|
233
|
+
"tool_input": "$op.input",
|
|
234
|
+
"tool_call_id": "$op.toolId"
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
],
|
|
238
|
+
"permission.ask": [
|
|
239
|
+
{
|
|
240
|
+
"channel": "native-log",
|
|
241
|
+
"event": "interaction.request",
|
|
242
|
+
"with": {
|
|
243
|
+
"id": "$uuid:interaction",
|
|
244
|
+
"kind": "approval",
|
|
245
|
+
"toolCallId": "$op.toolId",
|
|
246
|
+
"agentId": "main",
|
|
247
|
+
"request": { "tool": "$op.tool", "input": "$op.input" }
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"channel": "hook",
|
|
252
|
+
"event": "PermissionRequest",
|
|
253
|
+
"with": {
|
|
254
|
+
"hook_event_name": "PermissionRequest",
|
|
255
|
+
"session_id": "$sessionId",
|
|
256
|
+
"cwd": "$cwd",
|
|
257
|
+
"client_type": "kimi_code_cli",
|
|
258
|
+
"tool_name": "$op.tool",
|
|
259
|
+
"tool_input": "$op.input",
|
|
260
|
+
"tool_call_id": "$op.toolId"
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
"tool.end": [
|
|
265
|
+
{
|
|
266
|
+
"channel": "native-log",
|
|
267
|
+
"event": "context.append_loop_event",
|
|
268
|
+
"with": {
|
|
269
|
+
"event": {
|
|
270
|
+
"type": "tool.result",
|
|
271
|
+
"parentUuid": "$uuid:tool-event",
|
|
272
|
+
"toolCallId": "$op.toolId",
|
|
273
|
+
"result": { "output": "$op.output" }
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"channel": "hook",
|
|
279
|
+
"event": "PostToolUse",
|
|
280
|
+
"with": {
|
|
281
|
+
"hook_event_name": "PostToolUse",
|
|
282
|
+
"session_id": "$sessionId",
|
|
283
|
+
"cwd": "$cwd",
|
|
284
|
+
"client_type": "kimi_code_cli",
|
|
285
|
+
"tool_name": "$op.tool",
|
|
286
|
+
"tool_input": "$op.input",
|
|
287
|
+
"tool_call_id": "$op.toolId",
|
|
288
|
+
"tool_output": "$op.output"
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
],
|
|
292
|
+
"turn.end": [
|
|
293
|
+
{
|
|
294
|
+
"channel": "native-log",
|
|
295
|
+
"event": "context.append_loop_event",
|
|
296
|
+
"with": {
|
|
297
|
+
"event": {
|
|
298
|
+
"type": "step.end",
|
|
299
|
+
"uuid": "$uuid:step-one",
|
|
300
|
+
"turnId": "$string:$turnIndex",
|
|
301
|
+
"step": 1,
|
|
302
|
+
"finishReason": "end_turn",
|
|
303
|
+
"usage": { "inputOther": 12, "output": 4, "inputCacheRead": 0, "inputCacheCreation": 0 },
|
|
304
|
+
"providerFinishReason": "completed",
|
|
305
|
+
"rawFinishReason": "stop"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"channel": "native-log",
|
|
311
|
+
"event": "turn.ended",
|
|
312
|
+
"with": { "turnId": "$turnIndex", "reason": "completed", "durationMs": 100 }
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"channel": "hook",
|
|
316
|
+
"event": "Stop",
|
|
317
|
+
"with": {
|
|
318
|
+
"hook_event_name": "Stop",
|
|
319
|
+
"session_id": "$sessionId",
|
|
320
|
+
"cwd": "$cwd",
|
|
321
|
+
"client_type": "kimi_code_cli",
|
|
322
|
+
"stop_hook_active": false
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"channel": "native-state",
|
|
327
|
+
"event": "state.json",
|
|
328
|
+
"with": {
|
|
329
|
+
"id": "$sessionId",
|
|
330
|
+
"version": 2,
|
|
331
|
+
"cwd": "$cwd",
|
|
332
|
+
"createdAt": "$sessionCreatedAt",
|
|
333
|
+
"updatedAt": "$nowMs",
|
|
334
|
+
"archived": false,
|
|
335
|
+
"agents": { "main": { "homedir": "$cwd", "type": "main" } },
|
|
336
|
+
"custom": {},
|
|
337
|
+
"lastTurnReason": "completed"
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
],
|
|
341
|
+
"usage.refresh": [
|
|
342
|
+
{
|
|
343
|
+
"channel": "native-state",
|
|
344
|
+
"event": "state.json",
|
|
345
|
+
"with": {
|
|
346
|
+
"id": "$sessionId",
|
|
347
|
+
"version": 2,
|
|
348
|
+
"cwd": "$cwd",
|
|
349
|
+
"createdAt": "$sessionCreatedAt",
|
|
350
|
+
"updatedAt": "$nowMs",
|
|
351
|
+
"archived": false,
|
|
352
|
+
"agents": { "main": { "homedir": "$cwd", "type": "main" } },
|
|
353
|
+
"custom": {}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
]
|
|
357
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"vendor": "kimi",
|
|
3
|
+
"asm": {
|
|
4
|
+
"package": "@vibefield/puppeteer-surface",
|
|
5
|
+
"path": "vendors/kimi"
|
|
6
|
+
},
|
|
7
|
+
"shimNames": ["kimi"],
|
|
8
|
+
"envelope": {},
|
|
9
|
+
"bindings": {
|
|
10
|
+
"$workdirKey": "$workdirKey:$cwd",
|
|
11
|
+
"$sessionCreatedAt": "$nowMs"
|
|
12
|
+
},
|
|
13
|
+
"nativeStore": {
|
|
14
|
+
"rootEnv": "KIMI_CODE_HOME",
|
|
15
|
+
"sessionPath": ["sessions", "$workdirKey", "$sessionId"],
|
|
16
|
+
"updatesPath": ["agents", "main", "wire.jsonl"],
|
|
17
|
+
"indexPath": ["session_index.jsonl"],
|
|
18
|
+
"recordFormat": "flat-record",
|
|
19
|
+
"recordTimestamp": { "field": "time", "format": "epoch-ms", "omitFor": ["metadata"] },
|
|
20
|
+
"singletonEvents": ["metadata"]
|
|
21
|
+
},
|
|
22
|
+
"boot": [{ "op": "session.start" }, { "op": "session.ready" }]
|
|
23
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"flows": [
|
|
4
|
+
{
|
|
5
|
+
"id": "happy-turn",
|
|
6
|
+
"intent": "turn.basic",
|
|
7
|
+
"scenario": "happy-turn",
|
|
8
|
+
"title": "Basic Kimi wire turn",
|
|
9
|
+
"summary": "Prompt, loop content, step completion, and durable turn outcome.",
|
|
10
|
+
"kind": "typical",
|
|
11
|
+
"danger": "safe",
|
|
12
|
+
"tags": ["wire", "turn"],
|
|
13
|
+
"defaultStimulus": { "text": "hello" },
|
|
14
|
+
"defaultSpeed": 4
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "tool-success",
|
|
18
|
+
"intent": "turn.tool.success",
|
|
19
|
+
"scenario": "tool-success",
|
|
20
|
+
"title": "Tool success",
|
|
21
|
+
"summary": "Correlated tool.call and successful tool.result records.",
|
|
22
|
+
"kind": "typical",
|
|
23
|
+
"danger": "safe",
|
|
24
|
+
"tags": ["wire", "tool"],
|
|
25
|
+
"defaultStimulus": { "text": "run a tool" },
|
|
26
|
+
"defaultSpeed": 4
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "tool-failure",
|
|
30
|
+
"intent": "turn.tool.failure",
|
|
31
|
+
"scenario": "tool-failure",
|
|
32
|
+
"title": "Tool failure",
|
|
33
|
+
"summary": "A correlated tool.result carrying native isError true.",
|
|
34
|
+
"kind": "vendor",
|
|
35
|
+
"danger": "safe",
|
|
36
|
+
"tags": ["wire", "tool", "failure"],
|
|
37
|
+
"defaultSpeed": 4
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"id": "duplicate-out-of-order",
|
|
41
|
+
"intent": "fault.ordering",
|
|
42
|
+
"scenario": "duplicate-out-of-order",
|
|
43
|
+
"title": "Duplicate and reordered tool result",
|
|
44
|
+
"summary": "A result arrives before its call and repeats afterward.",
|
|
45
|
+
"kind": "adversarial",
|
|
46
|
+
"danger": "disruptive",
|
|
47
|
+
"tags": ["ordering", "duplicate"],
|
|
48
|
+
"defaultSpeed": 4
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"id": "unknown-record",
|
|
52
|
+
"intent": "fault.unknown-record",
|
|
53
|
+
"scenario": "unknown-record",
|
|
54
|
+
"title": "Unknown future wire record",
|
|
55
|
+
"summary": "Exercises lossless retention of an unmodeled record type.",
|
|
56
|
+
"kind": "adversarial",
|
|
57
|
+
"danger": "safe",
|
|
58
|
+
"tags": ["unknown", "forward-compatibility"],
|
|
59
|
+
"defaultSpeed": 4
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"id": "late-after-end",
|
|
63
|
+
"intent": "fault.late-event",
|
|
64
|
+
"scenario": "late-after-end",
|
|
65
|
+
"title": "Late content after turn end",
|
|
66
|
+
"summary": "Emits valid content after the durable terminal record.",
|
|
67
|
+
"kind": "adversarial",
|
|
68
|
+
"danger": "disruptive",
|
|
69
|
+
"tags": ["late", "ordering"],
|
|
70
|
+
"defaultSpeed": 4
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "compaction-lifecycle",
|
|
74
|
+
"intent": "session.compaction",
|
|
75
|
+
"scenario": "compaction-lifecycle",
|
|
76
|
+
"title": "Source-backed compaction lifecycle",
|
|
77
|
+
"summary": "Unverified begin, apply, and complete records from the exact release source.",
|
|
78
|
+
"kind": "vendor",
|
|
79
|
+
"danger": "safe",
|
|
80
|
+
"tags": ["compaction", "source-only"],
|
|
81
|
+
"defaultSpeed": 4
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "compaction-lifecycle",
|
|
3
|
+
"steps": [
|
|
4
|
+
{
|
|
5
|
+
"at": 0,
|
|
6
|
+
"do": { "emit": { "channel": "wire", "event": "full_compaction.begin", "with": { "source": "auto" } } }
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"at": 30,
|
|
10
|
+
"do": {
|
|
11
|
+
"emit": {
|
|
12
|
+
"channel": "wire",
|
|
13
|
+
"event": "context.apply_compaction",
|
|
14
|
+
"with": { "summary": "imposter summary", "compactedCount": 3 }
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{ "at": 60, "do": { "emit": { "channel": "wire", "event": "full_compaction.complete", "with": {} } } }
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "duplicate-out-of-order",
|
|
3
|
+
"steps": [
|
|
4
|
+
{
|
|
5
|
+
"at": 0,
|
|
6
|
+
"do": {
|
|
7
|
+
"emit": {
|
|
8
|
+
"channel": "wire",
|
|
9
|
+
"event": "context.append_loop_event",
|
|
10
|
+
"with": {
|
|
11
|
+
"event": {
|
|
12
|
+
"type": "tool.result",
|
|
13
|
+
"parentUuid": "$uuid:tool-event",
|
|
14
|
+
"toolCallId": "call-reordered",
|
|
15
|
+
"result": { "output": "early" }
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"at": 20,
|
|
23
|
+
"do": {
|
|
24
|
+
"emit": {
|
|
25
|
+
"channel": "wire",
|
|
26
|
+
"event": "context.append_loop_event",
|
|
27
|
+
"with": {
|
|
28
|
+
"event": {
|
|
29
|
+
"type": "tool.call",
|
|
30
|
+
"uuid": "$uuid:tool-event",
|
|
31
|
+
"turnId": "0",
|
|
32
|
+
"step": 1,
|
|
33
|
+
"stepUuid": "$uuid:step",
|
|
34
|
+
"toolCallId": "call-reordered",
|
|
35
|
+
"name": "Bash",
|
|
36
|
+
"args": { "command": "printf reordered" }
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"at": 40,
|
|
44
|
+
"do": {
|
|
45
|
+
"emit": {
|
|
46
|
+
"channel": "wire",
|
|
47
|
+
"event": "context.append_loop_event",
|
|
48
|
+
"with": {
|
|
49
|
+
"event": {
|
|
50
|
+
"type": "tool.result",
|
|
51
|
+
"parentUuid": "$uuid:tool-event",
|
|
52
|
+
"toolCallId": "call-reordered",
|
|
53
|
+
"result": { "output": "early" }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "happy-turn",
|
|
3
|
+
"steps": [
|
|
4
|
+
{
|
|
5
|
+
"at": 0,
|
|
6
|
+
"do": {
|
|
7
|
+
"emit": {
|
|
8
|
+
"channel": "wire",
|
|
9
|
+
"event": "turn.prompt",
|
|
10
|
+
"with": { "input": [{ "type": "text", "text": "$stimulus.text" }], "origin": { "kind": "user" } }
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"at": 20,
|
|
16
|
+
"do": {
|
|
17
|
+
"emit": {
|
|
18
|
+
"channel": "wire",
|
|
19
|
+
"event": "context.append_loop_event",
|
|
20
|
+
"with": { "event": { "type": "step.begin", "uuid": "$uuid:step", "turnId": "0", "step": 1 } }
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"at": 40,
|
|
26
|
+
"do": {
|
|
27
|
+
"emit": {
|
|
28
|
+
"channel": "wire",
|
|
29
|
+
"event": "context.append_loop_event",
|
|
30
|
+
"with": {
|
|
31
|
+
"event": {
|
|
32
|
+
"type": "content.part",
|
|
33
|
+
"uuid": "$uuid:content",
|
|
34
|
+
"turnId": "0",
|
|
35
|
+
"step": 1,
|
|
36
|
+
"stepUuid": "$uuid:step",
|
|
37
|
+
"part": { "type": "text", "text": "imposter: ok" }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"at": 60,
|
|
45
|
+
"do": {
|
|
46
|
+
"emit": {
|
|
47
|
+
"channel": "wire",
|
|
48
|
+
"event": "context.append_loop_event",
|
|
49
|
+
"with": {
|
|
50
|
+
"event": { "type": "step.end", "uuid": "$uuid:step", "turnId": "0", "step": 1, "finishReason": "end_turn" }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"at": 80,
|
|
57
|
+
"do": {
|
|
58
|
+
"emit": {
|
|
59
|
+
"channel": "wire",
|
|
60
|
+
"event": "turn.ended",
|
|
61
|
+
"with": { "turnId": 0, "reason": "completed", "durationMs": 80 }
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "late-after-end",
|
|
3
|
+
"steps": [
|
|
4
|
+
{
|
|
5
|
+
"at": 0,
|
|
6
|
+
"do": { "emit": { "channel": "wire", "event": "turn.ended", "with": { "turnId": 0, "reason": "completed" } } }
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"at": 30,
|
|
10
|
+
"do": {
|
|
11
|
+
"emit": {
|
|
12
|
+
"channel": "wire",
|
|
13
|
+
"event": "context.append_loop_event",
|
|
14
|
+
"with": {
|
|
15
|
+
"event": {
|
|
16
|
+
"type": "content.part",
|
|
17
|
+
"uuid": "$uuid:late",
|
|
18
|
+
"turnId": "0",
|
|
19
|
+
"step": 1,
|
|
20
|
+
"stepUuid": "$uuid:step",
|
|
21
|
+
"part": { "type": "text", "text": "late content" }
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tool-failure",
|
|
3
|
+
"steps": [
|
|
4
|
+
{
|
|
5
|
+
"at": 0,
|
|
6
|
+
"do": {
|
|
7
|
+
"emit": {
|
|
8
|
+
"channel": "wire",
|
|
9
|
+
"event": "context.append_loop_event",
|
|
10
|
+
"with": {
|
|
11
|
+
"event": {
|
|
12
|
+
"type": "tool.call",
|
|
13
|
+
"uuid": "$uuid:tool-event",
|
|
14
|
+
"turnId": "0",
|
|
15
|
+
"step": 1,
|
|
16
|
+
"stepUuid": "$uuid:step",
|
|
17
|
+
"toolCallId": "call-imposter",
|
|
18
|
+
"name": "Bash",
|
|
19
|
+
"args": { "command": "exit 7" }
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"at": 30,
|
|
27
|
+
"do": {
|
|
28
|
+
"emit": {
|
|
29
|
+
"channel": "wire",
|
|
30
|
+
"event": "context.append_loop_event",
|
|
31
|
+
"with": {
|
|
32
|
+
"event": {
|
|
33
|
+
"type": "tool.result",
|
|
34
|
+
"parentUuid": "$uuid:tool-event",
|
|
35
|
+
"toolCallId": "call-imposter",
|
|
36
|
+
"result": { "output": "failed", "isError": true }
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|