@knowttl/artium-axi 0.0.17 → 0.0.18

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/README.md CHANGED
@@ -155,6 +155,7 @@ Use `--host codex`, `--host opencode` or `--host pi` without `--hook` for those
155
155
  Only Claude Code supports the optional `SessionStart` hook, which injects the `tools` discovery output.
156
156
  Setup preserves unrelated settings and refuses edited/unmanaged skills unless `--force` is explicit.
157
157
  Re-run setup after moving the executable or changing grants; skills for removed grants are retained and reported.
158
+ On Windows, installed skills include labelled PowerShell and Git Bash invocations; use the command for your shell.
158
159
  See [installation paths and manual removal](docs/client-reference.md#agent-installation) before uninstalling.
159
160
  Artium's authenticated setup fetches managed skills; a standalone skill installer does not configure this server account.
160
161
 
@@ -20748,7 +20748,7 @@ import { resolve } from "node:path";
20748
20748
  // package.json
20749
20749
  var package_default = {
20750
20750
  name: "artium-axi",
20751
- version: "0.0.17",
20751
+ version: "0.0.18",
20752
20752
  private: true,
20753
20753
  license: "MIT",
20754
20754
  type: "module",
@@ -44214,7 +44214,7 @@ import { homedir as homedir2 } from "node:os";
44214
44214
  import { dirname as dirname2, join as join2, resolve as resolve2 } from "node:path";
44215
44215
 
44216
44216
  // skill/artium-axi/SKILL.md
44217
- var SKILL_default = "---\nname: artium-axi\ndescription: Discover and run managed commands through Artium, using the signed-in account and its granted tools.\n---\n\nUse artium-axi tools first for requests involving data from Artium-managed tools.\nRun `artium-axi tools` to discover the tools available to this account before choosing a tool.\nRun `artium-axi tools show <tool>` for its commands and a vetted example, then run `artium-axi <tool> <args>`.\nFollow the returned next commands; they already include the Artium prefix.\nKeep upstream arguments intact and use the managed credentials rather than configuring an upstream CLI directly.\n\nIf artium-axi is absent from PATH, use the installed command below in place of `artium-axi` in every example:\n\n<!-- artium-axi executable -->\nThe setup command records the standalone bundle's Node invocation here.\n<!-- /artium-axi executable -->\n\nIf sign-in is required, ask the user to follow `artium-axi login --help` for their SSO or local account.\nNever request or print tokens or put passwords in arguments.\nAn empty tool list means no enabled runtime tool is available through the account's roles; ask an administrator to check grants and enabled tools.\nUse `artium-axi doctor` for connection or cached health diagnostics.\nDo not retry an uncertain command outcome, especially a write.\n";
44217
+ var SKILL_default = "---\nname: artium-axi\ndescription: Discover and run managed commands through Artium, using the signed-in account and its granted tools.\n---\n\nUse artium-axi tools first for requests involving data from Artium-managed tools.\nRun `artium-axi tools` to discover the tools available to this account before choosing a tool.\nRun `artium-axi tools show <tool>` for its commands and a vetted example, then run `artium-axi <tool> <args>`.\nFollow the returned next commands; they already include the Artium prefix.\nKeep upstream arguments intact and use the managed credentials rather than configuring an upstream CLI directly.\nSee [client input handling](https://github.com/knowttl/artium-axi/blob/main/docs/client-reference.md#command-surface-and-subcommands) for Azure stdin selection and Tenable local uploads or explicit stdin.\n\nIf artium-axi is absent from PATH, use the installed command below in place of `artium-axi` in every example:\nOn Windows, choose the labelled PowerShell or Git Bash command for your shell.\n\n<!-- artium-axi executable -->\nThe setup command records the standalone bundle's Node invocation here.\n<!-- /artium-axi executable -->\n\nIf sign-in is required, ask the user to follow `artium-axi login --help` for their SSO or local account.\nNever request or print tokens or put passwords in arguments.\nAn empty tool list means no enabled runtime tool is available through the account's roles; ask an administrator to check grants and enabled tools.\nUse `artium-axi doctor` for connection or cached health diagnostics.\nDo not retry an uncertain command outcome, especially a write.\n";
44218
44218
 
44219
44219
  // src/cli/setup.ts
44220
44220
  var hosts = {
@@ -44311,12 +44311,23 @@ async function setup(args) {
44311
44311
  throw new ArtiumError("INVALID_INPUT", `Hook installation is unsupported for ${host}: this installer has no verified ${host} hook implementation. No files were written.`, `Install the skill with artium-axi setup --host ${host} without --hook; Claude Code supports --hook.`);
44312
44312
  }
44313
44313
  const executable = resolve2(process.argv[1]);
44314
- const invocation = process.platform === "win32" ? `& '${process.execPath.replaceAll("'", "''")}' '${executable.replaceAll("'", "''")}'` : `${quote(process.execPath)} ${quote(executable)}`;
44315
- const executableBlock = `<!-- artium-axi executable -->
44314
+ const gitBashQuote = (path) => `"${path.replaceAll("\\", "/").replaceAll(/["$`]/g, "\\$&")}"`;
44315
+ const invocation = process.platform === "win32" ? `PowerShell:
44316
+
44317
+ \`\`\`powershell
44318
+ & '${process.execPath.replaceAll("'", "''")}' '${executable.replaceAll("'", "''")}'
44319
+ \`\`\`
44320
+
44321
+ Git Bash:
44316
44322
 
44317
44323
  \`\`\`sh
44324
+ ${gitBashQuote(process.execPath)} ${gitBashQuote(executable)}
44325
+ \`\`\`` : `\`\`\`sh
44326
+ ${quote(process.execPath)} ${quote(executable)}
44327
+ \`\`\``;
44328
+ const executableBlock = `<!-- artium-axi executable -->
44329
+
44318
44330
  ${invocation}
44319
- \`\`\`
44320
44331
 
44321
44332
  <!-- /artium-axi executable -->`;
44322
44333
  const content = SKILL_default.replace(/<!-- artium-axi executable -->[\s\S]*?<!-- \/artium-axi executable -->/, () => executableBlock);
@@ -44380,15 +44391,15 @@ async function toolInput(tool, original) {
44380
44391
  const input2 = {};
44381
44392
  let totalFileBytes = 0;
44382
44393
  const hunting = tool === "mg-axi" && args.slice(0, 3).join(" ") === "security hunting query";
44383
- if ((tool === "az-axi" || tool === "hybrid-axi" || hunting) && !args.some((arg) => ["--help", "-h", "--version", "-v", "-V"].includes(arg))) {
44384
- const fileFlags = hunting ? ["file"] : tool === "hybrid-axi" ? hybrid_axi_default.adapterBoundary.inputFileFlags : az_axi_default.adapterBoundary.inputFileFlags;
44394
+ if ((tool === "az-axi" || tool === "hybrid-axi" || tool === "tenable-axi" || hunting) && !args.some((arg) => ["--help", "-h", "--version", "-v", "-V"].includes(arg))) {
44395
+ const fileFlags = hunting ? ["file"] : tool === "tenable-axi" ? tenable_axi_default.adapterBoundary.inputFileFlags : tool === "hybrid-axi" ? hybrid_axi_default.adapterBoundary.inputFileFlags : az_axi_default.adapterBoundary.inputFileFlags;
44385
44396
  for (let index = 0; index < args.length; index++) {
44386
44397
  if (args[index] === "--") break;
44387
44398
  const [flag] = args[index].split("=");
44388
44399
  if (!fileFlags.some((name2) => flag === `--${name2}`)) continue;
44389
44400
  const equals = args[index].indexOf("=");
44390
44401
  const path = equals < 0 ? args[++index] : args[index].slice(equals + 1);
44391
- if (path === "-" && tool === "hybrid-axi" && flag === "--body-file") {
44402
+ if (path === "-" && (tool === "tenable-axi" || tool === "hybrid-axi" && flag === "--body-file")) {
44392
44403
  input2.stdin = (await readBounded(process.stdin, inputLimits.stdinBytes)).toString("utf8");
44393
44404
  continue;
44394
44405
  }
@@ -44412,8 +44423,35 @@ async function toolInput(tool, original) {
44412
44423
  leading++;
44413
44424
  if (!token.includes("=") && (name !== "full" || ["true", "false"].includes(args[leading]))) leading++;
44414
44425
  }
44415
- const consumesStdin = az_axi_default.commands.some((route) => ["rg query", "logs query", "api"].includes(route.handlerCommand) && route.command.split(" ").every((word, index) => args[leading + index] === word));
44416
- if (tool === "az-axi" && consumesStdin && !process.stdin.isTTY) {
44426
+ const route = az_axi_default.commands.find((route2) => ["rg query", "logs query", "api"].includes(route2.handlerCommand) && route2.command.split(" ").every((word, index) => args[leading + index] === word));
44427
+ let positional = false;
44428
+ if (route) {
44429
+ for (let index = leading + route.command.split(" ").length; index < args.length; index++) {
44430
+ const token = args[index];
44431
+ if (token === "--") {
44432
+ positional = index + 1 < args.length;
44433
+ break;
44434
+ }
44435
+ if (!token.startsWith("-") || token === "-") {
44436
+ positional = true;
44437
+ break;
44438
+ }
44439
+ const raw = token.slice(token.startsWith("--") ? 2 : 1).split("=")[0];
44440
+ const expanded = token.startsWith("--") ? raw : route.shortFlags[raw] ?? raw;
44441
+ const name = route.flagAliases[expanded] ?? expanded;
44442
+ const kind = route.flags[name];
44443
+ if (token.includes("=") || !kind) continue;
44444
+ if (kind === "boolean") {
44445
+ if (["true", "false"].includes(args[index + 1])) index++;
44446
+ } else {
44447
+ while (args[index + 1] !== void 0 && (!args[index + 1].startsWith("-") || /^-\d/.test(args[index + 1]) || az_axi_default.adapterBoundary.inputFileFlags.includes(name) && input2.files?.some((file2) => file2.name === args[index + 1]))) {
44448
+ index++;
44449
+ if (!["list", "literal-list"].includes(kind) || route.positionalInput) break;
44450
+ }
44451
+ }
44452
+ }
44453
+ }
44454
+ if (tool === "az-axi" && route && !input2.files?.length && !positional && !process.stdin.isTTY) {
44417
44455
  const stdin = await readBounded(process.stdin, inputLimits.stdinBytes);
44418
44456
  if (stdin.length) input2.stdin = stdin.toString("utf8");
44419
44457
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowttl/artium-axi",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "Client CLI and embedded skill for the Artium managed tools server.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -8,8 +8,10 @@ Run `artium-axi tools` to discover the tools available to this account before ch
8
8
  Run `artium-axi tools show <tool>` for its commands and a vetted example, then run `artium-axi <tool> <args>`.
9
9
  Follow the returned next commands; they already include the Artium prefix.
10
10
  Keep upstream arguments intact and use the managed credentials rather than configuring an upstream CLI directly.
11
+ See [client input handling](https://github.com/knowttl/artium-axi/blob/main/docs/client-reference.md#command-surface-and-subcommands) for Azure stdin selection and Tenable local uploads or explicit stdin.
11
12
 
12
13
  If artium-axi is absent from PATH, use the installed command below in place of `artium-axi` in every example:
14
+ On Windows, choose the labelled PowerShell or Git Bash command for your shell.
13
15
 
14
16
  <!-- artium-axi executable -->
15
17
  The setup command records the standalone bundle's Node invocation here.