@themoltnet/pi-extension 0.9.0 → 0.11.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/README.md +0 -2
- package/dist/index.d.ts +37 -45
- package/dist/index.js +4249 -562
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -88,8 +88,6 @@ tools can use structured in-process calls rather than shell round-trips.
|
|
|
88
88
|
| `moltnet_pack_render` | Host | " |
|
|
89
89
|
| `moltnet_rendered_pack_list` | Host | " |
|
|
90
90
|
| `moltnet_rendered_pack_get` | Host | " |
|
|
91
|
-
| `moltnet_rendered_pack_verify` | Host | " |
|
|
92
|
-
| `moltnet_rendered_pack_judge` | Host | " |
|
|
93
91
|
| `moltnet_diary_tags` | Host | " |
|
|
94
92
|
| `moltnet_list_entries` | Host | " |
|
|
95
93
|
| `moltnet_get_entry` | Host | " |
|
package/dist/index.d.ts
CHANGED
|
@@ -26,8 +26,6 @@ import { WriteOperations } from '@mariozechner/pi-coding-agent';
|
|
|
26
26
|
*/
|
|
27
27
|
export declare function activateAgentEnv(agentEnv: Record<string, string | undefined>, repoRoot: string): void;
|
|
28
28
|
|
|
29
|
-
export declare function buildPiJudgeRecipeManifest(inputs: PiJudgeRecipeInputs): PiJudgeRecipeManifest;
|
|
30
|
-
|
|
31
29
|
declare interface ClaimedTask {
|
|
32
30
|
/** The claimed task payload itself. */
|
|
33
31
|
task: Task;
|
|
@@ -37,8 +35,6 @@ declare interface ClaimedTask {
|
|
|
37
35
|
traceHeaders: Record<string, string>;
|
|
38
36
|
}
|
|
39
37
|
|
|
40
|
-
export declare function computePiJudgeRecipeCid(inputs: PiJudgeRecipeInputs): PiJudgeRecipeCid;
|
|
41
|
-
|
|
42
38
|
export declare function createGondolinBashOps(vm: VM, localCwd: string): BashOperations;
|
|
43
39
|
|
|
44
40
|
export declare function createGondolinEditOps(vm: VM, localCwd: string): EditOperations;
|
|
@@ -94,7 +90,14 @@ export declare interface ExecutePiTaskOptions {
|
|
|
94
90
|
extraAllowedHosts?: string[];
|
|
95
91
|
/** Sandbox overrides (env, VFS shadows, resources). */
|
|
96
92
|
sandboxConfig?: SandboxConfig;
|
|
97
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* Forwarded to `buildPromptForTask` for per-type builders. Static
|
|
95
|
+
* across tasks. Today no built-in builder needs per-task `extras` —
|
|
96
|
+
* judges fetch their own dependent data via MoltNet tools
|
|
97
|
+
* (`moltnet_get_task`, `moltnet_list_task_attempts`, etc.) at run
|
|
98
|
+
* time, which keeps this layer task-type-agnostic. Field is kept
|
|
99
|
+
* for forward compat with custom prompt builders that might want it.
|
|
100
|
+
*/
|
|
98
101
|
promptExtras?: Record<string, unknown>;
|
|
99
102
|
/** Snapshot progress callback; defaults to stderr logging. */
|
|
100
103
|
onSnapshotProgress?: (message: string) => void;
|
|
@@ -133,6 +136,28 @@ declare type MoltNetAgent = Awaited<ReturnType<typeof connect>>;
|
|
|
133
136
|
declare function moltnetExtension(pi: ExtensionAPI): void;
|
|
134
137
|
export default moltnetExtension;
|
|
135
138
|
|
|
139
|
+
/**
|
|
140
|
+
* Active-task context. When present, `moltnet_create_entry` is forced to
|
|
141
|
+
* land entries in `diaryId` (the task diary), regardless of the env-derived
|
|
142
|
+
* diary, and auto-injects provenance tags under the `task:*` namespace
|
|
143
|
+
* (`task:id:<id>`, `task:type:<type>`, `task:attempt:<n>`, and
|
|
144
|
+
* `task:correlation:<id>` when the task carries one). See issue #979 +
|
|
145
|
+
* the #986 follow-up that introduced the namespace.
|
|
146
|
+
*/
|
|
147
|
+
declare interface MoltNetTaskContext {
|
|
148
|
+
taskId: string;
|
|
149
|
+
taskType: string;
|
|
150
|
+
attemptN: number;
|
|
151
|
+
diaryId: string;
|
|
152
|
+
/**
|
|
153
|
+
* Optional correlation id. When set, propagated as a
|
|
154
|
+
* `task:correlation:<id>` provenance tag so all entries from a
|
|
155
|
+
* multi-task workflow can be grouped without enumerating individual
|
|
156
|
+
* task ids.
|
|
157
|
+
*/
|
|
158
|
+
correlationId: string | null;
|
|
159
|
+
}
|
|
160
|
+
|
|
136
161
|
declare interface MoltNetToolsConfig {
|
|
137
162
|
getAgent(): MoltNetAgent | null;
|
|
138
163
|
getDiaryId(): string | null;
|
|
@@ -148,44 +173,13 @@ declare interface MoltNetToolsConfig {
|
|
|
148
173
|
* Defaults to HOST_EXEC_DEFAULT_BASE_ENV when omitted.
|
|
149
174
|
*/
|
|
150
175
|
hostExecBaseEnv?: ReadonlySet<string>;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
declare interface PiJudgeRecipeInputs {
|
|
159
|
-
judgePrompt: string;
|
|
160
|
-
rubric: string;
|
|
161
|
-
skillFragment?: string | null;
|
|
162
|
-
implementationSource?: string | null;
|
|
163
|
-
promptAsset?: string | null;
|
|
164
|
-
rubricAsset?: string | null;
|
|
165
|
-
skillSourcePath?: string | null;
|
|
166
|
-
overrides?: Partial<PiJudgeRecipeVersions>;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
declare interface PiJudgeRecipeManifest {
|
|
170
|
-
kind: 'pi-judge-recipe/v1';
|
|
171
|
-
versions: PiJudgeRecipeVersions;
|
|
172
|
-
assets: {
|
|
173
|
-
promptAsset: string | null;
|
|
174
|
-
rubricAsset: string | null;
|
|
175
|
-
skillSourcePath: string | null;
|
|
176
|
-
};
|
|
177
|
-
hashes: {
|
|
178
|
-
judgePromptSha256: string;
|
|
179
|
-
rubricSha256: string;
|
|
180
|
-
skillFragmentSha256: string | null;
|
|
181
|
-
implementationSha256: string | null;
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
declare interface PiJudgeRecipeVersions {
|
|
186
|
-
pi: string | null;
|
|
187
|
-
piExtension: string | null;
|
|
188
|
-
sdk: string | null;
|
|
176
|
+
/**
|
|
177
|
+
* Active-task context, populated by the agent-daemon path. When set,
|
|
178
|
+
* `moltnet_create_entry` enforces `diaryId === taskContext.diaryId` and
|
|
179
|
+
* injects provenance tags. When absent (interactive pi-extension / TUI),
|
|
180
|
+
* entry creation behaves as before (env-derived diary, no auto-tags).
|
|
181
|
+
*/
|
|
182
|
+
getTaskContext?(): MoltNetTaskContext | null;
|
|
189
183
|
}
|
|
190
184
|
|
|
191
185
|
export declare interface PiOtelOptions {
|
|
@@ -199,8 +193,6 @@ export declare interface PiOtelOptions {
|
|
|
199
193
|
spanAttributes?: Record<string, string | number | boolean>;
|
|
200
194
|
}
|
|
201
195
|
|
|
202
|
-
export declare function resolvePiJudgeRecipeVersions(): PiJudgeRecipeVersions;
|
|
203
|
-
|
|
204
196
|
/**
|
|
205
197
|
* Resume a VM from a checkpoint, inject credentials, configure egress +
|
|
206
198
|
* TLS. Returns the managed VM handle.
|