@themoltnet/agent-daemon 0.27.1 → 0.28.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 +6 -5
- package/dist/main.js +114 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -244,10 +244,11 @@ and private diary id.
|
|
|
244
244
|
### 3. Start the daemon against the local stack
|
|
245
245
|
|
|
246
246
|
The daemon picks up the API URL from the agent's `moltnet.json`. It is a
|
|
247
|
-
workspace package, not a global CLI — invoke it
|
|
247
|
+
workspace package, not a global CLI — invoke it through Nx so execution stays
|
|
248
|
+
rooted in the workspace task graph:
|
|
248
249
|
|
|
249
250
|
```bash
|
|
250
|
-
pnpm
|
|
251
|
+
pnpm exec nx run @themoltnet/agent-daemon:dev -- poll \
|
|
251
252
|
--agent local-dev \
|
|
252
253
|
--team "$MOLTNET_TEAM_ID" \
|
|
253
254
|
--task-types fulfill_brief \
|
|
@@ -259,8 +260,8 @@ pnpm --filter @themoltnet/agent-daemon dev poll \
|
|
|
259
260
|
registered type.
|
|
260
261
|
- Pick a runtime profile whose provider/model matches your Pi auth credits.
|
|
261
262
|
Set `MOLTNET_AGENT_PROFILE` to the profile UUID or team-scoped profile name.
|
|
262
|
-
- `dev` (= `tsx watch src/main.ts`) is fine for local. Use `cli`
|
|
263
|
-
one-shot run without watch.
|
|
263
|
+
- `dev` (= `tsx watch src/main.ts`) is fine for local. Use the Nx `cli` target
|
|
264
|
+
for a one-shot run without watch.
|
|
264
265
|
|
|
265
266
|
Leave it running. It idles until a task lands in its queue.
|
|
266
267
|
|
|
@@ -325,7 +326,7 @@ against the local e2e stack before the new schema exists on a deployed API.
|
|
|
325
326
|
Start the daemon with `--task-types pr_review`:
|
|
326
327
|
|
|
327
328
|
```bash
|
|
328
|
-
pnpm
|
|
329
|
+
pnpm exec nx run @themoltnet/agent-daemon:dev -- poll \
|
|
329
330
|
--agent local-dev \
|
|
330
331
|
--team "$MOLTNET_TEAM_ID" \
|
|
331
332
|
--task-types pr_review \
|
package/dist/main.js
CHANGED
|
@@ -4936,6 +4936,97 @@ var VerificationRecord = _Object_({
|
|
|
4936
4936
|
$id: "VerificationRecord",
|
|
4937
4937
|
additionalProperties: false
|
|
4938
4938
|
});
|
|
4939
|
+
_Object_({
|
|
4940
|
+
artifacts: _Array_(_Object_({
|
|
4941
|
+
id: String$1({ format: "uuid" }),
|
|
4942
|
+
teamId: String$1({ format: "uuid" }),
|
|
4943
|
+
taskId: String$1({ format: "uuid" }),
|
|
4944
|
+
attemptN: Integer({ minimum: 1 }),
|
|
4945
|
+
kind: String$1({
|
|
4946
|
+
minLength: 1,
|
|
4947
|
+
maxLength: 100
|
|
4948
|
+
}),
|
|
4949
|
+
title: String$1({
|
|
4950
|
+
minLength: 1,
|
|
4951
|
+
maxLength: 255
|
|
4952
|
+
}),
|
|
4953
|
+
contentType: String$1({
|
|
4954
|
+
minLength: 1,
|
|
4955
|
+
maxLength: 200
|
|
4956
|
+
}),
|
|
4957
|
+
contentEncoding: Union([String$1({
|
|
4958
|
+
minLength: 1,
|
|
4959
|
+
maxLength: 100
|
|
4960
|
+
}), Null()]),
|
|
4961
|
+
sizeBytes: Integer({ minimum: 0 }),
|
|
4962
|
+
cid: String$1({
|
|
4963
|
+
minLength: 1,
|
|
4964
|
+
maxLength: 100
|
|
4965
|
+
}),
|
|
4966
|
+
createdByAgentId: String$1({ format: "uuid" }),
|
|
4967
|
+
expiresAt: Union([String$1({ format: "date-time" }), Null()]),
|
|
4968
|
+
createdAt: String$1({ format: "date-time" })
|
|
4969
|
+
}, { $id: "TaskArtifact" })),
|
|
4970
|
+
nextCursor: Union([String$1({ minLength: 1 }), Null()])
|
|
4971
|
+
}, { $id: "TaskArtifactList" });
|
|
4972
|
+
_Object_({
|
|
4973
|
+
limit: Optional(Integer({
|
|
4974
|
+
minimum: 1,
|
|
4975
|
+
maximum: 100
|
|
4976
|
+
})),
|
|
4977
|
+
cursor: Optional(String$1({ minLength: 1 }))
|
|
4978
|
+
}, {
|
|
4979
|
+
$id: "ListTaskArtifactsQuery",
|
|
4980
|
+
additionalProperties: false
|
|
4981
|
+
});
|
|
4982
|
+
_Object_({
|
|
4983
|
+
kind: String$1({
|
|
4984
|
+
minLength: 1,
|
|
4985
|
+
maxLength: 100
|
|
4986
|
+
}),
|
|
4987
|
+
title: String$1({
|
|
4988
|
+
minLength: 1,
|
|
4989
|
+
maxLength: 255
|
|
4990
|
+
}),
|
|
4991
|
+
contentType: Optional(String$1({
|
|
4992
|
+
minLength: 1,
|
|
4993
|
+
maxLength: 200
|
|
4994
|
+
})),
|
|
4995
|
+
contentEncoding: Optional(String$1({
|
|
4996
|
+
minLength: 1,
|
|
4997
|
+
maxLength: 100
|
|
4998
|
+
}))
|
|
4999
|
+
}, {
|
|
5000
|
+
$id: "UploadTaskArtifactQuery",
|
|
5001
|
+
additionalProperties: false
|
|
5002
|
+
});
|
|
5003
|
+
String$1({
|
|
5004
|
+
$id: "TaskArtifactContent",
|
|
5005
|
+
description: "Task artifact content stream.",
|
|
5006
|
+
format: "binary"
|
|
5007
|
+
});
|
|
5008
|
+
_Object_({ taskId: String$1({ format: "uuid" }) }, {
|
|
5009
|
+
$id: "TaskArtifactTaskParams",
|
|
5010
|
+
additionalProperties: false
|
|
5011
|
+
});
|
|
5012
|
+
_Object_({
|
|
5013
|
+
taskId: String$1({ format: "uuid" }),
|
|
5014
|
+
attemptN: Integer({ minimum: 1 })
|
|
5015
|
+
}, {
|
|
5016
|
+
$id: "TaskArtifactAttemptParams",
|
|
5017
|
+
additionalProperties: false
|
|
5018
|
+
});
|
|
5019
|
+
_Object_({
|
|
5020
|
+
taskId: String$1({ format: "uuid" }),
|
|
5021
|
+
attemptN: Integer({ minimum: 1 }),
|
|
5022
|
+
cid: String$1({
|
|
5023
|
+
minLength: 1,
|
|
5024
|
+
maxLength: 100
|
|
5025
|
+
})
|
|
5026
|
+
}, {
|
|
5027
|
+
$id: "TaskArtifactContentParams",
|
|
5028
|
+
additionalProperties: false
|
|
5029
|
+
});
|
|
4939
5030
|
//#endregion
|
|
4940
5031
|
//#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/bytes.js
|
|
4941
5032
|
function coerce(o) {
|
|
@@ -5655,6 +5746,10 @@ var FreeformArtifact = _Object_({
|
|
|
5655
5746
|
description: Optional(String$1({ minLength: 1 })),
|
|
5656
5747
|
url: Optional(String$1({ minLength: 1 })),
|
|
5657
5748
|
path: Optional(String$1({ minLength: 1 })),
|
|
5749
|
+
cid: Optional(String$1({ minLength: 1 })),
|
|
5750
|
+
contentType: Optional(String$1({ minLength: 1 })),
|
|
5751
|
+
contentEncoding: Optional(String$1({ minLength: 1 })),
|
|
5752
|
+
sizeBytes: Optional(Integer({ minimum: 0 })),
|
|
5658
5753
|
body: Optional(String$1({ maxLength: 65536 }))
|
|
5659
5754
|
}, {
|
|
5660
5755
|
$id: "FreeformArtifact",
|
|
@@ -9084,7 +9179,23 @@ var TaskRef = _Object_({
|
|
|
9084
9179
|
url: Optional(String$1()),
|
|
9085
9180
|
commit_sha: Optional(String$1()),
|
|
9086
9181
|
snapshot_cid: Optional(Cid)
|
|
9087
|
-
}))
|
|
9182
|
+
})),
|
|
9183
|
+
artifact: Optional(_Object_({
|
|
9184
|
+
cid: Cid,
|
|
9185
|
+
attemptN: Integer({ minimum: 1 }),
|
|
9186
|
+
kind: Optional(String$1({
|
|
9187
|
+
minLength: 1,
|
|
9188
|
+
maxLength: 100
|
|
9189
|
+
})),
|
|
9190
|
+
title: Optional(String$1({
|
|
9191
|
+
minLength: 1,
|
|
9192
|
+
maxLength: 255
|
|
9193
|
+
})),
|
|
9194
|
+
contentType: Optional(String$1({
|
|
9195
|
+
minLength: 1,
|
|
9196
|
+
maxLength: 200
|
|
9197
|
+
}))
|
|
9198
|
+
}, { additionalProperties: false }))
|
|
9088
9199
|
}, {
|
|
9089
9200
|
$id: "TaskRef",
|
|
9090
9201
|
additionalProperties: false
|
|
@@ -10899,6 +11010,7 @@ async function runPolling(opts) {
|
|
|
10899
11010
|
topK: profile.topK,
|
|
10900
11011
|
maxOutputTokens: profile.maxOutputTokens,
|
|
10901
11012
|
sandboxConfig: sandbox.config,
|
|
11013
|
+
forwardEnv: profile.requiredEnv,
|
|
10902
11014
|
makeExecutionPlan: (task) => executionPlans.getOrCreate(task),
|
|
10903
11015
|
makeOnTurnEvent: makeTurnEventHandlerFactory(taskLogger),
|
|
10904
11016
|
maxTurns: common.maxTurns,
|
|
@@ -11153,6 +11265,7 @@ async function runOnce(argv) {
|
|
|
11153
11265
|
topK: profile.topK,
|
|
11154
11266
|
maxOutputTokens: profile.maxOutputTokens,
|
|
11155
11267
|
sandboxConfig: sandbox.config,
|
|
11268
|
+
forwardEnv: profile.requiredEnv,
|
|
11156
11269
|
makeExecutionPlan: (claimedTask) => executionPlans.getOrCreate(claimedTask),
|
|
11157
11270
|
onTurnEvent: makeTurnEventHandler(rootLogger, { taskId }),
|
|
11158
11271
|
maxTurns: opts.maxTurns,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@themoltnet/agent-daemon",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "MoltNet agent daemon — claims and executes tasks (fulfill_brief, assess_brief) from the MoltNet task-service via Pi-headless. CLI: moltnet-agent.",
|
|
@@ -45,19 +45,19 @@
|
|
|
45
45
|
"@opentelemetry/semantic-conventions": "^1.39.0",
|
|
46
46
|
"pino": "^10.3.1",
|
|
47
47
|
"pino-pretty": "^13.1.3",
|
|
48
|
-
"@themoltnet/
|
|
49
|
-
"@themoltnet/
|
|
50
|
-
"@themoltnet/
|
|
48
|
+
"@themoltnet/agent-runtime": "0.33.0",
|
|
49
|
+
"@themoltnet/pi-extension": "0.30.0",
|
|
50
|
+
"@themoltnet/sdk": "0.116.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"tsx": "^4.7.0",
|
|
54
54
|
"typescript": "~5.9.2",
|
|
55
55
|
"vite": "^8.0.0",
|
|
56
56
|
"vitest": "^3.0.0",
|
|
57
|
-
"@moltnet/
|
|
57
|
+
"@moltnet/bootstrap": "0.1.0",
|
|
58
58
|
"@moltnet/crypto-service": "0.1.0",
|
|
59
59
|
"@moltnet/tasks": "0.1.0",
|
|
60
|
-
"@moltnet/
|
|
60
|
+
"@moltnet/observability": "0.1.0"
|
|
61
61
|
},
|
|
62
62
|
"nx": {
|
|
63
63
|
"tags": [
|