@agentrific/server 0.1.0 → 0.1.2
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/CHANGELOG.md +13 -0
- package/README.md +37 -5
- package/cli.js +18 -6
- package/cli.js.map +2 -2
- package/index.js +18 -6
- package/index.js.map +2 -2
- package/package.json +14 -2
package/index.js
CHANGED
|
@@ -910,8 +910,20 @@ async function startControl(directory, security2, status, maintenance2) {
|
|
|
910
910
|
// package.json
|
|
911
911
|
var package_default = {
|
|
912
912
|
name: "@agentrific/server",
|
|
913
|
-
version: "0.1.
|
|
913
|
+
version: "0.1.2",
|
|
914
914
|
description: "Self-hosted control plane for long-running coding agents",
|
|
915
|
+
keywords: [
|
|
916
|
+
"agentrific",
|
|
917
|
+
"ai",
|
|
918
|
+
"android",
|
|
919
|
+
"cli",
|
|
920
|
+
"coding-agents",
|
|
921
|
+
"ios",
|
|
922
|
+
"pi",
|
|
923
|
+
"remote-control",
|
|
924
|
+
"self-hosted"
|
|
925
|
+
],
|
|
926
|
+
homepage: "https://agentrific.com",
|
|
915
927
|
repository: {
|
|
916
928
|
type: "git",
|
|
917
929
|
url: "git+https://github.com/devular/agentrific.git",
|
|
@@ -931,7 +943,7 @@ var package_default = {
|
|
|
931
943
|
cli: "AGENTRIFIC_DATA_DIR=./data tsx src/cli.ts"
|
|
932
944
|
},
|
|
933
945
|
dependencies: {
|
|
934
|
-
"@earendil-works/pi-coding-agent": "
|
|
946
|
+
"@earendil-works/pi-coding-agent": "1.0.0",
|
|
935
947
|
"@fastify/cors": "^11.3.0",
|
|
936
948
|
"@fastify/multipart": "^10.1.2",
|
|
937
949
|
"@inquirer/select": "^5.2.5",
|
|
@@ -2198,10 +2210,10 @@ ${logs}` : ""}`);
|
|
|
2198
2210
|
import { createAgentSession, SessionManager } from "@earendil-works/pi-coding-agent";
|
|
2199
2211
|
import { z as z9 } from "zod";
|
|
2200
2212
|
var DraftSchema = z9.object({ title: z9.string().trim().min(1).max(120), body: z9.string().trim().min(1).max(1e4) }).strict();
|
|
2201
|
-
function deliveryWriter(models2) {
|
|
2213
|
+
function deliveryWriter(models2, createSession = createAgentSession) {
|
|
2202
2214
|
return async (run, input, diff, signal) => {
|
|
2203
2215
|
signal?.throwIfAborted();
|
|
2204
|
-
const { session } = await
|
|
2216
|
+
const { session } = await createSession({
|
|
2205
2217
|
cwd: run.workspacePath,
|
|
2206
2218
|
model: await models2.resolve(run.model ?? await models2.defaultReference()),
|
|
2207
2219
|
modelRuntime: models2.runtime,
|
|
@@ -2404,11 +2416,11 @@ function toolOutput(value) {
|
|
|
2404
2416
|
const text = parsed.success ? parsed.data.content?.filter((part) => part.type === "text").map((part) => part.text || "").join("\n") || "Completed without text output." : boundedJson(value, 4e3);
|
|
2405
2417
|
return text.length > 4e3 ? `${text.slice(0, 4e3)}\u2026 [truncated]` : text;
|
|
2406
2418
|
}
|
|
2407
|
-
function createPiFactory(files, models2, delivery2) {
|
|
2419
|
+
function createPiFactory(files, models2, delivery2, createSession = createAgentSession2) {
|
|
2408
2420
|
return {
|
|
2409
2421
|
async open(sessionId, cwd, sessionDirectory, selected = legacyModel, run) {
|
|
2410
2422
|
const model = await models2.resolve(selected);
|
|
2411
|
-
const { session } = await
|
|
2423
|
+
const { session } = await createSession({
|
|
2412
2424
|
cwd,
|
|
2413
2425
|
model,
|
|
2414
2426
|
modelRuntime: models2.runtime,
|