edbeeching HF Staff commited on
Commit
49aa045
·
verified ·
1 Parent(s): 9dbe7a5

Port 270 AgentEscapeBench tasks to Harbor with OpenEnv integration (part 2)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. data/questions/5/narrative/skeleton_a29e9429_narrative.json +242 -0
  2. data/questions/5/narrative/skeleton_a32d9848_narrative.json +238 -0
  3. data/questions/5/narrative/skeleton_a773b11e_narrative.json +213 -0
  4. data/questions/5/narrative/skeleton_ab065926_narrative.json +454 -0
  5. data/questions/5/narrative/skeleton_afe88eac_narrative.json +262 -0
  6. data/questions/5/narrative/skeleton_b3a9ed27_narrative.json +352 -0
  7. data/questions/5/narrative/skeleton_b3bd6e5d_narrative.json +322 -0
  8. data/questions/5/narrative/skeleton_bb6f4cdf_narrative.json +368 -0
  9. data/questions/5/narrative/skeleton_bf2b9442_narrative.json +345 -0
  10. data/questions/5/narrative/skeleton_bf7732ba_narrative.json +317 -0
  11. data/questions/5/narrative/skeleton_c10d41d2_narrative.json +378 -0
  12. data/questions/5/narrative/skeleton_c28065f7_narrative.json +325 -0
  13. data/questions/5/narrative/skeleton_c833dcfb_narrative.json +263 -0
  14. data/questions/5/narrative/skeleton_cbc9de7d_narrative.json +231 -0
  15. data/questions/5/narrative/skeleton_d0cc26bb_narrative.json +344 -0
  16. data/questions/5/narrative/skeleton_d16d1e74_narrative.json +233 -0
  17. data/questions/5/narrative/skeleton_e165e4b4_narrative.json +274 -0
  18. data/questions/5/narrative/skeleton_e1a2d103_narrative.json +262 -0
  19. data/questions/5/narrative/skeleton_f4252fd6_narrative.json +436 -0
  20. data/questions/5/narrative/skeleton_fa384a93_narrative.json +375 -0
  21. data/questions/5/narrative/skeleton_faec554e_narrative.json +262 -0
  22. data/questions/5/narrative/skeleton_fba0a08a_narrative.json +374 -0
  23. data/questions/5/narrative/skeleton_ff8a576b_narrative.json +233 -0
  24. pyproject.toml +43 -0
  25. reports/corpus.json +0 -0
  26. reports/openenv-smoke.json +159 -0
  27. reports/validation-summary.json +78 -0
  28. reports/worker-isolation.json +26 -0
  29. runtime-requirements.txt +57 -0
  30. source-lock.json +284 -0
  31. src/agentescape_port/__init__.py +2 -0
  32. src/agentescape_port/adapter.py +300 -0
  33. src/agentescape_port/oracle.py +133 -0
  34. src/agentescape_port/publish.py +68 -0
  35. src/agentescape_port/runtime/__init__.py +2 -0
  36. src/agentescape_port/runtime/child.py +59 -0
  37. src/agentescape_port/runtime/cli.py +57 -0
  38. src/agentescape_port/runtime/export.py +13 -0
  39. src/agentescape_port/runtime/grade.py +21 -0
  40. src/agentescape_port/runtime/service.py +212 -0
  41. src/agentescape_port/runtime/upstream/models.py +108 -0
  42. src/agentescape_port/runtime/upstream/server.py +1490 -0
  43. src/agentescape_port/runtime/upstream/simulator.py +0 -0
  44. src/agentescape_port/runtime/worker.py +73 -0
  45. src/agentescape_port/testing.py +73 -0
  46. src/agentescape_port/validate.py +76 -0
  47. tasks/agentescape-10-skeleton-091c541b/environment/Dockerfile +5 -0
  48. tasks/agentescape-10-skeleton-091c541b/environment/agent/Dockerfile +5 -0
  49. tasks/agentescape-10-skeleton-091c541b/environment/agent/cli.py +57 -0
  50. tasks/agentescape-10-skeleton-091c541b/environment/docker-compose.yaml +50 -0
data/questions/5/narrative/skeleton_a29e9429_narrative.json ADDED
@@ -0,0 +1,242 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 4,
5
+ "win_node_id": "hash_sha256",
6
+ "win_condition": {
7
+ "type": "tool_output",
8
+ "node_id": "hash_sha256",
9
+ "output_port": "hex",
10
+ "output_type": "Hex_String",
11
+ "description": "Execute SHA-256 Hasher and get the output from port 'hex'"
12
+ },
13
+ "source_init": {
14
+ "source_nodes": [
15
+ "item_11",
16
+ "container_3"
17
+ ],
18
+ "by_node": {
19
+ "item_11": {
20
+ "node_name": "",
21
+ "node_type": "Item",
22
+ "template_id": "item_11",
23
+ "init_inputs": {},
24
+ "init_outputs": {
25
+ "content": {
26
+ "type": "Code_Python",
27
+ "description": "Python code"
28
+ }
29
+ }
30
+ },
31
+ "container_3": {
32
+ "node_name": "",
33
+ "node_type": "Item",
34
+ "template_id": "container_3",
35
+ "init_inputs": {
36
+ "fingerprint_input": {
37
+ "type": "Big_Int",
38
+ "description": "Fingerprint Hash"
39
+ }
40
+ },
41
+ "init_outputs": {}
42
+ }
43
+ }
44
+ },
45
+ "initial_values": {
46
+ "item_11": {
47
+ "init_inputs": {},
48
+ "init_outputs": {
49
+ "content": "print('Executing initialization sequence for SHA-256 hashing workflow.')"
50
+ }
51
+ },
52
+ "container_3": {
53
+ "init_inputs": {
54
+ "fingerprint_input": "9283746510293847561029384"
55
+ },
56
+ "init_outputs": {}
57
+ }
58
+ },
59
+ "intro_narrative": "Deep within the ruins of the Archmage's Spire, a legendary artifact of immense power has been sealed away for millennia. You are a seasoned seeker of ancient truths who has finally breached the spire's outer sanctum. However, the inner vault is securely locked behind a series of complex magical mechanisms left behind by the mad sorcerer. The air crackles with residual energy, and strange artifacts litter the abandoned study. To claim the artifact, you must navigate the remnants of the Archmage's magical apparatus, uncover lost incantations, and channel raw arcane forces. Pay close attention to how these magical implements interact, for only by mastering their sequence can you break the final seal and escape with the ultimate prize.",
60
+ "narrative_style": "fantasy"
61
+ },
62
+ "nodes": [
63
+ {
64
+ "id": "hash_sha256",
65
+ "name": "SHA-256 Hasher",
66
+ "description": "SHA-256 over UTF-8 text; returns hex.",
67
+ "type": "Tool",
68
+ "template_id": "hash_sha256",
69
+ "initial_visible": true,
70
+ "is_revealed": true,
71
+ "inputs": [
72
+ {
73
+ "name": "text",
74
+ "type": "Text_Generic",
75
+ "description": "Text to hash",
76
+ "value": "Executing initialization sequence for SHA-256 hashing workflow.\n"
77
+ }
78
+ ],
79
+ "outputs": [
80
+ {
81
+ "name": "hex",
82
+ "type": "Hex_String",
83
+ "description": "SHA-256 Hex digest",
84
+ "value": "9c85200e3058449e8649d23ff2034d67e988752c1fd0287b7e3eaca526ca1135"
85
+ }
86
+ ],
87
+ "narrative": "The Soulforge Altar. A dark pedestal pulsating with energy. It requires input from the Arcane Ritual Circle to complete the final transmutation."
88
+ },
89
+ {
90
+ "id": "code_py_exec",
91
+ "name": "Python Executor",
92
+ "description": "Run limited Python: only safe builtins.",
93
+ "type": "Tool",
94
+ "template_id": "code_py_exec",
95
+ "initial_visible": false,
96
+ "is_revealed": false,
97
+ "inputs": [
98
+ {
99
+ "name": "trigger_item",
100
+ "type": "Item",
101
+ "description": "Required item to unlock this tool"
102
+ },
103
+ {
104
+ "name": "code",
105
+ "type": "Code_Python",
106
+ "description": "Python code",
107
+ "value": "print('Executing initialization sequence for SHA-256 hashing workflow.')"
108
+ }
109
+ ],
110
+ "outputs": [
111
+ {
112
+ "name": "stdout",
113
+ "type": "Text_Generic",
114
+ "description": "Standard Output (includes errors if any)",
115
+ "value": "Executing initialization sequence for SHA-256 hashing workflow.\n"
116
+ }
117
+ ],
118
+ "narrative": "An Arcane Ritual Circle. A sprawling geometric pattern etched on the floor. It requires input from the Ancient Spell Scroll to initiate the casting sequence."
119
+ },
120
+ {
121
+ "id": "item_11",
122
+ "name": "",
123
+ "description": "",
124
+ "type": "Item",
125
+ "template_id": "item_11",
126
+ "initial_visible": true,
127
+ "is_revealed": true,
128
+ "inputs": [
129
+ {
130
+ "name": "source_tool",
131
+ "type": "Item",
132
+ "description": "Produced by"
133
+ }
134
+ ],
135
+ "outputs": [
136
+ {
137
+ "name": "content",
138
+ "type": "Code_Python",
139
+ "description": "Python code",
140
+ "value": "print('Executing initialization sequence for SHA-256 hashing workflow.')"
141
+ }
142
+ ],
143
+ "init": {
144
+ "inputs": {},
145
+ "outputs": {
146
+ "content": "print('Executing initialization sequence for SHA-256 hashing workflow.')"
147
+ }
148
+ },
149
+ "narrative": "An Ancient Spell Scroll. A crumbling parchment covered in faintly glowing magical runes."
150
+ },
151
+ {
152
+ "id": "container_3",
153
+ "name": "",
154
+ "description": "",
155
+ "type": "Item",
156
+ "template_id": "container_3",
157
+ "initial_visible": false,
158
+ "is_revealed": false,
159
+ "inputs": [
160
+ {
161
+ "name": "container",
162
+ "type": "Hidden_Item",
163
+ "description": "Inside"
164
+ },
165
+ {
166
+ "name": "fingerprint_input",
167
+ "type": "Big_Int",
168
+ "description": "Fingerprint Hash",
169
+ "value": "9283746510293847561029384"
170
+ }
171
+ ],
172
+ "outputs": [
173
+ {
174
+ "name": "inner_space",
175
+ "type": "Item",
176
+ "description": "Contents"
177
+ }
178
+ ],
179
+ "init": {
180
+ "inputs": {
181
+ "fingerprint_input": "9283746510293847561029384"
182
+ },
183
+ "outputs": {}
184
+ },
185
+ "narrative": "A Sealed Reliquary. A heavy stone chest securely bound by ancient protective blood magic."
186
+ },
187
+ {
188
+ "id": "item_16",
189
+ "name": "",
190
+ "description": "",
191
+ "type": "Item",
192
+ "template_id": "item_16",
193
+ "initial_visible": true,
194
+ "is_revealed": true,
195
+ "inputs": [
196
+ {
197
+ "name": "source_tool",
198
+ "type": "Item",
199
+ "description": "Produced by"
200
+ }
201
+ ],
202
+ "outputs": [
203
+ {
204
+ "name": "content",
205
+ "type": "Hidden_Item",
206
+ "description": "Timezone text"
207
+ }
208
+ ],
209
+ "narrative": "A Celestial Star Map. An aged parchment diagram detailing the intricate movements of forgotten constellations."
210
+ }
211
+ ],
212
+ "edges": [
213
+ {
214
+ "source_id": "code_py_exec",
215
+ "target_id": "hash_sha256",
216
+ "connection_type": "Text_Generic",
217
+ "source_port": "stdout",
218
+ "target_port": "text"
219
+ },
220
+ {
221
+ "source_id": "item_11",
222
+ "target_id": "code_py_exec",
223
+ "connection_type": "Code_Python",
224
+ "source_port": "content",
225
+ "target_port": "code"
226
+ },
227
+ {
228
+ "source_id": "container_3",
229
+ "target_id": "code_py_exec",
230
+ "connection_type": "Item",
231
+ "source_port": "inner_space",
232
+ "target_port": "trigger_item"
233
+ },
234
+ {
235
+ "source_id": "item_16",
236
+ "target_id": "container_3",
237
+ "connection_type": "Hidden_Item",
238
+ "source_port": "content",
239
+ "target_port": "container"
240
+ }
241
+ ]
242
+ }
data/questions/5/narrative/skeleton_a32d9848_narrative.json ADDED
@@ -0,0 +1,238 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 4,
5
+ "win_node_id": "item_8",
6
+ "win_condition": {
7
+ "type": "item_content",
8
+ "node_id": "item_8",
9
+ "description": "Obtain the content of "
10
+ },
11
+ "source_init": {
12
+ "source_nodes": [
13
+ "item_8",
14
+ "base64_decode"
15
+ ],
16
+ "by_node": {
17
+ "item_8": {
18
+ "node_name": "",
19
+ "node_type": "Item",
20
+ "template_id": "item_8",
21
+ "init_inputs": {},
22
+ "init_outputs": {
23
+ "content": {
24
+ "type": "Hidden_Item",
25
+ "description": "The integer"
26
+ }
27
+ }
28
+ },
29
+ "base64_decode": {
30
+ "node_name": "Base64 Decoder",
31
+ "node_type": "Tool",
32
+ "template_id": "base64_decode",
33
+ "init_inputs": {
34
+ "data": {
35
+ "type": "Text_Generic",
36
+ "description": "Base64 string"
37
+ }
38
+ },
39
+ "init_outputs": {}
40
+ }
41
+ }
42
+ },
43
+ "initial_values": {
44
+ "item_8": {
45
+ "init_inputs": {},
46
+ "init_outputs": {
47
+ "content": "Heaven has made me talented"
48
+ }
49
+ },
50
+ "base64_decode": {
51
+ "init_inputs": {
52
+ "data": "U3VwZXIgU2VjcmV0IERhdGEgUGF5bG9hZCBmb3IgRGVjb2Rpbmc="
53
+ },
54
+ "init_outputs": {}
55
+ }
56
+ },
57
+ "intro_narrative": "You have successfully infiltrated the underground data facility of the rogue mercenary group known as 'Black Vanguard.' Your primary objective is to extract a highly sensitive intelligence file before their heavily armed patrols return from their rotation. The server room is suffocatingly silent, illuminated only by the sterile, rhythmic glow of server racks and standby monitors. The air smells of ozone and heated circuitry. According to your intel, the target data is heavily compartmentalized behind layers of digital and physical security. You only have a fragment of intercepted code to start with. Time is running out. You must navigate the encrypted systems, bypass the biometric locks, and secure the final objective before the facility goes into complete lockdown.",
58
+ "narrative_style": "techno_thriller"
59
+ },
60
+ "nodes": [
61
+ {
62
+ "id": "item_8",
63
+ "name": "",
64
+ "description": "",
65
+ "type": "Item",
66
+ "template_id": "item_8",
67
+ "initial_visible": false,
68
+ "is_revealed": false,
69
+ "inputs": [
70
+ {
71
+ "name": "source_tool",
72
+ "type": "Hidden_Item",
73
+ "description": "Produced by"
74
+ }
75
+ ],
76
+ "outputs": [
77
+ {
78
+ "name": "content",
79
+ "type": "Hidden_Item",
80
+ "description": "The integer",
81
+ "value": "Heaven has made me talented"
82
+ }
83
+ ],
84
+ "init": {
85
+ "inputs": {},
86
+ "outputs": {
87
+ "content": "Heaven has made me talented"
88
+ }
89
+ },
90
+ "narrative": "The primary Classified Dossier containing the critical intelligence you came for."
91
+ },
92
+ {
93
+ "id": "item_8_dd57",
94
+ "name": "",
95
+ "description": "",
96
+ "type": "Item",
97
+ "template_id": "item_8",
98
+ "initial_visible": false,
99
+ "is_revealed": false,
100
+ "inputs": [
101
+ {
102
+ "name": "source_tool",
103
+ "type": "Hidden_Item",
104
+ "description": "Produced by"
105
+ }
106
+ ],
107
+ "outputs": [
108
+ {
109
+ "name": "content",
110
+ "type": "Hidden_Item",
111
+ "description": "The integer"
112
+ }
113
+ ],
114
+ "narrative": "A secure Digital Archive hidden within the isolated local network."
115
+ },
116
+ {
117
+ "id": "item_16",
118
+ "name": "",
119
+ "description": "",
120
+ "type": "Item",
121
+ "template_id": "item_16",
122
+ "initial_visible": false,
123
+ "is_revealed": false,
124
+ "inputs": [
125
+ {
126
+ "name": "source_tool",
127
+ "type": "Item",
128
+ "description": "Produced by"
129
+ }
130
+ ],
131
+ "outputs": [
132
+ {
133
+ "name": "content",
134
+ "type": "Hidden_Item",
135
+ "description": "Timezone text"
136
+ }
137
+ ],
138
+ "narrative": "A sturdy Encrypted Drive containing vital network configuration settings."
139
+ },
140
+ {
141
+ "id": "container_1",
142
+ "name": "",
143
+ "description": "",
144
+ "type": "Item",
145
+ "template_id": "container_1",
146
+ "initial_visible": true,
147
+ "is_revealed": true,
148
+ "inputs": [
149
+ {
150
+ "name": "source_tool",
151
+ "type": "Item",
152
+ "description": "Produced by"
153
+ },
154
+ {
155
+ "name": "fingerprint_input",
156
+ "type": "Hex_String",
157
+ "description": "Fingerprint Hash",
158
+ "value": "5375706572205365637265742044617461205061796c6f616420666f72204465636f64696e67"
159
+ }
160
+ ],
161
+ "outputs": [
162
+ {
163
+ "name": "inner_space",
164
+ "type": "Item",
165
+ "description": "Contents"
166
+ }
167
+ ],
168
+ "narrative": "This is a Biometric Safe. It requires input from the Data Decoder to bypass its sophisticated locking mechanism."
169
+ },
170
+ {
171
+ "id": "base64_decode",
172
+ "name": "Base64 Decoder",
173
+ "description": "Decode base64 to hex bytes.",
174
+ "type": "Tool",
175
+ "template_id": "base64_decode",
176
+ "initial_visible": true,
177
+ "is_revealed": true,
178
+ "inputs": [
179
+ {
180
+ "name": "trigger_item",
181
+ "type": "Item",
182
+ "description": "Required item to unlock this tool"
183
+ },
184
+ {
185
+ "name": "data",
186
+ "type": "Text_Generic",
187
+ "description": "Base64 string",
188
+ "value": "U3VwZXIgU2VjcmV0IERhdGEgUGF5bG9hZCBmb3IgRGVjb2Rpbmc="
189
+ }
190
+ ],
191
+ "outputs": [
192
+ {
193
+ "name": "bytes_hex",
194
+ "type": "Hex_String",
195
+ "description": "Decoded bytes as Hex",
196
+ "value": "5375706572205365637265742044617461205061796c6f616420666f72204465636f64696e67"
197
+ }
198
+ ],
199
+ "init": {
200
+ "inputs": {
201
+ "data": "U3VwZXIgU2VjcmV0IERhdGEgUGF5bG9hZCBmb3IgRGVjb2Rpbmc="
202
+ },
203
+ "outputs": {}
204
+ },
205
+ "narrative": "A high-end Data Decoder running on a dedicated terminal."
206
+ }
207
+ ],
208
+ "edges": [
209
+ {
210
+ "source_id": "item_8_dd57",
211
+ "target_id": "item_8",
212
+ "connection_type": "Hidden_Item",
213
+ "source_port": "content",
214
+ "target_port": "source_tool"
215
+ },
216
+ {
217
+ "source_id": "item_16",
218
+ "target_id": "item_8_dd57",
219
+ "connection_type": "Hidden_Item",
220
+ "source_port": "content",
221
+ "target_port": "source_tool"
222
+ },
223
+ {
224
+ "source_id": "container_1",
225
+ "target_id": "item_16",
226
+ "connection_type": "Item",
227
+ "source_port": "inner_space",
228
+ "target_port": "source_tool"
229
+ },
230
+ {
231
+ "source_id": "base64_decode",
232
+ "target_id": "container_1",
233
+ "connection_type": "Hex_String",
234
+ "source_port": "bytes_hex",
235
+ "target_port": "fingerprint_input"
236
+ }
237
+ ]
238
+ }
data/questions/5/narrative/skeleton_a773b11e_narrative.json ADDED
@@ -0,0 +1,213 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 4,
5
+ "win_node_id": "zlib_inflate",
6
+ "win_condition": {
7
+ "type": "tool_output",
8
+ "node_id": "zlib_inflate",
9
+ "output_port": "text",
10
+ "output_type": "Text_Generic",
11
+ "description": "Execute Zlib Inflate and get the output from port 'text'"
12
+ },
13
+ "source_init": {
14
+ "source_nodes": [
15
+ "item_11"
16
+ ],
17
+ "by_node": {
18
+ "item_11": {
19
+ "node_name": "",
20
+ "node_type": "Item",
21
+ "template_id": "item_11",
22
+ "init_inputs": {},
23
+ "init_outputs": {
24
+ "content": {
25
+ "type": "Code_Python",
26
+ "description": "Python code"
27
+ }
28
+ }
29
+ }
30
+ }
31
+ },
32
+ "initial_values": {
33
+ "item_11": {
34
+ "init_inputs": {},
35
+ "init_outputs": {
36
+ "content": "print('Target data payload ready for zlib compression chain.')"
37
+ }
38
+ }
39
+ },
40
+ "intro_narrative": "Welcome to the abandoned workshop of the late Inventor-General Silas Thorne. The air is thick with the scent of lubricating oil, burning coal, and faint traces of ozone. As you step deeper into the brass-lined room, the heavy iron doors grind shut behind you, sealed by a massive, steam-powered lock system. The pressure gauges are dropping quickly; you do not have much time before the breathable air is entirely replaced by furnace exhaust. Scattered across the heavy oak workbenches are various pneumatic tools, analytical machines, and strange mechanical devices left behind by the mad inventor. To escape this suffocating tomb, you must deduce how to reactivate the master override sequence. You will need to process the correct commands through a series of complex steam-driven apparatuses. Find the starting components, figure out the mechanical sequence, and restore the workshop's systems to unlock the grand doors and secure your freedom.",
41
+ "narrative_style": "steampunk"
42
+ },
43
+ "nodes": [
44
+ {
45
+ "id": "zlib_inflate",
46
+ "name": "Zlib Inflate",
47
+ "description": "Inflate zlib-compressed data (hex) to text.",
48
+ "type": "Tool",
49
+ "template_id": "zlib_inflate",
50
+ "initial_visible": true,
51
+ "is_revealed": true,
52
+ "inputs": [
53
+ {
54
+ "name": "hex",
55
+ "type": "Hex_String",
56
+ "description": "Zlib compressed hex",
57
+ "value": "789c0b492c4a4f2d5148492c49542848acccc94f4c51284a4d4ca95448cb2f52a8cac94c5248cecf2d284a2d2ececccf5348ce48ccccd3e30200278a13c6"
58
+ }
59
+ ],
60
+ "outputs": [
61
+ {
62
+ "name": "text",
63
+ "type": "Text_Generic",
64
+ "description": "Inflated text",
65
+ "value": "Target data payload ready for zlib compression chain.\n"
66
+ }
67
+ ],
68
+ "narrative": "This is the Steam-driven Expander. It requires input from the Aetheric Compressor to reveal the final override sequence."
69
+ },
70
+ {
71
+ "id": "zlib_deflate",
72
+ "name": "Zlib Deflate",
73
+ "description": "Deflate text to zlib bytes (hex).",
74
+ "type": "Tool",
75
+ "template_id": "zlib_deflate",
76
+ "initial_visible": false,
77
+ "is_revealed": false,
78
+ "inputs": [
79
+ {
80
+ "name": "trigger_hidden",
81
+ "type": "Hidden_Item",
82
+ "description": "Hidden item required to unlock this tool"
83
+ },
84
+ {
85
+ "name": "text",
86
+ "type": "Text_Generic",
87
+ "description": "Text to compress",
88
+ "value": "Target data payload ready for zlib compression chain.\n"
89
+ }
90
+ ],
91
+ "outputs": [
92
+ {
93
+ "name": "hex",
94
+ "type": "Hex_String",
95
+ "description": "Compressed hex",
96
+ "value": "789c0b492c4a4f2d5148492c49542848acccc94f4c51284a4d4ca95448cb2f52a8cac94c5248cecf2d284a2d2ececccf5348ce48ccccd3e30200278a13c6"
97
+ }
98
+ ],
99
+ "narrative": "This is the Aetheric Compressor. It requires input from the Clockwork Difference Engine to condense the mechanical data."
100
+ },
101
+ {
102
+ "id": "code_py_exec",
103
+ "name": "Python Executor",
104
+ "description": "Run limited Python: only safe builtins.",
105
+ "type": "Tool",
106
+ "template_id": "code_py_exec",
107
+ "initial_visible": true,
108
+ "is_revealed": true,
109
+ "inputs": [
110
+ {
111
+ "name": "code",
112
+ "type": "Code_Python",
113
+ "description": "Python code",
114
+ "value": "print('Target data payload ready for zlib compression chain.')"
115
+ }
116
+ ],
117
+ "outputs": [
118
+ {
119
+ "name": "stdout",
120
+ "type": "Text_Generic",
121
+ "description": "Standard Output (includes errors if any)",
122
+ "value": "Target data payload ready for zlib compression chain.\n"
123
+ }
124
+ ],
125
+ "narrative": "This is the Clockwork Difference Engine. It requires input from the Brass Punched Card to calculate the sequence."
126
+ },
127
+ {
128
+ "id": "item_8",
129
+ "name": "",
130
+ "description": "",
131
+ "type": "Item",
132
+ "template_id": "item_8",
133
+ "initial_visible": true,
134
+ "is_revealed": true,
135
+ "inputs": [
136
+ {
137
+ "name": "source_tool",
138
+ "type": "Hidden_Item",
139
+ "description": "Produced by"
140
+ }
141
+ ],
142
+ "outputs": [
143
+ {
144
+ "name": "content",
145
+ "type": "Hidden_Item",
146
+ "description": "The integer"
147
+ }
148
+ ],
149
+ "narrative": "A heavy Tarnished Gear resting quietly on a dusty shelf."
150
+ },
151
+ {
152
+ "id": "item_11",
153
+ "name": "",
154
+ "description": "",
155
+ "type": "Item",
156
+ "template_id": "item_11",
157
+ "initial_visible": true,
158
+ "is_revealed": true,
159
+ "inputs": [
160
+ {
161
+ "name": "source_tool",
162
+ "type": "Item",
163
+ "description": "Produced by"
164
+ }
165
+ ],
166
+ "outputs": [
167
+ {
168
+ "name": "content",
169
+ "type": "Code_Python",
170
+ "description": "Python code",
171
+ "value": "print('Target data payload ready for zlib compression chain.')"
172
+ }
173
+ ],
174
+ "init": {
175
+ "inputs": {},
176
+ "outputs": {
177
+ "content": "print('Target data payload ready for zlib compression chain.')"
178
+ }
179
+ },
180
+ "narrative": "A Brass Punched Card inscribed with intricate analytical instructions."
181
+ }
182
+ ],
183
+ "edges": [
184
+ {
185
+ "source_id": "zlib_deflate",
186
+ "target_id": "zlib_inflate",
187
+ "connection_type": "Hex_String",
188
+ "source_port": "hex",
189
+ "target_port": "hex"
190
+ },
191
+ {
192
+ "source_id": "code_py_exec",
193
+ "target_id": "zlib_deflate",
194
+ "connection_type": "Text_Generic",
195
+ "source_port": "stdout",
196
+ "target_port": "text"
197
+ },
198
+ {
199
+ "source_id": "item_8",
200
+ "target_id": "zlib_deflate",
201
+ "connection_type": "Hidden_Item",
202
+ "source_port": "content",
203
+ "target_port": "trigger_hidden"
204
+ },
205
+ {
206
+ "source_id": "item_11",
207
+ "target_id": "code_py_exec",
208
+ "connection_type": "Code_Python",
209
+ "source_port": "content",
210
+ "target_port": "code"
211
+ }
212
+ ]
213
+ }
data/questions/5/narrative/skeleton_ab065926_narrative.json ADDED
@@ -0,0 +1,454 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 5,
5
+ "win_node_id": "json_get",
6
+ "win_condition": {
7
+ "type": "tool_output",
8
+ "node_id": "json_get",
9
+ "output_port": "values",
10
+ "output_type": "Text_Generic",
11
+ "description": "Execute JSON Getter and get the output from port 'values'"
12
+ },
13
+ "source_init": {
14
+ "source_nodes": [
15
+ "json_get",
16
+ "graph_shortest_path",
17
+ "zip_unzip_file",
18
+ "terminal_2",
19
+ "calc_modexp"
20
+ ],
21
+ "by_node": {
22
+ "json_get": {
23
+ "node_name": "JSON Getter",
24
+ "node_type": "Tool",
25
+ "template_id": "json_get",
26
+ "init_inputs": {
27
+ "file_id": {
28
+ "type": "File_Id",
29
+ "description": "JSON file ID"
30
+ }
31
+ },
32
+ "init_outputs": {
33
+ "values": {
34
+ "type": "Text_Generic",
35
+ "description": "Extracted values"
36
+ }
37
+ }
38
+ },
39
+ "graph_shortest_path": {
40
+ "node_name": "Shortest Path Finder",
41
+ "node_type": "Tool",
42
+ "template_id": "graph_shortest_path",
43
+ "init_inputs": {
44
+ "src": {
45
+ "type": "Text_Generic",
46
+ "description": "Source node"
47
+ }
48
+ },
49
+ "init_outputs": {
50
+ "path": {
51
+ "type": "Text_Generic",
52
+ "description": "Path list"
53
+ },
54
+ "cost": {
55
+ "type": "Big_Int",
56
+ "description": "Path cost"
57
+ }
58
+ }
59
+ },
60
+ "zip_unzip_file": {
61
+ "node_name": "Zip Unzipper",
62
+ "node_type": "Tool",
63
+ "template_id": "zip_unzip_file",
64
+ "init_inputs": {
65
+ "zip_id": {
66
+ "type": "File_Id",
67
+ "description": "Zip file ID"
68
+ }
69
+ },
70
+ "init_outputs": {
71
+ "files": {
72
+ "type": "File_Id",
73
+ "description": "Extracted file ID"
74
+ }
75
+ }
76
+ },
77
+ "terminal_2": {
78
+ "node_name": "",
79
+ "node_type": "Tool",
80
+ "template_id": "terminal_2",
81
+ "init_inputs": {
82
+ "num2": {
83
+ "type": "Big_Int",
84
+ "description": "Second Number"
85
+ }
86
+ },
87
+ "init_outputs": {
88
+ "text_result": {
89
+ "type": "Text_Generic",
90
+ "description": "Text result for partial input"
91
+ },
92
+ "hex_result": {
93
+ "type": "Hex_String",
94
+ "description": "Hexadecimal result when both inputs provided"
95
+ },
96
+ "math_token": {
97
+ "type": "Item",
98
+ "description": "Mathematics token when both inputs provided"
99
+ }
100
+ }
101
+ },
102
+ "calc_modexp": {
103
+ "node_name": "BigInt Modular Exponentiation",
104
+ "node_type": "Tool",
105
+ "template_id": "calc_modexp",
106
+ "init_inputs": {
107
+ "base": {
108
+ "type": "Big_Int",
109
+ "description": "Base"
110
+ },
111
+ "exp": {
112
+ "type": "Big_Int",
113
+ "description": "Exponent"
114
+ },
115
+ "mod": {
116
+ "type": "Big_Int",
117
+ "description": "Modulus"
118
+ }
119
+ },
120
+ "init_outputs": {}
121
+ }
122
+ }
123
+ },
124
+ "initial_values": {
125
+ "json_get": {
126
+ "init_inputs": {
127
+ "file_id": "inventory_data_v4.json"
128
+ },
129
+ "init_outputs": {
130
+ "values": "[\"item_sku_1092\", \"item_sku_1093\", \"item_sku_1094\", \"item_sku_1095\"]"
131
+ }
132
+ },
133
+ "graph_shortest_path": {
134
+ "init_inputs": {
135
+ "src": "Node_Gateway_A"
136
+ },
137
+ "init_outputs": {
138
+ "path": "[\"Node_Gateway_A\", \"Node_Cluster_1\", \"Node_Router_X\", \"Node_Bridge_9\", \"Node_Target_Z\"]",
139
+ "cost": "158924"
140
+ }
141
+ },
142
+ "zip_unzip_file": {
143
+ "init_inputs": {
144
+ "zip_id": "confidential_logs_2024.zip"
145
+ },
146
+ "init_outputs": {
147
+ "files": "extracted_report_final.txt"
148
+ }
149
+ },
150
+ "terminal_2": {
151
+ "init_inputs": {
152
+ "num2": "82736451928374650192"
153
+ },
154
+ "init_outputs": {
155
+ "text_result": "Calculation pending verification step.",
156
+ "hex_result": "1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d",
157
+ "math_token": "This token intentionally left void."
158
+ }
159
+ },
160
+ "calc_modexp": {
161
+ "init_inputs": {
162
+ "base": "47582930182736451928",
163
+ "exp": "92837465102938475612",
164
+ "mod": "99989"
165
+ },
166
+ "init_outputs": {}
167
+ }
168
+ },
169
+ "intro_narrative": "The underground server farm of the shadowy Vanguard Corporation is eerily quiet, save for the low hum of cooling fans. You are an elite cyber-operative tasked with a singular mission: extract the master ledger containing the corporation's global blackmail targets. The facility has initiated a lockdown protocol, and you have only minutes before the server racks are wiped clean by an automated EMP. Before you stands a complex array of interconnected systems: humming mainframes, encrypted archives, and advanced network interfaces. You must navigate this physical maze of digital security, carefully tracing the data flows from one machine to the next, to isolate and extract the target file. The clock is ticking, and the digital tripwires are live.",
170
+ "narrative_style": "techno_thriller"
171
+ },
172
+ "nodes": [
173
+ {
174
+ "id": "json_get",
175
+ "name": "JSON Getter",
176
+ "description": "Extract values by simple JSONPath.",
177
+ "type": "Tool",
178
+ "template_id": "json_get",
179
+ "initial_visible": true,
180
+ "is_revealed": true,
181
+ "inputs": [
182
+ {
183
+ "name": "file_id",
184
+ "type": "File_Id",
185
+ "description": "JSON file ID",
186
+ "value": "inventory_data_v4.json"
187
+ },
188
+ {
189
+ "name": "jsonpath",
190
+ "type": "Text_Generic",
191
+ "description": "JSONPath expression",
192
+ "value": "[\"Node_Gateway_A\", \"Node_Cluster_1\", \"Node_Router_X\", \"Node_Bridge_9\", \"Node_Target_Z\"]"
193
+ }
194
+ ],
195
+ "outputs": [
196
+ {
197
+ "name": "values",
198
+ "type": "Text_Generic",
199
+ "description": "Extracted values",
200
+ "value": "[\"item_sku_1092\", \"item_sku_1093\", \"item_sku_1094\", \"item_sku_1095\"]"
201
+ }
202
+ ],
203
+ "init": {
204
+ "inputs": {
205
+ "file_id": "inventory_data_v4.json"
206
+ },
207
+ "outputs": {
208
+ "values": "[\"item_sku_1092\", \"item_sku_1093\", \"item_sku_1094\", \"item_sku_1095\"]"
209
+ }
210
+ },
211
+ "narrative": "The final data extractor protocol. It requires input from the network mapper to pinpoint and isolate the exact location of the target file."
212
+ },
213
+ {
214
+ "id": "graph_shortest_path",
215
+ "name": "Shortest Path Finder",
216
+ "description": "Shortest path on graph json file with edges list.",
217
+ "type": "Tool",
218
+ "template_id": "graph_shortest_path",
219
+ "initial_visible": true,
220
+ "is_revealed": true,
221
+ "inputs": [
222
+ {
223
+ "name": "trigger_hidden",
224
+ "type": "Hidden_Item",
225
+ "description": "Hidden item required to unlock this tool"
226
+ },
227
+ {
228
+ "name": "file_id",
229
+ "type": "File_Id",
230
+ "description": "Graph JSON file ID",
231
+ "value": "extracted_report_final.txt"
232
+ },
233
+ {
234
+ "name": "src",
235
+ "type": "Text_Generic",
236
+ "description": "Source node",
237
+ "value": "Node_Gateway_A"
238
+ },
239
+ {
240
+ "name": "dst",
241
+ "type": "Text_Generic",
242
+ "description": "Destination node",
243
+ "value": "Calculation pending verification step."
244
+ }
245
+ ],
246
+ "outputs": [
247
+ {
248
+ "name": "path",
249
+ "type": "Text_Generic",
250
+ "description": "Path list",
251
+ "value": "[\"Node_Gateway_A\", \"Node_Cluster_1\", \"Node_Router_X\", \"Node_Bridge_9\", \"Node_Target_Z\"]"
252
+ },
253
+ {
254
+ "name": "cost",
255
+ "type": "Big_Int",
256
+ "description": "Path cost",
257
+ "value": "158924"
258
+ }
259
+ ],
260
+ "init": {
261
+ "inputs": {
262
+ "src": "Node_Gateway_A"
263
+ },
264
+ "outputs": {
265
+ "path": "[\"Node_Gateway_A\", \"Node_Cluster_1\", \"Node_Router_X\", \"Node_Bridge_9\", \"Node_Target_Z\"]",
266
+ "cost": "158924"
267
+ }
268
+ },
269
+ "narrative": "An advanced network mapper interface. It requires inputs from both the encrypted archive and the security console to trace the correct signal route."
270
+ },
271
+ {
272
+ "id": "zip_unzip_file",
273
+ "name": "Zip Unzipper",
274
+ "description": "Unzip a password-protected zip file by id.",
275
+ "type": "Tool",
276
+ "template_id": "zip_unzip_file",
277
+ "initial_visible": true,
278
+ "is_revealed": true,
279
+ "inputs": [
280
+ {
281
+ "name": "trigger_hidden",
282
+ "type": "Hidden_Item",
283
+ "description": "Hidden item required to unlock this tool"
284
+ },
285
+ {
286
+ "name": "zip_id",
287
+ "type": "File_Id",
288
+ "description": "Zip file ID",
289
+ "value": "confidential_logs_2024.zip"
290
+ },
291
+ {
292
+ "name": "password",
293
+ "type": "Text_Generic",
294
+ "description": "Password",
295
+ "value": "Calculation pending verification step."
296
+ }
297
+ ],
298
+ "outputs": [
299
+ {
300
+ "name": "files",
301
+ "type": "File_Id",
302
+ "description": "Extracted file ID",
303
+ "value": "extracted_report_final.txt"
304
+ }
305
+ ],
306
+ "init": {
307
+ "inputs": {
308
+ "zip_id": "confidential_logs_2024.zip"
309
+ },
310
+ "outputs": {
311
+ "files": "extracted_report_final.txt"
312
+ }
313
+ },
314
+ "narrative": "A heavily encrypted data archive. It requires input from the security console to begin the decryption process."
315
+ },
316
+ {
317
+ "id": "terminal_2",
318
+ "name": "",
319
+ "description": "",
320
+ "type": "Tool",
321
+ "template_id": "terminal_2",
322
+ "initial_visible": true,
323
+ "is_revealed": true,
324
+ "inputs": [
325
+ {
326
+ "name": "num1",
327
+ "type": "Big_Int",
328
+ "description": "First Number",
329
+ "value": "47602"
330
+ },
331
+ {
332
+ "name": "num2",
333
+ "type": "Big_Int",
334
+ "description": "Second Number",
335
+ "value": "82736451928374650192"
336
+ }
337
+ ],
338
+ "outputs": [
339
+ {
340
+ "name": "text_result",
341
+ "type": "Text_Generic",
342
+ "description": "Text result for partial input",
343
+ "value": "Calculation pending verification step."
344
+ },
345
+ {
346
+ "name": "hex_result",
347
+ "type": "Hex_String",
348
+ "description": "Hexadecimal result when both inputs provided",
349
+ "value": "1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d"
350
+ },
351
+ {
352
+ "name": "math_token",
353
+ "type": "Item",
354
+ "description": "Mathematics token when both inputs provided",
355
+ "value": "This token intentionally left void."
356
+ }
357
+ ],
358
+ "init": {
359
+ "inputs": {
360
+ "num2": "82736451928374650192"
361
+ },
362
+ "outputs": {
363
+ "text_result": "Calculation pending verification step.",
364
+ "hex_result": "1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d",
365
+ "math_token": "This token intentionally left void."
366
+ }
367
+ },
368
+ "narrative": "A sleek security console. It requires input from the mainframe core to bypass its initial lockouts."
369
+ },
370
+ {
371
+ "id": "calc_modexp",
372
+ "name": "BigInt Modular Exponentiation",
373
+ "description": "Modular exponentiation pow(base, exp, mod) with large decimal strings.",
374
+ "type": "Tool",
375
+ "template_id": "calc_modexp",
376
+ "initial_visible": true,
377
+ "is_revealed": true,
378
+ "inputs": [
379
+ {
380
+ "name": "base",
381
+ "type": "Big_Int",
382
+ "description": "Base",
383
+ "value": "47582930182736451928"
384
+ },
385
+ {
386
+ "name": "exp",
387
+ "type": "Big_Int",
388
+ "description": "Exponent",
389
+ "value": "92837465102938475612"
390
+ },
391
+ {
392
+ "name": "mod",
393
+ "type": "Big_Int",
394
+ "description": "Modulus",
395
+ "value": "99989"
396
+ }
397
+ ],
398
+ "outputs": [
399
+ {
400
+ "name": "value",
401
+ "type": "Big_Int",
402
+ "description": "Result value",
403
+ "value": "47602"
404
+ }
405
+ ],
406
+ "init": {
407
+ "inputs": {
408
+ "base": "47582930182736451928",
409
+ "exp": "92837465102938475612",
410
+ "mod": "99989"
411
+ },
412
+ "outputs": {}
413
+ },
414
+ "narrative": "A high-powered mainframe core humming with residual energy. It processes massive mathematical operations."
415
+ }
416
+ ],
417
+ "edges": [
418
+ {
419
+ "source_id": "graph_shortest_path",
420
+ "target_id": "json_get",
421
+ "connection_type": "Text_Generic",
422
+ "source_port": "path",
423
+ "target_port": "jsonpath"
424
+ },
425
+ {
426
+ "source_id": "zip_unzip_file",
427
+ "target_id": "graph_shortest_path",
428
+ "connection_type": "File_Id",
429
+ "source_port": "files",
430
+ "target_port": "file_id"
431
+ },
432
+ {
433
+ "source_id": "terminal_2",
434
+ "target_id": "graph_shortest_path",
435
+ "connection_type": "Text_Generic",
436
+ "source_port": "text_result",
437
+ "target_port": "dst"
438
+ },
439
+ {
440
+ "source_id": "terminal_2",
441
+ "target_id": "zip_unzip_file",
442
+ "connection_type": "Text_Generic",
443
+ "source_port": "text_result",
444
+ "target_port": "password"
445
+ },
446
+ {
447
+ "source_id": "calc_modexp",
448
+ "target_id": "terminal_2",
449
+ "connection_type": "Big_Int",
450
+ "source_port": "value",
451
+ "target_port": "num1"
452
+ }
453
+ ]
454
+ }
data/questions/5/narrative/skeleton_afe88eac_narrative.json ADDED
@@ -0,0 +1,262 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 4,
5
+ "win_node_id": "luhn_check",
6
+ "win_condition": {
7
+ "type": "tool_output",
8
+ "node_id": "luhn_check",
9
+ "output_port": "valid",
10
+ "output_type": "Text_Generic",
11
+ "description": "Execute Luhn Checker and get the output from port 'valid'"
12
+ },
13
+ "source_init": {
14
+ "source_nodes": [
15
+ "calc_inv_mod",
16
+ "luhn_check_bcb4"
17
+ ],
18
+ "by_node": {
19
+ "calc_inv_mod": {
20
+ "node_name": "BigInt Modular Inverse",
21
+ "node_type": "Tool",
22
+ "template_id": "calc_inv_mod",
23
+ "init_inputs": {
24
+ "a": {
25
+ "type": "Big_Int",
26
+ "description": "Integer a"
27
+ },
28
+ "mod": {
29
+ "type": "Big_Int",
30
+ "description": "Modulus"
31
+ }
32
+ },
33
+ "init_outputs": {}
34
+ },
35
+ "luhn_check_bcb4": {
36
+ "node_name": "Luhn Checker",
37
+ "node_type": "Tool",
38
+ "template_id": "luhn_check",
39
+ "init_inputs": {
40
+ "number": {
41
+ "type": "Text_Generic",
42
+ "description": "Number string"
43
+ }
44
+ },
45
+ "init_outputs": {}
46
+ }
47
+ }
48
+ },
49
+ "initial_values": {
50
+ "calc_inv_mod": {
51
+ "init_inputs": {
52
+ "a": "2938475610293847561928374",
53
+ "mod": "104729"
54
+ },
55
+ "init_outputs": {}
56
+ },
57
+ "luhn_check_bcb4": {
58
+ "init_inputs": {
59
+ "number": "4539128037465192"
60
+ },
61
+ "init_outputs": {}
62
+ }
63
+ },
64
+ "intro_narrative": "You awaken in the ruins of a floating sanctuary, a remnant of the Age of Myths where powerful enchanters once resided. The air hums with latent magic, and the path to freedom is sealed by ancient enchantments. Legend speaks of an absolute barrier that can only be broken by harmonizing the scattered remnants of spellcraft left behind by the sanctuary's masters. You must explore the crumbling halls, interact with the mystical artifacts, and weave their powers together to uncover the sequence that will break the seal and grant your escape.",
65
+ "narrative_style": "fantasy"
66
+ },
67
+ "nodes": [
68
+ {
69
+ "id": "luhn_check",
70
+ "name": "Luhn Checker",
71
+ "description": "Luhn validity of number string.",
72
+ "type": "Tool",
73
+ "template_id": "luhn_check",
74
+ "initial_visible": true,
75
+ "is_revealed": true,
76
+ "inputs": [
77
+ {
78
+ "name": "number",
79
+ "type": "Text_Generic",
80
+ "description": "Number string",
81
+ "value": "kfqxj"
82
+ }
83
+ ],
84
+ "outputs": [
85
+ {
86
+ "name": "valid",
87
+ "type": "Text_Generic",
88
+ "description": "True/False string",
89
+ "value": "false"
90
+ }
91
+ ],
92
+ "narrative": "This is the Final Ward. It requires input from the Star-Wheeled Cipher to dispel the ultimate barrier."
93
+ },
94
+ {
95
+ "id": "text_rotN",
96
+ "name": "ROT-N Cipher",
97
+ "description": "Caesar shift by N.",
98
+ "type": "Tool",
99
+ "template_id": "text_rotN",
100
+ "initial_visible": true,
101
+ "is_revealed": true,
102
+ "inputs": [
103
+ {
104
+ "name": "trigger_item",
105
+ "type": "Item",
106
+ "description": "Required item to unlock this tool"
107
+ },
108
+ {
109
+ "name": "text",
110
+ "type": "Text_Generic",
111
+ "description": "Text",
112
+ "value": "false"
113
+ },
114
+ {
115
+ "name": "n",
116
+ "type": "Big_Int",
117
+ "description": "Shift N",
118
+ "value": "19557"
119
+ }
120
+ ],
121
+ "outputs": [
122
+ {
123
+ "name": "text",
124
+ "type": "Text_Generic",
125
+ "description": "Rotated text",
126
+ "value": "kfqxj"
127
+ }
128
+ ],
129
+ "narrative": "This is the Star-Wheeled Cipher. It requires inputs from both the Arcanist's Balance and the Golem's Mouth to shift its constellations into the correct alignment."
130
+ },
131
+ {
132
+ "id": "calc_inv_mod",
133
+ "name": "BigInt Modular Inverse",
134
+ "description": "Modular inverse of a modulo mod (large decimal strings).",
135
+ "type": "Tool",
136
+ "template_id": "calc_inv_mod",
137
+ "initial_visible": true,
138
+ "is_revealed": true,
139
+ "inputs": [
140
+ {
141
+ "name": "a",
142
+ "type": "Big_Int",
143
+ "description": "Integer a",
144
+ "value": "2938475610293847561928374"
145
+ },
146
+ {
147
+ "name": "mod",
148
+ "type": "Big_Int",
149
+ "description": "Modulus",
150
+ "value": "104729"
151
+ }
152
+ ],
153
+ "outputs": [
154
+ {
155
+ "name": "inv",
156
+ "type": "Big_Int",
157
+ "description": "Modular inverse",
158
+ "value": "19557"
159
+ }
160
+ ],
161
+ "init": {
162
+ "inputs": {
163
+ "a": "2938475610293847561928374",
164
+ "mod": "104729"
165
+ },
166
+ "outputs": {}
167
+ },
168
+ "narrative": "An ancient magical scale known as the Arcanist's Balance, used to weigh the inverse forces of the cosmos."
169
+ },
170
+ {
171
+ "id": "luhn_check_bcb4",
172
+ "name": "Luhn Checker",
173
+ "description": "Luhn validity of number string.",
174
+ "type": "Tool",
175
+ "template_id": "luhn_check",
176
+ "initial_visible": false,
177
+ "is_revealed": false,
178
+ "inputs": [
179
+ {
180
+ "name": "trigger_hidden",
181
+ "type": "Hidden_Item",
182
+ "description": "Hidden item required to unlock this tool"
183
+ },
184
+ {
185
+ "name": "number",
186
+ "type": "Text_Generic",
187
+ "description": "Number string",
188
+ "value": "4539128037465192"
189
+ }
190
+ ],
191
+ "outputs": [
192
+ {
193
+ "name": "valid",
194
+ "type": "Text_Generic",
195
+ "description": "True/False string",
196
+ "value": "false"
197
+ }
198
+ ],
199
+ "init": {
200
+ "inputs": {
201
+ "number": "4539128037465192"
202
+ },
203
+ "outputs": {}
204
+ },
205
+ "narrative": "This is the Golem's Mouth, a stone visage embedded in the wall that seems to process magical incantations."
206
+ },
207
+ {
208
+ "id": "item_16",
209
+ "name": "",
210
+ "description": "",
211
+ "type": "Item",
212
+ "template_id": "item_16",
213
+ "initial_visible": true,
214
+ "is_revealed": true,
215
+ "inputs": [
216
+ {
217
+ "name": "source_tool",
218
+ "type": "Item",
219
+ "description": "Produced by"
220
+ }
221
+ ],
222
+ "outputs": [
223
+ {
224
+ "name": "content",
225
+ "type": "Hidden_Item",
226
+ "description": "Timezone text"
227
+ }
228
+ ],
229
+ "narrative": "The Spirit Orb, a translucent sphere trapped within a spectral cage, humming with ethereal energy."
230
+ }
231
+ ],
232
+ "edges": [
233
+ {
234
+ "source_id": "text_rotN",
235
+ "target_id": "luhn_check",
236
+ "connection_type": "Text_Generic",
237
+ "source_port": "text",
238
+ "target_port": "number"
239
+ },
240
+ {
241
+ "source_id": "calc_inv_mod",
242
+ "target_id": "text_rotN",
243
+ "connection_type": "Big_Int",
244
+ "source_port": "inv",
245
+ "target_port": "n"
246
+ },
247
+ {
248
+ "source_id": "luhn_check_bcb4",
249
+ "target_id": "text_rotN",
250
+ "connection_type": "Text_Generic",
251
+ "source_port": "valid",
252
+ "target_port": "text"
253
+ },
254
+ {
255
+ "source_id": "item_16",
256
+ "target_id": "luhn_check_bcb4",
257
+ "connection_type": "Hidden_Item",
258
+ "source_port": "content",
259
+ "target_port": "trigger_hidden"
260
+ }
261
+ ]
262
+ }
data/questions/5/narrative/skeleton_b3a9ed27_narrative.json ADDED
@@ -0,0 +1,352 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 5,
5
+ "win_node_id": "calc_modexp",
6
+ "win_condition": {
7
+ "type": "tool_output",
8
+ "node_id": "calc_modexp",
9
+ "output_port": "value",
10
+ "output_type": "Big_Int",
11
+ "description": "Execute BigInt Modular Exponentiation and get the output from port 'value'"
12
+ },
13
+ "source_init": {
14
+ "source_nodes": [
15
+ "calc_modexp",
16
+ "num_base_convert",
17
+ "calc_gcd_1aa3",
18
+ "checksum_crc32"
19
+ ],
20
+ "by_node": {
21
+ "calc_modexp": {
22
+ "node_name": "BigInt Modular Exponentiation",
23
+ "node_type": "Tool",
24
+ "template_id": "calc_modexp",
25
+ "init_inputs": {
26
+ "mod": {
27
+ "type": "Big_Int",
28
+ "description": "Modulus"
29
+ }
30
+ },
31
+ "init_outputs": {}
32
+ },
33
+ "num_base_convert": {
34
+ "node_name": "Base Converter",
35
+ "node_type": "Tool",
36
+ "template_id": "num_base_convert",
37
+ "init_inputs": {
38
+ "from_base": {
39
+ "type": "Big_Int",
40
+ "description": "From base"
41
+ },
42
+ "to_base": {
43
+ "type": "Big_Int",
44
+ "description": "To base"
45
+ }
46
+ },
47
+ "init_outputs": {}
48
+ },
49
+ "calc_gcd_1aa3": {
50
+ "node_name": "BigInt GCD Calculator",
51
+ "node_type": "Tool",
52
+ "template_id": "calc_gcd",
53
+ "init_inputs": {
54
+ "a": {
55
+ "type": "Big_Int",
56
+ "description": "First integer"
57
+ },
58
+ "b": {
59
+ "type": "Big_Int",
60
+ "description": "Second integer"
61
+ }
62
+ },
63
+ "init_outputs": {}
64
+ },
65
+ "checksum_crc32": {
66
+ "node_name": "CRC32 Checksum",
67
+ "node_type": "Tool",
68
+ "template_id": "checksum_crc32",
69
+ "init_inputs": {
70
+ "hex": {
71
+ "type": "Hex_String",
72
+ "description": "Hex data"
73
+ }
74
+ },
75
+ "init_outputs": {}
76
+ }
77
+ }
78
+ },
79
+ "initial_values": {
80
+ "calc_modexp": {
81
+ "init_inputs": {
82
+ "mod": "492871"
83
+ },
84
+ "init_outputs": {}
85
+ },
86
+ "num_base_convert": {
87
+ "init_inputs": {
88
+ "from_base": "10",
89
+ "to_base": "10"
90
+ },
91
+ "init_outputs": {}
92
+ },
93
+ "calc_gcd_1aa3": {
94
+ "init_inputs": {
95
+ "a": "837462519283746501928374",
96
+ "b": "291837465029183746501928"
97
+ },
98
+ "init_outputs": {}
99
+ },
100
+ "checksum_crc32": {
101
+ "init_inputs": {
102
+ "hex": "48656c6c6f20576f726c6421"
103
+ },
104
+ "init_outputs": {}
105
+ }
106
+ },
107
+ "intro_narrative": "The rain beats heavily against the foggy windows of the abandoned safe house. For months, you have been tracking 'The Architects,' a notorious underground syndicate operating in the city's shadows. Tonight, a breakthrough led you to this hidden command center. At the heart of the room stands a massive, electronically sealed vault containing the syndicate's true identities and ledger. However, they didn't leave it unprotected. A web of complex, interdependent cryptographic mechanisms guards the final lock. Time is running out—patrols will return by dawn. You must analyze the fragmented evidence scattered around the room, trace the connections, and decrypt the system to crack the case wide open.",
108
+ "narrative_style": "detective"
109
+ },
110
+ "nodes": [
111
+ {
112
+ "id": "calc_modexp",
113
+ "name": "BigInt Modular Exponentiation",
114
+ "description": "Modular exponentiation pow(base, exp, mod) with large decimal strings.",
115
+ "type": "Tool",
116
+ "template_id": "calc_modexp",
117
+ "initial_visible": true,
118
+ "is_revealed": true,
119
+ "inputs": [
120
+ {
121
+ "name": "base",
122
+ "type": "Big_Int",
123
+ "description": "Base",
124
+ "value": "1"
125
+ },
126
+ {
127
+ "name": "exp",
128
+ "type": "Big_Int",
129
+ "description": "Exponent",
130
+ "value": "2"
131
+ },
132
+ {
133
+ "name": "mod",
134
+ "type": "Big_Int",
135
+ "description": "Modulus",
136
+ "value": "492871"
137
+ }
138
+ ],
139
+ "outputs": [
140
+ {
141
+ "name": "value",
142
+ "type": "Big_Int",
143
+ "description": "Result value",
144
+ "value": "1"
145
+ }
146
+ ],
147
+ "init": {
148
+ "inputs": {
149
+ "mod": "492871"
150
+ },
151
+ "outputs": {}
152
+ },
153
+ "narrative": "The master vault lock holding the final piece of evidence. It requires inputs from both the cypher translation manual and the forensic comparator tool to finally open."
154
+ },
155
+ {
156
+ "id": "num_base_convert",
157
+ "name": "Base Converter",
158
+ "description": "Convert integer between bases (2..36).",
159
+ "type": "Tool",
160
+ "template_id": "num_base_convert",
161
+ "initial_visible": true,
162
+ "is_revealed": true,
163
+ "inputs": [
164
+ {
165
+ "name": "s",
166
+ "type": "Big_Int",
167
+ "description": "Input integer value",
168
+ "value": "2"
169
+ },
170
+ {
171
+ "name": "from_base",
172
+ "type": "Big_Int",
173
+ "description": "From base",
174
+ "value": "10"
175
+ },
176
+ {
177
+ "name": "to_base",
178
+ "type": "Big_Int",
179
+ "description": "To base",
180
+ "value": "10"
181
+ }
182
+ ],
183
+ "outputs": [
184
+ {
185
+ "name": "str",
186
+ "type": "Big_Int",
187
+ "description": "Converted integer value",
188
+ "value": "2"
189
+ }
190
+ ],
191
+ "init": {
192
+ "inputs": {
193
+ "from_base": "10",
194
+ "to_base": "10"
195
+ },
196
+ "outputs": {}
197
+ },
198
+ "narrative": "A cypher translation manual. It requires input from the dusty evidence ledger to decode the numerical anomalies found within."
199
+ },
200
+ {
201
+ "id": "calc_gcd",
202
+ "name": "BigInt GCD Calculator",
203
+ "description": "Greatest common divisor of two large decimal integers.",
204
+ "type": "Tool",
205
+ "template_id": "calc_gcd",
206
+ "initial_visible": true,
207
+ "is_revealed": true,
208
+ "inputs": [
209
+ {
210
+ "name": "a",
211
+ "type": "Big_Int",
212
+ "description": "First integer",
213
+ "value": 472456355
214
+ },
215
+ {
216
+ "name": "b",
217
+ "type": "Big_Int",
218
+ "description": "Second integer",
219
+ "value": "2"
220
+ }
221
+ ],
222
+ "outputs": [
223
+ {
224
+ "name": "gcd",
225
+ "type": "Big_Int",
226
+ "description": "GCD result",
227
+ "value": "1"
228
+ }
229
+ ],
230
+ "narrative": "A forensic comparator tool. It requires inputs from both the dusty evidence ledger and the recovered suspect's hard drive to find overlapping patterns."
231
+ },
232
+ {
233
+ "id": "calc_gcd_1aa3",
234
+ "name": "BigInt GCD Calculator",
235
+ "description": "Greatest common divisor of two large decimal integers.",
236
+ "type": "Tool",
237
+ "template_id": "calc_gcd",
238
+ "initial_visible": true,
239
+ "is_revealed": true,
240
+ "inputs": [
241
+ {
242
+ "name": "a",
243
+ "type": "Big_Int",
244
+ "description": "First integer",
245
+ "value": "837462519283746501928374"
246
+ },
247
+ {
248
+ "name": "b",
249
+ "type": "Big_Int",
250
+ "description": "Second integer",
251
+ "value": "291837465029183746501928"
252
+ }
253
+ ],
254
+ "outputs": [
255
+ {
256
+ "name": "gcd",
257
+ "type": "Big_Int",
258
+ "description": "GCD result",
259
+ "value": "2"
260
+ }
261
+ ],
262
+ "init": {
263
+ "inputs": {
264
+ "a": "837462519283746501928374",
265
+ "b": "291837465029183746501928"
266
+ },
267
+ "outputs": {}
268
+ },
269
+ "narrative": "A dusty evidence ledger containing a list of transaction records and encrypted timestamps from the night of the crime."
270
+ },
271
+ {
272
+ "id": "checksum_crc32",
273
+ "name": "CRC32 Checksum",
274
+ "description": "CRC32 over hex bytes.",
275
+ "type": "Tool",
276
+ "template_id": "checksum_crc32",
277
+ "initial_visible": true,
278
+ "is_revealed": true,
279
+ "inputs": [
280
+ {
281
+ "name": "trigger_item",
282
+ "type": "Item",
283
+ "description": "Required item to unlock this tool"
284
+ },
285
+ {
286
+ "name": "hex",
287
+ "type": "Hex_String",
288
+ "description": "Hex data",
289
+ "value": "48656c6c6f20576f726c6421"
290
+ }
291
+ ],
292
+ "outputs": [
293
+ {
294
+ "name": "hex",
295
+ "type": "Hex_String",
296
+ "description": "CRC32 Hex",
297
+ "value": "1c291ca3"
298
+ },
299
+ {
300
+ "name": "int",
301
+ "type": "Big_Int",
302
+ "description": "CRC32 Int",
303
+ "value": 472456355
304
+ }
305
+ ],
306
+ "init": {
307
+ "inputs": {
308
+ "hex": "48656c6c6f20576f726c6421"
309
+ },
310
+ "outputs": {}
311
+ },
312
+ "narrative": "A recovered suspect's hard drive. The cyber division managed to extract some corrupted digital data streams from its memory."
313
+ }
314
+ ],
315
+ "edges": [
316
+ {
317
+ "source_id": "num_base_convert",
318
+ "target_id": "calc_modexp",
319
+ "connection_type": "Big_Int",
320
+ "source_port": "str",
321
+ "target_port": "exp"
322
+ },
323
+ {
324
+ "source_id": "calc_gcd",
325
+ "target_id": "calc_modexp",
326
+ "connection_type": "Big_Int",
327
+ "source_port": "gcd",
328
+ "target_port": "base"
329
+ },
330
+ {
331
+ "source_id": "calc_gcd_1aa3",
332
+ "target_id": "calc_gcd",
333
+ "connection_type": "Big_Int",
334
+ "source_port": "gcd",
335
+ "target_port": "b"
336
+ },
337
+ {
338
+ "source_id": "calc_gcd_1aa3",
339
+ "target_id": "num_base_convert",
340
+ "connection_type": "Big_Int",
341
+ "source_port": "gcd",
342
+ "target_port": "s"
343
+ },
344
+ {
345
+ "source_id": "checksum_crc32",
346
+ "target_id": "calc_gcd",
347
+ "connection_type": "Big_Int",
348
+ "source_port": "int",
349
+ "target_port": "a"
350
+ }
351
+ ]
352
+ }
data/questions/5/narrative/skeleton_b3bd6e5d_narrative.json ADDED
@@ -0,0 +1,322 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 4,
5
+ "win_node_id": "item_2",
6
+ "win_condition": {
7
+ "type": "item_content",
8
+ "node_id": "item_2",
9
+ "description": "Obtain the content of "
10
+ },
11
+ "source_init": {
12
+ "source_nodes": [
13
+ "item_2",
14
+ "graph_shortest_path",
15
+ "zip_unzip_file"
16
+ ],
17
+ "by_node": {
18
+ "item_2": {
19
+ "node_name": "",
20
+ "node_type": "Item",
21
+ "template_id": "item_2",
22
+ "init_inputs": {},
23
+ "init_outputs": {
24
+ "content": {
25
+ "type": "Text_Generic",
26
+ "description": "The text"
27
+ }
28
+ }
29
+ },
30
+ "graph_shortest_path": {
31
+ "node_name": "Shortest Path Finder",
32
+ "node_type": "Tool",
33
+ "template_id": "graph_shortest_path",
34
+ "init_inputs": {
35
+ "src": {
36
+ "type": "Text_Generic",
37
+ "description": "Source node"
38
+ },
39
+ "dst": {
40
+ "type": "Text_Generic",
41
+ "description": "Destination node"
42
+ }
43
+ },
44
+ "init_outputs": {
45
+ "path": {
46
+ "type": "Text_Generic",
47
+ "description": "Path list"
48
+ },
49
+ "cost": {
50
+ "type": "Big_Int",
51
+ "description": "Path cost"
52
+ }
53
+ }
54
+ },
55
+ "zip_unzip_file": {
56
+ "node_name": "Zip Unzipper",
57
+ "node_type": "Tool",
58
+ "template_id": "zip_unzip_file",
59
+ "init_inputs": {
60
+ "zip_id": {
61
+ "type": "File_Id",
62
+ "description": "Zip file ID"
63
+ },
64
+ "password": {
65
+ "type": "Text_Generic",
66
+ "description": "Password"
67
+ }
68
+ },
69
+ "init_outputs": {
70
+ "files": {
71
+ "type": "File_Id",
72
+ "description": "Extracted file ID"
73
+ }
74
+ }
75
+ }
76
+ }
77
+ },
78
+ "initial_values": {
79
+ "item_2": {
80
+ "init_inputs": {},
81
+ "init_outputs": {
82
+ "content": "0x4C6F636B 0x446F776E"
83
+ }
84
+ },
85
+ "graph_shortest_path": {
86
+ "init_inputs": {
87
+ "src": "Alpha_Node_Start",
88
+ "dst": "Omega_Node_End"
89
+ },
90
+ "init_outputs": {
91
+ "path": "[\"Alpha_Node_Start\", \"Relay_Station_01\", \"Data_Link_Aux\", \"Core_Router_5\", \"Security_Gate_B\", \"Omega_Node_End\"]",
92
+ "cost": "48291038475629103847"
93
+ }
94
+ },
95
+ "zip_unzip_file": {
96
+ "init_inputs": {
97
+ "zip_id": "secure_logs_archive.zip",
98
+ "password": "CorrectHorseBatteryStaple"
99
+ },
100
+ "init_outputs": {
101
+ "files": "topology_data.json"
102
+ }
103
+ }
104
+ },
105
+ "intro_narrative": "The rain beats against the grimy windows of the abandoned warehouse—the suspected hideout of the infamous 'Phantom' burglar. You, the lead detective of the precinct's special investigations unit, have finally tracked them here. The suspect has fled, leaving behind a chaotic mess of digital records and strange physical artifacts. Your objective is to navigate this makeshift laboratory and uncover the final piece of evidence that reveals their true identity and next target. The precinct has left you a few advanced forensic tools to aid your investigation. You must carefully analyze the encrypted digital files, trace the suspect's movements across the city grid, and piece together the fragmented clues. Time is of the essence; the Phantom's trail goes cold in a matter of hours. Use your wits to operate the terminal systems and unlock the secrets hidden within this room. The final truth awaits in the shadows.",
106
+ "narrative_style": "detective"
107
+ },
108
+ "nodes": [
109
+ {
110
+ "id": "item_2",
111
+ "name": "",
112
+ "description": "",
113
+ "type": "Item",
114
+ "template_id": "item_2",
115
+ "initial_visible": false,
116
+ "is_revealed": false,
117
+ "inputs": [
118
+ {
119
+ "name": "container",
120
+ "type": "Hidden_Item",
121
+ "description": "Inside"
122
+ }
123
+ ],
124
+ "outputs": [
125
+ {
126
+ "name": "content",
127
+ "type": "Text_Generic",
128
+ "description": "The text",
129
+ "value": "0x4C6F636B 0x446F776E"
130
+ }
131
+ ],
132
+ "init": {
133
+ "inputs": {},
134
+ "outputs": {
135
+ "content": "0x4C6F636B 0x446F776E"
136
+ }
137
+ },
138
+ "narrative": "A heavy steel evidence safe secured with an electronic lock."
139
+ },
140
+ {
141
+ "id": "item_16",
142
+ "name": "",
143
+ "description": "",
144
+ "type": "Item",
145
+ "template_id": "item_16",
146
+ "initial_visible": false,
147
+ "is_revealed": false,
148
+ "inputs": [
149
+ {
150
+ "name": "source_tool",
151
+ "type": "Item",
152
+ "description": "Produced by",
153
+ "value": "synthesized_item_aad3c7227f744daf"
154
+ }
155
+ ],
156
+ "outputs": [
157
+ {
158
+ "name": "content",
159
+ "type": "Hidden_Item",
160
+ "description": "Timezone text"
161
+ }
162
+ ],
163
+ "narrative": "A mysterious silver pocket watch found at the crime scene."
164
+ },
165
+ {
166
+ "id": "matter_synthesizer",
167
+ "name": "Matter Synthesizer",
168
+ "description": "Synthesizes physical objects from data blueprints.",
169
+ "type": "Tool",
170
+ "template_id": "matter_synthesizer",
171
+ "initial_visible": true,
172
+ "is_revealed": true,
173
+ "inputs": [
174
+ {
175
+ "name": "blueprint",
176
+ "type": "Text_Generic",
177
+ "description": "Object Blueprint",
178
+ "value": "[\"Alpha_Node_Start\", \"Relay_Station_01\", \"Data_Link_Aux\", \"Core_Router_5\", \"Security_Gate_B\", \"Omega_Node_End\"]"
179
+ }
180
+ ],
181
+ "outputs": [
182
+ {
183
+ "name": "output_slot",
184
+ "type": "Item",
185
+ "description": "Synthesized Object",
186
+ "value": "synthesized_item_aad3c7227f744daf"
187
+ }
188
+ ],
189
+ "narrative": "An advanced 3D evidence fabricator. It requires input from the city grid analyzer."
190
+ },
191
+ {
192
+ "id": "graph_shortest_path",
193
+ "name": "Shortest Path Finder",
194
+ "description": "Shortest path on graph json file with edges list.",
195
+ "type": "Tool",
196
+ "template_id": "graph_shortest_path",
197
+ "initial_visible": true,
198
+ "is_revealed": true,
199
+ "inputs": [
200
+ {
201
+ "name": "file_id",
202
+ "type": "File_Id",
203
+ "description": "Graph JSON file ID",
204
+ "value": "topology_data.json"
205
+ },
206
+ {
207
+ "name": "src",
208
+ "type": "Text_Generic",
209
+ "description": "Source node",
210
+ "value": "Alpha_Node_Start"
211
+ },
212
+ {
213
+ "name": "dst",
214
+ "type": "Text_Generic",
215
+ "description": "Destination node",
216
+ "value": "Omega_Node_End"
217
+ }
218
+ ],
219
+ "outputs": [
220
+ {
221
+ "name": "path",
222
+ "type": "Text_Generic",
223
+ "description": "Path list",
224
+ "value": "[\"Alpha_Node_Start\", \"Relay_Station_01\", \"Data_Link_Aux\", \"Core_Router_5\", \"Security_Gate_B\", \"Omega_Node_End\"]"
225
+ },
226
+ {
227
+ "name": "cost",
228
+ "type": "Big_Int",
229
+ "description": "Path cost",
230
+ "value": "48291038475629103847"
231
+ }
232
+ ],
233
+ "init": {
234
+ "inputs": {
235
+ "src": "Alpha_Node_Start",
236
+ "dst": "Omega_Node_End"
237
+ },
238
+ "outputs": {
239
+ "path": "[\"Alpha_Node_Start\", \"Relay_Station_01\", \"Data_Link_Aux\", \"Core_Router_5\", \"Security_Gate_B\", \"Omega_Node_End\"]",
240
+ "cost": "48291038475629103847"
241
+ }
242
+ },
243
+ "narrative": "A sophisticated city grid analyzer. It requires input from the forensic decryption terminal."
244
+ },
245
+ {
246
+ "id": "zip_unzip_file",
247
+ "name": "Zip Unzipper",
248
+ "description": "Unzip a password-protected zip file by id.",
249
+ "type": "Tool",
250
+ "template_id": "zip_unzip_file",
251
+ "initial_visible": true,
252
+ "is_revealed": true,
253
+ "inputs": [
254
+ {
255
+ "name": "trigger_hidden",
256
+ "type": "Hidden_Item",
257
+ "description": "Hidden item required to unlock this tool"
258
+ },
259
+ {
260
+ "name": "zip_id",
261
+ "type": "File_Id",
262
+ "description": "Zip file ID",
263
+ "value": "secure_logs_archive.zip"
264
+ },
265
+ {
266
+ "name": "password",
267
+ "type": "Text_Generic",
268
+ "description": "Password",
269
+ "value": "CorrectHorseBatteryStaple"
270
+ }
271
+ ],
272
+ "outputs": [
273
+ {
274
+ "name": "files",
275
+ "type": "File_Id",
276
+ "description": "Extracted file ID",
277
+ "value": "topology_data.json"
278
+ }
279
+ ],
280
+ "init": {
281
+ "inputs": {
282
+ "zip_id": "secure_logs_archive.zip",
283
+ "password": "CorrectHorseBatteryStaple"
284
+ },
285
+ "outputs": {
286
+ "files": "topology_data.json"
287
+ }
288
+ },
289
+ "narrative": "A specialized forensic decryption terminal used by the precinct."
290
+ }
291
+ ],
292
+ "edges": [
293
+ {
294
+ "source_id": "item_16",
295
+ "target_id": "item_2",
296
+ "connection_type": "Hidden_Item",
297
+ "source_port": "content",
298
+ "target_port": "container"
299
+ },
300
+ {
301
+ "source_id": "matter_synthesizer",
302
+ "target_id": "item_16",
303
+ "connection_type": "Item",
304
+ "source_port": "output_slot",
305
+ "target_port": "source_tool"
306
+ },
307
+ {
308
+ "source_id": "graph_shortest_path",
309
+ "target_id": "matter_synthesizer",
310
+ "connection_type": "Text_Generic",
311
+ "source_port": "path",
312
+ "target_port": "blueprint"
313
+ },
314
+ {
315
+ "source_id": "zip_unzip_file",
316
+ "target_id": "graph_shortest_path",
317
+ "connection_type": "File_Id",
318
+ "source_port": "files",
319
+ "target_port": "file_id"
320
+ }
321
+ ]
322
+ }
data/questions/5/narrative/skeleton_bb6f4cdf_narrative.json ADDED
@@ -0,0 +1,368 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 4,
5
+ "win_node_id": "item_1",
6
+ "win_condition": {
7
+ "type": "item_content",
8
+ "node_id": "item_1",
9
+ "description": "Obtain the content of "
10
+ },
11
+ "source_init": {
12
+ "source_nodes": [
13
+ "item_1",
14
+ "terminal_2",
15
+ "calc_bigmul",
16
+ "terminal_2_2622"
17
+ ],
18
+ "by_node": {
19
+ "item_1": {
20
+ "node_name": "",
21
+ "node_type": "Item",
22
+ "template_id": "item_1",
23
+ "init_inputs": {},
24
+ "init_outputs": {
25
+ "content": {
26
+ "type": "Big_Int",
27
+ "description": "The number"
28
+ }
29
+ }
30
+ },
31
+ "terminal_2": {
32
+ "node_name": "",
33
+ "node_type": "Tool",
34
+ "template_id": "terminal_2",
35
+ "init_inputs": {
36
+ "num1": {
37
+ "type": "Big_Int",
38
+ "description": "First Number"
39
+ }
40
+ },
41
+ "init_outputs": {
42
+ "text_result": {
43
+ "type": "Text_Generic",
44
+ "description": "Text result for partial input"
45
+ },
46
+ "hex_result": {
47
+ "type": "Hex_String",
48
+ "description": "Hexadecimal result when both inputs provided"
49
+ }
50
+ }
51
+ },
52
+ "calc_bigmul": {
53
+ "node_name": "Big Number Multiplier",
54
+ "node_type": "Tool",
55
+ "template_id": "calc_bigmul",
56
+ "init_inputs": {
57
+ "a": {
58
+ "type": "Big_Int",
59
+ "description": "First large integer"
60
+ },
61
+ "b": {
62
+ "type": "Big_Int",
63
+ "description": "Second large integer"
64
+ }
65
+ },
66
+ "init_outputs": {}
67
+ },
68
+ "terminal_2_2622": {
69
+ "node_name": "",
70
+ "node_type": "Tool",
71
+ "template_id": "terminal_2",
72
+ "init_inputs": {
73
+ "num1": {
74
+ "type": "Big_Int",
75
+ "description": "First Number"
76
+ },
77
+ "num2": {
78
+ "type": "Big_Int",
79
+ "description": "Second Number"
80
+ }
81
+ },
82
+ "init_outputs": {
83
+ "text_result": {
84
+ "type": "Text_Generic",
85
+ "description": "Text result for partial input"
86
+ },
87
+ "hex_result": {
88
+ "type": "Hex_String",
89
+ "description": "Hexadecimal result when both inputs provided"
90
+ }
91
+ }
92
+ }
93
+ }
94
+ },
95
+ "initial_values": {
96
+ "item_1": {
97
+ "init_inputs": {},
98
+ "init_outputs": {
99
+ "content": "5829103847562938475610293"
100
+ }
101
+ },
102
+ "terminal_2": {
103
+ "init_inputs": {
104
+ "num1": "2938475610293847562938475"
105
+ },
106
+ "init_outputs": {
107
+ "text_result": "Calculation result pending final variable integration.",
108
+ "hex_result": "1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d"
109
+ }
110
+ },
111
+ "calc_bigmul": {
112
+ "init_inputs": {
113
+ "a": "9485726351425364758697081",
114
+ "b": "1029384756102938475610293"
115
+ },
116
+ "init_outputs": {}
117
+ },
118
+ "terminal_2_2622": {
119
+ "init_inputs": {
120
+ "num1": "6574839201928374650192837",
121
+ "num2": "4758693021847563920184756"
122
+ },
123
+ "init_outputs": {
124
+ "text_result": "Initialization sequence complete. Ready for trigger.",
125
+ "hex_result": "f0e1d2c3b4a5968778695a4b3c2d1e0f"
126
+ }
127
+ }
128
+ },
129
+ "intro_narrative": "The rain drums relentlessly against the reinforced glass of the server tower. You've breached the perimeter of the Synapse Corporation's restricted archive, a place where secrets are buried deep within layers of ICE and concrete. The air smells of ozone and stale coffee. Your objective is clear: locate the legendary Black Box and extract the payload hidden within. The room is filled with humming server racks and blinking terminals. You need to manipulate the data flow between these ancient systems to bypass the security protocols. Time is short; the corporate security daemons are already sniffing around your connection.",
130
+ "narrative_style": "cyberpunk"
131
+ },
132
+ "nodes": [
133
+ {
134
+ "id": "item_1",
135
+ "name": "",
136
+ "description": "",
137
+ "type": "Item",
138
+ "template_id": "item_1",
139
+ "initial_visible": false,
140
+ "is_revealed": false,
141
+ "inputs": [
142
+ {
143
+ "name": "container",
144
+ "type": "Hidden_Item",
145
+ "description": "Inside"
146
+ }
147
+ ],
148
+ "outputs": [
149
+ {
150
+ "name": "content",
151
+ "type": "Big_Int",
152
+ "description": "The number",
153
+ "value": "5829103847562938475610293"
154
+ }
155
+ ],
156
+ "init": {
157
+ "inputs": {},
158
+ "outputs": {
159
+ "content": "5829103847562938475610293"
160
+ }
161
+ },
162
+ "narrative": "The Black Box. A heavy, matte-black physical storage unit sitting isolated on a pedestal. It awaits a specific physical key to unlock its contents."
163
+ },
164
+ {
165
+ "id": "item_16",
166
+ "name": "",
167
+ "description": "",
168
+ "type": "Item",
169
+ "template_id": "item_16",
170
+ "initial_visible": false,
171
+ "is_revealed": false,
172
+ "inputs": [
173
+ {
174
+ "name": "source_tool",
175
+ "type": "Item",
176
+ "description": "Produced by"
177
+ }
178
+ ],
179
+ "outputs": [
180
+ {
181
+ "name": "content",
182
+ "type": "Hidden_Item",
183
+ "description": "Timezone text"
184
+ }
185
+ ],
186
+ "narrative": "A Time-Sync Module. A portable hardware component that stores encrypted temporal data."
187
+ },
188
+ {
189
+ "id": "terminal_2",
190
+ "name": "",
191
+ "description": "",
192
+ "type": "Tool",
193
+ "template_id": "terminal_2",
194
+ "initial_visible": false,
195
+ "is_revealed": false,
196
+ "inputs": [
197
+ {
198
+ "name": "trigger_item",
199
+ "type": "Item",
200
+ "description": "Required item to unlock this terminal"
201
+ },
202
+ {
203
+ "name": "num1",
204
+ "type": "Big_Int",
205
+ "description": "First Number",
206
+ "value": "2938475610293847562938475"
207
+ },
208
+ {
209
+ "name": "num2",
210
+ "type": "Big_Int",
211
+ "description": "Second Number",
212
+ "value": "9764462106721215565014507119866696639770992654733"
213
+ }
214
+ ],
215
+ "outputs": [
216
+ {
217
+ "name": "text_result",
218
+ "type": "Text_Generic",
219
+ "description": "Text result for partial input",
220
+ "value": "Calculation result pending final variable integration."
221
+ },
222
+ {
223
+ "name": "hex_result",
224
+ "type": "Hex_String",
225
+ "description": "Hexadecimal result when both inputs provided",
226
+ "value": "1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d"
227
+ },
228
+ {
229
+ "name": "math_token",
230
+ "type": "Item",
231
+ "description": "Mathematics token when both inputs provided"
232
+ }
233
+ ],
234
+ "init": {
235
+ "inputs": {
236
+ "num1": "2938475610293847562938475"
237
+ },
238
+ "outputs": {
239
+ "text_result": "Calculation result pending final variable integration.",
240
+ "hex_result": "1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d"
241
+ }
242
+ },
243
+ "narrative": "The Central Gatekeeper Terminal. This is the primary security hub for the sector. It requires processed data input from the Quantum Arithmetic Unit to verify the encryption sequence."
244
+ },
245
+ {
246
+ "id": "calc_bigmul",
247
+ "name": "Big Number Multiplier",
248
+ "description": "Multiply two (very large) decimal integers represented as strings.",
249
+ "type": "Tool",
250
+ "template_id": "calc_bigmul",
251
+ "initial_visible": true,
252
+ "is_revealed": true,
253
+ "inputs": [
254
+ {
255
+ "name": "a",
256
+ "type": "Big_Int",
257
+ "description": "First large integer",
258
+ "value": "9485726351425364758697081"
259
+ },
260
+ {
261
+ "name": "b",
262
+ "type": "Big_Int",
263
+ "description": "Second large integer",
264
+ "value": "1029384756102938475610293"
265
+ }
266
+ ],
267
+ "outputs": [
268
+ {
269
+ "name": "product",
270
+ "type": "Big_Int",
271
+ "description": "Product result",
272
+ "value": "9764462106721215565014507119866696639770992654733"
273
+ }
274
+ ],
275
+ "init": {
276
+ "inputs": {
277
+ "a": "9485726351425364758697081",
278
+ "b": "1029384756102938475610293"
279
+ },
280
+ "outputs": {}
281
+ },
282
+ "narrative": "The Quantum Arithmetic Unit. A high-power cooling fan spins rapidly inside this dedicated calculation rig. It is designed to multiply massive data streams that standard processors cannot handle."
283
+ },
284
+ {
285
+ "id": "terminal_2_2622",
286
+ "name": "",
287
+ "description": "",
288
+ "type": "Tool",
289
+ "template_id": "terminal_2",
290
+ "initial_visible": true,
291
+ "is_revealed": true,
292
+ "inputs": [
293
+ {
294
+ "name": "num1",
295
+ "type": "Big_Int",
296
+ "description": "First Number",
297
+ "value": "6574839201928374650192837"
298
+ },
299
+ {
300
+ "name": "num2",
301
+ "type": "Big_Int",
302
+ "description": "Second Number",
303
+ "value": "4758693021847563920184756"
304
+ }
305
+ ],
306
+ "outputs": [
307
+ {
308
+ "name": "text_result",
309
+ "type": "Text_Generic",
310
+ "description": "Text result for partial input",
311
+ "value": "Initialization sequence complete. Ready for trigger."
312
+ },
313
+ {
314
+ "name": "hex_result",
315
+ "type": "Hex_String",
316
+ "description": "Hexadecimal result when both inputs provided",
317
+ "value": "f0e1d2c3b4a5968778695a4b3c2d1e0f"
318
+ },
319
+ {
320
+ "name": "math_token",
321
+ "type": "Item",
322
+ "description": "Mathematics token when both inputs provided"
323
+ }
324
+ ],
325
+ "init": {
326
+ "inputs": {
327
+ "num1": "6574839201928374650192837",
328
+ "num2": "4758693021847563920184756"
329
+ },
330
+ "outputs": {
331
+ "text_result": "Initialization sequence complete. Ready for trigger.",
332
+ "hex_result": "f0e1d2c3b4a5968778695a4b3c2d1e0f"
333
+ }
334
+ },
335
+ "narrative": "A Local Access Node. An older, flickering terminal mounted on the wall. It controls the preliminary authentication tokens for the room's subsystems."
336
+ }
337
+ ],
338
+ "edges": [
339
+ {
340
+ "source_id": "item_16",
341
+ "target_id": "item_1",
342
+ "connection_type": "Hidden_Item",
343
+ "source_port": "content",
344
+ "target_port": "container"
345
+ },
346
+ {
347
+ "source_id": "terminal_2",
348
+ "target_id": "item_16",
349
+ "connection_type": "Item",
350
+ "source_port": "math_token",
351
+ "target_port": "source_tool"
352
+ },
353
+ {
354
+ "source_id": "calc_bigmul",
355
+ "target_id": "terminal_2",
356
+ "connection_type": "Big_Int",
357
+ "source_port": "product",
358
+ "target_port": "num2"
359
+ },
360
+ {
361
+ "source_id": "terminal_2_2622",
362
+ "target_id": "terminal_2",
363
+ "connection_type": "Item",
364
+ "source_port": "math_token",
365
+ "target_port": "trigger_item"
366
+ }
367
+ ]
368
+ }
data/questions/5/narrative/skeleton_bf2b9442_narrative.json ADDED
@@ -0,0 +1,345 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 4,
5
+ "win_node_id": "item_15",
6
+ "win_condition": {
7
+ "type": "item_content",
8
+ "node_id": "item_15",
9
+ "description": "Obtain the content of "
10
+ },
11
+ "source_init": {
12
+ "source_nodes": [
13
+ "item_15",
14
+ "zip_unzip_item",
15
+ "zip_unzip_file",
16
+ "hex_decode",
17
+ "zip_unzip_file_71c2"
18
+ ],
19
+ "by_node": {
20
+ "item_15": {
21
+ "node_name": "",
22
+ "node_type": "Item",
23
+ "template_id": "item_15",
24
+ "init_inputs": {},
25
+ "init_outputs": {
26
+ "content": {
27
+ "type": "Text_Generic",
28
+ "description": "Timezone text"
29
+ }
30
+ }
31
+ },
32
+ "zip_unzip_item": {
33
+ "node_name": "Zip Unzipper",
34
+ "node_type": "Tool",
35
+ "template_id": "zip_unzip_item",
36
+ "init_inputs": {
37
+ "password": {
38
+ "type": "Text_Generic",
39
+ "description": "Password"
40
+ }
41
+ },
42
+ "init_outputs": {}
43
+ },
44
+ "zip_unzip_file": {
45
+ "node_name": "Zip Unzipper",
46
+ "node_type": "Tool",
47
+ "template_id": "zip_unzip_file",
48
+ "init_inputs": {},
49
+ "init_outputs": {
50
+ "files": {
51
+ "type": "File_Id",
52
+ "description": "Extracted file ID"
53
+ }
54
+ }
55
+ },
56
+ "hex_decode": {
57
+ "node_name": "Hex to Text Decoder",
58
+ "node_type": "Tool",
59
+ "template_id": "hex_decode",
60
+ "init_inputs": {
61
+ "hex": {
62
+ "type": "Hex_String",
63
+ "description": "Hex string"
64
+ }
65
+ },
66
+ "init_outputs": {}
67
+ },
68
+ "zip_unzip_file_71c2": {
69
+ "node_name": "Zip Unzipper",
70
+ "node_type": "Tool",
71
+ "template_id": "zip_unzip_file",
72
+ "init_inputs": {
73
+ "zip_id": {
74
+ "type": "File_Id",
75
+ "description": "Zip file ID"
76
+ },
77
+ "password": {
78
+ "type": "Text_Generic",
79
+ "description": "Password"
80
+ }
81
+ },
82
+ "init_outputs": {
83
+ "files": {
84
+ "type": "File_Id",
85
+ "description": "Extracted file ID"
86
+ }
87
+ }
88
+ }
89
+ }
90
+ },
91
+ "initial_values": {
92
+ "item_15": {
93
+ "init_inputs": {},
94
+ "init_outputs": {
95
+ "content": "Elysium/Lethe"
96
+ }
97
+ },
98
+ "zip_unzip_item": {
99
+ "init_inputs": {
100
+ "password": "BlueSky$8821"
101
+ },
102
+ "init_outputs": {}
103
+ },
104
+ "zip_unzip_file": {
105
+ "init_inputs": {},
106
+ "init_outputs": {
107
+ "files": "payload_v2.zip"
108
+ }
109
+ },
110
+ "hex_decode": {
111
+ "init_inputs": {
112
+ "hex": "70617373776f7264313233"
113
+ },
114
+ "init_outputs": {}
115
+ },
116
+ "zip_unzip_file_71c2": {
117
+ "init_inputs": {
118
+ "zip_id": "backup_2023.zip",
119
+ "password": "Admin@12345"
120
+ },
121
+ "init_outputs": {
122
+ "files": "encrypted_data_shard.zip"
123
+ }
124
+ }
125
+ },
126
+ "intro_narrative": "The ash storms have battered Sector 4 for weeks, and the outpost's life support systems are on the verge of total failure. As a scavenger who just breached an abandoned subterranean military command center, your only hope is to discover the launch window coordinates for the last remaining automated shuttle. The facility has been locked down and left to decay since the Great Collapse, with its mainframes heavily encrypted to prevent unauthorized access. The air grows stale, and the faint hum of failing generators reminds you that time is running out. To survive, you must sift through the remnants of the command center, interact with the surviving data terminals, and restore the extraction protocols before the radiation shields give out completely. Your ultimate goal is to find the exact timezone logs required to board the shuttle and escape this dying wasteland.",
127
+ "narrative_style": "post_apocalyptic"
128
+ },
129
+ "nodes": [
130
+ {
131
+ "id": "item_15",
132
+ "name": "",
133
+ "description": "",
134
+ "type": "Item",
135
+ "template_id": "item_15",
136
+ "initial_visible": false,
137
+ "is_revealed": false,
138
+ "inputs": [
139
+ {
140
+ "name": "source_tool",
141
+ "type": "Item",
142
+ "description": "Produced by"
143
+ }
144
+ ],
145
+ "outputs": [
146
+ {
147
+ "name": "content",
148
+ "type": "Text_Generic",
149
+ "description": "Timezone text",
150
+ "value": "Elysium/Lethe"
151
+ }
152
+ ],
153
+ "init": {
154
+ "inputs": {},
155
+ "outputs": {
156
+ "content": "Elysium/Lethe"
157
+ }
158
+ },
159
+ "narrative": "A weathered datapad containing the critical timezone logs needed to sync with the evacuation shuttle."
160
+ },
161
+ {
162
+ "id": "zip_unzip_item",
163
+ "name": "Zip Unzipper",
164
+ "description": "Unzip a password-protected zip file by id.",
165
+ "type": "Tool",
166
+ "template_id": "zip_unzip_item",
167
+ "initial_visible": true,
168
+ "is_revealed": true,
169
+ "inputs": [
170
+ {
171
+ "name": "trigger_hidden",
172
+ "type": "Hidden_Item",
173
+ "description": "Hidden item required to unlock this tool"
174
+ },
175
+ {
176
+ "name": "zip_id",
177
+ "type": "File_Id",
178
+ "description": "Zip file ID",
179
+ "value": "payload_v2.zip"
180
+ },
181
+ {
182
+ "name": "password",
183
+ "type": "Text_Generic",
184
+ "description": "Password",
185
+ "value": "BlueSky$8821"
186
+ }
187
+ ],
188
+ "outputs": [
189
+ {
190
+ "name": "item",
191
+ "type": "Item",
192
+ "description": "item in the zip"
193
+ }
194
+ ],
195
+ "init": {
196
+ "inputs": {
197
+ "password": "BlueSky$8821"
198
+ },
199
+ "outputs": {}
200
+ },
201
+ "narrative": "This is the physical matter reassembler. It requires input from the secondary decryption mainframe to reconstruct the salvaged components."
202
+ },
203
+ {
204
+ "id": "zip_unzip_file",
205
+ "name": "Zip Unzipper",
206
+ "description": "Unzip a password-protected zip file by id.",
207
+ "type": "Tool",
208
+ "template_id": "zip_unzip_file",
209
+ "initial_visible": true,
210
+ "is_revealed": true,
211
+ "inputs": [
212
+ {
213
+ "name": "zip_id",
214
+ "type": "File_Id",
215
+ "description": "Zip file ID",
216
+ "value": "encrypted_data_shard.zip"
217
+ },
218
+ {
219
+ "name": "password",
220
+ "type": "Text_Generic",
221
+ "description": "Password",
222
+ "value": "password123"
223
+ }
224
+ ],
225
+ "outputs": [
226
+ {
227
+ "name": "files",
228
+ "type": "File_Id",
229
+ "description": "Extracted file ID",
230
+ "value": "payload_v2.zip"
231
+ }
232
+ ],
233
+ "init": {
234
+ "inputs": {},
235
+ "outputs": {
236
+ "files": "payload_v2.zip"
237
+ }
238
+ },
239
+ "narrative": "This is the secondary decryption mainframe. It requires inputs from both the signal transcriber and the primary archive extractor to process the corrupted data."
240
+ },
241
+ {
242
+ "id": "hex_decode",
243
+ "name": "Hex to Text Decoder",
244
+ "description": "Decode hex to UTF-8 text.",
245
+ "type": "Tool",
246
+ "template_id": "hex_decode",
247
+ "initial_visible": true,
248
+ "is_revealed": true,
249
+ "inputs": [
250
+ {
251
+ "name": "hex",
252
+ "type": "Hex_String",
253
+ "description": "Hex string",
254
+ "value": "70617373776f7264313233"
255
+ }
256
+ ],
257
+ "outputs": [
258
+ {
259
+ "name": "text",
260
+ "type": "Text_Generic",
261
+ "description": "Decoded text",
262
+ "value": "password123"
263
+ }
264
+ ],
265
+ "init": {
266
+ "inputs": {
267
+ "hex": "70617373776f7264313233"
268
+ },
269
+ "outputs": {}
270
+ },
271
+ "narrative": "An old military signal transcriber covered in dust."
272
+ },
273
+ {
274
+ "id": "zip_unzip_file_71c2",
275
+ "name": "Zip Unzipper",
276
+ "description": "Unzip a password-protected zip file by id.",
277
+ "type": "Tool",
278
+ "template_id": "zip_unzip_file",
279
+ "initial_visible": true,
280
+ "is_revealed": true,
281
+ "inputs": [
282
+ {
283
+ "name": "zip_id",
284
+ "type": "File_Id",
285
+ "description": "Zip file ID",
286
+ "value": "backup_2023.zip"
287
+ },
288
+ {
289
+ "name": "password",
290
+ "type": "Text_Generic",
291
+ "description": "Password",
292
+ "value": "Admin@12345"
293
+ }
294
+ ],
295
+ "outputs": [
296
+ {
297
+ "name": "files",
298
+ "type": "File_Id",
299
+ "description": "Extracted file ID",
300
+ "value": "encrypted_data_shard.zip"
301
+ }
302
+ ],
303
+ "init": {
304
+ "inputs": {
305
+ "zip_id": "backup_2023.zip",
306
+ "password": "Admin@12345"
307
+ },
308
+ "outputs": {
309
+ "files": "encrypted_data_shard.zip"
310
+ }
311
+ },
312
+ "narrative": "A heavy-duty primary archive extractor salvaged from a forgotten bunker."
313
+ }
314
+ ],
315
+ "edges": [
316
+ {
317
+ "source_id": "zip_unzip_item",
318
+ "target_id": "item_15",
319
+ "connection_type": "Item",
320
+ "source_port": "item",
321
+ "target_port": "source_tool"
322
+ },
323
+ {
324
+ "source_id": "zip_unzip_file",
325
+ "target_id": "zip_unzip_item",
326
+ "connection_type": "File_Id",
327
+ "source_port": "files",
328
+ "target_port": "zip_id"
329
+ },
330
+ {
331
+ "source_id": "hex_decode",
332
+ "target_id": "zip_unzip_file",
333
+ "connection_type": "Text_Generic",
334
+ "source_port": "text",
335
+ "target_port": "password"
336
+ },
337
+ {
338
+ "source_id": "zip_unzip_file_71c2",
339
+ "target_id": "zip_unzip_file",
340
+ "connection_type": "File_Id",
341
+ "source_port": "files",
342
+ "target_port": "zip_id"
343
+ }
344
+ ]
345
+ }
data/questions/5/narrative/skeleton_bf7732ba_narrative.json ADDED
@@ -0,0 +1,317 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 4,
5
+ "win_node_id": "item_3",
6
+ "win_condition": {
7
+ "type": "item_content",
8
+ "node_id": "item_3",
9
+ "description": "Obtain the content of "
10
+ },
11
+ "source_init": {
12
+ "source_nodes": [
13
+ "item_3",
14
+ "regex_search",
15
+ "regex_search_a4c4"
16
+ ],
17
+ "by_node": {
18
+ "item_3": {
19
+ "node_name": "",
20
+ "node_type": "Item",
21
+ "template_id": "item_3",
22
+ "init_inputs": {},
23
+ "init_outputs": {
24
+ "content": {
25
+ "type": "Hex_String",
26
+ "description": "The hex code"
27
+ }
28
+ }
29
+ },
30
+ "regex_search": {
31
+ "node_name": "Regex Search",
32
+ "node_type": "Tool",
33
+ "template_id": "regex_search",
34
+ "init_inputs": {
35
+ "pattern": {
36
+ "type": "Text_Generic",
37
+ "description": "Regex pattern"
38
+ },
39
+ "file_id": {
40
+ "type": "File_Id",
41
+ "description": "File ID (optional)"
42
+ }
43
+ },
44
+ "init_outputs": {
45
+ "matches": {
46
+ "type": "Text_Generic",
47
+ "description": "Found matches (List)"
48
+ }
49
+ }
50
+ },
51
+ "regex_search_a4c4": {
52
+ "node_name": "Regex Search",
53
+ "node_type": "Tool",
54
+ "template_id": "regex_search",
55
+ "init_inputs": {
56
+ "pattern": {
57
+ "type": "Text_Generic",
58
+ "description": "Regex pattern"
59
+ },
60
+ "file_id": {
61
+ "type": "File_Id",
62
+ "description": "File ID (optional)"
63
+ },
64
+ "text": {
65
+ "type": "Text_Generic",
66
+ "description": "Text (optional)"
67
+ }
68
+ },
69
+ "init_outputs": {
70
+ "matches": {
71
+ "type": "Text_Generic",
72
+ "description": "Found matches (List)"
73
+ }
74
+ }
75
+ }
76
+ }
77
+ },
78
+ "initial_values": {
79
+ "item_3": {
80
+ "init_inputs": {},
81
+ "init_outputs": {
82
+ "content": "8f2a1b9c3d4e5f60718293a4b5c6d7e8"
83
+ }
84
+ },
85
+ "regex_search": {
86
+ "init_inputs": {
87
+ "pattern": "blueprint_[A-Z]{3}_[0-9]{4}",
88
+ "file_id": "manufacturing_logs_v2.log"
89
+ },
90
+ "init_outputs": {
91
+ "matches": "[\"blueprint_EXT_9921\", \"blueprint_CORE_4821\", \"blueprint_ARM_1102\", \"blueprint_LEG_8833\", \"blueprint_HEAD_5521\"]"
92
+ }
93
+ },
94
+ "regex_search_a4c4": {
95
+ "init_inputs": {
96
+ "pattern": "error_code: [0-9]+",
97
+ "file_id": "debug_trace_2023.txt",
98
+ "text": "System failure at 0800. error_code: 503. Retry attempt. error_code: 404. Service restart. error_code: 200."
99
+ },
100
+ "init_outputs": {
101
+ "matches": "[\"error_code: 503\", \"error_code: 404\", \"error_code: 200\", \"error_code: 500\", \"error_code: 401\"]"
102
+ }
103
+ }
104
+ },
105
+ "intro_narrative": "Welcome to the Spire of the Lost Archmage. For centuries, this floating magical observatory has been sealed away, hiding the ultimate secret of arcane creation—a primordial hex code bound within a legendary tome. You are a seeker of forbidden knowledge who has finally breached the outer wards. The air hums with latent energy, and ancient magical instruments lie dormant, waiting to be awakened. Your objective is to unravel the ethereal clues left behind by the Archmage, weave raw data into physical artifacts, and ultimately extract the hidden code from the grand artifact at the heart of the room. Tread carefully, for the magic here is intertwined in complex chains of arcane resonance.",
106
+ "narrative_style": "fantasy"
107
+ },
108
+ "nodes": [
109
+ {
110
+ "id": "item_3",
111
+ "name": "",
112
+ "description": "",
113
+ "type": "Item",
114
+ "template_id": "item_3",
115
+ "initial_visible": false,
116
+ "is_revealed": false,
117
+ "inputs": [
118
+ {
119
+ "name": "container",
120
+ "type": "Hidden_Item",
121
+ "description": "Inside"
122
+ }
123
+ ],
124
+ "outputs": [
125
+ {
126
+ "name": "content",
127
+ "type": "Hex_String",
128
+ "description": "The hex code",
129
+ "value": "8f2a1b9c3d4e5f60718293a4b5c6d7e8"
130
+ }
131
+ ],
132
+ "init": {
133
+ "inputs": {},
134
+ "outputs": {
135
+ "content": "8f2a1b9c3d4e5f60718293a4b5c6d7e8"
136
+ }
137
+ },
138
+ "narrative": "A heavy, magically sealed grimoire. It pulses with a faint, ancient power and holds the final secret."
139
+ },
140
+ {
141
+ "id": "item_16",
142
+ "name": "",
143
+ "description": "",
144
+ "type": "Item",
145
+ "template_id": "item_16",
146
+ "initial_visible": false,
147
+ "is_revealed": false,
148
+ "inputs": [
149
+ {
150
+ "name": "source_tool",
151
+ "type": "Item",
152
+ "description": "Produced by",
153
+ "value": "synthesized_item_9045de9acf3ec1ec"
154
+ }
155
+ ],
156
+ "outputs": [
157
+ {
158
+ "name": "content",
159
+ "type": "Hidden_Item",
160
+ "description": "Timezone text"
161
+ }
162
+ ],
163
+ "narrative": "A shimmering chronos crystal that seems to capture the essence of different temporal realms."
164
+ },
165
+ {
166
+ "id": "matter_synthesizer",
167
+ "name": "Matter Synthesizer",
168
+ "description": "Synthesizes physical objects from data blueprints.",
169
+ "type": "Tool",
170
+ "template_id": "matter_synthesizer",
171
+ "initial_visible": true,
172
+ "is_revealed": true,
173
+ "inputs": [
174
+ {
175
+ "name": "blueprint",
176
+ "type": "Text_Generic",
177
+ "description": "Object Blueprint",
178
+ "value": "[\"blueprint_EXT_9921\", \"blueprint_CORE_4821\", \"blueprint_ARM_1102\", \"blueprint_LEG_8833\", \"blueprint_HEAD_5521\"]"
179
+ }
180
+ ],
181
+ "outputs": [
182
+ {
183
+ "name": "output_slot",
184
+ "type": "Item",
185
+ "description": "Synthesized Object",
186
+ "value": "synthesized_item_9045de9acf3ec1ec"
187
+ }
188
+ ],
189
+ "narrative": "This is the Creation Forge. It requires input from the Leyline Filter to weave pure ethereal energy into tangible, physical matter."
190
+ },
191
+ {
192
+ "id": "regex_search",
193
+ "name": "Regex Search",
194
+ "description": "Search regex in either raw text or a file.",
195
+ "type": "Tool",
196
+ "template_id": "regex_search",
197
+ "initial_visible": true,
198
+ "is_revealed": true,
199
+ "inputs": [
200
+ {
201
+ "name": "pattern",
202
+ "type": "Text_Generic",
203
+ "description": "Regex pattern",
204
+ "value": "blueprint_[A-Z]{3}_[0-9]{4}"
205
+ },
206
+ {
207
+ "name": "file_id",
208
+ "type": "File_Id",
209
+ "description": "File ID (optional)",
210
+ "value": "manufacturing_logs_v2.log"
211
+ },
212
+ {
213
+ "name": "text",
214
+ "type": "Text_Generic",
215
+ "description": "Text (optional)",
216
+ "value": "[\"error_code: 503\", \"error_code: 404\", \"error_code: 200\", \"error_code: 500\", \"error_code: 401\"]"
217
+ }
218
+ ],
219
+ "outputs": [
220
+ {
221
+ "name": "matches",
222
+ "type": "Text_Generic",
223
+ "description": "Found matches (List)",
224
+ "value": "[\"blueprint_EXT_9921\", \"blueprint_CORE_4821\", \"blueprint_ARM_1102\", \"blueprint_LEG_8833\", \"blueprint_HEAD_5521\"]"
225
+ }
226
+ ],
227
+ "init": {
228
+ "inputs": {
229
+ "pattern": "blueprint_[A-Z]{3}_[0-9]{4}",
230
+ "file_id": "manufacturing_logs_v2.log"
231
+ },
232
+ "outputs": {
233
+ "matches": "[\"blueprint_EXT_9921\", \"blueprint_CORE_4821\", \"blueprint_ARM_1102\", \"blueprint_LEG_8833\", \"blueprint_HEAD_5521\"]"
234
+ }
235
+ },
236
+ "narrative": "This is the Leyline Filter. It requires input from the Ancient Rune Decoder to isolate and sift through the correct magical frequencies."
237
+ },
238
+ {
239
+ "id": "regex_search_a4c4",
240
+ "name": "Regex Search",
241
+ "description": "Search regex in either raw text or a file.",
242
+ "type": "Tool",
243
+ "template_id": "regex_search",
244
+ "initial_visible": true,
245
+ "is_revealed": true,
246
+ "inputs": [
247
+ {
248
+ "name": "pattern",
249
+ "type": "Text_Generic",
250
+ "description": "Regex pattern",
251
+ "value": "error_code: [0-9]+"
252
+ },
253
+ {
254
+ "name": "file_id",
255
+ "type": "File_Id",
256
+ "description": "File ID (optional)",
257
+ "value": "debug_trace_2023.txt"
258
+ },
259
+ {
260
+ "name": "text",
261
+ "type": "Text_Generic",
262
+ "description": "Text (optional)",
263
+ "value": "System failure at 0800. error_code: 503. Retry attempt. error_code: 404. Service restart. error_code: 200."
264
+ }
265
+ ],
266
+ "outputs": [
267
+ {
268
+ "name": "matches",
269
+ "type": "Text_Generic",
270
+ "description": "Found matches (List)",
271
+ "value": "[\"error_code: 503\", \"error_code: 404\", \"error_code: 200\", \"error_code: 500\", \"error_code: 401\"]"
272
+ }
273
+ ],
274
+ "init": {
275
+ "inputs": {
276
+ "pattern": "error_code: [0-9]+",
277
+ "file_id": "debug_trace_2023.txt",
278
+ "text": "System failure at 0800. error_code: 503. Retry attempt. error_code: 404. Service restart. error_code: 200."
279
+ },
280
+ "outputs": {
281
+ "matches": "[\"error_code: 503\", \"error_code: 404\", \"error_code: 200\", \"error_code: 500\", \"error_code: 401\"]"
282
+ }
283
+ },
284
+ "narrative": "The Ancient Rune Decoder. A mystical brass lens used to scan vast magical texts for hidden arcane patterns."
285
+ }
286
+ ],
287
+ "edges": [
288
+ {
289
+ "source_id": "item_16",
290
+ "target_id": "item_3",
291
+ "connection_type": "Hidden_Item",
292
+ "source_port": "content",
293
+ "target_port": "container"
294
+ },
295
+ {
296
+ "source_id": "matter_synthesizer",
297
+ "target_id": "item_16",
298
+ "connection_type": "Item",
299
+ "source_port": "output_slot",
300
+ "target_port": "source_tool"
301
+ },
302
+ {
303
+ "source_id": "regex_search",
304
+ "target_id": "matter_synthesizer",
305
+ "connection_type": "Text_Generic",
306
+ "source_port": "matches",
307
+ "target_port": "blueprint"
308
+ },
309
+ {
310
+ "source_id": "regex_search_a4c4",
311
+ "target_id": "regex_search",
312
+ "connection_type": "Text_Generic",
313
+ "source_port": "matches",
314
+ "target_port": "text"
315
+ }
316
+ ]
317
+ }
data/questions/5/narrative/skeleton_c10d41d2_narrative.json ADDED
@@ -0,0 +1,378 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 4,
5
+ "win_node_id": "item_8",
6
+ "win_condition": {
7
+ "type": "item_content",
8
+ "node_id": "item_8",
9
+ "description": "Obtain the content of "
10
+ },
11
+ "source_init": {
12
+ "source_nodes": [
13
+ "item_8",
14
+ "terminal_2",
15
+ "graph_shortest_path",
16
+ "zip_unzip_file"
17
+ ],
18
+ "by_node": {
19
+ "item_8": {
20
+ "node_name": "",
21
+ "node_type": "Item",
22
+ "template_id": "item_8",
23
+ "init_inputs": {},
24
+ "init_outputs": {
25
+ "content": {
26
+ "type": "Hidden_Item",
27
+ "description": "The integer"
28
+ }
29
+ }
30
+ },
31
+ "terminal_2": {
32
+ "node_name": "",
33
+ "node_type": "Tool",
34
+ "template_id": "terminal_2",
35
+ "init_inputs": {
36
+ "num1": {
37
+ "type": "Big_Int",
38
+ "description": "First Number"
39
+ }
40
+ },
41
+ "init_outputs": {
42
+ "text_result": {
43
+ "type": "Text_Generic",
44
+ "description": "Text result for partial input"
45
+ },
46
+ "hex_result": {
47
+ "type": "Hex_String",
48
+ "description": "Hexadecimal result when both inputs provided"
49
+ }
50
+ }
51
+ },
52
+ "graph_shortest_path": {
53
+ "node_name": "Shortest Path Finder",
54
+ "node_type": "Tool",
55
+ "template_id": "graph_shortest_path",
56
+ "init_inputs": {
57
+ "src": {
58
+ "type": "Text_Generic",
59
+ "description": "Source node"
60
+ },
61
+ "dst": {
62
+ "type": "Text_Generic",
63
+ "description": "Destination node"
64
+ }
65
+ },
66
+ "init_outputs": {
67
+ "path": {
68
+ "type": "Text_Generic",
69
+ "description": "Path list"
70
+ },
71
+ "cost": {
72
+ "type": "Big_Int",
73
+ "description": "Path cost"
74
+ }
75
+ }
76
+ },
77
+ "zip_unzip_file": {
78
+ "node_name": "Zip Unzipper",
79
+ "node_type": "Tool",
80
+ "template_id": "zip_unzip_file",
81
+ "init_inputs": {
82
+ "zip_id": {
83
+ "type": "File_Id",
84
+ "description": "Zip file ID"
85
+ },
86
+ "password": {
87
+ "type": "Text_Generic",
88
+ "description": "Password"
89
+ }
90
+ },
91
+ "init_outputs": {
92
+ "files": {
93
+ "type": "File_Id",
94
+ "description": "Extracted file ID"
95
+ }
96
+ }
97
+ }
98
+ }
99
+ },
100
+ "initial_values": {
101
+ "item_8": {
102
+ "init_inputs": {},
103
+ "init_outputs": {
104
+ "content": "3827 1590 6642"
105
+ }
106
+ },
107
+ "terminal_2": {
108
+ "init_inputs": {
109
+ "num1": "8374920183746592018374652"
110
+ },
111
+ "init_outputs": {
112
+ "text_result": "Process waiting for additional numeric arguments.",
113
+ "hex_result": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
114
+ }
115
+ },
116
+ "graph_shortest_path": {
117
+ "init_inputs": {
118
+ "src": "Alpha_Node",
119
+ "dst": "Zeta_Node"
120
+ },
121
+ "init_outputs": {
122
+ "path": "[\"Alpha_Node\", \"Beta_Node\", \"Gamma_Node\", \"Delta_Node\", \"Epsilon_Node\", \"Zeta_Node\"]",
123
+ "cost": "8452"
124
+ }
125
+ },
126
+ "zip_unzip_file": {
127
+ "init_inputs": {
128
+ "zip_id": "protected_data.zip",
129
+ "password": "SecurityPassword123"
130
+ },
131
+ "init_outputs": {
132
+ "files": "network_graph.json"
133
+ }
134
+ }
135
+ },
136
+ "intro_narrative": "You awaken in the flickering blue light of the 'Astra-9' research station. The air is thin, and the hum of the fusion reactor is erratic. Life support is failing, and the station's AI has locked down all sectors. To escape, you must retrieve the station's Final Datacore, which contains the manual override codes for the emergency pods. To reach it, you will need to navigate through the station's fragmented digital architecture, decrypting hidden archives and calculating jump-gate paths across the sector before the station's hull integrity collapses completely.",
137
+ "narrative_style": "sci_fi"
138
+ },
139
+ "nodes": [
140
+ {
141
+ "id": "item_8",
142
+ "name": "",
143
+ "description": "",
144
+ "type": "Item",
145
+ "template_id": "item_8",
146
+ "initial_visible": false,
147
+ "is_revealed": false,
148
+ "inputs": [
149
+ {
150
+ "name": "source_tool",
151
+ "type": "Hidden_Item",
152
+ "description": "Produced by"
153
+ }
154
+ ],
155
+ "outputs": [
156
+ {
157
+ "name": "content",
158
+ "type": "Hidden_Item",
159
+ "description": "The integer",
160
+ "value": "3827 1590 6642"
161
+ }
162
+ ],
163
+ "init": {
164
+ "inputs": {},
165
+ "outputs": {
166
+ "content": "3827 1590 6642"
167
+ }
168
+ },
169
+ "narrative": "This is the Final Datacore. It is a pulsating crystalline unit housed in a pressurized containment field, containing the station's emergency override codes."
170
+ },
171
+ {
172
+ "id": "item_16",
173
+ "name": "",
174
+ "description": "",
175
+ "type": "Item",
176
+ "template_id": "item_16",
177
+ "initial_visible": false,
178
+ "is_revealed": false,
179
+ "inputs": [
180
+ {
181
+ "name": "source_tool",
182
+ "type": "Item",
183
+ "description": "Produced by"
184
+ }
185
+ ],
186
+ "outputs": [
187
+ {
188
+ "name": "content",
189
+ "type": "Hidden_Item",
190
+ "description": "Timezone text"
191
+ }
192
+ ],
193
+ "narrative": "This is the Temporal Sync Key. It is a sleek, handheld device displaying shifting chronometric data, used for stabilizing local time-dilation fields."
194
+ },
195
+ {
196
+ "id": "terminal_2",
197
+ "name": "",
198
+ "description": "",
199
+ "type": "Tool",
200
+ "template_id": "terminal_2",
201
+ "initial_visible": true,
202
+ "is_revealed": true,
203
+ "inputs": [
204
+ {
205
+ "name": "num1",
206
+ "type": "Big_Int",
207
+ "description": "First Number",
208
+ "value": "8374920183746592018374652"
209
+ },
210
+ {
211
+ "name": "num2",
212
+ "type": "Big_Int",
213
+ "description": "Second Number",
214
+ "value": "8452"
215
+ }
216
+ ],
217
+ "outputs": [
218
+ {
219
+ "name": "text_result",
220
+ "type": "Text_Generic",
221
+ "description": "Text result for partial input",
222
+ "value": "Process waiting for additional numeric arguments."
223
+ },
224
+ {
225
+ "name": "hex_result",
226
+ "type": "Hex_String",
227
+ "description": "Hexadecimal result when both inputs provided",
228
+ "value": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
229
+ },
230
+ {
231
+ "name": "math_token",
232
+ "type": "Item",
233
+ "description": "Mathematics token when both inputs provided"
234
+ }
235
+ ],
236
+ "init": {
237
+ "inputs": {
238
+ "num1": "8374920183746592018374652"
239
+ },
240
+ "outputs": {
241
+ "text_result": "Process waiting for additional numeric arguments.",
242
+ "hex_result": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
243
+ }
244
+ },
245
+ "narrative": "This is the Mainframe Terminal. It requires input from the Navigation Computer to synchronize its core processing units and authorize high-level commands."
246
+ },
247
+ {
248
+ "id": "graph_shortest_path",
249
+ "name": "Shortest Path Finder",
250
+ "description": "Shortest path on graph json file with edges list.",
251
+ "type": "Tool",
252
+ "template_id": "graph_shortest_path",
253
+ "initial_visible": true,
254
+ "is_revealed": true,
255
+ "inputs": [
256
+ {
257
+ "name": "file_id",
258
+ "type": "File_Id",
259
+ "description": "Graph JSON file ID",
260
+ "value": "network_graph.json"
261
+ },
262
+ {
263
+ "name": "src",
264
+ "type": "Text_Generic",
265
+ "description": "Source node",
266
+ "value": "Alpha_Node"
267
+ },
268
+ {
269
+ "name": "dst",
270
+ "type": "Text_Generic",
271
+ "description": "Destination node",
272
+ "value": "Zeta_Node"
273
+ }
274
+ ],
275
+ "outputs": [
276
+ {
277
+ "name": "path",
278
+ "type": "Text_Generic",
279
+ "description": "Path list",
280
+ "value": "[\"Alpha_Node\", \"Beta_Node\", \"Gamma_Node\", \"Delta_Node\", \"Epsilon_Node\", \"Zeta_Node\"]"
281
+ },
282
+ {
283
+ "name": "cost",
284
+ "type": "Big_Int",
285
+ "description": "Path cost",
286
+ "value": "8452"
287
+ }
288
+ ],
289
+ "init": {
290
+ "inputs": {
291
+ "src": "Alpha_Node",
292
+ "dst": "Zeta_Node"
293
+ },
294
+ "outputs": {
295
+ "path": "[\"Alpha_Node\", \"Beta_Node\", \"Gamma_Node\", \"Delta_Node\", \"Epsilon_Node\", \"Zeta_Node\"]",
296
+ "cost": "8452"
297
+ }
298
+ },
299
+ "narrative": "This is the Navigation Computer. It requires input from the Archive Decryptor to identify the correct sector nodes for its routing calculations."
300
+ },
301
+ {
302
+ "id": "zip_unzip_file",
303
+ "name": "Zip Unzipper",
304
+ "description": "Unzip a password-protected zip file by id.",
305
+ "type": "Tool",
306
+ "template_id": "zip_unzip_file",
307
+ "initial_visible": true,
308
+ "is_revealed": true,
309
+ "inputs": [
310
+ {
311
+ "name": "trigger_item",
312
+ "type": "Item",
313
+ "description": "Required item to unlock this tool"
314
+ },
315
+ {
316
+ "name": "zip_id",
317
+ "type": "File_Id",
318
+ "description": "Zip file ID",
319
+ "value": "protected_data.zip"
320
+ },
321
+ {
322
+ "name": "password",
323
+ "type": "Text_Generic",
324
+ "description": "Password",
325
+ "value": "SecurityPassword123"
326
+ }
327
+ ],
328
+ "outputs": [
329
+ {
330
+ "name": "files",
331
+ "type": "File_Id",
332
+ "description": "Extracted file ID",
333
+ "value": "network_graph.json"
334
+ }
335
+ ],
336
+ "init": {
337
+ "inputs": {
338
+ "zip_id": "protected_data.zip",
339
+ "password": "SecurityPassword123"
340
+ },
341
+ "outputs": {
342
+ "files": "network_graph.json"
343
+ }
344
+ },
345
+ "narrative": "This is the Archive Decryptor. It is a rugged data terminal designed to unpack and restore compressed station archives and encrypted maintenance logs."
346
+ }
347
+ ],
348
+ "edges": [
349
+ {
350
+ "source_id": "item_16",
351
+ "target_id": "item_8",
352
+ "connection_type": "Hidden_Item",
353
+ "source_port": "content",
354
+ "target_port": "source_tool"
355
+ },
356
+ {
357
+ "source_id": "terminal_2",
358
+ "target_id": "item_16",
359
+ "connection_type": "Item",
360
+ "source_port": "math_token",
361
+ "target_port": "source_tool"
362
+ },
363
+ {
364
+ "source_id": "graph_shortest_path",
365
+ "target_id": "terminal_2",
366
+ "connection_type": "Big_Int",
367
+ "source_port": "cost",
368
+ "target_port": "num2"
369
+ },
370
+ {
371
+ "source_id": "zip_unzip_file",
372
+ "target_id": "graph_shortest_path",
373
+ "connection_type": "File_Id",
374
+ "source_port": "files",
375
+ "target_port": "file_id"
376
+ }
377
+ ]
378
+ }
data/questions/5/narrative/skeleton_c28065f7_narrative.json ADDED
@@ -0,0 +1,325 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 4,
5
+ "win_node_id": "hex_decode",
6
+ "win_condition": {
7
+ "type": "tool_output",
8
+ "node_id": "hex_decode",
9
+ "output_port": "text",
10
+ "output_type": "Text_Generic",
11
+ "description": "Execute Hex to Text Decoder and get the output from port 'text'"
12
+ },
13
+ "source_init": {
14
+ "source_nodes": [
15
+ "hash_md5",
16
+ "terminal_1",
17
+ "time_convert"
18
+ ],
19
+ "by_node": {
20
+ "hash_md5": {
21
+ "node_name": "MD5 Hasher",
22
+ "node_type": "Tool",
23
+ "template_id": "hash_md5",
24
+ "init_inputs": {
25
+ "text": {
26
+ "type": "Text_Generic",
27
+ "description": "Text to hash"
28
+ }
29
+ },
30
+ "init_outputs": {}
31
+ },
32
+ "terminal_1": {
33
+ "node_name": "",
34
+ "node_type": "Tool",
35
+ "template_id": "terminal_1",
36
+ "init_inputs": {
37
+ "slot_b": {
38
+ "type": "Big_Int",
39
+ "description": "Input Slot B"
40
+ }
41
+ },
42
+ "init_outputs": {
43
+ "text_output": {
44
+ "type": "Text_Generic",
45
+ "description": "Text output when only slot_a is provided"
46
+ },
47
+ "hex_output": {
48
+ "type": "Hex_String",
49
+ "description": "Hex output when only slot_b is provided"
50
+ }
51
+ }
52
+ },
53
+ "time_convert": {
54
+ "node_name": "Timezone Converter",
55
+ "node_type": "Tool",
56
+ "template_id": "time_convert",
57
+ "init_inputs": {
58
+ "iso": {
59
+ "type": "Text_Generic",
60
+ "description": "ISO Timestamp"
61
+ },
62
+ "from_tz": {
63
+ "type": "Text_Generic",
64
+ "description": "From Timezone"
65
+ },
66
+ "to_tz": {
67
+ "type": "Text_Generic",
68
+ "description": "To Timezone"
69
+ }
70
+ },
71
+ "init_outputs": {}
72
+ }
73
+ }
74
+ },
75
+ "initial_values": {
76
+ "hash_md5": {
77
+ "init_inputs": {
78
+ "text": "Target string for MD5 calculation 58293"
79
+ },
80
+ "init_outputs": {}
81
+ },
82
+ "terminal_1": {
83
+ "init_inputs": {
84
+ "slot_b": "9283746501928374650192837"
85
+ },
86
+ "init_outputs": {
87
+ "text_output": "Terminal operation completed successfully. Result available.",
88
+ "hex_output": "1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d"
89
+ }
90
+ },
91
+ "time_convert": {
92
+ "init_inputs": {
93
+ "iso": "2024-06-15T12:00:00",
94
+ "from_tz": "Europe/London",
95
+ "to_tz": "Asia/Tokyo"
96
+ },
97
+ "init_outputs": {}
98
+ }
99
+ },
100
+ "intro_narrative": "You step into the dimly lit office of Arthur Pendelton, a renowned private investigator who vanished without a trace exactly three weeks ago. The air is thick with stale tobacco smoke and the sharp scent of ozone. A faint, rhythmic hum emanates from an array of strange, interconnected retro-futuristic machines covering his massive oak desk. Suddenly, the heavy steel door slams shut behind you, engaging a magnetic deadlock. A digital timer flickers to life above the exit, ticking down ominously. Arthur was known for his intense paranoia, leaving behind a trail of cryptic devices and physical puzzles to protect his final, earth-shattering discovery. You must navigate his bizarre contraptions, uncover the hidden sequence of events, and piece together the fragmented clues he left behind. Your only way out is to operate his master machinery and reveal the final truth Arthur died to hide. The clock is ticking, and the shadows of the office seem to close in around you.",
101
+ "narrative_style": "mystery"
102
+ },
103
+ "nodes": [
104
+ {
105
+ "id": "hex_decode",
106
+ "name": "Hex to Text Decoder",
107
+ "description": "Decode hex to UTF-8 text.",
108
+ "type": "Tool",
109
+ "template_id": "hex_decode",
110
+ "initial_visible": true,
111
+ "is_revealed": true,
112
+ "inputs": [
113
+ {
114
+ "name": "hex",
115
+ "type": "Hex_String",
116
+ "description": "Hex string",
117
+ "value": "df64fbca73d8bfd847e2a470dd7fb26f"
118
+ }
119
+ ],
120
+ "outputs": [
121
+ {
122
+ "name": "text",
123
+ "type": "Text_Generic",
124
+ "description": "Decoded text",
125
+ "value": "dsؿGpo"
126
+ }
127
+ ],
128
+ "narrative": "This is the Final Decryption Screen. It requires input from the Digital Scrambler to translate the obscured code into a readable message."
129
+ },
130
+ {
131
+ "id": "hash_md5",
132
+ "name": "MD5 Hasher",
133
+ "description": "MD5 over UTF-8 text; returns hex.",
134
+ "type": "Tool",
135
+ "template_id": "hash_md5",
136
+ "initial_visible": false,
137
+ "is_revealed": false,
138
+ "inputs": [
139
+ {
140
+ "name": "trigger_hidden",
141
+ "type": "Hidden_Item",
142
+ "description": "Hidden item required to unlock this tool"
143
+ },
144
+ {
145
+ "name": "text",
146
+ "type": "Text_Generic",
147
+ "description": "Text to hash",
148
+ "value": "Target string for MD5 calculation 58293"
149
+ }
150
+ ],
151
+ "outputs": [
152
+ {
153
+ "name": "hex",
154
+ "type": "Hex_String",
155
+ "description": "MD5 Hex digest",
156
+ "value": "df64fbca73d8bfd847e2a470dd7fb26f"
157
+ }
158
+ ],
159
+ "init": {
160
+ "inputs": {
161
+ "text": "Target string for MD5 calculation 58293"
162
+ },
163
+ "outputs": {}
164
+ },
165
+ "narrative": "A heavy-duty Digital Scrambler. It is designed to aggressively scramble sensitive information into an unreadable format."
166
+ },
167
+ {
168
+ "id": "item_16",
169
+ "name": "",
170
+ "description": "",
171
+ "type": "Item",
172
+ "template_id": "item_16",
173
+ "initial_visible": false,
174
+ "is_revealed": false,
175
+ "inputs": [
176
+ {
177
+ "name": "source_tool",
178
+ "type": "Item",
179
+ "description": "Produced by"
180
+ }
181
+ ],
182
+ "outputs": [
183
+ {
184
+ "name": "content",
185
+ "type": "Hidden_Item",
186
+ "description": "Timezone text"
187
+ }
188
+ ],
189
+ "narrative": "A Sealed Envelope with a heavy wax seal. It feels like there is something rigid and important hidden inside."
190
+ },
191
+ {
192
+ "id": "terminal_1",
193
+ "name": "",
194
+ "description": "",
195
+ "type": "Tool",
196
+ "template_id": "terminal_1",
197
+ "initial_visible": true,
198
+ "is_revealed": true,
199
+ "inputs": [
200
+ {
201
+ "name": "slot_a",
202
+ "type": "Text_Generic",
203
+ "description": "Input Slot A",
204
+ "value": "2024-06-15T21:00:00+09:00"
205
+ },
206
+ {
207
+ "name": "slot_b",
208
+ "type": "Big_Int",
209
+ "description": "Input Slot B",
210
+ "value": "9283746501928374650192837"
211
+ }
212
+ ],
213
+ "outputs": [
214
+ {
215
+ "name": "text_output",
216
+ "type": "Text_Generic",
217
+ "description": "Text output when only slot_a is provided",
218
+ "value": "Terminal operation completed successfully. Result available."
219
+ },
220
+ {
221
+ "name": "hex_output",
222
+ "type": "Hex_String",
223
+ "description": "Hex output when only slot_b is provided",
224
+ "value": "1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d"
225
+ },
226
+ {
227
+ "name": "item_dispenser",
228
+ "type": "Item",
229
+ "description": "Item output when both slots are provided"
230
+ }
231
+ ],
232
+ "init": {
233
+ "inputs": {
234
+ "slot_b": "9283746501928374650192837"
235
+ },
236
+ "outputs": {
237
+ "text_output": "Terminal operation completed successfully. Result available.",
238
+ "hex_output": "1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d"
239
+ }
240
+ },
241
+ "narrative": "This is the Mainframe Console. It requires input from the Chronograph Dial to synchronize its systems and process the data."
242
+ },
243
+ {
244
+ "id": "time_convert",
245
+ "name": "Timezone Converter",
246
+ "description": "Convert ISO time between timezones.",
247
+ "type": "Tool",
248
+ "template_id": "time_convert",
249
+ "initial_visible": true,
250
+ "is_revealed": true,
251
+ "inputs": [
252
+ {
253
+ "name": "trigger_item",
254
+ "type": "Item",
255
+ "description": "Required item to unlock this tool"
256
+ },
257
+ {
258
+ "name": "iso",
259
+ "type": "Text_Generic",
260
+ "description": "ISO Timestamp",
261
+ "value": "2024-06-15T12:00:00"
262
+ },
263
+ {
264
+ "name": "from_tz",
265
+ "type": "Text_Generic",
266
+ "description": "From Timezone",
267
+ "value": "Europe/London"
268
+ },
269
+ {
270
+ "name": "to_tz",
271
+ "type": "Text_Generic",
272
+ "description": "To Timezone",
273
+ "value": "Asia/Tokyo"
274
+ }
275
+ ],
276
+ "outputs": [
277
+ {
278
+ "name": "iso",
279
+ "type": "Text_Generic",
280
+ "description": "Converted ISO Timestamp",
281
+ "value": "2024-06-15T21:00:00+09:00"
282
+ }
283
+ ],
284
+ "init": {
285
+ "inputs": {
286
+ "iso": "2024-06-15T12:00:00",
287
+ "from_tz": "Europe/London",
288
+ "to_tz": "Asia/Tokyo"
289
+ },
290
+ "outputs": {}
291
+ },
292
+ "narrative": "An ornate brass Chronograph Dial. It features multiple rotating rings used for shifting temporal coordinates."
293
+ }
294
+ ],
295
+ "edges": [
296
+ {
297
+ "source_id": "hash_md5",
298
+ "target_id": "hex_decode",
299
+ "connection_type": "Hex_String",
300
+ "source_port": "hex",
301
+ "target_port": "hex"
302
+ },
303
+ {
304
+ "source_id": "item_16",
305
+ "target_id": "hash_md5",
306
+ "connection_type": "Hidden_Item",
307
+ "source_port": "content",
308
+ "target_port": "trigger_hidden"
309
+ },
310
+ {
311
+ "source_id": "terminal_1",
312
+ "target_id": "item_16",
313
+ "connection_type": "Item",
314
+ "source_port": "item_dispenser",
315
+ "target_port": "source_tool"
316
+ },
317
+ {
318
+ "source_id": "time_convert",
319
+ "target_id": "terminal_1",
320
+ "connection_type": "Text_Generic",
321
+ "source_port": "iso",
322
+ "target_port": "slot_a"
323
+ }
324
+ ]
325
+ }
data/questions/5/narrative/skeleton_c833dcfb_narrative.json ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 4,
5
+ "win_node_id": "container_2",
6
+ "win_condition": {
7
+ "type": "item_content",
8
+ "node_id": "container_2",
9
+ "description": "Obtain the content of "
10
+ },
11
+ "source_init": {
12
+ "source_nodes": [
13
+ "container_2",
14
+ "luhn_check",
15
+ "matter_synthesizer"
16
+ ],
17
+ "by_node": {
18
+ "container_2": {
19
+ "node_name": "",
20
+ "node_type": "Item",
21
+ "template_id": "container_2",
22
+ "init_inputs": {},
23
+ "init_outputs": {
24
+ "inner_space": {
25
+ "type": "Item",
26
+ "description": "Contents"
27
+ }
28
+ }
29
+ },
30
+ "luhn_check": {
31
+ "node_name": "Luhn Checker",
32
+ "node_type": "Tool",
33
+ "template_id": "luhn_check",
34
+ "init_inputs": {
35
+ "number": {
36
+ "type": "Text_Generic",
37
+ "description": "Number string"
38
+ }
39
+ },
40
+ "init_outputs": {}
41
+ },
42
+ "matter_synthesizer": {
43
+ "node_name": "Matter Synthesizer",
44
+ "node_type": "Tool",
45
+ "template_id": "matter_synthesizer",
46
+ "init_inputs": {
47
+ "blueprint": {
48
+ "type": "Text_Generic",
49
+ "description": "Object Blueprint"
50
+ }
51
+ },
52
+ "init_outputs": {}
53
+ }
54
+ }
55
+ },
56
+ "initial_values": {
57
+ "container_2": {
58
+ "init_inputs": {},
59
+ "init_outputs": {
60
+ "inner_space": "dhalshflahfoainxoodhafabfkanfnuynxzl0990"
61
+ }
62
+ },
63
+ "luhn_check": {
64
+ "init_inputs": {
65
+ "number": "4921857361928475"
66
+ },
67
+ "init_outputs": {}
68
+ },
69
+ "matter_synthesizer": {
70
+ "init_inputs": {
71
+ "blueprint": "Schematic: Quantum Resonance Oscillator v4.2 [Classified]"
72
+ },
73
+ "init_outputs": {}
74
+ }
75
+ },
76
+ "intro_narrative": "The rain beats relentlessly against the frosted windows of Silas Vance's abandoned office. You, a seasoned detective, have finally tracked the infamous corporate embezzler down to this hidden, makeshift laboratory. The air smells faintly of ozone and stale coffee. Vance was deeply paranoid, leaving his most damning secrets scattered across various devices and encrypted systems. Your primary objective is clear: retrieve the final piece of evidence locked away in his heavily secured container. But Vance didn't make it easy. You'll need to piece together scattered blueprints, verify suspicious financial trails, and manipulate his own experimental technology against him. The clock is ticking before his associates arrive to scrub the place clean. Search the room, utilize the abandoned investigative tools, and uncover the truth.",
77
+ "narrative_style": "detective"
78
+ },
79
+ "nodes": [
80
+ {
81
+ "id": "container_2",
82
+ "name": "",
83
+ "description": "",
84
+ "type": "Item",
85
+ "template_id": "container_2",
86
+ "initial_visible": false,
87
+ "is_revealed": false,
88
+ "inputs": [
89
+ {
90
+ "name": "container",
91
+ "type": "Hidden_Item",
92
+ "description": "Inside"
93
+ },
94
+ {
95
+ "name": "fingerprint_input",
96
+ "type": "Hex_String",
97
+ "description": "Fingerprint Hash",
98
+ "value": "789c4b4bcc294e05000616020c"
99
+ }
100
+ ],
101
+ "outputs": [
102
+ {
103
+ "name": "inner_space",
104
+ "type": "Item",
105
+ "description": "Contents",
106
+ "value": "dhalshflahfoainxoodhafabfkanfnuynxzl0990"
107
+ }
108
+ ],
109
+ "init": {
110
+ "inputs": {},
111
+ "outputs": {
112
+ "inner_space": "dhalshflahfoainxoodhafabfkanfnuynxzl0990"
113
+ }
114
+ },
115
+ "narrative": "This is an Evidence Locker. It requires input from the Data Compressor to bypass its biometric security protocol."
116
+ },
117
+ {
118
+ "id": "item_16",
119
+ "name": "",
120
+ "description": "",
121
+ "type": "Item",
122
+ "template_id": "item_16",
123
+ "initial_visible": false,
124
+ "is_revealed": false,
125
+ "inputs": [
126
+ {
127
+ "name": "source_tool",
128
+ "type": "Item",
129
+ "description": "Produced by",
130
+ "value": "synthesized_item_91d5eb095dba3fa0"
131
+ }
132
+ ],
133
+ "outputs": [
134
+ {
135
+ "name": "content",
136
+ "type": "Hidden_Item",
137
+ "description": "Timezone text"
138
+ }
139
+ ],
140
+ "narrative": "A shattered Victim's Watch recovered during the investigation."
141
+ },
142
+ {
143
+ "id": "zlib_deflate",
144
+ "name": "Zlib Deflate",
145
+ "description": "Deflate text to zlib bytes (hex).",
146
+ "type": "Tool",
147
+ "template_id": "zlib_deflate",
148
+ "initial_visible": true,
149
+ "is_revealed": true,
150
+ "inputs": [
151
+ {
152
+ "name": "text",
153
+ "type": "Text_Generic",
154
+ "description": "Text to compress",
155
+ "value": "false"
156
+ }
157
+ ],
158
+ "outputs": [
159
+ {
160
+ "name": "hex",
161
+ "type": "Hex_String",
162
+ "description": "Compressed hex",
163
+ "value": "789c4b4bcc294e05000616020c"
164
+ }
165
+ ],
166
+ "narrative": "This is a Data Compressor. It requires input from the Bank Card Validator to process the verification logs."
167
+ },
168
+ {
169
+ "id": "luhn_check",
170
+ "name": "Luhn Checker",
171
+ "description": "Luhn validity of number string.",
172
+ "type": "Tool",
173
+ "template_id": "luhn_check",
174
+ "initial_visible": true,
175
+ "is_revealed": true,
176
+ "inputs": [
177
+ {
178
+ "name": "number",
179
+ "type": "Text_Generic",
180
+ "description": "Number string",
181
+ "value": "4921857361928475"
182
+ }
183
+ ],
184
+ "outputs": [
185
+ {
186
+ "name": "valid",
187
+ "type": "Text_Generic",
188
+ "description": "True/False string",
189
+ "value": "false"
190
+ }
191
+ ],
192
+ "init": {
193
+ "inputs": {
194
+ "number": "4921857361928475"
195
+ },
196
+ "outputs": {}
197
+ },
198
+ "narrative": "A Bank Card Validator used to quickly verify the authenticity of financial account numbers."
199
+ },
200
+ {
201
+ "id": "matter_synthesizer",
202
+ "name": "Matter Synthesizer",
203
+ "description": "Synthesizes physical objects from data blueprints.",
204
+ "type": "Tool",
205
+ "template_id": "matter_synthesizer",
206
+ "initial_visible": true,
207
+ "is_revealed": true,
208
+ "inputs": [
209
+ {
210
+ "name": "blueprint",
211
+ "type": "Text_Generic",
212
+ "description": "Object Blueprint",
213
+ "value": "Schematic: Quantum Resonance Oscillator v4.2 [Classified]"
214
+ }
215
+ ],
216
+ "outputs": [
217
+ {
218
+ "name": "output_slot",
219
+ "type": "Item",
220
+ "description": "Synthesized Object",
221
+ "value": "synthesized_item_91d5eb095dba3fa0"
222
+ }
223
+ ],
224
+ "init": {
225
+ "inputs": {
226
+ "blueprint": "Schematic: Quantum Resonance Oscillator v4.2 [Classified]"
227
+ },
228
+ "outputs": {}
229
+ },
230
+ "narrative": "A high-tech Evidence Replicator capable of recreating physical objects from digital blueprints."
231
+ }
232
+ ],
233
+ "edges": [
234
+ {
235
+ "source_id": "item_16",
236
+ "target_id": "container_2",
237
+ "connection_type": "Hidden_Item",
238
+ "source_port": "content",
239
+ "target_port": "container"
240
+ },
241
+ {
242
+ "source_id": "zlib_deflate",
243
+ "target_id": "container_2",
244
+ "connection_type": "Hex_String",
245
+ "source_port": "hex",
246
+ "target_port": "fingerprint_input"
247
+ },
248
+ {
249
+ "source_id": "luhn_check",
250
+ "target_id": "zlib_deflate",
251
+ "connection_type": "Text_Generic",
252
+ "source_port": "valid",
253
+ "target_port": "text"
254
+ },
255
+ {
256
+ "source_id": "matter_synthesizer",
257
+ "target_id": "item_16",
258
+ "connection_type": "Item",
259
+ "source_port": "output_slot",
260
+ "target_port": "source_tool"
261
+ }
262
+ ]
263
+ }
data/questions/5/narrative/skeleton_cbc9de7d_narrative.json ADDED
@@ -0,0 +1,231 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 4,
5
+ "win_node_id": "item_8",
6
+ "win_condition": {
7
+ "type": "item_content",
8
+ "node_id": "item_8",
9
+ "description": "Obtain the content of "
10
+ },
11
+ "source_init": {
12
+ "source_nodes": [
13
+ "item_8",
14
+ "container_2"
15
+ ],
16
+ "by_node": {
17
+ "item_8": {
18
+ "node_name": "",
19
+ "node_type": "Item",
20
+ "template_id": "item_8",
21
+ "init_inputs": {},
22
+ "init_outputs": {
23
+ "content": {
24
+ "type": "Hidden_Item",
25
+ "description": "The integer"
26
+ }
27
+ }
28
+ },
29
+ "container_2": {
30
+ "node_name": "",
31
+ "node_type": "Item",
32
+ "template_id": "container_2",
33
+ "init_inputs": {
34
+ "fingerprint_input": {
35
+ "type": "Hex_String",
36
+ "description": "Fingerprint Hash"
37
+ }
38
+ },
39
+ "init_outputs": {}
40
+ }
41
+ }
42
+ },
43
+ "initial_values": {
44
+ "item_8": {
45
+ "init_inputs": {},
46
+ "init_outputs": {
47
+ "content": "3190410758378798127389712837891274871247814718417414414767"
48
+ }
49
+ },
50
+ "container_2": {
51
+ "init_inputs": {
52
+ "fingerprint_input": "8f3a1b2c4d5e6f7a8b9c0d1e2f3a4b5c"
53
+ },
54
+ "init_outputs": {}
55
+ }
56
+ },
57
+ "intro_narrative": "You awaken on the derelict starship 'The Horizon', its emergency lights flickering as life support slowly fails. The crew has mysteriously vanished, leaving behind locked compartments and scattered technology. To secure an escape pod and plot a course to safety, you must find the ship's hidden navigation coordinates. Explore the abandoned quarters and utilize the remaining devices before the reactor breaches.",
58
+ "narrative_style": "sci_fi"
59
+ },
60
+ "nodes": [
61
+ {
62
+ "id": "item_8",
63
+ "name": "",
64
+ "description": "",
65
+ "type": "Item",
66
+ "template_id": "item_8",
67
+ "initial_visible": false,
68
+ "is_revealed": false,
69
+ "inputs": [
70
+ {
71
+ "name": "source_tool",
72
+ "type": "Hidden_Item",
73
+ "description": "Produced by"
74
+ }
75
+ ],
76
+ "outputs": [
77
+ {
78
+ "name": "content",
79
+ "type": "Hidden_Item",
80
+ "description": "The integer",
81
+ "value": "3190410758378798127389712837891274871247814718417414414767"
82
+ }
83
+ ],
84
+ "init": {
85
+ "inputs": {},
86
+ "outputs": {
87
+ "content": "3190410758378798127389712837891274871247814718417414414767"
88
+ }
89
+ },
90
+ "narrative": "The central core data file."
91
+ },
92
+ {
93
+ "id": "item_8_3133",
94
+ "name": "",
95
+ "description": "",
96
+ "type": "Item",
97
+ "template_id": "item_8",
98
+ "initial_visible": false,
99
+ "is_revealed": false,
100
+ "inputs": [
101
+ {
102
+ "name": "source_tool",
103
+ "type": "Hidden_Item",
104
+ "description": "Produced by"
105
+ }
106
+ ],
107
+ "outputs": [
108
+ {
109
+ "name": "content",
110
+ "type": "Hidden_Item",
111
+ "description": "The integer"
112
+ }
113
+ ],
114
+ "narrative": "An encrypted memory shard."
115
+ },
116
+ {
117
+ "id": "item_16",
118
+ "name": "",
119
+ "description": "",
120
+ "type": "Item",
121
+ "template_id": "item_16",
122
+ "initial_visible": false,
123
+ "is_revealed": false,
124
+ "inputs": [
125
+ {
126
+ "name": "source_tool",
127
+ "type": "Item",
128
+ "description": "Produced by"
129
+ }
130
+ ],
131
+ "outputs": [
132
+ {
133
+ "name": "content",
134
+ "type": "Hidden_Item",
135
+ "description": "Timezone text"
136
+ }
137
+ ],
138
+ "narrative": "A chronological synchronization module."
139
+ },
140
+ {
141
+ "id": "container_2",
142
+ "name": "",
143
+ "description": "",
144
+ "type": "Item",
145
+ "template_id": "container_2",
146
+ "initial_visible": false,
147
+ "is_revealed": false,
148
+ "inputs": [
149
+ {
150
+ "name": "container",
151
+ "type": "Hidden_Item",
152
+ "description": "Inside"
153
+ },
154
+ {
155
+ "name": "fingerprint_input",
156
+ "type": "Hex_String",
157
+ "description": "Fingerprint Hash",
158
+ "value": "8f3a1b2c4d5e6f7a8b9c0d1e2f3a4b5c"
159
+ }
160
+ ],
161
+ "outputs": [
162
+ {
163
+ "name": "inner_space",
164
+ "type": "Item",
165
+ "description": "Contents"
166
+ }
167
+ ],
168
+ "init": {
169
+ "inputs": {
170
+ "fingerprint_input": "8f3a1b2c4d5e6f7a8b9c0d1e2f3a4b5c"
171
+ },
172
+ "outputs": {}
173
+ },
174
+ "narrative": "A reinforced biometric security locker."
175
+ },
176
+ {
177
+ "id": "item_8_e893",
178
+ "name": "",
179
+ "description": "",
180
+ "type": "Item",
181
+ "template_id": "item_8",
182
+ "initial_visible": true,
183
+ "is_revealed": true,
184
+ "inputs": [
185
+ {
186
+ "name": "source_tool",
187
+ "type": "Hidden_Item",
188
+ "description": "Produced by"
189
+ }
190
+ ],
191
+ "outputs": [
192
+ {
193
+ "name": "content",
194
+ "type": "Hidden_Item",
195
+ "description": "The integer"
196
+ }
197
+ ],
198
+ "narrative": "A standard issue engineering datapad."
199
+ }
200
+ ],
201
+ "edges": [
202
+ {
203
+ "source_id": "item_8_3133",
204
+ "target_id": "item_8",
205
+ "connection_type": "Hidden_Item",
206
+ "source_port": "content",
207
+ "target_port": "source_tool"
208
+ },
209
+ {
210
+ "source_id": "item_16",
211
+ "target_id": "item_8_3133",
212
+ "connection_type": "Hidden_Item",
213
+ "source_port": "content",
214
+ "target_port": "source_tool"
215
+ },
216
+ {
217
+ "source_id": "container_2",
218
+ "target_id": "item_16",
219
+ "connection_type": "Item",
220
+ "source_port": "inner_space",
221
+ "target_port": "source_tool"
222
+ },
223
+ {
224
+ "source_id": "item_8_e893",
225
+ "target_id": "container_2",
226
+ "connection_type": "Hidden_Item",
227
+ "source_port": "content",
228
+ "target_port": "container"
229
+ }
230
+ ]
231
+ }
data/questions/5/narrative/skeleton_d0cc26bb_narrative.json ADDED
@@ -0,0 +1,344 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 4,
5
+ "win_node_id": "crypto_rsa_decrypt_hex",
6
+ "win_condition": {
7
+ "type": "tool_output",
8
+ "node_id": "crypto_rsa_decrypt_hex",
9
+ "output_port": "text",
10
+ "output_type": "Text_Generic",
11
+ "description": "Execute RSA Decrypt and get the output from port 'text'"
12
+ },
13
+ "source_init": {
14
+ "source_nodes": [
15
+ "crypto_rsa_decrypt_hex",
16
+ "terminal_2",
17
+ "hmac_sha256"
18
+ ],
19
+ "by_node": {
20
+ "crypto_rsa_decrypt_hex": {
21
+ "node_name": "RSA Decrypt",
22
+ "node_type": "Tool",
23
+ "template_id": "crypto_rsa_decrypt_hex",
24
+ "init_inputs": {
25
+ "n": {
26
+ "type": "Big_Int",
27
+ "description": "Modulus n"
28
+ }
29
+ },
30
+ "init_outputs": {}
31
+ },
32
+ "terminal_2": {
33
+ "node_name": "",
34
+ "node_type": "Tool",
35
+ "template_id": "terminal_2",
36
+ "init_inputs": {
37
+ "num1": {
38
+ "type": "Big_Int",
39
+ "description": "First Number"
40
+ },
41
+ "num2": {
42
+ "type": "Big_Int",
43
+ "description": "Second Number"
44
+ }
45
+ },
46
+ "init_outputs": {
47
+ "text_result": {
48
+ "type": "Text_Generic",
49
+ "description": "Text result for partial input"
50
+ },
51
+ "hex_result": {
52
+ "type": "Hex_String",
53
+ "description": "Hexadecimal result when both inputs provided"
54
+ },
55
+ "math_token": {
56
+ "type": "Item",
57
+ "description": "Mathematics token when both inputs provided"
58
+ }
59
+ }
60
+ },
61
+ "hmac_sha256": {
62
+ "node_name": "HMAC-SHA256 Calculator",
63
+ "node_type": "Tool",
64
+ "template_id": "hmac_sha256",
65
+ "init_inputs": {
66
+ "hex_key": {
67
+ "type": "Hex_String",
68
+ "description": "Hex key"
69
+ },
70
+ "text": {
71
+ "type": "Text_Generic",
72
+ "description": "Text message"
73
+ }
74
+ },
75
+ "init_outputs": {}
76
+ }
77
+ }
78
+ },
79
+ "initial_values": {
80
+ "crypto_rsa_decrypt_hex": {
81
+ "init_inputs": {
82
+ "n": "948572631029384756192837465019283746510293847561029384756192"
83
+ },
84
+ "init_outputs": {}
85
+ },
86
+ "terminal_2": {
87
+ "init_inputs": {
88
+ "num1": "4857392018475629384710293847561029384756",
89
+ "num2": "5968403129586730495821304958672130495867"
90
+ },
91
+ "init_outputs": {
92
+ "text_result": "Partial calculation result awaiting further inputs.",
93
+ "hex_result": "e4d3c2b1a09f8e7d6c5b4a39281706f5",
94
+ "math_token": "Decorative token with no computational value."
95
+ }
96
+ },
97
+ "hmac_sha256": {
98
+ "init_inputs": {
99
+ "hex_key": "11223344556677889900aabbccddeeff11223344556677889900aabbccddeeff",
100
+ "text": "Initiate secure sequence protocol alpha."
101
+ },
102
+ "init_outputs": {}
103
+ }
104
+ },
105
+ "intro_narrative": "You are a scholar of the arcane, trapped within the lost Observatory of Eldoria. The heavy stone doors have been sealed by powerful runic magic meant to protect the realm's greatest secrets. To escape this celestial prison, you must decipher the final incantation hidden within the Grand Cipher Monolith at the center of the room. The observatory is filled with strange magical apparatuses left behind by the ancient archmages. By understanding how these mystical artifacts connect and share their arcane energies, you can unravel the mystery and find your way back to the living world.",
106
+ "narrative_style": "fantasy"
107
+ },
108
+ "nodes": [
109
+ {
110
+ "id": "crypto_rsa_decrypt_hex",
111
+ "name": "RSA Decrypt",
112
+ "description": "RSA decrypt (hex cipher) with n,d (decimal).",
113
+ "type": "Tool",
114
+ "template_id": "crypto_rsa_decrypt_hex",
115
+ "initial_visible": true,
116
+ "is_revealed": true,
117
+ "inputs": [
118
+ {
119
+ "name": "hex_cipher",
120
+ "type": "Hex_String",
121
+ "description": "Ciphertext (Hex)",
122
+ "value": "d1745ce6c51490637ca155672f1720f1de181ab4ae9dcc04a8793d022ea63422"
123
+ },
124
+ {
125
+ "name": "n",
126
+ "type": "Big_Int",
127
+ "description": "Modulus n",
128
+ "value": "948572631029384756192837465019283746510293847561029384756192"
129
+ },
130
+ {
131
+ "name": "d",
132
+ "type": "Big_Int",
133
+ "description": "Private exponent d",
134
+ "value": 1565200541
135
+ }
136
+ ],
137
+ "outputs": [
138
+ {
139
+ "name": "text",
140
+ "type": "Text_Generic",
141
+ "description": "Decrypted text",
142
+ "value": "dc`KX=JWcQ:\u0000"
143
+ }
144
+ ],
145
+ "init": {
146
+ "inputs": {
147
+ "n": "948572631029384756192837465019283746510293847561029384756192"
148
+ },
149
+ "outputs": {}
150
+ },
151
+ "narrative": "This is the Grand Cipher Monolith. It requires inputs from both the glyph resonation chamber and the shadow-forged crucible to break the final seal."
152
+ },
153
+ {
154
+ "id": "checksum_crc32",
155
+ "name": "CRC32 Checksum",
156
+ "description": "CRC32 over hex bytes.",
157
+ "type": "Tool",
158
+ "template_id": "checksum_crc32",
159
+ "initial_visible": false,
160
+ "is_revealed": false,
161
+ "inputs": [
162
+ {
163
+ "name": "trigger_hidden",
164
+ "type": "Hidden_Item",
165
+ "description": "Hidden item required to unlock this tool"
166
+ },
167
+ {
168
+ "name": "hex",
169
+ "type": "Hex_String",
170
+ "description": "Hex data",
171
+ "value": "e4d3c2b1a09f8e7d6c5b4a39281706f5"
172
+ }
173
+ ],
174
+ "outputs": [
175
+ {
176
+ "name": "hex",
177
+ "type": "Hex_String",
178
+ "description": "CRC32 Hex",
179
+ "value": "5d4b109d"
180
+ },
181
+ {
182
+ "name": "int",
183
+ "type": "Big_Int",
184
+ "description": "CRC32 Int",
185
+ "value": 1565200541
186
+ }
187
+ ],
188
+ "narrative": "This is a glyph resonation chamber. It requires input from the astral calculation orb to function."
189
+ },
190
+ {
191
+ "id": "item_16",
192
+ "name": "",
193
+ "description": "",
194
+ "type": "Item",
195
+ "template_id": "item_16",
196
+ "initial_visible": true,
197
+ "is_revealed": true,
198
+ "inputs": [
199
+ {
200
+ "name": "source_tool",
201
+ "type": "Item",
202
+ "description": "Produced by"
203
+ }
204
+ ],
205
+ "outputs": [
206
+ {
207
+ "name": "content",
208
+ "type": "Hidden_Item",
209
+ "description": "Timezone text"
210
+ }
211
+ ],
212
+ "narrative": "An ancient sundial carved with faded celestial maps."
213
+ },
214
+ {
215
+ "id": "terminal_2",
216
+ "name": "",
217
+ "description": "",
218
+ "type": "Tool",
219
+ "template_id": "terminal_2",
220
+ "initial_visible": true,
221
+ "is_revealed": true,
222
+ "inputs": [
223
+ {
224
+ "name": "trigger_item",
225
+ "type": "Item",
226
+ "description": "Required item to unlock this terminal"
227
+ },
228
+ {
229
+ "name": "num1",
230
+ "type": "Big_Int",
231
+ "description": "First Number",
232
+ "value": "4857392018475629384710293847561029384756"
233
+ },
234
+ {
235
+ "name": "num2",
236
+ "type": "Big_Int",
237
+ "description": "Second Number",
238
+ "value": "5968403129586730495821304958672130495867"
239
+ }
240
+ ],
241
+ "outputs": [
242
+ {
243
+ "name": "text_result",
244
+ "type": "Text_Generic",
245
+ "description": "Text result for partial input",
246
+ "value": "Partial calculation result awaiting further inputs."
247
+ },
248
+ {
249
+ "name": "hex_result",
250
+ "type": "Hex_String",
251
+ "description": "Hexadecimal result when both inputs provided",
252
+ "value": "e4d3c2b1a09f8e7d6c5b4a39281706f5"
253
+ },
254
+ {
255
+ "name": "math_token",
256
+ "type": "Item",
257
+ "description": "Mathematics token when both inputs provided",
258
+ "value": "Decorative token with no computational value."
259
+ }
260
+ ],
261
+ "init": {
262
+ "inputs": {
263
+ "num1": "4857392018475629384710293847561029384756",
264
+ "num2": "5968403129586730495821304958672130495867"
265
+ },
266
+ "outputs": {
267
+ "text_result": "Partial calculation result awaiting further inputs.",
268
+ "hex_result": "e4d3c2b1a09f8e7d6c5b4a39281706f5",
269
+ "math_token": "Decorative token with no computational value."
270
+ }
271
+ },
272
+ "narrative": "A glowing astral calculation orb hovering above a solid brass pedestal."
273
+ },
274
+ {
275
+ "id": "hmac_sha256",
276
+ "name": "HMAC-SHA256 Calculator",
277
+ "description": "HMAC-SHA256(text) with hex key.",
278
+ "type": "Tool",
279
+ "template_id": "hmac_sha256",
280
+ "initial_visible": true,
281
+ "is_revealed": true,
282
+ "inputs": [
283
+ {
284
+ "name": "hex_key",
285
+ "type": "Hex_String",
286
+ "description": "Hex key",
287
+ "value": "11223344556677889900aabbccddeeff11223344556677889900aabbccddeeff"
288
+ },
289
+ {
290
+ "name": "text",
291
+ "type": "Text_Generic",
292
+ "description": "Text message",
293
+ "value": "Initiate secure sequence protocol alpha."
294
+ }
295
+ ],
296
+ "outputs": [
297
+ {
298
+ "name": "hex",
299
+ "type": "Hex_String",
300
+ "description": "HMAC Hex digest",
301
+ "value": "d1745ce6c51490637ca155672f1720f1de181ab4ae9dcc04a8793d022ea63422"
302
+ }
303
+ ],
304
+ "init": {
305
+ "inputs": {
306
+ "hex_key": "11223344556677889900aabbccddeeff11223344556677889900aabbccddeeff",
307
+ "text": "Initiate secure sequence protocol alpha."
308
+ },
309
+ "outputs": {}
310
+ },
311
+ "narrative": "A shadow-forged crucible radiating with dormant magical energy."
312
+ }
313
+ ],
314
+ "edges": [
315
+ {
316
+ "source_id": "checksum_crc32",
317
+ "target_id": "crypto_rsa_decrypt_hex",
318
+ "connection_type": "Big_Int",
319
+ "source_port": "int",
320
+ "target_port": "d"
321
+ },
322
+ {
323
+ "source_id": "item_16",
324
+ "target_id": "checksum_crc32",
325
+ "connection_type": "Hidden_Item",
326
+ "source_port": "content",
327
+ "target_port": "trigger_hidden"
328
+ },
329
+ {
330
+ "source_id": "terminal_2",
331
+ "target_id": "checksum_crc32",
332
+ "connection_type": "Hex_String",
333
+ "source_port": "hex_result",
334
+ "target_port": "hex"
335
+ },
336
+ {
337
+ "source_id": "hmac_sha256",
338
+ "target_id": "crypto_rsa_decrypt_hex",
339
+ "connection_type": "Hex_String",
340
+ "source_port": "hex",
341
+ "target_port": "hex_cipher"
342
+ }
343
+ ]
344
+ }
data/questions/5/narrative/skeleton_d16d1e74_narrative.json ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 4,
5
+ "win_node_id": "item_5",
6
+ "win_condition": {
7
+ "type": "item_content",
8
+ "node_id": "item_5",
9
+ "description": "Obtain the content of "
10
+ },
11
+ "source_init": {
12
+ "source_nodes": [
13
+ "item_5",
14
+ "matter_synthesizer"
15
+ ],
16
+ "by_node": {
17
+ "item_5": {
18
+ "node_name": "",
19
+ "node_type": "Item",
20
+ "template_id": "item_5",
21
+ "init_inputs": {},
22
+ "init_outputs": {
23
+ "content": {
24
+ "type": "Hex_String_Key_AES",
25
+ "description": "AES Key"
26
+ }
27
+ }
28
+ },
29
+ "matter_synthesizer": {
30
+ "node_name": "Matter Synthesizer",
31
+ "node_type": "Tool",
32
+ "template_id": "matter_synthesizer",
33
+ "init_inputs": {
34
+ "blueprint": {
35
+ "type": "Text_Generic",
36
+ "description": "Object Blueprint"
37
+ }
38
+ },
39
+ "init_outputs": {}
40
+ }
41
+ }
42
+ },
43
+ "initial_values": {
44
+ "item_5": {
45
+ "init_inputs": {},
46
+ "init_outputs": {
47
+ "content": "8f3a2b1c4d5e6f09a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5"
48
+ }
49
+ },
50
+ "matter_synthesizer": {
51
+ "init_inputs": {
52
+ "blueprint": "{\"schema_id\": \"syn_9921_x\", \"component\": \"Resonance Crystal\", \"material_grade\": \"A+\", \"fabrication_steps\": [\"extrude\", \"cool\", \"polish\"]}"
53
+ },
54
+ "init_outputs": {}
55
+ }
56
+ },
57
+ "intro_narrative": "You have finally breached the hidden study of the elusive cryptographer, Elias Thorne. The air is thick with dust, smelling faintly of old paper and ozone. A single beam of moonlight cuts through the boarded-up windows, illuminating a workspace cluttered with strange artifacts and bizarre machinery. Thorne was a master of hiding secrets within secrets, and legend says his ultimate prize—an unbreakable master encryption key—is still concealed somewhere within these walls. You know that simply breaking things open won't work; Thorne's security measures are ingenious and layered. You must carefully search the room, examining the bizarre devices and curious objects left behind. Your objective is clear: uncover the master key before Thorne's automated security systems lock the room down forever. Time is ticking.",
58
+ "narrative_style": "mystery"
59
+ },
60
+ "nodes": [
61
+ {
62
+ "id": "item_5",
63
+ "name": "",
64
+ "description": "",
65
+ "type": "Item",
66
+ "template_id": "item_5",
67
+ "initial_visible": false,
68
+ "is_revealed": false,
69
+ "inputs": [
70
+ {
71
+ "name": "container",
72
+ "type": "Hidden_Item",
73
+ "description": "Inside"
74
+ }
75
+ ],
76
+ "outputs": [
77
+ {
78
+ "name": "content",
79
+ "type": "Hex_String_Key_AES",
80
+ "description": "AES Key",
81
+ "value": "8f3a2b1c4d5e6f09a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5"
82
+ }
83
+ ],
84
+ "init": {
85
+ "inputs": {},
86
+ "outputs": {
87
+ "content": "8f3a2b1c4d5e6f09a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5"
88
+ }
89
+ },
90
+ "narrative": "A heavily reinforced steel safe embedded securely into the wall. It clearly holds the final secret."
91
+ },
92
+ {
93
+ "id": "item_8",
94
+ "name": "",
95
+ "description": "",
96
+ "type": "Item",
97
+ "template_id": "item_8",
98
+ "initial_visible": false,
99
+ "is_revealed": false,
100
+ "inputs": [
101
+ {
102
+ "name": "source_tool",
103
+ "type": "Hidden_Item",
104
+ "description": "Produced by"
105
+ }
106
+ ],
107
+ "outputs": [
108
+ {
109
+ "name": "content",
110
+ "type": "Hidden_Item",
111
+ "description": "The integer"
112
+ }
113
+ ],
114
+ "narrative": "A heavy mahogany puzzle box adorned with complex, interlocking mechanical gears."
115
+ },
116
+ {
117
+ "id": "item_8_726f",
118
+ "name": "",
119
+ "description": "",
120
+ "type": "Item",
121
+ "template_id": "item_8",
122
+ "initial_visible": false,
123
+ "is_revealed": false,
124
+ "inputs": [
125
+ {
126
+ "name": "source_tool",
127
+ "type": "Hidden_Item",
128
+ "description": "Produced by"
129
+ }
130
+ ],
131
+ "outputs": [
132
+ {
133
+ "name": "content",
134
+ "type": "Hidden_Item",
135
+ "description": "The integer"
136
+ }
137
+ ],
138
+ "narrative": "A small golden cipher disc covered in intricate, barely legible engravings."
139
+ },
140
+ {
141
+ "id": "item_16",
142
+ "name": "",
143
+ "description": "",
144
+ "type": "Item",
145
+ "template_id": "item_16",
146
+ "initial_visible": false,
147
+ "is_revealed": false,
148
+ "inputs": [
149
+ {
150
+ "name": "source_tool",
151
+ "type": "Item",
152
+ "description": "Produced by",
153
+ "value": "synthesized_item_bbc637141cd20ccc"
154
+ }
155
+ ],
156
+ "outputs": [
157
+ {
158
+ "name": "content",
159
+ "type": "Hidden_Item",
160
+ "description": "Timezone text"
161
+ }
162
+ ],
163
+ "narrative": "An intricate brass pocket watch with unusual timezone markings etched across its delicate face."
164
+ },
165
+ {
166
+ "id": "matter_synthesizer",
167
+ "name": "Matter Synthesizer",
168
+ "description": "Synthesizes physical objects from data blueprints.",
169
+ "type": "Tool",
170
+ "template_id": "matter_synthesizer",
171
+ "initial_visible": true,
172
+ "is_revealed": true,
173
+ "inputs": [
174
+ {
175
+ "name": "trigger_hidden",
176
+ "type": "Hidden_Item",
177
+ "description": "Hidden item required to unlock this tool"
178
+ },
179
+ {
180
+ "name": "blueprint",
181
+ "type": "Text_Generic",
182
+ "description": "Object Blueprint",
183
+ "value": "{\"schema_id\": \"syn_9921_x\", \"component\": \"Resonance Crystal\", \"material_grade\": \"A+\", \"fabrication_steps\": [\"extrude\", \"cool\", \"polish\"]}"
184
+ }
185
+ ],
186
+ "outputs": [
187
+ {
188
+ "name": "output_slot",
189
+ "type": "Item",
190
+ "description": "Synthesized Object",
191
+ "value": "synthesized_item_bbc637141cd20ccc"
192
+ }
193
+ ],
194
+ "init": {
195
+ "inputs": {
196
+ "blueprint": "{\"schema_id\": \"syn_9921_x\", \"component\": \"Resonance Crystal\", \"material_grade\": \"A+\", \"fabrication_steps\": [\"extrude\", \"cool\", \"polish\"]}"
197
+ },
198
+ "outputs": {}
199
+ },
200
+ "narrative": "An experimental Matter Synthesizer resting quietly on a workbench. It appears designed to materialize physical objects from digital blueprints."
201
+ }
202
+ ],
203
+ "edges": [
204
+ {
205
+ "source_id": "item_8",
206
+ "target_id": "item_5",
207
+ "connection_type": "Hidden_Item",
208
+ "source_port": "content",
209
+ "target_port": "container"
210
+ },
211
+ {
212
+ "source_id": "item_8_726f",
213
+ "target_id": "item_8",
214
+ "connection_type": "Hidden_Item",
215
+ "source_port": "content",
216
+ "target_port": "source_tool"
217
+ },
218
+ {
219
+ "source_id": "item_16",
220
+ "target_id": "item_8_726f",
221
+ "connection_type": "Hidden_Item",
222
+ "source_port": "content",
223
+ "target_port": "source_tool"
224
+ },
225
+ {
226
+ "source_id": "matter_synthesizer",
227
+ "target_id": "item_16",
228
+ "connection_type": "Item",
229
+ "source_port": "output_slot",
230
+ "target_port": "source_tool"
231
+ }
232
+ ]
233
+ }
data/questions/5/narrative/skeleton_e165e4b4_narrative.json ADDED
@@ -0,0 +1,274 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 4,
5
+ "win_node_id": "base64_encode",
6
+ "win_condition": {
7
+ "type": "tool_output",
8
+ "node_id": "base64_encode",
9
+ "output_port": "b64",
10
+ "output_type": "Text_Generic",
11
+ "description": "Execute Base64 Encoder and get the output from port 'b64'"
12
+ },
13
+ "source_init": {
14
+ "source_nodes": [
15
+ "hmac_sha256",
16
+ "hash_sha256",
17
+ "container_2"
18
+ ],
19
+ "by_node": {
20
+ "hmac_sha256": {
21
+ "node_name": "HMAC-SHA256 Calculator",
22
+ "node_type": "Tool",
23
+ "template_id": "hmac_sha256",
24
+ "init_inputs": {
25
+ "text": {
26
+ "type": "Text_Generic",
27
+ "description": "Text message"
28
+ }
29
+ },
30
+ "init_outputs": {}
31
+ },
32
+ "hash_sha256": {
33
+ "node_name": "SHA-256 Hasher",
34
+ "node_type": "Tool",
35
+ "template_id": "hash_sha256",
36
+ "init_inputs": {
37
+ "text": {
38
+ "type": "Text_Generic",
39
+ "description": "Text to hash"
40
+ }
41
+ },
42
+ "init_outputs": {}
43
+ },
44
+ "container_2": {
45
+ "node_name": "",
46
+ "node_type": "Item",
47
+ "template_id": "container_2",
48
+ "init_inputs": {
49
+ "fingerprint_input": {
50
+ "type": "Hex_String",
51
+ "description": "Fingerprint Hash"
52
+ }
53
+ },
54
+ "init_outputs": {}
55
+ }
56
+ }
57
+ },
58
+ "initial_values": {
59
+ "hmac_sha256": {
60
+ "init_inputs": {
61
+ "text": "Authorization request payload for timestamp 1715629400"
62
+ },
63
+ "init_outputs": {}
64
+ },
65
+ "hash_sha256": {
66
+ "init_inputs": {
67
+ "text": "Initial seed string for key derivation process"
68
+ },
69
+ "init_outputs": {}
70
+ },
71
+ "container_2": {
72
+ "init_inputs": {
73
+ "fingerprint_input": "f1a2b3c4d5e6f7081928374650617283"
74
+ },
75
+ "init_outputs": {}
76
+ }
77
+ },
78
+ "intro_narrative": "You awaken in the dimly lit command center of Orbital Station Aether-7, a top-secret research facility orbiting a gas giant. The warning klaxons are blaring a rhythmic pulse, signaling that the station's structural integrity is rapidly deteriorating after a massive micro-meteoroid impact. The automated systems are offline, and the primary AI has entered a hard lockdown, severing all communication arrays. Your only chance of survival is to manually bypass the security overrides and send a distress signal to the planetary fleet stationed on the moon below. The control room is littered with offline equipment, locked biometric safes, and experimental tech components scattered across the floor. You must navigate through the station's archaic data protocols, reactivate the necessary encryption modules, and broadcast your precise coordinates before the hull breaches completely and the oxygen runs out. Every second counts as the metal groans around you.",
79
+ "narrative_style": "sci_fi"
80
+ },
81
+ "nodes": [
82
+ {
83
+ "id": "base64_encode",
84
+ "name": "Base64 Encoder",
85
+ "description": "Encode hex bytes to base64.",
86
+ "type": "Tool",
87
+ "template_id": "base64_encode",
88
+ "initial_visible": true,
89
+ "is_revealed": true,
90
+ "inputs": [
91
+ {
92
+ "name": "hex",
93
+ "type": "Hex_String",
94
+ "description": "Hex bytes",
95
+ "value": "1cd5af685cf12bd783ad431976a846bc65ae9bea10a106953e2f78775036ec30"
96
+ }
97
+ ],
98
+ "outputs": [
99
+ {
100
+ "name": "b64",
101
+ "type": "Text_Generic",
102
+ "description": "Base64 string",
103
+ "value": "HNWvaFzxK9eDrUMZdqhGvGWum+oQoQaVPi94d1A27DA="
104
+ }
105
+ ],
106
+ "narrative": "This is the main orbital transmitter. It requires input from the integrity verification terminal to finalize the transmission."
107
+ },
108
+ {
109
+ "id": "hmac_sha256",
110
+ "name": "HMAC-SHA256 Calculator",
111
+ "description": "HMAC-SHA256(text) with hex key.",
112
+ "type": "Tool",
113
+ "template_id": "hmac_sha256",
114
+ "initial_visible": true,
115
+ "is_revealed": true,
116
+ "inputs": [
117
+ {
118
+ "name": "hex_key",
119
+ "type": "Hex_String",
120
+ "description": "Hex key",
121
+ "value": "ff508622f0581b13f8b7dcf5f78c849562f3134c43bbeeb3c955a63e0ff0812f"
122
+ },
123
+ {
124
+ "name": "text",
125
+ "type": "Text_Generic",
126
+ "description": "Text message",
127
+ "value": "Authorization request payload for timestamp 1715629400"
128
+ }
129
+ ],
130
+ "outputs": [
131
+ {
132
+ "name": "hex",
133
+ "type": "Hex_String",
134
+ "description": "HMAC Hex digest",
135
+ "value": "1cd5af685cf12bd783ad431976a846bc65ae9bea10a106953e2f78775036ec30"
136
+ }
137
+ ],
138
+ "init": {
139
+ "inputs": {
140
+ "text": "Authorization request payload for timestamp 1715629400"
141
+ },
142
+ "outputs": {}
143
+ },
144
+ "narrative": "This is an integrity verification terminal. It requires input from the quantum hashing core."
145
+ },
146
+ {
147
+ "id": "hash_sha256",
148
+ "name": "SHA-256 Hasher",
149
+ "description": "SHA-256 over UTF-8 text; returns hex.",
150
+ "type": "Tool",
151
+ "template_id": "hash_sha256",
152
+ "initial_visible": false,
153
+ "is_revealed": false,
154
+ "inputs": [
155
+ {
156
+ "name": "trigger_item",
157
+ "type": "Item",
158
+ "description": "Required item to unlock this tool"
159
+ },
160
+ {
161
+ "name": "text",
162
+ "type": "Text_Generic",
163
+ "description": "Text to hash",
164
+ "value": "Initial seed string for key derivation process"
165
+ }
166
+ ],
167
+ "outputs": [
168
+ {
169
+ "name": "hex",
170
+ "type": "Hex_String",
171
+ "description": "SHA-256 Hex digest",
172
+ "value": "ff508622f0581b13f8b7dcf5f78c849562f3134c43bbeeb3c955a63e0ff0812f"
173
+ }
174
+ ],
175
+ "init": {
176
+ "inputs": {
177
+ "text": "Initial seed string for key derivation process"
178
+ },
179
+ "outputs": {}
180
+ },
181
+ "narrative": "A quantum hashing core."
182
+ },
183
+ {
184
+ "id": "container_2",
185
+ "name": "",
186
+ "description": "",
187
+ "type": "Item",
188
+ "template_id": "container_2",
189
+ "initial_visible": false,
190
+ "is_revealed": false,
191
+ "inputs": [
192
+ {
193
+ "name": "container",
194
+ "type": "Hidden_Item",
195
+ "description": "Inside"
196
+ },
197
+ {
198
+ "name": "fingerprint_input",
199
+ "type": "Hex_String",
200
+ "description": "Fingerprint Hash",
201
+ "value": "f1a2b3c4d5e6f7081928374650617283"
202
+ }
203
+ ],
204
+ "outputs": [
205
+ {
206
+ "name": "inner_space",
207
+ "type": "Item",
208
+ "description": "Contents"
209
+ }
210
+ ],
211
+ "init": {
212
+ "inputs": {
213
+ "fingerprint_input": "f1a2b3c4d5e6f7081928374650617283"
214
+ },
215
+ "outputs": {}
216
+ },
217
+ "narrative": "A biometric lockbox."
218
+ },
219
+ {
220
+ "id": "item_16",
221
+ "name": "",
222
+ "description": "",
223
+ "type": "Item",
224
+ "template_id": "item_16",
225
+ "initial_visible": true,
226
+ "is_revealed": true,
227
+ "inputs": [
228
+ {
229
+ "name": "source_tool",
230
+ "type": "Item",
231
+ "description": "Produced by"
232
+ }
233
+ ],
234
+ "outputs": [
235
+ {
236
+ "name": "content",
237
+ "type": "Hidden_Item",
238
+ "description": "Timezone text"
239
+ }
240
+ ],
241
+ "narrative": "A dusty chronometer module."
242
+ }
243
+ ],
244
+ "edges": [
245
+ {
246
+ "source_id": "hmac_sha256",
247
+ "target_id": "base64_encode",
248
+ "connection_type": "Hex_String",
249
+ "source_port": "hex",
250
+ "target_port": "hex"
251
+ },
252
+ {
253
+ "source_id": "hash_sha256",
254
+ "target_id": "hmac_sha256",
255
+ "connection_type": "Hex_String",
256
+ "source_port": "hex",
257
+ "target_port": "hex_key"
258
+ },
259
+ {
260
+ "source_id": "container_2",
261
+ "target_id": "hash_sha256",
262
+ "connection_type": "Item",
263
+ "source_port": "inner_space",
264
+ "target_port": "trigger_item"
265
+ },
266
+ {
267
+ "source_id": "item_16",
268
+ "target_id": "container_2",
269
+ "connection_type": "Hidden_Item",
270
+ "source_port": "content",
271
+ "target_port": "container"
272
+ }
273
+ ]
274
+ }
data/questions/5/narrative/skeleton_e1a2d103_narrative.json ADDED
@@ -0,0 +1,262 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 4,
5
+ "win_node_id": "item_12",
6
+ "win_condition": {
7
+ "type": "item_content",
8
+ "node_id": "item_12",
9
+ "description": "Obtain the content of "
10
+ },
11
+ "source_init": {
12
+ "source_nodes": [
13
+ "item_12",
14
+ "container_3",
15
+ "container_2"
16
+ ],
17
+ "by_node": {
18
+ "item_12": {
19
+ "node_name": "",
20
+ "node_type": "Item",
21
+ "template_id": "item_12",
22
+ "init_inputs": {},
23
+ "init_outputs": {
24
+ "content": {
25
+ "type": "Hex_String",
26
+ "description": "The hex code"
27
+ }
28
+ }
29
+ },
30
+ "container_3": {
31
+ "node_name": "",
32
+ "node_type": "Item",
33
+ "template_id": "container_3",
34
+ "init_inputs": {
35
+ "fingerprint_input": {
36
+ "type": "Big_Int",
37
+ "description": "Fingerprint Hash"
38
+ }
39
+ },
40
+ "init_outputs": {}
41
+ },
42
+ "container_2": {
43
+ "node_name": "",
44
+ "node_type": "Item",
45
+ "template_id": "container_2",
46
+ "init_inputs": {
47
+ "fingerprint_input": {
48
+ "type": "Hex_String",
49
+ "description": "Fingerprint Hash"
50
+ }
51
+ },
52
+ "init_outputs": {}
53
+ }
54
+ }
55
+ },
56
+ "initial_values": {
57
+ "item_12": {
58
+ "init_inputs": {},
59
+ "init_outputs": {
60
+ "content": "a1b2c3d4e5f60718293a4b5c6d7e8f90"
61
+ }
62
+ },
63
+ "container_3": {
64
+ "init_inputs": {
65
+ "fingerprint_input": "948271635482910384756291038472"
66
+ },
67
+ "init_outputs": {}
68
+ },
69
+ "container_2": {
70
+ "init_inputs": {
71
+ "fingerprint_input": "8f7e6d5c4b3a291807f6e5d4c3b2a190"
72
+ },
73
+ "init_outputs": {}
74
+ }
75
+ },
76
+ "intro_narrative": "Detective, you have just stepped past the yellow police tape into the dimly lit study of Blackwood Manor. A renowned cryptographer has been found dead under suspicious circumstances. The local authorities are stumped by the layers of security he left behind—a complex web of hidden compartments, biometric locks, and encrypted hardware. The air in the room is thick with the smell of old paper and ozone from damaged electronics. Your primary objective is to obtain the elusive final forensic report, an encrypted file that the victim managed to hide moments before his death. This report contains the undeniable proof of the killer's identity. To get to it, you will need to carefully examine the environment, bypassing advanced security measures scattered throughout the room. Trust your instincts, examine every detail of the devices you uncover, and piece together the digital trail. The suspect is trying to flee the country, so you must work quickly to extract the critical evidence before the trail goes cold.",
77
+ "narrative_style": "detective"
78
+ },
79
+ "nodes": [
80
+ {
81
+ "id": "item_12",
82
+ "name": "",
83
+ "description": "",
84
+ "type": "Item",
85
+ "template_id": "item_12",
86
+ "initial_visible": false,
87
+ "is_revealed": false,
88
+ "inputs": [
89
+ {
90
+ "name": "source_tool",
91
+ "type": "Item",
92
+ "description": "Produced by"
93
+ }
94
+ ],
95
+ "outputs": [
96
+ {
97
+ "name": "content",
98
+ "type": "Hex_String",
99
+ "description": "The hex code",
100
+ "value": "a1b2c3d4e5f60718293a4b5c6d7e8f90"
101
+ }
102
+ ],
103
+ "init": {
104
+ "inputs": {},
105
+ "outputs": {
106
+ "content": "a1b2c3d4e5f60718293a4b5c6d7e8f90"
107
+ }
108
+ },
109
+ "narrative": "A sealed forensic report document containing the final verdict. Securing this will blow the case wide open."
110
+ },
111
+ {
112
+ "id": "container_3",
113
+ "name": "",
114
+ "description": "",
115
+ "type": "Item",
116
+ "template_id": "container_3",
117
+ "initial_visible": false,
118
+ "is_revealed": false,
119
+ "inputs": [
120
+ {
121
+ "name": "container",
122
+ "type": "Hidden_Item",
123
+ "description": "Inside"
124
+ },
125
+ {
126
+ "name": "fingerprint_input",
127
+ "type": "Big_Int",
128
+ "description": "Fingerprint Hash",
129
+ "value": "948271635482910384756291038472"
130
+ }
131
+ ],
132
+ "outputs": [
133
+ {
134
+ "name": "inner_space",
135
+ "type": "Item",
136
+ "description": "Contents"
137
+ }
138
+ ],
139
+ "init": {
140
+ "inputs": {
141
+ "fingerprint_input": "948271635482910384756291038472"
142
+ },
143
+ "outputs": {}
144
+ },
145
+ "narrative": "A heavy-duty police evidence locker with a biometric lock. It seems to have been hastily secured."
146
+ },
147
+ {
148
+ "id": "item_16",
149
+ "name": "",
150
+ "description": "",
151
+ "type": "Item",
152
+ "template_id": "item_16",
153
+ "initial_visible": false,
154
+ "is_revealed": false,
155
+ "inputs": [
156
+ {
157
+ "name": "source_tool",
158
+ "type": "Item",
159
+ "description": "Produced by"
160
+ }
161
+ ],
162
+ "outputs": [
163
+ {
164
+ "name": "content",
165
+ "type": "Hidden_Item",
166
+ "description": "Timezone text"
167
+ }
168
+ ],
169
+ "narrative": "A damaged encrypted personal digital assistant found at the crime scene. The screen is cracked but functional."
170
+ },
171
+ {
172
+ "id": "container_2",
173
+ "name": "",
174
+ "description": "",
175
+ "type": "Item",
176
+ "template_id": "container_2",
177
+ "initial_visible": false,
178
+ "is_revealed": false,
179
+ "inputs": [
180
+ {
181
+ "name": "container",
182
+ "type": "Hidden_Item",
183
+ "description": "Inside"
184
+ },
185
+ {
186
+ "name": "fingerprint_input",
187
+ "type": "Hex_String",
188
+ "description": "Fingerprint Hash",
189
+ "value": "8f7e6d5c4b3a291807f6e5d4c3b2a190"
190
+ }
191
+ ],
192
+ "outputs": [
193
+ {
194
+ "name": "inner_space",
195
+ "type": "Item",
196
+ "description": "Contents"
197
+ }
198
+ ],
199
+ "init": {
200
+ "inputs": {
201
+ "fingerprint_input": "8f7e6d5c4b3a291807f6e5d4c3b2a190"
202
+ },
203
+ "outputs": {}
204
+ },
205
+ "narrative": "A sleek, wall-mounted biometric safe. It features a high-tech glass scanning pad for identification."
206
+ },
207
+ {
208
+ "id": "item_16_e555",
209
+ "name": "",
210
+ "description": "",
211
+ "type": "Item",
212
+ "template_id": "item_16",
213
+ "initial_visible": true,
214
+ "is_revealed": true,
215
+ "inputs": [
216
+ {
217
+ "name": "source_tool",
218
+ "type": "Item",
219
+ "description": "Produced by"
220
+ }
221
+ ],
222
+ "outputs": [
223
+ {
224
+ "name": "content",
225
+ "type": "Hidden_Item",
226
+ "description": "Timezone text"
227
+ }
228
+ ],
229
+ "narrative": "A leather-bound daily planner belonging to the victim. It appears to contain various personal notes and schedules."
230
+ }
231
+ ],
232
+ "edges": [
233
+ {
234
+ "source_id": "container_3",
235
+ "target_id": "item_12",
236
+ "connection_type": "Item",
237
+ "source_port": "inner_space",
238
+ "target_port": "source_tool"
239
+ },
240
+ {
241
+ "source_id": "item_16",
242
+ "target_id": "container_3",
243
+ "connection_type": "Hidden_Item",
244
+ "source_port": "content",
245
+ "target_port": "container"
246
+ },
247
+ {
248
+ "source_id": "container_2",
249
+ "target_id": "item_16",
250
+ "connection_type": "Item",
251
+ "source_port": "inner_space",
252
+ "target_port": "source_tool"
253
+ },
254
+ {
255
+ "source_id": "item_16_e555",
256
+ "target_id": "container_2",
257
+ "connection_type": "Hidden_Item",
258
+ "source_port": "content",
259
+ "target_port": "container"
260
+ }
261
+ ]
262
+ }
data/questions/5/narrative/skeleton_f4252fd6_narrative.json ADDED
@@ -0,0 +1,436 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 6,
5
+ "win_node_id": "terminal_2",
6
+ "win_condition": {
7
+ "type": "tool_output",
8
+ "node_id": "terminal_2",
9
+ "output_port": "text_result",
10
+ "output_type": "Text_Generic",
11
+ "description": "Execute and get the output from port 'text_result'"
12
+ },
13
+ "source_init": {
14
+ "source_nodes": [
15
+ "terminal_2",
16
+ "num_base_convert",
17
+ "calc_modexp",
18
+ "calc_inv_mod",
19
+ "graph_shortest_path"
20
+ ],
21
+ "by_node": {
22
+ "terminal_2": {
23
+ "node_name": "",
24
+ "node_type": "Tool",
25
+ "template_id": "terminal_2",
26
+ "init_inputs": {},
27
+ "init_outputs": {
28
+ "text_result": {
29
+ "type": "Text_Generic",
30
+ "description": "Text result for partial input"
31
+ },
32
+ "hex_result": {
33
+ "type": "Hex_String",
34
+ "description": "Hexadecimal result when both inputs provided"
35
+ },
36
+ "math_token": {
37
+ "type": "Item",
38
+ "description": "Mathematics token when both inputs provided"
39
+ }
40
+ }
41
+ },
42
+ "num_base_convert": {
43
+ "node_name": "Base Converter",
44
+ "node_type": "Tool",
45
+ "template_id": "num_base_convert",
46
+ "init_inputs": {
47
+ "to_base": {
48
+ "type": "Big_Int",
49
+ "description": "To base"
50
+ }
51
+ },
52
+ "init_outputs": {}
53
+ },
54
+ "calc_modexp": {
55
+ "node_name": "BigInt Modular Exponentiation",
56
+ "node_type": "Tool",
57
+ "template_id": "calc_modexp",
58
+ "init_inputs": {
59
+ "base": {
60
+ "type": "Big_Int",
61
+ "description": "Base"
62
+ },
63
+ "exp": {
64
+ "type": "Big_Int",
65
+ "description": "Exponent"
66
+ }
67
+ },
68
+ "init_outputs": {}
69
+ },
70
+ "calc_inv_mod": {
71
+ "node_name": "BigInt Modular Inverse",
72
+ "node_type": "Tool",
73
+ "template_id": "calc_inv_mod",
74
+ "init_inputs": {
75
+ "mod": {
76
+ "type": "Big_Int",
77
+ "description": "Modulus"
78
+ }
79
+ },
80
+ "init_outputs": {}
81
+ },
82
+ "graph_shortest_path": {
83
+ "node_name": "Shortest Path Finder",
84
+ "node_type": "Tool",
85
+ "template_id": "graph_shortest_path",
86
+ "init_inputs": {
87
+ "file_id": {
88
+ "type": "File_Id",
89
+ "description": "Graph JSON file ID"
90
+ },
91
+ "src": {
92
+ "type": "Text_Generic",
93
+ "description": "Source node"
94
+ },
95
+ "dst": {
96
+ "type": "Text_Generic",
97
+ "description": "Destination node"
98
+ }
99
+ },
100
+ "init_outputs": {
101
+ "path": {
102
+ "type": "Text_Generic",
103
+ "description": "Path list"
104
+ },
105
+ "cost": {
106
+ "type": "Big_Int",
107
+ "description": "Path cost"
108
+ }
109
+ }
110
+ }
111
+ }
112
+ },
113
+ "initial_values": {
114
+ "terminal_2": {
115
+ "init_inputs": {},
116
+ "init_outputs": {
117
+ "text_result": "VENI VIDI VICI",
118
+ "hex_result": "8f3a2b1c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a",
119
+ "math_token": "5F2a-9c8E-4b1D-7e3A"
120
+ }
121
+ },
122
+ "num_base_convert": {
123
+ "init_inputs": {
124
+ "to_base": "10"
125
+ },
126
+ "init_outputs": {}
127
+ },
128
+ "calc_modexp": {
129
+ "init_inputs": {
130
+ "base": "5",
131
+ "exp": "48291038475629384756102938475"
132
+ },
133
+ "init_outputs": {}
134
+ },
135
+ "calc_inv_mod": {
136
+ "init_inputs": {
137
+ "mod": "582917"
138
+ },
139
+ "init_outputs": {}
140
+ },
141
+ "graph_shortest_path": {
142
+ "init_inputs": {
143
+ "file_id": "network_graph_v4.json",
144
+ "src": "Data_Center_Primary",
145
+ "dst": "Edge_Node_backup"
146
+ },
147
+ "init_outputs": {
148
+ "path": "[\"Data_Center_Primary\", \"Backbone_Router\", \"Fiber_Switch_02\", \"Regional_Hub\", \"Edge_Node_backup\"]",
149
+ "cost": "157294"
150
+ }
151
+ }
152
+ },
153
+ "intro_narrative": "You awaken to the blaring sirens of Orbital Station Aegis-7. Red emergency lights bathe the central command deck in an eerie glow. The station's central antimatter reactor is suffering a cascading failure, and you have less than an hour before the entire sector is vaporized. Your only way out is the emergency escape pod, but the automated lockdown protocols have sealed the launch bay tightly. To override the heavy blast doors, you must reboot the station's deeply encrypted systems and execute a manual override. The command deck is littered with specialized diagnostic equipment left behind by the engineering crew, each component relying on fragmented data from another. You'll need to carefully trace the data flow, decrypting the navigation pathways and stabilizing the energy modulators to bypass the security matrix. The cold vacuum of space waits just outside the reinforced glass, and your oxygen reserves are rapidly dropping. Find the correct sequence, process the encrypted data streams, and activate the Mainframe Core before Aegis-7 becomes your metallic tomb.",
154
+ "narrative_style": "sci_fi"
155
+ },
156
+ "nodes": [
157
+ {
158
+ "id": "terminal_2",
159
+ "name": "",
160
+ "description": "",
161
+ "type": "Tool",
162
+ "template_id": "terminal_2",
163
+ "initial_visible": true,
164
+ "is_revealed": true,
165
+ "inputs": [
166
+ {
167
+ "name": "num1",
168
+ "type": "Big_Int",
169
+ "description": "First Number",
170
+ "value": "56321"
171
+ },
172
+ {
173
+ "name": "num2",
174
+ "type": "Big_Int",
175
+ "description": "Second Number",
176
+ "value": "56321"
177
+ }
178
+ ],
179
+ "outputs": [
180
+ {
181
+ "name": "text_result",
182
+ "type": "Text_Generic",
183
+ "description": "Text result for partial input",
184
+ "value": "VENI VIDI VICI"
185
+ },
186
+ {
187
+ "name": "hex_result",
188
+ "type": "Hex_String",
189
+ "description": "Hexadecimal result when both inputs provided",
190
+ "value": "8f3a2b1c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a"
191
+ },
192
+ {
193
+ "name": "math_token",
194
+ "type": "Item",
195
+ "description": "Mathematics token when both inputs provided",
196
+ "value": "5F2a-9c8E-4b1D-7e3A"
197
+ }
198
+ ],
199
+ "init": {
200
+ "inputs": {},
201
+ "outputs": {
202
+ "text_result": "VENI VIDI VICI",
203
+ "hex_result": "8f3a2b1c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a",
204
+ "math_token": "5F2a-9c8E-4b1D-7e3A"
205
+ }
206
+ },
207
+ "narrative": "The Mainframe Core controls the escape pod bays. It needs inputs from the Phase Shifter and the Quantum Exponentiator to activate the launch."
208
+ },
209
+ {
210
+ "id": "num_base_convert",
211
+ "name": "Base Converter",
212
+ "description": "Convert integer between bases (2..36).",
213
+ "type": "Tool",
214
+ "template_id": "num_base_convert",
215
+ "initial_visible": true,
216
+ "is_revealed": true,
217
+ "inputs": [
218
+ {
219
+ "name": "s",
220
+ "type": "Big_Int",
221
+ "description": "Input integer value",
222
+ "value": "56321"
223
+ },
224
+ {
225
+ "name": "from_base",
226
+ "type": "Big_Int",
227
+ "description": "From base",
228
+ "value": "550232"
229
+ },
230
+ {
231
+ "name": "to_base",
232
+ "type": "Big_Int",
233
+ "description": "To base",
234
+ "value": "10"
235
+ }
236
+ ],
237
+ "outputs": [
238
+ {
239
+ "name": "str",
240
+ "type": "Big_Int",
241
+ "description": "Converted integer value",
242
+ "value": "56321"
243
+ }
244
+ ],
245
+ "init": {
246
+ "inputs": {
247
+ "to_base": "10"
248
+ },
249
+ "outputs": {}
250
+ },
251
+ "narrative": "A Phase Shifter for realigning signal waves. It requires inputs from both the Inversion Modulator and the Quantum Exponentiator."
252
+ },
253
+ {
254
+ "id": "calc_modexp",
255
+ "name": "BigInt Modular Exponentiation",
256
+ "description": "Modular exponentiation pow(base, exp, mod) with large decimal strings.",
257
+ "type": "Tool",
258
+ "template_id": "calc_modexp",
259
+ "initial_visible": true,
260
+ "is_revealed": true,
261
+ "inputs": [
262
+ {
263
+ "name": "base",
264
+ "type": "Big_Int",
265
+ "description": "Base",
266
+ "value": "5"
267
+ },
268
+ {
269
+ "name": "exp",
270
+ "type": "Big_Int",
271
+ "description": "Exponent",
272
+ "value": "48291038475629384756102938475"
273
+ },
274
+ {
275
+ "name": "mod",
276
+ "type": "Big_Int",
277
+ "description": "Modulus",
278
+ "value": "157294"
279
+ }
280
+ ],
281
+ "outputs": [
282
+ {
283
+ "name": "value",
284
+ "type": "Big_Int",
285
+ "description": "Result value",
286
+ "value": "56321"
287
+ }
288
+ ],
289
+ "init": {
290
+ "inputs": {
291
+ "base": "5",
292
+ "exp": "48291038475629384756102938475"
293
+ },
294
+ "outputs": {}
295
+ },
296
+ "narrative": "This is the Quantum Exponentiator. It requires input from the Navigational Matrix to calculate subspace frequencies."
297
+ },
298
+ {
299
+ "id": "calc_inv_mod",
300
+ "name": "BigInt Modular Inverse",
301
+ "description": "Modular inverse of a modulo mod (large decimal strings).",
302
+ "type": "Tool",
303
+ "template_id": "calc_inv_mod",
304
+ "initial_visible": true,
305
+ "is_revealed": true,
306
+ "inputs": [
307
+ {
308
+ "name": "a",
309
+ "type": "Big_Int",
310
+ "description": "Integer a",
311
+ "value": "56321"
312
+ },
313
+ {
314
+ "name": "mod",
315
+ "type": "Big_Int",
316
+ "description": "Modulus",
317
+ "value": "582917"
318
+ }
319
+ ],
320
+ "outputs": [
321
+ {
322
+ "name": "inv",
323
+ "type": "Big_Int",
324
+ "description": "Modular inverse",
325
+ "value": "550232"
326
+ }
327
+ ],
328
+ "init": {
329
+ "inputs": {
330
+ "mod": "582917"
331
+ },
332
+ "outputs": {}
333
+ },
334
+ "narrative": "The Inversion Modulator regulates energy flow. It processes data directly from the Quantum Exponentiator."
335
+ },
336
+ {
337
+ "id": "graph_shortest_path",
338
+ "name": "Shortest Path Finder",
339
+ "description": "Shortest path on graph json file with edges list.",
340
+ "type": "Tool",
341
+ "template_id": "graph_shortest_path",
342
+ "initial_visible": true,
343
+ "is_revealed": true,
344
+ "inputs": [
345
+ {
346
+ "name": "file_id",
347
+ "type": "File_Id",
348
+ "description": "Graph JSON file ID",
349
+ "value": "network_graph_v4.json"
350
+ },
351
+ {
352
+ "name": "src",
353
+ "type": "Text_Generic",
354
+ "description": "Source node",
355
+ "value": "Data_Center_Primary"
356
+ },
357
+ {
358
+ "name": "dst",
359
+ "type": "Text_Generic",
360
+ "description": "Destination node",
361
+ "value": "Edge_Node_backup"
362
+ }
363
+ ],
364
+ "outputs": [
365
+ {
366
+ "name": "path",
367
+ "type": "Text_Generic",
368
+ "description": "Path list",
369
+ "value": "[\"Data_Center_Primary\", \"Backbone_Router\", \"Fiber_Switch_02\", \"Regional_Hub\", \"Edge_Node_backup\"]"
370
+ },
371
+ {
372
+ "name": "cost",
373
+ "type": "Big_Int",
374
+ "description": "Path cost",
375
+ "value": "157294"
376
+ }
377
+ ],
378
+ "init": {
379
+ "inputs": {
380
+ "file_id": "network_graph_v4.json",
381
+ "src": "Data_Center_Primary",
382
+ "dst": "Edge_Node_backup"
383
+ },
384
+ "outputs": {
385
+ "path": "[\"Data_Center_Primary\", \"Backbone_Router\", \"Fiber_Switch_02\", \"Regional_Hub\", \"Edge_Node_backup\"]",
386
+ "cost": "157294"
387
+ }
388
+ },
389
+ "narrative": "A holographic Navigational Matrix mapping out sectors of the derelict station."
390
+ }
391
+ ],
392
+ "edges": [
393
+ {
394
+ "source_id": "num_base_convert",
395
+ "target_id": "terminal_2",
396
+ "connection_type": "Big_Int",
397
+ "source_port": "str",
398
+ "target_port": "num1"
399
+ },
400
+ {
401
+ "source_id": "calc_modexp",
402
+ "target_id": "terminal_2",
403
+ "connection_type": "Big_Int",
404
+ "source_port": "value",
405
+ "target_port": "num2"
406
+ },
407
+ {
408
+ "source_id": "calc_inv_mod",
409
+ "target_id": "num_base_convert",
410
+ "connection_type": "Big_Int",
411
+ "source_port": "inv",
412
+ "target_port": "from_base"
413
+ },
414
+ {
415
+ "source_id": "calc_modexp",
416
+ "target_id": "num_base_convert",
417
+ "connection_type": "Big_Int",
418
+ "source_port": "value",
419
+ "target_port": "s"
420
+ },
421
+ {
422
+ "source_id": "calc_modexp",
423
+ "target_id": "calc_inv_mod",
424
+ "connection_type": "Big_Int",
425
+ "source_port": "value",
426
+ "target_port": "a"
427
+ },
428
+ {
429
+ "source_id": "graph_shortest_path",
430
+ "target_id": "calc_modexp",
431
+ "connection_type": "Big_Int",
432
+ "source_port": "cost",
433
+ "target_port": "mod"
434
+ }
435
+ ]
436
+ }
data/questions/5/narrative/skeleton_fa384a93_narrative.json ADDED
@@ -0,0 +1,375 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 5,
5
+ "win_node_id": "crypto_rsa_decrypt_hex",
6
+ "win_condition": {
7
+ "type": "tool_output",
8
+ "node_id": "crypto_rsa_decrypt_hex",
9
+ "output_port": "text",
10
+ "output_type": "Text_Generic",
11
+ "description": "Execute RSA Decrypt and get the output from port 'text'"
12
+ },
13
+ "source_init": {
14
+ "source_nodes": [
15
+ "crypto_rsa_decrypt_hex",
16
+ "terminal_1",
17
+ "terminal_2"
18
+ ],
19
+ "by_node": {
20
+ "crypto_rsa_decrypt_hex": {
21
+ "node_name": "RSA Decrypt",
22
+ "node_type": "Tool",
23
+ "template_id": "crypto_rsa_decrypt_hex",
24
+ "init_inputs": {
25
+ "d": {
26
+ "type": "Big_Int",
27
+ "description": "Private exponent d"
28
+ }
29
+ },
30
+ "init_outputs": {}
31
+ },
32
+ "terminal_1": {
33
+ "node_name": "",
34
+ "node_type": "Tool",
35
+ "template_id": "terminal_1",
36
+ "init_inputs": {
37
+ "slot_b": {
38
+ "type": "Big_Int",
39
+ "description": "Input Slot B"
40
+ }
41
+ },
42
+ "init_outputs": {
43
+ "text_output": {
44
+ "type": "Text_Generic",
45
+ "description": "Text output when only slot_a is provided"
46
+ },
47
+ "hex_output": {
48
+ "type": "Hex_String",
49
+ "description": "Hex output when only slot_b is provided"
50
+ },
51
+ "item_dispenser": {
52
+ "type": "Item",
53
+ "description": "Item output when both slots are provided"
54
+ }
55
+ }
56
+ },
57
+ "terminal_2": {
58
+ "node_name": "",
59
+ "node_type": "Tool",
60
+ "template_id": "terminal_2",
61
+ "init_inputs": {
62
+ "num1": {
63
+ "type": "Big_Int",
64
+ "description": "First Number"
65
+ },
66
+ "num2": {
67
+ "type": "Big_Int",
68
+ "description": "Second Number"
69
+ }
70
+ },
71
+ "init_outputs": {
72
+ "text_result": {
73
+ "type": "Text_Generic",
74
+ "description": "Text result for partial input"
75
+ },
76
+ "hex_result": {
77
+ "type": "Hex_String",
78
+ "description": "Hexadecimal result when both inputs provided"
79
+ },
80
+ "math_token": {
81
+ "type": "Item",
82
+ "description": "Mathematics token when both inputs provided"
83
+ }
84
+ }
85
+ }
86
+ }
87
+ },
88
+ "initial_values": {
89
+ "crypto_rsa_decrypt_hex": {
90
+ "init_inputs": {
91
+ "d": "482910384756291038475629384751029384"
92
+ },
93
+ "init_outputs": {}
94
+ },
95
+ "terminal_1": {
96
+ "init_inputs": {
97
+ "slot_b": "98374651209384756102938475610293"
98
+ },
99
+ "init_outputs": {
100
+ "text_output": "Terminal initialized. Please insert Item B to proceed with synthesis.",
101
+ "hex_output": "1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d",
102
+ "item_dispenser": "The dispenser mechanism grinds loudly but yields nothing."
103
+ }
104
+ },
105
+ "terminal_2": {
106
+ "init_inputs": {
107
+ "num1": "11223344556677889900112233445566",
108
+ "num2": "55667788990011223344556677889900"
109
+ },
110
+ "init_outputs": {
111
+ "text_result": "Calculation pending. Please provide valid numerical inputs.",
112
+ "hex_result": "cafebabe12345678deadbeef87654321",
113
+ "math_token": "A plastic token stamped with a seemingly incorrect equation."
114
+ }
115
+ }
116
+ },
117
+ "intro_narrative": "You stand in the center of 'The Architect's' safe house, a hidden bunker belonging to the city's most elusive cryptographer who vanished three days ago. The room is cold, lit only by the hum of server racks and the blinking cursors of various terminals. The Architect left behind a masterpiece of digital security—a final message that reveals the location of the stolen prototype. However, the system is fragmented. To uncover the truth, you must trace the flow of data through his vintage equipment, processing the signal step-by-step until the final encryption breaks. The air is thick with the smell of ozone and old paper. Time is running out before the security override locks the system forever.",
118
+ "narrative_style": "mystery"
119
+ },
120
+ "nodes": [
121
+ {
122
+ "id": "crypto_rsa_decrypt_hex",
123
+ "name": "RSA Decrypt",
124
+ "description": "RSA decrypt (hex cipher) with n,d (decimal).",
125
+ "type": "Tool",
126
+ "template_id": "crypto_rsa_decrypt_hex",
127
+ "initial_visible": true,
128
+ "is_revealed": true,
129
+ "inputs": [
130
+ {
131
+ "name": "hex_cipher",
132
+ "type": "Hex_String",
133
+ "description": "Ciphertext (Hex)",
134
+ "value": "191bedeb"
135
+ },
136
+ {
137
+ "name": "n",
138
+ "type": "Big_Int",
139
+ "description": "Modulus n",
140
+ "value": 421260779
141
+ },
142
+ {
143
+ "name": "d",
144
+ "type": "Big_Int",
145
+ "description": "Private exponent d",
146
+ "value": "482910384756291038475629384751029384"
147
+ }
148
+ ],
149
+ "outputs": [
150
+ {
151
+ "name": "text",
152
+ "type": "Text_Generic",
153
+ "description": "Decrypted text",
154
+ "value": "\u0000"
155
+ }
156
+ ],
157
+ "init": {
158
+ "inputs": {
159
+ "d": "482910384756291038475629384751029384"
160
+ },
161
+ "outputs": {}
162
+ },
163
+ "narrative": "The Master Decryption Mainframe. A massive supercomputer locking away the Architect's final secret. It requires the verified codes from the Verification Module to unlock the encryption."
164
+ },
165
+ {
166
+ "id": "checksum_crc32",
167
+ "name": "CRC32 Checksum",
168
+ "description": "CRC32 over hex bytes.",
169
+ "type": "Tool",
170
+ "template_id": "checksum_crc32",
171
+ "initial_visible": true,
172
+ "is_revealed": true,
173
+ "inputs": [
174
+ {
175
+ "name": "hex",
176
+ "type": "Hex_String",
177
+ "description": "Hex data",
178
+ "value": "789c0dc8cb0980301004d056a68214e1cd9b071b08662003f9b1bb205abdbee33b695d23376828949b5e9684a3313bff735a600f766c888965f3220b6e45853f232a5d9e3e7ebb197a"
179
+ }
180
+ ],
181
+ "outputs": [
182
+ {
183
+ "name": "hex",
184
+ "type": "Hex_String",
185
+ "description": "CRC32 Hex",
186
+ "value": "191bedeb"
187
+ },
188
+ {
189
+ "name": "int",
190
+ "type": "Big_Int",
191
+ "description": "CRC32 Int",
192
+ "value": 421260779
193
+ }
194
+ ],
195
+ "narrative": "The Verification Module. A specialized scanner used to validate the integrity of condensed packages. It requires the output from the Compression Chamber to run its diagnostics."
196
+ },
197
+ {
198
+ "id": "zlib_deflate",
199
+ "name": "Zlib Deflate",
200
+ "description": "Deflate text to zlib bytes (hex).",
201
+ "type": "Tool",
202
+ "template_id": "zlib_deflate",
203
+ "initial_visible": true,
204
+ "is_revealed": true,
205
+ "inputs": [
206
+ {
207
+ "name": "text",
208
+ "type": "Text_Generic",
209
+ "description": "Text to compress",
210
+ "value": "Terminal initialized. Please insert Item B to proceed with synthesis."
211
+ }
212
+ ],
213
+ "outputs": [
214
+ {
215
+ "name": "hex",
216
+ "type": "Hex_String",
217
+ "description": "Compressed hex",
218
+ "value": "789c0dc8cb0980301004d056a68214e1cd9b071b08662003f9b1bb205abdbee33b695d23376828949b5e9684a3313bff735a600f766c888965f3220b6e45853f232a5d9e3e7ebb197a"
219
+ }
220
+ ],
221
+ "narrative": "The Compression Chamber. A pressurized pneumatic tube system designed to condense information for transport. It requires processed data from the Data Processor Unit to operate."
222
+ },
223
+ {
224
+ "id": "terminal_1",
225
+ "name": "",
226
+ "description": "",
227
+ "type": "Tool",
228
+ "template_id": "terminal_1",
229
+ "initial_visible": true,
230
+ "is_revealed": true,
231
+ "inputs": [
232
+ {
233
+ "name": "slot_a",
234
+ "type": "Text_Generic",
235
+ "description": "Input Slot A",
236
+ "value": "Calculation pending. Please provide valid numerical inputs."
237
+ },
238
+ {
239
+ "name": "slot_b",
240
+ "type": "Big_Int",
241
+ "description": "Input Slot B",
242
+ "value": "98374651209384756102938475610293"
243
+ }
244
+ ],
245
+ "outputs": [
246
+ {
247
+ "name": "text_output",
248
+ "type": "Text_Generic",
249
+ "description": "Text output when only slot_a is provided",
250
+ "value": "Terminal initialized. Please insert Item B to proceed with synthesis."
251
+ },
252
+ {
253
+ "name": "hex_output",
254
+ "type": "Hex_String",
255
+ "description": "Hex output when only slot_b is provided",
256
+ "value": "1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d"
257
+ },
258
+ {
259
+ "name": "item_dispenser",
260
+ "type": "Item",
261
+ "description": "Item output when both slots are provided",
262
+ "value": "The dispenser mechanism grinds loudly but yields nothing."
263
+ }
264
+ ],
265
+ "init": {
266
+ "inputs": {
267
+ "slot_b": "98374651209384756102938475610293"
268
+ },
269
+ "outputs": {
270
+ "text_output": "Terminal initialized. Please insert Item B to proceed with synthesis.",
271
+ "hex_output": "1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d",
272
+ "item_dispenser": "The dispenser mechanism grinds loudly but yields nothing."
273
+ }
274
+ },
275
+ "narrative": "The Data Processor Unit. This heavy-duty server rack is currently in standby mode. It requires input from the Primary Input Console to begin its analysis sequence."
276
+ },
277
+ {
278
+ "id": "terminal_2",
279
+ "name": "",
280
+ "description": "",
281
+ "type": "Tool",
282
+ "template_id": "terminal_2",
283
+ "initial_visible": true,
284
+ "is_revealed": true,
285
+ "inputs": [
286
+ {
287
+ "name": "trigger_hidden",
288
+ "type": "Hidden_Item",
289
+ "description": "Hidden item required to unlock this terminal"
290
+ },
291
+ {
292
+ "name": "num1",
293
+ "type": "Big_Int",
294
+ "description": "First Number",
295
+ "value": "11223344556677889900112233445566"
296
+ },
297
+ {
298
+ "name": "num2",
299
+ "type": "Big_Int",
300
+ "description": "Second Number",
301
+ "value": "55667788990011223344556677889900"
302
+ }
303
+ ],
304
+ "outputs": [
305
+ {
306
+ "name": "text_result",
307
+ "type": "Text_Generic",
308
+ "description": "Text result for partial input",
309
+ "value": "Calculation pending. Please provide valid numerical inputs."
310
+ },
311
+ {
312
+ "name": "hex_result",
313
+ "type": "Hex_String",
314
+ "description": "Hexadecimal result when both inputs provided",
315
+ "value": "cafebabe12345678deadbeef87654321"
316
+ },
317
+ {
318
+ "name": "math_token",
319
+ "type": "Item",
320
+ "description": "Mathematics token when both inputs provided",
321
+ "value": "A plastic token stamped with a seemingly incorrect equation."
322
+ }
323
+ ],
324
+ "init": {
325
+ "inputs": {
326
+ "num1": "11223344556677889900112233445566",
327
+ "num2": "55667788990011223344556677889900"
328
+ },
329
+ "outputs": {
330
+ "text_result": "Calculation pending. Please provide valid numerical inputs.",
331
+ "hex_result": "cafebabe12345678deadbeef87654321",
332
+ "math_token": "A plastic token stamped with a seemingly incorrect equation."
333
+ }
334
+ },
335
+ "narrative": "The Primary Input Console. A vintage terminal glowing with amber text, waiting for manual numeric input to initialize the system's power sequence."
336
+ }
337
+ ],
338
+ "edges": [
339
+ {
340
+ "source_id": "checksum_crc32",
341
+ "target_id": "crypto_rsa_decrypt_hex",
342
+ "connection_type": "Big_Int",
343
+ "source_port": "int",
344
+ "target_port": "n"
345
+ },
346
+ {
347
+ "source_id": "zlib_deflate",
348
+ "target_id": "checksum_crc32",
349
+ "connection_type": "Hex_String",
350
+ "source_port": "hex",
351
+ "target_port": "hex"
352
+ },
353
+ {
354
+ "source_id": "terminal_1",
355
+ "target_id": "zlib_deflate",
356
+ "connection_type": "Text_Generic",
357
+ "source_port": "text_output",
358
+ "target_port": "text"
359
+ },
360
+ {
361
+ "source_id": "checksum_crc32",
362
+ "target_id": "crypto_rsa_decrypt_hex",
363
+ "connection_type": "Hex_String",
364
+ "source_port": "hex",
365
+ "target_port": "hex_cipher"
366
+ },
367
+ {
368
+ "source_id": "terminal_2",
369
+ "target_id": "terminal_1",
370
+ "connection_type": "Text_Generic",
371
+ "source_port": "text_result",
372
+ "target_port": "slot_a"
373
+ }
374
+ ]
375
+ }
data/questions/5/narrative/skeleton_faec554e_narrative.json ADDED
@@ -0,0 +1,262 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 4,
5
+ "win_node_id": "item_6",
6
+ "win_condition": {
7
+ "type": "item_content",
8
+ "node_id": "item_6",
9
+ "description": "Obtain the content of "
10
+ },
11
+ "source_init": {
12
+ "source_nodes": [
13
+ "item_6",
14
+ "container_3",
15
+ "container_4"
16
+ ],
17
+ "by_node": {
18
+ "item_6": {
19
+ "node_name": "",
20
+ "node_type": "Item",
21
+ "template_id": "item_6",
22
+ "init_inputs": {},
23
+ "init_outputs": {
24
+ "content": {
25
+ "type": "Hex_String_IV_AES",
26
+ "description": "AES IV"
27
+ }
28
+ }
29
+ },
30
+ "container_3": {
31
+ "node_name": "",
32
+ "node_type": "Item",
33
+ "template_id": "container_3",
34
+ "init_inputs": {
35
+ "fingerprint_input": {
36
+ "type": "Big_Int",
37
+ "description": "Fingerprint Hash"
38
+ }
39
+ },
40
+ "init_outputs": {}
41
+ },
42
+ "container_4": {
43
+ "node_name": "",
44
+ "node_type": "Item",
45
+ "template_id": "container_4",
46
+ "init_inputs": {
47
+ "fingerprint_input": {
48
+ "type": "Text_Generic",
49
+ "description": "Fingerprint Hash"
50
+ }
51
+ },
52
+ "init_outputs": {}
53
+ }
54
+ }
55
+ },
56
+ "initial_values": {
57
+ "item_6": {
58
+ "init_inputs": {},
59
+ "init_outputs": {
60
+ "content": "5f8a9b2c3d4e5f6a7b8c9d0e1f2a3b4c"
61
+ }
62
+ },
63
+ "container_3": {
64
+ "init_inputs": {
65
+ "fingerprint_input": "4829103847562910384756281"
66
+ },
67
+ "init_outputs": {}
68
+ },
69
+ "container_4": {
70
+ "init_inputs": {
71
+ "fingerprint_input": "fp_chk_92837465_verified"
72
+ },
73
+ "init_outputs": {}
74
+ }
75
+ },
76
+ "intro_narrative": "You have breached the perimeter of the Helios Syndicate's dormant black site. The server room is freezing, maintained at sub-zero temperatures to preserve the volatile data within. The silence is only broken by the rhythmic hum of the cooling systems. Your mission is critical: locate and extract the AES encryption key from the central core before the failsafe protocols wipe the system. You have limited tools, and everything here is locked behind layers of biometric and physical security.",
77
+ "narrative_style": "techno_thriller"
78
+ },
79
+ "nodes": [
80
+ {
81
+ "id": "item_6",
82
+ "name": "",
83
+ "description": "",
84
+ "type": "Item",
85
+ "template_id": "item_6",
86
+ "initial_visible": false,
87
+ "is_revealed": false,
88
+ "inputs": [
89
+ {
90
+ "name": "container",
91
+ "type": "Hidden_Item",
92
+ "description": "Inside"
93
+ }
94
+ ],
95
+ "outputs": [
96
+ {
97
+ "name": "content",
98
+ "type": "Hex_String_IV_AES",
99
+ "description": "AES IV",
100
+ "value": "5f8a9b2c3d4e5f6a7b8c9d0e1f2a3b4c"
101
+ }
102
+ ],
103
+ "init": {
104
+ "inputs": {},
105
+ "outputs": {
106
+ "content": "5f8a9b2c3d4e5f6a7b8c9d0e1f2a3b4c"
107
+ }
108
+ },
109
+ "narrative": "This is The Encrypted Core. It is a sealed hard drive unit containing the target data, protected by advanced encryption algorithms."
110
+ },
111
+ {
112
+ "id": "item_16",
113
+ "name": "",
114
+ "description": "",
115
+ "type": "Item",
116
+ "template_id": "item_16",
117
+ "initial_visible": false,
118
+ "is_revealed": false,
119
+ "inputs": [
120
+ {
121
+ "name": "source_tool",
122
+ "type": "Item",
123
+ "description": "Produced by"
124
+ }
125
+ ],
126
+ "outputs": [
127
+ {
128
+ "name": "content",
129
+ "type": "Hidden_Item",
130
+ "description": "Timezone text"
131
+ }
132
+ ],
133
+ "narrative": "This is The Sync Token. It is a specialized device displaying rapidly shifting timezone data, used for temporal authentication."
134
+ },
135
+ {
136
+ "id": "container_3",
137
+ "name": "",
138
+ "description": "",
139
+ "type": "Item",
140
+ "template_id": "container_3",
141
+ "initial_visible": false,
142
+ "is_revealed": false,
143
+ "inputs": [
144
+ {
145
+ "name": "container",
146
+ "type": "Hidden_Item",
147
+ "description": "Inside"
148
+ },
149
+ {
150
+ "name": "fingerprint_input",
151
+ "type": "Big_Int",
152
+ "description": "Fingerprint Hash",
153
+ "value": "4829103847562910384756281"
154
+ }
155
+ ],
156
+ "outputs": [
157
+ {
158
+ "name": "inner_space",
159
+ "type": "Item",
160
+ "description": "Contents"
161
+ }
162
+ ],
163
+ "init": {
164
+ "inputs": {
165
+ "fingerprint_input": "4829103847562910384756281"
166
+ },
167
+ "outputs": {}
168
+ },
169
+ "narrative": "This is The Access Terminal. It is a wall-mounted server interface with biometric security and an empty hardware slot."
170
+ },
171
+ {
172
+ "id": "item_16_e213",
173
+ "name": "",
174
+ "description": "",
175
+ "type": "Item",
176
+ "template_id": "item_16",
177
+ "initial_visible": false,
178
+ "is_revealed": false,
179
+ "inputs": [
180
+ {
181
+ "name": "source_tool",
182
+ "type": "Item",
183
+ "description": "Produced by"
184
+ }
185
+ ],
186
+ "outputs": [
187
+ {
188
+ "name": "content",
189
+ "type": "Hidden_Item",
190
+ "description": "Timezone text"
191
+ }
192
+ ],
193
+ "narrative": "This is The Interface Card. It is a proprietary circuit board designed to bridge connections in high-security terminals."
194
+ },
195
+ {
196
+ "id": "container_4",
197
+ "name": "",
198
+ "description": "",
199
+ "type": "Item",
200
+ "template_id": "container_4",
201
+ "initial_visible": true,
202
+ "is_revealed": true,
203
+ "inputs": [
204
+ {
205
+ "name": "container",
206
+ "type": "Hidden_Item",
207
+ "description": "Inside"
208
+ },
209
+ {
210
+ "name": "fingerprint_input",
211
+ "type": "Text_Generic",
212
+ "description": "Fingerprint Hash",
213
+ "value": "fp_chk_92837465_verified"
214
+ }
215
+ ],
216
+ "outputs": [
217
+ {
218
+ "name": "inner_space",
219
+ "type": "Item",
220
+ "description": "Contents"
221
+ }
222
+ ],
223
+ "init": {
224
+ "inputs": {
225
+ "fingerprint_input": "fp_chk_92837465_verified"
226
+ },
227
+ "outputs": {}
228
+ },
229
+ "narrative": "This is The Secure Case. It is a heavy-duty transport box sitting on the desk, secured by a biometric fingerprint scanner."
230
+ }
231
+ ],
232
+ "edges": [
233
+ {
234
+ "source_id": "item_16",
235
+ "target_id": "item_6",
236
+ "connection_type": "Hidden_Item",
237
+ "source_port": "content",
238
+ "target_port": "container"
239
+ },
240
+ {
241
+ "source_id": "container_3",
242
+ "target_id": "item_16",
243
+ "connection_type": "Item",
244
+ "source_port": "inner_space",
245
+ "target_port": "source_tool"
246
+ },
247
+ {
248
+ "source_id": "item_16_e213",
249
+ "target_id": "container_3",
250
+ "connection_type": "Hidden_Item",
251
+ "source_port": "content",
252
+ "target_port": "container"
253
+ },
254
+ {
255
+ "source_id": "container_4",
256
+ "target_id": "item_16_e213",
257
+ "connection_type": "Item",
258
+ "source_port": "inner_space",
259
+ "target_port": "source_tool"
260
+ }
261
+ ]
262
+ }
data/questions/5/narrative/skeleton_fba0a08a_narrative.json ADDED
@@ -0,0 +1,374 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 4,
5
+ "win_node_id": "item_12",
6
+ "win_condition": {
7
+ "type": "item_content",
8
+ "node_id": "item_12",
9
+ "description": "Obtain the content of "
10
+ },
11
+ "source_init": {
12
+ "source_nodes": [
13
+ "item_12",
14
+ "graph_shortest_path",
15
+ "zip_unzip_file",
16
+ "zip_unzip_file_417b"
17
+ ],
18
+ "by_node": {
19
+ "item_12": {
20
+ "node_name": "",
21
+ "node_type": "Item",
22
+ "template_id": "item_12",
23
+ "init_inputs": {},
24
+ "init_outputs": {
25
+ "content": {
26
+ "type": "Hex_String",
27
+ "description": "The hex code"
28
+ }
29
+ }
30
+ },
31
+ "graph_shortest_path": {
32
+ "node_name": "Shortest Path Finder",
33
+ "node_type": "Tool",
34
+ "template_id": "graph_shortest_path",
35
+ "init_inputs": {
36
+ "src": {
37
+ "type": "Text_Generic",
38
+ "description": "Source node"
39
+ },
40
+ "dst": {
41
+ "type": "Text_Generic",
42
+ "description": "Destination node"
43
+ }
44
+ },
45
+ "init_outputs": {
46
+ "path": {
47
+ "type": "Text_Generic",
48
+ "description": "Path list"
49
+ },
50
+ "cost": {
51
+ "type": "Big_Int",
52
+ "description": "Path cost"
53
+ }
54
+ }
55
+ },
56
+ "zip_unzip_file": {
57
+ "node_name": "Zip Unzipper",
58
+ "node_type": "Tool",
59
+ "template_id": "zip_unzip_file",
60
+ "init_inputs": {
61
+ "password": {
62
+ "type": "Text_Generic",
63
+ "description": "Password"
64
+ }
65
+ },
66
+ "init_outputs": {
67
+ "files": {
68
+ "type": "File_Id",
69
+ "description": "Extracted file ID"
70
+ }
71
+ }
72
+ },
73
+ "zip_unzip_file_417b": {
74
+ "node_name": "Zip Unzipper",
75
+ "node_type": "Tool",
76
+ "template_id": "zip_unzip_file",
77
+ "init_inputs": {
78
+ "zip_id": {
79
+ "type": "File_Id",
80
+ "description": "Zip file ID"
81
+ },
82
+ "password": {
83
+ "type": "Text_Generic",
84
+ "description": "Password"
85
+ }
86
+ },
87
+ "init_outputs": {
88
+ "files": {
89
+ "type": "File_Id",
90
+ "description": "Extracted file ID"
91
+ }
92
+ }
93
+ }
94
+ }
95
+ },
96
+ "initial_values": {
97
+ "item_12": {
98
+ "init_inputs": {},
99
+ "init_outputs": {
100
+ "content": "4a7b9c2d1e8f0a3b4c5d6e7f8a9b0c1d"
101
+ }
102
+ },
103
+ "graph_shortest_path": {
104
+ "init_inputs": {
105
+ "src": "Node_Start_Alpha",
106
+ "dst": "Node_End_Omega"
107
+ },
108
+ "init_outputs": {
109
+ "path": "[\"Node_Start_Alpha\", \"Node_Sector_1\", \"Node_Sector_2\", \"Node_Sector_3\", \"Node_Hub_Central\", \"Node_End_Omega\"]",
110
+ "cost": "384921"
111
+ }
112
+ },
113
+ "zip_unzip_file": {
114
+ "init_inputs": {
115
+ "password": "SecurePassword123!"
116
+ },
117
+ "init_outputs": {
118
+ "files": "extracted_data_v1.txt"
119
+ }
120
+ },
121
+ "zip_unzip_file_417b": {
122
+ "init_inputs": {
123
+ "zip_id": "archive_backup_2023.zip",
124
+ "password": "StrongPass456#"
125
+ },
126
+ "init_outputs": {
127
+ "files": "confidential_report.pdf"
128
+ }
129
+ }
130
+ },
131
+ "intro_narrative": "The ash clouds haven't parted in decades. You stand inside Sector 7's abandoned tech-bunker, the last known location of an intact power core that could save your settlement. The facility is a graveyard of pre-collapse technology, covered in irradiated dust but faintly humming with residual power. To survive the coming radiation storm, you must reboot these dead systems, sift through corrupted archives, and physically manifest the key to your survival. The machines are old, but they still have a pulse. Find a way to unlock the core, or freeze forever in the wastes.",
132
+ "narrative_style": "post_apocalyptic"
133
+ },
134
+ "nodes": [
135
+ {
136
+ "id": "item_12",
137
+ "name": "",
138
+ "description": "",
139
+ "type": "Item",
140
+ "template_id": "item_12",
141
+ "initial_visible": false,
142
+ "is_revealed": false,
143
+ "inputs": [
144
+ {
145
+ "name": "source_tool",
146
+ "type": "Item",
147
+ "description": "Produced by",
148
+ "value": "synthesized_item_303a60418d0c0a15"
149
+ }
150
+ ],
151
+ "outputs": [
152
+ {
153
+ "name": "content",
154
+ "type": "Hex_String",
155
+ "description": "The hex code",
156
+ "value": "4a7b9c2d1e8f0a3b4c5d6e7f8a9b0c1d"
157
+ }
158
+ ],
159
+ "init": {
160
+ "inputs": {},
161
+ "outputs": {
162
+ "content": "4a7b9c2d1e8f0a3b4c5d6e7f8a9b0c1d"
163
+ }
164
+ },
165
+ "narrative": "The legendary encrypted power core, sealed tightly behind a reinforced glass case. It requires input from the e-waste 3D printer to finally release its life-saving energy."
166
+ },
167
+ {
168
+ "id": "matter_synthesizer",
169
+ "name": "Matter Synthesizer",
170
+ "description": "Synthesizes physical objects from data blueprints.",
171
+ "type": "Tool",
172
+ "template_id": "matter_synthesizer",
173
+ "initial_visible": true,
174
+ "is_revealed": true,
175
+ "inputs": [
176
+ {
177
+ "name": "blueprint",
178
+ "type": "Text_Generic",
179
+ "description": "Object Blueprint",
180
+ "value": "[\"Node_Start_Alpha\", \"Node_Sector_1\", \"Node_Sector_2\", \"Node_Sector_3\", \"Node_Hub_Central\", \"Node_End_Omega\"]"
181
+ }
182
+ ],
183
+ "outputs": [
184
+ {
185
+ "name": "output_slot",
186
+ "type": "Item",
187
+ "description": "Synthesized Object",
188
+ "value": "synthesized_item_303a60418d0c0a15"
189
+ }
190
+ ],
191
+ "narrative": "A clunky but functional e-waste 3D printer. It requires input from the navigation nav-computer to shape the correct physical components."
192
+ },
193
+ {
194
+ "id": "graph_shortest_path",
195
+ "name": "Shortest Path Finder",
196
+ "description": "Shortest path on graph json file with edges list.",
197
+ "type": "Tool",
198
+ "template_id": "graph_shortest_path",
199
+ "initial_visible": true,
200
+ "is_revealed": true,
201
+ "inputs": [
202
+ {
203
+ "name": "trigger_item",
204
+ "type": "Item",
205
+ "description": "Required item to unlock this tool"
206
+ },
207
+ {
208
+ "name": "file_id",
209
+ "type": "File_Id",
210
+ "description": "Graph JSON file ID",
211
+ "value": "extracted_data_v1.txt"
212
+ },
213
+ {
214
+ "name": "src",
215
+ "type": "Text_Generic",
216
+ "description": "Source node",
217
+ "value": "Node_Start_Alpha"
218
+ },
219
+ {
220
+ "name": "dst",
221
+ "type": "Text_Generic",
222
+ "description": "Destination node",
223
+ "value": "Node_End_Omega"
224
+ }
225
+ ],
226
+ "outputs": [
227
+ {
228
+ "name": "path",
229
+ "type": "Text_Generic",
230
+ "description": "Path list",
231
+ "value": "[\"Node_Start_Alpha\", \"Node_Sector_1\", \"Node_Sector_2\", \"Node_Sector_3\", \"Node_Hub_Central\", \"Node_End_Omega\"]"
232
+ },
233
+ {
234
+ "name": "cost",
235
+ "type": "Big_Int",
236
+ "description": "Path cost",
237
+ "value": "384921"
238
+ }
239
+ ],
240
+ "init": {
241
+ "inputs": {
242
+ "src": "Node_Start_Alpha",
243
+ "dst": "Node_End_Omega"
244
+ },
245
+ "outputs": {
246
+ "path": "[\"Node_Start_Alpha\", \"Node_Sector_1\", \"Node_Sector_2\", \"Node_Sector_3\", \"Node_Hub_Central\", \"Node_End_Omega\"]",
247
+ "cost": "384921"
248
+ }
249
+ },
250
+ "narrative": "A wall-mounted navigation nav-computer with faded topological maps. It requires input from the corrupted data extractor to calculate a viable route."
251
+ },
252
+ {
253
+ "id": "zip_unzip_file",
254
+ "name": "Zip Unzipper",
255
+ "description": "Unzip a password-protected zip file by id.",
256
+ "type": "Tool",
257
+ "template_id": "zip_unzip_file",
258
+ "initial_visible": true,
259
+ "is_revealed": true,
260
+ "inputs": [
261
+ {
262
+ "name": "trigger_item",
263
+ "type": "Item",
264
+ "description": "Required item to unlock this tool"
265
+ },
266
+ {
267
+ "name": "zip_id",
268
+ "type": "File_Id",
269
+ "description": "Zip file ID",
270
+ "value": "confidential_report.pdf"
271
+ },
272
+ {
273
+ "name": "password",
274
+ "type": "Text_Generic",
275
+ "description": "Password",
276
+ "value": "SecurePassword123!"
277
+ }
278
+ ],
279
+ "outputs": [
280
+ {
281
+ "name": "files",
282
+ "type": "File_Id",
283
+ "description": "Extracted file ID",
284
+ "value": "extracted_data_v1.txt"
285
+ }
286
+ ],
287
+ "init": {
288
+ "inputs": {
289
+ "password": "SecurePassword123!"
290
+ },
291
+ "outputs": {
292
+ "files": "extracted_data_v1.txt"
293
+ }
294
+ },
295
+ "narrative": "A heavy-duty corrupted data extractor. It requires input from the rusted mainframe terminal to function properly."
296
+ },
297
+ {
298
+ "id": "zip_unzip_file_417b",
299
+ "name": "Zip Unzipper",
300
+ "description": "Unzip a password-protected zip file by id.",
301
+ "type": "Tool",
302
+ "template_id": "zip_unzip_file",
303
+ "initial_visible": true,
304
+ "is_revealed": true,
305
+ "inputs": [
306
+ {
307
+ "name": "trigger_item",
308
+ "type": "Item",
309
+ "description": "Required item to unlock this tool"
310
+ },
311
+ {
312
+ "name": "zip_id",
313
+ "type": "File_Id",
314
+ "description": "Zip file ID",
315
+ "value": "archive_backup_2023.zip"
316
+ },
317
+ {
318
+ "name": "password",
319
+ "type": "Text_Generic",
320
+ "description": "Password",
321
+ "value": "StrongPass456#"
322
+ }
323
+ ],
324
+ "outputs": [
325
+ {
326
+ "name": "files",
327
+ "type": "File_Id",
328
+ "description": "Extracted file ID",
329
+ "value": "confidential_report.pdf"
330
+ }
331
+ ],
332
+ "init": {
333
+ "inputs": {
334
+ "zip_id": "archive_backup_2023.zip",
335
+ "password": "StrongPass456#"
336
+ },
337
+ "outputs": {
338
+ "files": "confidential_report.pdf"
339
+ }
340
+ },
341
+ "narrative": "An old, dust-covered rusted mainframe terminal. Its screen flickers with a command prompt, holding locked archives from before the collapse."
342
+ }
343
+ ],
344
+ "edges": [
345
+ {
346
+ "source_id": "matter_synthesizer",
347
+ "target_id": "item_12",
348
+ "connection_type": "Item",
349
+ "source_port": "output_slot",
350
+ "target_port": "source_tool"
351
+ },
352
+ {
353
+ "source_id": "graph_shortest_path",
354
+ "target_id": "matter_synthesizer",
355
+ "connection_type": "Text_Generic",
356
+ "source_port": "path",
357
+ "target_port": "blueprint"
358
+ },
359
+ {
360
+ "source_id": "zip_unzip_file",
361
+ "target_id": "graph_shortest_path",
362
+ "connection_type": "File_Id",
363
+ "source_port": "files",
364
+ "target_port": "file_id"
365
+ },
366
+ {
367
+ "source_id": "zip_unzip_file_417b",
368
+ "target_id": "zip_unzip_file",
369
+ "connection_type": "File_Id",
370
+ "source_port": "files",
371
+ "target_port": "zip_id"
372
+ }
373
+ ]
374
+ }
data/questions/5/narrative/skeleton_ff8a576b_narrative.json ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_nodes": 5,
4
+ "total_edges": 4,
5
+ "win_node_id": "item_14",
6
+ "win_condition": {
7
+ "type": "item_content",
8
+ "node_id": "item_14",
9
+ "description": "Obtain the content of "
10
+ },
11
+ "source_init": {
12
+ "source_nodes": [
13
+ "item_14",
14
+ "base64_decode"
15
+ ],
16
+ "by_node": {
17
+ "item_14": {
18
+ "node_name": "",
19
+ "node_type": "Item",
20
+ "template_id": "item_14",
21
+ "init_inputs": {},
22
+ "init_outputs": {
23
+ "content": {
24
+ "type": "Hex_String_IV_AES",
25
+ "description": "AES IV"
26
+ }
27
+ }
28
+ },
29
+ "base64_decode": {
30
+ "node_name": "Base64 Decoder",
31
+ "node_type": "Tool",
32
+ "template_id": "base64_decode",
33
+ "init_inputs": {
34
+ "data": {
35
+ "type": "Text_Generic",
36
+ "description": "Base64 string"
37
+ }
38
+ },
39
+ "init_outputs": {}
40
+ }
41
+ }
42
+ },
43
+ "initial_values": {
44
+ "item_14": {
45
+ "init_inputs": {},
46
+ "init_outputs": {
47
+ "content": "8f3a2b1c4d5e6f7a8b9c0d1e2f3a4b5c"
48
+ }
49
+ },
50
+ "base64_decode": {
51
+ "init_inputs": {
52
+ "data": "U3VwZXJTZWNyZXREYXRhUGF5bG9hZEZvckluaXQ="
53
+ },
54
+ "init_outputs": {}
55
+ }
56
+ },
57
+ "intro_narrative": "You stand amidst the hissing pipes and rhythmic ticking of Professor Cogsworth's abandoned workshop. The air is thick with the scent of ozone and machine oil. Somewhere in this labyrinth of brass and mahogany lies the Professor's greatest invention: the Aetheric Resonance Crystal, a power source of infinite potential. However, the workshop is a puzzle box itself, guarded by mechanical locks and cryptographic defenses. You must manipulate the strange machinery left behind to uncover the crystal before the building's steam pressure reaches critical levels.",
58
+ "narrative_style": "steampunk"
59
+ },
60
+ "nodes": [
61
+ {
62
+ "id": "item_14",
63
+ "name": "",
64
+ "description": "",
65
+ "type": "Item",
66
+ "template_id": "item_14",
67
+ "initial_visible": false,
68
+ "is_revealed": false,
69
+ "inputs": [
70
+ {
71
+ "name": "source_tool",
72
+ "type": "Item",
73
+ "description": "Produced by"
74
+ }
75
+ ],
76
+ "outputs": [
77
+ {
78
+ "name": "content",
79
+ "type": "Hex_String_IV_AES",
80
+ "description": "AES IV",
81
+ "value": "8f3a2b1c4d5e6f7a8b9c0d1e2f3a4b5c"
82
+ }
83
+ ],
84
+ "init": {
85
+ "inputs": {},
86
+ "outputs": {
87
+ "content": "8f3a2b1c4d5e6f7a8b9c0d1e2f3a4b5c"
88
+ }
89
+ },
90
+ "narrative": "A faceted gem suspended in a magnetic field, humming with limitless potential. This is the Aetheric Resonance Crystal, the key to the city's future power grid."
91
+ },
92
+ {
93
+ "id": "container_2",
94
+ "name": "",
95
+ "description": "",
96
+ "type": "Item",
97
+ "template_id": "container_2",
98
+ "initial_visible": false,
99
+ "is_revealed": false,
100
+ "inputs": [
101
+ {
102
+ "name": "container",
103
+ "type": "Hidden_Item",
104
+ "description": "Inside"
105
+ },
106
+ {
107
+ "name": "fingerprint_input",
108
+ "type": "Hex_String",
109
+ "description": "Fingerprint Hash",
110
+ "value": "5375706572536563726574446174615061796c6f6164466f72496e6974"
111
+ }
112
+ ],
113
+ "outputs": [
114
+ {
115
+ "name": "inner_space",
116
+ "type": "Item",
117
+ "description": "Contents"
118
+ }
119
+ ],
120
+ "narrative": "A heavy iron vault reinforced with copper piping and pressure gauges. Its locking mechanism is a hybrid of mechanics and mathematics. It requires the decoded data sequence from the Difference Engine Terminal to align the internal tumblers."
121
+ },
122
+ {
123
+ "id": "item_8",
124
+ "name": "",
125
+ "description": "",
126
+ "type": "Item",
127
+ "template_id": "item_8",
128
+ "initial_visible": false,
129
+ "is_revealed": false,
130
+ "inputs": [
131
+ {
132
+ "name": "source_tool",
133
+ "type": "Hidden_Item",
134
+ "description": "Produced by"
135
+ }
136
+ ],
137
+ "outputs": [
138
+ {
139
+ "name": "content",
140
+ "type": "Hidden_Item",
141
+ "description": "The integer"
142
+ }
143
+ ],
144
+ "narrative": "A heavy, intricate cube of brass gears, springs, and analytical wafers. It appears to be a processing unit designed to govern a larger security mechanism."
145
+ },
146
+ {
147
+ "id": "base64_decode",
148
+ "name": "Base64 Decoder",
149
+ "description": "Decode base64 to hex bytes.",
150
+ "type": "Tool",
151
+ "template_id": "base64_decode",
152
+ "initial_visible": true,
153
+ "is_revealed": true,
154
+ "inputs": [
155
+ {
156
+ "name": "data",
157
+ "type": "Text_Generic",
158
+ "description": "Base64 string",
159
+ "value": "U3VwZXJTZWNyZXREYXRhUGF5bG9hZEZvckluaXQ="
160
+ }
161
+ ],
162
+ "outputs": [
163
+ {
164
+ "name": "bytes_hex",
165
+ "type": "Hex_String",
166
+ "description": "Decoded bytes as Hex",
167
+ "value": "5375706572536563726574446174615061796c6f6164466f72496e6974"
168
+ }
169
+ ],
170
+ "init": {
171
+ "inputs": {
172
+ "data": "U3VwZXJTZWNyZXREYXRhUGF5bG9hZEZvckluaXQ="
173
+ },
174
+ "outputs": {}
175
+ },
176
+ "narrative": "A massive console of mahogany and brass, filled with rows of numbered keys and a ticker-tape output. It is the Difference Engine Terminal, built to translate encoded text strings into usable hexadecimal data."
177
+ },
178
+ {
179
+ "id": "item_8_8068",
180
+ "name": "",
181
+ "description": "",
182
+ "type": "Item",
183
+ "template_id": "item_8",
184
+ "initial_visible": true,
185
+ "is_revealed": true,
186
+ "inputs": [
187
+ {
188
+ "name": "source_tool",
189
+ "type": "Hidden_Item",
190
+ "description": "Produced by"
191
+ }
192
+ ],
193
+ "outputs": [
194
+ {
195
+ "name": "content",
196
+ "type": "Hidden_Item",
197
+ "description": "The integer"
198
+ }
199
+ ],
200
+ "narrative": "A portable storage canister with a complex combination lock on the lid. It rattles slightly when moved, suggesting something dense and mechanical is stored inside."
201
+ }
202
+ ],
203
+ "edges": [
204
+ {
205
+ "source_id": "container_2",
206
+ "target_id": "item_14",
207
+ "connection_type": "Item",
208
+ "source_port": "inner_space",
209
+ "target_port": "source_tool"
210
+ },
211
+ {
212
+ "source_id": "item_8",
213
+ "target_id": "container_2",
214
+ "connection_type": "Hidden_Item",
215
+ "source_port": "content",
216
+ "target_port": "container"
217
+ },
218
+ {
219
+ "source_id": "base64_decode",
220
+ "target_id": "container_2",
221
+ "connection_type": "Hex_String",
222
+ "source_port": "bytes_hex",
223
+ "target_port": "fingerprint_input"
224
+ },
225
+ {
226
+ "source_id": "item_8_8068",
227
+ "target_id": "item_8",
228
+ "connection_type": "Hidden_Item",
229
+ "source_port": "content",
230
+ "target_port": "source_tool"
231
+ }
232
+ ]
233
+ }
pyproject.toml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [build-system]
2
+ requires = ["hatchling>=1.27"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "agentescapebench-harbor"
7
+ version = "0.1.0"
8
+ description = "AgentEscapeBench tasks for Harbor and its OpenEnv integration"
9
+ requires-python = ">=3.12"
10
+ dependencies = [
11
+ "fastapi==0.162.0", "uvicorn==0.54.0", "pydantic==2.14.2",
12
+ "cryptography==50.0.2", "pytz==2025.2", "requests==2.34.2",
13
+ ]
14
+
15
+ [project.optional-dependencies]
16
+ hub = ["huggingface-hub>=1.0,<3"]
17
+ harbor = ["harbor==0.25.0"]
18
+ openenv = [
19
+ "openenv",
20
+ ]
21
+
22
+ [project.scripts]
23
+ agentescape-port = "agentescape_port.adapter:main"
24
+
25
+ [dependency-groups]
26
+ dev = ["pytest>=8,<10", "httpx>=0.28,<1", "ruff>=0.14,<1"]
27
+
28
+ [tool.hatch.build.targets.wheel]
29
+ packages = ["src/agentescape_port"]
30
+
31
+ [tool.pytest.ini_options]
32
+ testpaths = ["tests"]
33
+
34
+ [tool.ruff]
35
+ target-version = "py312"
36
+ exclude = ["src/agentescape_port/runtime/upstream", "tasks", "data"]
37
+
38
+
39
+ [tool.ruff.lint]
40
+ select = ["E4", "E7", "E9", "F"]
41
+
42
+ [tool.uv.sources]
43
+ openenv = { url = "https://github.com/openenv/OpenEnv/archive/1e5317e9ebbe016fb9f94e545cf4a996d464e22b.tar.gz" }
reports/corpus.json ADDED
The diff for this file is too large to render. See raw diff
 
reports/openenv-smoke.json ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "scope": "Real OpenEnv task discovery, run_rollout and text capture using a scripted localhost endpoint, followed by public-action oracle. No paid model or token/logprob validation.",
3
+ "results": [
4
+ {
5
+ "task_id": "/home/edward/work/env-tests/agentescapebench-port/pilot-tasks/agentescape-25-skeleton-1198101b",
6
+ "task_name": "agentescape-25-skeleton-1198101b",
7
+ "dataset": "/home/edward/work/env-tests/agentescapebench-port/pilot-tasks",
8
+ "harness": "oracle",
9
+ "sandbox": "docker",
10
+ "trial_name": "oe-agentescape-25-skeleton-1198-b59cf076",
11
+ "session_id": "s15f289b6556d55533be4ece9",
12
+ "reward": 1.0,
13
+ "rewards": {
14
+ "reward": 1.0
15
+ },
16
+ "reward_key": "reward",
17
+ "step_results": [],
18
+ "rollout_type": "eval",
19
+ "capture_level": "text",
20
+ "param_fixes": [],
21
+ "turns": [
22
+ {
23
+ "turn": 0,
24
+ "role": "agent",
25
+ "finish_reason": "stop",
26
+ "prompt_token_ids": [],
27
+ "completion_token_ids": [],
28
+ "per_token_logps": [],
29
+ "loss_mask": [],
30
+ "node_id": "336b6ee9afa7",
31
+ "n_tools": 0,
32
+ "discarded": false,
33
+ "trainable": false,
34
+ "sampling_params": {},
35
+ "requested_sampling_params": {},
36
+ "text": "Validation acknowledged.",
37
+ "tool_calls": [],
38
+ "request_messages": [
39
+ {
40
+ "role": "user",
41
+ "content": "Acknowledge this lifecycle validation."
42
+ }
43
+ ],
44
+ "request_tools": null
45
+ }
46
+ ],
47
+ "conversations": [
48
+ {
49
+ "root_id": "336b6ee9afa7",
50
+ "role": "agent",
51
+ "n_turns": 1,
52
+ "messages": [
53
+ {
54
+ "role": "user",
55
+ "content": "Acknowledge this lifecycle validation."
56
+ },
57
+ {
58
+ "role": "assistant",
59
+ "content": "Validation acknowledged."
60
+ }
61
+ ]
62
+ }
63
+ ],
64
+ "n_turns": 1,
65
+ "n_roots": 1,
66
+ "budget_stop_count": 0,
67
+ "n_trainable_tokens": 0,
68
+ "multi_turn": false,
69
+ "atif": "none",
70
+ "trace_source": "",
71
+ "findings": [
72
+ "[WARN] degenerate_rollout: exactly 1 model call for the whole task; inspect the agent log if this was unexpected. Valid captured tokens remain eligible for training."
73
+ ],
74
+ "wall_s": 33.08,
75
+ "phase_timings": {},
76
+ "agent_log_tail": "",
77
+ "ok": true,
78
+ "error": null,
79
+ "exception_type": null
80
+ },
81
+ {
82
+ "task_id": "/home/edward/work/env-tests/agentescapebench-port/pilot-tasks/agentescape-5-skeleton-032856e7",
83
+ "task_name": "agentescape-5-skeleton-032856e7",
84
+ "dataset": "/home/edward/work/env-tests/agentescapebench-port/pilot-tasks",
85
+ "harness": "oracle",
86
+ "sandbox": "docker",
87
+ "trial_name": "oe-agentescape-5-skeleton-03285-ea3273b6",
88
+ "session_id": "s4d9b23583cda8f3f494294de",
89
+ "reward": 1.0,
90
+ "rewards": {
91
+ "reward": 1.0
92
+ },
93
+ "reward_key": "reward",
94
+ "step_results": [],
95
+ "rollout_type": "eval",
96
+ "capture_level": "text",
97
+ "param_fixes": [],
98
+ "turns": [
99
+ {
100
+ "turn": 0,
101
+ "role": "agent",
102
+ "finish_reason": "stop",
103
+ "prompt_token_ids": [],
104
+ "completion_token_ids": [],
105
+ "per_token_logps": [],
106
+ "loss_mask": [],
107
+ "node_id": "6828da53fafc",
108
+ "n_tools": 0,
109
+ "discarded": false,
110
+ "trainable": false,
111
+ "sampling_params": {},
112
+ "requested_sampling_params": {},
113
+ "text": "Validation acknowledged.",
114
+ "tool_calls": [],
115
+ "request_messages": [
116
+ {
117
+ "role": "user",
118
+ "content": "Acknowledge this lifecycle validation."
119
+ }
120
+ ],
121
+ "request_tools": null
122
+ }
123
+ ],
124
+ "conversations": [
125
+ {
126
+ "root_id": "6828da53fafc",
127
+ "role": "agent",
128
+ "n_turns": 1,
129
+ "messages": [
130
+ {
131
+ "role": "user",
132
+ "content": "Acknowledge this lifecycle validation."
133
+ },
134
+ {
135
+ "role": "assistant",
136
+ "content": "Validation acknowledged."
137
+ }
138
+ ]
139
+ }
140
+ ],
141
+ "n_turns": 1,
142
+ "n_roots": 1,
143
+ "budget_stop_count": 0,
144
+ "n_trainable_tokens": 0,
145
+ "multi_turn": false,
146
+ "atif": "none",
147
+ "trace_source": "",
148
+ "findings": [
149
+ "[WARN] degenerate_rollout: exactly 1 model call for the whole task; inspect the agent log if this was unexpected. Valid captured tokens remain eligible for training."
150
+ ],
151
+ "wall_s": 31.35,
152
+ "phase_timings": {},
153
+ "agent_log_tail": "",
154
+ "ok": true,
155
+ "error": null,
156
+ "exception_type": null
157
+ }
158
+ ]
159
+ }
reports/validation-summary.json ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "upstream_revision": "03742c79f48646e0130886e18e3e79798cf8edd7",
3
+ "corpus_reference_solves": {
4
+ "passed": 270,
5
+ "total": 270,
6
+ "tool_templates_exercised": 33,
7
+ "scope": "In-process upstream facade and public action oracle; Python execution uses isolated Docker worker. Not 270 Harbor container trials."
8
+ },
9
+ "harbor_pilot": {
10
+ "passed": 2,
11
+ "total": 2,
12
+ "rewards": [
13
+ 1,
14
+ 1
15
+ ],
16
+ "infrastructure_errors": 0
17
+ },
18
+ "concurrent_agent_forgery_check": {
19
+ "passed": 2,
20
+ "total": 2,
21
+ "rewards": [
22
+ 0,
23
+ 0
24
+ ],
25
+ "infrastructure_errors": 0
26
+ },
27
+ "worker_isolation": [
28
+ {
29
+ "check": "normal Python",
30
+ "passed": true
31
+ },
32
+ {
33
+ "check": "no scenario files",
34
+ "passed": true
35
+ },
36
+ {
37
+ "check": "no server module",
38
+ "passed": true
39
+ },
40
+ {
41
+ "check": "no network sockets",
42
+ "passed": true
43
+ },
44
+ {
45
+ "check": "no parent environment",
46
+ "passed": true
47
+ },
48
+ {
49
+ "check": "CPU limit",
50
+ "passed": true
51
+ }
52
+ ],
53
+ "api_regressions": {
54
+ "passed": 8,
55
+ "total": 8
56
+ },
57
+ "openenv": {
58
+ "passed": 2,
59
+ "total": 2,
60
+ "rewards": [
61
+ 1.0,
62
+ 1.0
63
+ ],
64
+ "captured_turns": [
65
+ 1,
66
+ 1
67
+ ],
68
+ "scope": "Real OpenEnv task discovery, run_rollout and text capture using a scripted localhost endpoint, followed by public-action oracle. No paid model or token/logprob validation."
69
+ },
70
+ "limits": [
71
+ "Docker is the supported backend.",
72
+ "Not 270 independent Harbor container trials.",
73
+ "No paid-model baseline, installed-harness inference, or training token/logprob validation.",
74
+ "Action budget differs from upstream model-turn budget.",
75
+ "Agent egress remains available; no contamination-resistance claim.",
76
+ "Upstream README declares MIT but original LICENSE notice is missing."
77
+ ]
78
+ }
reports/worker-isolation.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "check": "normal Python",
4
+ "passed": true
5
+ },
6
+ {
7
+ "check": "no scenario files",
8
+ "passed": true
9
+ },
10
+ {
11
+ "check": "no server module",
12
+ "passed": true
13
+ },
14
+ {
15
+ "check": "no network sockets",
16
+ "passed": true
17
+ },
18
+ {
19
+ "check": "no parent environment",
20
+ "passed": true
21
+ },
22
+ {
23
+ "check": "CPU limit",
24
+ "passed": true
25
+ }
26
+ ]
runtime-requirements.txt ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ annotated-doc==0.0.5
2
+ # via fastapi
3
+ annotated-types==0.8.0
4
+ # via pydantic
5
+ anyio==4.16.0
6
+ # via starlette
7
+ certifi==2026.10.23
8
+ # via requests
9
+ cffi==2.1.1 ; platform_python_implementation != 'PyPy'
10
+ # via cryptography
11
+ charset-normalizer==3.5.2
12
+ # via requests
13
+ click==8.5.0
14
+ # via uvicorn
15
+ cryptography==50.0.2
16
+ # via agentescapebench-harbor
17
+ fastapi==0.162.0
18
+ # via agentescapebench-harbor
19
+ h11==0.16.0
20
+ # via uvicorn
21
+ idna==3.20
22
+ # via
23
+ # anyio
24
+ # requests
25
+ opentelemetry-api==1.45.2
26
+ # via fastapi
27
+ pycparser==3.12 ; implementation_name != 'PyPy' and platform_python_implementation != 'PyPy'
28
+ # via cffi
29
+ pydantic==2.14.2
30
+ # via
31
+ # agentescapebench-harbor
32
+ # fastapi
33
+ pydantic-core==2.50.2
34
+ # via pydantic
35
+ pytz==2025.2
36
+ # via agentescapebench-harbor
37
+ requests==2.34.2
38
+ # via agentescapebench-harbor
39
+ starlette==1.10.0
40
+ # via fastapi
41
+ typing-extensions==4.16.0
42
+ # via
43
+ # anyio
44
+ # fastapi
45
+ # opentelemetry-api
46
+ # pydantic
47
+ # pydantic-core
48
+ # starlette
49
+ # typing-inspection
50
+ typing-inspection==0.4.4
51
+ # via
52
+ # fastapi
53
+ # pydantic
54
+ urllib3==2.8.0
55
+ # via requests
56
+ uvicorn==0.54.0
57
+ # via agentescapebench-harbor
source-lock.json ADDED
@@ -0,0 +1,284 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "upstream_repository": "https://github.com/AGI-Eval-Official/Repo-of-AgentEscapeBench",
3
+ "upstream_revision": "03742c79f48646e0130886e18e3e79798cf8edd7",
4
+ "base_image": "python:3.13-slim-bookworm@sha256:281d39ff02e3b389401586134ff9e6572954687822a58055ec07a60ded4e0b7f",
5
+ "harbor": "0.25.0",
6
+ "openenv_revision": "1e5317e9ebbe016fb9f94e545cf4a996d464e22b",
7
+ "vendored_files": {
8
+ "server.py": "5a699d0a6574f1493867bc9ca30543f41a585a2297eafbbe2d73dcf19434882d",
9
+ "simulator.py": "c0766e52dcd0250a6c0144e1c4f8618a52905cd14a1ea5c23684dff49471bc5a",
10
+ "models.py": "c57abdf82dbcae154895b25caa71126a08c55e553a832f8a2ae1d7b81ccd5685"
11
+ },
12
+ "scenarios": {
13
+ "agentescape-10-skeleton-091c541b": "83d98439d39256e4b29728d5ad1b61c9b953cc8e5f04a05a40e5145642df10bd",
14
+ "agentescape-10-skeleton-0ac6e14b": "f6fca1fb54b2c90f5dbeb7de094c725d9af5ca621e8dfe4b4ec39fc776f8fc35",
15
+ "agentescape-10-skeleton-0cd591ed": "93779c995a115d59efa60f98994d8c321756689dbfd23e7ef9b880b0976f3e7f",
16
+ "agentescape-10-skeleton-15cd0fc1": "6836e9c586502bac4605043dab8bba5a68e2178343ec5a976fe138ddcee0204c",
17
+ "agentescape-10-skeleton-17c70732": "866657b8bf6de1294faa4b3c0c52bda693062a3ba3ef9a52d261fde72e3a74cc",
18
+ "agentescape-10-skeleton-1bb353bc": "d2eb0e1bd3d6f05bea34976112872053903f8a5fb773c1f285aa33a538a78473",
19
+ "agentescape-10-skeleton-232580c5": "9116f79f123536756d60b0af804b9803b44ef3be97a03b1ae44e590358ee4910",
20
+ "agentescape-10-skeleton-277b1f3c": "a725e2a2ff06a8d0633815385e75863d02f28d0f85697d7bfa6a263e9dc75474",
21
+ "agentescape-10-skeleton-2a4fc5a2": "b14005b246f3e7fb70c1f55c9efb600fad2d01c0ec8a98f63d5fcc149627d78a",
22
+ "agentescape-10-skeleton-2e8147dc": "21a6c59765130c6de9aa34a03eb5ccd9fb57685443a7efb8bc67aac1b26b5c8a",
23
+ "agentescape-10-skeleton-310eae83": "12fbdc9761f22bf05becea4745ffb4e7184e1ad12e6e1ecaacf47a12084af929",
24
+ "agentescape-10-skeleton-33db7c84": "5a5b51515001b475a2f5df9b53511e5580b6f28a0bd71e41aa603b38bca66494",
25
+ "agentescape-10-skeleton-351ed964": "516c950d32d66795c25c5e9cbf0987b41106bdd1a0622978e7b03e0378bc89b7",
26
+ "agentescape-10-skeleton-391497b4": "7f71f7657077b0721d60e8239bd6bd2dc6314a8efc8f5564ae550f2efe389268",
27
+ "agentescape-10-skeleton-41d910c3": "dd02738ce32a610db1dfac3aa248382482587a61196d5d77ec2708c0dd63797a",
28
+ "agentescape-10-skeleton-443eb8ca": "af0e1445d2b8adf303695ecbbfa725f69165a17c0d837d8492d531b12fc90845",
29
+ "agentescape-10-skeleton-4f67082a": "c118d94818d3a7dcf48adc3e2a4937423b221754044cdf833054a843207a67e0",
30
+ "agentescape-10-skeleton-50e7b8ab": "a0c6db580a1c232cd66defb481166e8e01f74c712003654aa10223cab6eb445b",
31
+ "agentescape-10-skeleton-5198ed25": "62110038d2eb8289faea9213dd72b601ba569da6687fa63b0cd7d6544af3e7c7",
32
+ "agentescape-10-skeleton-52f17c3a": "f0e0c1f8e0b6da79265e3fc475719f1517839bf8afb9ee5c5986abdd1103879b",
33
+ "agentescape-10-skeleton-551d8168": "f4b29bf8792048437ac1ae70aa9a5ee4fb190058aeb0150b3e7a381b3e405ff9",
34
+ "agentescape-10-skeleton-581758ec": "cee46a1bc38b15533c98037c722e93ea4c7404c0d7872db6639d8642165b18dd",
35
+ "agentescape-10-skeleton-5946e55d": "73d0c51208f77060b81c7b0569e6216844bfd8f7b41f187f3b7630c36443701f",
36
+ "agentescape-10-skeleton-61eaf804": "3f14bf572734b029c7d7c74fea5e32c62651202da8f496023cb866252189d4c3",
37
+ "agentescape-10-skeleton-6fd12d0b": "efa792d10dd2fba50c6e4e98b0cfb99f74a440619df388cb8236de5d0d5b0f2b",
38
+ "agentescape-10-skeleton-72742e06": "b5b6853160a72e6975b48434d63089895036d93d17d723e62d7905512ba9cadb",
39
+ "agentescape-10-skeleton-74939ff6": "7963377fe5faa79ffc946bd829978dceee5c17e250fb4874f442017688e24a55",
40
+ "agentescape-10-skeleton-782eddd5": "8d9aef6792d1da66e4725ba8e4031d58677aecd8c38c45b834e7c7802dee8519",
41
+ "agentescape-10-skeleton-79ae61d4": "a18b95d96490c8c50119dfbf4d74b4012a863f67a1f8619131263a89ff85876b",
42
+ "agentescape-10-skeleton-7e8ad00e": "80580edb68ef835c419e31a91d47b826886dad49cf468237c70fdf9199829c56",
43
+ "agentescape-10-skeleton-8088a580": "248cccb02ef18f1e4d5d39e01e4fa08299967197f1a83e59d52a52c281292451",
44
+ "agentescape-10-skeleton-8f3fdca2": "7605bb2aa7f2b67b205410101d4bf63c9263ec896446ecd26e6e67d8d5a48350",
45
+ "agentescape-10-skeleton-91be9b45": "28714e683fa274ee83a8e1f5e1bdf9029a9b082f2b3c29aff577b796e1381d00",
46
+ "agentescape-10-skeleton-9a97c16c": "4c1694bcd24cd297ac963a90deb116d31d0657fb24d9150c12b3607dd06a82ec",
47
+ "agentescape-10-skeleton-9b06dad1": "4d7ff7ec1044bda74378fd28e8c2a9270fcce4c642c66028f0a46b55303c1d7d",
48
+ "agentescape-10-skeleton-9b98ca62": "be9857c8b51883e8bf9242a55180274483ea528c687ed67bb74ebddf26abf513",
49
+ "agentescape-10-skeleton-a4248b22": "086b33a73d0ce6233d137c8eafe6fb7c351b88583ee2aab213b17a370a11067e",
50
+ "agentescape-10-skeleton-ac5cd29c": "3f18cd4c6154740e702d44a9ab69009e8b45ead9ead1f02a01bd691ab1820f66",
51
+ "agentescape-10-skeleton-aca48fe9": "2e1d46309cca2f3b3d3a75f03c539eac2fd2278f956856b64791b0d34c959794",
52
+ "agentescape-10-skeleton-ad7b1cee": "f5eccf3058e2b8ae29ad90c3398569085dd089cf693cb948e3c1bf6389dee2e1",
53
+ "agentescape-10-skeleton-ad968827": "6ed9883964f5d2d7edc3aacd11fc1e1e0de1ce3b9e3a20d61d7eac918011bfdc",
54
+ "agentescape-10-skeleton-b29cc351": "7c8e06b2626e8a1946f1ff24a2d9bbd15ad5dbe38de700cea13ae882a44a59e8",
55
+ "agentescape-10-skeleton-b5a1661b": "415f8defb97ff0d54f240b13d8cfa32ebbf5ba4cd8c9e135100de6e440ab177c",
56
+ "agentescape-10-skeleton-b86b9591": "e1af3156044b73a9ab9121825bbefdebd34de894db9fd17630a09d11054e25db",
57
+ "agentescape-10-skeleton-b9837ca3": "1172103b40978431a4072c3a77ee37a186127df638efdc524cca4052c6f6bfd7",
58
+ "agentescape-10-skeleton-be9fd232": "37627d0c5b154e7420ff69be16495250766d2d760f139ec00b8b80a340bf109e",
59
+ "agentescape-10-skeleton-c08e708b": "e61746fcb7e3799b87327318c575e508db07ee939804fe0b23e99f76465ea850",
60
+ "agentescape-10-skeleton-c615ec73": "a59eb8c5b09eaeeef5d168abb9f54c46b956178709fb427dfaccd9aa1c2888b2",
61
+ "agentescape-10-skeleton-c9ca2c76": "a35210af603ff949cb97c4f6bf8ca24342fd64e48e0040e7c77a331937194cfb",
62
+ "agentescape-10-skeleton-caf1254d": "4e4f6512e0298cf3a99e533609e39fd78840cb94292bc0175bc2c922ec43de0b",
63
+ "agentescape-10-skeleton-cb08b5ce": "c703239ea636c7c7a6cdf0726f676d7cbaf9fd91f2b1d849db00edce7a0703d6",
64
+ "agentescape-10-skeleton-d94b6b54": "97dd33a3d1b0081f12acd0e26134e1fdcb84774bfc798c16401b2d795c703f71",
65
+ "agentescape-10-skeleton-db9768c4": "8d70ba2ebd4b9e79fec755be01b497a4a44c5ab6f249187c9715af0ba9b16c86",
66
+ "agentescape-10-skeleton-dc1b3170": "6211c87dc61b44fd552815ab965cb1bc84ac2a2e48d4a68b2416dcad93aadc3c",
67
+ "agentescape-10-skeleton-dd7f341b": "af197c3ffd4b8df2aba09a25264388aea518516da1c760cbb1b8037cfc3f0766",
68
+ "agentescape-10-skeleton-e2d68aa4": "249ae16ce032de54f51ee66900534277ff4bfcf2394d2c1629c1bfb3e8c16ed5",
69
+ "agentescape-10-skeleton-e945ba46": "d1718021e428235c70a1ac9575dbb2321cd8c7aab39d215da9724c4d117b830f",
70
+ "agentescape-10-skeleton-ea421e92": "ca6313c4c8b4c879007177564789eb87ffcbc2af7b596d4cec809ddff7db5140",
71
+ "agentescape-10-skeleton-f344f8a8": "7c7aff68431057f62ae5397f3b53af5c49a0b94ce8d2bb3ea79a2ba017b8c4d0",
72
+ "agentescape-10-skeleton-f59bfe1e": "9ff4ce53360013cba27e0f950c17d8baedd955e10b6c10d5e59e43be5512fec1",
73
+ "agentescape-15-skeleton-0284d300": "4cd3434254cf39700292e6e5ff3d13f0d23b14cf6287bd9e4e9df8407ca1e499",
74
+ "agentescape-15-skeleton-031b58b6": "31c2d9a3c2d33eaeb5a626f74881d4456ab5b49f5983dd93a686b13eedfce004",
75
+ "agentescape-15-skeleton-0a051ed6": "e59f607b5a2ce9f71e426f8e607f7ce8374daecfb843ca35fc5d45c559af7c18",
76
+ "agentescape-15-skeleton-121d3bf9": "7917da64959863f27c398df8a8af95ec0e5b4dce1dfeca306edd33b8d737684f",
77
+ "agentescape-15-skeleton-15f3516a": "db7d92fc2ddcb45acdba0174a811f44354b4c12accb4c70a398e7b2ce0d54ad9",
78
+ "agentescape-15-skeleton-21812ed2": "babd5ff7d1edcc68c60352882d4848315504d237168790c39564d5c92acd885f",
79
+ "agentescape-15-skeleton-2d79db0d": "ca51546603e7913a44829733d1b07e10569b039c1cfc308fd28b843eebc3073b",
80
+ "agentescape-15-skeleton-2e9cff45": "dd595eae93229fd32547fedee6f663520c782e466cdbea9eb5ac16918f96e94f",
81
+ "agentescape-15-skeleton-3841189d": "5394a349f5e4ff57ed35717bfa237175f195aa05a7581b7d58d546092c151ca3",
82
+ "agentescape-15-skeleton-3b64066d": "ae409fc721f32c324e399525551d3ad2fa6e9db6689008ec1525c896f1b8f311",
83
+ "agentescape-15-skeleton-3c3b7112": "2c3a064e86581a4af8a0fce451d55bcae7a58e1315e3fb7d3f1420d5963c7c88",
84
+ "agentescape-15-skeleton-41513452": "44b2b243a6246508ae69cba7cda06e221ac66105f27f07f8f44255ee08d87a52",
85
+ "agentescape-15-skeleton-420a410f": "08180a2fcfa76c7d8268fef74c350bc83fbddd488d9ea327d9292aa9a203515c",
86
+ "agentescape-15-skeleton-4828aa13": "b171662fca63763f2abad2473e03e4b74b6a9be979b88f7b10571e76b4fb03a8",
87
+ "agentescape-15-skeleton-53ca9853": "83c4ab4a2cc5823c25ebd3f3718ca41ce6da11e7c3b25bfba39299faa60a4603",
88
+ "agentescape-15-skeleton-574dcd85": "df9d773a1d37cf4e8c8d2b30259d050153fb0916fc7d743429e00cd3b3edcf23",
89
+ "agentescape-15-skeleton-58e8b735": "f27a5b94b79def05c99fcef42b40b1a513ab1dce3c53f970ebda32e4f5add73d",
90
+ "agentescape-15-skeleton-5956f7d2": "9ff1ada837c3392c2fc6b7d077833f29bf27307964aeeddea1bfa423eb00150f",
91
+ "agentescape-15-skeleton-59bbf192": "9d35e075c3589eaaf07de58c206e7434bbb73b1a71eebceaef89f6332aec7615",
92
+ "agentescape-15-skeleton-5a3d2d50": "0d2dd3be6f9439abeb0d914f6baf46feeb17164746612fe046be3c650b4f08e6",
93
+ "agentescape-15-skeleton-5ce97e6c": "fcf89158752a950831824260324ca61a9ad5cdeaaf73105f21bc5763f955829d",
94
+ "agentescape-15-skeleton-61902d69": "ed7ae04c4df6f86df6dee9c8f4cd959fc4b70c362eaea653fcfd77292a0776af",
95
+ "agentescape-15-skeleton-64331efd": "511d4593b43c41fe9e938dd949d0219bb27a2ce309ad93eba3b662ec8464dbb8",
96
+ "agentescape-15-skeleton-6c05dc66": "d5d806d6590a2c255a36dc03c501d79198f91da303517986272e98cf2501e824",
97
+ "agentescape-15-skeleton-72198bc2": "77b4488d024161d747c0b1fe726deb409fe73ed2724c680e083a02de0614e4a3",
98
+ "agentescape-15-skeleton-73fc8676": "11a78c7453535b74a3d4d8bef030a1fe5a5ca5cfbb0860fc1023b441ca422d1a",
99
+ "agentescape-15-skeleton-7b7d9797": "8bd72846b27a223564f9057bf3db47a822b1d4767dd0c688c79e10aa34330c21",
100
+ "agentescape-15-skeleton-87684170": "c05c46091b29f17367e2b04cea5f23759b4c8c09878ea970615dc3d52efa0069",
101
+ "agentescape-15-skeleton-8ee36fb4": "eb39f15f9a18432f8f3e249cd4b184695249dfcfff793c32cd4bc16dd1c58a0a",
102
+ "agentescape-15-skeleton-8fff2538": "701568cc755a98a32f54eb2192ad344fb41d5a360bf3475de743f4c3e4dcb4b6",
103
+ "agentescape-15-skeleton-931603ff": "72e22d923683d844cdecfd35ce3c773f981c01a54ee652abfdf576a0ee0c50b3",
104
+ "agentescape-15-skeleton-93505631": "8ee485ce3dade3d76ca432f002026ad30b237783a5cd06a9516fcbb2805c4e11",
105
+ "agentescape-15-skeleton-943e247d": "b6e544d47f7d61444aa32d0b896c4f3b2b206db42a6857d631441977eee8d591",
106
+ "agentescape-15-skeleton-954a7e3c": "55c5a6fba6bb280786f06cfb77c665ac27909ad03dfe42cb8708189dd136e5a5",
107
+ "agentescape-15-skeleton-99479deb": "e820a58e4d99d80b86db8611d3a5b75a513bdc7819e8efd43f531e9c407e73c5",
108
+ "agentescape-15-skeleton-a267e7bf": "298c3248ade30405cdc34fa7a5a95bca0843d421dbe912652225f2206205f0d2",
109
+ "agentescape-15-skeleton-a5f66c02": "7494a4b3f9e9628977ce8b12dabc602f2e3da477b179339555e1486881420a73",
110
+ "agentescape-15-skeleton-aa68ad8d": "11d8886e2a7ad41d7b842d2a21a9b0a3662ad7c08cba74ed1893c2aa4fdeb3ba",
111
+ "agentescape-15-skeleton-b45b9e21": "a248803bfc9d46d8c34636b9825469c30eb3447fff24ba6528670595b3824e45",
112
+ "agentescape-15-skeleton-b79ed8ec": "47ac1f545f36c330078c5fb2d261f0b73689e3bb88ee8a78a06467d726a41249",
113
+ "agentescape-15-skeleton-bb9b5a90": "2be7eb7c7b37df98be74e69e7529251718a21eea79bde36292f54416f39bdb52",
114
+ "agentescape-15-skeleton-bce77c44": "a72d7793dc9e7ce02fbace5ec7af271a938ade829d3a893f944637819c525c27",
115
+ "agentescape-15-skeleton-bdececa9": "435366b9da1b5690ca348e8ecbc3c7ce769b0fa8173cc4f523ed2cd4a1f722c1",
116
+ "agentescape-15-skeleton-ca8aca2e": "7e754eb9d67729ebe8e06cbd828767f95b2823b0e180ff71f2bc9c1f47884306",
117
+ "agentescape-15-skeleton-cd4a6784": "604e60e44ce367dd6ef94fedc2873d6d85513f0900ef53a06acf44d9f806744c",
118
+ "agentescape-15-skeleton-cd867395": "cc96abbe3499145fcb0e1360cd17cfbb424ccd62c63a9f347a3075c5394d955a",
119
+ "agentescape-15-skeleton-d643af50": "2883c4241ef1e1f7c6973be3ed27ff6ea1550ad36283d5cd33f0d39c245eb7f6",
120
+ "agentescape-15-skeleton-d86442c8": "fb95745e32a2f60cfd33c7f3396fb2bdb8beb097f64adafdfd10cec771c43e14",
121
+ "agentescape-15-skeleton-decde96f": "e6a81b56faf48bb78886dea489cc2a39788606c6fcff7a9c19789ce4d94819a0",
122
+ "agentescape-15-skeleton-e0ef8d0e": "9e4a69918ad2daefbf5c1c523d3acc176b96c91e9adf4df79cd082d394dc53f8",
123
+ "agentescape-15-skeleton-e1cd57a7": "356ddfe83bace7a4dac81a892d490303872513c9e29633eb54eb8d9bc15b875b",
124
+ "agentescape-15-skeleton-e359fd19": "8d4c7de5181ef3891ae05a715cb2587ffba1caf3d650ab92fd823633b60833d1",
125
+ "agentescape-15-skeleton-e5b87db3": "07d4043bc8973190681b9f419bd00675008ed9661294e1092487f50d4f0b2717",
126
+ "agentescape-15-skeleton-e95b1127": "938930a0949f78e93eeb30da203e5a773106aa874cfad8c7ed3c9e1092879b29",
127
+ "agentescape-15-skeleton-eb9e6398": "bc63850813fe1c8fbb57d79cca561c7d6e33bab7ba80218cdf70f5fed22a63fd",
128
+ "agentescape-15-skeleton-f2497a17": "cea609f3c6cce863584e5c0a2520b3d9f6c122754a94b65ee3b1ac02df427984",
129
+ "agentescape-15-skeleton-f6f4950d": "d8ab0f4baee09134f6aa18b76b2ab6fcc1a1395342f3b0850acc7ee6ce878446",
130
+ "agentescape-15-skeleton-f8e0c35f": "d4d78e004936cf6157b372d16ce2a35cf9bd39a063702de8f9fc1785a8012f97",
131
+ "agentescape-15-skeleton-fab2f6a8": "e7ebf25f876e057a989aaf63caf142c37342fe202cd8b7571a5e66fd28f693d6",
132
+ "agentescape-15-skeleton-fe48b1cc": "26c922ad809cfde27fb79de2015fb2a7b4f420e9d7928dd8539378c4c052bdae",
133
+ "agentescape-20-skeleton-0052d9e8": "645499039d561c07e53159af5e445745cdc9d61da687ddd0dc221cdcaab3fd42",
134
+ "agentescape-20-skeleton-0361eea1": "38aa0faee9f6b831e35fb8f7d65dc62ca109997586c29b894c74a8553b221e84",
135
+ "agentescape-20-skeleton-041d7853": "27a7926665332c479b0869f5f527f7cae42c3dad511d4a80bcbcea704f14f103",
136
+ "agentescape-20-skeleton-0756c6fe": "00b18977dc375e4ebf8a9a185af0da8b028ba98b4aab5d5077842afe7b247f4d",
137
+ "agentescape-20-skeleton-09a77967": "e28015ae7b622685918b44c9809d1c550846c2a0c78556fbccd580a76606451e",
138
+ "agentescape-20-skeleton-0ec934a1": "f768f0213dc36060b59f9b4bc3d97d3c7ae0a11b36a4464c3efdbe001979b82d",
139
+ "agentescape-20-skeleton-11dedc3a": "4525b108967911790dd041dd0da669209bf7aae93762304f0df2093b7a13a674",
140
+ "agentescape-20-skeleton-148a2d02": "12b3528924e362f7c10e387a5efbbae2383b10e65355da8e0a9202871ceef78c",
141
+ "agentescape-20-skeleton-229db497": "0cb37a25532af9d74d4750ea37242d2af188cca8d2634b97b83cb794990e8c8b",
142
+ "agentescape-20-skeleton-2435d26f": "446a8832836ed8336dd213242628d11c4b7e76ea4ee26c83eddc664b2ee369d5",
143
+ "agentescape-20-skeleton-25a3ba06": "68606f417c55e9e4c0430b8542387438627ddb9ed6e3bbacd403b5c3365122fb",
144
+ "agentescape-20-skeleton-2625b918": "08f7ac844e558d0b71089462e413d9210ef03e2f4526c7bcf435f96b04058bff",
145
+ "agentescape-20-skeleton-2b1efbd7": "7e2a5d673c3bd1daa57af1dd96c59932315264d3c6b6df0e71782d9653aeb41c",
146
+ "agentescape-20-skeleton-2ce1afe2": "22d5fccbad2e8921895bcf5305243020477139726463dec407e63ee93ec86f81",
147
+ "agentescape-20-skeleton-2d1d9ac8": "199ca12b81220d08c10a8579fd61264b4d27be44e502e3fac294c05d22b4d0a1",
148
+ "agentescape-20-skeleton-33c37c0c": "74ec0ebb809486272303c469006d3f4abfad960e398f31f93616371f372623e4",
149
+ "agentescape-20-skeleton-350fd21b": "2f6c19a4a523582c409fb424fb2186882c7a06b2d5d80d495cb87ff4aedb99d7",
150
+ "agentescape-20-skeleton-3516978c": "03b05af7877db2dbec8da35bee5d7987d5114b97bf7f68ada430d956bd65a12a",
151
+ "agentescape-20-skeleton-3d2f6033": "99d28072f10d2a92a88fe5b6b25cece42a92233eb37e187191a8d24b026c1800",
152
+ "agentescape-20-skeleton-450e1521": "10b9aace80b1307334086aa8d3a9b419d2cc3a5f4ca52e0a33346c59961fafbd",
153
+ "agentescape-20-skeleton-4f01716a": "3dd2e6ffa8975087535949ec88591c8bddcb6dc8f3403bfdcd1895845981e1ee",
154
+ "agentescape-20-skeleton-4f8a8ba3": "fad503314b6cc8aaead7217f0c42a003f3aba068f094caeedbdfa3a0bda0414f",
155
+ "agentescape-20-skeleton-512db3e4": "bf0096eaea3838b6d753150c3196f402ca07baa6d6e5e00b02d43541be1e8f0a",
156
+ "agentescape-20-skeleton-6a4d1a16": "644cc8b5814c7310bc670b7afb3b4eababfb1a0cb3cec402c14d625f173a6db0",
157
+ "agentescape-20-skeleton-702aff38": "ea027760220b837d814dd548087679342ddfd6dd0062dfedeff745fb9d747b0c",
158
+ "agentescape-20-skeleton-783c95e1": "c9cbe285236145cf744c44d690fcff60f32107f2595e4ad553359a33e647bee3",
159
+ "agentescape-20-skeleton-7e40df42": "c51e75003350a907f160d919c1388772ed6da7374e1c0c2122f82c90062613b9",
160
+ "agentescape-20-skeleton-81423b2e": "a387351d4c1a66ca322bbfb79049bba42b35682bf9d702707909124c54a8a7c9",
161
+ "agentescape-20-skeleton-8775d3bb": "23afbbf08c54a4f086db9fa5a50a175fa6d587e046e0fec562fa89e56f133970",
162
+ "agentescape-20-skeleton-9346c9bc": "35de89ac8795e4056aad644a3801d3c4556774412160f50d12ad236fbd820dea",
163
+ "agentescape-20-skeleton-9bc0c8bf": "81e34fb73ae746ca667e8f4528ca4788f3d638fd4ed7c2bc292e08e015802a27",
164
+ "agentescape-20-skeleton-9d70fc64": "11adcfe33940212030b3d5dd6af91b8ddac3b380624e7e7277377c8450e3cece",
165
+ "agentescape-20-skeleton-9da0c9f5": "fbecc224859f39ff4f4ffa124c1cc94f57cdabcf483f81db90c571dc59caa4ba",
166
+ "agentescape-20-skeleton-a13d0185": "b2a89979ac906a8cb8f4b64a1d53ed1284f4f1e3c2582dbeb47d4c1d62fa41cd",
167
+ "agentescape-20-skeleton-a4898e76": "575cc4d9e77faae707cf2c0e1ccbc0c719c4c121f19133341e7a1bfce8b1010b",
168
+ "agentescape-20-skeleton-a8f008ed": "6a5d94b081f8009b47c6fed69b545a94d1655e04edb65366be8f22cecc720aa5",
169
+ "agentescape-20-skeleton-a8f2622d": "06673587c5bc7a9c61b606678f2a03325b3aec9c1684707e15e835011bc9c243",
170
+ "agentescape-20-skeleton-aa9de9ba": "a349ffec514e7aaf2eb5e08a4544a74f463ded9b255991655420325df5beb492",
171
+ "agentescape-20-skeleton-aabe61d1": "04e33782033292bd91b8233fcff9077cd8c696657b5718320494ec66d3301c10",
172
+ "agentescape-20-skeleton-b6d0d3bd": "395845f28442130d5f1acdbb0581f07c9bbfc14971f0063c0640c326747de725",
173
+ "agentescape-20-skeleton-be2c15e5": "1873ab3e5cb399510a1d29d10d3e26b554e01e87319d336556feb6ce1d01bca3",
174
+ "agentescape-20-skeleton-c046fa72": "1572c9f07c53cfd81fc81098a4bc31862978324dcff199d5eb8576b1d619f2cc",
175
+ "agentescape-20-skeleton-c3f3ae9d": "02f87cca1a258d6e4094741867d700c2ba684a1e3560cb80e08589db6363557f",
176
+ "agentescape-20-skeleton-cb36b0d2": "97c4403d0b56ab18bde0e01337ee6ce9b1fa8f690b0fab48a89c248237fff583",
177
+ "agentescape-20-skeleton-cd40ede1": "f449cbd1fce30093bcc1b36657ccb3607a3621917ae7ba76357cf478818e452f",
178
+ "agentescape-20-skeleton-cf5e63ad": "aaee7340db373b107b79b201965c888eb81d46c1d01a70a34cb24b2c5b963cfc",
179
+ "agentescape-20-skeleton-d08a2ac0": "6aae1fb8e497396153cafb9c2f2a2b5487d1b244b6c7c6c6e605b0f099fa85be",
180
+ "agentescape-20-skeleton-d7f1f755": "f61bbbf47383da7c691fcb33935ebe8a063a865558af77a3bdb54decf45fb57c",
181
+ "agentescape-20-skeleton-d9413675": "4a7c729454794be91a1f0677d094ddd8952d7d49e27b75978bf789937856636e",
182
+ "agentescape-20-skeleton-dc438c86": "31e0fd84efffd4b4a8053dfe79b9acf8018628e2206b1c10c9749556a584d612",
183
+ "agentescape-20-skeleton-e2dd76e2": "65c52c4801c2237052992173d5e41626f028c87061bd18d953d630211b778136",
184
+ "agentescape-20-skeleton-e9f7d225": "f0590f537eecdf76e51df2bd1aeab7a3874fef21cb2c498b4eac742c836aae23",
185
+ "agentescape-20-skeleton-f11e9fc6": "dbbf4a916cacef574ffaca6183541aba345ad76f505464ec2324e979b217227e",
186
+ "agentescape-20-skeleton-f5bc6a05": "d1b622a5e1c0d62cb29960f4bb7030d698a6b65c30131da08cdac7ae8dca07c6",
187
+ "agentescape-20-skeleton-f748146b": "c2400c60bf3b1f1e834b62d2795236007a9c65fc0d7fc38a24acd6609ef5fe77",
188
+ "agentescape-20-skeleton-f7e40c6d": "10504b30593dfc18819a826b3aaa65bbb1c5362589e1c636402da31f91d2f884",
189
+ "agentescape-20-skeleton-f8b57305": "b24d416d4effb60c508b0178a38a3dff001ed633ff859137e1ecb1a3fec60709",
190
+ "agentescape-20-skeleton-fbb23776": "27446da4e02bb4451066fd1273e8e234cc1d093560a490c51175789ea498b318",
191
+ "agentescape-20-skeleton-fedeec59": "e9ad7b2a71f6f27609b08ec0f733143e963af67595edb27766550ba0b4418075",
192
+ "agentescape-20-skeleton-ff7ad1ba": "34a6353d9c2afeb1afead4fb339af0946d8f235ab3848a5e368fb4dd7f3cee67",
193
+ "agentescape-25-skeleton-0998524b": "e76205bf5a44ee3a457d45dcb15ea3d98959db3883bd214740ffe5ef7f2179af",
194
+ "agentescape-25-skeleton-1198101b": "4f00bc2c49f93076b7701b1eff5ffb75ae2070278222fe752dca22c77d9fffc4",
195
+ "agentescape-25-skeleton-119f292c": "8e47a12aac53a1f4ca71ecbf0bb37776d38770efbc71f2b53643213240f0e1ce",
196
+ "agentescape-25-skeleton-14887d43": "2afb568bf0eba527689fb81403c8b7555589e9bf0edd931560429943e1729e3c",
197
+ "agentescape-25-skeleton-14cb6872": "bb66b30c7f005a84302e67bb6fc2dd5b67e7964d8ab32eed8c7d803153ffc504",
198
+ "agentescape-25-skeleton-19fca94f": "0a260a55c6d7be21cbd28908ba1ddf0e5f6a5a2ce721f26fc027218555fe12ce",
199
+ "agentescape-25-skeleton-1c0ee18d": "b97e516dc7204a496f39cb161772995655a4851294fefea771ee47321a6984a9",
200
+ "agentescape-25-skeleton-248c41a5": "2697942e6659b96a7cece410b7888eff2cf1862e5683044d205329c690fc4812",
201
+ "agentescape-25-skeleton-324d85de": "c08225bddd4108892b368b3e8e57b7160b63ac7ce48d3a59ae842275a4397025",
202
+ "agentescape-25-skeleton-356c0ae2": "8ac574328b1f2a9a54cc8093ee3b4267403e326660a4b478e83102b0ee63537c",
203
+ "agentescape-25-skeleton-3597bfa8": "8cbf0a212ebce6dd298f05fe53a0ea48bbef623a77ab8dc85125ec48dce67253",
204
+ "agentescape-25-skeleton-3ae882d5": "642f463a47daeb81812cc4ee158fd846feb78302bbb581cdceee7b2ba344c79a",
205
+ "agentescape-25-skeleton-3cee13d8": "fbd59462282c59805f1e7f61d6678b7aa2d71c92b494fd9b76b72eca49bb8cfa",
206
+ "agentescape-25-skeleton-4b3614c7": "0090659543e9febfe496b99b12dd924a9feada4e66782604102e97cbad6a7fa7",
207
+ "agentescape-25-skeleton-534660f4": "eea647b1d4d967edf3f4bedb9f1f9513bf804a4c1dd23b5614f6c67b18045bd7",
208
+ "agentescape-25-skeleton-5d659179": "0abf9f18116b838e831edf418c708985fe4ec6a630ec5a15a1e36eede42721cf",
209
+ "agentescape-25-skeleton-5eefda51": "b1ee7bfee3b52c94ae2e5bccca11824723045fa1fadf2f348ae7be47c5d0d9e2",
210
+ "agentescape-25-skeleton-6ae6d120": "ca989e0ef777c5cbbf551c98b279fe776dbf1f4490886ee3eaa732bbbd8e90bc",
211
+ "agentescape-25-skeleton-7499421d": "a5a45662a71d2d18f24ce0ff6aab86f83d1eb5a76ff09cfa786dad7d49cbc975",
212
+ "agentescape-25-skeleton-8c861d5b": "c633ea7b68acf79d1bc31a8b63ceb3bf2537c32e0d25c6b08dae17218585bc99",
213
+ "agentescape-25-skeleton-93dd5f71": "3a12c5406990e3aa8ca1dec8769706d768441e1e0e8c1af095390b32b532276a",
214
+ "agentescape-25-skeleton-94cc40fa": "87d60b1ff1650b2109327645dc2117ec7d4e1c4733a27bf8da1e1621984f377f",
215
+ "agentescape-25-skeleton-a8a2cf21": "ff17a95784c70425e15b3edf0d40a6f8393251aa1a063c878d50c2bda3fc5b9b",
216
+ "agentescape-25-skeleton-ad399fad": "a13be2c936ca30d050a7ff14fc3b90f4ddc23a23d7d3a9d19c43fb47639381b5",
217
+ "agentescape-25-skeleton-b5fbf361": "71c8e3db2f1429a11e7cb079e606b700e6765cba0f0f45dfd53e7de693fed13a",
218
+ "agentescape-25-skeleton-c32db50f": "deee4d539ad75a7a79d840c3774af094bb92eaec1d2f33d6f0fdc349a767eb2c",
219
+ "agentescape-25-skeleton-c520de06": "cc28fae6de7540c8579ba4a1dbe1c76589c05bc0691223736cfd59d08fe123dc",
220
+ "agentescape-25-skeleton-d8d63351": "f7acd4b17f2bfea2a4876e25c3b7a3e221e410d952c5e475ff2709c2cdfb46c5",
221
+ "agentescape-25-skeleton-f064745e": "02606f6852add06d535641e9cf9ddf7829ce78c75c8e1e6c29f58193ee238294",
222
+ "agentescape-25-skeleton-f61a2be1": "4b3bc156247e3f6ce5d9a9014c843ec11781fbed64082d94e61726013e09da2b",
223
+ "agentescape-5-skeleton-032856e7": "e97aebc2f13b17f41a4fae0e27e8ab78cecae27145cfabfef1a802212054bf1b",
224
+ "agentescape-5-skeleton-0602c0c1": "504a885009c349e2ecf2c33d9311bad51308cfe7cc4ded0fc9a5cd654ff4e76e",
225
+ "agentescape-5-skeleton-06630b5d": "5f577137a8f54f5f18ea02643f27d338063bdc57d120ccf8cd741b101278058f",
226
+ "agentescape-5-skeleton-191e5bfd": "15f64a379fe893dd580e1e8f0bbbeeada43bc0a4e19d8df6d82a2dbd3e15f39b",
227
+ "agentescape-5-skeleton-1e2edc49": "ae1c8495c8d395410962e3fb69863459635e4147854cce889241f8e8f8c85db9",
228
+ "agentescape-5-skeleton-1e82a014": "1b5f94d307ac2368753d1e75ab12058701191dfb3e7de7d9b2ca16161ee017be",
229
+ "agentescape-5-skeleton-22c69731": "fbc0f2b7a316f359fa6868c74c8150ade4542f68c71cfcf483af26157d69f65d",
230
+ "agentescape-5-skeleton-28317341": "30ff8813d132e762c163379c1a90c9c2855c3ffb6d8d1bb2644f491de107c77d",
231
+ "agentescape-5-skeleton-28d90214": "02ae85485fe2994244f2cf9919294547c385808cd6b8a716b932f14334af775c",
232
+ "agentescape-5-skeleton-2a142490": "ab114c097881a1962853d6aa3e3ec0296b2ce00833f814661fac9e5e1e8b45d6",
233
+ "agentescape-5-skeleton-2e15201b": "109fca45b8e1fd6a352eef3fad81aa98e243414bd7dacc98945c2ce44675e38b",
234
+ "agentescape-5-skeleton-34ea8e9a": "473e5fb368b3ad64ce7d877dc845f8c16c0a5704bbfd92ac5803b899417137de",
235
+ "agentescape-5-skeleton-366a0785": "67e863c2a666894babb7be32f1078d9372f197252f26f5080af6d602a51254b4",
236
+ "agentescape-5-skeleton-403798ad": "d6d40b578101187fb6d1aebe35386747fdc54d9e57bf3d2656a50d4339354739",
237
+ "agentescape-5-skeleton-43e36cee": "e95ab6c70ab30bddb94754205a3ae6665ca00076e37275b089ed644cde0569db",
238
+ "agentescape-5-skeleton-4ce693ec": "c64634e8beeb4af728771ee0c3064cf1cae4dba4c4c4b5d4f151dd8959821394",
239
+ "agentescape-5-skeleton-5a11868b": "e1c08100ceae5b29c4a1339483b921d690b0eae274ecf6db4d839ca7598401c1",
240
+ "agentescape-5-skeleton-5e5372b1": "03b82554af1ff2cdf5769260a9ecce758e3238c088b545275ed4a8f025c85f41",
241
+ "agentescape-5-skeleton-6468d23a": "6b25bc4efc859b941fe76e958f86b3bcf01070ebd0955ae70d4cad4cade8011d",
242
+ "agentescape-5-skeleton-6783fb34": "305d4e68fc08c66417e2a42e9dcd12e29dea925c959764dff72aba328bf4ed35",
243
+ "agentescape-5-skeleton-6a9e4a56": "3e7e16e67a613c15917c54c107d0ff8c703e2dd2a6af431dd665c1f5efc4ce72",
244
+ "agentescape-5-skeleton-6bf81a52": "91b40c1931bf1dba938619ea82aa61ad48078c5563b889b8f1e5bc6fc5c887f3",
245
+ "agentescape-5-skeleton-71e780c4": "2a758ff9d904bf2614d000698243280cf4400a135d608e6a00453adb76832d32",
246
+ "agentescape-5-skeleton-74b391de": "31bb7bc651a880bc04341e948d09a0bffe66bfb7f69ef07b067f69ffe27978cf",
247
+ "agentescape-5-skeleton-770cb4b5": "baa6d0d437f042043076253e1937c739d814421cc30e63a11c1950a2c072323b",
248
+ "agentescape-5-skeleton-8481f7b2": "615d68414ce688f2c7477cf971ff5e3cc3f990bdc80c884dcac7215b3bebcbd1",
249
+ "agentescape-5-skeleton-861fc86d": "8cb1670ff626bba76c578d2dea1bc907db3d963f7aced37411ab6df036c1e4ae",
250
+ "agentescape-5-skeleton-86b3285f": "0cc5452a3df92ff392a5ba5c85d87c770e82d4953b0147e278993693e9012260",
251
+ "agentescape-5-skeleton-86ff0e82": "cce896c0abf788c2a8d01ca75186b5a7a81ba1d82fa977f9df8ad2f4afc8a7f9",
252
+ "agentescape-5-skeleton-891a8895": "66859b4e24766d7dc621ffeae75b3c1c4fe7095e9c440bc123ff944076114fe9",
253
+ "agentescape-5-skeleton-8bf523cc": "94f0ce8aca4cc8cb3f9feffa63764a9d092e27e2078c8cdf09b25063d976ab9f",
254
+ "agentescape-5-skeleton-905077c9": "3329b7ebdf381c176a9ca2e7366b545bb00c9afce28dd2244cecbc912e3daa17",
255
+ "agentescape-5-skeleton-94ededea": "6b3c50a5f3cd1f121210b6603ac1870cf9a3dceefc893cb2a8db7e4bb864b994",
256
+ "agentescape-5-skeleton-95d7bef3": "88fbd8330fd591538d4e2a1f91d4c5becbe26b7a7776ab32b21e92fd381563b6",
257
+ "agentescape-5-skeleton-a0489372": "a5da60190f8ab609c39ce54323947c4f5aa288c6eadd568c080616d114235c18",
258
+ "agentescape-5-skeleton-a15ff2d3": "f346dc6f969c67758987da481a1bc7883f3947b5a830080be0c9bc49ac17cbe9",
259
+ "agentescape-5-skeleton-a25dbc4b": "b0f4a9eeb5c502b2346eb8678a4bef481d06eabd50a0c3b5fd9b1e2ad4422bf2",
260
+ "agentescape-5-skeleton-a29e9429": "3cf636b35a532748601dc615ff8ebe9d1bdc5208bf0bb87b0a72af5118827f03",
261
+ "agentescape-5-skeleton-a32d9848": "9acfbad34f98d1df13c8ef2d11194e0f56df0ea82f5f41f381d0e5ba96994df2",
262
+ "agentescape-5-skeleton-a773b11e": "267b09c9811f559c599a8ba7cc106cca79b5ed65b1897a53d5ed184e299384b8",
263
+ "agentescape-5-skeleton-ab065926": "746407e14c714dee32e23f95f71259a55db9107246d6433f6787b0aa1e12dab1",
264
+ "agentescape-5-skeleton-afe88eac": "c12918a911d21ae53c9da2dab2aa6e6622aa3e0ff621d6c88d08e610e9d264df",
265
+ "agentescape-5-skeleton-b3a9ed27": "0dca5a389468c7f577a14488d72bddc1d948f03401b01bcc1e32568424aaf950",
266
+ "agentescape-5-skeleton-b3bd6e5d": "c91feb036e1cb434f2be84e953c54f818a85bba5df0452c7ebc4e0835f4500dd",
267
+ "agentescape-5-skeleton-bb6f4cdf": "f166c034c5d7b651e1b6afd243613bf6bc5dce12bcaf4257298b995ffb8f4969",
268
+ "agentescape-5-skeleton-bf2b9442": "76a01e4f10adfe7e381512e325efd8744203b15bc38e6bd587f5b38376644bc3",
269
+ "agentescape-5-skeleton-bf7732ba": "766ce9fb4fd68b957faa1d5fc9c6b2f3199ec2da4a066c07972b65662a6a311b",
270
+ "agentescape-5-skeleton-c10d41d2": "5063f2d20f654a01136efca98883be3d09a5218ec2d50c180411032aeb26bb18",
271
+ "agentescape-5-skeleton-c28065f7": "2e79283143fea3e7deabd04d82047a4c1ebf001dc733a505cf6b1133e5bd328a",
272
+ "agentescape-5-skeleton-c833dcfb": "3126c6327d6b53d7a8b2160ce560d3c6eef2fc4950bba3df1952027cb2628796",
273
+ "agentescape-5-skeleton-cbc9de7d": "4f193d5ec828002aa59bddcd67b05eb86c150143fcec32dce838f48f7c5aeb93",
274
+ "agentescape-5-skeleton-d0cc26bb": "fcebc82092c4acf3df260ea29a2fffde5f2fe0283b22428cf6976547c7e9e8c7",
275
+ "agentescape-5-skeleton-d16d1e74": "980e46546f7a427459605e9a1342e44a8b84da76e6d78a32ae36b31845120711",
276
+ "agentescape-5-skeleton-e165e4b4": "e0f656b370fbdfcddc547cc11cd16d3e4dc457927ed5def2d11c858561fc4760",
277
+ "agentescape-5-skeleton-e1a2d103": "da03727d986cf46a9a44c6e8ae5c628056eba50068440eafb7927ec588a9bfe3",
278
+ "agentescape-5-skeleton-f4252fd6": "b93e864df29f9e27d98b2f3d161fb4cf10ab02facfc10ecf95a104ad2c0f084d",
279
+ "agentescape-5-skeleton-fa384a93": "b09f6cf92b820359f58f41079f881a5415a40e5aedaa1bfb2b3c92fc390a5381",
280
+ "agentescape-5-skeleton-faec554e": "e2666f5bbab45766bdfbddbf34ac28bf80af8bd27850d348536ac4b456b70faf",
281
+ "agentescape-5-skeleton-fba0a08a": "e1648cc7dd17c4be79bbc918add11d50f2a74789bef079852dc3c0a1056d486c",
282
+ "agentescape-5-skeleton-ff8a576b": "bf2d5d985f762495da9f109fa2a7bb256d96916828ac6d74ebe6562946b4f4ef"
283
+ }
284
+ }
src/agentescape_port/__init__.py ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ """A minimal, self-contained AgentEscapeBench Harbor adapter."""
2
+
src/agentescape_port/adapter.py ADDED
@@ -0,0 +1,300 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Generate standalone Harbor tasks from the pinned AgentEscapeBench scenarios."""
2
+
3
+ import argparse
4
+ import hashlib
5
+ import json
6
+ import shutil
7
+ import tempfile
8
+ from collections import Counter
9
+ from pathlib import Path
10
+
11
+ SOURCE_REVISION = "03742c79f48646e0130886e18e3e79798cf8edd7"
12
+ ROOT = Path(__file__).resolve().parents[2]
13
+ RUNTIME = Path(__file__).parent / "runtime"
14
+ BASE_IMAGE = "python:3.13-slim-bookworm@sha256:281d39ff02e3b389401586134ff9e6572954687822a58055ec07a60ded4e0b7f"
15
+
16
+
17
+ def digest(path):
18
+ return hashlib.sha256(Path(path).read_bytes()).hexdigest()
19
+
20
+
21
+ def task_id(path):
22
+ return (
23
+ "agentescape-"
24
+ + path.parent.parent.name
25
+ + "-"
26
+ + path.stem.replace("_narrative", "").replace("_", "-")
27
+ )
28
+
29
+
30
+ def write(path, text):
31
+ path.parent.mkdir(parents=True, exist_ok=True)
32
+ path.write_text(text)
33
+ if path.suffix == ".sh":
34
+ path.chmod(0o755)
35
+
36
+
37
+ def generate(source, output, max_actions=500, overwrite=False):
38
+ name = task_id(source)
39
+ target = output / name
40
+ if target.exists() and not overwrite:
41
+ raise FileExistsError(f"Refusing to overwrite {target}; pass --overwrite")
42
+ scenario_hash = digest(source)
43
+ source_hash = hashlib.sha256(
44
+ Path(__file__).read_bytes()
45
+ + b"".join(
46
+ p.read_bytes()
47
+ for p in sorted(RUNTIME.rglob("*.py"))
48
+ if "__pycache__" not in p.parts
49
+ )
50
+ + (ROOT / "runtime-requirements.txt").read_bytes()
51
+ ).hexdigest()[:12]
52
+ output.mkdir(parents=True, exist_ok=True)
53
+ with tempfile.TemporaryDirectory(prefix=".generate-", dir=output) as temporary:
54
+ task = Path(temporary) / name
55
+ env = task / "environment"
56
+ write(env / "agent/cli.py", (RUNTIME / "cli.py").read_text())
57
+ agent_dockerfile = f"""FROM {BASE_IMAGE}
58
+ RUN apt-get update && apt-get install -y --no-install-recommends bash curl ca-certificates git && rm -rf /var/lib/apt/lists/*
59
+ COPY cli.py /usr/local/bin/escape
60
+ RUN chmod 755 /usr/local/bin/escape
61
+ WORKDIR /workspace
62
+ """
63
+ write(env / "agent/Dockerfile", agent_dockerfile)
64
+ # Harbor requires an environment definition even though Compose selects the narrower context.
65
+ write(env / "Dockerfile", agent_dockerfile)
66
+ backend = env / "puzzle"
67
+ backend.mkdir(parents=True)
68
+ for file in ("service.py", "export.py", "worker.py", "child.py"):
69
+ shutil.copyfile(RUNTIME / file, backend / file)
70
+ shutil.copytree(
71
+ RUNTIME / "upstream",
72
+ backend / "upstream",
73
+ ignore=shutil.ignore_patterns("__pycache__"),
74
+ )
75
+ shutil.copyfile(ROOT / "runtime-requirements.txt", backend / "requirements.txt")
76
+ shutil.copyfile(source, backend / "scenario.json")
77
+ write(
78
+ backend / "Dockerfile",
79
+ f"""FROM {BASE_IMAGE}
80
+ COPY requirements.txt /app/requirements.txt
81
+ RUN pip install --no-cache-dir -r /app/requirements.txt
82
+ WORKDIR /app
83
+ COPY upstream /app/upstream
84
+ COPY service.py export.py /app/
85
+ COPY scenario.json /private/scenario.json
86
+ ENV SCENARIO_PATH=/private/scenario.json EVIDENCE_DIR=/evidence WORKER_URL=http://worker:8001 MAX_ACTIONS={max_actions}
87
+ CMD ["uvicorn", "service:create_app", "--factory", "--host", "0.0.0.0", "--port", "8000", "--workers", "1", "--no-access-log"]
88
+ """,
89
+ )
90
+ write(
91
+ backend / "worker.Dockerfile",
92
+ f"""FROM {BASE_IMAGE}
93
+ RUN apt-get update && apt-get install -y --no-install-recommends libseccomp2 && rm -rf /var/lib/apt/lists/*
94
+ COPY requirements.txt /app/requirements.txt
95
+ RUN pip install --no-cache-dir -r /app/requirements.txt
96
+ WORKDIR /app
97
+ COPY worker.py child.py /app/
98
+ COPY upstream/simulator.py /app/simulator.py
99
+ CMD ["uvicorn", "worker:app", "--host", "0.0.0.0", "--port", "8001", "--workers", "1", "--no-access-log"]
100
+ """,
101
+ )
102
+ write(
103
+ env / "docker-compose.yaml",
104
+ f"""services:
105
+ main:
106
+ image: agentescapebench-agent:{source_hash}
107
+ build:
108
+ context: ./agent
109
+ networks: [default, puzzle]
110
+ security_opt: [no-new-privileges:true]
111
+ depends_on:
112
+ puzzle:
113
+ condition: service_healthy
114
+ puzzle:
115
+ image: agentescapebench-puzzle:{name}-{source_hash}
116
+ build:
117
+ context: ./puzzle
118
+ networks: [puzzle, execution]
119
+ cap_drop: [ALL]
120
+ security_opt: [no-new-privileges:true]
121
+ pids_limit: 64
122
+ mem_limit: 512m
123
+ healthcheck:
124
+ test: [CMD, python, -c, "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
125
+ interval: 1s
126
+ timeout: 3s
127
+ retries: 30
128
+ depends_on:
129
+ worker:
130
+ condition: service_healthy
131
+ worker:
132
+ image: agentescapebench-worker:{source_hash}
133
+ build:
134
+ context: ./puzzle
135
+ dockerfile: worker.Dockerfile
136
+ networks: [execution]
137
+ read_only: true
138
+ tmpfs: ["/tmp:size=64m,mode=1777"]
139
+ cap_drop: [ALL]
140
+ cap_add: [SETUID, SETGID, KILL, CHOWN, DAC_OVERRIDE]
141
+ security_opt: [no-new-privileges:true]
142
+ pids_limit: 64
143
+ mem_limit: 384m
144
+ healthcheck:
145
+ test: [CMD, python, -c, "import urllib.request; urllib.request.urlopen('http://localhost:8001/health')"]
146
+ interval: 1s
147
+ timeout: 3s
148
+ retries: 30
149
+ networks:
150
+ puzzle:
151
+ internal: true
152
+ execution:
153
+ internal: true
154
+ """,
155
+ )
156
+ write(
157
+ task / "task.toml",
158
+ f'''schema_version = "1.4"
159
+ source = "https://github.com/AGI-Eval-Official/Repo-of-AgentEscapeBench"
160
+
161
+ [[artifacts]]
162
+ source = "/evidence/final.json"
163
+ service = "puzzle"
164
+
165
+ [[artifacts]]
166
+ source = "/evidence/trace.jsonl"
167
+ service = "puzzle"
168
+
169
+ [task]
170
+ name = "edbeeching/{name}"
171
+ version = "0.1.0"
172
+
173
+ [metadata]
174
+ difficulty = {int(source.parent.parent.name)}
175
+ source_revision = "{SOURCE_REVISION}"
176
+ scenario_sha256 = "{scenario_hash}"
177
+ protocol = "harbor-cli-action-budget-v1"
178
+ max_actions = {max_actions}
179
+
180
+ [agent]
181
+ timeout_sec = 1200
182
+
183
+ [environment]
184
+ build_timeout_sec = 900
185
+ cpus = 1
186
+ memory_mb = 1024
187
+
188
+ [verifier]
189
+ environment_mode = "separate"
190
+ timeout_sec = 60
191
+
192
+ [[verifier.collect]]
193
+ service = "puzzle"
194
+ command = "python -I /app/export.py"
195
+ timeout_sec = 15
196
+ ''',
197
+ )
198
+ write(
199
+ task / "instruction.md",
200
+ f"""# Escape the room
201
+
202
+ Discover the victory string and submit it with `escape submit-answer`.
203
+ Start with `escape observe`. This returns the room, available information, visible entities, and victory node ID.
204
+
205
+ Use these commands (JSON responses):
206
+
207
+ ```sh
208
+ escape investigate NODE_ID
209
+ escape tool-call NODE_ID --arguments-json '{{"parameter": "value"}}'
210
+ escape use-item NODE_ID --arguments-json '{{"parameter": "value"}}'
211
+ escape submit-answer 'exact victory string'
212
+ escape state
213
+ ```
214
+
215
+ Investigate tools to learn their interfaces and clues. Investigate items for their contents; items requiring parameters use `use-item`. Tool calls can reveal new entities. A hidden-item hint means investigate that tool again. Use node IDs and parameter names exactly as returned. Carry outputs into subsequent calls; do not guess intermediate values. The victory string can be code, a number encoded as text, or other arbitrary text.
216
+
217
+ Only successful answer submission completes the task. Wrong submissions allow another attempt. You have **{max_actions} puzzle actions**; invalid actions count. `observe` and `state` do not count. This action limit differs from the original evaluator's model-turn limit. Do not reset or replace the environment.
218
+ """,
219
+ )
220
+ write(
221
+ task / "solution/oracle.py",
222
+ (Path(__file__).parent / "oracle.py").read_text(),
223
+ )
224
+ shutil.copyfile(source, task / "solution/scenario.json")
225
+ write(
226
+ task / "solution/solve.sh",
227
+ "#!/bin/sh\nset -eu\npython -I /solution/oracle.py\n",
228
+ )
229
+ write(task / "tests/grade.py", (RUNTIME / "grade.py").read_text())
230
+ write(
231
+ task / "tests/expected.json",
232
+ json.dumps({"scenario_sha256": scenario_hash, "max_actions": max_actions}),
233
+ )
234
+ write(task / "tests/test.sh", "#!/bin/sh\nset -eu\npython -I /tests/grade.py\n")
235
+ write(task / "tests/Dockerfile", f"FROM {BASE_IMAGE}\nCOPY . /tests/\n")
236
+ if target.exists():
237
+ shutil.rmtree(target)
238
+ task.rename(target)
239
+ return {
240
+ "id": name,
241
+ "difficulty": int(source.parent.parent.name),
242
+ "source_file": str(source.relative_to(ROOT)),
243
+ "scenario_sha256": scenario_hash,
244
+ "max_actions": max_actions,
245
+ }
246
+
247
+
248
+ def main():
249
+ parser = argparse.ArgumentParser(description=__doc__)
250
+ parser.add_argument("--output-dir", type=Path, default=ROOT / "tasks")
251
+ parser.add_argument("--task-ids", nargs="*")
252
+ parser.add_argument("--limit", type=int)
253
+ parser.add_argument("--pilot", action="store_true")
254
+ parser.add_argument("--overwrite", action="store_true")
255
+ parser.add_argument("--max-actions", type=int, default=500)
256
+ args = parser.parse_args()
257
+ if args.max_actions < 1:
258
+ parser.error("--max-actions must be positive")
259
+ sources = sorted((ROOT / "data/questions").glob("*/narrative/*.json"), key=task_id)
260
+ if args.pilot:
261
+ ordinary = next(
262
+ p
263
+ for p in sources
264
+ if p.parent.parent.name == "5" and "code_py_exec" not in p.read_text()
265
+ )
266
+ code = next(
267
+ p
268
+ for p in sources
269
+ if p.parent.parent.name == "25" and "code_py_exec" in p.read_text()
270
+ )
271
+ sources = [ordinary, code]
272
+ if args.task_ids:
273
+ wanted = set(args.task_ids)
274
+ sources = [p for p in sources if task_id(p) in wanted]
275
+ missing = wanted - {task_id(p) for p in sources}
276
+ if missing:
277
+ parser.error(f"Unknown task IDs: {sorted(missing)}")
278
+ if args.limit is not None:
279
+ sources = sources[: args.limit]
280
+ rows = [
281
+ generate(p, args.output_dir, args.max_actions, args.overwrite) for p in sources
282
+ ]
283
+ write(
284
+ args.output_dir / "manifest.json",
285
+ json.dumps({"source_revision": SOURCE_REVISION, "tasks": rows}, indent=2)
286
+ + "\n",
287
+ )
288
+ print(
289
+ json.dumps(
290
+ {
291
+ "tasks": len(rows),
292
+ "difficulty_counts": dict(Counter(row["difficulty"] for row in rows)),
293
+ "output": str(args.output_dir),
294
+ }
295
+ )
296
+ )
297
+
298
+
299
+ if __name__ == "__main__":
300
+ main()
src/agentescape_port/oracle.py ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Reference solver: use trusted inputs, but obtain the answer through public actions."""
2
+
3
+ import json
4
+ import urllib.request
5
+ from pathlib import Path
6
+
7
+
8
+ def http_action(base_url, payload):
9
+ request = urllib.request.Request(
10
+ base_url + "/action",
11
+ data=json.dumps(payload).encode(),
12
+ headers={"Content-Type": "application/json"},
13
+ )
14
+ with urllib.request.urlopen(request, timeout=30) as response:
15
+ return json.load(response)
16
+
17
+
18
+ def solve(scenario, act, observe):
19
+ nodes = {node["id"]: node for node in scenario["nodes"]}
20
+ visible = {entity["id"] for entity in observe["available_entities"]}
21
+ solved = set()
22
+ seen_outputs = {}
23
+ action_count = 0
24
+
25
+ def call(payload):
26
+ nonlocal action_count
27
+ action_count += 1
28
+ response = act(payload)
29
+ visible.update(entity["id"] for entity in response.get("newly_revealed", []))
30
+ if (
31
+ response.get("episode", {}).get("termination_reason")
32
+ == "infrastructure_error"
33
+ ):
34
+ raise RuntimeError("Infrastructure failure")
35
+ return response
36
+
37
+ for _round in range(len(nodes) + 2):
38
+ progress = False
39
+ for node_id, node in nodes.items():
40
+ if node_id not in visible or node_id in solved:
41
+ continue
42
+ # Preserve graph order for data inputs; trigger/drop edges express visibility.
43
+ predecessors = [
44
+ edge["source_id"]
45
+ for edge in scenario["edges"]
46
+ if edge["target_id"] == node_id
47
+ and edge["connection_type"] not in ("Item", "Hidden_Item")
48
+ ]
49
+ if any(pred not in solved for pred in predecessors):
50
+ continue
51
+ info = call({"action": "investigate", "node_id": node_id})
52
+ if not info.get("ok"):
53
+ raise RuntimeError(f"Investigation failed: {node_id}: {info}")
54
+ inputs = {
55
+ port["name"]: port["value"]
56
+ for port in node.get("inputs", [])
57
+ if "value" in port
58
+ }
59
+ if node["type"] == "Tool":
60
+ result = call(
61
+ {"action": "tool_call", "node_id": node_id, "arguments": inputs}
62
+ )
63
+ if not result.get("ok") or result.get("output_values", {}).get("error"):
64
+ raise RuntimeError(f"Tool failed: {node_id}: {result}")
65
+ output = result.get("output_values", {})
66
+ if node.get("template_id") in ("terminal_1", "terminal_2"):
67
+ slots = {
68
+ port["name"]: inputs[port["name"]]
69
+ for port in node["inputs"]
70
+ if port["type"] not in ("Item", "Hidden_Item")
71
+ and port["name"] in inputs
72
+ }
73
+ triggers = {
74
+ key: value for key, value in inputs.items() if key not in slots
75
+ }
76
+ for key, value in slots.items():
77
+ partial = call(
78
+ {
79
+ "action": "tool_call",
80
+ "node_id": node_id,
81
+ "arguments": {**triggers, key: value},
82
+ }
83
+ )
84
+ if partial.get("ok"):
85
+ output.update(partial.get("output_values", {}))
86
+ # HIDDEN_ITEM tool drops only occur on subsequent investigation.
87
+ call({"action": "investigate", "node_id": node_id})
88
+ elif info.get("required_inputs"):
89
+ result = call(
90
+ {"action": "use_item", "node_id": node_id, "arguments": inputs}
91
+ )
92
+ if not result.get("ok"):
93
+ raise RuntimeError(f"Item failed: {node_id}: {result}")
94
+ output = result.get("content")
95
+ else:
96
+ output = info.get("content")
97
+ seen_outputs[node_id] = output
98
+ solved.add(node_id)
99
+ progress = True
100
+ win_id = scenario["metadata"]["win_node_id"]
101
+ if win_id in solved and (len(solved) == len(nodes) or not progress):
102
+ outputs = seen_outputs[win_id]
103
+ if not outputs:
104
+ raise RuntimeError(f"Victory node returned no output: {win_id}")
105
+ # Upstream grades its first stored output port, independent of response order.
106
+ victory_port = next(
107
+ port["name"] for port in nodes[win_id]["outputs"] if "value" in port
108
+ )
109
+ answer = outputs[victory_port] if isinstance(outputs, dict) else outputs
110
+ result = call({"action": "submit_answer", "answer": answer})
111
+ if not result.get("is_win"):
112
+ raise RuntimeError(f"Victory submission failed: {result}")
113
+ return {"won": True, "actions": action_count, "visited_nodes": len(solved)}
114
+ if not progress:
115
+ raise RuntimeError(f"No progress: visible={visible}, solved={solved}")
116
+ raise RuntimeError("Reference solver exceeded graph traversal limit")
117
+
118
+
119
+ if __name__ == "__main__":
120
+ import os
121
+
122
+ base = os.environ.get("ESCAPE_URL", "http://puzzle:8000")
123
+ with urllib.request.urlopen(base + "/observation", timeout=20) as response:
124
+ observation = json.load(response)
125
+ print(
126
+ json.dumps(
127
+ solve(
128
+ json.loads(Path("/solution/scenario.json").read_text()),
129
+ lambda payload: http_action(base, payload),
130
+ observation,
131
+ )
132
+ )
133
+ )
src/agentescape_port/publish.py ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Upload only the port's explicit release files to a private HF dataset."""
2
+
3
+ import argparse
4
+ import json
5
+
6
+ from .adapter import ROOT
7
+
8
+
9
+ def main():
10
+ from huggingface_hub import HfApi
11
+
12
+ parser = argparse.ArgumentParser(description=__doc__)
13
+ parser.add_argument("--repo-id", default="edbeeching/AgentEscapeBench-harbor")
14
+ args = parser.parse_args()
15
+ corpus = json.loads((ROOT / "reports/corpus.json").read_text())
16
+ assert corpus["tasks"] == corpus["successes"] == 270
17
+ assert len(corpus["templates_executed"]) == 33
18
+ isolation = json.loads((ROOT / "reports/worker-isolation.json").read_text())
19
+ assert all(row["passed"] for row in isolation)
20
+ smoke = json.loads((ROOT / "reports/openenv-smoke.json").read_text())
21
+ assert len(smoke["results"]) == 2
22
+ assert all(row["ok"] and row["reward"] == 1.0 for row in smoke["results"])
23
+ api = HfApi()
24
+ api.create_repo(args.repo_id, repo_type="dataset", private=True, exist_ok=True)
25
+ info = api.repo_info(args.repo_id, repo_type="dataset")
26
+ if not info.private:
27
+ raise RuntimeError(
28
+ "Refusing to upload to a public dataset; user requested private"
29
+ )
30
+ result = api.upload_folder(
31
+ repo_id=args.repo_id,
32
+ repo_type="dataset",
33
+ folder_path=ROOT,
34
+ commit_message="Port 270 AgentEscapeBench tasks to Harbor with OpenEnv integration",
35
+ parent_commit=info.sha,
36
+ allow_patterns=[
37
+ "README.md",
38
+ "LICENSE.port",
39
+ "pyproject.toml",
40
+ "uv.lock",
41
+ "runtime-requirements.txt",
42
+ "source-lock.json",
43
+ "src/**",
44
+ "data/**",
45
+ "tasks/**",
46
+ "tests/**",
47
+ "reports/corpus.json",
48
+ "reports/worker-isolation.json",
49
+ "reports/openenv-smoke.json",
50
+ "reports/validation-summary.json",
51
+ "reports/unit-tests.log",
52
+ ],
53
+ ignore_patterns=["**/__pycache__/**", "**/*.pyc", "**/*.log", "**/.cache/**"],
54
+ )
55
+ publication = {
56
+ "repo_id": args.repo_id,
57
+ "private": True,
58
+ "revision": result.oid,
59
+ "commit_url": result.commit_url,
60
+ }
61
+ (ROOT / "reports/publication.json").write_text(
62
+ json.dumps(publication, indent=2) + "\n"
63
+ )
64
+ print(json.dumps(publication))
65
+
66
+
67
+ if __name__ == "__main__":
68
+ main()
src/agentescape_port/runtime/__init__.py ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ """Files copied into the appropriate generated task build contexts."""
2
+
src/agentescape_port/runtime/child.py ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Run the original Python tool after reducing privileges and blocking networking."""
2
+
3
+ import ctypes
4
+ import errno
5
+ import json
6
+ import resource
7
+ import sys
8
+
9
+ resource.setrlimit(resource.RLIMIT_CPU, (3, 3))
10
+ resource.setrlimit(resource.RLIMIT_AS, (256 * 1024 * 1024, 256 * 1024 * 1024))
11
+ resource.setrlimit(resource.RLIMIT_FSIZE, (65536, 65536))
12
+ resource.setrlimit(resource.RLIMIT_NOFILE, (32, 32))
13
+ resource.setrlimit(resource.RLIMIT_CORE, (0, 0))
14
+
15
+ # Filters survive fork/exec. Fail closed if seccomp cannot be loaded.
16
+ lib = ctypes.CDLL("libseccomp.so.2", use_errno=True)
17
+ lib.seccomp_init.argtypes = [ctypes.c_uint32]
18
+ lib.seccomp_init.restype = ctypes.c_void_p
19
+ lib.seccomp_rule_add.argtypes = [
20
+ ctypes.c_void_p,
21
+ ctypes.c_uint32,
22
+ ctypes.c_int,
23
+ ctypes.c_uint,
24
+ ]
25
+ lib.seccomp_syscall_resolve_name.argtypes = [ctypes.c_char_p]
26
+ lib.seccomp_load.argtypes = [ctypes.c_void_p]
27
+ lib.seccomp_release.argtypes = [ctypes.c_void_p]
28
+ ctx = lib.seccomp_init(0x7FFF0000) # SCMP_ACT_ALLOW
29
+ if not ctx:
30
+ raise RuntimeError("Cannot initialize execution isolation")
31
+ try:
32
+ for name in (
33
+ "socket",
34
+ "socketpair",
35
+ "connect",
36
+ "ptrace",
37
+ "process_vm_readv",
38
+ "process_vm_writev",
39
+ "mount",
40
+ "unshare",
41
+ "setns",
42
+ "bpf",
43
+ ):
44
+ number = lib.seccomp_syscall_resolve_name(name.encode())
45
+ if (
46
+ number >= 0
47
+ and lib.seccomp_rule_add(ctx, 0x00050000 | errno.EPERM, number, 0) != 0
48
+ ):
49
+ raise RuntimeError("Cannot install execution isolation rule")
50
+ if lib.seccomp_load(ctx) != 0:
51
+ raise RuntimeError("Cannot activate execution isolation")
52
+ finally:
53
+ lib.seccomp_release(ctx)
54
+
55
+ sys.path.insert(0, "/app")
56
+ from simulator import ToolSimulator # noqa: E402
57
+
58
+ request = json.load(sys.stdin)
59
+ json.dump(ToolSimulator().code_py_exec(request), sys.stdout)
src/agentescape_port/runtime/cli.py ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Public agent client; depends only on the Python standard library."""
3
+
4
+ import argparse
5
+ import json
6
+ import os
7
+ import sys
8
+ import urllib.error
9
+ import urllib.request
10
+
11
+
12
+ def main():
13
+ parser = argparse.ArgumentParser(description="Interact with the escape room")
14
+ parser.add_argument(
15
+ "action",
16
+ choices=[
17
+ "observe",
18
+ "state",
19
+ "investigate",
20
+ "tool-call",
21
+ "use-item",
22
+ "submit-answer",
23
+ ],
24
+ )
25
+ parser.add_argument("value", nargs="?")
26
+ parser.add_argument("--arguments-json", default="{}")
27
+ args = parser.parse_args()
28
+ base = os.environ.get("ESCAPE_URL", "http://puzzle:8000").rstrip("/")
29
+ if args.action in ("observe", "state"):
30
+ request = urllib.request.Request(
31
+ base + ("/observation" if args.action == "observe" else "/state")
32
+ )
33
+ else:
34
+ if args.value is None:
35
+ parser.error("node ID or answer is required")
36
+ payload = {"action": args.action.replace("-", "_")}
37
+ if args.action == "submit-answer":
38
+ payload["answer"] = args.value
39
+ else:
40
+ payload["node_id"] = args.value
41
+ if args.action in ("tool-call", "use-item"):
42
+ payload["arguments"] = json.loads(args.arguments_json)
43
+ request = urllib.request.Request(
44
+ base + "/action",
45
+ data=json.dumps(payload).encode(),
46
+ headers={"Content-Type": "application/json"},
47
+ )
48
+ try:
49
+ with urllib.request.urlopen(request, timeout=30) as response:
50
+ print(json.dumps(json.load(response), ensure_ascii=False))
51
+ except (urllib.error.URLError, ValueError) as exc:
52
+ print(json.dumps({"ok": False, "error": str(exc)}))
53
+ sys.exit(2)
54
+
55
+
56
+ if __name__ == "__main__":
57
+ main()
src/agentescape_port/runtime/export.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Harbor invokes this inside the puzzle service after stopping the agent."""
2
+
3
+ import json
4
+ import pathlib
5
+ import urllib.request
6
+
7
+ with urllib.request.urlopen("http://127.0.0.1:8000/state", timeout=10) as response:
8
+ state = json.load(response)
9
+ state["collected_from_live_service"] = True
10
+ target = pathlib.Path("/evidence/final.json")
11
+ temp = target.with_suffix(".tmp")
12
+ temp.write_text(json.dumps(state))
13
+ temp.replace(target)
src/agentescape_port/runtime/grade.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Grade only Harbor-collected sidecar evidence in a fresh verifier container."""
2
+
3
+ import json
4
+ from pathlib import Path
5
+
6
+ expected = json.loads(Path("/tests/expected.json").read_text())
7
+ state = json.loads(Path("/evidence/final.json").read_text())
8
+ assert state["collected_from_live_service"] is True, "Missing trusted service export"
9
+ assert state["scenario_sha256"] == expected["scenario_sha256"], (
10
+ "Wrong scenario evidence"
11
+ )
12
+ assert state["max_actions"] == expected["max_actions"], "Wrong budget"
13
+ assert type(state["won"]) is bool
14
+ assert 0 <= state["action_count"] <= state["max_actions"]
15
+ assert state["termination_reason"] != "infrastructure_error", (
16
+ "Infrastructure failure is not a puzzle failure"
17
+ )
18
+ assert not state["won"] or state["termination_reason"] == "success"
19
+ Path("/logs/verifier").mkdir(parents=True, exist_ok=True)
20
+ Path("/logs/verifier/state.json").write_text(json.dumps(state, indent=2))
21
+ Path("/logs/verifier/reward.txt").write_text("1.0\n" if state["won"] else "0.0\n")
src/agentescape_port/runtime/service.py ADDED
@@ -0,0 +1,212 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Restricted facade over the unchanged, pinned upstream puzzle handlers."""
2
+
3
+ import hashlib
4
+ import json
5
+ import logging
6
+ import os
7
+ import sys
8
+ import threading
9
+ import urllib.request
10
+ import uuid
11
+ from pathlib import Path
12
+
13
+ from fastapi import FastAPI, HTTPException
14
+ from fastapi.responses import JSONResponse
15
+ from pydantic import BaseModel, ConfigDict
16
+
17
+ sys.path.insert(0, str(Path(__file__).parent / "upstream"))
18
+ import server as upstream # noqa: E402
19
+
20
+ log = logging.getLogger(__name__)
21
+
22
+
23
+ def public(value):
24
+ """Keep upstream agent-internal template hints out of the public response."""
25
+ if isinstance(value, dict):
26
+ return {k: public(v) for k, v in value.items() if not k.startswith("_")}
27
+ if isinstance(value, list):
28
+ return [public(v) for v in value]
29
+ return value
30
+
31
+
32
+ class Action(BaseModel):
33
+ model_config = ConfigDict(extra="forbid", strict=True)
34
+ action: str
35
+ node_id: str | None = None
36
+ arguments: dict | None = None
37
+ answer: str | None = None
38
+
39
+
40
+ class Episode:
41
+ def __init__(
42
+ self, scenario_path, max_actions=500, evidence_dir=None, worker_url=None
43
+ ):
44
+ if max_actions < 1:
45
+ raise ValueError("max_actions must be positive")
46
+ self.lock = threading.Lock()
47
+ self.max_actions = max_actions
48
+ self.count = 0
49
+ self.won = False
50
+ self.reason = None
51
+ self.evidence_dir = Path(evidence_dir) if evidence_dir else None
52
+ self.scenario_hash = hashlib.sha256(
53
+ Path(scenario_path).read_bytes()
54
+ ).hexdigest()
55
+ self.initial = upstream.reset_case(
56
+ case_file_path=str(scenario_path), session_id=uuid.uuid4().hex
57
+ )
58
+ self.case_id = self.initial["case_id"]
59
+ # Hide source file paths; no upstream reset/stats/routes are mounted.
60
+ self.initial.pop("message", None)
61
+ simulator = upstream.SIMULATORS[self.case_id]
62
+ if worker_url is None:
63
+
64
+ def no_worker(_inputs):
65
+ self.reason = "infrastructure_error"
66
+ raise RuntimeError("isolated Python worker is not configured")
67
+
68
+ simulator.tool_map["code_py_exec"] = no_worker
69
+ else:
70
+
71
+ def execute_python(inputs):
72
+ request = urllib.request.Request(
73
+ worker_url + "/execute",
74
+ data=json.dumps({"code": inputs.get("code", "")}).encode(),
75
+ headers={"Content-Type": "application/json"},
76
+ )
77
+ try:
78
+ with urllib.request.urlopen(request, timeout=12) as response:
79
+ result = json.load(response)
80
+ if not isinstance(result.get("stdout"), str):
81
+ raise RuntimeError("Invalid Python worker response")
82
+ return result
83
+ except Exception:
84
+ self.reason = "infrastructure_error"
85
+ raise
86
+
87
+ simulator.tool_map["code_py_exec"] = execute_python
88
+ self.save()
89
+ if self.evidence_dir is not None:
90
+ (self.evidence_dir / "trace.jsonl").touch()
91
+
92
+ def state(self):
93
+ return {
94
+ "scenario_sha256": self.scenario_hash,
95
+ "action_count": self.count,
96
+ "max_actions": self.max_actions,
97
+ "won": self.won,
98
+ "termination_reason": self.reason,
99
+ }
100
+
101
+ def save(self, action=None, result=None):
102
+ if self.evidence_dir is None:
103
+ return
104
+ self.evidence_dir.mkdir(parents=True, exist_ok=True)
105
+ target = self.evidence_dir / "outcome.json"
106
+ temp = target.with_suffix(".tmp")
107
+ temp.write_text(json.dumps(self.state()))
108
+ temp.replace(target)
109
+ if action is not None:
110
+ with (self.evidence_dir / "trace.jsonl").open("a") as handle:
111
+ handle.write(
112
+ json.dumps(
113
+ {"index": self.count, "action": action, "result": result}
114
+ )
115
+ + "\n"
116
+ )
117
+
118
+ def dispatch(self, payload):
119
+ with self.lock:
120
+ if self.reason is not None:
121
+ return {
122
+ "ok": False,
123
+ "error": "Episode has ended",
124
+ "episode": self.state(),
125
+ }
126
+ self.count += 1
127
+ try:
128
+ action = Action.model_validate(payload)
129
+ if action.action == "submit_answer" and action.answer is not None:
130
+ result = upstream.submit_answer(
131
+ self.case_id, upstream.SubmitAnswerRequest(answer=action.answer)
132
+ )
133
+ if result.get("is_win"):
134
+ self.won = True
135
+ self.reason = "success"
136
+ elif action.action == "investigate" and action.node_id is not None:
137
+ result = upstream.investigate(
138
+ self.case_id,
139
+ upstream.InvestigateRequest(node_id=action.node_id),
140
+ )
141
+ elif (
142
+ action.action in ("tool_call", "use_item")
143
+ and action.node_id is not None
144
+ ):
145
+ request_type, handler = (
146
+ (upstream.ToolCallRequest, upstream.tool_call)
147
+ if action.action == "tool_call"
148
+ else (upstream.UseItemRequest, upstream.use_item)
149
+ )
150
+ result = handler(
151
+ self.case_id,
152
+ request_type(
153
+ node_id=action.node_id, arguments=action.arguments or {}
154
+ ),
155
+ )
156
+ else:
157
+ result = {
158
+ "ok": False,
159
+ "error": "Unknown action or missing action parameter",
160
+ }
161
+ except HTTPException as exc:
162
+ result = {"ok": False, "error": exc.detail}
163
+ except ValueError:
164
+ result = {"ok": False, "error": "Malformed action"}
165
+ except Exception:
166
+ log.exception("Puzzle service failure")
167
+ self.reason = "infrastructure_error"
168
+ self.save()
169
+ raise
170
+ if self.reason is None and self.count >= self.max_actions:
171
+ self.reason = "action_budget_exhausted"
172
+ result = public(result)
173
+ result["episode"] = self.state()
174
+ self.save(payload, result)
175
+ return result
176
+
177
+
178
+ def create_app(
179
+ scenario_path=None, max_actions=None, evidence_dir=None, worker_url=None
180
+ ):
181
+ episode = Episode(
182
+ scenario_path or os.environ["SCENARIO_PATH"],
183
+ max_actions or int(os.environ.get("MAX_ACTIONS", "500")),
184
+ evidence_dir if evidence_dir is not None else os.environ.get("EVIDENCE_DIR"),
185
+ worker_url if worker_url is not None else os.environ.get("WORKER_URL"),
186
+ )
187
+ app = FastAPI(docs_url=None, redoc_url=None, openapi_url=None)
188
+ app.state.episode = episode
189
+
190
+ @app.get("/health")
191
+ def health():
192
+ return {"ok": True}
193
+
194
+ @app.get("/observation")
195
+ def observation():
196
+ return {**public(episode.initial), "episode": episode.state()}
197
+
198
+ @app.get("/state")
199
+ def state():
200
+ return episode.state()
201
+
202
+ @app.post("/action")
203
+ def action(payload: dict):
204
+ try:
205
+ return episode.dispatch(payload)
206
+ except Exception:
207
+ return JSONResponse(
208
+ status_code=503,
209
+ content={"ok": False, "error": "Puzzle infrastructure failure"},
210
+ )
211
+
212
+ return app
src/agentescape_port/runtime/upstream/models.py ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from enum import Enum
2
+ from typing import List, Dict, Any, Optional
3
+ from pydantic import BaseModel, Field
4
+
5
+ # 1. 细粒度接口类型定义
6
+ class InterfaceType(str, Enum):
7
+ '''
8
+ BIG_INT
9
+ TEXT_GENERIC
10
+ HEX_STRING
11
+ FILE_ID
12
+ HEX_STRING_KEY_AES
13
+ HEX_STRING_IV_AES
14
+ CODE_PYTHON
15
+ HIDDEN_ITEM
16
+ ITEM
17
+ '''
18
+ # --- 基础类型 ---
19
+ TEXT_GENERIC = "Text_Generic"
20
+ BIG_INT = "Big_Int"
21
+
22
+ # --- 编码/格式化字符串 ---
23
+ HEX_STRING = "Hex_String" # 通用 Hex
24
+
25
+ # --- 特定用途的 Hex 字符串 (用于精确匹配) ---
26
+ HEX_STRING_KEY_AES = "Hex_String_Key_AES"
27
+ HEX_STRING_IV_AES = "Hex_String_IV_AES"
28
+
29
+ # --- 文件类型 ---
30
+ FILE_ID = "File_Id"
31
+
32
+ # --- 代码/脚本 ---
33
+ CODE_PYTHON = "Code_Python"
34
+
35
+ # --- 实体交互类型 (严格命名) ---
36
+ ITEM = "Item" # 主动掉落接口 (Tool -> Item)
37
+ HIDDEN_ITEM = "Hidden_Item" # 被动掉落接口 (Item -> Item)
38
+
39
+ # 3. 端口定义
40
+ class Port(BaseModel):
41
+ name: str
42
+ type: InterfaceType
43
+ description: str
44
+
45
+ # 4. 统一节点定义 (融合工具和物品)
46
+ class Node(BaseModel):
47
+ id: str
48
+ name: str
49
+ description: str
50
+ type: str # "Tool" or "Item"
51
+
52
+ # 接口定义
53
+ inputs: List[Port] = []
54
+ outputs: List[Port] = []
55
+
56
+ # 状态字段
57
+ content: Optional[Any] = None # 物品有内容,工具为None
58
+ if_success: Optional[bool] = None # 工具初始为False,物品为None
59
+ initial_visible: bool = False
60
+
61
+ # 运行时状态 (Server维护)
62
+ is_revealed: bool = False
63
+
64
+ # 标记该 Tool 节点是否有待触发的 HIDDEN_ITEM 掉落
65
+ # 当 Tool 按照 golden_input 正确执行且有 HIDDEN_ITEM 输出边时设为 True
66
+ # 在 investigate 该 Tool 时触发掉落并重置为 False
67
+ has_hidden_item_ready: bool = False
68
+
69
+ # 初始输入值 (metadata.initial_values.init_inputs,用于渐进式暴露判断)
70
+ init_input_values: Dict[str, Any] = {}
71
+
72
+ # Golden 输入值 (nodes[].inputs[].value,用于评测验证)
73
+ golden_input_values: Dict[str, Any] = {}
74
+
75
+ # Golden 输出值 (nodes[].outputs[].value,用于评测验证和 Item 节点的 content)
76
+ golden_output_values: Dict[str, Any] = {}
77
+
78
+ # 实际获得的输出值历史 (工具每次执行后实际返回的输出列表,用于渐进式暴露判断)
79
+ # 格式: List[Dict[str, Any]],每个元素是一次执行的输出字典
80
+ actual_outputs_history: List[Dict[str, Any]] = []
81
+
82
+ # 逻辑规则 (用于终端机等复杂物品)
83
+ logic_rules: Optional[Dict[str, Any]] = None
84
+
85
+ def copy(self, **kwargs):
86
+ """Helper to create a copy with updated fields."""
87
+ data = self.dict()
88
+ data.update(kwargs)
89
+ return Node(**data)
90
+
91
+ # 5. 边定义 (拓扑结构)
92
+ class Edge(BaseModel):
93
+ source_id: str
94
+ target_id: str
95
+ connection_type: InterfaceType # 直接使用 InterfaceType
96
+ # 如果是 Data_Flow,指定端口对应关系
97
+ source_port: Optional[str] = None
98
+ target_port: Optional[str] = None
99
+
100
+ # 6. 完整图定义
101
+ class GraphScenario(BaseModel):
102
+ case_id: str
103
+ title: str
104
+ intro_narrative: str
105
+ nodes: Dict[str, Node]
106
+ edges: List[Edge]
107
+ difficulty: int
108
+ win_node_id: str # 标记哪个节点是最终目标(通常是一个提交工具或最终物品)
src/agentescape_port/runtime/upstream/server.py ADDED
@@ -0,0 +1,1490 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import os
3
+ import time
4
+ import logging
5
+ import random
6
+ from pathlib import Path
7
+ from typing import Dict, Any, List, Optional
8
+ from datetime import datetime
9
+ from collections import defaultdict
10
+ from fastapi import FastAPI, HTTPException, Request
11
+ from fastapi.responses import JSONResponse
12
+ from fastapi.middleware.cors import CORSMiddleware
13
+ from pydantic import BaseModel, Field
14
+
15
+ from models import GraphScenario, Node, InterfaceType
16
+ # from generator import ScenarioGenerator
17
+ from simulator import ToolSimulator
18
+ import uvicorn
19
+
20
+ # 配置日志
21
+ logging.basicConfig(
22
+ level=logging.INFO,
23
+ format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
24
+ handlers=[
25
+ logging.FileHandler('server.log'),
26
+ logging.StreamHandler()
27
+ ]
28
+ )
29
+ logger = logging.getLogger(__name__)
30
+
31
+ app = FastAPI(
32
+ title="AgentEscapeBench Universal Server",
33
+ version="1.0.0",
34
+ description="Industrial-grade evaluation server for escape room AI agents"
35
+ )
36
+
37
+ # 添加 CORS 支持
38
+ app.add_middleware(
39
+ CORSMiddleware,
40
+ allow_origins=["*"],
41
+ allow_credentials=True,
42
+ allow_methods=["*"],
43
+ allow_headers=["*"],
44
+ )
45
+
46
+ # In-memory State
47
+ SCENARIOS: Dict[str, GraphScenario] = {}
48
+ SIMULATORS: Dict[str, ToolSimulator] = {} # case_id -> ToolSimulator
49
+ RAW_NODES_DATA: Dict[str, Dict[str, Any]] = {} # case_id -> node_id -> raw node data (for template_id)
50
+ FILE_METADATA: Dict[str, Dict[str, Any]] = {} # case_id -> metadata (for initial_values access)
51
+
52
+ # Performance monitoring
53
+ STATS: Dict[str, Any] = {
54
+ "total_requests": 0,
55
+ "successful_requests": 0,
56
+ "failed_requests": 0,
57
+ "tool_calls": defaultdict(int),
58
+ "investigates": defaultdict(int),
59
+ "use_items": defaultdict(int),
60
+ "case_loads": 0,
61
+ "start_time": datetime.now()
62
+ }
63
+
64
+ # Request timing middleware
65
+ @app.middleware("http")
66
+ async def add_process_time_header(request: Request, call_next):
67
+ start_time = time.time()
68
+ STATS["total_requests"] += 1
69
+
70
+ try:
71
+ response = await call_next(request)
72
+ STATS["successful_requests"] += 1
73
+ process_time = time.time() - start_time
74
+ response.headers["X-Process-Time"] = str(process_time)
75
+ logger.info(f"{request.method} {request.url.path} - {response.status_code} - {process_time:.3f}s")
76
+ return response
77
+ except Exception as e:
78
+ STATS["failed_requests"] += 1
79
+ logger.error(f"{request.method} {request.url.path} - Error: {str(e)}")
80
+ raise
81
+
82
+ # Exception handler
83
+ @app.exception_handler(Exception)
84
+ async def global_exception_handler(request: Request, exc: Exception):
85
+ logger.error(f"Unhandled exception: {exc}", exc_info=True)
86
+ return JSONResponse(
87
+ status_code=500,
88
+ content={
89
+ "ok": False,
90
+ "error": "Internal server error",
91
+ "detail": str(exc) if os.getenv("DEBUG") else "An error occurred"
92
+ }
93
+ )
94
+
95
+ # Health check endpoint
96
+ @app.get("/health")
97
+ def health_check():
98
+ """健康检查端点"""
99
+ uptime = (datetime.now() - STATS["start_time"]).total_seconds()
100
+ return {
101
+ "status": "healthy",
102
+ "version": "1.0.0",
103
+ "uptime_seconds": uptime,
104
+ "loaded_cases": len(SCENARIOS),
105
+ "stats": {
106
+ "total_requests": STATS["total_requests"],
107
+ "successful_requests": STATS["successful_requests"],
108
+ "failed_requests": STATS["failed_requests"],
109
+ "success_rate": STATS["successful_requests"] / max(STATS["total_requests"], 1)
110
+ }
111
+ }
112
+
113
+ # Statistics endpoint
114
+ @app.get("/stats")
115
+ def get_stats():
116
+ """获取详细统计信息"""
117
+ return {
118
+ "stats": STATS,
119
+ "loaded_cases": list(SCENARIOS.keys()),
120
+ "uptime": str(datetime.now() - STATS["start_time"])
121
+ }
122
+
123
+ def _apply_progressive_reveal_at_init(scenario: GraphScenario):
124
+ """
125
+ 在初始化时应用渐进式暴露机制(基于ITEM/HIDDEN_ITEM边)
126
+
127
+ 新逻辑:
128
+ - 如果一个节点没有 ITEM/HIDDEN_ITEM 类型的入边,它就是初始可见的
129
+ - 如果一个节点有 ITEM/HIDDEN_ITEM 类型的入边,它初始不可见,需要等待上游触发
130
+
131
+ Args:
132
+ scenario: 场景对象
133
+ """
134
+ # 收集所有有 ITEM/HIDDEN_ITEM 入边的节点
135
+ nodes_with_item_edges = set()
136
+ for edge in scenario.edges:
137
+ if edge.connection_type in [InterfaceType.ITEM, InterfaceType.HIDDEN_ITEM]:
138
+ nodes_with_item_edges.add(edge.target_id)
139
+
140
+ logger.info(f"Nodes with ITEM/HIDDEN_ITEM incoming edges: {nodes_with_item_edges}")
141
+
142
+ # 设置初始可见性:没有 ITEM/HIDDEN_ITEM 入边的节点初始可见
143
+ initially_visible_count = 0
144
+ for node_id, node in scenario.nodes.items():
145
+ if node_id not in nodes_with_item_edges:
146
+ node.is_revealed = True
147
+ initially_visible_count += 1
148
+ logger.info(f"Initial visible (no ITEM/HIDDEN_ITEM edges): {node_id} ({node.type})")
149
+ else:
150
+ node.is_revealed = False
151
+ logger.debug(f"Initial hidden (has ITEM/HIDDEN_ITEM edges): {node_id} ({node.type})")
152
+
153
+ logger.info(f"Progressive reveal initialized: {initially_visible_count}/{len(scenario.nodes)} nodes initially visible")
154
+
155
+
156
+ def _check_inputs_match_golden(arguments: Dict[str, Any], golden_inputs: Dict[str, Any]) -> bool:
157
+ """
158
+ 检查实际输入参数是否与 golden inputs 完全匹配
159
+
160
+ Args:
161
+ arguments: 实际调用时传入的参数
162
+ golden_inputs: 期望的正确参数值(来自 JSON 的 inputs[].value)
163
+
164
+ Returns:
165
+ True 表示所有 golden inputs 都存在且值匹配
166
+ """
167
+ if not golden_inputs:
168
+ return True # 如果没有 golden inputs,认为匹配
169
+
170
+ for key, expected_value in golden_inputs.items():
171
+ actual_value = arguments.get(key)
172
+ # 转换为字符串比较,避免类型问题(如 int vs str)
173
+ if str(actual_value) != str(expected_value):
174
+ logger.debug(f"Input mismatch for '{key}': expected '{expected_value}', got '{actual_value}'")
175
+ return False
176
+
177
+ return True
178
+
179
+
180
+ def _get_parameter_validation_feedback(arguments: Dict[str, Any], golden_inputs: Dict[str, Any]) -> Dict[str, Any]:
181
+ """
182
+ 对源头节点的参数进行详细验证,返回验证反馈
183
+
184
+ 注意:不返回期望值(expected),避免泄漏答案
185
+
186
+ Args:
187
+ arguments: 实际调用时传入的参数
188
+ golden_inputs: 期望的正确参数值(来自 JSON 的 inputs[].value)
189
+
190
+ Returns:
191
+ 包含验证结果的字典:
192
+ - all_correct: bool - 所有参数是否正确
193
+ - correct_params: List[str] - 正确的参数名列表
194
+ - incorrect_params: List[str] - 错误的参数名列表(不包含期望值)
195
+ """
196
+ if not golden_inputs:
197
+ return {
198
+ "all_correct": True,
199
+ "correct_params": [],
200
+ "incorrect_params": []
201
+ }
202
+
203
+ correct_params = []
204
+ incorrect_params = []
205
+
206
+ for key, actual_value in arguments.items():
207
+ # 只对用户实际提交的参数给反馈,未提交的参数不评价
208
+ if key not in golden_inputs:
209
+ continue # 该参数不在 golden 中,跳过(如 _golden_inputs 等内部参数)
210
+ expected_value = golden_inputs[key]
211
+ # 转换为字符串比较,避免类型问题(如 int vs str)
212
+ if str(actual_value) == str(expected_value):
213
+ correct_params.append(key)
214
+ else:
215
+ # 只记录参数名,不包含期望值,避免泄漏答案
216
+ incorrect_params.append(key)
217
+
218
+ # all_correct:用户提交的所有参数都正确,且覆盖了全部 golden 参数
219
+ all_provided_correct = len(incorrect_params) == 0
220
+ all_golden_covered = all(k in arguments for k in golden_inputs)
221
+ return {
222
+ "all_correct": all_provided_correct and all_golden_covered,
223
+ "correct_params": correct_params,
224
+ "incorrect_params": incorrect_params
225
+ }
226
+
227
+
228
+ def _is_source_node(node_id: str, scenario: GraphScenario) -> bool:
229
+ """
230
+ 判断节点是否是源头节点(完全没有任何入边的节点)
231
+
232
+ 源头节点定义:
233
+ - 没有任何类型的入边(包括 DATA、ITEM、HIDDEN_ITEM)
234
+ - 即没有任何上游节点
235
+
236
+ Args:
237
+ node_id: 节点ID
238
+ scenario: 场景对象
239
+
240
+ Returns:
241
+ True 表示是源头节点
242
+ """
243
+ for edge in scenario.edges:
244
+ if edge.target_id == node_id:
245
+ # 只要有任何入边,就不是源头节点
246
+ return False
247
+
248
+ return True
249
+
250
+
251
+ def _check_and_reveal_ready_nodes(scenario: GraphScenario, recent_outputs: Dict[str, Any], source_node_id: str) -> List[Dict[str, Any]]:
252
+ """
253
+ 检查并释放参数齐全的隐藏节点(渐进式暴露机制)
254
+
255
+ 核心逻辑:
256
+ 1. 维护"可见值集合":包含所有被测模型当前可以看到的值
257
+ - init_inputs 的值(初始可见)
258
+ - 工具执行后的实际输出值(运行时获得)
259
+ - 可见 Item 的输出值
260
+ 2. 检查隐藏节点:该节点的所有 golden_input 值是否都在可见值集合中
261
+ 3. 如果是,则释放该节点
262
+
263
+ Args:
264
+ scenario: 场景对象
265
+ recent_outputs: 最近执行的工具的输出
266
+ source_node_id: 刚执行的工具节点ID
267
+
268
+ Returns:
269
+ 新释放的节点列表
270
+ """
271
+ newly_revealed = []
272
+
273
+ # 构建"可见值集合"(Set of visible values)
274
+ # 存储格式:set of values (转为字符串)
275
+ visible_values = set()
276
+
277
+ # 1. 添加有意义的 init_inputs 值到可见值集合
278
+ # Item 的 init_inputs 不应该加入,因为它们在密室中完全用不到
279
+ for node_id, node in scenario.nodes.items():
280
+ # 跳过源头 Item 节点(没有入边的 Item)
281
+ if node.type == "Item":
282
+ has_incoming_edge = any(edge.target_id == node_id for edge in scenario.edges)
283
+ if not has_incoming_edge:
284
+ # 这是源头 Item,跳过其 init_inputs
285
+ continue
286
+
287
+ # 添加其他节点的 init_inputs
288
+ for port_name, init_value in node.init_input_values.items():
289
+ if init_value:
290
+ visible_values.add(str(init_value))
291
+
292
+ # 2. 添加已执行工具的所有历史输出值
293
+ for node_id, node in scenario.nodes.items():
294
+ if node.type == "Tool" and node.if_success and node.actual_outputs_history:
295
+ # 遍历所有历史执行记录
296
+ for output_dict in node.actual_outputs_history:
297
+ for output_port_name, output_value in output_dict.items():
298
+ if output_value:
299
+ visible_values.add(str(output_value))
300
+
301
+ # 3. 添加已被 investigate 的 Item 的 golden 输出值
302
+ # 注意:Item 可见不等于其输出值可见,需要 investigate 后才能获得
303
+ # 这里我们使用 actual_outputs_history 来标记 Item 是否已被 investigate
304
+ for node_id, node in scenario.nodes.items():
305
+ if node.type == "Item" and node.is_revealed and node.actual_outputs_history:
306
+ # Item 通常只会被 investigate 一次,但为了一致性也使用历史列表
307
+ for output_dict in node.actual_outputs_history:
308
+ for port_name, port_value in output_dict.items():
309
+ if port_value:
310
+ visible_values.add(str(port_value))
311
+
312
+ # 遍历所有隐藏的节点,检查其 golden_input 是否都在可见值集合中
313
+ for node_id, node in scenario.nodes.items():
314
+ # 跳过已可见的节点
315
+ if node.is_revealed:
316
+ continue
317
+
318
+ # 只检查工具节点(物品节点由 ITEM 输出触发)
319
+ if node.type != "Tool":
320
+ continue
321
+
322
+ # 检查该节点的所有 golden_input 值是否都在可见值集合中
323
+ all_inputs_ready = True
324
+ missing_values = []
325
+
326
+ for input_port_name, golden_input_value in node.golden_input_values.items():
327
+ # 检查这个 golden 值是否在可见值集合中
328
+ if str(golden_input_value) not in visible_values:
329
+ all_inputs_ready = False
330
+ missing_values.append(f"{input_port_name}={golden_input_value}")
331
+
332
+ # 如果所有 golden_input 值都在可见值集合中,释放该节点
333
+ if all_inputs_ready and len(node.golden_input_values) > 0:
334
+ logger.info(f"All golden inputs ready for {node_id}: {list(node.golden_input_values.values())}")
335
+
336
+ # 如果所有输入都齐全,释放该节点
337
+ if all_inputs_ready:
338
+ node.is_revealed = True
339
+
340
+ # 构建节点信息返回给模型
341
+ node_info = {
342
+ "id": node.id,
343
+ "type": node.type,
344
+ "can_investigate": True,
345
+ "hint": "This tool's input parameters are now complete, you can use investigate to view detailed information"
346
+ }
347
+
348
+ # if node.name:
349
+ # node_info["name"] = node.name
350
+ if node.description:
351
+ node_info["description"] = node.description
352
+
353
+ newly_revealed.append(node_info)
354
+ logger.info(f"Progressive reveal: {node_id} is now ready (all inputs satisfied)")
355
+
356
+ return newly_revealed
357
+
358
+
359
+ def _initialize_node_values(scenario: GraphScenario, raw_nodes_data: Dict[str, Any], metadata: Dict[str, Any]):
360
+ """
361
+ Initialize node state and load values from port value fields.
362
+ 应用渐进式暴露机制:初始时只显示参数齐全的节点(源头节点)
363
+
364
+ 重要区分:
365
+ 1. input_values: 只加载 metadata.initial_values 中的 init_inputs(真正的初始值)
366
+ 2. output_values: 加载 nodes[].outputs[].value(golden 输出,用于验证)
367
+ """
368
+ # 第一步:加载所有节点的值,并将所有节点初始设为隐藏
369
+ initial_values = metadata.get('initial_values', {})
370
+
371
+ for node_id, node in scenario.nodes.items():
372
+ # 忽略 initial_visible 字段,初始全部隐藏
373
+ # 由渐进式暴露机制根据参数齐全情况决定是否显示
374
+ node.is_revealed = False
375
+
376
+ if node.type == "Tool":
377
+ node.if_success = False
378
+ node.actual_outputs_history = [] # 清空历史输出
379
+ elif node.type == "Item":
380
+ node.if_success = False
381
+ node.actual_outputs_history = [] # 清空历史输出
382
+
383
+ # 从 JSON 加载值
384
+ if node_id in raw_nodes_data:
385
+ node_data = raw_nodes_data[node_id] # node_data是json文件中nodes中的字典
386
+
387
+ # 【重要】只加载 metadata.initial_values 中的初始输入值
388
+ if node_id in initial_values:
389
+ init_data = initial_values[node_id]
390
+ # 加载初始输入值(用于渐进式暴露判断)
391
+ for port_name, port_value in init_data.get('init_inputs', {}).items():
392
+ node.init_input_values[port_name] = port_value
393
+
394
+ # 【评测用】加载 golden 输入值(用于验证模型传入的参数是否正确)
395
+ for input_port_data in node_data.get('inputs', []):
396
+ if 'value' in input_port_data:
397
+ node.golden_input_values[input_port_data['name']] = input_port_data['value']
398
+
399
+ # 【评测用】加载 golden 输出值(用于验证工具调用是否正确,以及 Item 节点的 content)
400
+ for output_port_data in node_data.get('outputs', []):
401
+ if 'value' in output_port_data:
402
+ node.golden_output_values[output_port_data['name']] = output_port_data['value']
403
+
404
+ # For Items, set content from golden_output_values
405
+ if node.type == "Item" and node.golden_output_values:
406
+ # Item 的 content 是其第一个 golden 输出值
407
+ node.content = list(node.golden_output_values.values())[0]
408
+
409
+ # 第二步:应用渐进式暴露机制
410
+ # 检查所有节点,根据参数齐全情况释放源头节点(工具 + Item)
411
+ _apply_progressive_reveal_at_init(scenario)
412
+
413
+ def _build_node_info(node: Node, raw_nodes_data: Dict[str, Any]) -> Dict[str, Any]:
414
+ """
415
+ 构建节点信息(工具或物品)
416
+
417
+ Args:
418
+ node: 节点对象
419
+ raw_nodes_data: 原始节点数据(用于获取 template_id 等)
420
+
421
+ Returns:
422
+ 节点信息字典
423
+ """
424
+ if node.type == "Tool":
425
+ # 过滤掉输入端口中的 ITEM/HIDDEN_ITEM 类型(trigger 端口)
426
+ # 这些端口仅用于控制掉落机制,不应暴露给 Agent
427
+ # 但保留输出端口(如 Terminal 的物品分发器需要让 Agent 看到)
428
+ tool_info = {
429
+ "id": node.id,
430
+ # "name": node.name,
431
+ "description": node.description,
432
+ "type": "Tool",
433
+ "inputs": [{"name": p.name, "type": p.type, "description": p.description}
434
+ for p in node.inputs if p.type not in [InterfaceType.ITEM, InterfaceType.HIDDEN_ITEM]],
435
+ "outputs": [{"name": p.name, "type": p.type, "description": p.description}
436
+ for p in node.outputs]
437
+ }
438
+
439
+ # 添加 template_id(工具的标准名称)
440
+ if node.id in raw_nodes_data:
441
+ node_data = raw_nodes_data[node.id]
442
+ template_id = node_data.get('template_id')
443
+ if template_id:
444
+ tool_info['template_id'] = template_id
445
+
446
+ return tool_info
447
+
448
+ elif node.type == "Item":
449
+ return {
450
+ "id": node.id,
451
+ # "name": node.name,
452
+ "description": node.description,
453
+ "type": "Item"
454
+ }
455
+
456
+ else:
457
+ return {
458
+ "id": node.id,
459
+ # "name": node.name,
460
+ "type": node.type
461
+ }
462
+
463
+ def _get_initial_observation(scenario: GraphScenario, raw_nodes_data: Dict[str, Any], metadata: Dict[str, Any]) -> Dict[str, Any]:
464
+ """
465
+ Generate initial observation for the agent (what they see when entering the room).
466
+
467
+ 策略:
468
+ - Tools: 只显示名称和描述,不显示接口定义。需要 investigate 才能获得详细接口信息。
469
+ - Items: 只显示存在,不显示内容。需要 investigate 才能获得内容值。
470
+ - init_inputs: 作为"可用信息"告诉模型,这些是可以用作工具参数的初始值。
471
+ - init_outputs: 不告诉模型(这些是答案,需要模型通过调用工具获得)。
472
+ """
473
+ available_entities = [] # 统一的实体列表(Tools 和 Items)
474
+ available_information = [] # 可用的初始信息(来自 init_inputs)
475
+
476
+ # 从 metadata.initial_values 提取 init_inputs 作为可用信息
477
+ # 只提供值本身,不透露这些值对应哪个节点的哪个参数,让模型自己推理
478
+ # 注意:跳过源头 Item(没有入边的 Item)的 init_inputs,因为它们在密室中完全用不到
479
+ initial_values = metadata.get('initial_values', {})
480
+ # initial_values字段的格式
481
+ # "initial_values": {
482
+ # "terminal_1": {
483
+ # "init_inputs": {},
484
+ # "init_outputs": {
485
+ # "text_output": "System initialization complete.",
486
+ # "hex_output": "48656c6c6f20576f726c64",
487
+ # "item_dispenser": "掉落了一张纸条,上面写着“请勿随意触摸终端”"
488
+ # }
489
+ # }
490
+ # }
491
+ for node_id, init_data in initial_values.items():
492
+ # 获取节点信息,判断是否为源头 Item
493
+ node = scenario.nodes.get(node_id)
494
+ if node and node.type == "Item":
495
+ # 检查是否为源头 Item(没有入边)
496
+ has_incoming_edge = any(edge.target_id == node_id for edge in scenario.edges)
497
+ if not has_incoming_edge:
498
+ # 这是源头 Item,检查是否有 init_inputs
499
+ init_inputs = init_data.get('init_inputs', {})
500
+ if init_inputs:
501
+ # 有 init_inputs,需要暴露这些参数
502
+ for param_name, param_value in init_inputs.items():
503
+ available_information.append({
504
+ "value": param_value
505
+ })
506
+ # 处理完后跳过后续的通用逻辑
507
+ continue
508
+
509
+ init_inputs = init_data.get('init_inputs', {})
510
+ if init_inputs:
511
+ # 为每个 init_input 值创建一个信息条目(不包含 source_node 和 parameter 信息)
512
+ for param_name, param_value in init_inputs.items():
513
+ available_information.append({
514
+ "value": param_value
515
+ })
516
+
517
+ for node in scenario.nodes.values():
518
+ if node.is_revealed:
519
+ # Tools: 只显示基本信息,提示可以 investigate 查看详细接口
520
+ if node.type == "Tool":
521
+ tool_info = {
522
+ "id": node.id, # 这里只有id而没有template_id
523
+ "type": "Tool",
524
+ "can_investigate": True, # 可以被 investigate
525
+ "hint": "You can use investigate to view the tool's detailed interface information for calling"
526
+ }
527
+ # 只在 name 非空时添加
528
+ # if node.name:
529
+ # tool_info["name"] = node.name
530
+ # 只在 description 非空时添加
531
+ if node.description:
532
+ tool_info["description"] = node.description
533
+
534
+ available_entities.append(tool_info)
535
+
536
+ # Items: 只显示基本信息,提示可以 investigate 查看内容
537
+ elif node.type == "Item":
538
+ item_info = {
539
+ "id": node.id, # 这里只有id而没有template_id
540
+ "type": "Item",
541
+ "can_investigate": True, # 可以被 investigate
542
+ "hint": "You can use investigate to view the item's content"
543
+ }
544
+ # 只在 name 非空时添加
545
+ # if node.name:
546
+ # item_info["name"] = node.name
547
+ # 只在 description 非空时添加
548
+ if node.description:
549
+ item_info["description"] = node.description
550
+
551
+ available_entities.append(item_info)
552
+
553
+ return {
554
+ "narrative": scenario.intro_narrative,
555
+ "available_entities": available_entities, # 使用统一的实体列表
556
+ "available_information": available_information, # 可用的初始信息(只包含 init_inputs)
557
+ "win_node_id": scenario.win_node_id # 胜利节点ID,让模型知道需要关注哪个节点
558
+ }
559
+
560
+ @app.post("/env/reset")
561
+ def reset_case(case_id: str = None, case_file_path: str = None, session_id: str = None):
562
+ """Loads a specific case from file and resets it.
563
+
564
+ Args:
565
+ case_id: Optional case ID for resetting an existing case
566
+ case_file_path: Path to case file for loading a new case
567
+ session_id: Optional session ID to ensure isolation between concurrent evaluations
568
+ """
569
+ logger.info(f"Reset request - case_id: {case_id}, case_file_path: {case_file_path}, session_id: {session_id}")
570
+ STATS["case_loads"] += 1
571
+
572
+ if case_file_path:
573
+ if not os.path.exists(case_file_path):
574
+ logger.error(f"Case file not found: {case_file_path}")
575
+ raise HTTPException(status_code=404, detail=f"File not found: {case_file_path}")
576
+ try:
577
+ with open(case_file_path, "r", encoding="utf-8") as f:
578
+ file_data = json.load(f)
579
+
580
+ # 转换格式:从 DAG executor 生成的格式转换为 GraphScenario 格式
581
+ # 1. 提取 metadata
582
+ metadata = file_data.get('metadata', {})
583
+
584
+ # 2. 生成 case_id, title, intro_narrative
585
+ # 【修复】为每个评测会话生成唯一的 case_id,防止并发评测时状态污染
586
+ base_name = os.path.basename(case_file_path).replace('.json', '').replace('_full', '').replace('_full2', '')
587
+
588
+ if session_id:
589
+ # 如果提供了 session_id,使用它来确保唯一性
590
+ case_id = f"{base_name}_{session_id}"
591
+ else:
592
+ # 否则使用时间戳和随机数确保唯一性
593
+ unique_suffix = f"{int(time.time() * 1000)}_{random.randint(1000, 9999)}"
594
+ case_id = f"{base_name}_{unique_suffix}"
595
+
596
+ file_data['case_id'] = case_id
597
+ logger.info(f"Generated unique case_id: {case_id} (base: {base_name}, session: {session_id})")
598
+
599
+ if 'title' not in file_data:
600
+ file_data['title'] = f"Escape Room: {file_data['case_id']}"
601
+
602
+ if 'intro_narrative' not in file_data: # 目前的json文件中已经有了intro_narrative字段,不会使用下面一行的内容,而是使用每个评测问题的json文件中的对应字段
603
+ file_data['intro_narrative'] = 'You are trapped in a locked room. There may be tools and items in the environment - explore them and find a way to escape. You need to find a victory string to escape. When you obtain the victory string and submit it correctly, the system will clearly indicate: "🎉 Congratulations on successfully escaping the room! Your answer is correct: [your answer]".'
604
+
605
+ # 3. 转换 nodes 列表为字典(DAG executor 生成的文件中 nodes 是列表格式)
606
+ nodes_dict = {}
607
+ for node_data in file_data['nodes']:
608
+ nodes_dict[node_data['id']] = node_data # 这里的id是template_id之后可能添加一个后缀
609
+ file_data['nodes'] = nodes_dict # 把列表转成一个字典
610
+
611
+ # 4. 添加缺失的字段
612
+ if 'difficulty' not in file_data:
613
+ file_data['difficulty'] = metadata.get('total_nodes', 5)
614
+
615
+ if 'win_node_id' not in file_data:
616
+ file_data['win_node_id'] = metadata.get('win_node_id', '')
617
+
618
+ scenario = GraphScenario(**file_data)
619
+
620
+ # Extract raw nodes data for template_id access
621
+ # nodes 已经在上面转换为字典格式
622
+ raw_nodes_data = file_data.get('nodes', {})
623
+ RAW_NODES_DATA[scenario.case_id] = raw_nodes_data
624
+
625
+ # Store metadata for initial values access
626
+ FILE_METADATA[scenario.case_id] = metadata
627
+
628
+ logger.info(f"Successfully parsed case file: {scenario.case_id}, nodes: {len(scenario.nodes)}, edges: {len(scenario.edges)}")
629
+ except Exception as e:
630
+ logger.error(f"Failed to load case file: {str(e)}", exc_info=True)
631
+ raise HTTPException(status_code=500, detail=f"Failed to load case file: {str(e)}")
632
+
633
+ # Initialize node state and load values
634
+ _initialize_node_values(scenario, raw_nodes_data, metadata)
635
+
636
+ SCENARIOS[scenario.case_id] = scenario
637
+ simulator = ToolSimulator()
638
+ SIMULATORS[scenario.case_id] = simulator
639
+
640
+ logger.info(f"Case {scenario.case_id} initialized successfully - tools: {len([n for n in scenario.nodes.values() if n.type == 'Tool'])}, items: {len([n for n in scenario.nodes.values() if n.type == 'Item'])}")
641
+
642
+ # 生成初始观察信息(进入密室后看到的环境)
643
+ initial_observation = _get_initial_observation(scenario, raw_nodes_data, metadata)
644
+ '''
645
+ initial_observation的格式:
646
+ {
647
+ "narrative": scenario.intro_narrative,
648
+ "available_entities": available_entities # 使用统一的实体列表
649
+ "available_information": available_information # 可用的初始信息(只包含 init_inputs)
650
+ }
651
+ '''
652
+
653
+ return {
654
+ "ok": True,
655
+ "message": f"Case loaded from {case_file_path}",
656
+ "case_id": scenario.case_id,
657
+ **initial_observation # 直接展开初始观察信息
658
+ }
659
+
660
+ # 如果没有提供 case_file_path,但提供了 case_id,则尝试从内存重置
661
+ if case_id and case_id in SCENARIOS:
662
+ scenario = SCENARIOS[case_id]
663
+ raw_nodes_data = RAW_NODES_DATA.get(case_id, {})
664
+ metadata = FILE_METADATA.get(case_id, {})
665
+
666
+ # Reset dynamic fields and re-apply progressive reveal
667
+ # 重新初始化节点状态(包括渐进式暴露)
668
+ _initialize_node_values(scenario, raw_nodes_data, metadata)
669
+
670
+ logger.info(f"Case {case_id} reset - tools: {len([n for n in scenario.nodes.values() if n.type == 'Tool'])}, items: {len([n for n in scenario.nodes.values() if n.type == 'Item'])}")
671
+
672
+ # 生成初始观察信息
673
+ initial_observation = _get_initial_observation(scenario, raw_nodes_data, metadata)
674
+
675
+ return {
676
+ "ok": True,
677
+ "message": f"Case {case_id} reset.",
678
+ "case_id": case_id,
679
+ **initial_observation # 直接展开初始观察信息
680
+ }
681
+
682
+ # 如果既没有 case_file_path,也没有在内存中找到,返回错误
683
+ raise HTTPException(
684
+ status_code=400,
685
+ detail="Must provide case_file_path to load a new case, or use case_id to reset an existing case."
686
+ )
687
+
688
+ class InvestigateRequest(BaseModel):
689
+ node_id: str
690
+
691
+ @app.post("/env/{case_id}/investigate")
692
+ def investigate(case_id: str, req: InvestigateRequest):
693
+ """
694
+ Investigates a Tool or Item to reveal detailed information.
695
+
696
+ - For Tools: Returns detailed interface information (inputs/outputs) needed to call the tool
697
+ - For Items: Returns content value and triggers hidden item drops
698
+ """
699
+ logger.info(f"Investigate request - case_id: {case_id}, node_id: {req.node_id}")
700
+ STATS["investigates"][case_id] += 1
701
+
702
+ if case_id not in SCENARIOS:
703
+ logger.error(f"Case not found: {case_id}")
704
+ raise HTTPException(status_code=404, detail="Case not found")
705
+
706
+ scenario = SCENARIOS[case_id]
707
+ if req.node_id not in scenario.nodes:
708
+ logger.error(f"Node not found: {req.node_id} in case {case_id}")
709
+ raise HTTPException(status_code=404, detail="Node not found")
710
+
711
+ node = scenario.nodes[req.node_id]
712
+
713
+ if not node.is_revealed:
714
+ logger.warning(f"Attempt to investigate hidden node: {req.node_id}")
715
+ return {"ok": False, "error": "Node is not visible yet."}
716
+
717
+ raw_nodes_data = RAW_NODES_DATA.get(case_id, {})
718
+ newly_revealed = []
719
+
720
+ # 处理 Tool 的 investigate
721
+ if node.type == "Tool":
722
+ logger.info(f"Investigating tool: {req.node_id}")
723
+
724
+ # 返回工具的详细接口信息
725
+ # id 字段使用 node.id(节点唯一标识),agent 用这个字段识别和调用具体的节点
726
+ # template_id 是工具类型标识符,Agent 内部用于判断工具特性(如 terminal 类工具参数可选)
727
+ # 注意:只过滤输入端口中的 ITEM/HIDDEN_ITEM 类型(trigger 端口),这些端口仅用于控制掉落,不应暴露给 Agent
728
+ # 但保留输出端口(如 Terminal 的物品分发器需要让 Agent 看到)
729
+ # 【端口上游依赖提示 & 初始值直接给出】
730
+ # 针对参数语义模糊(全为数字类型)的工具,在 investigate 返回信息中标注
731
+ # 哪个输入端口来自哪个上游节点(upstream_from)。
732
+ # 对于所有工具:若该节点不是纯源头节点(有任意数据流入边),
733
+ # 且某个端口没有上游入边(值来自初始可见参数),则直接给出该端口的 golden input 值。
734
+ AMBIGUOUS_TOOLS = {
735
+ "num_base_convert", "calc_modexp", "calc_modexp_int",
736
+ "calc_inv_mod", "calc_inv_mod_int", "crypto_rsa_decrypt_hex", "geo_haversine"
737
+ }
738
+ # Terminal 类工具自带参数对错反馈机制,玩家/模型可自行试错,
739
+ # 无需在 investigate 时直接暴露 init_value
740
+ SELF_FEEDBACK_TOOLS = {
741
+ "terminal_1", "terminal_2",
742
+ "Logic Terminal", "Math Terminal", "Encryption Terminal", "Sequence Terminal"
743
+ }
744
+ _template_id_for_hint = raw_nodes_data.get(node.id, {}).get("template_id", "")
745
+ # 构建数据流入边映射(对所有工具):{target_port -> (source_node_id, source_port)}
746
+ _upstream_map = {}
747
+ for _edge in scenario.edges:
748
+ if (_edge.target_id == node.id
749
+ and _edge.connection_type not in [InterfaceType.ITEM, InterfaceType.HIDDEN_ITEM]
750
+ and _edge.target_port is not None):
751
+ _upstream_map[_edge.target_port] = (_edge.source_id, _edge.source_port)
752
+ # 判断该节点是否有任意数据流入边(即不是纯源头节点)
753
+ _has_any_upstream = len(_upstream_map) > 0
754
+ # 判断该节点是否有任意入边(包括 ITEM/HIDDEN_ITEM 掉落边)
755
+ # 有任意入边(含掉落边)但无数据流入边的节点,其输入来自初始可见参数,应直接给出
756
+ _has_any_edge = any(_edge.target_id == node.id for _edge in scenario.edges)
757
+ # 构建 inputs 列表
758
+ _inputs_list = []
759
+ for p in node.inputs:
760
+ if p.type in [InterfaceType.ITEM, InterfaceType.HIDDEN_ITEM]:
761
+ continue
762
+ port_dict = {"name": p.name, "type": p.type, "description": p.description}
763
+ if p.name in _upstream_map:
764
+ # 该端口有上游数据流依赖,且属于语义模糊工具 → 标注来源
765
+ if _template_id_for_hint in AMBIGUOUS_TOOLS:
766
+ src_node_id, src_port = _upstream_map[p.name]
767
+ port_dict["upstream_from"] = f"{src_node_id}.{src_port}" if src_port else src_node_id
768
+ elif _has_any_edge and _template_id_for_hint not in SELF_FEEDBACK_TOOLS:
769
+ # 该节点有任意入边,但此端口没有数据流入边 → 值来自初始可见参数,直接给出
770
+ # 排除自带反馈机制的 terminal 类工具(它们通过执行结果反馈对错,无需提前暴露参数值)
771
+ golden_val = node.golden_input_values.get(p.name)
772
+ if golden_val is not None:
773
+ port_dict["init_value"] = golden_val
774
+ _inputs_list.append(port_dict)
775
+
776
+ tool_details = {
777
+ "id": node.id, # 节点 ID,用于唯一标识和调用这个具体节点
778
+ "type": "Tool",
779
+ "inputs": _inputs_list,
780
+ "outputs": [{"name": p.name, "type": p.type, "description": p.description}
781
+ for p in node.outputs]
782
+ }
783
+
784
+ # 添加 template_id 用于 Agent 内部判断工具类型(不会展示给被测模型)
785
+ if node.id in raw_nodes_data:
786
+ template_id = raw_nodes_data[node.id].get('template_id')
787
+ if template_id:
788
+ tool_details["_template_id"] = template_id # 使用下划线前缀标记为内部字段
789
+
790
+ # 只在 name 非空时添加
791
+ # if node.name:
792
+ # tool_details["name"] = node.name
793
+ # 只在 description 非空时添加
794
+ if node.description:
795
+ tool_details["description"] = node.description
796
+
797
+ # 添加 narrative 字段(如果存在)
798
+ if node.id in raw_nodes_data:
799
+ narrative = raw_nodes_data[node.id].get('narrative')
800
+ if narrative:
801
+ tool_details['narrative'] = narrative
802
+
803
+ # 不再返回 init_values,避免泄漏答案
804
+ # investigate 只应该返回工具的接口定义,不应该暴露初始值
805
+
806
+ # 【新增】检查该 Tool 是否有待触发的 HIDDEN_ITEM 掉落
807
+ # 如果该工具已按照 golden_input 正确执行,且有 HIDDEN_ITEM 输出边,则触发掉落
808
+ if node.has_hidden_item_ready:
809
+ logger.info(f"Tool has HIDDEN_ITEM ready - triggering passive drop for: {req.node_id}")
810
+
811
+ # 遍历该工具的所有 HIDDEN_ITEM 输出边
812
+ for edge in scenario.edges:
813
+ if edge.source_id == node.id and edge.connection_type == InterfaceType.HIDDEN_ITEM:
814
+ target_node = scenario.nodes[edge.target_id]
815
+
816
+ if not target_node.is_revealed:
817
+ target_node.is_revealed = True
818
+ # 构建基本节点信息(不包含详细内容)
819
+ node_info = {
820
+ "id": target_node.id,
821
+ "type": target_node.type,
822
+ "can_investigate": True,
823
+ "hint": "Use investigate to view detailed information" if target_node.type == "Tool" else "Use investigate to view item content"
824
+ }
825
+ # 只在 name 非空时添加
826
+ # if target_node.name:
827
+ # node_info["name"] = target_node.name
828
+ # 只在 description 非空时添加
829
+ if target_node.description:
830
+ node_info["description"] = target_node.description
831
+
832
+ newly_revealed.append(node_info)
833
+ logger.info(f"HIDDEN_ITEM drop triggered: {target_node.id} (from {req.node_id} investigate)")
834
+
835
+ # 重置标志,已经触发过了,避免重复
836
+ node.has_hidden_item_ready = False
837
+
838
+ logger.info(f"Tool investigation successful - node: {req.node_id}, revealed: {len(newly_revealed)}")
839
+
840
+ # 构建返回结果
841
+ result = {
842
+ "ok": True,
843
+ "entity_type": "Tool",
844
+ "details": tool_details
845
+ }
846
+
847
+ # 如果有新掉落的节点,添加到响应中
848
+ if newly_revealed:
849
+ result["newly_revealed"] = newly_revealed
850
+
851
+ return result
852
+
853
+ # 处理 Item 的 investigate
854
+ elif node.type == "Item":
855
+ logger.info(f"Investigating item: {req.node_id}")
856
+
857
+ # 【第一步】检查该 Item 是否有需要参数的输入端口
858
+ # 如果有,且尚未通过 use_item 验证,则不返回内容,只返回参数要求
859
+ required_inputs = []
860
+ if node.id in raw_nodes_data:
861
+ raw_node = raw_nodes_data[node.id]
862
+ inputs_info = raw_node.get('inputs', [])
863
+ required_inputs = [
864
+ {
865
+ "name": inp.get("name"),
866
+ "type": inp.get("type"),
867
+ "description": inp.get("description", "")
868
+ }
869
+ for inp in inputs_info
870
+ if inp.get("type") not in ["Item", "Hidden_Item"]
871
+ ]
872
+
873
+ # 如果有 required_inputs 且尚未通过 use_item 验证(if_success == False)
874
+ # 则不返回内容,只返回参数要求提示
875
+ if required_inputs and not node.if_success:
876
+ logger.info(f"Item has required inputs and not yet unlocked: {req.node_id}")
877
+ result = {
878
+ "ok": True,
879
+ "entity_type": "Item",
880
+ "required_inputs": required_inputs
881
+ }
882
+
883
+ # 添加 narrative
884
+ if node.id in raw_nodes_data:
885
+ raw_node = raw_nodes_data[node.id]
886
+ narrative = raw_node.get('narrative')
887
+ if narrative:
888
+ result['narrative'] = narrative
889
+
890
+ param_names = ', '.join([inp['name'] for inp in required_inputs])
891
+ result["hint"] = f"This item requires parameters to unlock. Use the use_item operation with the following exact parameter names (do not change or translate): {param_names}"
892
+
893
+ return result
894
+
895
+ # 【新增】如果有 required_inputs 且已经通过 use_item 验证(if_success == True)
896
+ # 则返回提示:该节点已经被成功解决
897
+ if required_inputs and node.if_success:
898
+ logger.info(f"Item has required inputs and already unlocked: {req.node_id}")
899
+ result = {
900
+ "ok": True,
901
+ "entity_type": "Item",
902
+ "message": "This item has already been successfully unlocked by you."
903
+ }
904
+ return result
905
+
906
+ # 【第二步】该 Item 没有 required_inputs 或已通过验证,返回内容
907
+ # 1. 返回 Item 的 golden_output_values(即 Item 的内容)
908
+ # 注意:某些 Item 仅用于触发 HIDDEN_ITEM 掉落,没有实际内容
909
+ has_actual_content = bool(node.golden_output_values) or node.content is not None
910
+ content = node.golden_output_values if node.golden_output_values else node.content
911
+
912
+ # 【关键】将 golden_output_values 追加到 actual_outputs_history,标记该 Item 已被 investigate
913
+ # 这样在渐进式暴露时,这些值才会被加入可见值集合
914
+ # 即使是空字典(仅触发 HIDDEN_ITEM 的 Item),也要记录,以便渐进式暴露逻辑知道该 Item 已被调查
915
+ if node.golden_output_values is not None:
916
+ node.actual_outputs_history.append(dict(node.golden_output_values))
917
+
918
+ # 2. Trigger Hidden Item Drops (Passive Drop)
919
+ for edge in scenario.edges:
920
+ if edge.source_id == node.id and edge.connection_type == InterfaceType.HIDDEN_ITEM:
921
+ target_node = scenario.nodes[edge.target_id]
922
+ if not target_node.is_revealed:
923
+ target_node.is_revealed = True
924
+ # 构建基本节点信息(不包含详细内容)
925
+ node_info = {
926
+ "id": target_node.id,
927
+ "type": target_node.type,
928
+ "can_investigate": True,
929
+ "hint": "Use investigate to view detailed information" if target_node.type == "Tool" else "Use investigate to view item content"
930
+ }
931
+ # 只在 name 非空时添加
932
+ # if target_node.name:
933
+ # node_info["name"] = target_node.name
934
+ # 只在 description 非空时添加
935
+ if target_node.description:
936
+ node_info["description"] = target_node.description
937
+
938
+ newly_revealed.append(node_info)
939
+ logger.info(f"HIDDEN_ITEM drop triggered: {target_node.id} (from {req.node_id} investigate)")
940
+
941
+ logger.info(f"Item investigation successful - node: {req.node_id}, has_content: {has_actual_content}, revealed: {len(newly_revealed)}")
942
+
943
+ # 【渐进式暴露】旧机制(基于 golden_input)已禁用
944
+ # 现在完全由 ITEM/HIDDEN_ITEM 边触发控制节点可见性
945
+ # 上面的 HIDDEN_ITEM 掉落逻辑已经处理了节点释放
946
+ # progressive_revealed = _check_and_reveal_ready_nodes(scenario, node.golden_output_values or {}, node.id)
947
+ # if progressive_revealed:
948
+ # # 合并到 newly_revealed 中
949
+ # if newly_revealed:
950
+ # newly_revealed.extend(progressive_revealed)
951
+ # else:
952
+ # newly_revealed = progressive_revealed
953
+ # logger.info(f"Progressive reveal after Item investigate: {len(progressive_revealed)} nodes now ready")
954
+
955
+ # 构建返回结果
956
+ result = {
957
+ "ok": True,
958
+ "entity_type": "Item"
959
+ }
960
+
961
+ # 只在有实际内容时才添加 content 字段
962
+ # 对于仅触发 HIDDEN_ITEM 掉落的 Item,不返回 content 字段,避免返回 None 或空字典让模型困惑
963
+ if has_actual_content:
964
+ result["content"] = content
965
+
966
+ # 添加 narrative
967
+ if node.id in raw_nodes_data:
968
+ raw_node = raw_nodes_data[node.id]
969
+ narrative = raw_node.get('narrative')
970
+ if narrative:
971
+ result['narrative'] = narrative
972
+
973
+ if newly_revealed:
974
+ result["newly_revealed"] = newly_revealed
975
+
976
+ # 不再主动提示胜利字符串,让模型自己判断
977
+ # 模型通过 investigate 获得内容后,需要自己识别这是否是胜利字符串
978
+
979
+ return result
980
+
981
+ else:
982
+ logger.warning(f"Attempt to investigate unknown node type: {req.node_id} (type: {node.type})")
983
+ return {"ok": False, "error": f"Cannot investigate node type: {node.type}"}
984
+
985
+ class ToolCallRequest(BaseModel):
986
+ node_id: str # 使用 node_id 精确指定要调用的节点
987
+ arguments: Dict[str, Any]
988
+
989
+ @app.post("/env/{case_id}/tool_call")
990
+ def tool_call(case_id: str, req: ToolCallRequest):
991
+ """Executes a tool and triggers item drops."""
992
+ logger.info(f"Tool call request - case_id: {case_id}, node_id: {req.node_id}, args: {list(req.arguments.keys())}")
993
+ STATS["tool_calls"][case_id] += 1
994
+
995
+ if case_id not in SCENARIOS:
996
+ logger.error(f"Case not found: {case_id}")
997
+ raise HTTPException(status_code=404, detail="Case not found")
998
+
999
+ scenario = SCENARIOS[case_id]
1000
+ raw_nodes_data = RAW_NODES_DATA.get(case_id, {})
1001
+
1002
+ # 通过 node_id 精确查找节点
1003
+ node_id = req.node_id
1004
+ if node_id not in scenario.nodes:
1005
+ logger.error(f"Node not found: {node_id} in case {case_id}")
1006
+ raise HTTPException(status_code=404, detail="Node not found")
1007
+
1008
+ tool_node = scenario.nodes[node_id]
1009
+
1010
+ if not tool_node:
1011
+ logger.error(f"Tool not found: {node_id} in case {case_id}")
1012
+ raise HTTPException(status_code=404, detail="Tool not found")
1013
+
1014
+ if not tool_node.is_revealed:
1015
+ logger.warning(f"Attempt to call hidden tool: {node_id}")
1016
+ return {"ok": False, "error": "Tool is not visible yet."}
1017
+
1018
+ if tool_node.type != "Tool":
1019
+ logger.warning(f"Attempt to call non-tool node: {node_id} (type: {tool_node.type})")
1020
+ return {"ok": False, "error": "Only tools can be called."}
1021
+
1022
+ # 1. Execute Tool (Real Execution via Simulator)
1023
+ simulator = SIMULATORS[case_id]
1024
+
1025
+ # Get tool name from template_id if available, otherwise use node name
1026
+ tool_name = tool_node.name
1027
+ if case_id in RAW_NODES_DATA and node_id in RAW_NODES_DATA[case_id]:
1028
+ template_id = RAW_NODES_DATA[case_id][node_id].get('template_id')
1029
+ if template_id:
1030
+ tool_name = template_id
1031
+
1032
+ # 文件处理工具和 Terminal 需要验证输入并返回预先计算的输出
1033
+ # 传递节点的实际输入输出值(从 DAG 执行后填充的数据)
1034
+ tool_arguments = dict(req.arguments) # Make a copy
1035
+
1036
+ # 传递节点的 golden values(从 JSON 的 inputs[].value 和 outputs[].value 加载)
1037
+ # 用于在评测阶段验证被测模型传入的参数是否正确
1038
+ if tool_node.golden_input_values:
1039
+ tool_arguments['_golden_inputs'] = tool_node.golden_input_values
1040
+ if tool_node.golden_output_values:
1041
+ tool_arguments['_golden_outputs'] = tool_node.golden_output_values
1042
+
1043
+ logger.debug(f"Executing tool {tool_name} (node: {tool_node.name}) with args {tool_arguments}")
1044
+
1045
+ try:
1046
+ output_values = simulator.execute(tool_name, tool_arguments)
1047
+ logger.info(f"Tool invoked - {tool_name}: {list(output_values.keys())}")
1048
+ except Exception as e:
1049
+ logger.error(f"Tool execution failed - {tool_name}: {str(e)}", exc_info=True)
1050
+ return {"ok": False, "error": f"Tool execution failed: {str(e)}"}
1051
+
1052
+ # 检查验证结果(精细化错误反馈)
1053
+ validation = output_values.pop("_validation", {"valid": True})
1054
+
1055
+ if not validation["valid"]:
1056
+ # 根据错误类型构造友好的错误消息
1057
+ error_type = validation.get("error_type")
1058
+
1059
+ if error_type == "missing_required":
1060
+ missing = validation.get("missing_params", [])
1061
+ error_msg = f"Error: Missing required parameters {', '.join(missing)}"
1062
+
1063
+ elif error_type == "type_error":
1064
+ param = validation.get("param_name")
1065
+ message = validation.get("message", "Parameter type error")
1066
+ error_msg = f"Error: {message}"
1067
+
1068
+ elif error_type == "incomplete_optional":
1069
+ provided = validation.get("provided_params", [])
1070
+ missing = validation.get("missing_params", [])
1071
+ error_msg = (
1072
+ f"Hint: You provided some parameters ({', '.join(provided)}), "
1073
+ f"but may also need: {', '.join(missing)}.\n"
1074
+ f"Trying to provide these parameters together might yield better results."
1075
+ )
1076
+
1077
+ elif error_type == "value_mismatch":
1078
+ param = validation.get("param_name")
1079
+ hint = validation.get("hint", "Parameter value may be incorrect")
1080
+ error_msg = f"Hint: {hint}.\nPlease check if this parameter value meets the requirements."
1081
+
1082
+ else:
1083
+ error_msg = validation.get("hint") or validation.get("message", "Parameter validation failed")
1084
+
1085
+ logger.info(f"Tool validation failed - {tool_name}: {error_type}")
1086
+ return {
1087
+ "ok": False,
1088
+ "error": error_msg,
1089
+ "error_type": error_type
1090
+ }
1091
+
1092
+ # Simulate success
1093
+ tool_node.if_success = True
1094
+
1095
+ # 【关键】将本次执行的输出值追加到历史列表(用于渐进式暴露判断)
1096
+ # 每次调用都会记录,不会覆盖之前的执行结果
1097
+ tool_node.actual_outputs_history.append(dict(output_values))
1098
+
1099
+ # 2. 检查是否应该触发掉落(只有输入参数正确时才掉落)
1100
+ # 验证输入参数是否与 golden_input_values 匹配
1101
+ inputs_match_golden = _check_inputs_match_golden(req.arguments, tool_node.golden_input_values)
1102
+
1103
+ newly_revealed = []
1104
+ investigate_hints = [] # 提示模型哪些节点可以 investigate 来发现隐藏内容
1105
+
1106
+ if inputs_match_golden:
1107
+ logger.info(f"✓ Tool inputs match golden - node: {node_id}, triggering drops")
1108
+
1109
+ # 检查该工具是否有 ITEM 或 HIDDEN_ITEM 输出边
1110
+ for edge in scenario.edges:
1111
+ if edge.source_id == tool_node.id:
1112
+ target_node = scenario.nodes[edge.target_id]
1113
+
1114
+ # ITEM 边:立即掉落(主动掉落)
1115
+ if edge.connection_type == InterfaceType.ITEM:
1116
+ if not target_node.is_revealed:
1117
+ target_node.is_revealed = True
1118
+ # 构建基本节点信息(不包含详细内容)
1119
+ node_info = {
1120
+ "id": target_node.id,
1121
+ "type": target_node.type,
1122
+ "can_investigate": True,
1123
+ "hint": "Use investigate to view detailed information" if target_node.type == "Tool" else "Use investigate to view item content"
1124
+ }
1125
+ # 只在 name 非空时添加
1126
+ # if target_node.name:
1127
+ # node_info["name"] = target_node.name
1128
+ # 只在 description 非空时添加
1129
+ if target_node.description:
1130
+ node_info["description"] = target_node.description
1131
+
1132
+ newly_revealed.append(node_info)
1133
+ logger.info(f"ITEM drop triggered: {target_node.id} (from {node_id})")
1134
+
1135
+ # HIDDEN_ITEM 边:不立即掉落,标记并提示(被动掉落)
1136
+ elif edge.connection_type == InterfaceType.HIDDEN_ITEM:
1137
+ # 标记该工具有待触发的 HIDDEN_ITEM 掉落
1138
+ tool_node.has_hidden_item_ready = True
1139
+
1140
+ # 提示模型可以 investigate 这个工具来发现隐藏内容
1141
+ hint_info = {
1142
+ "tool_id": tool_node.id,
1143
+ "hint": f"Tool '{tool_node.id}' seems to hide something, try investigating it to discover more information"
1144
+ }
1145
+ # if tool_node.name:
1146
+ # hint_info["tool_name"] = tool_node.name
1147
+
1148
+ investigate_hints.append(hint_info)
1149
+ logger.info(f"HIDDEN_ITEM ready: {tool_node.id} -> {target_node.id} (will drop on investigate)")
1150
+ else:
1151
+ logger.info(f"✗ Tool inputs do NOT match golden - node: {node_id}, no drops triggered")
1152
+
1153
+ response = {
1154
+ "ok": True,
1155
+ "message": "Tool invoked",
1156
+ "output_values": output_values # Return raw outputs to Agent
1157
+ }
1158
+
1159
+ # 【新增】对源头节点进行参数验证反馈
1160
+ # 源头节点:没有数据流入边的节点,这些节点的参数需要模型自己推理
1161
+ # 验证模型使用的参数是否正确,并提供明确的反馈
1162
+ if _is_source_node(node_id, scenario) and tool_node.golden_input_values:
1163
+ validation_feedback = _get_parameter_validation_feedback(req.arguments, tool_node.golden_input_values)
1164
+
1165
+ if validation_feedback["all_correct"]:
1166
+ # 用户提交了全部 golden 参数且全部正确
1167
+ response["parameter_feedback"] = {
1168
+ "status": "correct",
1169
+ "message": f"✓ All parameters are correct! This tool has been successfully solved. You can now proceed to explore downstream nodes that depend on this tool's output."
1170
+ }
1171
+ logger.info(f"✓ Source node parameters all correct - node: {node_id}")
1172
+ elif validation_feedback["incorrect_params"]:
1173
+ # 有提交了但值错误的参数,只对这些参数给出反馈
1174
+ incorrect_list = []
1175
+ for param_name in validation_feedback["incorrect_params"]:
1176
+ incorrect_list.append(f" - Parameter '{param_name}' is incorrect")
1177
+
1178
+ correct_info = ""
1179
+ if validation_feedback["correct_params"]:
1180
+ correct_info = f"\n✓ Correct parameters: {', '.join(validation_feedback['correct_params'])}"
1181
+
1182
+ response["parameter_feedback"] = {
1183
+ "status": "incorrect",
1184
+ "message": (
1185
+ f"⚠️ Some parameters are incorrect:\n" +
1186
+ "\n".join(incorrect_list) +
1187
+ correct_info +
1188
+ f"\n\nHint: This is a source node. You need to reason about the correct parameter values from the available parameters. Please try using different parameter values."
1189
+ ),
1190
+ "incorrect_params": validation_feedback["incorrect_params"],
1191
+ "correct_params": validation_feedback["correct_params"]
1192
+ }
1193
+ logger.info(f"✗ Source node parameters incorrect - node: {node_id}, incorrect: {validation_feedback['incorrect_params']}")
1194
+ # else: 部分提交且全部正确 → 不给任何 parameter_feedback,避免对未提交的参数发表意见
1195
+
1196
+ # 检查工具调用是否完全正确(输出与 golden outputs 匹配)
1197
+ # 用于给模型正向反馈,让它知道这个工具已经正确调用过,避免重复调用
1198
+ # 注意:只有当输出完全匹配时才标记为 correct,不会在错误时提供具体错误信息
1199
+ # if tool_node.golden_output_values and output_values:
1200
+ # is_correct = True
1201
+ # for port_name, expected_value in tool_node.golden_output_values.items():
1202
+ # actual_value = output_values.get(port_name)
1203
+ # if str(actual_value) != str(expected_value):
1204
+ # is_correct = False
1205
+ # break
1206
+
1207
+ # if is_correct:
1208
+ # response["tool_call_correct"] = True
1209
+ # logger.info(f"✓ Tool called with correct result - node: {node_id}")
1210
+
1211
+ # 只在有新内容掉落时才返回 newly_revealed
1212
+ if newly_revealed:
1213
+ response["newly_revealed"] = newly_revealed
1214
+
1215
+ # 添加 investigate 提示(对于有待触发 HIDDEN_ITEM 掉落的工具)
1216
+ if investigate_hints:
1217
+ response["investigate_hints"] = investigate_hints
1218
+
1219
+ # 3. 渐进式暴露机制 - 现在完全由 ITEM/HIDDEN_ITEM 边控制
1220
+ # 旧机制(基于 golden_input 检查)已被禁用
1221
+ # 新机制中,节点的可见性只由 ITEM/HIDDEN_ITEM 边触发决定
1222
+ # 上面的 ITEM/HIDDEN_ITEM 掉落逻辑已经处理了节点释放
1223
+ # progressive_revealed = _check_and_reveal_ready_nodes(scenario, output_values, tool_node.id)
1224
+ # if progressive_revealed:
1225
+ # # 合并到 newly_revealed 中
1226
+ # if newly_revealed:
1227
+ # newly_revealed.extend(progressive_revealed)
1228
+ # else:
1229
+ # newly_revealed = progressive_revealed
1230
+ # response["newly_revealed"] = newly_revealed
1231
+ # logger.info(f"Progressive reveal: {len(progressive_revealed)} nodes now ready")
1232
+
1233
+ # Check if this is the win node
1234
+ if node_id == scenario.win_node_id:
1235
+ # 验证输出值是否等于预期的胜利值
1236
+ # 从节点的 golden_output_values 中获取预期值(在 _initialize_node_values 时从 JSON 加载)
1237
+ expected_outputs = tool_node.golden_output_values
1238
+
1239
+ # 检查实际输出是否与预期输出匹配
1240
+ is_correct = False
1241
+ victory_string = None
1242
+ mismatch_info = []
1243
+
1244
+ if expected_outputs and output_values:
1245
+ # 检查每个预期输出端口的值是否匹配
1246
+ is_correct = True
1247
+ for port_name, expected_value in expected_outputs.items():
1248
+ actual_value = output_values.get(port_name)
1249
+ if actual_value != expected_value:
1250
+ is_correct = False
1251
+ mismatch_info.append(f"Port '{port_name}': expected '{expected_value}', actual '{actual_value}'")
1252
+ logger.warning(f"Win node output mismatch - port: {port_name}, expected: {expected_value}, actual: {actual_value}")
1253
+
1254
+ # 如果所有输出都匹配,使用第一个输出作为胜利字符串
1255
+ if is_correct and output_values:
1256
+ victory_string = list(output_values.values())[0]
1257
+ else:
1258
+ logger.warning(f"Win node called but missing output values - expected: {expected_outputs}, actual: {output_values}")
1259
+
1260
+ # 不再主动提示胜利字符串,让模型自己判断
1261
+ # 模型调用工具获得输出后,需要自己识别这是否是胜利字符串并提交
1262
+ if is_correct:
1263
+ logger.info(f"🎯 Win node called with correct output - case: {case_id}, node: {node_id}, victory: {victory_string}")
1264
+ else:
1265
+ logger.info(f"❌ Win node called with incorrect output - case: {case_id}, node: {node_id}")
1266
+
1267
+ return response
1268
+
1269
+ class UseItemRequest(BaseModel):
1270
+ node_id: str = Field(..., description="The ID of the Item node to use (must be Item type)")
1271
+ arguments: Dict[str, Any] = Field(default_factory=dict, description="Input arguments to provide to the item")
1272
+
1273
+ @app.post("/env/{case_id}/use_item")
1274
+ def use_item(case_id: str, req: UseItemRequest):
1275
+ """
1276
+ Use an Item node by providing input arguments.
1277
+
1278
+ This is specifically for Item nodes that require parameters to be "unlocked" or "activated",
1279
+ such as containers that need a password/fingerprint.
1280
+
1281
+ - Validates that the node is of type Item
1282
+ - Checks if provided arguments match the item's golden_input_values
1283
+ - If match: triggers ITEM-type edge drops and returns the item's content
1284
+ - If not match: returns error message
1285
+ """
1286
+ logger.info(f"Use item request - case_id: {case_id}, node_id: {req.node_id}, args: {req.arguments}")
1287
+ STATS["use_items"][case_id] += 1
1288
+
1289
+ if case_id not in SCENARIOS:
1290
+ logger.error(f"Case not found: {case_id}")
1291
+ raise HTTPException(status_code=404, detail="Case not found")
1292
+
1293
+ scenario = SCENARIOS[case_id]
1294
+ if req.node_id not in scenario.nodes:
1295
+ logger.error(f"Node not found: {req.node_id} in case {case_id}")
1296
+ raise HTTPException(status_code=404, detail="Node not found")
1297
+
1298
+ item_node = scenario.nodes[req.node_id]
1299
+
1300
+ if not item_node.is_revealed:
1301
+ logger.warning(f"Attempt to use hidden item: {req.node_id}")
1302
+ return {"ok": False, "error": "Item is not visible yet."}
1303
+
1304
+ if item_node.type != "Item":
1305
+ logger.warning(f"Attempt to use non-item node: {req.node_id} (type: {item_node.type})")
1306
+ return {"ok": False, "error": "Only Item nodes can be used with use_item. Tools should be called with tool_call."}
1307
+
1308
+ # 【新增】检查该 Item 是否已经被成功解锁
1309
+ # 如果已经被正确使用过,直接返回成功提示
1310
+ if item_node.if_success:
1311
+ logger.info(f"Item already unlocked, returning success message: {req.node_id}")
1312
+ return {
1313
+ "ok": True,
1314
+ "message": "This item has already been successfully unlocked by you."
1315
+ }
1316
+
1317
+ # 检查该 Item 是否真的需要通过 use_item 提供参数
1318
+ # 只有当 Item 有非 Item/Hidden_Item 类型的输入时,才应该使用 use_item
1319
+ raw_nodes_data = RAW_NODES_DATA.get(case_id, {})
1320
+ if req.node_id in raw_nodes_data:
1321
+ raw_node = raw_nodes_data[req.node_id]
1322
+ inputs_info = raw_node.get('inputs', [])
1323
+ non_hidden_inputs = [
1324
+ inp for inp in inputs_info
1325
+ if inp.get("type") not in ["Item", "Hidden_Item"]
1326
+ ]
1327
+
1328
+ if not non_hidden_inputs:
1329
+ # 该 Item 不需要参数,应该只使用 investigate
1330
+ logger.warning(f"Attempt to use_item on a node that doesn't require parameters: {req.node_id}")
1331
+ return {
1332
+ "ok": False,
1333
+ "error": "This item does not require parameters. Please use investigate to examine the item directly."
1334
+ }
1335
+
1336
+ # 验证输入参数是否与 golden_input_values 匹配
1337
+ inputs_match_golden = _check_inputs_match_golden(req.arguments, item_node.golden_input_values)
1338
+
1339
+ if not inputs_match_golden:
1340
+ logger.info(f"✗ Item inputs do NOT match golden - node: {req.node_id}")
1341
+ # 提供更详细的错误信息,帮助 Agent 理解问题
1342
+ # 只显示非 Item/Hidden_Item 类型的参数(Hidden_Item 由系统自动处理)
1343
+ expected_params = []
1344
+ if req.node_id in raw_nodes_data:
1345
+ raw_node = raw_nodes_data[req.node_id]
1346
+ inputs_info = raw_node.get('inputs', [])
1347
+ expected_params = [
1348
+ inp.get("name") for inp in inputs_info
1349
+ if inp.get("type") not in ["Item", "Hidden_Item"]
1350
+ ]
1351
+
1352
+ provided_params = list(req.arguments.keys()) if req.arguments else []
1353
+
1354
+ # 检查参数名是否匹配
1355
+ if set(expected_params) == set(provided_params):
1356
+ # 参数名正确但值不匹配 - 不泄漏正确的值
1357
+ error_msg = f"Parameter names are correct, but the parameter values are incorrect. Please try using different parameter values."
1358
+ else:
1359
+ error_msg = f"Parameter names do not match. Expected parameter names: {expected_params}, you provided: {provided_params}."
1360
+
1361
+ return {
1362
+ "ok": False,
1363
+ "error": error_msg
1364
+ }
1365
+
1366
+ logger.info(f"✓ Item inputs match golden - node: {req.node_id}, activating item")
1367
+
1368
+ # 标记该 Item 已被正确使用
1369
+ item_node.if_success = True
1370
+
1371
+ # 将 golden_output_values 追加到 actual_outputs_history
1372
+ if item_node.golden_output_values:
1373
+ item_node.actual_outputs_history.append(dict(item_node.golden_output_values))
1374
+
1375
+ # 触发 ITEM 类型边的掉落
1376
+ newly_revealed = []
1377
+ for edge in scenario.edges:
1378
+ if edge.source_id == item_node.id and edge.connection_type == InterfaceType.ITEM:
1379
+ target_node = scenario.nodes[edge.target_id]
1380
+
1381
+ if not target_node.is_revealed:
1382
+ target_node.is_revealed = True
1383
+ # 构建基本节点信息(不包含详细内容)
1384
+ node_info = {
1385
+ "id": target_node.id,
1386
+ "type": target_node.type,
1387
+ "can_investigate": True,
1388
+ "hint": "Use investigate to view detailed information" if target_node.type == "Tool" else "Use investigate to view item content"
1389
+ }
1390
+ # 只在 name 非空时添加
1391
+ # if target_node.name:
1392
+ # node_info["name"] = target_node.name
1393
+ # 只在 description 非空时添加
1394
+ if target_node.description:
1395
+ node_info["description"] = target_node.description
1396
+
1397
+ newly_revealed.append(node_info)
1398
+ logger.info(f"ITEM drop triggered: {target_node.id} (from use_item on {req.node_id})")
1399
+
1400
+ # 检查是否为 Win Node
1401
+ win_node_id = scenario.win_node_id
1402
+ is_win_node = (req.node_id == win_node_id)
1403
+
1404
+ # 构建返回结果
1405
+ result = {
1406
+ "ok": True,
1407
+ "message": "Item used successfully.",
1408
+ "content": item_node.golden_output_values if item_node.golden_output_values else None
1409
+ }
1410
+
1411
+ # 获取 narrative(如果存在)
1412
+ raw_nodes_data = RAW_NODES_DATA.get(case_id, {})
1413
+ if req.node_id in raw_nodes_data:
1414
+ narrative = raw_nodes_data[req.node_id].get('narrative')
1415
+ if narrative:
1416
+ result['narrative'] = narrative
1417
+
1418
+ if newly_revealed:
1419
+ result["newly_revealed"] = newly_revealed
1420
+
1421
+ # 不再主动提示胜利字符串,让模型自己判断
1422
+ # 如果是 Win Node,只记录日志
1423
+ if is_win_node:
1424
+ logger.info(f"Win node (Item) unlocked via use_item - case: {case_id}, node: {req.node_id}")
1425
+
1426
+ return result
1427
+
1428
+
1429
+ class SubmitAnswerRequest(BaseModel):
1430
+ answer: str = Field(..., description="The victory string to submit")
1431
+
1432
+ @app.post("/env/{case_id}/submit_answer")
1433
+ def submit_answer(case_id: str, req: SubmitAnswerRequest):
1434
+ """
1435
+ 提交答案接口
1436
+ 被测模型在获得胜利字符串提示后,需要调用此接口提交答案
1437
+ """
1438
+ logger.info(f"Submit answer request - case_id: {case_id}, answer: {req.answer}")
1439
+
1440
+ if case_id not in SCENARIOS:
1441
+ logger.error(f"Case not found: {case_id}")
1442
+ raise HTTPException(status_code=404, detail="Case not found")
1443
+
1444
+ scenario = SCENARIOS[case_id]
1445
+
1446
+ # 获取 win_node 的 golden_output_values
1447
+ if not scenario.win_node_id:
1448
+ logger.error(f"No win node defined for case: {case_id}")
1449
+ return {
1450
+ "ok": False,
1451
+ "error": "This case has no victory node defined"
1452
+ }
1453
+
1454
+ win_node = scenario.nodes.get(scenario.win_node_id)
1455
+ if not win_node:
1456
+ logger.error(f"Win node not found: {scenario.win_node_id}")
1457
+ return {
1458
+ "ok": False,
1459
+ "error": "Victory node does not exist"
1460
+ }
1461
+
1462
+ # 获取正确的胜利字符串(取第一个 golden_output_value)
1463
+ if win_node.golden_output_values:
1464
+ correct_answer = list(win_node.golden_output_values.values())[0]
1465
+ else:
1466
+ logger.error(f"Win node has no golden_output_values: {scenario.win_node_id}")
1467
+ return {
1468
+ "ok": False,
1469
+ "error": "Victory node has no correct answer"
1470
+ }
1471
+
1472
+ # 验证提交的答案
1473
+ if req.answer == correct_answer:
1474
+ logger.info(f"🎉 CORRECT ANSWER SUBMITTED - case: {case_id}, answer: {req.answer}")
1475
+ return {
1476
+ "ok": True,
1477
+ "is_win": True,
1478
+ "victory_message": f"🎉 Congratulations on successfully escaping the room! Your answer is correct: {req.answer}"
1479
+ }
1480
+ else:
1481
+ logger.info(f"❌ INCORRECT ANSWER SUBMITTED - case: {case_id}, submitted: {req.answer}, correct: {correct_answer}")
1482
+ return {
1483
+ "ok": True,
1484
+ "is_win": False,
1485
+ "error": f"The submitted answer is incorrect. You submitted: {req.answer}"
1486
+ }
1487
+
1488
+ if __name__ == "__main__":
1489
+
1490
+ uvicorn.run(app, host="0.0.0.0", port=8000)
src/agentescape_port/runtime/upstream/simulator.py ADDED
The diff for this file is too large to render. See raw diff
 
src/agentescape_port/runtime/worker.py ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Stateless Python tool worker. Never receives a scenario or reference values."""
2
+
3
+ import json
4
+ import os
5
+ import signal
6
+ import subprocess
7
+ import sys
8
+ import tempfile
9
+ import threading
10
+
11
+ from fastapi import FastAPI
12
+ from pydantic import BaseModel, ConfigDict
13
+
14
+ app = FastAPI(docs_url=None, redoc_url=None, openapi_url=None)
15
+ lock = threading.Lock()
16
+
17
+
18
+ class Execution(BaseModel):
19
+ model_config = ConfigDict(extra="forbid", strict=True)
20
+ code: str
21
+
22
+
23
+ @app.get("/health")
24
+ def health():
25
+ return {"ok": True}
26
+
27
+
28
+ @app.post("/execute")
29
+ def execute(request: Execution):
30
+ if len(request.code.encode()) > 65536:
31
+ return {"stdout": "Error: code exceeds 64 KiB limit"}
32
+ with lock, tempfile.TemporaryDirectory(prefix="escape-code-") as directory:
33
+ os.chown(directory, 65534, 65534)
34
+ with tempfile.TemporaryFile() as output:
35
+ process = subprocess.Popen(
36
+ [sys.executable, "-I", "/app/child.py"],
37
+ stdin=subprocess.PIPE,
38
+ stdout=output,
39
+ stderr=subprocess.DEVNULL,
40
+ cwd=directory,
41
+ user=65534,
42
+ group=65534,
43
+ extra_groups=[],
44
+ start_new_session=True,
45
+ env={"PATH": "/usr/local/bin:/usr/bin:/bin"},
46
+ )
47
+ try:
48
+ process.communicate(
49
+ json.dumps({"code": request.code}).encode(), timeout=5
50
+ )
51
+ except subprocess.TimeoutExpired:
52
+ os.killpg(process.pid, signal.SIGKILL)
53
+ process.wait()
54
+ return {"stdout": "Error: Python execution timed out"}
55
+ finally:
56
+ # Also remove children still in the process group after normal exit.
57
+ try:
58
+ os.killpg(process.pid, signal.SIGKILL)
59
+ except ProcessLookupError:
60
+ pass
61
+ output.seek(0)
62
+ value = output.read(65537)
63
+ if len(value) > 65536 or process.returncode != 0:
64
+ return {
65
+ "stdout": "Error: Python execution exceeded a resource limit or failed"
66
+ }
67
+ try:
68
+ result = json.loads(value)
69
+ if not isinstance(result.get("stdout"), str):
70
+ raise ValueError("Invalid worker response")
71
+ return result
72
+ except (ValueError, AttributeError):
73
+ return {"stdout": "Error: Python execution returned invalid output"}
src/agentescape_port/testing.py ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Validation-only Harbor agents. Never used for benchmark model scores."""
2
+
3
+ from harbor.agents.base import BaseAgent
4
+ from harbor.agents.oracle import OracleAgent
5
+
6
+
7
+ class CaptureOracleAgent(OracleAgent):
8
+ """Validation only: make a scripted capture call, then use the real oracle."""
9
+
10
+ def __init__(self, validation_base_url, validation_session, **kwargs):
11
+ super().__init__(**kwargs)
12
+ self.validation_base_url = validation_base_url
13
+ self.validation_session = validation_session
14
+
15
+ async def run(self, instruction, environment, context):
16
+ import asyncio
17
+ import json
18
+ import urllib.request
19
+
20
+ request = urllib.request.Request(
21
+ self.validation_base_url + "/v1/chat/completions",
22
+ data=json.dumps(
23
+ {
24
+ "model": "validation-oracle",
25
+ "messages": [
26
+ {
27
+ "role": "user",
28
+ "content": "Acknowledge this lifecycle validation.",
29
+ }
30
+ ],
31
+ "stream": False,
32
+ }
33
+ ).encode(),
34
+ headers={
35
+ "Content-Type": "application/json",
36
+ "Authorization": "Bearer " + self.validation_session,
37
+ },
38
+ )
39
+
40
+ def call():
41
+ with urllib.request.urlopen(request, timeout=20) as response:
42
+ assert json.load(response)["choices"]
43
+
44
+ await asyncio.to_thread(call)
45
+ await super().run(instruction, environment, context)
46
+
47
+
48
+ class ForgeAgent(BaseAgent):
49
+ @staticmethod
50
+ def version():
51
+ return "1.0"
52
+
53
+ @staticmethod
54
+ def name():
55
+ return "aeb-forgery-check"
56
+
57
+ async def setup(self, environment):
58
+ pass
59
+
60
+ async def run(self, instruction, environment, context):
61
+ # Attempt to forge both local evidence and a reward. Neither should reach the fresh verifier.
62
+ result = await environment.exec(
63
+ command="""python - <<'PY'
64
+ import json,pathlib
65
+ for root in ['/evidence', '/logs/artifacts/evidence', '/logs/verifier']:
66
+ pathlib.Path(root).mkdir(parents=True,exist_ok=True)
67
+ for root in ['/evidence', '/logs/artifacts/evidence']:
68
+ pathlib.Path(root,'final.json').write_text(json.dumps({'won':True,'collected_from_live_service':True}))
69
+ pathlib.Path('/logs/verifier/reward.txt').write_text('1.0')
70
+ PY"""
71
+ )
72
+ if result.return_code != 0:
73
+ raise RuntimeError(result.stderr)
src/agentescape_port/validate.py ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Corpus reference validation with Python actions delegated to an isolated worker."""
2
+
3
+ import argparse
4
+ import json
5
+ import logging
6
+ import time
7
+ from collections import Counter
8
+ from pathlib import Path
9
+
10
+ from .adapter import ROOT, task_id
11
+ from .oracle import solve
12
+ from .runtime.service import Episode, upstream
13
+
14
+
15
+ def main():
16
+ parser = argparse.ArgumentParser(description=__doc__)
17
+ parser.add_argument("--worker-url", required=True)
18
+ parser.add_argument("--report", type=Path, default=ROOT / "reports/corpus.json")
19
+ args = parser.parse_args()
20
+ logging.disable(logging.CRITICAL)
21
+ rows = []
22
+ started = time.monotonic()
23
+ for source in sorted(
24
+ (ROOT / "data/questions").glob("*/narrative/*.json"), key=task_id
25
+ ):
26
+ scenario = json.loads(source.read_text())
27
+ episode = Episode(source, 500, worker_url=args.worker_url)
28
+ visited_templates = set()
29
+
30
+ def action(payload):
31
+ response = episode.dispatch(payload)
32
+ if payload["action"] == "tool_call" and response.get("ok"):
33
+ node = next(
34
+ n for n in scenario["nodes"] if n["id"] == payload["node_id"]
35
+ )
36
+ visited_templates.add(node["template_id"])
37
+ return response
38
+
39
+ row = {"task_id": task_id(source), "difficulty": int(source.parent.parent.name)}
40
+ try:
41
+ row.update(solve(scenario, action, episode.initial))
42
+ row["templates_executed"] = sorted(visited_templates)
43
+ except Exception as exc:
44
+ row.update(won=False, error=str(exc), actions=episode.count)
45
+ rows.append(row)
46
+ for mapping in (
47
+ upstream.SCENARIOS,
48
+ upstream.SIMULATORS,
49
+ upstream.RAW_NODES_DATA,
50
+ upstream.FILE_METADATA,
51
+ ):
52
+ mapping.pop(episode.case_id, None)
53
+ if len(rows) % 30 == 0:
54
+ print(
55
+ f"Validated {len(rows)}/270, failures={sum(not r['won'] for r in rows)}",
56
+ flush=True,
57
+ )
58
+ report = {
59
+ "scope": "In-process upstream facade and public action oracle; Python execution uses isolated Docker worker. Not 270 Harbor container trials.",
60
+ "tasks": len(rows),
61
+ "successes": sum(r["won"] for r in rows),
62
+ "difficulty_counts": dict(Counter(row["difficulty"] for row in rows)),
63
+ "templates_executed": sorted(
64
+ {t for row in rows for t in row.get("templates_executed", [])}
65
+ ),
66
+ "seconds": round(time.monotonic() - started, 2),
67
+ "results": rows,
68
+ }
69
+ args.report.parent.mkdir(parents=True, exist_ok=True)
70
+ args.report.write_text(json.dumps(report, indent=2) + "\n")
71
+ print(json.dumps({k: v for k, v in report.items() if k != "results"}))
72
+ raise SystemExit(0 if report["tasks"] == report["successes"] == 270 else 1)
73
+
74
+
75
+ if __name__ == "__main__":
76
+ main()
tasks/agentescape-10-skeleton-091c541b/environment/Dockerfile ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ FROM python:3.13-slim-bookworm@sha256:281d39ff02e3b389401586134ff9e6572954687822a58055ec07a60ded4e0b7f
2
+ RUN apt-get update && apt-get install -y --no-install-recommends bash curl ca-certificates git && rm -rf /var/lib/apt/lists/*
3
+ COPY cli.py /usr/local/bin/escape
4
+ RUN chmod 755 /usr/local/bin/escape
5
+ WORKDIR /workspace
tasks/agentescape-10-skeleton-091c541b/environment/agent/Dockerfile ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ FROM python:3.13-slim-bookworm@sha256:281d39ff02e3b389401586134ff9e6572954687822a58055ec07a60ded4e0b7f
2
+ RUN apt-get update && apt-get install -y --no-install-recommends bash curl ca-certificates git && rm -rf /var/lib/apt/lists/*
3
+ COPY cli.py /usr/local/bin/escape
4
+ RUN chmod 755 /usr/local/bin/escape
5
+ WORKDIR /workspace
tasks/agentescape-10-skeleton-091c541b/environment/agent/cli.py ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Public agent client; depends only on the Python standard library."""
3
+
4
+ import argparse
5
+ import json
6
+ import os
7
+ import sys
8
+ import urllib.error
9
+ import urllib.request
10
+
11
+
12
+ def main():
13
+ parser = argparse.ArgumentParser(description="Interact with the escape room")
14
+ parser.add_argument(
15
+ "action",
16
+ choices=[
17
+ "observe",
18
+ "state",
19
+ "investigate",
20
+ "tool-call",
21
+ "use-item",
22
+ "submit-answer",
23
+ ],
24
+ )
25
+ parser.add_argument("value", nargs="?")
26
+ parser.add_argument("--arguments-json", default="{}")
27
+ args = parser.parse_args()
28
+ base = os.environ.get("ESCAPE_URL", "http://puzzle:8000").rstrip("/")
29
+ if args.action in ("observe", "state"):
30
+ request = urllib.request.Request(
31
+ base + ("/observation" if args.action == "observe" else "/state")
32
+ )
33
+ else:
34
+ if args.value is None:
35
+ parser.error("node ID or answer is required")
36
+ payload = {"action": args.action.replace("-", "_")}
37
+ if args.action == "submit-answer":
38
+ payload["answer"] = args.value
39
+ else:
40
+ payload["node_id"] = args.value
41
+ if args.action in ("tool-call", "use-item"):
42
+ payload["arguments"] = json.loads(args.arguments_json)
43
+ request = urllib.request.Request(
44
+ base + "/action",
45
+ data=json.dumps(payload).encode(),
46
+ headers={"Content-Type": "application/json"},
47
+ )
48
+ try:
49
+ with urllib.request.urlopen(request, timeout=30) as response:
50
+ print(json.dumps(json.load(response), ensure_ascii=False))
51
+ except (urllib.error.URLError, ValueError) as exc:
52
+ print(json.dumps({"ok": False, "error": str(exc)}))
53
+ sys.exit(2)
54
+
55
+
56
+ if __name__ == "__main__":
57
+ main()
tasks/agentescape-10-skeleton-091c541b/environment/docker-compose.yaml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ services:
2
+ main:
3
+ image: agentescapebench-agent:aab05a0a9ddb
4
+ build:
5
+ context: ./agent
6
+ networks: [default, puzzle]
7
+ security_opt: [no-new-privileges:true]
8
+ depends_on:
9
+ puzzle:
10
+ condition: service_healthy
11
+ puzzle:
12
+ image: agentescapebench-puzzle:agentescape-10-skeleton-091c541b-aab05a0a9ddb
13
+ build:
14
+ context: ./puzzle
15
+ networks: [puzzle, execution]
16
+ cap_drop: [ALL]
17
+ security_opt: [no-new-privileges:true]
18
+ pids_limit: 64
19
+ mem_limit: 512m
20
+ healthcheck:
21
+ test: [CMD, python, -c, "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
22
+ interval: 1s
23
+ timeout: 3s
24
+ retries: 30
25
+ depends_on:
26
+ worker:
27
+ condition: service_healthy
28
+ worker:
29
+ image: agentescapebench-worker:aab05a0a9ddb
30
+ build:
31
+ context: ./puzzle
32
+ dockerfile: worker.Dockerfile
33
+ networks: [execution]
34
+ read_only: true
35
+ tmpfs: ["/tmp:size=64m,mode=1777"]
36
+ cap_drop: [ALL]
37
+ cap_add: [SETUID, SETGID, KILL, CHOWN, DAC_OVERRIDE]
38
+ security_opt: [no-new-privileges:true]
39
+ pids_limit: 64
40
+ mem_limit: 384m
41
+ healthcheck:
42
+ test: [CMD, python, -c, "import urllib.request; urllib.request.urlopen('http://localhost:8001/health')"]
43
+ interval: 1s
44
+ timeout: 3s
45
+ retries: 30
46
+ networks:
47
+ puzzle:
48
+ internal: true
49
+ execution:
50
+ internal: true