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.
- package/AGENT_INTEGRATION.md +50 -0
- package/README.md +273 -144
- package/bin/orp.js +14 -1
- package/cli/orp.py +14846 -9925
- package/docs/AGENT_LOOP.md +13 -0
- package/docs/AGENT_MODES.md +79 -0
- package/docs/CANONICAL_CLI_BOUNDARY.md +15 -0
- package/docs/EXCHANGE.md +94 -0
- package/docs/LAUNCH_KIT.md +107 -0
- package/docs/ORP_HOSTED_WORKSPACE_CONTRACT.md +295 -0
- package/docs/ORP_PUBLIC_LAUNCH_CHECKLIST.md +5 -0
- package/docs/START_HERE.md +567 -0
- package/package.json +5 -2
- package/packages/lifeops-orp/README.md +67 -0
- package/packages/lifeops-orp/package.json +48 -0
- package/packages/lifeops-orp/src/index.d.ts +106 -0
- package/packages/lifeops-orp/src/index.js +7 -0
- package/packages/lifeops-orp/src/mapping.js +309 -0
- package/packages/lifeops-orp/src/workspace.js +108 -0
- package/packages/lifeops-orp/test/orp.test.js +187 -0
- package/packages/orp-workspace-launcher/README.md +82 -0
- package/packages/orp-workspace-launcher/package.json +39 -0
- package/packages/orp-workspace-launcher/src/commands.js +77 -0
- package/packages/orp-workspace-launcher/src/core-plan.js +506 -0
- package/packages/orp-workspace-launcher/src/hosted-state.js +208 -0
- package/packages/orp-workspace-launcher/src/index.js +82 -0
- package/packages/orp-workspace-launcher/src/ledger.js +745 -0
- package/packages/orp-workspace-launcher/src/list.js +488 -0
- package/packages/orp-workspace-launcher/src/orp-command.js +126 -0
- package/packages/orp-workspace-launcher/src/orp.js +912 -0
- package/packages/orp-workspace-launcher/src/registry.js +558 -0
- package/packages/orp-workspace-launcher/src/slot.js +188 -0
- package/packages/orp-workspace-launcher/src/sync.js +363 -0
- package/packages/orp-workspace-launcher/src/tabs.js +166 -0
- package/packages/orp-workspace-launcher/test/commands.test.js +164 -0
- package/packages/orp-workspace-launcher/test/core-plan.test.js +253 -0
- package/packages/orp-workspace-launcher/test/fixtures/smoke-notes.txt +2 -0
- package/packages/orp-workspace-launcher/test/fixtures/workspace-manifest.json +17 -0
- package/packages/orp-workspace-launcher/test/ledger.test.js +244 -0
- package/packages/orp-workspace-launcher/test/list.test.js +299 -0
- package/packages/orp-workspace-launcher/test/orp-command.test.js +44 -0
- package/packages/orp-workspace-launcher/test/orp.test.js +224 -0
- package/packages/orp-workspace-launcher/test/tabs.test.js +168 -0
- package/scripts/orp-kernel-agent-pilot.py +10 -1
- package/scripts/orp-kernel-agent-replication.py +10 -1
- package/scripts/orp-kernel-canonical-continuation.py +10 -1
- package/scripts/orp-kernel-continuation-pilot.py +10 -1
- package/scripts/render-terminal-demo.py +416 -0
- package/spec/v1/exchange-report.schema.json +105 -0
- package/spec/v1/hosted-workspace-event.schema.json +102 -0
- package/spec/v1/hosted-workspace.schema.json +332 -0
- package/spec/v1/workspace.schema.json +108 -0
package/docs/AGENT_LOOP.md
CHANGED
|
@@ -6,6 +6,10 @@ Use this loop when an AI agent is the primary operator of an ORP-enabled repo.
|
|
|
6
6
|
|
|
7
7
|
- Read `llms.txt`.
|
|
8
8
|
- Run `orp about --json`.
|
|
9
|
+
- If the task benefits from fresh concepting, tasteful interface work, or
|
|
10
|
+
exploratory reframing, run:
|
|
11
|
+
- `orp mode nudge sleek-minimal-progressive --json`
|
|
12
|
+
- Treat it as an optional lens for deeper, wider, top-down, or rotated perspective shifts.
|
|
9
13
|
- If packs matter, run `orp pack list --json`.
|
|
10
14
|
- Read `PROTOCOL.md` before making claims.
|
|
11
15
|
- If the task is external OSS contribution workflow or PR governance, read
|
|
@@ -16,6 +20,13 @@ Use this loop when an AI agent is the primary operator of an ORP-enabled repo.
|
|
|
16
20
|
## 2. Select Work
|
|
17
21
|
|
|
18
22
|
- Identify the target profile and canonical artifact paths.
|
|
23
|
+
- If the task needs an API key or token that is not already available, save it first:
|
|
24
|
+
- human interactive path:
|
|
25
|
+
- `orp secrets add --alias <alias> --label "<label>" --provider <provider>`
|
|
26
|
+
- agent/script path:
|
|
27
|
+
- `printf '%s' '<secret>' | orp secrets add --alias <alias> --label "<label>" --provider <provider> --value-stdin`
|
|
28
|
+
- convenience path:
|
|
29
|
+
- `orp secrets ensure --alias <alias> --provider <provider> --current-project --json`
|
|
19
30
|
- If a pack-backed workflow needs setup, run:
|
|
20
31
|
- `orp pack install --pack-id <pack-id> --json`
|
|
21
32
|
- or `orp pack fetch --source <git-url> --pack-id <pack-id> --install-target . --json`
|
|
@@ -24,6 +35,8 @@ Use this loop when an AI agent is the primary operator of an ORP-enabled repo.
|
|
|
24
35
|
- If the task begins from a public YouTube link, normalize it first:
|
|
25
36
|
- `orp youtube inspect <youtube-url> --json`
|
|
26
37
|
- or `orp youtube inspect <youtube-url> --save --json` when the source artifact should stay with the repo
|
|
38
|
+
- If the task depends on understanding another local repo or project directory deeply, synthesize it first:
|
|
39
|
+
- `orp exchange repo synthesize /path/to/source --json`
|
|
27
40
|
|
|
28
41
|
## 3. Run
|
|
29
42
|
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# ORP Agent Modes
|
|
2
|
+
|
|
3
|
+
ORP agent modes are lightweight cognitive overlays.
|
|
4
|
+
|
|
5
|
+
They do not change ORP's evidence boundary, artifact model, or canonical
|
|
6
|
+
workflow surfaces. They exist to help an agent adjust taste and exploratory
|
|
7
|
+
behavior intentionally.
|
|
8
|
+
|
|
9
|
+
They are optional.
|
|
10
|
+
|
|
11
|
+
Think of them as paint colors or lenses an agent or user can pick up when the
|
|
12
|
+
work needs a different feel or perspective. They should not feel forced,
|
|
13
|
+
contrived, or permanently switched on.
|
|
14
|
+
|
|
15
|
+
## Built-In Modes
|
|
16
|
+
|
|
17
|
+
### `sleek-minimal-progressive`
|
|
18
|
+
|
|
19
|
+
Purpose:
|
|
20
|
+
|
|
21
|
+
- keep outputs clean without becoming generic
|
|
22
|
+
- create fresh movement when a project feels flat or trapped
|
|
23
|
+
- help the operator dive deeper, step back top-down, zoom wider, or rotate the angle
|
|
24
|
+
- preserve one surprising move long enough to evaluate it
|
|
25
|
+
- bias toward momentum and graceful next steps
|
|
26
|
+
|
|
27
|
+
Recommended commands:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
orp mode list --json
|
|
31
|
+
orp mode show sleek-minimal-progressive --json
|
|
32
|
+
orp mode nudge sleek-minimal-progressive --json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Operational idea:
|
|
36
|
+
|
|
37
|
+
- `list` tells the agent what modes exist
|
|
38
|
+
- `show` returns the full reminder, ritual, questions, and anti-patterns
|
|
39
|
+
- `nudge` returns one deterministic creativity card that can be used as a
|
|
40
|
+
short-lived prompt overlay for the next drafting or design pass
|
|
41
|
+
|
|
42
|
+
The `nudge` surface is intentionally small. It should create motion and taste,
|
|
43
|
+
not replace the main task or force novelty for its own sake.
|
|
44
|
+
|
|
45
|
+
Use this mode when:
|
|
46
|
+
|
|
47
|
+
- the work feels stuck in one framing
|
|
48
|
+
- a solution is serviceable but not alive
|
|
49
|
+
- you need a deliberate perspective shift
|
|
50
|
+
- you want to invite a bit more play without losing structure
|
|
51
|
+
|
|
52
|
+
### `ruthless-simplification`
|
|
53
|
+
|
|
54
|
+
Use this when the work is swollen, muddy, or overloaded. It is the "cut to the
|
|
55
|
+
live core" mode.
|
|
56
|
+
|
|
57
|
+
- collapse branches
|
|
58
|
+
- remove ornamental complexity
|
|
59
|
+
- find the shortest honest shape
|
|
60
|
+
- recover momentum through clarity
|
|
61
|
+
|
|
62
|
+
### `systems-constellation`
|
|
63
|
+
|
|
64
|
+
Use this when the local move is probably part of a larger field of constraints,
|
|
65
|
+
dependencies, and downstream effects.
|
|
66
|
+
|
|
67
|
+
- step back top-down
|
|
68
|
+
- inspect upstream and downstream impacts
|
|
69
|
+
- think in loops and time horizons
|
|
70
|
+
- choose the system move, not just the local patch
|
|
71
|
+
|
|
72
|
+
### `bold-concept-generation`
|
|
73
|
+
|
|
74
|
+
Use this when the work needs bigger options before it needs tighter polish.
|
|
75
|
+
|
|
76
|
+
- generate stronger conceptual directions
|
|
77
|
+
- import principles from other domains
|
|
78
|
+
- keep one unreasonable idea alive long enough to inspect it
|
|
79
|
+
- prune only after a genuinely bold pass exists
|
|
@@ -136,6 +136,7 @@ Commands:
|
|
|
136
136
|
|
|
137
137
|
- `orp auth ...`
|
|
138
138
|
- `orp ideas ...`
|
|
139
|
+
- `orp workspaces ...` (first-class hosted workspace records)
|
|
139
140
|
- `orp feature ...`
|
|
140
141
|
- `orp world ...`
|
|
141
142
|
- `orp checkpoint ...`
|
|
@@ -146,10 +147,24 @@ This is the canonical client for:
|
|
|
146
147
|
|
|
147
148
|
- hosted auth/session state
|
|
148
149
|
- idea and world binding
|
|
150
|
+
- hosted workspace list/detail/timeline/state update semantics
|
|
149
151
|
- checkpoint queueing
|
|
150
152
|
- runner polling/SSE wake-up
|
|
151
153
|
- lease/claim/start/complete/cancel/retry behavior
|
|
152
154
|
|
|
155
|
+
Current bridge:
|
|
156
|
+
|
|
157
|
+
- `orp workspace sync ...` may still mirror local workspace state into linked
|
|
158
|
+
idea notes for compatibility.
|
|
159
|
+
|
|
160
|
+
Canonical target:
|
|
161
|
+
|
|
162
|
+
- hosted workspace records are first-class and are not defined by idea notes
|
|
163
|
+
- the exact contract lives in:
|
|
164
|
+
- `spec/v1/hosted-workspace.schema.json`
|
|
165
|
+
- `spec/v1/hosted-workspace-event.schema.json`
|
|
166
|
+
- `docs/ORP_HOSTED_WORKSPACE_CONTRACT.md`
|
|
167
|
+
|
|
153
168
|
### 5. Reasoning Kernel
|
|
154
169
|
|
|
155
170
|
Commands:
|
package/docs/EXCHANGE.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# ORP Knowledge Exchange
|
|
2
|
+
|
|
3
|
+
`orp exchange repo synthesize` is ORP's deeper repository-synthesis surface.
|
|
4
|
+
|
|
5
|
+
It is different from `orp discover`:
|
|
6
|
+
|
|
7
|
+
- `discover` is breadth-first scanning and ranking
|
|
8
|
+
- `exchange` is depth-first synthesis and transfer mapping
|
|
9
|
+
|
|
10
|
+
The goal is to turn another codebase or project directory into structured
|
|
11
|
+
knowledge you can reuse inside the current repo.
|
|
12
|
+
|
|
13
|
+
## Why this exists
|
|
14
|
+
|
|
15
|
+
Agents and humans often do not just need to *find* promising repositories.
|
|
16
|
+
They need to understand:
|
|
17
|
+
|
|
18
|
+
- what a source repo is really doing
|
|
19
|
+
- how it is organized
|
|
20
|
+
- what patterns are reusable
|
|
21
|
+
- what its workflows imply
|
|
22
|
+
- and how it can help the current project
|
|
23
|
+
|
|
24
|
+
That calls for a more harnessed, repo-native artifact flow than a default scan.
|
|
25
|
+
|
|
26
|
+
## Command
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
orp exchange repo synthesize /path/to/source --json
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
If the source is a plain local directory and you want ORP to bootstrap git
|
|
33
|
+
tracking there first:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
orp exchange repo synthesize /path/to/source --allow-git-init --json
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Remote git references are also accepted:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
orp exchange repo synthesize owner/repo --json
|
|
43
|
+
orp exchange repo synthesize https://github.com/owner/repo.git --json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Source modes
|
|
47
|
+
|
|
48
|
+
ORP currently supports:
|
|
49
|
+
|
|
50
|
+
- `local_git`
|
|
51
|
+
- `local_directory`
|
|
52
|
+
- `remote_git`
|
|
53
|
+
|
|
54
|
+
For local non-git directories, ORP will only mutate the source when
|
|
55
|
+
`--allow-git-init` is explicitly provided.
|
|
56
|
+
|
|
57
|
+
## Artifacts
|
|
58
|
+
|
|
59
|
+
Each exchange run writes:
|
|
60
|
+
|
|
61
|
+
- `orp/exchange/<exchange_id>/EXCHANGE.json`
|
|
62
|
+
- `orp/exchange/<exchange_id>/EXCHANGE_SUMMARY.md`
|
|
63
|
+
- `orp/exchange/<exchange_id>/TRANSFER_MAP.md`
|
|
64
|
+
|
|
65
|
+
These artifacts are synthesis aids, not evidence by themselves.
|
|
66
|
+
|
|
67
|
+
## What the exchange focuses on
|
|
68
|
+
|
|
69
|
+
The first slice is intentionally structured around:
|
|
70
|
+
|
|
71
|
+
- source identity and mode
|
|
72
|
+
- inventory of docs, tests, manifests, and languages
|
|
73
|
+
- relationship to the current project
|
|
74
|
+
- shared languages / manifests / top-level structure
|
|
75
|
+
- suggested focus areas for deeper human or agent analysis
|
|
76
|
+
- transfer mapping and project momentum
|
|
77
|
+
|
|
78
|
+
The aim is to answer:
|
|
79
|
+
|
|
80
|
+
- what does this repo know?
|
|
81
|
+
- how is it organized?
|
|
82
|
+
- what can transfer?
|
|
83
|
+
- how does it help us right now?
|
|
84
|
+
|
|
85
|
+
not just:
|
|
86
|
+
|
|
87
|
+
- what tasks should we do next?
|
|
88
|
+
|
|
89
|
+
## Important boundary
|
|
90
|
+
|
|
91
|
+
Knowledge exchange artifacts are process artifacts.
|
|
92
|
+
|
|
93
|
+
They help ORP structure understanding and transfer, but they do not replace
|
|
94
|
+
canonical evidence in the source or host repository.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Launch Kit
|
|
2
|
+
|
|
3
|
+
## Positioning
|
|
4
|
+
|
|
5
|
+
Short version:
|
|
6
|
+
- ORP is an agent-first CLI for research workflows, workspace ledgers, secrets, scheduling, and governed execution.
|
|
7
|
+
|
|
8
|
+
Medium version:
|
|
9
|
+
- ORP is a unified CLI surface for turning a project directory into a reusable agent-friendly operating environment: hosted auth, local governance, saved workspaces, scheduled Codex jobs, secrets, packets, reports, and more.
|
|
10
|
+
|
|
11
|
+
Long version:
|
|
12
|
+
- ORP is meant to feel like one tool that helps operators and agents move from "what am I working on?" to "recover the workspace ledger, resolve the right key, run the next loop, checkpoint the state, and keep the workflow honest." It supports both hosted control-plane flows and local-first repo governance without forcing the user to stitch together a pile of unrelated scripts.
|
|
13
|
+
|
|
14
|
+
Demo/marketing rule:
|
|
15
|
+
- Public demos and launch materials should use the same human-facing command output ORP actually prints. Do not paraphrase command results into friendlier invented summaries.
|
|
16
|
+
|
|
17
|
+
## Launch Copy
|
|
18
|
+
|
|
19
|
+
### One-liner
|
|
20
|
+
- Agent-first CLI for research workflows, saved workspaces, secrets, and governed execution.
|
|
21
|
+
|
|
22
|
+
### Short post
|
|
23
|
+
- I just shipped `open-research-protocol`, an agent-first CLI for research workflows, saved workspaces, secrets, scheduled Codex jobs, and governed project execution. It is designed to make the local desk and the hosted control plane feel like one surface. Install with `npm install -g open-research-protocol`. GitHub: https://github.com/SproutSeeds/orp
|
|
24
|
+
|
|
25
|
+
### Longer post
|
|
26
|
+
- I just shipped `open-research-protocol`, a unified CLI for agent-first research and research-like engineering. ORP can keep a hosted workspace ledger synced, manage a hosted secret inventory with optional local Keychain sync, schedule recurring Codex jobs, and still expose the local governance loop for checkpoints, packets, reports, and readiness. The goal is not just "more commands"; it is one coherent operator surface that agents can discover and use without losing track of boundaries.
|
|
27
|
+
|
|
28
|
+
## Demo Flow
|
|
29
|
+
|
|
30
|
+
Primary demo flow:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install -g open-research-protocol
|
|
34
|
+
orp home
|
|
35
|
+
orp workspaces list
|
|
36
|
+
orp auth login
|
|
37
|
+
orp secrets add --alias openai-primary --label "OpenAI Primary" --provider openai
|
|
38
|
+
orp workspace tabs main
|
|
39
|
+
orp schedule add codex --name morning-summary --prompt "Summarize this repo"
|
|
40
|
+
orp checkpoint create -m "capture loop state"
|
|
41
|
+
orp frontier state
|
|
42
|
+
orp exchange repo synthesize /path/to/source
|
|
43
|
+
orp mode nudge sleek-minimal-progressive
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Focused workspace demo:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
orp workspace list
|
|
50
|
+
orp workspace tabs main
|
|
51
|
+
orp workspace tabs main
|
|
52
|
+
orp workspace add-tab main --path /absolute/path/to/project --resume-command "codex resume <id>"
|
|
53
|
+
orp workspace sync main
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Focused secrets demo:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
orp auth login
|
|
60
|
+
orp secrets add --alias openai-primary --label "OpenAI Primary" --provider openai
|
|
61
|
+
orp secrets list --json
|
|
62
|
+
orp secrets sync-keychain openai-primary --json
|
|
63
|
+
orp secrets resolve openai-primary --reveal --local-first --json
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## What To Emphasize
|
|
67
|
+
|
|
68
|
+
- One CLI surface instead of a scattered bag of scripts.
|
|
69
|
+
- Strong workspace recovery with `workspace tabs main`.
|
|
70
|
+
- Interactive secret save for humans, stdin-based save for agents, plus optional local Keychain sync.
|
|
71
|
+
- Scheduled Codex work without making the operator wire raw cron jobs.
|
|
72
|
+
- Agent-readable discovery surfaces like `orp home --json` and `orp about --json`.
|
|
73
|
+
|
|
74
|
+
## GitHub Presentation Notes
|
|
75
|
+
|
|
76
|
+
Recommended repo tagline:
|
|
77
|
+
- Agent-first CLI for research workflows, saved workspaces, secrets, and governed execution.
|
|
78
|
+
|
|
79
|
+
Recommended demo assets:
|
|
80
|
+
- animated terminal demo: `assets/terminal-demo.gif`
|
|
81
|
+
- poster frame: `assets/terminal-demo-poster.png`
|
|
82
|
+
- storyboard grid: `assets/terminal-demo-storyboard.png`
|
|
83
|
+
- per-scene posters:
|
|
84
|
+
- `assets/terminal-scene-01-home.png`
|
|
85
|
+
- `assets/terminal-scene-02-hosted.png`
|
|
86
|
+
- `assets/terminal-scene-03-secrets.png`
|
|
87
|
+
- `assets/terminal-scene-04-workspace.png`
|
|
88
|
+
- `assets/terminal-scene-05-schedule.png`
|
|
89
|
+
- `assets/terminal-scene-06-governance.png`
|
|
90
|
+
- `assets/terminal-scene-07-planning.png`
|
|
91
|
+
- `assets/terminal-scene-08-synthesis.png`
|
|
92
|
+
- `assets/terminal-scene-09-mode.png`
|
|
93
|
+
|
|
94
|
+
## npm Presentation Notes
|
|
95
|
+
|
|
96
|
+
- Keep the README lead readable.
|
|
97
|
+
- Show the terminal demo GIF near the top.
|
|
98
|
+
- Use the demo flow to make the command families concrete quickly.
|
|
99
|
+
- Prefer the workspace + secrets story over listing every possible ORP surface at once.
|
|
100
|
+
|
|
101
|
+
## Maintainer Notes
|
|
102
|
+
|
|
103
|
+
Regenerate the terminal demo assets with:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
npm run render:terminal-demo
|
|
107
|
+
```
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
# ORP Hosted Workspace Contract
|
|
2
|
+
|
|
3
|
+
This document defines the first-class hosted workspace model that should
|
|
4
|
+
replace the current "workspace JSON embedded inside idea notes" bridge.
|
|
5
|
+
|
|
6
|
+
## Status
|
|
7
|
+
|
|
8
|
+
The current implementation in this repo is still bridge-first:
|
|
9
|
+
|
|
10
|
+
- local workspace state can live in a local workspace manifest JSON file
|
|
11
|
+
- hosted workspace state is mirrored into an idea's `notes` field via
|
|
12
|
+
the fenced ` ```orp-workspace ` block
|
|
13
|
+
- `orp workspace tabs/add-tab/remove-tab/sync` currently read or update that bridge
|
|
14
|
+
|
|
15
|
+
This document and the accompanying schemas define the next exact contract so
|
|
16
|
+
the web app, hosted backend, and CLI can converge on one durable source of
|
|
17
|
+
truth.
|
|
18
|
+
|
|
19
|
+
## Canonical Source Of Truth
|
|
20
|
+
|
|
21
|
+
The canonical hosted source of truth should be one hosted workspace record:
|
|
22
|
+
|
|
23
|
+
- schema: `spec/v1/hosted-workspace.schema.json`
|
|
24
|
+
- stable id: `workspace_id`
|
|
25
|
+
- one current state object
|
|
26
|
+
- one activity timeline made of workspace events
|
|
27
|
+
|
|
28
|
+
Idea notes are a compatibility bridge only after this contract lands.
|
|
29
|
+
|
|
30
|
+
## Resource Model
|
|
31
|
+
|
|
32
|
+
### Hosted Workspace
|
|
33
|
+
|
|
34
|
+
One hosted workspace record owns:
|
|
35
|
+
|
|
36
|
+
- `workspace_id`
|
|
37
|
+
- `title`
|
|
38
|
+
- `description`
|
|
39
|
+
- `visibility`
|
|
40
|
+
- `linked_idea`
|
|
41
|
+
- `state`
|
|
42
|
+
- `latest_event`
|
|
43
|
+
- `metrics`
|
|
44
|
+
|
|
45
|
+
The important invariant is:
|
|
46
|
+
|
|
47
|
+
- `state` is the thing ORP opens locally
|
|
48
|
+
- the timeline explains how that state changed over time
|
|
49
|
+
|
|
50
|
+
### Current State
|
|
51
|
+
|
|
52
|
+
`state` is the exact recoverable workspace ledger shape:
|
|
53
|
+
|
|
54
|
+
- current tab order
|
|
55
|
+
- repo/project roots
|
|
56
|
+
- saved `codex resume ...` or `claude --resume ...` commands
|
|
57
|
+
- current focus
|
|
58
|
+
- current trajectory
|
|
59
|
+
- ledger metadata such as host, notes bridge status, and last sync origin
|
|
60
|
+
|
|
61
|
+
### Timeline Events
|
|
62
|
+
|
|
63
|
+
Events are append-only and explain why the current state changed:
|
|
64
|
+
|
|
65
|
+
- workspace created
|
|
66
|
+
- ledger viewed
|
|
67
|
+
- tab added/removed/updated
|
|
68
|
+
- focus summary updated
|
|
69
|
+
- trajectory summary updated
|
|
70
|
+
- bridge synced back to an idea
|
|
71
|
+
|
|
72
|
+
Schema:
|
|
73
|
+
|
|
74
|
+
- `spec/v1/hosted-workspace-event.schema.json`
|
|
75
|
+
|
|
76
|
+
## CLI Contract
|
|
77
|
+
|
|
78
|
+
To avoid colliding with the existing local launcher surface under
|
|
79
|
+
`orp workspace ...`, the hosted first-class resource should live under:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
orp workspaces ...
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Hosted Workspace Commands
|
|
86
|
+
|
|
87
|
+
List hosted workspaces:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
orp workspaces list [--json]
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Show one hosted workspace:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
orp workspaces show <workspace-id> [--json]
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Create one hosted workspace:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
orp workspaces add --title "ORP Main" [--idea-id <idea-id>] [--json]
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Update one hosted workspace:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
orp workspaces update <workspace-id> [--title <title>] [--description <text>] [--visibility <visibility>] [--json]
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Show just the current tabs for one hosted workspace:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
orp workspaces tabs <workspace-id> [--json]
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Show the hosted timeline:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
orp workspaces timeline <workspace-id> [--limit <n>] [--json]
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Append a new hosted snapshot/state push:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
orp workspaces push-state <workspace-id> --state-file <path> [--json]
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Append an agent/user event:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
orp workspaces add-event <workspace-id> --event-file <path> [--json]
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Local Ledger Bridge Contract
|
|
136
|
+
|
|
137
|
+
The existing local workspace surface should evolve like this:
|
|
138
|
+
|
|
139
|
+
Inspect the hosted workspace ledger through the local operator surface:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
orp workspace tabs --hosted-workspace-id <workspace-id>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Append or remove ledger entries directly:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
orp workspace add-tab --hosted-workspace-id <workspace-id> --path /absolute/path/to/project --resume-command "codex resume <id>"
|
|
149
|
+
orp workspace remove-tab --hosted-workspace-id <workspace-id> --path /absolute/path/to/project
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Compatibility bridge back to the linked idea when needed:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
orp workspace sync <idea-id> --workspace-file ./workspace.json
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
The long-term rule is:
|
|
159
|
+
|
|
160
|
+
- `orp workspace ...` remains the local operator surface for editing and inspecting the workspace ledger
|
|
161
|
+
- `orp workspaces ...` becomes the hosted source-of-truth surface
|
|
162
|
+
|
|
163
|
+
## Hosted API Contract
|
|
164
|
+
|
|
165
|
+
The hosted backend should expose these CLI-facing routes:
|
|
166
|
+
|
|
167
|
+
```text
|
|
168
|
+
GET /api/cli/workspaces
|
|
169
|
+
POST /api/cli/workspaces
|
|
170
|
+
GET /api/cli/workspaces/:workspaceId
|
|
171
|
+
PATCH /api/cli/workspaces/:workspaceId
|
|
172
|
+
GET /api/cli/workspaces/:workspaceId/tabs
|
|
173
|
+
GET /api/cli/workspaces/:workspaceId/timeline
|
|
174
|
+
POST /api/cli/workspaces/:workspaceId/state
|
|
175
|
+
POST /api/cli/workspaces/:workspaceId/events
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### GET /api/cli/workspaces
|
|
179
|
+
|
|
180
|
+
Returns a list view for the web app dropdown and agent discovery:
|
|
181
|
+
|
|
182
|
+
- `workspace_id`
|
|
183
|
+
- `title`
|
|
184
|
+
- `linked_idea`
|
|
185
|
+
- `metrics`
|
|
186
|
+
- `updated_at_utc`
|
|
187
|
+
- `latest_event`
|
|
188
|
+
|
|
189
|
+
### GET /api/cli/workspaces/:workspaceId
|
|
190
|
+
|
|
191
|
+
Returns the full hosted workspace record conforming to:
|
|
192
|
+
|
|
193
|
+
- `spec/v1/hosted-workspace.schema.json`
|
|
194
|
+
|
|
195
|
+
### GET /api/cli/workspaces/:workspaceId/tabs
|
|
196
|
+
|
|
197
|
+
Returns a thin projection of the current state for lightweight inspection:
|
|
198
|
+
|
|
199
|
+
- current ordered tabs
|
|
200
|
+
- path/project root
|
|
201
|
+
- saved resume command or structured resume metadata
|
|
202
|
+
- focus/trajectory excerpts
|
|
203
|
+
|
|
204
|
+
### GET /api/cli/workspaces/:workspaceId/timeline
|
|
205
|
+
|
|
206
|
+
Returns newest-first hosted workspace events conforming to:
|
|
207
|
+
|
|
208
|
+
- `spec/v1/hosted-workspace-event.schema.json`
|
|
209
|
+
|
|
210
|
+
### POST /api/cli/workspaces/:workspaceId/state
|
|
211
|
+
|
|
212
|
+
Accepts a new current-state payload and:
|
|
213
|
+
|
|
214
|
+
- validates the incoming state
|
|
215
|
+
- increments `state.state_version`
|
|
216
|
+
- updates `updated_at_utc`
|
|
217
|
+
- appends a `snapshot.created` event
|
|
218
|
+
|
|
219
|
+
### POST /api/cli/workspaces/:workspaceId/events
|
|
220
|
+
|
|
221
|
+
Accepts one explicit event payload and appends it to the timeline.
|
|
222
|
+
|
|
223
|
+
## Web App Contract
|
|
224
|
+
|
|
225
|
+
The web app should surface hosted workspaces as a first-class screen.
|
|
226
|
+
|
|
227
|
+
### Workspace List Screen
|
|
228
|
+
|
|
229
|
+
The list screen should show:
|
|
230
|
+
|
|
231
|
+
- workspace title
|
|
232
|
+
- linked idea title
|
|
233
|
+
- tab count
|
|
234
|
+
- project count
|
|
235
|
+
- current focus
|
|
236
|
+
- last updated timestamp
|
|
237
|
+
- latest event summary
|
|
238
|
+
|
|
239
|
+
This is the dropdown/picker surface the user asked for.
|
|
240
|
+
|
|
241
|
+
### Workspace Detail Screen
|
|
242
|
+
|
|
243
|
+
The detail page should show:
|
|
244
|
+
|
|
245
|
+
- workspace header and linked idea
|
|
246
|
+
- current summary / focus / trajectory
|
|
247
|
+
- ordered tabs with repo roots and session ids
|
|
248
|
+
- per-tab focus summary
|
|
249
|
+
- per-tab trajectory summary
|
|
250
|
+
- current task per tab/project
|
|
251
|
+
- timeline of state changes over time
|
|
252
|
+
|
|
253
|
+
### Timeline
|
|
254
|
+
|
|
255
|
+
The timeline should make it easy to answer:
|
|
256
|
+
|
|
257
|
+
- what changed
|
|
258
|
+
- when it changed
|
|
259
|
+
- whether a tab was added or removed
|
|
260
|
+
- what the agent says is being worked on now
|
|
261
|
+
- where the work appears to be heading
|
|
262
|
+
|
|
263
|
+
## Agent Write Contract
|
|
264
|
+
|
|
265
|
+
Agents should be allowed to update structured workspace state rather than only
|
|
266
|
+
free-form notes.
|
|
267
|
+
|
|
268
|
+
The minimum agent-owned fields are:
|
|
269
|
+
|
|
270
|
+
- workspace-level `state.summary`
|
|
271
|
+
- workspace-level `state.current_focus`
|
|
272
|
+
- workspace-level `state.trajectory`
|
|
273
|
+
- per-tab `current_task`
|
|
274
|
+
- per-tab `focus_summary`
|
|
275
|
+
- per-tab `trajectory_summary`
|
|
276
|
+
|
|
277
|
+
Agents should also append explicit timeline events when they make meaningful
|
|
278
|
+
updates so the hosted detail page remains explainable instead of silently
|
|
279
|
+
mutating.
|
|
280
|
+
|
|
281
|
+
## Migration Rule
|
|
282
|
+
|
|
283
|
+
Migration should happen in this order:
|
|
284
|
+
|
|
285
|
+
1. create hosted workspace records linked to existing ideas
|
|
286
|
+
2. copy the current ` ```orp-workspace ` block into `state`
|
|
287
|
+
3. keep mirroring back into idea notes temporarily
|
|
288
|
+
4. update the local launcher to prefer `--hosted-workspace-id`
|
|
289
|
+
5. make idea-note mirroring optional and eventually secondary
|
|
290
|
+
|
|
291
|
+
## Non-Negotiable Rule
|
|
292
|
+
|
|
293
|
+
After the hosted workspace model lands, the web app should never invent a
|
|
294
|
+
different workspace state shape from the CLI contract. The CLI contract and
|
|
295
|
+
these schemas remain authoritative.
|
|
@@ -16,6 +16,7 @@ Use this checklist when releasing ORP as the unified public CLI and product surf
|
|
|
16
16
|
- `bash scripts/orp-release-smoke.sh --hosted --codex-session-id <session-id>`
|
|
17
17
|
- `npm i -g open-research-protocol`
|
|
18
18
|
- `orp -h`
|
|
19
|
+
- `orp workspace -h`
|
|
19
20
|
- `orp init`
|
|
20
21
|
- `orp status --json`
|
|
21
22
|
- `orp branch start work/bootstrap --allow-dirty --json`
|
|
@@ -28,6 +29,7 @@ Use this checklist when releasing ORP as the unified public CLI and product surf
|
|
|
28
29
|
- `orp auth login`
|
|
29
30
|
- `orp whoami --json`
|
|
30
31
|
- `orp ideas list --json`
|
|
32
|
+
- `orp workspace tabs main`
|
|
31
33
|
|
|
32
34
|
## 2. Hosted workspace readiness
|
|
33
35
|
|
|
@@ -53,6 +55,8 @@ Use this checklist when releasing ORP as the unified public CLI and product surf
|
|
|
53
55
|
|
|
54
56
|
## 4. Package release
|
|
55
57
|
|
|
58
|
+
- Refresh launch assets:
|
|
59
|
+
- `npm run render:terminal-demo`
|
|
56
60
|
- Bump `package.json` version.
|
|
57
61
|
- Commit and push `main`.
|
|
58
62
|
- Expect `npm publish` to fail if the worktree is dirty or the release commit is not already on GitHub.
|
|
@@ -75,6 +79,7 @@ Use this checklist when releasing ORP as the unified public CLI and product surf
|
|
|
75
79
|
- `npm view open-research-protocol version`
|
|
76
80
|
- `npm i -g open-research-protocol`
|
|
77
81
|
- `orp -h`
|
|
82
|
+
- confirm README renders the terminal demo GIF on GitHub and npm
|
|
78
83
|
- `orp init`
|
|
79
84
|
- `orp status --json`
|
|
80
85
|
- `orp about --json`
|