@themoltnet/pi-extension 0.22.5 → 0.23.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/dist/index.d.ts +2 -3
- package/dist/index.js +150 -9
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -718,9 +718,8 @@ declare const Task: Type.TObject<{
|
|
|
718
718
|
acceptedAttemptN: Type.TUnion<[Type.TNumber, Type.TNull]>;
|
|
719
719
|
claimCondition: Type.TUnion<[Type.TUnsafe<ClaimCondition>, Type.TNull]>;
|
|
720
720
|
requiredExecutorTrustLevel: Type.TUnion<[Type.TLiteral<"selfDeclared">, Type.TLiteral<"agentSigned">, Type.TLiteral<"releaseVerifiedTool">, Type.TLiteral<"sandboxAttested">]>;
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
model: Type.TString;
|
|
721
|
+
allowedProfiles: Type.TArray<Type.TObject<{
|
|
722
|
+
profileId: Type.TString;
|
|
724
723
|
}>>;
|
|
725
724
|
status: Type.TUnion<[Type.TLiteral<"waiting">, Type.TLiteral<"queued">, Type.TLiteral<"dispatched">, Type.TLiteral<"running">, Type.TLiteral<"completed">, Type.TLiteral<"failed">, Type.TLiteral<"cancelled">, Type.TLiteral<"expired">]>;
|
|
726
725
|
queuedAt: Type.TString;
|
package/dist/index.js
CHANGED
|
@@ -13055,6 +13055,155 @@ var TaskContext = _Array_(_Object_({
|
|
|
13055
13055
|
maxItems: 5
|
|
13056
13056
|
});
|
|
13057
13057
|
//#endregion
|
|
13058
|
+
//#region ../tasks/src/daemon-profiles.ts
|
|
13059
|
+
var DaemonProfileName = String$1({
|
|
13060
|
+
minLength: 1,
|
|
13061
|
+
maxLength: 100,
|
|
13062
|
+
pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,99}$"
|
|
13063
|
+
});
|
|
13064
|
+
var DaemonProfileEnvName = String$1({
|
|
13065
|
+
minLength: 1,
|
|
13066
|
+
maxLength: 128,
|
|
13067
|
+
pattern: "^[A-Z_][A-Z0-9_]*$"
|
|
13068
|
+
});
|
|
13069
|
+
var DaemonProfileToolName = String$1({
|
|
13070
|
+
minLength: 1,
|
|
13071
|
+
maxLength: 128,
|
|
13072
|
+
pattern: "^[a-zA-Z0-9._/-]+$"
|
|
13073
|
+
});
|
|
13074
|
+
var SandboxResumeCommandWhenSchema = _Object_({ workspaceMode: Optional(_Array_(Union([
|
|
13075
|
+
Literal("shared_mount"),
|
|
13076
|
+
Literal("dedicated_worktree"),
|
|
13077
|
+
Literal("scratch_mount")
|
|
13078
|
+
]), {
|
|
13079
|
+
minItems: 1,
|
|
13080
|
+
maxItems: 3
|
|
13081
|
+
})) }, { additionalProperties: false });
|
|
13082
|
+
var DaemonProfileSandboxResumeCommand = Union([String$1({
|
|
13083
|
+
minLength: 1,
|
|
13084
|
+
maxLength: 4096
|
|
13085
|
+
}), _Object_({
|
|
13086
|
+
run: String$1({
|
|
13087
|
+
minLength: 1,
|
|
13088
|
+
maxLength: 4096
|
|
13089
|
+
}),
|
|
13090
|
+
when: Optional(SandboxResumeCommandWhenSchema),
|
|
13091
|
+
retries: Optional(Integer({
|
|
13092
|
+
minimum: 0,
|
|
13093
|
+
maximum: 5
|
|
13094
|
+
})),
|
|
13095
|
+
retryBackoffMs: Optional(Integer({
|
|
13096
|
+
minimum: 0,
|
|
13097
|
+
maximum: 6e4
|
|
13098
|
+
}))
|
|
13099
|
+
}, { additionalProperties: false })]);
|
|
13100
|
+
var DaemonProfileSandbox = _Object_({
|
|
13101
|
+
snapshot: Optional(_Object_({
|
|
13102
|
+
setupCommands: Optional(_Array_(String$1({
|
|
13103
|
+
minLength: 1,
|
|
13104
|
+
maxLength: 4096
|
|
13105
|
+
}), { maxItems: 20 })),
|
|
13106
|
+
allowedHosts: Optional(_Array_(String$1({
|
|
13107
|
+
minLength: 1,
|
|
13108
|
+
maxLength: 255
|
|
13109
|
+
}), { maxItems: 50 })),
|
|
13110
|
+
overlaySize: Optional(String$1({
|
|
13111
|
+
minLength: 2,
|
|
13112
|
+
maxLength: 16,
|
|
13113
|
+
pattern: "^[0-9]+[KMGTP]?$"
|
|
13114
|
+
}))
|
|
13115
|
+
}, { additionalProperties: false })),
|
|
13116
|
+
resumeCommands: Optional(_Array_(DaemonProfileSandboxResumeCommand, { maxItems: 30 })),
|
|
13117
|
+
vfs: Optional(_Object_({
|
|
13118
|
+
shadow: Optional(_Array_(String$1({
|
|
13119
|
+
minLength: 1,
|
|
13120
|
+
maxLength: 255
|
|
13121
|
+
}), { maxItems: 100 })),
|
|
13122
|
+
shadowMode: Optional(Union([Literal("deny"), Literal("tmpfs")]))
|
|
13123
|
+
}, { additionalProperties: false })),
|
|
13124
|
+
env: Optional(Record(DaemonProfileEnvName, String$1({ maxLength: 4096 }))),
|
|
13125
|
+
hostExec: Optional(_Object_({ autoApprove: Optional(Literal(false)) }, { additionalProperties: false })),
|
|
13126
|
+
resources: Optional(_Object_({
|
|
13127
|
+
memory: Optional(String$1({
|
|
13128
|
+
minLength: 2,
|
|
13129
|
+
maxLength: 16,
|
|
13130
|
+
pattern: "^[0-9]+[KMG]?$"
|
|
13131
|
+
})),
|
|
13132
|
+
cpus: Optional(Integer({
|
|
13133
|
+
minimum: 1,
|
|
13134
|
+
maximum: 32
|
|
13135
|
+
}))
|
|
13136
|
+
}, { additionalProperties: false }))
|
|
13137
|
+
}, {
|
|
13138
|
+
$id: "DaemonProfileSandbox",
|
|
13139
|
+
additionalProperties: false
|
|
13140
|
+
});
|
|
13141
|
+
var DaemonProfileContext = _Object_({
|
|
13142
|
+
slug: String$1({
|
|
13143
|
+
minLength: 1,
|
|
13144
|
+
maxLength: 64,
|
|
13145
|
+
pattern: "^[a-zA-Z0-9_-]+$"
|
|
13146
|
+
}),
|
|
13147
|
+
binding: Union([
|
|
13148
|
+
Literal("skill"),
|
|
13149
|
+
Literal("context_inline"),
|
|
13150
|
+
Literal("prompt_prefix"),
|
|
13151
|
+
Literal("user_inline")
|
|
13152
|
+
]),
|
|
13153
|
+
content: String$1({
|
|
13154
|
+
minLength: 1,
|
|
13155
|
+
maxLength: 65536
|
|
13156
|
+
})
|
|
13157
|
+
}, {
|
|
13158
|
+
$id: "DaemonProfileContext",
|
|
13159
|
+
additionalProperties: false
|
|
13160
|
+
});
|
|
13161
|
+
var DaemonProfileRef = _Object_({ profileId: String$1({ format: "uuid" }) }, {
|
|
13162
|
+
$id: "DaemonProfileRef",
|
|
13163
|
+
additionalProperties: false
|
|
13164
|
+
});
|
|
13165
|
+
_Object_({
|
|
13166
|
+
id: String$1({ format: "uuid" }),
|
|
13167
|
+
teamId: String$1({ format: "uuid" }),
|
|
13168
|
+
name: DaemonProfileName,
|
|
13169
|
+
description: Union([String$1({ maxLength: 4096 }), Null()]),
|
|
13170
|
+
provider: String$1({
|
|
13171
|
+
minLength: 1,
|
|
13172
|
+
maxLength: 100
|
|
13173
|
+
}),
|
|
13174
|
+
model: String$1({
|
|
13175
|
+
minLength: 1,
|
|
13176
|
+
maxLength: 200
|
|
13177
|
+
}),
|
|
13178
|
+
runtimeKind: Literal("gondolin_pi"),
|
|
13179
|
+
sandbox: DaemonProfileSandbox,
|
|
13180
|
+
sessionStorageMode: Literal("local"),
|
|
13181
|
+
workspaceStorageMode: Literal("local"),
|
|
13182
|
+
sessionTtlSec: Integer({
|
|
13183
|
+
minimum: 1,
|
|
13184
|
+
maximum: 86400
|
|
13185
|
+
}),
|
|
13186
|
+
workspaceTtlSec: Integer({
|
|
13187
|
+
minimum: 1,
|
|
13188
|
+
maximum: 86400
|
|
13189
|
+
}),
|
|
13190
|
+
requiredEnv: _Array_(DaemonProfileEnvName, { maxItems: 100 }),
|
|
13191
|
+
requiredTools: _Array_(DaemonProfileToolName, { maxItems: 100 }),
|
|
13192
|
+
context: _Array_(DaemonProfileContext, { maxItems: 5 }),
|
|
13193
|
+
revision: Integer({ minimum: 1 }),
|
|
13194
|
+
definitionCid: String$1({
|
|
13195
|
+
minLength: 1,
|
|
13196
|
+
maxLength: 100
|
|
13197
|
+
}),
|
|
13198
|
+
createdByAgentId: Union([String$1({ format: "uuid" }), Null()]),
|
|
13199
|
+
createdByHumanId: Union([String$1({ format: "uuid" }), Null()]),
|
|
13200
|
+
createdAt: String$1({ format: "date-time" }),
|
|
13201
|
+
updatedAt: String$1({ format: "date-time" })
|
|
13202
|
+
}, {
|
|
13203
|
+
$id: "DaemonProfile",
|
|
13204
|
+
additionalProperties: false
|
|
13205
|
+
});
|
|
13206
|
+
//#endregion
|
|
13058
13207
|
//#region ../tasks/src/rubric.ts
|
|
13059
13208
|
/**
|
|
13060
13209
|
* Rubric — structured acceptance criteria used by judgment tasks.
|
|
@@ -16856,14 +17005,6 @@ var ExecutorTrustLevel = Union([
|
|
|
16856
17005
|
Literal("releaseVerifiedTool"),
|
|
16857
17006
|
Literal("sandboxAttested")
|
|
16858
17007
|
], { $id: "ExecutorTrustLevel" });
|
|
16859
|
-
/** Identifies a (provider, model) daemon pair allowed to claim a task. */
|
|
16860
|
-
var ExecutorRef = _Object_({
|
|
16861
|
-
provider: String$1({ minLength: 1 }),
|
|
16862
|
-
model: String$1({ minLength: 1 })
|
|
16863
|
-
}, {
|
|
16864
|
-
$id: "ExecutorRef",
|
|
16865
|
-
additionalProperties: false
|
|
16866
|
-
});
|
|
16867
17008
|
var OutputKind = Union([Literal("artifact"), Literal("judgment")], { $id: "OutputKind" });
|
|
16868
17009
|
var TaskMessageKind = Union([
|
|
16869
17010
|
Literal("text_delta"),
|
|
@@ -17008,7 +17149,7 @@ _Object_({
|
|
|
17008
17149
|
acceptedAttemptN: Union([Number$1(), Null()]),
|
|
17009
17150
|
claimCondition: Union([Unsafe(Ref$1("ClaimCondition")), Null()]),
|
|
17010
17151
|
requiredExecutorTrustLevel: ExecutorTrustLevel,
|
|
17011
|
-
|
|
17152
|
+
allowedProfiles: _Array_(DaemonProfileRef, { maxItems: 16 }),
|
|
17012
17153
|
status: TaskStatus,
|
|
17013
17154
|
queuedAt: IsoTimestamp,
|
|
17014
17155
|
completedAt: Union([IsoTimestamp, Null()]),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@themoltnet/pi-extension",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "MoltNet pi extension — sandboxed tool execution in Gondolin VMs with MoltNet identity and persistent memory",
|
|
6
6
|
"keywords": [
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"@earendil-works/gondolin": "^0.9.1",
|
|
37
37
|
"@opentelemetry/api": "^1.9.0",
|
|
38
38
|
"typebox": "^1.2.8",
|
|
39
|
-
"@themoltnet/
|
|
40
|
-
"@themoltnet/
|
|
39
|
+
"@themoltnet/sdk": "0.107.0",
|
|
40
|
+
"@themoltnet/agent-runtime": "0.23.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"@earendil-works/pi-coding-agent": ">=0.74.0",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"vite": "^8.0.0",
|
|
62
62
|
"vite-plugin-dts": "^4.5.4",
|
|
63
63
|
"vitest": "^3.0.0",
|
|
64
|
-
"@moltnet/
|
|
65
|
-
"@moltnet/
|
|
64
|
+
"@moltnet/tasks": "0.1.0",
|
|
65
|
+
"@moltnet/crypto-service": "0.1.0"
|
|
66
66
|
},
|
|
67
67
|
"engines": {
|
|
68
68
|
"node": ">=22"
|