agentwheel 0.8.0 → 0.8.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
@@ -9,8 +9,8 @@ import {
9
9
 
10
10
  // src/cli/index.ts
11
11
  import { mkdir as mkdir14, rm as rm9, writeFile as writeFile12 } from "fs/promises";
12
- import { dirname as dirname20, join as join27, resolve as resolve17 } from "path";
13
- import { fileURLToPath as fileURLToPath2 } from "url";
12
+ import { dirname as dirname21, join as join28, resolve as resolve17 } from "path";
13
+ import { fileURLToPath as fileURLToPath3 } from "url";
14
14
  import { Command } from "commander";
15
15
 
16
16
  // src/adapters/resolve.ts
@@ -6023,9 +6023,31 @@ function updateSchemaVersion(content) {
6023
6023
  return applyEdits(content, edits);
6024
6024
  }
6025
6025
 
6026
+ // src/cli/version.ts
6027
+ import { readFileSync } from "fs";
6028
+ import { dirname as dirname20, join as join27 } from "path";
6029
+ import { fileURLToPath as fileURLToPath2 } from "url";
6030
+ var FALLBACK_VERSION = "0.0.0";
6031
+ function resolveCliVersion() {
6032
+ let dir = dirname20(fileURLToPath2(import.meta.url));
6033
+ while (true) {
6034
+ try {
6035
+ const pkg = JSON.parse(readFileSync(join27(dir, "package.json"), "utf8"));
6036
+ if (pkg.name === "agentwheel" && typeof pkg.version === "string") {
6037
+ return pkg.version;
6038
+ }
6039
+ } catch {
6040
+ }
6041
+ const parent = dirname20(dir);
6042
+ if (parent === dir) return FALLBACK_VERSION;
6043
+ dir = parent;
6044
+ }
6045
+ }
6046
+
6026
6047
  // src/cli/index.ts
6048
+ var CLI_VERSION = resolveCliVersion();
6027
6049
  var program = new Command();
6028
- program.name("agentwheel").description("Multi-runtime agent artifact orchestrator").version("0.7.0").option("--no-update-check", "disable npm version update check", false);
6050
+ program.name("agentwheel").description("Multi-runtime agent artifact orchestrator").version(CLI_VERSION).option("--no-update-check", "disable npm version update check", false);
6029
6051
  program.command("init").argument("[kind]", "workspace or package", "workspace").option("--target-root <path>", "workspace root", process.cwd()).option("--fleet-example", "scaffold example agents and profiles in workspace config", false).action(async (kind, options) => {
6030
6052
  const root = normalizeTargetRoot(options.targetRoot);
6031
6053
  if (kind === "package") {
@@ -6060,7 +6082,7 @@ program.command("add").argument("<source>", "package source").option("--driver <
6060
6082
  const bundle = await stageSource(driver, resolvedSource, {
6061
6083
  workspaceRoot: targetRoot,
6062
6084
  adapter,
6063
- cacheRoot: join27(targetRoot, ".agentwheel", "cache"),
6085
+ cacheRoot: join28(targetRoot, ".agentwheel", "cache"),
6064
6086
  mode: options.mode,
6065
6087
  select: selectedArtifacts
6066
6088
  });
@@ -6086,7 +6108,7 @@ program.command("list").argument("<source>", "package source").option("--driver
6086
6108
  const selectedArtifacts = selectedArtifactsFromOptions(options);
6087
6109
  const resolvedInput = await resolvePackageSource(source, targetRoot);
6088
6110
  const driver = getSourceDriver(options.driver ?? inferSourceDriverName(resolvedInput.source));
6089
- const resolved = await driver.export(await driver.translate(await driver.fetch(await driver.resolve(resolvedInput.source, { cacheRoot: join27(targetRoot, ".agentwheel", "cache") }))));
6111
+ const resolved = await driver.export(await driver.translate(await driver.fetch(await driver.resolve(resolvedInput.source, { cacheRoot: join28(targetRoot, ".agentwheel", "cache") }))));
6090
6112
  const artifacts = filterArtifactsBySelection(await driver.list(resolved), selectedArtifacts);
6091
6113
  for (const artifact of artifacts) {
6092
6114
  console.log(`${artifact.type} ${artifact.name} ${artifact.relativePath}`);
@@ -6096,7 +6118,7 @@ program.command("scan").argument("<source>", "package source").option("--driver
6096
6118
  const targetRoot = normalizeTargetRoot(options.targetRoot);
6097
6119
  const resolvedInput = await resolvePackageSource(source, targetRoot);
6098
6120
  const driver = getSourceDriver(options.driver ?? inferSourceDriverName(resolvedInput.source));
6099
- const resolved = await driver.export(await driver.translate(await driver.fetch(await driver.resolve(resolvedInput.source, { cacheRoot: join27(targetRoot, ".agentwheel", "cache") }))));
6121
+ const resolved = await driver.export(await driver.translate(await driver.fetch(await driver.resolve(resolvedInput.source, { cacheRoot: join28(targetRoot, ".agentwheel", "cache") }))));
6100
6122
  const result = await driver.scan(resolved);
6101
6123
  if (result.findings.length === 0) {
6102
6124
  console.log("Scan ok: no findings");
@@ -6608,10 +6630,10 @@ function filterUninstallPlanBySelection(plan, selected) {
6608
6630
  };
6609
6631
  }
6610
6632
  async function initPackage(root) {
6611
- await mkdir14(join27(root, "instructions"), { recursive: true });
6612
- await mkdir14(join27(root, "rules"), { recursive: true });
6613
- await mkdir14(join27(root, "skills"), { recursive: true });
6614
- const manifestPath = join27(root, "openpack.json");
6633
+ await mkdir14(join28(root, "instructions"), { recursive: true });
6634
+ await mkdir14(join28(root, "rules"), { recursive: true });
6635
+ await mkdir14(join28(root, "skills"), { recursive: true });
6636
+ const manifestPath = join28(root, "openpack.json");
6615
6637
  const manifest = {
6616
6638
  schemaVersion: 2,
6617
6639
  name: "example/agentwheel-package",
@@ -6624,10 +6646,10 @@ async function initPackage(root) {
6624
6646
  };
6625
6647
  await writeFile12(manifestPath, `${JSON.stringify(manifest, null, 2)}
6626
6648
  `, "utf8");
6627
- await writeFile12(join27(root, "instructions", "AGENTS.md"), "# Agent Instructions\n", "utf8");
6649
+ await writeFile12(join28(root, "instructions", "AGENTS.md"), "# Agent Instructions\n", "utf8");
6628
6650
  }
6629
6651
  async function defaultBootstrapPackage(_root) {
6630
- const packageRoot = await findAgentwheelPackageRoot(dirname20(fileURLToPath2(import.meta.url)));
6652
+ const packageRoot = await findAgentwheelPackageRoot(dirname21(fileURLToPath3(import.meta.url)));
6631
6653
  if (!packageRoot) return void 0;
6632
6654
  return {
6633
6655
  name: "agentwheel",
@@ -6673,7 +6695,7 @@ async function findAgentwheelPackageRoot(start) {
6673
6695
  let current = resolve17(start);
6674
6696
  while (true) {
6675
6697
  if (await findPackageManifestPath(current, { warnLegacy: false })) return current;
6676
- const parent = dirname20(current);
6698
+ const parent = dirname21(current);
6677
6699
  if (parent === current) return void 0;
6678
6700
  current = parent;
6679
6701
  }
@@ -6696,7 +6718,7 @@ function printRegistryEntries(entries) {
6696
6718
  }
6697
6719
  async function main() {
6698
6720
  await maybeCheckForUpdate({
6699
- currentVersion: "0.7.0",
6721
+ currentVersion: CLI_VERSION,
6700
6722
  argv: process.argv,
6701
6723
  env: process.env,
6702
6724
  isTTY: process.stderr.isTTY === true
package/openpack.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "name": "NestDevLab/agentwheel",
4
- "version": "0.8.0",
4
+ "version": "0.8.1",
5
5
  "provides": [
6
6
  { "type": "skills", "path": "skills", "required": true }
7
7
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentwheel",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Weave skills, rules, and instructions across every AI agent.",
5
5
  "type": "module",
6
6
  "license": "MIT",