paseo-room 0.4.0 → 0.4.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/index.js CHANGED
@@ -15,7 +15,7 @@ var init_package = __esm({
15
15
  "package.json"() {
16
16
  package_default = {
17
17
  name: "paseo-room",
18
- version: "0.4.0",
18
+ version: "0.4.1",
19
19
  description: "One CLI that configures Codex, Claude Code, and Pi role homes in $HOME and registers them with your local Paseo daemon.",
20
20
  keywords: [
21
21
  "paseo",
@@ -270,7 +270,7 @@ async function lstatOrAbsent(path) {
270
270
  }
271
271
  }
272
272
  async function staleChildren(entry) {
273
- const declared = new Set(entry.children);
273
+ const declared = /* @__PURE__ */ new Set([...entry.children, ...entry.reserved ?? []]);
274
274
  let names;
275
275
  try {
276
276
  names = await readdir(entry.path);
@@ -1040,9 +1040,9 @@ function isPaseoSkill(name) {
1040
1040
  function receivesExecutableResources(role) {
1041
1041
  return role !== "peer";
1042
1042
  }
1043
- async function skillNames(path) {
1043
+ async function skillNames(path, reserved) {
1044
1044
  try {
1045
- return (await readdir2(path)).filter((name) => !isPaseoSkill(name)).sort();
1045
+ return (await readdir2(path)).filter((name) => !isPaseoSkill(name) && !reserved.has(name)).sort();
1046
1046
  } catch (error) {
1047
1047
  if (error !== null && typeof error === "object" && "code" in error && error.code === "ENOENT") return [];
1048
1048
  throw error;
@@ -1051,6 +1051,7 @@ async function skillNames(path) {
1051
1051
  async function roleResourceEntries(input) {
1052
1052
  const present = new Set(input.shared);
1053
1053
  const executable = new Set(input.executable);
1054
+ const reserved = new Set(input.reservedSkills ?? []);
1054
1055
  const entries = [];
1055
1056
  for (const name of input.names) {
1056
1057
  const path = join6(input.home, name);
@@ -1058,8 +1059,14 @@ async function roleResourceEntries(input) {
1058
1059
  if (!receivesExecutableResources(input.role)) {
1059
1060
  if (executable.has(name)) continue;
1060
1061
  if (name === SKILLS) {
1061
- const children = present.has(path) ? await skillNames(path) : [];
1062
- entries.push({ kind: "managed-dir", path: alias, children, legacyLink: path });
1062
+ const children = present.has(path) ? await skillNames(path, reserved) : [];
1063
+ entries.push({
1064
+ kind: "managed-dir",
1065
+ path: alias,
1066
+ children,
1067
+ legacyLink: path,
1068
+ ...reserved.size === 0 ? {} : { reserved: [...reserved] }
1069
+ });
1063
1070
  for (const child of children) entries.push({ kind: "link", path: join6(alias, child), target: join6(path, child) });
1064
1071
  continue;
1065
1072
  }
@@ -1174,7 +1181,7 @@ function mcpDriftCheck(role, home, path, divergence) {
1174
1181
  `If this role should have the same servers, add them with: CLAUDE_CONFIG_DIR=${home} claude mcp add ... \u2014 or delete ${path} and run setup --apply to reseed it from your current Claude state, which discards that role's other runtime state.`
1175
1182
  );
1176
1183
  }
1177
- var SHARED, EXECUTABLE, MCP_KEY, AUTH_ENV, CONTROL_PLANE_ENV, SECURE_STORAGE_ENV, SEEDED_KEYS, claudeAgent;
1184
+ var SHARED, EXECUTABLE, RUNTIME_SKILLS, MCP_KEY, AUTH_ENV, CONTROL_PLANE_ENV, SECURE_STORAGE_ENV, SEEDED_KEYS, claudeAgent;
1178
1185
  var init_claude = __esm({
1179
1186
  "src/agents/claude.ts"() {
1180
1187
  "use strict";
@@ -1197,6 +1204,7 @@ var init_claude = __esm({
1197
1204
  "themes"
1198
1205
  ];
1199
1206
  EXECUTABLE = ["plugins", "commands", "hooks"];
1207
+ RUNTIME_SKILLS = ["synced"];
1200
1208
  MCP_KEY = "mcpServers";
1201
1209
  AUTH_ENV = [
1202
1210
  "ANTHROPIC_AUTH_TOKEN",
@@ -1298,7 +1306,7 @@ var init_claude = __esm({
1298
1306
  entries.push(memory === void 0 ? { kind: "absent", path: memoryPath } : { kind: "file", path: memoryPath, content: memory });
1299
1307
  entries.push({ kind: "file", path: join7(target, "settings.json"), content: renderRoleSettings(settingsSource, role, target) });
1300
1308
  entries.push({ kind: "file", path: statePath, content: renderRoleState(stateSource), once: true });
1301
- entries.push(...await roleResourceEntries({ role, target, home, names: SHARED, shared, executable: EXECUTABLE }));
1309
+ entries.push(...await roleResourceEntries({ role, target, home, names: SHARED, shared, executable: EXECUTABLE, reservedSkills: RUNTIME_SKILLS }));
1302
1310
  credentials.push(await claudeCredentialDiagnostic(layout, role, settingsSource, process.platform, binary));
1303
1311
  providerEnv[role] = { [SECURE_STORAGE_ENV]: target };
1304
1312
  }
@@ -2745,6 +2753,7 @@ var init_wizard = __esm({
2745
2753
  init_package();
2746
2754
  init_auth();
2747
2755
  init_commands();
2756
+ init_fsops();
2748
2757
  import { Command, CommanderError, InvalidArgumentError } from "commander";
2749
2758
 
2750
2759
  // src/render.ts
@@ -2808,6 +2817,9 @@ function failedFromThrown(command, error) {
2808
2817
  "Reinstall paseo-room, then try again."
2809
2818
  )]);
2810
2819
  }
2820
+ if (error instanceof ManagedPathError) {
2821
+ return failed(command, [fail(`${command}.managed-path`, error.message, error.fix)]);
2822
+ }
2811
2823
  const detail = error instanceof Error ? error.message : "unknown error";
2812
2824
  return failed(command, [fail(
2813
2825
  `${command}.error`,