@tangle-network/agent-profile-materialize 1.1.130 → 1.1.132
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.js +33 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1372,6 +1372,29 @@ function replacementContent(file, context) {
|
|
|
1372
1372
|
return bytes !== void 0 && workspaceFileExists(record) && regularFileContent(record) === sha256Hex$1(bytes) ? planned : void 0;
|
|
1373
1373
|
}
|
|
1374
1374
|
const recordPath = (file, context) => join(context.rootFor(file.root), ".agent-profile-written", sha256Hex$1(file.relPath));
|
|
1375
|
+
/**
|
|
1376
|
+
* A runtime-only file that an earlier apply published at its path (OpenCode's
|
|
1377
|
+
* `opencode.json` before it moved inline) goes, with its record, while it
|
|
1378
|
+
* holds exactly the bytes that record names and the writer's ownership. A
|
|
1379
|
+
* file anyone wrote or changed since, or one with no record, stays.
|
|
1380
|
+
*/
|
|
1381
|
+
function removeUnchangedRuntimeOnlyFiles(files, context) {
|
|
1382
|
+
if (context.existingFiles !== "allow-identical") return;
|
|
1383
|
+
for (const file of files) {
|
|
1384
|
+
const record = recordPath(file, context);
|
|
1385
|
+
try {
|
|
1386
|
+
assertNoSymlinkPathComponents(file.rootDir, file.absPath);
|
|
1387
|
+
assertNoSymlinkPathComponents(file.rootDir, record);
|
|
1388
|
+
} catch {
|
|
1389
|
+
continue;
|
|
1390
|
+
}
|
|
1391
|
+
if (!workspaceFileExists(file.absPath) || !workspaceFileExists(record)) continue;
|
|
1392
|
+
const content = regularFileContent(file.absPath);
|
|
1393
|
+
if (content === void 0 || regularFileContent(record) !== sha256Hex$1(content) || !holdsCurrentOwnership(file.absPath, context.ownership)) continue;
|
|
1394
|
+
unlinkSync(file.absPath);
|
|
1395
|
+
unlinkSync(record);
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1375
1398
|
function recordWrites(writes, context) {
|
|
1376
1399
|
if (context.existingFiles !== "allow-identical") return;
|
|
1377
1400
|
for (const file of writes) {
|
|
@@ -1534,12 +1557,20 @@ function selectResumeFiles(files, ownership, privateFilePaths) {
|
|
|
1534
1557
|
}
|
|
1535
1558
|
function applyResolvedWorkspacePlan(publicPlan, resolvedPlan, workspaceDir, options, publicPlanDigest = hashWorkspacePlan(publicPlan)) {
|
|
1536
1559
|
const { rootFor, runtimeOnlyFiles, ownership, privateFilePaths, existingFiles } = readApplyInput(publicPlan, workspaceDir, options);
|
|
1537
|
-
const
|
|
1538
|
-
const files = resolvedPlan.files.filter((file) => file.root !== "workspace" || !runtimeOnlyFiles.has(file.relPath)).map((file) => ({
|
|
1560
|
+
const located = resolvedPlan.files.map((file) => ({
|
|
1539
1561
|
...file,
|
|
1540
1562
|
rootDir: rootFor(file.root),
|
|
1541
1563
|
absPath: resolveWorkspaceFilePath(rootFor(file.root), file.relPath)
|
|
1542
1564
|
}));
|
|
1565
|
+
const isRuntimeOnly = (file) => file.root === "workspace" && runtimeOnlyFiles.has(file.relPath);
|
|
1566
|
+
const runtimeOnly = located.filter(isRuntimeOnly);
|
|
1567
|
+
const privateRuntimeFiles = Object.fromEntries(runtimeOnly.map((file) => [file.relPath, file.content]));
|
|
1568
|
+
const files = located.filter((file) => !isRuntimeOnly(file));
|
|
1569
|
+
removeUnchangedRuntimeOnlyFiles(runtimeOnly, {
|
|
1570
|
+
rootFor,
|
|
1571
|
+
existingFiles,
|
|
1572
|
+
ownership
|
|
1573
|
+
});
|
|
1543
1574
|
const application = {
|
|
1544
1575
|
receipt: {
|
|
1545
1576
|
workspacePlanDigest: publicPlanDigest,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-profile-materialize",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.132",
|
|
4
4
|
"description": "Materialize an AgentProfile into the native per-harness workspace files (the one shared materializer for cli-bridge, agent-container, and VB).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@tangle-network/agent-interface": "^5.10.27"
|
|
38
38
|
},
|
|
39
39
|
"tangleRelease": {
|
|
40
|
-
"sourceSha": "
|
|
41
|
-
"mergedAt": "2026-11-
|
|
40
|
+
"sourceSha": "b6a87cee2bd2db8c8aa22b4022a4c60abc0564c0",
|
|
41
|
+
"mergedAt": "2026-11-17T12:59:33-08:00"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "tsdown",
|