@openpond/harness 0.3.0 → 0.4.1
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/CONTRACT.md +40 -0
- package/dist/index.js +1 -0
- package/dist/profile-workflows.js +151 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/profile-workflows.d.ts +133 -0
- package/dist/types/profile-workflows.d.ts.map +1 -0
- package/package.json +5 -1
package/CONTRACT.md
CHANGED
|
@@ -54,6 +54,46 @@ belong to `@openpond/evals`.
|
|
|
54
54
|
|
|
55
55
|
## Released source transport
|
|
56
56
|
|
|
57
|
+
### Profile workflow catalog
|
|
58
|
+
|
|
59
|
+
A Git-backed Profile may contain `workflows/catalog.json` beside its Skills,
|
|
60
|
+
Agents, and evals. The file uses `openpond.profileWorkflows.v1`:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"schemaVersion": "openpond.profileWorkflows.v1",
|
|
65
|
+
"workflows": [{
|
|
66
|
+
"id": "weekly-report",
|
|
67
|
+
"label": "Weekly report",
|
|
68
|
+
"description": "Summarize a supplied week.",
|
|
69
|
+
"inputSchema": { "type": "object", "properties": { "week": { "type": "integer" } }, "required": ["week"] },
|
|
70
|
+
"invocation": { "kind": "instructions", "instructions": "Write the report for the supplied week." },
|
|
71
|
+
"skillPaths": ["skills/report/SKILL.md"]
|
|
72
|
+
}]
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Workflow IDs are stable within one catalog. `skillPaths` name enabled primary
|
|
77
|
+
Skill files in the released Harness source. An `agent_action` invocation names
|
|
78
|
+
an enabled Agent action from the Profile action catalog. Import retains its
|
|
79
|
+
identity, input schema, and Agent source in the same immutable release; the
|
|
80
|
+
host executes it through the existing Agent SDK runner. Duplicate IDs, unsafe
|
|
81
|
+
paths, missing references, invalid input schemas, and unsupported actions fail
|
|
82
|
+
import. The catalog's exact bytes and generated `workflows/actions.json`
|
|
83
|
+
inventory are included in the Harness release. Profile eval files remain
|
|
84
|
+
outside model-visible Harness content.
|
|
85
|
+
|
|
86
|
+
`openpond.profileWorkflowBinding.v1` names the Profile, accepted source
|
|
87
|
+
revision, Harness release, catalog content hash, and workflow ID. The host
|
|
88
|
+
resolves it from a fully verified source package. A bound Work session uses
|
|
89
|
+
that release for every turn; source updates create new releases for fresh
|
|
90
|
+
sessions and do not change admitted runs or personal Harness selection.
|
|
91
|
+
|
|
92
|
+
Local servers expose committed workflow bindings at `GET /v1/profile/workflows`.
|
|
93
|
+
Create a Work session with its `currentProfile` and returned
|
|
94
|
+
`profileWorkflowBinding`, then start a turn with `workflowInput` matching the
|
|
95
|
+
workflow's `inputSchema`. The turn records its binding and input hash.
|
|
96
|
+
|
|
57
97
|
`openpond.harnessSourcePackage.v1` carries the complete immutable Agent
|
|
58
98
|
snapshot, Harness release and their released file bytes. Creation and readback
|
|
59
99
|
verify both release hashes, dependency references, the exact file population,
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { contentHash, ImmutableReleaseRefSchema, ReleaseHashSchema, sha256 } from "./common.js";
|
|
3
|
+
import { harnessSourcePackageFiles, validateHarnessSourcePackage } from "./source-package.js";
|
|
4
|
+
const WorkflowIdSchema = z.string().regex(/^[a-z][a-z0-9_-]{0,119}$/);
|
|
5
|
+
const SourcePathSchema = z.string().min(1).max(2_000).refine((value) => !value.includes("\\") && !value.includes(":") && !value.startsWith("/")
|
|
6
|
+
&& value.split("/").every((part) => part !== "" && part !== "." && part !== ".."), "workflow references require portable relative paths");
|
|
7
|
+
export const ProfileWorkflowSchema = z.object({
|
|
8
|
+
id: WorkflowIdSchema,
|
|
9
|
+
label: z.string().trim().min(1).max(240),
|
|
10
|
+
description: z.string().max(4_000),
|
|
11
|
+
inputSchema: z.record(z.string(), z.unknown()),
|
|
12
|
+
invocation: z.discriminatedUnion("kind", [
|
|
13
|
+
z.object({ kind: z.literal("instructions"), instructions: z.string().trim().min(1).max(100_000) }).strict(),
|
|
14
|
+
z.object({ kind: z.literal("agent_action"), actionId: z.string().trim().min(1).max(240) }).strict(),
|
|
15
|
+
]),
|
|
16
|
+
skillPaths: z.array(SourcePathSchema).max(100),
|
|
17
|
+
}).strict();
|
|
18
|
+
export const ProfileWorkflowCatalogSchema = z.object({
|
|
19
|
+
schemaVersion: z.literal("openpond.profileWorkflows.v1"),
|
|
20
|
+
workflows: z.array(ProfileWorkflowSchema).max(1_000),
|
|
21
|
+
}).strict();
|
|
22
|
+
/** Action identities retained beside a released workflow catalog. The host
|
|
23
|
+
* resolves these identities to the Agent files in the same immutable release. */
|
|
24
|
+
export const ProfileWorkflowActionSchema = z.object({
|
|
25
|
+
id: z.string().trim().min(1).max(240),
|
|
26
|
+
agentId: z.string().regex(/^[a-zA-Z0-9_-]{1,240}$/),
|
|
27
|
+
sourceActionId: z.string().trim().min(1).max(240),
|
|
28
|
+
inputSchema: z.record(z.string(), z.unknown()),
|
|
29
|
+
}).strict();
|
|
30
|
+
export const ProfileWorkflowActionsSchema = z.object({
|
|
31
|
+
schemaVersion: z.literal("openpond.profileWorkflowActions.v1"),
|
|
32
|
+
actions: z.array(ProfileWorkflowActionSchema).max(200),
|
|
33
|
+
}).strict();
|
|
34
|
+
/** Validates references against the exact files admitted to a released source. */
|
|
35
|
+
export function validateProfileWorkflowCatalog(input) {
|
|
36
|
+
const catalog = ProfileWorkflowCatalogSchema.parse(input.catalog);
|
|
37
|
+
const ids = new Set();
|
|
38
|
+
for (const workflow of catalog.workflows) {
|
|
39
|
+
if (ids.has(workflow.id))
|
|
40
|
+
throw new Error(`Duplicate Profile workflow id ${workflow.id}.`);
|
|
41
|
+
ids.add(workflow.id);
|
|
42
|
+
for (const skillPath of workflow.skillPaths) {
|
|
43
|
+
if (!input.sourcePaths.has(skillPath))
|
|
44
|
+
throw new Error(`Profile workflow ${workflow.id} references missing Skill ${skillPath}.`);
|
|
45
|
+
}
|
|
46
|
+
if (workflow.invocation.kind === "agent_action" && !input.actionIds.has(workflow.invocation.actionId)) {
|
|
47
|
+
throw new Error(`Profile workflow ${workflow.id} references missing action ${workflow.invocation.actionId}.`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return catalog;
|
|
51
|
+
}
|
|
52
|
+
export const ProfileWorkflowBindingSchema = z.object({
|
|
53
|
+
schemaVersion: z.literal("openpond.profileWorkflowBinding.v1"),
|
|
54
|
+
profileId: z.string().trim().min(1).max(240),
|
|
55
|
+
sourceRevision: z.string().trim().min(1).max(240),
|
|
56
|
+
harnessRelease: ImmutableReleaseRefSchema,
|
|
57
|
+
catalogHash: ReleaseHashSchema,
|
|
58
|
+
workflowId: WorkflowIdSchema,
|
|
59
|
+
}).strict();
|
|
60
|
+
/** A component evaluation pins a released Profile without inventing a
|
|
61
|
+
* workflow definition. The target is checked against that exact release. */
|
|
62
|
+
export const ProfileComponentBindingSchema = z.object({
|
|
63
|
+
schemaVersion: z.literal("openpond.profileComponentBinding.v1"),
|
|
64
|
+
profileId: z.string().trim().min(1).max(240),
|
|
65
|
+
sourceRevision: z.string().trim().min(1).max(240),
|
|
66
|
+
harnessRelease: ImmutableReleaseRefSchema,
|
|
67
|
+
target: z.discriminatedUnion("kind", [
|
|
68
|
+
z.object({ kind: z.literal("profile") }).strict(),
|
|
69
|
+
z.object({ kind: z.literal("skill"), skillPath: SourcePathSchema }).strict(),
|
|
70
|
+
z.object({ kind: z.literal("agent_action"), actionId: z.string().trim().min(1).max(240) }).strict(),
|
|
71
|
+
]),
|
|
72
|
+
}).strict();
|
|
73
|
+
/** Resolve a catalog only from a verified immutable source package. */
|
|
74
|
+
export function loadReleasedProfileWorkflowCatalog(value) {
|
|
75
|
+
const sourcePackage = validateHarnessSourcePackage(value);
|
|
76
|
+
const files = harnessSourcePackageFiles(sourcePackage);
|
|
77
|
+
const loaded = loadReleasedProfileWorkflowCatalogAssets({
|
|
78
|
+
agentSnapshot: sourcePackage.agentSnapshot,
|
|
79
|
+
harnessRelease: sourcePackage.harnessRelease,
|
|
80
|
+
catalogBytes: files.get("workflows/catalog.json"),
|
|
81
|
+
actionBytes: files.get("workflows/actions.json"),
|
|
82
|
+
});
|
|
83
|
+
return { sourcePackage, ...loaded };
|
|
84
|
+
}
|
|
85
|
+
/** Load only the two workflow assets after the caller has verified all files
|
|
86
|
+
* in a local release. This avoids packaging large Agent source each turn. */
|
|
87
|
+
export function loadReleasedProfileWorkflowCatalogAssets(input) {
|
|
88
|
+
const asset = input.harnessRelease.files.find((file) => file.path === "workflows/catalog.json");
|
|
89
|
+
const actionAsset = input.harnessRelease.files.find((file) => file.path === "workflows/actions.json");
|
|
90
|
+
if (!asset || asset.visibility !== "policy" || !input.catalogBytes || sha256(input.catalogBytes) !== asset.contentHash) {
|
|
91
|
+
throw new Error("Released Profile workflow catalog is unavailable or invalid.");
|
|
92
|
+
}
|
|
93
|
+
if (!actionAsset || actionAsset.visibility !== "policy" || !input.actionBytes || sha256(input.actionBytes) !== actionAsset.contentHash) {
|
|
94
|
+
throw new Error("Released Profile workflow actions are unavailable or invalid.");
|
|
95
|
+
}
|
|
96
|
+
const actions = ProfileWorkflowActionsSchema.parse(JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(input.actionBytes))).actions;
|
|
97
|
+
const actionIds = new Set();
|
|
98
|
+
for (const action of actions) {
|
|
99
|
+
if (actionIds.has(action.id))
|
|
100
|
+
throw new Error(`Duplicate released Profile action ${action.id}.`);
|
|
101
|
+
actionIds.add(action.id);
|
|
102
|
+
if (!input.harnessRelease.files.some((file) => file.path.startsWith(`agents/${action.agentId}/`))) {
|
|
103
|
+
throw new Error(`Released Profile action ${action.id} lacks its Agent source.`);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
const catalog = validateProfileWorkflowCatalog({
|
|
107
|
+
catalog: JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(input.catalogBytes)),
|
|
108
|
+
sourcePaths: new Set(input.agentSnapshot.skills.map((skill) => skill.path)),
|
|
109
|
+
actionIds,
|
|
110
|
+
});
|
|
111
|
+
return { catalog, catalogHash: contentHash(catalog), actions };
|
|
112
|
+
}
|
|
113
|
+
export function resolveReleasedProfileWorkflowCatalogBinding(input) {
|
|
114
|
+
const binding = ProfileWorkflowBindingSchema.parse(input.binding);
|
|
115
|
+
if (binding.harnessRelease.id !== input.harnessRelease.id
|
|
116
|
+
|| binding.harnessRelease.contentHash !== input.harnessRelease.contentHash) {
|
|
117
|
+
throw new Error("Profile workflow binding differs from the released source package.");
|
|
118
|
+
}
|
|
119
|
+
if (binding.catalogHash !== input.catalogHash)
|
|
120
|
+
throw new Error("Profile workflow catalog differs from its binding.");
|
|
121
|
+
const profile = input.harnessRelease.metadata.profile;
|
|
122
|
+
if (!profile || typeof profile !== "object")
|
|
123
|
+
throw new Error("Released source lacks Profile provenance.");
|
|
124
|
+
const provenance = profile;
|
|
125
|
+
if (provenance.id !== binding.profileId || provenance.sourceRevision !== binding.sourceRevision) {
|
|
126
|
+
throw new Error("Profile workflow binding differs from released Profile provenance.");
|
|
127
|
+
}
|
|
128
|
+
const workflow = input.catalog.workflows.find((candidate) => candidate.id === binding.workflowId);
|
|
129
|
+
if (!workflow)
|
|
130
|
+
throw new Error(`Profile workflow ${binding.workflowId} is absent from its bound catalog.`);
|
|
131
|
+
return workflow;
|
|
132
|
+
}
|
|
133
|
+
export function resolveReleasedProfileWorkflow(input) {
|
|
134
|
+
const binding = ProfileWorkflowBindingSchema.parse(input.binding);
|
|
135
|
+
const { sourcePackage, catalog, catalogHash } = loadReleasedProfileWorkflowCatalog(input.sourcePackage);
|
|
136
|
+
return resolveReleasedProfileWorkflowCatalogBinding({ binding, harnessRelease: sourcePackage.harnessRelease, catalog, catalogHash });
|
|
137
|
+
}
|
|
138
|
+
export function resolveProfileWorkflowBinding(input) {
|
|
139
|
+
const binding = ProfileWorkflowBindingSchema.parse(input.binding);
|
|
140
|
+
if (binding.harnessRelease.id !== input.harnessRelease.id
|
|
141
|
+
|| binding.harnessRelease.contentHash !== input.harnessRelease.contentHash) {
|
|
142
|
+
throw new Error("Profile workflow binding differs from the admitted Harness release.");
|
|
143
|
+
}
|
|
144
|
+
const catalog = validateProfileWorkflowCatalog(input);
|
|
145
|
+
if (contentHash(catalog) !== binding.catalogHash)
|
|
146
|
+
throw new Error("Profile workflow catalog differs from its binding.");
|
|
147
|
+
const workflow = catalog.workflows.find((candidate) => candidate.id === binding.workflowId);
|
|
148
|
+
if (!workflow)
|
|
149
|
+
throw new Error(`Profile workflow ${binding.workflowId} is absent from its bound catalog.`);
|
|
150
|
+
return workflow;
|
|
151
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -13,5 +13,6 @@ export * from "./tools.js";
|
|
|
13
13
|
export * from "./source-package.js";
|
|
14
14
|
export * from "./source-runtime.js";
|
|
15
15
|
export * from "./provider-loop.js";
|
|
16
|
+
export * from "./profile-workflows.js";
|
|
16
17
|
export * from "./source-execution.js";
|
|
17
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type HarnessSourcePackage } from "./source-package.js";
|
|
3
|
+
import type { AgentSnapshot, HarnessRelease } from "./harness.js";
|
|
4
|
+
export declare const ProfileWorkflowSchema: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
label: z.ZodString;
|
|
7
|
+
description: z.ZodString;
|
|
8
|
+
inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
9
|
+
invocation: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
10
|
+
kind: z.ZodLiteral<"instructions">;
|
|
11
|
+
instructions: z.ZodString;
|
|
12
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
13
|
+
kind: z.ZodLiteral<"agent_action">;
|
|
14
|
+
actionId: z.ZodString;
|
|
15
|
+
}, z.core.$strict>], "kind">;
|
|
16
|
+
skillPaths: z.ZodArray<z.ZodString>;
|
|
17
|
+
}, z.core.$strict>;
|
|
18
|
+
export declare const ProfileWorkflowCatalogSchema: z.ZodObject<{
|
|
19
|
+
schemaVersion: z.ZodLiteral<"openpond.profileWorkflows.v1">;
|
|
20
|
+
workflows: z.ZodArray<z.ZodObject<{
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
label: z.ZodString;
|
|
23
|
+
description: z.ZodString;
|
|
24
|
+
inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
25
|
+
invocation: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
26
|
+
kind: z.ZodLiteral<"instructions">;
|
|
27
|
+
instructions: z.ZodString;
|
|
28
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
29
|
+
kind: z.ZodLiteral<"agent_action">;
|
|
30
|
+
actionId: z.ZodString;
|
|
31
|
+
}, z.core.$strict>], "kind">;
|
|
32
|
+
skillPaths: z.ZodArray<z.ZodString>;
|
|
33
|
+
}, z.core.$strict>>;
|
|
34
|
+
}, z.core.$strict>;
|
|
35
|
+
export type ProfileWorkflow = z.infer<typeof ProfileWorkflowSchema>;
|
|
36
|
+
export type ProfileWorkflowCatalog = z.infer<typeof ProfileWorkflowCatalogSchema>;
|
|
37
|
+
/** Action identities retained beside a released workflow catalog. The host
|
|
38
|
+
* resolves these identities to the Agent files in the same immutable release. */
|
|
39
|
+
export declare const ProfileWorkflowActionSchema: z.ZodObject<{
|
|
40
|
+
id: z.ZodString;
|
|
41
|
+
agentId: z.ZodString;
|
|
42
|
+
sourceActionId: z.ZodString;
|
|
43
|
+
inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
44
|
+
}, z.core.$strict>;
|
|
45
|
+
export declare const ProfileWorkflowActionsSchema: z.ZodObject<{
|
|
46
|
+
schemaVersion: z.ZodLiteral<"openpond.profileWorkflowActions.v1">;
|
|
47
|
+
actions: z.ZodArray<z.ZodObject<{
|
|
48
|
+
id: z.ZodString;
|
|
49
|
+
agentId: z.ZodString;
|
|
50
|
+
sourceActionId: z.ZodString;
|
|
51
|
+
inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
52
|
+
}, z.core.$strict>>;
|
|
53
|
+
}, z.core.$strict>;
|
|
54
|
+
export type ProfileWorkflowAction = z.infer<typeof ProfileWorkflowActionSchema>;
|
|
55
|
+
/** Validates references against the exact files admitted to a released source. */
|
|
56
|
+
export declare function validateProfileWorkflowCatalog(input: {
|
|
57
|
+
catalog: unknown;
|
|
58
|
+
sourcePaths: ReadonlySet<string>;
|
|
59
|
+
actionIds: ReadonlySet<string>;
|
|
60
|
+
}): ProfileWorkflowCatalog;
|
|
61
|
+
export declare const ProfileWorkflowBindingSchema: z.ZodObject<{
|
|
62
|
+
schemaVersion: z.ZodLiteral<"openpond.profileWorkflowBinding.v1">;
|
|
63
|
+
profileId: z.ZodString;
|
|
64
|
+
sourceRevision: z.ZodString;
|
|
65
|
+
harnessRelease: z.ZodObject<{
|
|
66
|
+
id: z.ZodString;
|
|
67
|
+
contentHash: z.ZodString;
|
|
68
|
+
}, z.core.$strict>;
|
|
69
|
+
catalogHash: z.ZodString;
|
|
70
|
+
workflowId: z.ZodString;
|
|
71
|
+
}, z.core.$strict>;
|
|
72
|
+
export type ProfileWorkflowBinding = z.infer<typeof ProfileWorkflowBindingSchema>;
|
|
73
|
+
/** A component evaluation pins a released Profile without inventing a
|
|
74
|
+
* workflow definition. The target is checked against that exact release. */
|
|
75
|
+
export declare const ProfileComponentBindingSchema: z.ZodObject<{
|
|
76
|
+
schemaVersion: z.ZodLiteral<"openpond.profileComponentBinding.v1">;
|
|
77
|
+
profileId: z.ZodString;
|
|
78
|
+
sourceRevision: z.ZodString;
|
|
79
|
+
harnessRelease: z.ZodObject<{
|
|
80
|
+
id: z.ZodString;
|
|
81
|
+
contentHash: z.ZodString;
|
|
82
|
+
}, z.core.$strict>;
|
|
83
|
+
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
84
|
+
kind: z.ZodLiteral<"profile">;
|
|
85
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
86
|
+
kind: z.ZodLiteral<"skill">;
|
|
87
|
+
skillPath: z.ZodString;
|
|
88
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
89
|
+
kind: z.ZodLiteral<"agent_action">;
|
|
90
|
+
actionId: z.ZodString;
|
|
91
|
+
}, z.core.$strict>], "kind">;
|
|
92
|
+
}, z.core.$strict>;
|
|
93
|
+
export type ProfileComponentBinding = z.infer<typeof ProfileComponentBindingSchema>;
|
|
94
|
+
/** Resolve a catalog only from a verified immutable source package. */
|
|
95
|
+
export declare function loadReleasedProfileWorkflowCatalog(value: unknown): {
|
|
96
|
+
sourcePackage: HarnessSourcePackage;
|
|
97
|
+
catalog: ProfileWorkflowCatalog;
|
|
98
|
+
catalogHash: string;
|
|
99
|
+
actions: ProfileWorkflowAction[];
|
|
100
|
+
};
|
|
101
|
+
/** Load only the two workflow assets after the caller has verified all files
|
|
102
|
+
* in a local release. This avoids packaging large Agent source each turn. */
|
|
103
|
+
export declare function loadReleasedProfileWorkflowCatalogAssets(input: {
|
|
104
|
+
agentSnapshot: AgentSnapshot;
|
|
105
|
+
harnessRelease: HarnessRelease;
|
|
106
|
+
catalogBytes?: Uint8Array;
|
|
107
|
+
actionBytes?: Uint8Array;
|
|
108
|
+
}): {
|
|
109
|
+
catalog: ProfileWorkflowCatalog;
|
|
110
|
+
catalogHash: string;
|
|
111
|
+
actions: ProfileWorkflowAction[];
|
|
112
|
+
};
|
|
113
|
+
export declare function resolveReleasedProfileWorkflowCatalogBinding(input: {
|
|
114
|
+
binding: unknown;
|
|
115
|
+
harnessRelease: HarnessRelease;
|
|
116
|
+
catalog: ProfileWorkflowCatalog;
|
|
117
|
+
catalogHash: string;
|
|
118
|
+
}): ProfileWorkflow;
|
|
119
|
+
export declare function resolveReleasedProfileWorkflow(input: {
|
|
120
|
+
binding: unknown;
|
|
121
|
+
sourcePackage: unknown;
|
|
122
|
+
}): ProfileWorkflow;
|
|
123
|
+
export declare function resolveProfileWorkflowBinding(input: {
|
|
124
|
+
binding: unknown;
|
|
125
|
+
catalog: unknown;
|
|
126
|
+
sourcePaths: ReadonlySet<string>;
|
|
127
|
+
actionIds: ReadonlySet<string>;
|
|
128
|
+
harnessRelease: {
|
|
129
|
+
id: string;
|
|
130
|
+
contentHash: string;
|
|
131
|
+
};
|
|
132
|
+
}): ProfileWorkflow;
|
|
133
|
+
//# sourceMappingURL=profile-workflows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-workflows.d.ts","sourceRoot":"","sources":["../../../../src/profile-workflows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAA2D,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACzH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AASlE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;kBAUvB,CAAC;AAEZ,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;kBAG9B,CAAC;AAEZ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF;iFACiF;AACjF,eAAO,MAAM,2BAA2B;;;;;kBAK7B,CAAC;AAEZ,eAAO,MAAM,4BAA4B;;;;;;;;kBAG9B,CAAC;AAEZ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,kFAAkF;AAClF,wBAAgB,8BAA8B,CAAC,KAAK,EAAE;IACpD,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAChC,GAAG,sBAAsB,CAczB;AAED,eAAO,MAAM,4BAA4B;;;;;;;;;;kBAO9B,CAAC;AAEZ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF;4EAC4E;AAC5E,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;kBAU/B,CAAC;AAEZ,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,uEAAuE;AACvE,wBAAgB,kCAAkC,CAAC,KAAK,EAAE,OAAO,GAAG;IAClE,aAAa,EAAE,oBAAoB,CAAC;IACpC,OAAO,EAAE,sBAAsB,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,qBAAqB,EAAE,CAAC;CAClC,CAUA;AAED;6EAC6E;AAC7E,wBAAgB,wCAAwC,CAAC,KAAK,EAAE;IAC9D,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,WAAW,CAAC,EAAE,UAAU,CAAC;CAC1B,GAAG;IAAE,OAAO,EAAE,sBAAsB,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,qBAAqB,EAAE,CAAA;CAAE,CAwB7F;AAED,wBAAgB,4CAA4C,CAAC,KAAK,EAAE;IAClE,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,cAAc,CAAC;IAC/B,OAAO,EAAE,sBAAsB,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,eAAe,CAgBlB;AAED,wBAAgB,8BAA8B,CAAC,KAAK,EAAE;IACpD,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;CACxB,GAAG,eAAe,CAIlB;AAED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE;IACnD,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC/B,cAAc,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;CACrD,GAAG,eAAe,CAWlB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openpond/harness",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Portable immutable Harness releases, workspaces, improvements, traces, tools, and model identities for OpenPond",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -38,6 +38,10 @@
|
|
|
38
38
|
"types": "./dist/types/models.d.ts",
|
|
39
39
|
"import": "./dist/models.js"
|
|
40
40
|
},
|
|
41
|
+
"./profile-workflows": {
|
|
42
|
+
"types": "./dist/types/profile-workflows.d.ts",
|
|
43
|
+
"import": "./dist/profile-workflows.js"
|
|
44
|
+
},
|
|
41
45
|
"./refiner": {
|
|
42
46
|
"types": "./dist/types/refiner.d.ts",
|
|
43
47
|
"import": "./dist/refiner.js"
|