allagents 0.8.5 → 0.8.7

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.
Files changed (2) hide show
  1. package/dist/index.js +148 -75
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -12906,13 +12906,53 @@ var require_gray_matter = __commonJS((exports, module) => {
12906
12906
  });
12907
12907
 
12908
12908
  // src/cli/index.ts
12909
- var import_cmd_ts4 = __toESM(require_cjs(), 1);
12910
- import { readFileSync as readFileSync3 } from "node:fs";
12911
- import { dirname as dirname7, join as join13 } from "node:path";
12912
- import { fileURLToPath as fileURLToPath4 } from "node:url";
12909
+ var import_cmd_ts5 = __toESM(require_cjs(), 1);
12913
12910
 
12914
- // src/cli/commands/workspace.ts
12911
+ // src/cli/help.ts
12915
12912
  var import_cmd_ts = __toESM(require_cjs(), 1);
12913
+ function buildDescription(meta) {
12914
+ let desc = meta.description;
12915
+ desc += `
12916
+
12917
+ When to use: ${meta.whenToUse}`;
12918
+ desc += `
12919
+
12920
+ Examples:`;
12921
+ for (const ex of meta.examples) {
12922
+ desc += `
12923
+ $ ${ex}`;
12924
+ }
12925
+ desc += `
12926
+
12927
+ Output: ${meta.expectedOutput}`;
12928
+ return desc;
12929
+ }
12930
+ function conciseSubcommands(config) {
12931
+ const result = import_cmd_ts.subcommands(config);
12932
+ const originalPrintHelp = result.printHelp.bind(result);
12933
+ result.printHelp = (context) => {
12934
+ const originals = new Map;
12935
+ for (const [key, cmd] of Object.entries(config.cmds)) {
12936
+ if (cmd.description) {
12937
+ originals.set(key, cmd.description);
12938
+ cmd.description = cmd.description.split(`
12939
+ `)[0] ?? cmd.description;
12940
+ }
12941
+ }
12942
+ const output = originalPrintHelp(context);
12943
+ for (const [key, cmd] of Object.entries(config.cmds)) {
12944
+ const original = originals.get(key);
12945
+ if (original !== undefined) {
12946
+ cmd.description = original;
12947
+ }
12948
+ }
12949
+ return output;
12950
+ };
12951
+ return result;
12952
+ }
12953
+
12954
+ // src/cli/commands/workspace.ts
12955
+ var import_cmd_ts2 = __toESM(require_cjs(), 1);
12916
12956
 
12917
12957
  // src/core/workspace.ts
12918
12958
  import { mkdir as mkdir5, readFile as readFile8, writeFile as writeFile4, copyFile as copyFile2 } from "node:fs/promises";
@@ -23833,25 +23873,6 @@ function extractJsonFlag(args) {
23833
23873
  return { args: [...args.slice(0, idx), ...args.slice(idx + 1)], json: true };
23834
23874
  }
23835
23875
 
23836
- // src/cli/help.ts
23837
- function buildDescription(meta) {
23838
- let desc = meta.description;
23839
- desc += `
23840
-
23841
- When to use: ${meta.whenToUse}`;
23842
- desc += `
23843
-
23844
- Examples:`;
23845
- for (const ex of meta.examples) {
23846
- desc += `
23847
- $ ${ex}`;
23848
- }
23849
- desc += `
23850
-
23851
- Output: ${meta.expectedOutput}`;
23852
- return desc;
23853
- }
23854
-
23855
23876
  // src/cli/metadata/workspace.ts
23856
23877
  var initMeta = {
23857
23878
  command: "workspace init",
@@ -23937,12 +23958,12 @@ function buildSyncData(result) {
23937
23958
  purgedPaths: result.purgedPaths ?? []
23938
23959
  };
23939
23960
  }
23940
- var initCmd = import_cmd_ts.command({
23961
+ var initCmd = import_cmd_ts2.command({
23941
23962
  name: "init",
23942
23963
  description: buildDescription(initMeta),
23943
23964
  args: {
23944
- path: import_cmd_ts.positional({ type: import_cmd_ts.optional(import_cmd_ts.string), displayName: "path" }),
23945
- from: import_cmd_ts.option({ type: import_cmd_ts.optional(import_cmd_ts.string), long: "from", description: "Copy workspace.yaml from existing template/workspace" })
23965
+ path: import_cmd_ts2.positional({ type: import_cmd_ts2.optional(import_cmd_ts2.string), displayName: "path" }),
23966
+ from: import_cmd_ts2.option({ type: import_cmd_ts2.optional(import_cmd_ts2.string), long: "from", description: "Copy workspace.yaml from existing template/workspace" })
23946
23967
  },
23947
23968
  handler: async ({ path: path3, from }) => {
23948
23969
  try {
@@ -23989,13 +24010,13 @@ Sync complete: ${syncResult.totalCopied} files copied`);
23989
24010
  }
23990
24011
  }
23991
24012
  });
23992
- var syncCmd = import_cmd_ts.command({
24013
+ var syncCmd = import_cmd_ts2.command({
23993
24014
  name: "sync",
23994
24015
  description: buildDescription(syncMeta),
23995
24016
  args: {
23996
- offline: import_cmd_ts.flag({ long: "offline", description: "Use cached plugins without fetching latest from remote" }),
23997
- dryRun: import_cmd_ts.flag({ long: "dry-run", short: "n", description: "Simulate sync without making changes" }),
23998
- client: import_cmd_ts.option({ type: import_cmd_ts.optional(import_cmd_ts.string), long: "client", short: "c", description: "Sync only the specified client (e.g., opencode, claude)" })
24017
+ offline: import_cmd_ts2.flag({ long: "offline", description: "Use cached plugins without fetching latest from remote" }),
24018
+ dryRun: import_cmd_ts2.flag({ long: "dry-run", short: "n", description: "Simulate sync without making changes" }),
24019
+ client: import_cmd_ts2.option({ type: import_cmd_ts2.optional(import_cmd_ts2.string), long: "client", short: "c", description: "Sync only the specified client (e.g., opencode, claude)" })
23999
24020
  },
24000
24021
  handler: async ({ offline, dryRun, client }) => {
24001
24022
  try {
@@ -24098,7 +24119,7 @@ Sync complete${dryRun ? " (dry run)" : ""}:`);
24098
24119
  }
24099
24120
  }
24100
24121
  });
24101
- var statusCmd = import_cmd_ts.command({
24122
+ var statusCmd = import_cmd_ts2.command({
24102
24123
  name: "status",
24103
24124
  description: buildDescription(statusMeta),
24104
24125
  args: {},
@@ -24159,7 +24180,7 @@ Clients (${result.clients.length}):`);
24159
24180
  }
24160
24181
  }
24161
24182
  });
24162
- var workspaceCmd = import_cmd_ts.subcommands({
24183
+ var workspaceCmd = conciseSubcommands({
24163
24184
  name: "workspace",
24164
24185
  description: "Manage AI agent workspaces - initialize, sync, and configure plugins",
24165
24186
  cmds: {
@@ -24170,7 +24191,7 @@ var workspaceCmd = import_cmd_ts.subcommands({
24170
24191
  });
24171
24192
 
24172
24193
  // src/cli/commands/plugin.ts
24173
- var import_cmd_ts2 = __toESM(require_cjs(), 1);
24194
+ var import_cmd_ts3 = __toESM(require_cjs(), 1);
24174
24195
 
24175
24196
  // src/core/workspace-modify.ts
24176
24197
  import { readFile as readFile9, writeFile as writeFile5 } from "node:fs/promises";
@@ -24501,7 +24522,7 @@ Sync complete:`);
24501
24522
  }
24502
24523
  return { ok: result.success && result.totalFailed === 0, syncData };
24503
24524
  }
24504
- var marketplaceListCmd = import_cmd_ts2.command({
24525
+ var marketplaceListCmd = import_cmd_ts3.command({
24505
24526
  name: "list",
24506
24527
  description: buildDescription(marketplaceListMeta),
24507
24528
  args: {},
@@ -24554,12 +24575,12 @@ var marketplaceListCmd = import_cmd_ts2.command({
24554
24575
  }
24555
24576
  }
24556
24577
  });
24557
- var marketplaceAddCmd = import_cmd_ts2.command({
24578
+ var marketplaceAddCmd = import_cmd_ts3.command({
24558
24579
  name: "add",
24559
24580
  description: buildDescription(marketplaceAddMeta),
24560
24581
  args: {
24561
- source: import_cmd_ts2.positional({ type: import_cmd_ts2.string, displayName: "source" }),
24562
- name: import_cmd_ts2.option({ type: import_cmd_ts2.optional(import_cmd_ts2.string), long: "name", short: "n", description: "Custom name for the marketplace" })
24582
+ source: import_cmd_ts3.positional({ type: import_cmd_ts3.string, displayName: "source" }),
24583
+ name: import_cmd_ts3.option({ type: import_cmd_ts3.optional(import_cmd_ts3.string), long: "name", short: "n", description: "Custom name for the marketplace" })
24563
24584
  },
24564
24585
  handler: async ({ source, name }) => {
24565
24586
  try {
@@ -24604,11 +24625,11 @@ Error: ${result.error}`);
24604
24625
  }
24605
24626
  }
24606
24627
  });
24607
- var marketplaceRemoveCmd = import_cmd_ts2.command({
24628
+ var marketplaceRemoveCmd = import_cmd_ts3.command({
24608
24629
  name: "remove",
24609
24630
  description: buildDescription(marketplaceRemoveMeta),
24610
24631
  args: {
24611
- name: import_cmd_ts2.positional({ type: import_cmd_ts2.string, displayName: "name" })
24632
+ name: import_cmd_ts3.positional({ type: import_cmd_ts3.string, displayName: "name" })
24612
24633
  },
24613
24634
  handler: async ({ name }) => {
24614
24635
  try {
@@ -24647,11 +24668,11 @@ var marketplaceRemoveCmd = import_cmd_ts2.command({
24647
24668
  }
24648
24669
  }
24649
24670
  });
24650
- var marketplaceUpdateCmd = import_cmd_ts2.command({
24671
+ var marketplaceUpdateCmd = import_cmd_ts3.command({
24651
24672
  name: "update",
24652
24673
  description: buildDescription(marketplaceUpdateMeta),
24653
24674
  args: {
24654
- name: import_cmd_ts2.positional({ type: import_cmd_ts2.optional(import_cmd_ts2.string), displayName: "name" })
24675
+ name: import_cmd_ts3.positional({ type: import_cmd_ts3.optional(import_cmd_ts3.string), displayName: "name" })
24655
24676
  },
24656
24677
  handler: async ({ name }) => {
24657
24678
  try {
@@ -24707,7 +24728,7 @@ var marketplaceUpdateCmd = import_cmd_ts2.command({
24707
24728
  }
24708
24729
  }
24709
24730
  });
24710
- var marketplaceCmd = import_cmd_ts2.subcommands({
24731
+ var marketplaceCmd = conciseSubcommands({
24711
24732
  name: "marketplace",
24712
24733
  description: "Manage plugin marketplaces",
24713
24734
  cmds: {
@@ -24717,11 +24738,11 @@ var marketplaceCmd = import_cmd_ts2.subcommands({
24717
24738
  update: marketplaceUpdateCmd
24718
24739
  }
24719
24740
  });
24720
- var pluginListCmd = import_cmd_ts2.command({
24741
+ var pluginListCmd = import_cmd_ts3.command({
24721
24742
  name: "list",
24722
24743
  description: buildDescription(pluginListMeta),
24723
24744
  args: {
24724
- marketplace: import_cmd_ts2.positional({ type: import_cmd_ts2.optional(import_cmd_ts2.string), displayName: "marketplace" })
24745
+ marketplace: import_cmd_ts3.positional({ type: import_cmd_ts3.optional(import_cmd_ts3.string), displayName: "marketplace" })
24725
24746
  },
24726
24747
  handler: async ({ marketplace }) => {
24727
24748
  try {
@@ -24811,11 +24832,11 @@ var pluginListCmd = import_cmd_ts2.command({
24811
24832
  }
24812
24833
  }
24813
24834
  });
24814
- var pluginValidateCmd = import_cmd_ts2.command({
24835
+ var pluginValidateCmd = import_cmd_ts3.command({
24815
24836
  name: "validate",
24816
24837
  description: buildDescription(pluginValidateMeta),
24817
24838
  args: {
24818
- path: import_cmd_ts2.positional({ type: import_cmd_ts2.string, displayName: "path" })
24839
+ path: import_cmd_ts3.positional({ type: import_cmd_ts3.string, displayName: "path" })
24819
24840
  },
24820
24841
  handler: async ({ path: path3 }) => {
24821
24842
  if (isJsonMode()) {
@@ -24830,11 +24851,11 @@ var pluginValidateCmd = import_cmd_ts2.command({
24830
24851
  console.log("(validation not yet implemented)");
24831
24852
  }
24832
24853
  });
24833
- var pluginInstallCmd = import_cmd_ts2.command({
24854
+ var pluginInstallCmd = import_cmd_ts3.command({
24834
24855
  name: "install",
24835
24856
  description: buildDescription(pluginInstallMeta),
24836
24857
  args: {
24837
- plugin: import_cmd_ts2.positional({ type: import_cmd_ts2.string, displayName: "plugin" })
24858
+ plugin: import_cmd_ts3.positional({ type: import_cmd_ts3.string, displayName: "plugin" })
24838
24859
  },
24839
24860
  handler: async ({ plugin }) => {
24840
24861
  try {
@@ -24885,12 +24906,12 @@ var pluginInstallCmd = import_cmd_ts2.command({
24885
24906
  }
24886
24907
  }
24887
24908
  });
24888
- var pluginUninstallCmd = import_cmd_ts2.command({
24909
+ var pluginUninstallCmd = import_cmd_ts3.command({
24889
24910
  name: "uninstall",
24890
24911
  description: buildDescription(pluginUninstallMeta),
24891
24912
  aliases: ["remove"],
24892
24913
  args: {
24893
- plugin: import_cmd_ts2.positional({ type: import_cmd_ts2.string, displayName: "plugin" })
24914
+ plugin: import_cmd_ts3.positional({ type: import_cmd_ts3.string, displayName: "plugin" })
24894
24915
  },
24895
24916
  handler: async ({ plugin }) => {
24896
24917
  try {
@@ -24937,7 +24958,7 @@ var pluginUninstallCmd = import_cmd_ts2.command({
24937
24958
  }
24938
24959
  }
24939
24960
  });
24940
- var pluginCmd = import_cmd_ts2.subcommands({
24961
+ var pluginCmd = conciseSubcommands({
24941
24962
  name: "plugin",
24942
24963
  description: "Manage plugins and marketplaces",
24943
24964
  cmds: {
@@ -24950,10 +24971,7 @@ var pluginCmd = import_cmd_ts2.subcommands({
24950
24971
  });
24951
24972
 
24952
24973
  // src/cli/commands/self.ts
24953
- var import_cmd_ts3 = __toESM(require_cjs(), 1);
24954
- import { readFileSync as readFileSync2 } from "node:fs";
24955
- import { dirname as dirname6, join as join12 } from "node:path";
24956
- import { fileURLToPath as fileURLToPath3 } from "node:url";
24974
+ var import_cmd_ts4 = __toESM(require_cjs(), 1);
24957
24975
 
24958
24976
  // src/cli/metadata/self.ts
24959
24977
  var updateMeta = {
@@ -24976,6 +24994,71 @@ var updateMeta = {
24976
24994
  packageManager: "string"
24977
24995
  }
24978
24996
  };
24997
+ // package.json
24998
+ var package_default = {
24999
+ name: "allagents",
25000
+ version: "0.8.7",
25001
+ description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
25002
+ type: "module",
25003
+ bin: {
25004
+ allagents: "./dist/index.js"
25005
+ },
25006
+ files: [
25007
+ "dist"
25008
+ ],
25009
+ scripts: {
25010
+ build: "bun build ./src/cli/index.ts --outdir ./dist --target node && shx cp -r src/templates dist/",
25011
+ "docs:install": "bun install --cwd docs",
25012
+ "docs:build": "bun run --cwd docs build",
25013
+ dev: "bun run src/cli/index.ts",
25014
+ test: "bun test",
25015
+ "test:watch": "bun test --watch",
25016
+ "test:coverage": "bun test --coverage",
25017
+ "test:integration": "bats tests/integration/*.bats",
25018
+ typecheck: "tsc --noEmit",
25019
+ lint: "biome lint src",
25020
+ "lint:fix": "biome lint --write src",
25021
+ format: "biome format --write src",
25022
+ check: "biome check src",
25023
+ "check:fix": "biome check --write src",
25024
+ prepare: "bun run build && (test -d .git && bunx prek install -t pre-push || true)",
25025
+ release: "bun run scripts/release.ts"
25026
+ },
25027
+ keywords: [
25028
+ "cli",
25029
+ "ai",
25030
+ "agents",
25031
+ "workspace",
25032
+ "plugins",
25033
+ "multi-repo",
25034
+ "claude",
25035
+ "copilot",
25036
+ "codex"
25037
+ ],
25038
+ author: "",
25039
+ license: "MIT",
25040
+ dependencies: {
25041
+ "cmd-ts": "^0.14.3",
25042
+ execa: "^8.0.1",
25043
+ "fast-glob": "^3.3.3",
25044
+ "gray-matter": "^4.0.3",
25045
+ "js-yaml": "^4.1.0",
25046
+ zod: "^3.22.4"
25047
+ },
25048
+ devDependencies: {
25049
+ "@biomejs/biome": "^1.9.0",
25050
+ "@j178/prek": "^0.3.0",
25051
+ "@types/bun": "latest",
25052
+ "@types/js-yaml": "^4.0.9",
25053
+ "@types/node": "^20.11.5",
25054
+ shx: "^0.4.0",
25055
+ typescript: "^5.3.3"
25056
+ },
25057
+ engines: {
25058
+ node: ">=18.0.0",
25059
+ bun: ">=1.0.0"
25060
+ }
25061
+ };
24979
25062
 
24980
25063
  // src/cli/commands/self.ts
24981
25064
  function detectPackageManagerFromPath(scriptPath) {
@@ -24988,21 +25071,14 @@ function detectPackageManager() {
24988
25071
  return detectPackageManagerFromPath(process.argv[1] ?? "");
24989
25072
  }
24990
25073
  function getCurrentVersion() {
24991
- try {
24992
- const __dirname2 = dirname6(fileURLToPath3(import.meta.url));
24993
- const packageJsonPath = join12(__dirname2, "..", "package.json");
24994
- const packageJson = JSON.parse(readFileSync2(packageJsonPath, "utf-8"));
24995
- return packageJson.version;
24996
- } catch {
24997
- return "unknown";
24998
- }
25074
+ return package_default.version;
24999
25075
  }
25000
- var updateCmd = import_cmd_ts3.command({
25076
+ var updateCmd = import_cmd_ts4.command({
25001
25077
  name: "update",
25002
25078
  description: buildDescription(updateMeta),
25003
25079
  args: {
25004
- npm: import_cmd_ts3.flag({ long: "npm", description: "Force update using npm" }),
25005
- bun: import_cmd_ts3.flag({ long: "bun", description: "Force update using bun" })
25080
+ npm: import_cmd_ts4.flag({ long: "npm", description: "Force update using npm" }),
25081
+ bun: import_cmd_ts4.flag({ long: "bun", description: "Force update using bun" })
25006
25082
  },
25007
25083
  handler: async ({ npm, bun }) => {
25008
25084
  try {
@@ -25087,7 +25163,7 @@ Update complete.`);
25087
25163
  }
25088
25164
  }
25089
25165
  });
25090
- var selfCmd = import_cmd_ts3.subcommands({
25166
+ var selfCmd = conciseSubcommands({
25091
25167
  name: "self",
25092
25168
  description: "Manage the allagents installation",
25093
25169
  cmds: {
@@ -25166,15 +25242,12 @@ function printAgentHelp(args, version) {
25166
25242
  }
25167
25243
 
25168
25244
  // src/cli/index.ts
25169
- var __dirname2 = dirname7(fileURLToPath4(import.meta.url));
25170
- var packageJsonPath = join13(__dirname2, "..", "package.json");
25171
- var packageJson = JSON.parse(readFileSync3(packageJsonPath, "utf-8"));
25172
- var app = import_cmd_ts4.subcommands({
25245
+ var app = conciseSubcommands({
25173
25246
  name: "allagents",
25174
25247
  description: `CLI tool for managing multi-repo AI agent workspaces with plugin synchronization
25175
25248
 
25176
25249
  ` + "For AI agents: use --agent-help for machine-readable help, or --json for structured output",
25177
- version: packageJson.version,
25250
+ version: package_default.version,
25178
25251
  cmds: {
25179
25252
  workspace: workspaceCmd,
25180
25253
  plugin: pluginCmd,
@@ -25186,7 +25259,7 @@ var { args: argsNoJson, json: json2 } = extractJsonFlag(rawArgs);
25186
25259
  var { args: finalArgs, agentHelp } = extractAgentHelpFlag(argsNoJson);
25187
25260
  setJsonMode(json2);
25188
25261
  if (agentHelp) {
25189
- printAgentHelp(finalArgs, packageJson.version);
25262
+ printAgentHelp(finalArgs, package_default.version);
25190
25263
  } else {
25191
- import_cmd_ts4.run(app, finalArgs);
25264
+ import_cmd_ts5.run(app, finalArgs);
25192
25265
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allagents",
3
- "version": "0.8.5",
3
+ "version": "0.8.7",
4
4
  "description": "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
5
5
  "type": "module",
6
6
  "bin": {