openpond-sdk 0.1.2 → 0.1.4
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/TASKSETS.md +31 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +2 -2
- package/dist/learning.js +8 -0
- package/dist/learning.js.map +2 -2
- package/dist/taskset-catalog.js +114 -0
- package/dist/taskset-catalog.js.map +7 -0
- package/dist/types/packages/sdk/src/learning.d.ts +23 -1
- package/dist/types/packages/sdk/src/learning.d.ts.map +1 -1
- package/dist/types/packages/sdk/src/taskset-catalog.d.ts +84 -0
- package/dist/types/packages/sdk/src/taskset-catalog.d.ts.map +1 -0
- package/package.json +8 -3
package/TASKSETS.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Published Taskset inventory
|
|
2
|
+
|
|
3
|
+
`openpond-sdk/taskset-catalog` provides authenticated, paginated metadata reads
|
|
4
|
+
for the selected hosted workspace. The service applies workspace access and
|
|
5
|
+
optional Model Project attachment filtering before returning records.
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { OpenPondTasksetCatalogClient } from "openpond-sdk/taskset-catalog";
|
|
9
|
+
|
|
10
|
+
const tasksets = new OpenPondTasksetCatalogClient({
|
|
11
|
+
baseUrl: "https://api.openpond.ai",
|
|
12
|
+
apiKey,
|
|
13
|
+
teamId,
|
|
14
|
+
});
|
|
15
|
+
const page = await tasksets.list({ limit: 30, modelProjectId });
|
|
16
|
+
const item = await tasksets.get(page.items[0].id);
|
|
17
|
+
const selected = await tasksets.resolve(item.release);
|
|
18
|
+
const next = page.nextCursor
|
|
19
|
+
? await tasksets.list({ limit: 30, modelProjectId, afterId: page.nextCursor })
|
|
20
|
+
: null;
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The item's `id` is the hosted inventory identity. Its `release` pins the portable
|
|
24
|
+
ID, revision and content hash used in model configuration. Metadata reads contain
|
|
25
|
+
no task rows, private verifier source or object-store locations. Publication and
|
|
26
|
+
package byte counts do not establish grading or training readiness.
|
|
27
|
+
|
|
28
|
+
The client rejects responses for a different workspace or requested resource,
|
|
29
|
+
limits catalog responses to 4 MiB, supports abort signals, and does not follow
|
|
30
|
+
redirects with credentials. `OpenPondTasksetCatalogError` preserves HTTP status and
|
|
31
|
+
the service's error code.
|
package/dist/index.js
CHANGED
|
@@ -2720,6 +2720,8 @@ import {
|
|
|
2720
2720
|
LearningCommandRequestSchema,
|
|
2721
2721
|
LearningOperationResultSchema,
|
|
2722
2722
|
LearningReadRequestSchema,
|
|
2723
|
+
TaskEvidenceInspectionResultSchema,
|
|
2724
|
+
sameLearningRef,
|
|
2723
2725
|
assertLearningRequestJson,
|
|
2724
2726
|
learningResourceSchemas
|
|
2725
2727
|
} from "@openpond/evals/learning";
|
|
@@ -2775,6 +2777,12 @@ var OpenPondLearningClient = class {
|
|
|
2775
2777
|
const request = LearningReadRequestSchema.parse({ action: "get", scope: this.#options.scope, kind, id, ...revision === void 0 ? {} : { revision } });
|
|
2776
2778
|
return learningResourceSchemas[kind].parse(await this.#request("read", request, options));
|
|
2777
2779
|
}
|
|
2780
|
+
async inspectEvidence(evidence, options = {}) {
|
|
2781
|
+
const request = LearningReadRequestSchema.parse({ action: "inspect_evidence", scope: this.#options.scope, evidence });
|
|
2782
|
+
const result = TaskEvidenceInspectionResultSchema.parse(await this.#request("read", request, options));
|
|
2783
|
+
if (!sameLearningRef(result.evidence, evidence)) throw new OpenPondLearningError(502, "evidence_identity_mismatch", "Inspection did not match the requested evidence release.", null);
|
|
2784
|
+
return result;
|
|
2785
|
+
}
|
|
2778
2786
|
async list(kind, query = {}, options = {}) {
|
|
2779
2787
|
const request = LearningReadRequestSchema.parse({ action: "list", scope: this.#options.scope, kind, ...query });
|
|
2780
2788
|
return z.object({ items: z.array(learningResourceSchemas[kind]).max(100), nextCursor: z.string().nullable() }).strict().parse(await this.#request("read", request, options));
|