open-research-protocol 0.4.13 → 0.4.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/AGENT_INTEGRATION.md +50 -0
  2. package/README.md +273 -144
  3. package/bin/orp.js +14 -1
  4. package/cli/orp.py +14846 -9925
  5. package/docs/AGENT_LOOP.md +13 -0
  6. package/docs/AGENT_MODES.md +79 -0
  7. package/docs/CANONICAL_CLI_BOUNDARY.md +15 -0
  8. package/docs/EXCHANGE.md +94 -0
  9. package/docs/LAUNCH_KIT.md +107 -0
  10. package/docs/ORP_HOSTED_WORKSPACE_CONTRACT.md +295 -0
  11. package/docs/ORP_PUBLIC_LAUNCH_CHECKLIST.md +5 -0
  12. package/docs/START_HERE.md +567 -0
  13. package/package.json +5 -2
  14. package/packages/lifeops-orp/README.md +67 -0
  15. package/packages/lifeops-orp/package.json +48 -0
  16. package/packages/lifeops-orp/src/index.d.ts +106 -0
  17. package/packages/lifeops-orp/src/index.js +7 -0
  18. package/packages/lifeops-orp/src/mapping.js +309 -0
  19. package/packages/lifeops-orp/src/workspace.js +108 -0
  20. package/packages/lifeops-orp/test/orp.test.js +187 -0
  21. package/packages/orp-workspace-launcher/README.md +82 -0
  22. package/packages/orp-workspace-launcher/package.json +39 -0
  23. package/packages/orp-workspace-launcher/src/commands.js +77 -0
  24. package/packages/orp-workspace-launcher/src/core-plan.js +506 -0
  25. package/packages/orp-workspace-launcher/src/hosted-state.js +208 -0
  26. package/packages/orp-workspace-launcher/src/index.js +82 -0
  27. package/packages/orp-workspace-launcher/src/ledger.js +745 -0
  28. package/packages/orp-workspace-launcher/src/list.js +488 -0
  29. package/packages/orp-workspace-launcher/src/orp-command.js +126 -0
  30. package/packages/orp-workspace-launcher/src/orp.js +912 -0
  31. package/packages/orp-workspace-launcher/src/registry.js +558 -0
  32. package/packages/orp-workspace-launcher/src/slot.js +188 -0
  33. package/packages/orp-workspace-launcher/src/sync.js +363 -0
  34. package/packages/orp-workspace-launcher/src/tabs.js +166 -0
  35. package/packages/orp-workspace-launcher/test/commands.test.js +164 -0
  36. package/packages/orp-workspace-launcher/test/core-plan.test.js +253 -0
  37. package/packages/orp-workspace-launcher/test/fixtures/smoke-notes.txt +2 -0
  38. package/packages/orp-workspace-launcher/test/fixtures/workspace-manifest.json +17 -0
  39. package/packages/orp-workspace-launcher/test/ledger.test.js +244 -0
  40. package/packages/orp-workspace-launcher/test/list.test.js +299 -0
  41. package/packages/orp-workspace-launcher/test/orp-command.test.js +44 -0
  42. package/packages/orp-workspace-launcher/test/orp.test.js +224 -0
  43. package/packages/orp-workspace-launcher/test/tabs.test.js +168 -0
  44. package/scripts/orp-kernel-agent-pilot.py +10 -1
  45. package/scripts/orp-kernel-agent-replication.py +10 -1
  46. package/scripts/orp-kernel-canonical-continuation.py +10 -1
  47. package/scripts/orp-kernel-continuation-pilot.py +10 -1
  48. package/scripts/render-terminal-demo.py +416 -0
  49. package/spec/v1/exchange-report.schema.json +105 -0
  50. package/spec/v1/hosted-workspace-event.schema.json +102 -0
  51. package/spec/v1/hosted-workspace.schema.json +332 -0
  52. package/spec/v1/workspace.schema.json +108 -0
@@ -0,0 +1,332 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openresearchprotocol.com/spec/v1/hosted-workspace.schema.json",
4
+ "title": "ORP Hosted Workspace",
5
+ "description": "Canonical hosted source-of-truth record for an ORP workspace that can be reopened locally and inspected on ORP.Earth.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema_version",
10
+ "workspace_id",
11
+ "title",
12
+ "source_of_truth",
13
+ "state",
14
+ "created_at_utc",
15
+ "updated_at_utc"
16
+ ],
17
+ "properties": {
18
+ "schema_version": {
19
+ "type": "string",
20
+ "const": "1.0.0"
21
+ },
22
+ "workspace_id": {
23
+ "type": "string",
24
+ "minLength": 1
25
+ },
26
+ "title": {
27
+ "type": "string",
28
+ "minLength": 1
29
+ },
30
+ "slug": {
31
+ "type": "string",
32
+ "minLength": 1
33
+ },
34
+ "description": {
35
+ "type": "string"
36
+ },
37
+ "visibility": {
38
+ "type": "string",
39
+ "enum": [
40
+ "private",
41
+ "team",
42
+ "public"
43
+ ]
44
+ },
45
+ "source_of_truth": {
46
+ "type": "string",
47
+ "const": "hosted-workspace"
48
+ },
49
+ "linked_idea": {
50
+ "type": "object",
51
+ "additionalProperties": false,
52
+ "required": [
53
+ "idea_id"
54
+ ],
55
+ "properties": {
56
+ "idea_id": {
57
+ "type": "string",
58
+ "minLength": 1
59
+ },
60
+ "idea_title": {
61
+ "type": "string"
62
+ },
63
+ "relationship": {
64
+ "type": "string",
65
+ "enum": [
66
+ "primary",
67
+ "mirror",
68
+ "reference"
69
+ ]
70
+ }
71
+ }
72
+ },
73
+ "bridge": {
74
+ "type": "object",
75
+ "additionalProperties": false,
76
+ "properties": {
77
+ "legacy_idea_notes_enabled": {
78
+ "type": "boolean"
79
+ },
80
+ "legacy_idea_id": {
81
+ "type": "string"
82
+ },
83
+ "legacy_manifest_synced_at_utc": {
84
+ "type": "string",
85
+ "format": "date-time"
86
+ }
87
+ }
88
+ },
89
+ "state": {
90
+ "$ref": "#/$defs/current_state"
91
+ },
92
+ "latest_event": {
93
+ "$ref": "#/$defs/event_preview"
94
+ },
95
+ "metrics": {
96
+ "type": "object",
97
+ "additionalProperties": false,
98
+ "properties": {
99
+ "tab_count": {
100
+ "type": "integer",
101
+ "minimum": 0
102
+ },
103
+ "project_count": {
104
+ "type": "integer",
105
+ "minimum": 0
106
+ },
107
+ "codex_session_count": {
108
+ "type": "integer",
109
+ "minimum": 0
110
+ },
111
+ "tmux_session_count": {
112
+ "type": "integer",
113
+ "minimum": 0
114
+ }
115
+ }
116
+ },
117
+ "created_at_utc": {
118
+ "type": "string",
119
+ "format": "date-time"
120
+ },
121
+ "updated_at_utc": {
122
+ "type": "string",
123
+ "format": "date-time"
124
+ },
125
+ "last_opened_at_utc": {
126
+ "type": "string",
127
+ "format": "date-time"
128
+ },
129
+ "last_captured_at_utc": {
130
+ "type": "string",
131
+ "format": "date-time"
132
+ }
133
+ },
134
+ "$defs": {
135
+ "current_state": {
136
+ "type": "object",
137
+ "additionalProperties": false,
138
+ "required": [
139
+ "state_version",
140
+ "snapshot_id",
141
+ "updated_at_utc",
142
+ "tab_count",
143
+ "tabs"
144
+ ],
145
+ "properties": {
146
+ "state_version": {
147
+ "type": "integer",
148
+ "minimum": 1
149
+ },
150
+ "snapshot_id": {
151
+ "type": "string",
152
+ "minLength": 1
153
+ },
154
+ "summary": {
155
+ "type": "string"
156
+ },
157
+ "current_focus": {
158
+ "type": "string"
159
+ },
160
+ "trajectory": {
161
+ "type": "string"
162
+ },
163
+ "opened_at_utc": {
164
+ "type": "string",
165
+ "format": "date-time"
166
+ },
167
+ "captured_at_utc": {
168
+ "type": "string",
169
+ "format": "date-time"
170
+ },
171
+ "updated_at_utc": {
172
+ "type": "string",
173
+ "format": "date-time"
174
+ },
175
+ "tab_count": {
176
+ "type": "integer",
177
+ "minimum": 0
178
+ },
179
+ "capture_context": {
180
+ "$ref": "#/$defs/capture_context"
181
+ },
182
+ "tabs": {
183
+ "type": "array",
184
+ "items": {
185
+ "$ref": "#/$defs/tab"
186
+ }
187
+ }
188
+ }
189
+ },
190
+ "capture_context": {
191
+ "type": "object",
192
+ "additionalProperties": false,
193
+ "properties": {
194
+ "source_app": {
195
+ "type": "string"
196
+ },
197
+ "mode": {
198
+ "type": "string",
199
+ "enum": [
200
+ "snapshot",
201
+ "watch",
202
+ "sync",
203
+ "manual"
204
+ ]
205
+ },
206
+ "host": {
207
+ "type": "string"
208
+ },
209
+ "window_id": {
210
+ "type": "integer",
211
+ "minimum": 1
212
+ },
213
+ "window_index": {
214
+ "type": "integer",
215
+ "minimum": 1
216
+ },
217
+ "poll_seconds": {
218
+ "type": "number",
219
+ "exclusiveMinimum": 0
220
+ },
221
+ "terminal_frontend": {
222
+ "type": "string",
223
+ "enum": [
224
+ "iterm",
225
+ "terminal",
226
+ "unknown"
227
+ ]
228
+ },
229
+ "durable_backend": {
230
+ "type": "string",
231
+ "enum": [
232
+ "tmux",
233
+ "direct",
234
+ "unknown"
235
+ ]
236
+ }
237
+ }
238
+ },
239
+ "tab": {
240
+ "type": "object",
241
+ "additionalProperties": false,
242
+ "required": [
243
+ "tab_id",
244
+ "order_index",
245
+ "project_root",
246
+ "status"
247
+ ],
248
+ "properties": {
249
+ "tab_id": {
250
+ "type": "string",
251
+ "minLength": 1
252
+ },
253
+ "order_index": {
254
+ "type": "integer",
255
+ "minimum": 0
256
+ },
257
+ "title": {
258
+ "type": "string"
259
+ },
260
+ "project_root": {
261
+ "type": "string",
262
+ "pattern": "^/"
263
+ },
264
+ "repo_label": {
265
+ "type": "string"
266
+ },
267
+ "codex_session_id": {
268
+ "type": "string"
269
+ },
270
+ "tmux_session_name": {
271
+ "type": "string"
272
+ },
273
+ "terminal_title": {
274
+ "type": "string"
275
+ },
276
+ "status": {
277
+ "type": "string",
278
+ "enum": [
279
+ "active",
280
+ "removed",
281
+ "archived"
282
+ ]
283
+ },
284
+ "current_task": {
285
+ "type": "string"
286
+ },
287
+ "focus_summary": {
288
+ "type": "string"
289
+ },
290
+ "trajectory_summary": {
291
+ "type": "string"
292
+ },
293
+ "last_activity_at_utc": {
294
+ "type": "string",
295
+ "format": "date-time"
296
+ },
297
+ "linked_idea_id": {
298
+ "type": "string"
299
+ },
300
+ "linked_feature_id": {
301
+ "type": "string"
302
+ }
303
+ }
304
+ },
305
+ "event_preview": {
306
+ "type": "object",
307
+ "additionalProperties": false,
308
+ "required": [
309
+ "event_id",
310
+ "event_type",
311
+ "created_at_utc"
312
+ ],
313
+ "properties": {
314
+ "event_id": {
315
+ "type": "string",
316
+ "minLength": 1
317
+ },
318
+ "event_type": {
319
+ "type": "string",
320
+ "minLength": 1
321
+ },
322
+ "summary": {
323
+ "type": "string"
324
+ },
325
+ "created_at_utc": {
326
+ "type": "string",
327
+ "format": "date-time"
328
+ }
329
+ }
330
+ }
331
+ }
332
+ }
@@ -0,0 +1,108 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://orp.dev/spec/v1/workspace.schema.json",
4
+ "title": "ORP Workspace Manifest",
5
+ "description": "Structured workspace launcher manifest for ORP iTerm/tmux workspace restoration.",
6
+ "type": "object",
7
+ "required": ["version", "tabs"],
8
+ "properties": {
9
+ "version": {
10
+ "type": "string",
11
+ "const": "1"
12
+ },
13
+ "workspaceId": {
14
+ "type": "string",
15
+ "minLength": 1
16
+ },
17
+ "title": {
18
+ "type": "string",
19
+ "minLength": 1
20
+ },
21
+ "tmuxPrefix": {
22
+ "type": "string",
23
+ "minLength": 1
24
+ },
25
+ "capture": {
26
+ "type": "object",
27
+ "properties": {
28
+ "sourceApp": {
29
+ "type": "string",
30
+ "minLength": 1
31
+ },
32
+ "mode": {
33
+ "type": "string",
34
+ "enum": ["snapshot", "watch"]
35
+ },
36
+ "host": {
37
+ "type": "string",
38
+ "minLength": 1
39
+ },
40
+ "windowId": {
41
+ "type": "integer",
42
+ "minimum": 1
43
+ },
44
+ "windowIndex": {
45
+ "type": "integer",
46
+ "minimum": 1
47
+ },
48
+ "tabCount": {
49
+ "type": "integer",
50
+ "minimum": 0
51
+ },
52
+ "capturedAt": {
53
+ "type": "string",
54
+ "minLength": 1
55
+ },
56
+ "trackingStartedAt": {
57
+ "type": "string",
58
+ "minLength": 1
59
+ },
60
+ "pollSeconds": {
61
+ "type": "number",
62
+ "exclusiveMinimum": 0
63
+ }
64
+ },
65
+ "additionalProperties": false
66
+ },
67
+ "tabs": {
68
+ "type": "array",
69
+ "minItems": 1,
70
+ "items": {
71
+ "type": "object",
72
+ "required": ["path"],
73
+ "properties": {
74
+ "title": {
75
+ "type": "string",
76
+ "minLength": 1
77
+ },
78
+ "path": {
79
+ "type": "string",
80
+ "pattern": "^/"
81
+ },
82
+ "resumeCommand": {
83
+ "type": "string",
84
+ "minLength": 1
85
+ },
86
+ "resumeTool": {
87
+ "type": "string",
88
+ "enum": ["codex", "claude"]
89
+ },
90
+ "resumeSessionId": {
91
+ "type": "string",
92
+ "minLength": 1
93
+ },
94
+ "codexSessionId": {
95
+ "type": "string",
96
+ "minLength": 1
97
+ },
98
+ "tmuxSessionName": {
99
+ "type": "string",
100
+ "minLength": 1
101
+ }
102
+ },
103
+ "additionalProperties": false
104
+ }
105
+ }
106
+ },
107
+ "additionalProperties": false
108
+ }