@alan-ai-hq/agent-manager-darwin-arm64 0.1.141 → 0.1.143

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/alan-agent.cjs CHANGED
@@ -54219,7 +54219,7 @@ var require_websocket_server = __commonJS({
54219
54219
  // package.json
54220
54220
  var package_default = {
54221
54221
  name: "@alan-ai-hq/agent-manager",
54222
- version: "0.1.141",
54222
+ version: "0.1.143",
54223
54223
  private: true,
54224
54224
  type: "module",
54225
54225
  description: "Alan machine runtime (alan-agent): identity, link, reconciler, session holders, run log, uploader, local API",
@@ -58394,6 +58394,7 @@ async function writeDefinition(path4, contents, mode = 420) {
58394
58394
  await (0, import_promises21.mkdir)((0, import_node_path18.dirname)(path4), { recursive: true });
58395
58395
  const staged = `${path4}.${process.pid}.tmp`;
58396
58396
  await (0, import_promises21.writeFile)(staged, contents, { mode });
58397
+ await (0, import_promises21.chmod)(staged, mode);
58397
58398
  await (0, import_promises21.rename)(staged, path4);
58398
58399
  return true;
58399
58400
  }
@@ -58647,7 +58648,7 @@ function xdgAutostartManager(host, profile) {
58647
58648
  const scriptChanged = await writeDefinition(
58648
58649
  files.script,
58649
58650
  renderSupervisorScript(spec, files),
58650
- 493
58651
+ 448
58651
58652
  );
58652
58653
  const entryChanged = await writeDefinition(files.entry, renderAutostartEntry(spec, files));
58653
58654
  const changed = scriptChanged || entryChanged;
@@ -64717,6 +64718,9 @@ function uuidV5(name, namespace) {
64717
64718
  function alanSkillId(slug) {
64718
64719
  return uuidV5(`alan:${slug}`, ALAN_SKILL_NAMESPACE);
64719
64720
  }
64721
+ function alanSkillVersionId(slug, contentHash) {
64722
+ return uuidV5(`alan:${slug}:${contentHash}`, ALAN_SKILL_NAMESPACE);
64723
+ }
64720
64724
 
64721
64725
  // src/capabilities/skills/store.ts
64722
64726
  init_runtime_v2();
@@ -64796,18 +64800,20 @@ async function isIntact(layout, skill) {
64796
64800
  return false;
64797
64801
  }
64798
64802
  }
64799
- async function resolveNativeBuiltIn(layout, invocation) {
64803
+ async function resolveNativeBuiltIn(layout, invocation, baked) {
64800
64804
  const slug = invocation.displayName;
64801
64805
  if (layout.nativeDir === null || invocation.skillId !== alanSkillId(slug)) return null;
64802
64806
  const directory = (0, import_node_path42.join)(layout.nativeDir, slug);
64803
64807
  try {
64804
- await inspectSkillPackage(directory, { expectedName: slug });
64808
+ const inspected = await inspectSkillPackage(directory, { expectedName: slug });
64809
+ if (baked === "exact" && alanSkillVersionId(slug, inspected.contentHash) !== invocation.versionId)
64810
+ return null;
64805
64811
  return { packageDirectory: directory };
64806
64812
  } catch {
64807
64813
  return null;
64808
64814
  }
64809
64815
  }
64810
- async function resolveSkillInvocations(layout, invocations) {
64816
+ async function resolveSkillInvocations(layout, invocations, baked = "any") {
64811
64817
  if (invocations.length === 0) return { kind: "resolved", skills: [] };
64812
64818
  const installed = await readInstalledSkills(layout);
64813
64819
  const local = invocations.some((invocation) => invocation.kind === "local_skill") ? await readLocalSkills(layout) : null;
@@ -64827,7 +64833,7 @@ async function resolveSkillInvocations(layout, invocations) {
64827
64833
  resolved.push({ packageDirectory: packageDirectory(layout, skill.versionId) });
64828
64834
  continue;
64829
64835
  }
64830
- const native = await resolveNativeBuiltIn(layout, invocation);
64836
+ const native = await resolveNativeBuiltIn(layout, invocation, baked);
64831
64837
  if (native === null) missing.push(invocation.displayName);
64832
64838
  else resolved.push(native);
64833
64839
  }
@@ -65426,14 +65432,14 @@ function openMachineSkills(options) {
65426
65432
  const running = flight.running;
65427
65433
  if (running !== void 0) {
65428
65434
  await running;
65429
- if ((await resolveSkillInvocations(layout, named)).kind === "resolved") return;
65435
+ if ((await resolveSkillInvocations(layout, named, "exact")).kind === "resolved") return;
65430
65436
  }
65431
65437
  await exchange3();
65432
65438
  };
65433
65439
  const rescanUntilResolved = async (named) => {
65434
65440
  for (let pass = 0; pass < 2; pass += 1) {
65435
65441
  await rescan();
65436
- if ((await resolveSkillInvocations(layout, named)).kind === "resolved") return;
65442
+ if ((await resolveSkillInvocations(layout, named, "exact")).kind === "resolved") return;
65437
65443
  }
65438
65444
  };
65439
65445
  const recordedUntilResolved = (named, until) => new Promise((resolve12) => {
@@ -65443,7 +65449,7 @@ function openMachineSkills(options) {
65443
65449
  resolve12();
65444
65450
  };
65445
65451
  const check3 = () => {
65446
- void resolveSkillInvocations(layout, named).then((resolution) => {
65452
+ void resolveSkillInvocations(layout, named, "exact").then((resolution) => {
65447
65453
  if (resolution.kind === "resolved") done();
65448
65454
  });
65449
65455
  };
@@ -65460,7 +65466,7 @@ function openMachineSkills(options) {
65460
65466
  rescan,
65461
65467
  prepare: async (invocations, signal) => {
65462
65468
  const named = invocations ?? [];
65463
- if ((await resolveSkillInvocations(layout, named)).kind === "resolved") return;
65469
+ if ((await resolveSkillInvocations(layout, named, "exact")).kind === "resolved") return;
65464
65470
  const picksLocal = named.some((invocation) => invocation.kind === "local_skill");
65465
65471
  const settled2 = new AbortController();
65466
65472
  const until = AbortSignal.any([signal, AbortSignal.timeout(waitMs), settled2.signal]);
package/alan-holder.cjs CHANGED
@@ -46187,6 +46187,9 @@ function uuidV5(name, namespace) {
46187
46187
  function alanSkillId(slug) {
46188
46188
  return uuidV5(`alan:${slug}`, ALAN_SKILL_NAMESPACE);
46189
46189
  }
46190
+ function alanSkillVersionId(slug, contentHash) {
46191
+ return uuidV5(`alan:${slug}:${contentHash}`, ALAN_SKILL_NAMESPACE);
46192
+ }
46190
46193
 
46191
46194
  // src/capabilities/skills/store.ts
46192
46195
  init_runtime_v2();
@@ -46260,18 +46263,20 @@ async function isIntact(layout, skill) {
46260
46263
  return false;
46261
46264
  }
46262
46265
  }
46263
- async function resolveNativeBuiltIn(layout, invocation) {
46266
+ async function resolveNativeBuiltIn(layout, invocation, baked) {
46264
46267
  const slug = invocation.displayName;
46265
46268
  if (layout.nativeDir === null || invocation.skillId !== alanSkillId(slug)) return null;
46266
46269
  const directory = (0, import_node_path11.join)(layout.nativeDir, slug);
46267
46270
  try {
46268
- await inspectSkillPackage(directory, { expectedName: slug });
46271
+ const inspected = await inspectSkillPackage(directory, { expectedName: slug });
46272
+ if (baked === "exact" && alanSkillVersionId(slug, inspected.contentHash) !== invocation.versionId)
46273
+ return null;
46269
46274
  return { packageDirectory: directory };
46270
46275
  } catch {
46271
46276
  return null;
46272
46277
  }
46273
46278
  }
46274
- async function resolveSkillInvocations(layout, invocations) {
46279
+ async function resolveSkillInvocations(layout, invocations, baked = "any") {
46275
46280
  if (invocations.length === 0) return { kind: "resolved", skills: [] };
46276
46281
  const installed = await readInstalledSkills(layout);
46277
46282
  const local = invocations.some((invocation) => invocation.kind === "local_skill") ? await readLocalSkills(layout) : null;
@@ -46291,7 +46296,7 @@ async function resolveSkillInvocations(layout, invocations) {
46291
46296
  resolved.push({ packageDirectory: packageDirectory(layout, skill.versionId) });
46292
46297
  continue;
46293
46298
  }
46294
- const native = await resolveNativeBuiltIn(layout, invocation);
46299
+ const native = await resolveNativeBuiltIn(layout, invocation, baked);
46295
46300
  if (native === null) missing.push(invocation.displayName);
46296
46301
  else resolved.push(native);
46297
46302
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alan-ai-hq/agent-manager-darwin-arm64",
3
- "version": "0.1.141",
3
+ "version": "0.1.143",
4
4
  "description": "Alan machine runtime (alan-agent) for one platform: the official Node.js binary, the runtime bundle and its launcher. Installed by @alan-ai-hq/agent-manager.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://tryalan.ai",