openpond-sdk 0.0.18 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LEARNING.md +44 -0
- package/README.md +2 -0
- package/dist/index.js +304 -180
- package/dist/index.js.map +4 -4
- package/dist/learning.js +99 -0
- package/dist/learning.js.map +7 -0
- package/dist/model-projects.js +61 -3
- package/dist/model-projects.js.map +2 -2
- package/dist/refiner.js +6 -6
- package/dist/refiner.js.map +1 -1
- package/dist/training.js +20 -2
- package/dist/training.js.map +2 -2
- package/dist/types/packages/sdk/src/index.d.ts +4 -0
- package/dist/types/packages/sdk/src/index.d.ts.map +1 -1
- package/dist/types/packages/sdk/src/learning.d.ts +30 -0
- package/dist/types/packages/sdk/src/learning.d.ts.map +1 -0
- package/dist/types/packages/sdk/src/model-projects.d.ts +368 -82
- package/dist/types/packages/sdk/src/model-projects.d.ts.map +1 -1
- package/dist/types/packages/sdk/src/training.d.ts +14 -14
- package/examples/learning/example.json +14 -0
- package/examples/learning/submit.py +57 -0
- package/examples/learning/submit.ts +20 -0
- package/package.json +12 -5
package/LEARNING.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Submit task evidence
|
|
2
|
+
|
|
3
|
+
Install `openpond-sdk` and use `OpenPondLearningClient` from
|
|
4
|
+
`openpond-sdk/learning`. Task definitions, reusable Rewards, grading, review,
|
|
5
|
+
batching and HTTP schemas are owned by `@openpond/evals/learning`; see that
|
|
6
|
+
package's `LEARNING.md` for the full contract and host responsibilities.
|
|
7
|
+
|
|
8
|
+
The runnable examples in `examples/learning` submit one JSON record through an
|
|
9
|
+
existing source. Create a task format and source in Models → Tasksets → Task
|
|
10
|
+
formats first. The sample uses an input object with `question` and an output
|
|
11
|
+
object with `answer`; adapt the record to your published format. The scripts read
|
|
12
|
+
the source's exact task-definition reference from the server.
|
|
13
|
+
|
|
14
|
+
Set `OPENPOND_API_KEY`, `OPENPOND_API_URL` and `OPENPOND_LEARNING_SCOPE` in your
|
|
15
|
+
shell, then run one of:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
node --experimental-strip-types submit.ts SOURCE_ID example.json
|
|
19
|
+
python3 submit.py SOURCE_ID example.json
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Use the URL of the execution owner: a local OpenPond server or the hosted API
|
|
23
|
+
where the learning service is deployed. The server authorizes the requested
|
|
24
|
+
profile/team scope. The SDK and Python example send the selected scope in
|
|
25
|
+
`X-OpenPond-Team-Id` so hosted requests select that team before authorization;
|
|
26
|
+
the local server uses the profile scope in the request body. These variables are example configuration, not arguments
|
|
27
|
+
that should be committed with credentials.
|
|
28
|
+
|
|
29
|
+
Assign stable example/attempt identities and preserve `idempotencyKey`, timestamp
|
|
30
|
+
and content on retries. A different record must use a different key. Submission
|
|
31
|
+
records evidence; it does not approve the task or observed response for training.
|
|
32
|
+
The failed observed answer in the sample is intentional. Grade it, propose the
|
|
33
|
+
correct target, grade that target separately, and approve it in Example review.
|
|
34
|
+
|
|
35
|
+
For feedback, call `client.submitFeedback` with a
|
|
36
|
+
`openpond.taskFeedback.v1` envelope. Preserve source/example/attempt identity,
|
|
37
|
+
use a separate stable idempotency key, and set `expectedEvidenceHash` to the
|
|
38
|
+
evidence hash when targeting a specific revision. Feedback may arrive before
|
|
39
|
+
the example and stays pending until review. Corrections do not mutate sealed
|
|
40
|
+
historical batches.
|
|
41
|
+
|
|
42
|
+
All client requests support an optional `AbortSignal`. Aborting a request does
|
|
43
|
+
not cancel remote compute; use `cancel_grade` and read the authoritative terminal
|
|
44
|
+
job state. Page through list responses with `nextCursor` as `afterId`.
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `openpond-sdk`
|
|
2
2
|
|
|
3
|
+
See [task evidence and learning](./LEARNING.md) for reusable Rewards, task-format publication, SDK/HTTP intake, grading, review and approved batches.
|
|
4
|
+
|
|
3
5
|
The OpenPond SDK is the server-side TypeScript client for running agentic work in OpenPond sandboxes. It gives Node.js applications, Next.js route handlers, workers, and backend services a small API for creating sandboxes, executing commands, managing files and runtimes, and running a model/tool loop in an isolated workspace.
|
|
4
6
|
|
|
5
7
|
OpenPond is an open-source agent orchestration system for doing durable work with any model, provider, or subscription. The desktop app, CLI/TUI, and this SDK live in the same repository and share the sandbox client implementation. Desktop builds use the workspace source directly; installing this package from npm is only for external applications.
|