@iniesta8888/agent-live-pi-adapter 0.3.0 → 0.3.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/dist/adapter.js +22 -22
- package/package.json +2 -2
package/dist/adapter.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// plugins/agent-live/src/core/mapping.ts
|
|
2
2
|
var DELEGATION_TOOLS = /^(subagent|task|dispatch_agent|spawn_agent|agent)$/i;
|
|
3
3
|
var ACTION_BY_TOOL = [
|
|
4
4
|
[/^(read|ls|glob|grep|find|rg|search_files|list)/i, "archive"],
|
|
@@ -81,7 +81,7 @@ function describeDelegation(args = {}) {
|
|
|
81
81
|
return out;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
//
|
|
84
|
+
// plugins/agent-live/src/core/limits.ts
|
|
85
85
|
var SCENE_LIMITS = Object.freeze({
|
|
86
86
|
agents: 16,
|
|
87
87
|
seats: 8,
|
|
@@ -94,7 +94,7 @@ var SCENE_LIMITS = Object.freeze({
|
|
|
94
94
|
queuedBubbles: 8
|
|
95
95
|
});
|
|
96
96
|
|
|
97
|
-
//
|
|
97
|
+
// plugins/agent-live/src/core/state.ts
|
|
98
98
|
var MAX_LOG = 200;
|
|
99
99
|
var MAX_HISTORY = 4e3;
|
|
100
100
|
var THOUGHT_FLUSH_MS = 180;
|
|
@@ -282,7 +282,7 @@ var OfficeState = class {
|
|
|
282
282
|
}
|
|
283
283
|
};
|
|
284
284
|
|
|
285
|
-
//
|
|
285
|
+
// plugins/agent-live/src/runtime/server.ts
|
|
286
286
|
import { spawn } from "node:child_process";
|
|
287
287
|
import * as fs from "node:fs";
|
|
288
288
|
import * as http from "node:http";
|
|
@@ -562,13 +562,13 @@ function openInBrowser(url) {
|
|
|
562
562
|
child.unref();
|
|
563
563
|
}
|
|
564
564
|
|
|
565
|
-
//
|
|
565
|
+
// plugins/agent-live/src/runtime/content-service.ts
|
|
566
566
|
import os from "node:os";
|
|
567
567
|
import path5 from "node:path";
|
|
568
568
|
import { existsSync as existsSync2 } from "node:fs";
|
|
569
569
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
570
570
|
|
|
571
|
-
//
|
|
571
|
+
// plugins/agent-live/src/content/library.ts
|
|
572
572
|
import { readFile as readFile2 } from "node:fs/promises";
|
|
573
573
|
import path2 from "node:path";
|
|
574
574
|
async function readJson2(file) {
|
|
@@ -614,12 +614,12 @@ async function loadOfficialOffices(contentRoot) {
|
|
|
614
614
|
return Promise.all(publicIds.map((id) => readJson2(path2.join(contentRoot, "official-offices", `${id}.json`))));
|
|
615
615
|
}
|
|
616
616
|
|
|
617
|
-
//
|
|
617
|
+
// plugins/agent-live/src/content/registry.ts
|
|
618
618
|
import { EventEmitter } from "node:events";
|
|
619
619
|
import { mkdir, readFile as readFile3, readdir, rename, rm, writeFile } from "node:fs/promises";
|
|
620
620
|
import path3 from "node:path";
|
|
621
621
|
|
|
622
|
-
//
|
|
622
|
+
// plugins/agent-live/src/content/schema.ts
|
|
623
623
|
var OFFICE_SPEC_SCHEMA_VERSION = 1;
|
|
624
624
|
var GENDER_VALUES = ["female", "male", "nonbinary", "unspecified"];
|
|
625
625
|
var POSE_VALUES = ["stand", "sit"];
|
|
@@ -819,7 +819,7 @@ function validateOfficePatchShape(input) {
|
|
|
819
819
|
return issues;
|
|
820
820
|
}
|
|
821
821
|
|
|
822
|
-
//
|
|
822
|
+
// plugins/agent-live/src/content/graph-validator.ts
|
|
823
823
|
var WORK_CAPABILITIES = ["research", "create", "compute", "plan", "communicate", "collaborate"];
|
|
824
824
|
var DYNAMIC_ACTIVITY_TARGETS = /* @__PURE__ */ new Set(["near-colleague"]);
|
|
825
825
|
function namedInstance(requirement) {
|
|
@@ -974,7 +974,7 @@ function graphIssueMessages(content) {
|
|
|
974
974
|
return graphIssues(content).map((issue2) => issue2.message);
|
|
975
975
|
}
|
|
976
976
|
|
|
977
|
-
//
|
|
977
|
+
// plugins/agent-live/src/content/validator.ts
|
|
978
978
|
function add(issues, code, path6, message) {
|
|
979
979
|
issues.push({ code, path: path6, message });
|
|
980
980
|
}
|
|
@@ -1114,7 +1114,7 @@ function validateOfficeSpec(spec, library) {
|
|
|
1114
1114
|
return { valid: issues.length === 0, issues };
|
|
1115
1115
|
}
|
|
1116
1116
|
|
|
1117
|
-
//
|
|
1117
|
+
// plugins/agent-live/src/content/registry.ts
|
|
1118
1118
|
var SAFE_LOCAL_ID = /^local\/[a-z0-9][a-z0-9-]*(?:\/[a-z0-9][a-z0-9-]*)*$/;
|
|
1119
1119
|
var OfficeRegistry = class {
|
|
1120
1120
|
root;
|
|
@@ -1230,7 +1230,7 @@ var OfficeRegistry = class {
|
|
|
1230
1230
|
}
|
|
1231
1231
|
};
|
|
1232
1232
|
|
|
1233
|
-
//
|
|
1233
|
+
// plugins/agent-live/src/content/runtime-content.ts
|
|
1234
1234
|
import { readFile as readFile4 } from "node:fs/promises";
|
|
1235
1235
|
import path4 from "node:path";
|
|
1236
1236
|
var readJson3 = async (file) => JSON.parse(await readFile4(file, "utf8"));
|
|
@@ -1310,7 +1310,7 @@ async function resolveRuntimeContent(spec, contentRoot, library) {
|
|
|
1310
1310
|
};
|
|
1311
1311
|
}
|
|
1312
1312
|
|
|
1313
|
-
//
|
|
1313
|
+
// plugins/agent-live/src/content/compiler.ts
|
|
1314
1314
|
function compileOfficeSpec(input, library) {
|
|
1315
1315
|
const validation = validateOfficeSpec(input, library);
|
|
1316
1316
|
if (!validation.valid) return { errors: validation.issues, adjustments: [] };
|
|
@@ -1459,7 +1459,7 @@ function compileOfficePatch(base, patchInput, library) {
|
|
|
1459
1459
|
return { draft: compiled.draft, errors: compiled.errors, adjustments: [...adjustments, ...compiled.adjustments] };
|
|
1460
1460
|
}
|
|
1461
1461
|
|
|
1462
|
-
//
|
|
1462
|
+
// plugins/agent-live/src/runtime/content-service.ts
|
|
1463
1463
|
function pluginRoot() {
|
|
1464
1464
|
return path5.resolve(path5.dirname(fileURLToPath2(import.meta.url)), "../..");
|
|
1465
1465
|
}
|
|
@@ -1510,7 +1510,7 @@ var OfficeContentService = class _OfficeContentService {
|
|
|
1510
1510
|
}
|
|
1511
1511
|
};
|
|
1512
1512
|
|
|
1513
|
-
//
|
|
1513
|
+
// plugins/agent-live/src/runtime/resource-guard.ts
|
|
1514
1514
|
var DEFAULT_CLEANUP_TIMEOUT_MS = 5e3;
|
|
1515
1515
|
var ResourceGuard = class {
|
|
1516
1516
|
resources = [];
|
|
@@ -1563,7 +1563,7 @@ function withTimeout(operation, timeoutMs, name) {
|
|
|
1563
1563
|
});
|
|
1564
1564
|
}
|
|
1565
1565
|
|
|
1566
|
-
//
|
|
1566
|
+
// plugins/agent-live/src/runtime/agent-live-runtime.ts
|
|
1567
1567
|
var AgentLiveRuntime = class {
|
|
1568
1568
|
cwd;
|
|
1569
1569
|
state;
|
|
@@ -1602,7 +1602,7 @@ var AgentLiveRuntime = class {
|
|
|
1602
1602
|
}
|
|
1603
1603
|
};
|
|
1604
1604
|
|
|
1605
|
-
//
|
|
1605
|
+
// plugins/agent-live/src/core/agents.ts
|
|
1606
1606
|
var DEFAULT_LEAVE_DELAY_MS = 2600;
|
|
1607
1607
|
var ROLE_NAMES = {
|
|
1608
1608
|
scout: "\u4FA6\u5BDF\u5458",
|
|
@@ -1734,10 +1734,10 @@ var AgentRegistry = class {
|
|
|
1734
1734
|
}
|
|
1735
1735
|
};
|
|
1736
1736
|
|
|
1737
|
-
// src/adapter.ts
|
|
1737
|
+
// packages/pi/src/adapter.ts
|
|
1738
1738
|
import { randomBytes } from "node:crypto";
|
|
1739
1739
|
|
|
1740
|
-
//
|
|
1740
|
+
// plugins/agent-live/src/creator/service.ts
|
|
1741
1741
|
var COMPONENT_CATEGORIES = ["summary", "room", "npcs", "props", "activities", "appearance", "environment", "all"];
|
|
1742
1742
|
function roomView(library, office) {
|
|
1743
1743
|
const layout = library.layouts.get(office.layout);
|
|
@@ -1872,7 +1872,7 @@ var CreatorService = class {
|
|
|
1872
1872
|
}
|
|
1873
1873
|
};
|
|
1874
1874
|
|
|
1875
|
-
//
|
|
1875
|
+
// plugins/agent-live/src/creator/commands.ts
|
|
1876
1876
|
function object2(value) {
|
|
1877
1877
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
1878
1878
|
}
|
|
@@ -1912,7 +1912,7 @@ var CreatorCommandRouter = class {
|
|
|
1912
1912
|
}
|
|
1913
1913
|
};
|
|
1914
1914
|
|
|
1915
|
-
//
|
|
1915
|
+
// plugins/agent-live/src/creator/mode.ts
|
|
1916
1916
|
var CREATOR_MODE_CONTEXT = `Agent Live Creator Mode is active for this session.
|
|
1917
1917
|
Treat office-related natural language as a request to modify the currently selected Custom Office and use the agent_live_creator tool.
|
|
1918
1918
|
The currently selected Office is the only edit target. Do not inspect files, search for another copy, deliberate about replacement, invent a new Office id, or pass base/id unless the user explicitly selected another listed Office.
|
|
@@ -1940,7 +1940,7 @@ var CreatorModeRegistry = class {
|
|
|
1940
1940
|
}
|
|
1941
1941
|
};
|
|
1942
1942
|
|
|
1943
|
-
// src/adapter.ts
|
|
1943
|
+
// packages/pi/src/adapter.ts
|
|
1944
1944
|
var MAIN = "main";
|
|
1945
1945
|
var PI_CREATOR_SESSION = "pi-current-session";
|
|
1946
1946
|
var DEFAULT_PORT = Number(process.env.AGENT_LIVE_PI_PORT ?? 7788);
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iniesta8888/agent-live-pi-adapter",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Pi adapter for the Agent Live pixel office",
|
|
6
|
-
"keywords": ["pi-extension", "coding-agent", "agent-live", "pixel-office"],
|
|
6
|
+
"keywords": ["pi-package", "pi-extension", "coding-agent", "agent-live", "pixel-office"],
|
|
7
7
|
"author": "ssssnail",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"repository": {
|