@rbbtsn0w/adg 0.10.0-dev.pr126.02b1b51 → 0.10.0-dev.pr127.822fd83

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.
@@ -50,9 +50,15 @@ export function syncMarketplace(pluginsDir, marketplace, runner = run, warn = co
50
50
  const root = codexMarketplaceRoot(pluginsDir);
51
51
  // Explicit stores need the same supported discovery layout as canonical stores.
52
52
  if (root === pluginsDir && existsSync(marketplacePath(pluginsDir))) {
53
- const exportDir = join(root, ".agents", "plugins");
54
- mkdirSync(exportDir, { recursive: true });
55
- writeFileSync(join(exportDir, "marketplace.json"), readFileSync(marketplacePath(pluginsDir)));
53
+ try {
54
+ const exportDir = join(root, ".agents", "plugins");
55
+ mkdirSync(exportDir, { recursive: true });
56
+ writeFileSync(join(exportDir, "marketplace.json"), readFileSync(marketplacePath(pluginsDir)));
57
+ }
58
+ catch (error) {
59
+ warn(`failed to sync Codex marketplace (${marketplace}): ${error instanceof Error ? error.message : String(error)}`);
60
+ return false;
61
+ }
56
62
  }
57
63
  const add = runner(["plugin", "marketplace", "add", root]);
58
64
  if (add.ok)
@@ -22,13 +22,15 @@ import { createProgress, formatUpdateSummary } from "../render/progress.js";
22
22
  import { renderAgentReport, renderMarketplaceList, renderUpdateReport, } from "../render/plugins.js";
23
23
  import { CACHE_USAGE, MARKETPLACE_USAGE, PLUGIN_ALIASES, PLUGIN_COMMANDS, SCOPE, fail, parseVerb, renderPluginsHelp, renderVerbHelp, requireSingleTarget, resolveComponents, resolveScopeDir, resolveTargets, scopeOf, wantsHelp, } from "./index.js";
24
24
  import { handleCorePluginVerb } from "./core-plugin-handlers.js";
25
- import { commandOutcome, mergeCommandOutcomes } from "../command-outcome.js";
25
+ import { commandOutcome, mergeCommandOutcomes, agentCommandOutcome } from "../command-outcome.js";
26
26
  export function updateResultCounts(result) {
27
27
  const failedRemote = result.remote.filter((source) => source.failed !== undefined).length;
28
+ // A failed plugin remains one unit even if several stages report diagnostics.
29
+ const runtimeFailures = new Set(result.agents.flatMap((agent) => (agent.failures ?? []).map((failure) => JSON.stringify([agent.agent, failure.plugin ?? null, failure.plugin ? null : failure.stage]))));
28
30
  return {
29
31
  succeeded: result.remote.length - failedRemote +
30
32
  result.local.results.length,
31
- failed: failedRemote + result.local.missing.length + result.agents.reduce((count, agent) => count + (agent.failures?.length ?? 0), 0),
33
+ failed: failedRemote + result.local.missing.length + runtimeFailures.size,
32
34
  };
33
35
  }
34
36
  /**
@@ -183,9 +185,7 @@ export async function runPlugins(rawVerb, rest) {
183
185
  return await runPluginsVerb(verb, rest, cmd) ?? commandOutcome("success");
184
186
  }
185
187
  function runtimeOutcome(agents = []) {
186
- return mergeCommandOutcomes(agents.map((agent) => agent.failures?.length
187
- ? commandOutcome((agent.verified ?? agent.affected).length ? "partial" : "failure", "dependency")
188
- : commandOutcome("success")));
188
+ return mergeCommandOutcomes(agents.map(agentCommandOutcome));
189
189
  }
190
190
  async function handleAdd(rest, cmd) {
191
191
  const { values, positionals } = parseVerb("add", cmd.flags, rest);
@@ -13,3 +13,9 @@ export function mergeCommandOutcomes(outcomes) {
13
13
  const category = outcomes.find((outcome) => outcome.errorCategory)?.errorCategory;
14
14
  return commandOutcome(partiallySuccessful ? "partial" : "failure", category);
15
15
  }
16
+ /** Completed execution is partial progress even when verification is unavailable. */
17
+ export function agentCommandOutcome(result) {
18
+ if (!result.failures?.length)
19
+ return commandOutcome("success");
20
+ return commandOutcome(result.affected.length ? "partial" : "failure", "dependency");
21
+ }
@@ -27,7 +27,7 @@ export function renderAgentReport(agents, verb) {
27
27
  for (const r of agents ?? []) {
28
28
  const name = getAgent(r.agent)?.displayName ?? r.agent;
29
29
  for (const failure of r.failures ?? [])
30
- out.push(ui.err(`${r.agent}: ${failure.stage}${failure.plugin ? ` ${failure.plugin}` : ""}: ${failure.message}`));
30
+ out.push(ui.err(`${name}: ${failure.stage}${failure.plugin ? ` ${failure.plugin}` : ""}: ${failure.message}`));
31
31
  const completed = r.verified ?? r.affected;
32
32
  if (completed.length > 0)
33
33
  out.push(`${ui.ok(verb)} in ${ui.name(name)}: ${completed.join(", ")}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbbtsn0w/adg",
3
- "version": "0.10.0-dev.pr126.02b1b51",
3
+ "version": "0.10.0-dev.pr127.822fd83",
4
4
  "description": "Agent Directory Group (ADG) toolkit — two domains: plugins and skills.",
5
5
  "type": "module",
6
6
  "license": "MIT",