@acidicsoil/portable-capabilities 0.1.9 → 0.1.13

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.
@@ -1997,13 +1997,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
1997
1997
  * @param {string} source - expected values are default/config/env/cli/implied
1998
1998
  * @return {Command} `this` command for chaining
1999
1999
  */
2000
- setOptionValueWithSource(key, value, source3) {
2000
+ setOptionValueWithSource(key, value, source2) {
2001
2001
  if (this._storeOptionsAsProperties) {
2002
2002
  this[key] = value;
2003
2003
  } else {
2004
2004
  this._optionValues[key] = value;
2005
2005
  }
2006
- this._optionValueSources[key] = source3;
2006
+ this._optionValueSources[key] = source2;
2007
2007
  return this;
2008
2008
  }
2009
2009
  /**
@@ -2024,13 +2024,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
2024
2024
  * @return {string}
2025
2025
  */
2026
2026
  getOptionValueSourceWithGlobals(key) {
2027
- let source3;
2027
+ let source2;
2028
2028
  this._getCommandAndAncestors().forEach((cmd) => {
2029
2029
  if (cmd.getOptionValueSource(key) !== void 0) {
2030
- source3 = cmd.getOptionValueSource(key);
2030
+ source2 = cmd.getOptionValueSource(key);
2031
2031
  }
2032
2032
  });
2033
- return source3;
2033
+ return source2;
2034
2034
  }
2035
2035
  /**
2036
2036
  * Get user arguments from implied or explicit arguments.
@@ -2900,8 +2900,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
2900
2900
  const getErrorMessage = (option2) => {
2901
2901
  const bestOption = findBestOptionFromValue(option2);
2902
2902
  const optionKey = bestOption.attributeName();
2903
- const source3 = this.getOptionValueSource(optionKey);
2904
- if (source3 === "env") {
2903
+ const source2 = this.getOptionValueSource(optionKey);
2904
+ if (source2 === "env") {
2905
2905
  return `environment variable '${bestOption.envVar}'`;
2906
2906
  }
2907
2907
  return `option '${bestOption.flags}'`;
@@ -3784,10 +3784,10 @@ async function writeJournal(targetRoot, journal) {
3784
3784
  );
3785
3785
  await rename2(temporary, path9);
3786
3786
  }
3787
- async function copyAtomically(source3, target, mode) {
3787
+ async function copyAtomically(source2, target, mode) {
3788
3788
  await mkdir2(dirname3(target), { recursive: true });
3789
3789
  const temporary = `${target}.pc-stage-${process.pid}`;
3790
- await copyFile(source3, temporary);
3790
+ await copyFile(source2, temporary);
3791
3791
  await chmod(temporary, mode);
3792
3792
  await rename2(temporary, target);
3793
3793
  }
@@ -3970,13 +3970,13 @@ async function planReconciliation(options, manifest, desired) {
3970
3970
  return { writes, removes, preserved, nextManifest };
3971
3971
  }
3972
3972
  async function backupPath(targetRoot, transactionRoot, path9) {
3973
- const source3 = await assertNoSymlinkInPreparedPath(targetRoot, path9);
3974
- if (!await pathExists(source3)) return false;
3973
+ const source2 = await assertNoSymlinkInPreparedPath(targetRoot, path9);
3974
+ if (!await pathExists(source2)) return false;
3975
3975
  await assertNoSymlinkInPreparedPath(targetRoot, path9);
3976
3976
  const target = join3(transactionRoot, "backup", path9);
3977
3977
  await mkdir2(dirname3(target), { recursive: true });
3978
3978
  await assertNoSymlinkInPreparedPath(targetRoot, path9);
3979
- await copyFile(source3, target);
3979
+ await copyFile(source2, target);
3980
3980
  return true;
3981
3981
  }
3982
3982
  async function restoreTransaction(targetRoot, transactionRoot, mutations, manifestHadOriginal, options) {
@@ -4155,6 +4155,19 @@ async function assertPlanPathsSafe(targetRoot, plan) {
4155
4155
  }
4156
4156
  async function executePreparedInstallation(options) {
4157
4157
  const manifest = await readInstallationManifest(options.targetRoot);
4158
+ const operation = options.preparedOperation ?? "install";
4159
+ if (options.preparedDiagnostics?.length) {
4160
+ return result(operation, "degraded", {
4161
+ ok: false,
4162
+ diagnostics: options.preparedDiagnostics
4163
+ });
4164
+ }
4165
+ if (options.preparedMutations.length === 0) {
4166
+ return result(operation, "degraded", {
4167
+ ok: false,
4168
+ diagnostics: ["No prepared mutations can be installed"]
4169
+ });
4170
+ }
4158
4171
  const duplicatePaths = /* @__PURE__ */ new Set();
4159
4172
  for (const mutation of options.preparedMutations) {
4160
4173
  if (duplicatePaths.has(mutation.path)) {
@@ -4229,7 +4242,6 @@ async function executePreparedInstallation(options) {
4229
4242
  packageIdentities,
4230
4243
  entries: nextEntries
4231
4244
  };
4232
- const operation = options.preparedOperation ?? "install";
4233
4245
  if (options.dryRun)
4234
4246
  return result(operation, manifest ? "healthy" : "missing", {
4235
4247
  dryRun: true,
@@ -8131,11 +8143,11 @@ var getToStream = (destination7, to = "stdin") => {
8131
8143
  }
8132
8144
  return destinationStream;
8133
8145
  };
8134
- var getFromStream = (source3, from = "stdout") => {
8146
+ var getFromStream = (source2, from = "stdout") => {
8135
8147
  const isWritable = false;
8136
- const { options, fileDescriptors } = SUBPROCESS_OPTIONS.get(source3);
8148
+ const { options, fileDescriptors } = SUBPROCESS_OPTIONS.get(source2);
8137
8149
  const fdNumber = getFdNumber(fileDescriptors, from, isWritable);
8138
- const sourceStream = fdNumber === "all" ? source3.all : source3.stdio[fdNumber];
8150
+ const sourceStream = fdNumber === "all" ? source2.all : source2.stdio[fdNumber];
8139
8151
  if (sourceStream === null || sourceStream === void 0) {
8140
8152
  throw new TypeError(getInvalidStdioOptionMessage(fdNumber, from, options, isWritable));
8141
8153
  }
@@ -9837,17 +9849,17 @@ var PASSTHROUGH_LISTENERS_PER_STREAM = 1;
9837
9849
 
9838
9850
  // node_modules/.pnpm/execa@10.0.0/node_modules/execa/lib/io/pipeline.js
9839
9851
  import { finished as finished3 } from "node:stream/promises";
9840
- var pipeStreams = (source3, destination7) => {
9841
- source3.pipe(destination7);
9842
- onSourceFinish(source3, destination7);
9843
- onDestinationFinish(source3, destination7);
9852
+ var pipeStreams = (source2, destination7) => {
9853
+ source2.pipe(destination7);
9854
+ onSourceFinish(source2, destination7);
9855
+ onDestinationFinish(source2, destination7);
9844
9856
  };
9845
- var onSourceFinish = async (source3, destination7) => {
9846
- if (isStandardStream(source3) || isStandardStream(destination7)) {
9857
+ var onSourceFinish = async (source2, destination7) => {
9858
+ if (isStandardStream(source2) || isStandardStream(destination7)) {
9847
9859
  return;
9848
9860
  }
9849
9861
  try {
9850
- await finished3(source3, { cleanup: true, readable: true, writable: false });
9862
+ await finished3(source2, { cleanup: true, readable: true, writable: false });
9851
9863
  } catch {
9852
9864
  }
9853
9865
  endDestinationStream(destination7);
@@ -9857,19 +9869,19 @@ var endDestinationStream = (destination7) => {
9857
9869
  destination7.end();
9858
9870
  }
9859
9871
  };
9860
- var onDestinationFinish = async (source3, destination7) => {
9861
- if (isStandardStream(source3) || isStandardStream(destination7)) {
9872
+ var onDestinationFinish = async (source2, destination7) => {
9873
+ if (isStandardStream(source2) || isStandardStream(destination7)) {
9862
9874
  return;
9863
9875
  }
9864
9876
  try {
9865
9877
  await finished3(destination7, { cleanup: true, readable: false, writable: true });
9866
9878
  } catch {
9867
9879
  }
9868
- abortSourceStream(source3);
9880
+ abortSourceStream(source2);
9869
9881
  };
9870
- var abortSourceStream = (source3) => {
9871
- if (source3.readable) {
9872
- source3.destroy();
9882
+ var abortSourceStream = (source2) => {
9883
+ if (source2.readable) {
9884
+ source2.destroy();
9873
9885
  }
9874
9886
  };
9875
9887
 
@@ -10593,7 +10605,7 @@ var createWritableStream = (subprocess, writableOptions) => Writable3.toWeb(subp
10593
10605
  var createTransformStream = (subprocess, duplexOptions) => Duplex3.toWeb(subprocess.duplex(duplexOptions));
10594
10606
 
10595
10607
  // node_modules/.pnpm/execa@10.0.0/node_modules/execa/lib/pipe/pipe-arguments.js
10596
- var normalizePipeArguments = ({ source: source3, sourcePromise, boundOptions, createNested }, ...pipeArguments) => {
10608
+ var normalizePipeArguments = ({ source: source2, sourcePromise, boundOptions, createNested }, ...pipeArguments) => {
10597
10609
  const startTime = getStartTime();
10598
10610
  const {
10599
10611
  destination: destination7,
@@ -10602,8 +10614,8 @@ var normalizePipeArguments = ({ source: source3, sourcePromise, boundOptions, cr
10602
10614
  from,
10603
10615
  unpipeSignal
10604
10616
  } = getDestinationStream(boundOptions, createNested, pipeArguments);
10605
- const { sourceStream, sourceError } = getSourceStream(source3, from);
10606
- const { options: sourceOptions, fileDescriptors } = SUBPROCESS_OPTIONS.get(source3);
10617
+ const { sourceStream, sourceError } = getSourceStream(source2, from);
10618
+ const { options: sourceOptions, fileDescriptors } = SUBPROCESS_OPTIONS.get(source2);
10607
10619
  return {
10608
10620
  sourcePromise,
10609
10621
  sourceStream,
@@ -10656,9 +10668,9 @@ var getDestination = (boundOptions, createNested, firstArgument, ...pipeArgument
10656
10668
  throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${firstArgument}`);
10657
10669
  };
10658
10670
  var mapDestinationArguments = ({ options }) => ({ options: { ...options, stdin: "pipe", piped: true } });
10659
- var getSourceStream = (source3, from) => {
10671
+ var getSourceStream = (source2, from) => {
10660
10672
  try {
10661
- const sourceStream = getFromStream(source3, from);
10673
+ const sourceStream = getFromStream(source2, from);
10662
10674
  return { sourceStream };
10663
10675
  } catch (error) {
10664
10676
  return { sourceError: error };
@@ -12628,7 +12640,7 @@ async function resolveVerifiedCapabilityEntrypoint(options) {
12628
12640
  }
12629
12641
 
12630
12642
  // packages/cli/src/release.ts
12631
- var cliVersion = true ? "0.1.9" : createRequire(import.meta.url)("../../../package.json").version;
12643
+ var cliVersion = true ? "0.1.13" : createRequire(import.meta.url)("../../../package.json").version;
12632
12644
 
12633
12645
  // packages/adapters/src/antigravity/materialize.ts
12634
12646
  import { resolve as resolve4 } from "node:path";
@@ -12787,7 +12799,7 @@ var antigravityRuntimeDescriptor = {
12787
12799
  schemaVersion: "1.0",
12788
12800
  id: "antigravity",
12789
12801
  aliases: ["google-antigravity", "antigravity-cli"],
12790
- supportedVersions: [">=2.0.0"],
12802
+ supportedVersions: [">=1.1.4 <2.0.0"],
12791
12803
  locations: [
12792
12804
  {
12793
12805
  id: "antigravity-project-skills",
@@ -12886,11 +12898,11 @@ var antigravityRuntimeDescriptor = {
12886
12898
  evidenceState: "source-observed"
12887
12899
  },
12888
12900
  {
12889
- id: "antigravity-2.0-rules",
12901
+ id: "antigravity-workspace-rules",
12890
12902
  semanticKind: "rule",
12891
12903
  integrationMode: "declarative",
12892
12904
  adapterId: markdown,
12893
- discovery: "2.0 workspace rules are discovered from .agents/rules.",
12905
+ discovery: "Workspace rules may be discovered from .agents/rules when verified for a supported client.",
12894
12906
  invocation: "Rules apply according to their activation mode.",
12895
12907
  precedence: ["workspace", "global"],
12896
12908
  evidenceClaimIds: ["antigravity.cli.discovery.rules"],
@@ -12898,11 +12910,11 @@ var antigravityRuntimeDescriptor = {
12898
12910
  evidenceState: "source-observed"
12899
12911
  },
12900
12912
  {
12901
- id: "antigravity-2.0-agents",
12913
+ id: "antigravity-workspace-agents",
12902
12914
  semanticKind: "agent",
12903
12915
  integrationMode: "declarative",
12904
12916
  adapterId: markdown,
12905
- discovery: "Custom agents are discovered from .agents/agents.",
12917
+ discovery: "Workspace agents may be discovered from .agents/agents when verified for a supported client.",
12906
12918
  invocation: "Invoke through the native subagent interface.",
12907
12919
  precedence: ["workspace", "global"],
12908
12920
  evidenceClaimIds: ["antigravity.cli.discovery.agents"],
@@ -12910,11 +12922,11 @@ var antigravityRuntimeDescriptor = {
12910
12922
  evidenceState: "source-observed"
12911
12923
  },
12912
12924
  {
12913
- id: "antigravity-2.0-hooks",
12925
+ id: "antigravity-workspace-hooks",
12914
12926
  semanticKind: "hook",
12915
12927
  integrationMode: "declarative",
12916
12928
  adapterId: hook,
12917
- discovery: "hooks.json is discovered at workspace scope.",
12929
+ discovery: "Workspace hooks may be discovered from hooks.json when verified for a supported client.",
12918
12930
  invocation: "Hooks participate in native tool and invocation events.",
12919
12931
  precedence: ["workspace", "global", "plugin"],
12920
12932
  evidenceClaimIds: ["antigravity.cli.hooks"],
@@ -12922,11 +12934,11 @@ var antigravityRuntimeDescriptor = {
12922
12934
  evidenceState: "source-observed"
12923
12935
  },
12924
12936
  {
12925
- id: "antigravity-2.0-mcp",
12937
+ id: "antigravity-workspace-mcp",
12926
12938
  semanticKind: "mcp",
12927
12939
  integrationMode: "declarative",
12928
12940
  adapterId: mcp,
12929
- discovery: "mcp_config.json is discovered at workspace scope.",
12941
+ discovery: "Workspace MCP may be discovered from mcp_config.json when verified for a supported client.",
12930
12942
  invocation: "MCP servers are exposed as native tools.",
12931
12943
  precedence: ["workspace", "global"],
12932
12944
  evidenceClaimIds: ["antigravity.cli.mcp"],
@@ -12974,148 +12986,148 @@ var antigravityRuntimeDescriptor = {
12974
12986
  // packages/adapters/src/antigravity/runtime-evidence.ts
12975
12987
  import { createHash as createHash9 } from "node:crypto";
12976
12988
  var digest2 = (value) => createHash9("sha256").update(value).digest("hex");
12977
- var retrievedAt = "2026-08-10T00:00:00.000Z";
12978
- var source = "docs/RFC/runtime-capability-profiles-revised.md";
12979
- var sourceClaim = (id, category, subject, assertion, locator, state = "source-observed", mode = "2.0") => ({
12980
- schemaVersion: "1.0",
12981
- id,
12982
- runtimeId: "antigravity",
12983
- category,
12984
- subject,
12985
- assertion,
12986
- versionRange: `product-mode:${mode}; >=2.0.0`,
12987
- sourceType: "official-source",
12988
- source,
12989
- sourceLocator: locator,
12990
- sourceDigest: digest2(`${id}:${assertion}:${locator}`),
12991
- state,
12992
- confidence: state === "unknown" ? "medium" : "high",
12993
- verificationStatus: state === "unknown" ? "unverified" : "verified",
12994
- stability: state === "unknown" ? "version-gated" : "stable",
12995
- verifiedAt: retrievedAt
12996
- });
12989
+ var retrievedAt = "2026-08-15T00:00:00.000Z";
12990
+ var cliVersionRange = ">=1.1.4 <2.0.0";
12991
+ var cliDocs = "https://codelabs.developers.google.com/antigravity/how-to-create-agent-skills-for-antigravity-cli";
12992
+ var productDocs = "https://www.antigravity.google/product/antigravity-cli";
12993
+ var sourceClaim = (id, category, subject, assertion, locator, options = {}) => {
12994
+ const state = options.state ?? "source-observed";
12995
+ return {
12996
+ schemaVersion: "1.0",
12997
+ id,
12998
+ runtimeId: "antigravity",
12999
+ category,
13000
+ subject,
13001
+ assertion,
13002
+ versionRange: options.versionRange ?? cliVersionRange,
13003
+ sourceType: "official-docs",
13004
+ source: options.source ?? cliDocs,
13005
+ sourceLocator: locator,
13006
+ sourceDigest: digest2(`${id}:${assertion}:${locator}`),
13007
+ state,
13008
+ confidence: state === "unknown" ? "low" : "high",
13009
+ verificationStatus: state === "unknown" ? "unverified" : "verified",
13010
+ stability: state === "unknown" ? "version-gated" : "stable",
13011
+ verifiedAt: retrievedAt
13012
+ };
13013
+ };
12997
13014
  var antigravityRuntimeEvidence = [
12998
13015
  sourceClaim(
12999
13016
  "antigravity.location.project-skills",
13000
13017
  "location",
13001
13018
  "workspace skill root",
13002
- "Antigravity discovers workspace skills beneath .agents/skills.",
13003
- "Section 9: .agents/skills/<name>/SKILL.md"
13019
+ "Antigravity CLI discovers workspace skills beneath .agents/skills.",
13020
+ "Skill location: .agents/skills/<skill-name>/SKILL.md"
13004
13021
  ),
13005
13022
  sourceClaim(
13006
13023
  "antigravity.location.project-rules",
13007
13024
  "location",
13008
13025
  "workspace rule root",
13009
- "Antigravity discovers workspace rules beneath .agents/rules.",
13010
- "Section 9: .agents/rules/*.md"
13026
+ "The native workspace rule path is not established by the verified CLI skill documentation.",
13027
+ "Workspace rule path: not established",
13028
+ { source: productDocs, state: "unknown" }
13011
13029
  ),
13012
13030
  sourceClaim(
13013
13031
  "antigravity.location.project-agents",
13014
13032
  "location",
13015
13033
  "workspace agent root",
13016
- "Antigravity discovers custom agents beneath .agents/agents.",
13017
- "Section 3: .agents/agents/<name>.md"
13034
+ "The native workspace agent path is not established by the verified CLI skill documentation.",
13035
+ "Workspace agent path: not established",
13036
+ { source: productDocs, state: "unknown" }
13018
13037
  ),
13019
13038
  sourceClaim(
13020
13039
  "antigravity.location.project-hooks",
13021
13040
  "location",
13022
13041
  "workspace hook config",
13023
- "Antigravity discovers workspace hooks from .agents/hooks.json.",
13024
- "Section 3: .agents/hooks.json"
13042
+ "The native workspace hook path is not established by the verified CLI skill documentation.",
13043
+ "Workspace hook path: not established",
13044
+ { source: productDocs, state: "unknown" }
13025
13045
  ),
13026
13046
  sourceClaim(
13027
13047
  "antigravity.location.project-mcp",
13028
13048
  "location",
13029
13049
  "workspace MCP config",
13030
- "Antigravity discovers workspace MCP servers from .agents/mcp_config.json.",
13031
- "Section 3: .agents/mcp_config.json"
13050
+ "The native workspace MCP configuration path is not established by the verified CLI skill documentation.",
13051
+ "Workspace MCP path: not established",
13052
+ { source: productDocs, state: "unknown" }
13032
13053
  ),
13033
13054
  sourceClaim(
13034
13055
  "antigravity.location.plugins",
13035
13056
  "location",
13036
13057
  "CLI plugin staging root",
13037
- "Antigravity CLI stages plugins beneath the documented Gemini plugin root.",
13038
- "Section 2: ~/.gemini/antigravity-cli/plugins/<plugin-name>/"
13058
+ "The native CLI plugin staging path is not established by the verified CLI skill documentation.",
13059
+ "CLI plugin staging path: not established",
13060
+ { source: productDocs, state: "unknown" }
13039
13061
  ),
13040
13062
  sourceClaim(
13041
13063
  "antigravity.workflow.storage",
13042
13064
  "location",
13043
13065
  "workflow storage",
13044
13066
  "Workflow physical storage path is not established by primary public documentation.",
13045
- "Section 9: workflow storage unknown",
13046
- "unknown"
13067
+ "Workflow storage path: not established",
13068
+ { source: productDocs, state: "unknown" }
13047
13069
  ),
13048
13070
  sourceClaim(
13049
13071
  "antigravity.cli.discovery.skills",
13050
13072
  "discovery",
13051
13073
  "CLI skill discovery",
13052
- "Antigravity CLI discovers project skills from .agents/skills.",
13053
- "Section 3; CLI mode; source observation only",
13054
- "source-observed",
13055
- "cli"
13074
+ "Antigravity CLI automatically discovers project skills from .agents/skills.",
13075
+ "Skill discovery and /skills listing"
13056
13076
  ),
13057
13077
  sourceClaim(
13058
13078
  "antigravity.cli.invocation.skills",
13059
13079
  "invocation",
13060
13080
  "CLI skill invocation",
13061
- "Antigravity CLI skill invocation is documented but not runtime-observed.",
13062
- "Section 6; CLI mode; runtime unavailable",
13063
- "source-observed",
13064
- "cli"
13081
+ "Antigravity CLI can list and invoke a discovered skill from the project workspace.",
13082
+ "Launch with agy; invoke through the skill-aware CLI workflow"
13065
13083
  ),
13066
13084
  sourceClaim(
13067
13085
  "antigravity.ide.discovery.skills",
13068
13086
  "discovery",
13069
13087
  "IDE skill discovery",
13070
- "Antigravity IDE uses the shared .agents/skills workspace root.",
13071
- "Section 3; IDE mode; runtime unavailable",
13072
- "source-observed",
13073
- "ide"
13088
+ "IDE skill discovery is not established by the verified CLI skill documentation.",
13089
+ "IDE skill discovery: not established",
13090
+ { source: productDocs, state: "unknown" }
13074
13091
  ),
13075
13092
  sourceClaim(
13076
13093
  "antigravity.cli.discovery.rules",
13077
13094
  "discovery",
13078
- "2.0 rule discovery",
13079
- "Workspace rules are discovered from .agents/rules.",
13080
- "Section 3; Antigravity 2.0 mode",
13081
- "source-observed",
13082
- "2.0"
13095
+ "workspace rule discovery",
13096
+ "Workspace rule discovery is not established by the verified CLI skill documentation.",
13097
+ "Workspace rule discovery: not established",
13098
+ { source: productDocs, state: "unknown" }
13083
13099
  ),
13084
13100
  sourceClaim(
13085
13101
  "antigravity.cli.discovery.agents",
13086
13102
  "discovery",
13087
- "2.0 agent discovery",
13088
- "Custom agents are discovered from .agents/agents.",
13089
- "Section 3; Antigravity 2.0 mode",
13090
- "source-observed",
13091
- "2.0"
13103
+ "workspace agent discovery",
13104
+ "Workspace agent discovery is not established by the verified CLI skill documentation.",
13105
+ "Workspace agent discovery: not established",
13106
+ { source: productDocs, state: "unknown" }
13092
13107
  ),
13093
13108
  sourceClaim(
13094
13109
  "antigravity.cli.hooks",
13095
13110
  "hooks",
13096
- "2.0 hook registration",
13097
- "Workspace hooks use .agents/hooks.json and typed tool decisions.",
13098
- "Section 6; Antigravity 2.0 mode",
13099
- "source-observed",
13100
- "2.0"
13111
+ "workspace hook registration",
13112
+ "Workspace hook registration is not established by the verified CLI skill documentation.",
13113
+ "Workspace hook registration: not established",
13114
+ { source: productDocs, state: "unknown" }
13101
13115
  ),
13102
13116
  sourceClaim(
13103
13117
  "antigravity.cli.mcp",
13104
13118
  "mcp",
13105
- "2.0 MCP registration",
13106
- "Workspace MCP uses .agents/mcp_config.json.",
13107
- "Section 3; Antigravity 2.0 mode",
13108
- "source-observed",
13109
- "2.0"
13119
+ "workspace MCP registration",
13120
+ "Workspace MCP registration is not established by the verified CLI skill documentation.",
13121
+ "Workspace MCP registration: not established",
13122
+ { source: productDocs, state: "unknown" }
13110
13123
  ),
13111
13124
  sourceClaim(
13112
13125
  "antigravity.cli.plugins",
13113
13126
  "plugin",
13114
13127
  "CLI plugin registration",
13115
- "CLI plugins require staged bundles with plugin.json.",
13116
- "Section 5; CLI mode",
13117
- "source-observed",
13118
- "cli"
13128
+ "CLI plugin registration is not established by the verified CLI skill documentation.",
13129
+ "CLI plugin registration: not established",
13130
+ { source: productDocs, state: "unknown" }
13119
13131
  )
13120
13132
  ];
13121
13133
 
@@ -13968,6 +13980,7 @@ var codexRuntimeEvidence = Object.freeze([
13968
13980
  ]);
13969
13981
 
13970
13982
  // packages/adapters/src/dcode/materialize.ts
13983
+ import { readFile as readFile5 } from "node:fs/promises";
13971
13984
  import { resolve as resolve7 } from "node:path";
13972
13985
  var marker4 = "<!-- portable-capabilities:owned dcode -->";
13973
13986
  function destination4(value) {
@@ -14013,7 +14026,32 @@ function registration3(operation) {
14013
14026
  return `${JSON.stringify({ adapterId: operation.adapterId, kind: operation.kind, target: operation.target }, null, 2)}
14014
14027
  `;
14015
14028
  }
14016
- function prepareDCodeMaterialization(plan, root) {
14029
+ async function mergedInstructions(root, path9, operations, removedIds) {
14030
+ let existing;
14031
+ try {
14032
+ existing = await readFile5(resolve7(root, path9), "utf8");
14033
+ } catch (error) {
14034
+ if (error.code !== "ENOENT") throw error;
14035
+ }
14036
+ if (!existing && operations.length === 0) return void 0;
14037
+ const selectedIds = new Set(operations.map((operation) => operation.id));
14038
+ const existingText = existing ?? "";
14039
+ const firstHeading = existingText.search(/^## .+$/mu);
14040
+ const preamble = firstHeading >= 0 ? existingText.slice(0, firstHeading).trim() : existingText.trim();
14041
+ const sections = firstHeading >= 0 ? existingText.slice(firstHeading).split(/(?=^## .+$)/mu) : [];
14042
+ const retained = sections.filter((section) => {
14043
+ const id = section.match(/^## ([^\n]+)/u)?.[1] ?? "";
14044
+ return !selectedIds.has(id) && !removedIds.some((removedId) => id.startsWith(`${removedId}:`));
14045
+ }).map((section) => section.trim());
14046
+ const generated = operations.slice().sort((left, right) => left.id.localeCompare(right.id)).map((operation) => `## ${operation.id}
14047
+
14048
+ ${operation.content.trim()}`);
14049
+ const sectionsToWrite = [...retained, ...generated];
14050
+ return sectionsToWrite.length > 0 ? `${preamble || marker4}
14051
+ ${sectionsToWrite.join("\n\n")}
14052
+ ` : void 0;
14053
+ }
14054
+ async function prepareDCodeMaterialization(plan, root) {
14017
14055
  if (plan.runtimeId !== "dcode") throw new Error(`DCode adapter cannot prepare ${plan.runtimeId}`);
14018
14056
  const mutations = [];
14019
14057
  const diagnostics = [];
@@ -14115,28 +14153,39 @@ function prepareDCodeMaterialization(plan, root) {
14115
14153
  );
14116
14154
  }
14117
14155
  }
14118
- if (instructionOperations.length > 0) {
14156
+ const instructionRemovals = plan.operations.filter(
14157
+ (operation) => operation.kind === "RemoveOwnedArtifact" && /^\.deepagents\/skills\/[^/]+\/SKILL\.md$/u.test(destination4(operation.detail))
14158
+ );
14159
+ if (instructionOperations.length > 0 || instructionRemovals.length > 0) {
14119
14160
  const instructionPath = ".deepagents/AGENTS.md";
14120
14161
  confined4(root, instructionPath);
14121
- const content = instructionOperations.sort((left, right) => left.id.localeCompare(right.id)).map((operation) => `## ${operation.id}
14122
-
14123
- ${operation.content.trim()}`).join("\n\n");
14124
- const first = instructionOperations[0];
14125
- mutations.push({
14126
- path: instructionPath,
14127
- kind: "write",
14128
- content: `<!-- portable-capabilities:owned dcode -->
14129
- ${content}
14130
- `,
14131
- mode: 420,
14132
- operationId: "dcode:shared-instructions",
14133
- sourceProjectionOperationId: first.sourceProjectionOperationId,
14134
- ownershipIntent: first.ownershipIntent,
14135
- approval: first.approval,
14136
- rollback: first.rollback,
14137
- upgrade: first.upgrade,
14138
- uninstall: first.uninstall
14162
+ const first = instructionOperations[0] ?? instructionRemovals[0];
14163
+ if (!first) throw new Error("DCode shared instruction operation is missing");
14164
+ const removedIds = instructionRemovals.flatMap((operation) => {
14165
+ const match = operation.detail.match(/^\.deepagents\/skills\/([^/]+)\/SKILL\.md$/u);
14166
+ return match?.[1] ? [match[1]] : [];
14139
14167
  });
14168
+ const content = await mergedInstructions(
14169
+ root,
14170
+ instructionPath,
14171
+ instructionOperations,
14172
+ removedIds
14173
+ );
14174
+ mutations.push(
14175
+ content ? {
14176
+ path: instructionPath,
14177
+ kind: "write",
14178
+ content,
14179
+ mode: 420,
14180
+ operationId: "dcode:shared-instructions",
14181
+ sourceProjectionOperationId: first.sourceProjectionOperationId,
14182
+ ownershipIntent: first.ownershipIntent,
14183
+ approval: first.approval,
14184
+ rollback: first.rollback,
14185
+ upgrade: first.upgrade,
14186
+ uninstall: first.uninstall
14187
+ } : { path: instructionPath, kind: "remove", ...metadata3(first) }
14188
+ );
14140
14189
  }
14141
14190
  return Object.freeze({
14142
14191
  runtimeId: plan.runtimeId,
@@ -14148,7 +14197,7 @@ ${content}
14148
14197
 
14149
14198
  // packages/adapters/src/dcode/runtime-descriptor.ts
14150
14199
  var markdown3 = "materialize-markdown";
14151
- var source2 = "source-observed";
14200
+ var source = "source-observed";
14152
14201
  var dcodeRuntimeDescriptor = {
14153
14202
  schemaVersion: "1.0",
14154
14203
  id: "dcode",
@@ -14207,7 +14256,7 @@ var dcodeRuntimeDescriptor = {
14207
14256
  precedence: ["project"],
14208
14257
  evidenceClaimIds: ["dcode.discovery.cli-skill", "dcode.invocation.cli-skill"],
14209
14258
  stability: "stable",
14210
- evidenceState: source2
14259
+ evidenceState: source
14211
14260
  },
14212
14261
  {
14213
14262
  id: "dcode-cli-instructions",
@@ -14219,7 +14268,7 @@ var dcodeRuntimeDescriptor = {
14219
14268
  precedence: ["project"],
14220
14269
  evidenceClaimIds: ["dcode.location.project-root"],
14221
14270
  stability: "stable",
14222
- evidenceState: source2
14271
+ evidenceState: source
14223
14272
  },
14224
14273
  {
14225
14274
  id: "dcode-cli-sync-subagents",
@@ -14231,7 +14280,7 @@ var dcodeRuntimeDescriptor = {
14231
14280
  precedence: ["project", "user"],
14232
14281
  evidenceClaimIds: ["dcode.cli.sync-subagents"],
14233
14282
  stability: "version-gated",
14234
- evidenceState: source2
14283
+ evidenceState: source
14235
14284
  },
14236
14285
  {
14237
14286
  id: "dcode-cli-memory",
@@ -14243,7 +14292,7 @@ var dcodeRuntimeDescriptor = {
14243
14292
  precedence: ["project", "user"],
14244
14293
  evidenceClaimIds: ["dcode.cli.memory"],
14245
14294
  stability: "version-gated",
14246
- evidenceState: source2
14295
+ evidenceState: source
14247
14296
  },
14248
14297
  {
14249
14298
  id: "dcode-cli-mcp",
@@ -14255,7 +14304,7 @@ var dcodeRuntimeDescriptor = {
14255
14304
  precedence: ["project", "user"],
14256
14305
  evidenceClaimIds: ["dcode.cli.mcp"],
14257
14306
  stability: "version-gated",
14258
- evidenceState: source2
14307
+ evidenceState: source
14259
14308
  },
14260
14309
  {
14261
14310
  id: "dcode-cli-configuration",
@@ -14267,7 +14316,7 @@ var dcodeRuntimeDescriptor = {
14267
14316
  precedence: ["project", "user"],
14268
14317
  evidenceClaimIds: ["dcode.cli.configuration"],
14269
14318
  stability: "version-gated",
14270
- evidenceState: source2
14319
+ evidenceState: source
14271
14320
  },
14272
14321
  {
14273
14322
  id: "dcode-cli-advisory-hooks",
@@ -14279,7 +14328,7 @@ var dcodeRuntimeDescriptor = {
14279
14328
  precedence: ["project", "user"],
14280
14329
  evidenceClaimIds: ["dcode.hooks.advisory"],
14281
14330
  stability: "version-gated",
14282
- evidenceState: source2
14331
+ evidenceState: source
14283
14332
  },
14284
14333
  {
14285
14334
  id: "dcode-sdk-tools",
@@ -14291,7 +14340,7 @@ var dcodeRuntimeDescriptor = {
14291
14340
  precedence: ["sdk"],
14292
14341
  evidenceClaimIds: ["dcode.sdk.tools"],
14293
14342
  stability: "version-gated",
14294
- evidenceState: source2
14343
+ evidenceState: source
14295
14344
  },
14296
14345
  {
14297
14346
  id: "dcode-cli-async-subagents",
@@ -15943,7 +15992,8 @@ var piRuntimeDescriptor = {
15943
15992
  // packages/adapters/src/pi/runtime-evidence.ts
15944
15993
  import { createHash as createHash15 } from "node:crypto";
15945
15994
  var digest8 = (value) => createHash15("sha256").update(value).digest("hex");
15946
- var observedAt2 = "2026-08-08T04:24:00-05:00";
15995
+ var observedAt2 = "2026-08-15T00:00:00.000Z";
15996
+ var skillsDocs = "https://pi.dev/docs/latest/skills";
15947
15997
  var piRuntimeEvidence = [
15948
15998
  {
15949
15999
  schemaVersion: "1.0",
@@ -16005,13 +16055,13 @@ var piRuntimeEvidence = [
16005
16055
  runtimeId: "pi",
16006
16056
  category: "discovery",
16007
16057
  subject: "native skill discovery",
16008
- assertion: "Pi natively discovers a project skill with extensions disabled.",
16009
- versionRange: "=0.64.0",
16010
- sourceType: "runtime-probe",
16011
- source: "pi",
16012
- sourceLocator: "packages/conformance/src/tracer/pi-native-evidence.json",
16013
- sourceDigest: digest8("Pi native discovery with extensions disabled"),
16014
- state: "runtime-observed",
16058
+ assertion: "Pi discovers project skills beneath .pi/skills.",
16059
+ versionRange: ">=0.64.0",
16060
+ sourceType: "official-docs",
16061
+ source: skillsDocs,
16062
+ sourceLocator: "Project skills: .pi/skills/",
16063
+ sourceDigest: digest8("Pi project skills .pi/skills official docs"),
16064
+ state: "source-observed",
16015
16065
  confidence: "high",
16016
16066
  verificationStatus: "verified",
16017
16067
  stability: "stable",
@@ -16023,13 +16073,13 @@ var piRuntimeEvidence = [
16023
16073
  runtimeId: "pi",
16024
16074
  category: "invocation",
16025
16075
  subject: "native skill invocation",
16026
- assertion: "Pi invokes a discovered project skill with extensions disabled.",
16027
- versionRange: "=0.64.0",
16028
- sourceType: "runtime-probe",
16029
- source: "pi",
16030
- sourceLocator: "packages/conformance/src/tracer/pi-native-evidence.json",
16031
- sourceDigest: digest8("Pi native invocation with extensions disabled"),
16032
- state: "runtime-observed",
16076
+ assertion: "Pi loads a discovered skill when its description matches the task or the user invokes /skill:name.",
16077
+ versionRange: ">=0.64.0",
16078
+ sourceType: "official-docs",
16079
+ source: skillsDocs,
16080
+ sourceLocator: "Skill loading and invocation: /skill:name",
16081
+ sourceDigest: digest8("Pi skill invocation official docs"),
16082
+ state: "source-observed",
16033
16083
  confidence: "high",
16034
16084
  verificationStatus: "verified",
16035
16085
  stability: "stable",
@@ -16148,7 +16198,7 @@ function normalizeSetupRequest(input) {
16148
16198
  // packages/cli/src/setup/service.ts
16149
16199
  import { createHash as createHash16 } from "node:crypto";
16150
16200
  import { existsSync as existsSync2 } from "node:fs";
16151
- import { readdir as readdir4, readFile as readFile5 } from "node:fs/promises";
16201
+ import { readdir as readdir4, readFile as readFile6 } from "node:fs/promises";
16152
16202
  import { dirname as dirname5, isAbsolute as isAbsolute3, relative as relative4, resolve as resolve12 } from "node:path";
16153
16203
  import { fileURLToPath as fileURLToPath4 } from "node:url";
16154
16204
  import { parse as parse3 } from "yaml";
@@ -16210,7 +16260,7 @@ async function loadCanonicalArtifact(catalogRoot, capabilityId) {
16210
16260
  if (!capabilityId || /[\\/]/u.test(capabilityId))
16211
16261
  throw new Error("capability IDs must be single path segments");
16212
16262
  const file = resolve12(catalogRoot, "roles", `${capabilityId}.yaml`);
16213
- const role = parse3(await readFile5(file, "utf8"));
16263
+ const role = parse3(await readFile6(file, "utf8"));
16214
16264
  if (role.schemaVersion !== "1.0" || role.id !== capabilityId || !role.purpose || !Array.isArray(role.inputs) || !role.output || !role.family || !role.taxonomy || !Array.isArray(role.precedence) || !Array.isArray(role.requiredBehavior) || !Array.isArray(role.forbiddenBehavior) || !Array.isArray(role.evaluation?.criteria)) {
16215
16265
  throw new Error(`Invalid canonical capability: ${file}`);
16216
16266
  }
@@ -16219,7 +16269,7 @@ async function loadCanonicalArtifact(catalogRoot, capabilityId) {
16219
16269
  const schemaRelativePath = relative4(resolve12(catalogRoot), schemaFile);
16220
16270
  if (isAbsolute3(schemaRelativePath) || schemaRelativePath.startsWith(".."))
16221
16271
  throw new Error(`Canonical output schema escapes catalog: ${role.output.schema}`);
16222
- const schemaContent = await readFile5(schemaFile, "utf8");
16272
+ const schemaContent = await readFile6(schemaFile, "utf8");
16223
16273
  const contract = operationalContract(role);
16224
16274
  const contractContent = `${JSON.stringify(
16225
16275
  { ...role, output: { ...role.output, schema: "resources/output.schema.json" } },
@@ -16303,6 +16353,35 @@ function renderVerifiedUsage(preview, descriptor, claims, runtimeVersion) {
16303
16353
  return verified ? `${descriptor.id}: ${surface.invocation}` : `${descriptor.id}: native usage unavailable; use manual guidance`;
16304
16354
  });
16305
16355
  }
16356
+ function negotiationDiagnostics(previews) {
16357
+ return previews.flatMap(
16358
+ (preview) => preview.negotiations.filter((negotiation) => negotiation.installationMode !== "automatic").map((negotiation) => {
16359
+ const evidence = negotiation.evidenceClaimIds.join(", ") || "no evidence claims";
16360
+ return `${negotiation.intent}: ${negotiation.installationMode} (${negotiation.reason}) [${evidence}]`;
16361
+ })
16362
+ );
16363
+ }
16364
+ function composeInstallationPlan(previews, artifacts, runtimeId) {
16365
+ const first = previews[0]?.installationPlan;
16366
+ if (!first) throw new Error("at least one installation plan is required");
16367
+ const operations = previews.flatMap((preview, index) => {
16368
+ const capabilityId = artifacts[index]?.id;
16369
+ if (!capabilityId) throw new Error("installation plan is missing its capability");
16370
+ return preview.installationPlan.operations.map((operation) => ({
16371
+ ...operation,
16372
+ id: `${capabilityId}:${operation.id}`,
16373
+ sourceProjectionOperationId: `${capabilityId}:${operation.sourceProjectionOperationId}`
16374
+ }));
16375
+ });
16376
+ const base = {
16377
+ schemaVersion: first.schemaVersion,
16378
+ id: `installation:${runtimeId}:${artifacts.map((artifact) => artifact.id).join(",")}`,
16379
+ runtimeId,
16380
+ scope: first.scope,
16381
+ operations
16382
+ };
16383
+ return { ...base, digest: stableDigest(base) };
16384
+ }
16306
16385
  function defaultCatalogRoot() {
16307
16386
  const moduleDir = dirname5(fileURLToPath4(import.meta.url));
16308
16387
  const packagedCatalog = [resolve12(moduleDir, "catalog"), resolve12(moduleDir, "../catalog")].find(
@@ -16361,30 +16440,43 @@ async function executeSetupSelection(request, artifacts, descriptor, claims, con
16361
16440
  ...context.faultInjector ? { faultInjector: context.faultInjector } : {}
16362
16441
  };
16363
16442
  const runtime = resolveProductionRuntime(executionRequest.runtimeId);
16364
- const lifecycle = executionRequest.intent === "setup" || executionRequest.intent === "update" ? await executePreparedInstallation({
16365
- ...lifecycleOptions,
16366
- preparedOperation: executionRequest.intent === "update" ? "upgrade" : "install",
16367
- preparedMutations: (await Promise.all(
16368
- previews.map((preview) => runtime.prepare(preview.installationPlan, targetRoot))
16369
- )).flatMap((prepared) => prepared.mutations)
16370
- }) : executionRequest.intent === "remove" ? await removeInstallation(
16371
- targetRoot,
16372
- context.faultInjector,
16373
- executionRequest.capabilityIds
16374
- ) : await statusInstallation(targetRoot);
16443
+ const lifecycle = executionRequest.intent === "setup" || executionRequest.intent === "update" || executionRequest.intent === "remove" ? await (async () => {
16444
+ const installationPlan = composeInstallationPlan(
16445
+ previews,
16446
+ planningArtifacts,
16447
+ executionRequest.runtimeId
16448
+ );
16449
+ const prepared = await runtime.prepare(installationPlan, targetRoot);
16450
+ if (prepared.runtimeId !== installationPlan.runtimeId || prepared.planId !== installationPlan.id) {
16451
+ throw new Error(`Materializer returned an invalid ${executionRequest.runtimeId} plan`);
16452
+ }
16453
+ const duplicatePath = prepared.mutations.map((mutation) => mutation.path).find((path9, index, paths) => paths.indexOf(path9) !== index);
16454
+ if (duplicatePath)
16455
+ throw new Error(`Selection produced duplicate prepared path: ${duplicatePath}`);
16456
+ const preparedDiagnostics = [
16457
+ ...prepared.diagnostics?.map(
16458
+ (diagnostic6) => `${diagnostic6.kind}: ${diagnostic6.message}`
16459
+ ) ?? [],
16460
+ ...executionRequest.intent === "remove" ? [] : negotiationDiagnostics(previews)
16461
+ ];
16462
+ return executePreparedInstallation({
16463
+ ...lifecycleOptions,
16464
+ preparedOperation: executionRequest.intent === "update" ? "upgrade" : executionRequest.intent === "remove" ? "remove" : "install",
16465
+ preparedMutations: prepared.mutations,
16466
+ ...preparedDiagnostics.length > 0 ? { preparedDiagnostics } : {}
16467
+ });
16468
+ })() : await statusInstallation(targetRoot);
16375
16469
  return { request, previews, lifecycle };
16376
16470
  }
16377
16471
  async function executeSetupLifecycle(request, artifact, descriptor, claims, context) {
16378
16472
  const result2 = await executeSetupSelection(request, [artifact], descriptor, claims, context);
16379
16473
  const preview = result2.previews[0];
16474
+ if (!preview) throw new Error("at least one capability is required");
16380
16475
  if (!result2.lifecycle)
16381
16476
  throw new Error("approval required; rerun with approvalPolicy=preapproved");
16382
16477
  return { request, preview, lifecycle: result2.lifecycle };
16383
16478
  }
16384
16479
 
16385
- // packages/cli/src/wizard.ts
16386
- import { execFileSync } from "node:child_process";
16387
-
16388
16480
  // node_modules/.pnpm/@clack+core@1.4.3/node_modules/@clack/core/dist/index.mjs
16389
16481
  import { styleText } from "node:util";
16390
16482
  import { stdout, stdin } from "node:process";
@@ -17592,6 +17684,73 @@ ${r2}
17592
17684
  }
17593
17685
  }).prompt();
17594
17686
 
17687
+ // packages/cli/src/setup/probe.ts
17688
+ import { execFileSync } from "node:child_process";
17689
+ var executables = Object.freeze({
17690
+ antigravity: "agy",
17691
+ "claude-code": "claude",
17692
+ codex: "codex",
17693
+ dcode: "dcode",
17694
+ "oh-my-pi": "omp",
17695
+ opencode: "opencode",
17696
+ pi: "pi"
17697
+ });
17698
+ function resolveRuntimeProbe(runtimeId) {
17699
+ const runtime = resolveProductionRuntime(runtimeId);
17700
+ const canonicalId = runtime.descriptor.id;
17701
+ const executable = executables[canonicalId];
17702
+ if (!executable) throw new Error(`No runtime probe configured for ${canonicalId}`);
17703
+ return {
17704
+ runtimeId: canonicalId,
17705
+ executable,
17706
+ args: ["--version"],
17707
+ supportedVersions: runtime.descriptor.supportedVersions
17708
+ };
17709
+ }
17710
+ function parseVersion2(output) {
17711
+ return output.match(/\bv?(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?)\b/u)?.[1];
17712
+ }
17713
+ function defaultRun(probe) {
17714
+ return execFileSync(probe.executable, probe.args, {
17715
+ encoding: "utf8",
17716
+ stdio: ["ignore", "pipe", "pipe"],
17717
+ timeout: 5e3
17718
+ });
17719
+ }
17720
+ function probeRuntimeVersion(runtimeId, options = {}) {
17721
+ const probe = resolveRuntimeProbe(runtimeId);
17722
+ let output;
17723
+ try {
17724
+ output = (options.run ?? defaultRun)(probe);
17725
+ } catch (error) {
17726
+ const code = error.code;
17727
+ const unavailable = code === "ENOENT" || code === "EACCES";
17728
+ return {
17729
+ status: unavailable ? "unavailable" : "failed",
17730
+ runtimeId: probe.runtimeId,
17731
+ executable: probe.executable,
17732
+ reason: unavailable ? `${probe.executable} is not installed or is not executable` : error instanceof Error ? error.message : String(error)
17733
+ };
17734
+ }
17735
+ const version = parseVersion2(output);
17736
+ if (!version)
17737
+ return {
17738
+ status: "unknown-version",
17739
+ runtimeId: probe.runtimeId,
17740
+ executable: probe.executable,
17741
+ reason: "version probe returned no parseable semantic version"
17742
+ };
17743
+ if (!probe.supportedVersions.some((range) => isRuntimeVersionInRange(range, version)))
17744
+ return {
17745
+ status: "unsupported-version",
17746
+ runtimeId: probe.runtimeId,
17747
+ executable: probe.executable,
17748
+ version,
17749
+ reason: `version ${version} is outside the supported runtime ranges`
17750
+ };
17751
+ return { status: "detected", runtimeId: probe.runtimeId, executable: probe.executable, version };
17752
+ }
17753
+
17595
17754
  // packages/cli/src/wizard.ts
17596
17755
  var supportedRuntimes = [...productionRuntimeRegistry.keys()];
17597
17756
  function unwrap(value) {
@@ -17602,17 +17761,6 @@ function unwrap(value) {
17602
17761
  }
17603
17762
  return value;
17604
17763
  }
17605
- function detectRuntimeVersion(runtime) {
17606
- try {
17607
- const output = execFileSync(runtime, ["--version"], {
17608
- encoding: "utf8",
17609
- stdio: ["ignore", "pipe", "pipe"]
17610
- });
17611
- return output.match(/\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?/)?.[0] ?? "unknown";
17612
- } catch {
17613
- return "unknown";
17614
- }
17615
- }
17616
17764
  async function runInstallWizard() {
17617
17765
  intro("Portable Capabilities setup");
17618
17766
  try {
@@ -17632,6 +17780,12 @@ async function runInstallWizard() {
17632
17780
  options: supportedRuntimes.map((value) => ({ value, label: value }))
17633
17781
  })
17634
17782
  );
17783
+ const probe = probeRuntimeVersion(runtime);
17784
+ if (probe.status !== "detected" || !probe.version) {
17785
+ log.error(`${runtime}: ${probe.reason ?? probe.status}`);
17786
+ process.exitCode = 4;
17787
+ return;
17788
+ }
17635
17789
  const target = String(
17636
17790
  unwrap(
17637
17791
  await text({
@@ -17649,7 +17803,7 @@ async function runInstallWizard() {
17649
17803
  );
17650
17804
  const request = normalizeSetupRequest({
17651
17805
  runtimeId: runtime,
17652
- runtimeVersion: detectRuntimeVersion(runtime),
17806
+ runtimeVersion: probe.version,
17653
17807
  scope: "project",
17654
17808
  projectDirectory: target,
17655
17809
  capabilityIds,
@@ -17671,7 +17825,7 @@ async function runInstallWizard() {
17671
17825
  runtimeEntry.claims,
17672
17826
  { sourceRoot: process.cwd(), packageVersion: cliVersion }
17673
17827
  );
17674
- if (!result2.lifecycle || !result2.lifecycle.ok) {
17828
+ if (!result2.lifecycle?.ok) {
17675
17829
  for (const diagnostic6 of result2.lifecycle?.diagnostics ?? ["Approval required."])
17676
17830
  log.error(diagnostic6);
17677
17831
  process.exitCode = 4;
@@ -17876,11 +18030,13 @@ export {
17876
18030
  normalizeSetupRequest,
17877
18031
  persistInvocation,
17878
18032
  previewSetup,
18033
+ probeRuntimeVersion,
17879
18034
  productionRuntimeRegistry,
17880
18035
  recoverInstallation,
17881
18036
  removeInstallation,
17882
18037
  renderVerifiedUsage,
17883
18038
  resolveProductionRuntime,
18039
+ resolveRuntimeProbe,
17884
18040
  statusInstallation,
17885
18041
  structuredLog,
17886
18042
  upgradePackage,