open-research-protocol 0.4.11 → 0.4.12
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/README.md +3 -0
- package/bin/orp-compute.mjs +82 -9
- package/package.json +2 -2
- package/scripts/orp-kernel-benchmark.py +1 -1
package/README.md
CHANGED
|
@@ -147,7 +147,9 @@ orp pack fetch --source <git-url> --pack-id <pack-id> --install-target . --json
|
|
|
147
147
|
orp gate run --profile default --json
|
|
148
148
|
orp packet emit --profile default --json
|
|
149
149
|
orp compute decide --input orp.compute.json --json
|
|
150
|
+
orp compute decide --project-map orp.compute-map.json --point-id adult-vs-developmental-rgc-opponent --json
|
|
150
151
|
orp compute run-local --input orp.compute.json --task orp.compute.task.json --json
|
|
152
|
+
orp compute run-local --project-map orp.compute-map.json --point-id adult-vs-developmental-rgc-opponent --task orp.compute.task.json --json
|
|
151
153
|
orp report summary --json
|
|
152
154
|
```
|
|
153
155
|
|
|
@@ -157,6 +159,7 @@ These surfaces are meant to help automated systems discover ORP quickly:
|
|
|
157
159
|
- `orp home --json` returns the same landing context in machine-readable form
|
|
158
160
|
- `orp auth ...`, `orp ideas ...`, `orp world ...`, `orp checkpoint ...`, `orp runner ...`, and `orp agent ...` expose the hosted workspace surface directly through ORP
|
|
159
161
|
- `orp compute ...` exposes targeted-compute admission, local execution, and paid-approval gating through a stable ORP wrapper surface
|
|
162
|
+
- `orp compute ...` can now consume either a raw compute packet input or a repo-declared `breakthroughs` project compute map plus a compute-point id
|
|
160
163
|
- `orp youtube inspect ...` exposes public YouTube metadata plus full transcript ingestion through a stable ORP artifact shape for agent use when caption tracks are available
|
|
161
164
|
- `orp init`, `orp status`, `orp branch start`, `orp checkpoint create`, `orp backup`, `orp ready`, `orp doctor`, and `orp cleanup` expose the local-first repo governance surface directly through ORP
|
|
162
165
|
- `orp discover ...` exposes profile-based GitHub scanning as a built-in ORP ability
|
package/bin/orp-compute.mjs
CHANGED
|
@@ -4,12 +4,14 @@ import fs from "node:fs/promises";
|
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import process from "node:process";
|
|
6
6
|
import {
|
|
7
|
+
buildComputePointDecisionPacket,
|
|
7
8
|
buildOrpComputeGateResult,
|
|
8
9
|
buildOrpComputePacket,
|
|
9
10
|
defineComputePacket,
|
|
10
11
|
defineDecision,
|
|
11
12
|
defineImpactRead,
|
|
12
13
|
definePolicy,
|
|
14
|
+
defineProjectComputeMap,
|
|
13
15
|
defineResultBundle,
|
|
14
16
|
defineRung,
|
|
15
17
|
evaluateDispatch,
|
|
@@ -21,7 +23,9 @@ function printHelp() {
|
|
|
21
23
|
|
|
22
24
|
Usage:
|
|
23
25
|
orp compute decide --input <path> [--packet-out <path>] [--json]
|
|
26
|
+
orp compute decide --project-map <path> --point-id <id> [--rung-id <id>] [--success-bar <path>] [--packet-out <path>] [--json]
|
|
24
27
|
orp compute run-local --input <path> --task <path> [--receipt-out <path>] [--packet-out <path>] [--json]
|
|
28
|
+
orp compute run-local --project-map <path> --point-id <id> --task <path> [--rung-id <id>] [--success-bar <path>] [--receipt-out <path>] [--packet-out <path>] [--json]
|
|
25
29
|
|
|
26
30
|
Input JSON shape:
|
|
27
31
|
{
|
|
@@ -40,6 +44,22 @@ Input JSON shape:
|
|
|
40
44
|
}
|
|
41
45
|
}
|
|
42
46
|
|
|
47
|
+
Project-map mode:
|
|
48
|
+
{
|
|
49
|
+
"projectId": "longevity-controller",
|
|
50
|
+
"repoRoots": ["/abs/path"],
|
|
51
|
+
"rungs": [...],
|
|
52
|
+
"defaultPolicy": {...},
|
|
53
|
+
"computePoints": [...]
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
Project-map mode options:
|
|
57
|
+
- --project-map <path> points to a repo compute catalog
|
|
58
|
+
- --point-id <id> selects the compute point
|
|
59
|
+
- --rung-id <id> optionally overrides the point default rung
|
|
60
|
+
- --success-bar <path> optionally points to a JSON object merged into the packet success bar
|
|
61
|
+
- repo/orp context is derived from the project map unless overridden with --repo-root, --board-id, --problem-id, or --artifact-root
|
|
62
|
+
|
|
43
63
|
Task JSON shape for run-local:
|
|
44
64
|
{
|
|
45
65
|
"command": "node",
|
|
@@ -116,11 +136,71 @@ function buildContext(raw) {
|
|
|
116
136
|
};
|
|
117
137
|
}
|
|
118
138
|
|
|
139
|
+
async function loadContext(options) {
|
|
140
|
+
if (options.input && options.projectMap) {
|
|
141
|
+
throw new Error("use either --input or --project-map, not both");
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (options.projectMap) {
|
|
145
|
+
if (!options.pointId) {
|
|
146
|
+
throw new Error("project-map mode requires --point-id <id>");
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const projectMap = defineProjectComputeMap(await readJson(options.projectMap));
|
|
150
|
+
const successBar = options.successBar
|
|
151
|
+
? await readJson(options.successBar)
|
|
152
|
+
: undefined;
|
|
153
|
+
const template = buildComputePointDecisionPacket({
|
|
154
|
+
projectComputeMap: projectMap,
|
|
155
|
+
pointId: options.pointId,
|
|
156
|
+
rungId: options.rungId,
|
|
157
|
+
successBar,
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
return {
|
|
161
|
+
raw: {
|
|
162
|
+
projectMap,
|
|
163
|
+
repo: {
|
|
164
|
+
rootPath: options.repoRoot || projectMap.repoRoots[0] || process.cwd(),
|
|
165
|
+
},
|
|
166
|
+
orp: {
|
|
167
|
+
boardId: options.boardId || "targeted_compute",
|
|
168
|
+
problemId: options.problemId || template.computePoint.id,
|
|
169
|
+
artifactRoot:
|
|
170
|
+
options.artifactRoot ||
|
|
171
|
+
`orp/artifacts/compute/${template.computePoint.id}`,
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
projectMap,
|
|
175
|
+
computePoint: template.computePoint,
|
|
176
|
+
decision: template.decision,
|
|
177
|
+
rung: template.rung,
|
|
178
|
+
policy: template.policy,
|
|
179
|
+
packet: template.packet,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
if (!options.input) {
|
|
184
|
+
throw new Error("compute command requires --input <path> or --project-map <path>");
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return buildContext(await readJson(options.input));
|
|
188
|
+
}
|
|
189
|
+
|
|
119
190
|
function commandLabel(subcommand, options) {
|
|
120
191
|
const parts = ["orp", "compute", subcommand];
|
|
121
192
|
if (options.input) {
|
|
122
193
|
parts.push("--input", options.input);
|
|
123
194
|
}
|
|
195
|
+
if (options.projectMap) {
|
|
196
|
+
parts.push("--project-map", options.projectMap);
|
|
197
|
+
}
|
|
198
|
+
if (options.pointId) {
|
|
199
|
+
parts.push("--point-id", options.pointId);
|
|
200
|
+
}
|
|
201
|
+
if (options.rungId) {
|
|
202
|
+
parts.push("--rung-id", options.rungId);
|
|
203
|
+
}
|
|
124
204
|
if (options.task) {
|
|
125
205
|
parts.push("--task", options.task);
|
|
126
206
|
}
|
|
@@ -148,11 +228,7 @@ function summarizeDispatch(dispatchResult) {
|
|
|
148
228
|
}
|
|
149
229
|
|
|
150
230
|
async function runDecide(options) {
|
|
151
|
-
|
|
152
|
-
throw new Error("compute decide requires --input <path>");
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
const context = buildContext(await readJson(options.input));
|
|
231
|
+
const context = await loadContext(options);
|
|
156
232
|
const dispatchResult = evaluateDispatch(context);
|
|
157
233
|
const gateResult = buildOrpComputeGateResult({
|
|
158
234
|
gateId: context.packet.rungId,
|
|
@@ -195,14 +271,11 @@ async function runDecide(options) {
|
|
|
195
271
|
}
|
|
196
272
|
|
|
197
273
|
async function runLocal(options) {
|
|
198
|
-
if (!options.input) {
|
|
199
|
-
throw new Error("compute run-local requires --input <path>");
|
|
200
|
-
}
|
|
201
274
|
if (!options.task) {
|
|
202
275
|
throw new Error("compute run-local requires --task <path>");
|
|
203
276
|
}
|
|
204
277
|
|
|
205
|
-
const context =
|
|
278
|
+
const context = await loadContext(options);
|
|
206
279
|
const task = await readJson(options.task);
|
|
207
280
|
const dispatchResult = evaluateDispatch(context);
|
|
208
281
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "open-research-protocol",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.12",
|
|
4
4
|
"description": "ORP CLI (Open Research Protocol): agent-friendly research workflows, runtime, reports, and pack tooling.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"node": ">=18"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"breakthroughs": "^0.1.
|
|
39
|
+
"breakthroughs": "^0.1.1"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"postinstall": "node scripts/npm-postinstall-check.js",
|