@chipschat/acp 1.0.13 → 1.0.15
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/THIRD-PARTY-NOTICES.md +1 -1
- package/dist/main.js +12 -5
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -28375,18 +28375,25 @@ function configPathOf(word, home = homedir5()) {
|
|
|
28375
28375
|
const places = placesOf2(home);
|
|
28376
28376
|
const target = configTargetOf(word, home);
|
|
28377
28377
|
const under = inside2(places.settings, target);
|
|
28378
|
-
|
|
28379
|
-
|
|
28378
|
+
if (under === void 0) return target;
|
|
28379
|
+
const old = join8(places.oldSettings, under);
|
|
28380
|
+
const kept2 = (path) => existsSync7(path) || existsSync7(path.replace(/\.json$/, ""));
|
|
28381
|
+
return kept2(old) && !kept2(target) ? old : target;
|
|
28380
28382
|
}
|
|
28381
28383
|
function foldersPathOf(path, home = homedir5()) {
|
|
28382
28384
|
const places = placesOf2(home);
|
|
28383
|
-
|
|
28385
|
+
const whole2 = resolve2(fromHome(path, home));
|
|
28386
|
+
const under = inside2(places.agents, whole2);
|
|
28387
|
+
const old = under === void 0 ? void 0 : join8(places.oldAgents, under);
|
|
28388
|
+
if (old !== void 0 && existsSync7(old) && !existsSync7(whole2)) return old;
|
|
28389
|
+
return nowAt(whole2, places.oldAgents, places.agents);
|
|
28384
28390
|
}
|
|
28385
28391
|
|
|
28386
28392
|
// src/keep.ts
|
|
28387
28393
|
var flags = process.argv.slice(2);
|
|
28388
28394
|
var words3 = flags.filter((word) => !word.startsWith("--"));
|
|
28389
|
-
var
|
|
28395
|
+
var handsOver = flags.includes("--keep");
|
|
28396
|
+
var whole = (word) => configTargetOf(word);
|
|
28390
28397
|
var here = fileURLToPath2(new URL("..", import.meta.url)).replace(/\/$/, "");
|
|
28391
28398
|
var self = fileURLToPath2(import.meta.url);
|
|
28392
28399
|
var run = self.endsWith(".js") ? [self] : ["--import", "tsx", "src/main.ts"];
|
|
@@ -28683,7 +28690,7 @@ var LABEL = `chat.chips.acp.${basename6(configTargetOf(words3[0]), ".json")}`;
|
|
|
28683
28690
|
stopIfAsked(LABEL);
|
|
28684
28691
|
var log = (line) => process.stdout.write(`${(/* @__PURE__ */ new Date()).toISOString()} ${line}
|
|
28685
28692
|
`);
|
|
28686
|
-
moveOld(configTargetOf(words3[0]), log);
|
|
28693
|
+
if (!handsOver) moveOld(configTargetOf(words3[0]), log);
|
|
28687
28694
|
var configPath = configPathOf(words3[0]);
|
|
28688
28695
|
var kind;
|
|
28689
28696
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chipschat/acp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "An agent that speaks the Agent Client Protocol, as a Chips harness of its kind: agents made from Chips, each in a folder of its own, each room a session.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|