@knowttl/artium-axi 0.0.60 → 0.0.61

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
@@ -72,13 +72,12 @@ Ordinary discovery and tool calls never install or repair agent settings.
72
72
  ## What it covers
73
73
 
74
74
  Managed tools start disabled; role grants, enabled tools and upstream permissions determine access.
75
- Write capabilities below require administrator opt-in.
76
75
 
77
76
  | Group | Purpose | Access | Reference |
78
77
  | --- | --- | --- | --- |
79
78
  | BeyondTrust PM Cloud | Endpoint Privilege Management reads, selected writes, deletes and four downloads | Managed credentials; exact operation grants; separate delete toggle | [Credentials](docs/tool-credentials.md#beyondtrust-pm-cloud) |
80
79
  | Discovery and sessions | Identity, login, tools, doctor, update, setup and delegated token management | Client/session operations; delegated scope restrictions apply | [Commands](docs/commands.md), [delegated boundaries](docs/safety.md#delegated-sessions) |
81
- | Falcon | Endpoint investigations, search lifecycle, identity policy rules, traffic inspection exclusions, MalQuery and restricted RTR | Exact administrator grants; native RTR profile opt-in and confirmation | [Capabilities](docs/safety.md#write-gates-by-tool) |
80
+ | Falcon | Endpoint investigations, search lifecycle, identity policy rules, traffic inspection exclusions, MalQuery and restricted RTR | Managed reads, administrator-gated named writes, and raw API and Identity GraphQL passthrough writes | [Capabilities](docs/safety.md#azure-falcon-and-vectra-reads) |
82
81
  | Kubernetes | Cluster resources, logs and passive authorization reviews | Bounded reads, native prepare/preview/confirm mutations, caller-owned workspaces, explicitly granted byte sessions and port forwarding, protected service-account token delivery | [Capabilities](docs/safety.md#kubernetes-reads) |
83
82
  | SSH | Granted hosts, authentication checks, confirmed commands and reusable transports | Dedicated host bindings and caller grants; writes default off | [Capabilities](docs/safety.md#ssh-reads) |
84
83
  | Vectra | Hosts, detections and response workflows | Reads; selected writes | [Credentials](docs/tool-credentials.md#vectra) |
@@ -104,8 +103,9 @@ The [client reference](docs/client-reference.md#command-surface-and-subcommands)
104
103
 
105
104
  ## Safety
106
105
 
107
- Managed writes are off by default: administrator capability alone grants no tool access.
108
- Enabled tools are read-only by default, with documented exceptions such as Hybrid Analysis quick scans that transmit samples or URLs.
106
+ The administrator write switches default to off, and tool access requires a role grant.
107
+ See the [Falcon passthrough rules](docs/safety.md#azure-falcon-and-vectra-reads) before granting access to a writable Falcon instance.
108
+ Some reads, such as Hybrid Analysis quick scans, transmit samples or URLs.
109
109
  There is no universal Artium confirmation flag or `ARTIUM_AXI_READ_ONLY` environment switch.
110
110
  Administrators keep writes disabled or narrow operation allowlists; native gates can require preview, `--execute` and exact `--confirm`.
111
111
  After an unknown outcome, inspect state before retrying.
@@ -43,7 +43,7 @@ var init_package = __esm({
43
43
  "package.json"() {
44
44
  package_default = {
45
45
  name: "artium-axi",
46
- version: "0.0.60",
46
+ version: "0.0.61",
47
47
  private: true,
48
48
  license: "MIT",
49
49
  type: "module",
@@ -32772,16 +32772,16 @@ var init_falcon_axi = __esm({
32772
32772
  generatedBy: "scripts/falcon-inventory.ts",
32773
32773
  tool: "falcon-axi",
32774
32774
  package: "@knowttl/falcon-axi",
32775
- version: "1.3.0",
32776
- integrity: "sha512-l0It1HsvJ5dZpRzpptwnak5AeHqDGwrnkuxNxCP8FOGOWYxxKAay3s7KJGEevzchhuR5Gffq+CeroMEFMG3PKg==",
32775
+ version: "1.4.0",
32776
+ integrity: "sha512-9z9cA0OqOw/ZxBDM1MmFvdOQ0DtCRes77GBrMxZXQ5HUy1WWteNh9U/HllLD6Glntmp7/YVN8J44ZnwXeIJadA==",
32777
32777
  sources: [
32778
32778
  {
32779
32779
  path: "package.json",
32780
- sha256: "ff043b82242630525eebee7f0ff04ba900563019da4128f010b84ae4cabeaea3"
32780
+ sha256: "29176b3339c614810b34b078d5960ea7c3635aad01898f7e97833467a3426756"
32781
32781
  },
32782
32782
  {
32783
32783
  path: "artium-invocations.json",
32784
- sha256: "4c1386a4ae8fd45189624fe631c1807827c5dd12b0531d7f709ec86cb6fa0d1f"
32784
+ sha256: "9b346d6b814253b32f711133e80797a37bbf85bc92a85dcf73855e86a9ea97ba"
32785
32785
  },
32786
32786
  {
32787
32787
  path: ".typescript-build/native/checksums.json",
@@ -32789,7 +32789,7 @@ var init_falcon_axi = __esm({
32789
32789
  },
32790
32790
  {
32791
32791
  path: ".typescript-build/src/auth.js",
32792
- sha256: "dd96af8f75a4f058890ebce2de7f2f17178156f6b1c17fe2545be09a414c055a"
32792
+ sha256: "c06a17e4cdd0934969ec956c6db0c3b4261d6f253331d053c5966f1fc70b439b"
32793
32793
  },
32794
32794
  {
32795
32795
  path: ".typescript-build/src/axi-credential.schema.json",
@@ -32801,11 +32801,11 @@ var init_falcon_axi = __esm({
32801
32801
  },
32802
32802
  {
32803
32803
  path: ".typescript-build/src/cli.js",
32804
- sha256: "74fef0bd4797312e9ded16fc3bdd4f92c761087ec12a98f58d1dfd36ba75bd5d"
32804
+ sha256: "8544efa3d31a6b25dcb4eaec581bb23a5a5ccdb2528cb820a5ee3b935e48613e"
32805
32805
  },
32806
32806
  {
32807
32807
  path: ".typescript-build/src/core.js",
32808
- sha256: "9d4b23462ad08de78faadbcbad49810cb3745fd2f7c23b222923ec7657416603"
32808
+ sha256: "7314ddc90b7b48745a5902a4b57f9722e74c838aeb731513ea67a75f590827e6"
32809
32809
  },
32810
32810
  {
32811
32811
  path: ".typescript-build/src/cql.js",
@@ -32833,7 +32833,7 @@ var init_falcon_axi = __esm({
32833
32833
  },
32834
32834
  {
32835
32835
  path: ".typescript-build/src/help.json",
32836
- sha256: "475718324be41fc175fbd8fc488a1a2abb607047563e60cadf2cdbb88489ac6f"
32836
+ sha256: "b7cf0b2708fbf291c0880c027ea820cb4be14efe21ea132079eed5c3e4008854"
32837
32837
  },
32838
32838
  {
32839
32839
  path: ".typescript-build/src/hook.js",
@@ -32849,7 +32849,7 @@ var init_falcon_axi = __esm({
32849
32849
  },
32850
32850
  {
32851
32851
  path: ".typescript-build/src/identity.js",
32852
- sha256: "ad931ff1910aa75bcddffcae993ac23e7ef5428f7e816ebe68c64e20cf73c7cb"
32852
+ sha256: "7d303455bafe47b4c91d615a32708d477534ea52b484eff2af809eaae27ae6f1"
32853
32853
  },
32854
32854
  {
32855
32855
  path: ".typescript-build/src/inspection-commands.json",
@@ -32873,7 +32873,7 @@ var init_falcon_axi = __esm({
32873
32873
  },
32874
32874
  {
32875
32875
  path: ".typescript-build/src/metadata.js",
32876
- sha256: "75259379d624dbf94c24c762f64e36f06ac48fb9a2614965f03f4b4df7c09ab4"
32876
+ sha256: "e57b67ec9dc4ca009ed5c844b3c55d978b46886be275340864e68cc31b793cd1"
32877
32877
  },
32878
32878
  {
32879
32879
  path: ".typescript-build/src/origin.js",
@@ -32885,11 +32885,11 @@ var init_falcon_axi = __esm({
32885
32885
  },
32886
32886
  {
32887
32887
  path: ".typescript-build/src/raw.js",
32888
- sha256: "d07ce1ea17fe8e1694f70d15b28faaa094fce331140c07bb8df007b4c5b043c9"
32888
+ sha256: "b7b744f7b1365268d8dbf0a9ab36b2b9d7fb50baa7b20aa8e27c476f060ab6e0"
32889
32889
  },
32890
32890
  {
32891
32891
  path: ".typescript-build/src/render.js",
32892
- sha256: "09493516399dcc136f5591f2fc627e84087690f0b531b2340b133d7e2eef78cd"
32892
+ sha256: "129cde505e59bac4a5c152fec092d1a2e49d2ecff9a8125da056c08e7b9cad1c"
32893
32893
  },
32894
32894
  {
32895
32895
  path: ".typescript-build/src/response.js",
@@ -32909,11 +32909,11 @@ var init_falcon_axi = __esm({
32909
32909
  },
32910
32910
  {
32911
32911
  path: ".typescript-build/src/search-commands.json",
32912
- sha256: "62c30843b097dfe3beac0d9dce64efc526a396d43a07fd6bceec7bce082142ed"
32912
+ sha256: "8dd602ff338696db2255e078e076289ffc84104f86855ba9b63f5b7b2aa429df"
32913
32913
  },
32914
32914
  {
32915
32915
  path: ".typescript-build/src/search-help.json",
32916
- sha256: "80377180f644c3cb7940ba79839ddbe040333c371e93a24e5ecacefd3a2f63db"
32916
+ sha256: "87509f9a1e4451c921170a128a8224f897c259b9ed5606d1d7573a7ec8a2b854"
32917
32917
  },
32918
32918
  {
32919
32919
  path: ".typescript-build/src/search.js",
@@ -32941,7 +32941,7 @@ var init_falcon_axi = __esm({
32941
32941
  },
32942
32942
  {
32943
32943
  path: ".typescript-build/src/transport/https.js",
32944
- sha256: "03f32fd85bb2d3c2accdb2d29c487e5094683a459541946d73e0c77870db3595"
32944
+ sha256: "fa0437e61f2a207a195ff5c9d2a8bc663559af2fbdc60d4f4f20d4950eb96b7c"
32945
32945
  },
32946
32946
  {
32947
32947
  path: ".typescript-build/src/transport/operations.js",
@@ -32961,7 +32961,7 @@ var init_falcon_axi = __esm({
32961
32961
  },
32962
32962
  {
32963
32963
  path: ".typescript-build/src/transport/search-authority.js",
32964
- sha256: "a1a0df55cff342d65ebd4b35e97bb28d3ad465fb8f45062af874403c27e10e69"
32964
+ sha256: "9747f73697418c7cadfb02514acaa8e109431035a5bb823c11c31296053d90ec"
32965
32965
  },
32966
32966
  {
32967
32967
  path: ".typescript-build/src/transport/traffic-exclusion.js",
@@ -32969,7 +32969,7 @@ var init_falcon_axi = __esm({
32969
32969
  },
32970
32970
  {
32971
32971
  path: ".typescript-build/src/version.js",
32972
- sha256: "9d645d9194628da7400da240b0df077b599789f161f3b24d6870008681373550"
32972
+ sha256: "4cea48a8ae19fd9dd378065f1a82bcd0617d0dbd4c0d589205a0036beade6794"
32973
32973
  },
32974
32974
  {
32975
32975
  path: ".typescript-build/src/windows-acl.js",
@@ -33001,7 +33001,7 @@ var init_falcon_axi = __esm({
33001
33001
  },
33002
33002
  {
33003
33003
  path: "skills/falcon-axi/references/agent-guide.md",
33004
- sha256: "f5ee73bf5bbaed74ed0614cc8aeddeeff48395ba0ae5de90b9fd2288388db633"
33004
+ sha256: "fae9ac802113a9a7627093dfb50774c85c0815c57994c4fa4798b4b8c3385467"
33005
33005
  },
33006
33006
  {
33007
33007
  path: "skills/falcon-axi/references/application-list.md",
@@ -33157,11 +33157,11 @@ var init_falcon_axi = __esm({
33157
33157
  },
33158
33158
  {
33159
33159
  path: "skills/falcon-axi/references/identity-graphql.md",
33160
- sha256: "3cce9b35e69a76f23e3fd69e114e144638ff15eef96351f18defd250520757e6"
33160
+ sha256: "280fdd587939ac39eaa0afd7f20ad63cd1c2ad02fed58cb71005b208bd749eed"
33161
33161
  },
33162
33162
  {
33163
33163
  path: "skills/falcon-axi/references/identity-list.md",
33164
- sha256: "37cbd9f92894c6cf122371ce2252ed19864271e818a2a9289c54acb3c62e5a47"
33164
+ sha256: "225e5412d2adb9dec4f67f246257302407012fcd76c9fc4df677d023709565f5"
33165
33165
  },
33166
33166
  {
33167
33167
  path: "skills/falcon-axi/references/identity-rule-create.md",
@@ -33201,7 +33201,7 @@ var init_falcon_axi = __esm({
33201
33201
  },
33202
33202
  {
33203
33203
  path: "skills/falcon-axi/references/identity-traffic-exclusion-remove.md",
33204
- sha256: "1a3a87d560934f4fedd8bdeb8e060ce31eaf54472c5cde8e1cd0810eaaf5b16c"
33204
+ sha256: "db2816c928bbc82ad1e044e8803b896aa08cae0c52cfabc8f861f3096ca9f1a0"
33205
33205
  },
33206
33206
  {
33207
33207
  path: "skills/falcon-axi/references/image-list.md",
@@ -33317,7 +33317,7 @@ var init_falcon_axi = __esm({
33317
33317
  },
33318
33318
  {
33319
33319
  path: "skills/falcon-axi/references/raw-write.md",
33320
- sha256: "0efc02347cd493909aa44008988f7195fb268605c1d64ff35e7107e63bf35ebb"
33320
+ sha256: "c57922cbc63d618fc396bc1d2937b501134bcaa9a5ba58bcccee173a0b4bab40"
33321
33321
  },
33322
33322
  {
33323
33323
  path: "skills/falcon-axi/references/recon-notification-list.md",
@@ -33425,7 +33425,7 @@ var init_falcon_axi = __esm({
33425
33425
  },
33426
33426
  {
33427
33427
  path: "skills/falcon-axi/SKILL.md",
33428
- sha256: "d286fc681c929eef73347f5e1bf4efba4ca0437ad525417ae77fb2b5938cccf9"
33428
+ sha256: "8b4b67042f60ae531893fdafb375910f68cf6463a061824084daca0f59100b80"
33429
33429
  }
33430
33430
  ],
33431
33431
  credentialSchema: {
@@ -33540,7 +33540,7 @@ var init_falcon_axi = __esm({
33540
33540
  }
33541
33541
  }
33542
33542
  },
33543
- skillSha256: "d286fc681c929eef73347f5e1bf4efba4ca0437ad525417ae77fb2b5938cccf9",
33543
+ skillSha256: "8b4b67042f60ae531893fdafb375910f68cf6463a061824084daca0f59100b80",
33544
33544
  parser: {
33545
33545
  path: ".typescript-build/src/parser.js",
33546
33546
  sha256: "111ca5c9f53bcfac677a3728109a4c5275a7516272ce859455333e312274034f",
@@ -35200,13 +35200,11 @@ var init_falcon_axi = __esm({
35200
35200
  profile: "value",
35201
35201
  region: "value",
35202
35202
  "member-cid": "value",
35203
- execute: "boolean",
35204
35203
  method: "value",
35205
35204
  path: "value",
35206
35205
  query: "value",
35207
35206
  "query-file": "value",
35208
- "body-file": "value",
35209
- confirm: "value"
35207
+ "body-file": "value"
35210
35208
  },
35211
35209
  effect: "write",
35212
35210
  positional: null
@@ -35367,7 +35365,7 @@ var init_falcon_axi = __esm({
35367
35365
  temporaryFiles: [
35368
35366
  "falcon-axi/config.json"
35369
35367
  ],
35370
- nativeWrites: "Exact administrator command grants and FALCON_AXI_READ_ONLY; search/MalQuery lifecycle dispatches natively, RTR retains profile opt-in, restrictions and exact execute/confirm."
35368
+ nativeWrites: "Named writes require exact administrator command grants. Search and MalQuery dispatch natively. RTR retains profile opt-in, restrictions and exact execute/confirm. Identity GraphQL mutations and raw write send once without preview or confirmation. FALCON_AXI_READ_ONLY refuses both. Hosted raw write requires read-writes mode, an instance role raw grant and a match to any configured write routes."
35371
35369
  },
35372
35370
  healthRead: [
35373
35371
  "auth",
@@ -52081,7 +52079,8 @@ var init_api2 = __esm({
52081
52079
  tools: external_exports.array(external_exports.strictObject({
52082
52080
  tool: toolSchema,
52083
52081
  commands: external_exports.array(external_exports.string().min(1).max(200)).min(1).max(100).optional(),
52084
- instances: external_exports.array(external_exports.string().min(1).max(64)).min(1).max(20).optional()
52082
+ instances: external_exports.array(external_exports.string().min(1).max(64)).min(1).max(20).optional(),
52083
+ apiWrites: external_exports.literal(true).optional()
52085
52084
  })).min(1).max(36)
52086
52085
  });
52087
52086
  meResponseSchema = external_exports.union([
@@ -52503,7 +52502,7 @@ var init_api2 = __esm({
52503
52502
  rawApiModeSchema = external_exports.enum(["off", "read", "read-writes"]);
52504
52503
  rawApiRoutePatterns = external_exports.array(external_exports.string().min(1).max(256)).max(50);
52505
52504
  rawApiRoutesSchema = external_exports.strictObject({ get: rawApiRoutePatterns, write: rawApiRoutePatterns });
52506
- toolRawApiSchema = external_exports.strictObject({ mode: rawApiModeSchema, modes: external_exports.array(rawApiModeSchema), writes: external_exports.boolean(), routes: rawApiRoutesSchema });
52505
+ toolRawApiSchema = external_exports.strictObject({ mode: rawApiModeSchema, modes: external_exports.array(rawApiModeSchema), writes: external_exports.boolean(), openWrites: external_exports.boolean(), routes: rawApiRoutesSchema });
52507
52506
  adminToolSchema = external_exports.strictObject({
52508
52507
  name: toolSchema,
52509
52508
  enabled: external_exports.boolean(),
@@ -101793,7 +101792,7 @@ function hostedHelp(help3, tool, flags, commands3, instance) {
101793
101792
  if (tool === "falcon-axi") {
101794
101793
  const rootPosture = help3.includes("\nRTR execution requires");
101795
101794
  help3 = help3.replace(new RegExp(`^ (?:${falcon_axi_default.blockedCommands.join("|")})(?=\\s|$)[^\\r\\n]*(?:\\r?\\n|$)`, "gm"), "").replace(/\nRTR execution requires[\s\S]*$/, "\n").replace(/ \([^)]*\bexception N[1-4]\)/gi, "").split("\n").filter((line) => !falcon_axi_default.blockedCommands.some((command) => line.includes(`falcon-axi ${command}`))).join("\n");
101796
- const guidance = "Artium manages the Falcon profile, region and member CID. Passive reads are available. Search start/stop, host usb, identity activity, identity rule create and delete, identity traffic-exclusion remove, malquery search and rtr run require exact administrator grants, off by default. Search and MalQuery dispatch immediately. RTR previews without --execute; execution requires profile opt-in, an allowed command and exact --confirm device:command. Never automatically replay an uncertain submission. Use artium-axi falcon-axi scopes for permissions.";
101795
+ const guidance = "Artium manages the Falcon profile, region and member CID. Passive reads are available. Search start/stop, host usb, identity activity, identity rule create and delete, identity traffic-exclusion remove, malquery search and rtr run require exact administrator grants, off by default. Search and MalQuery dispatch immediately. RTR previews without --execute; execution requires profile opt-in, an allowed command and exact --confirm device:command. Identity graphql mutations and raw write send once without an administrator write grant, preview or confirmation. Read-only instances, read-only delegated tokens and delegated read grants refuse both. Raw write requires Raw API read-writes mode, a role raw grant for the instance and a match to any configured write routes. Never automatically replay an uncertain submission. Use artium-axi falcon-axi scopes for permissions.";
101797
101796
  if (rootPosture && !help3.includes(guidance)) help3 = help3.trimEnd() + "\n" + guidance + "\n";
101798
101797
  }
101799
101798
  if (tool === "gh-axi") {
@@ -102385,7 +102384,7 @@ var init_help = __esm({
102385
102384
  "falcon-axi": {
102386
102385
  usage: "artium-axi falcon-axi [<args>]",
102387
102386
  purpose: "Run Falcon commands with your managed credentials.",
102388
- flags: ["Reads retain native --help. Search start/stop, host usb, identity activity, identity rule create and delete, identity traffic-exclusion remove, malquery search and rtr run require exact administrator-selected operations, off by default. Search and MalQuery dispatch natively without a preview gate. RTR previews without --execute; execution also requires profile rtr.enabled, its command restriction and exact --confirm device:command. Never automatically retry an uncertain submission."],
102387
+ flags: ["Reads retain native --help. Search start/stop, host usb, identity activity, identity rule create and delete, identity traffic-exclusion remove, malquery search and rtr run require exact administrator-selected operations, off by default. Search and MalQuery dispatch natively without a preview gate. RTR previews without --execute; execution also requires profile rtr.enabled, its command restriction and exact --confirm device:command. Identity graphql mutations and raw write send once without an administrator write grant, preview or confirmation. Read-only instances, read-only delegated tokens and delegated read grants refuse both. Raw write requires Raw API read-writes mode, a role raw grant for the instance and a match to any configured write routes. Never automatically retry an uncertain submission."],
102389
102388
  example: `artium-axi falcon-axi ${falcon_axi_default.discovery.example.join(" ")}`
102390
102389
  },
102391
102390
  "vectra-axi": {
@@ -102836,8 +102835,11 @@ function inputFileFlags(tool, args2) {
102836
102835
  }
102837
102836
  function falconGraphqlQueryIndex(args2) {
102838
102837
  if (args2[0] !== "identity" || args2[1] !== "graphql" || args2.includes("--help")) return void 0;
102839
- const index = args2.indexOf("--query", 2) + 1;
102840
- return /^@./.test(args2[index] ?? "") ? index : void 0;
102838
+ for (let index = args2.length - 1; index >= 2; index--) {
102839
+ if (args2[index] === "--query") return args2[index + 1]?.startsWith("@") ? index + 1 : void 0;
102840
+ if (args2[index].startsWith("--query=")) return void 0;
102841
+ }
102842
+ return void 0;
102841
102843
  }
102842
102844
  function ghReleaseUploadFileIndexes(args2) {
102843
102845
  if (args2[0] !== "release" || args2[1] !== "upload" || args2.some((arg) => ["--help", "-h"].includes(arg))) return [];
@@ -106116,7 +106118,7 @@ import { setTimeout as delay2 } from "node:timers/promises";
106116
106118
  async function tokenCommand(args2, output3, managed2) {
106117
106119
  const action = args2[0];
106118
106120
  if (args2.includes("--help")) {
106119
- output3("usage: artium-axi token create --label <label> --tool <tool> --expires <ISO-date> [--write] [--reusable] [--command <tool:command>] [--exact <tool:command>] [--instance <tool:name>] [--token-fd <fd>] [--password-stdin|--sso]\n artium-axi token list\n artium-axi token revoke <id>\nCommand picks are exact. Wildcards are not supported yet.\n--instance limits every selection for a tool to the named instances; without it a tool selection covers every instance you can use. API and native selections are broad and require an exact pick.\nRead-only blocks writes, but some reads send data externally or incur costs.\nSSH write access reaches every host and sudo grant available to the creator.\n");
106121
+ output3("usage: artium-axi token create --label <label> --tool <tool> --expires <ISO-date> [--write] [--reusable] [--command <tool:command>] [--exact <tool:command>] [--api-write <tool:command>] [--instance <tool:name>] [--token-fd <fd>] [--password-stdin|--sso]\n artium-axi token list\n artium-axi token revoke <id>\nCommand picks are exact. Wildcards are not supported yet.\n--instance limits every selection for a tool to the named instances; without it a tool selection covers every instance you can use. API and native selections are broad and require an exact pick.\nAPI, raw, native and passthrough picks are read-only; --api-write selects one that may send writes and requires --write.\nRead-only blocks writes, but some reads send data externally or incur costs.\nSSH write access reaches every host and sudo grant available to the creator.\n");
106120
106122
  return;
106121
106123
  }
106122
106124
  if (managed2) throw new ArtiumError("INVALID_INPUT", "Token management is unavailable in managed mode.");
@@ -106135,7 +106137,7 @@ async function tokenCommand(args2, output3, managed2) {
106135
106137
  action === "list" ? "Use artium-axi token list; valid flags: --help." : "Use artium-axi token revoke <id>; valid flags: --help."
106136
106138
  );
106137
106139
  if (action !== "create") throw new ArtiumError("INVALID_INPUT", "Invalid token command.", "Use artium-axi token --help.");
106138
- const createFlags = ["--label", "--tool", "--expires", "--write", "--reusable", "--command", "--exact", "--instance", "--token-fd", "--password-stdin", "--sso"];
106140
+ const createFlags = ["--label", "--tool", "--expires", "--write", "--reusable", "--command", "--exact", "--api-write", "--instance", "--token-fd", "--password-stdin", "--sso"];
106139
106141
  const flags = /* @__PURE__ */ new Map();
106140
106142
  for (let index = 1; index < args2.length; index++) {
106141
106143
  const flag = args2[index];
@@ -106145,10 +106147,10 @@ async function tokenCommand(args2, output3, managed2) {
106145
106147
  `Valid flags: --help, ${createFlags.join(", ")}.`
106146
106148
  );
106147
106149
  const values = flags.get(flag) ?? [];
106148
- if (values.length && !["--tool", "--command", "--exact", "--instance"].includes(flag)) throw new ArtiumError("INVALID_INPUT");
106150
+ if (values.length && !["--tool", "--command", "--exact", "--api-write", "--instance"].includes(flag)) throw new ArtiumError("INVALID_INPUT");
106149
106151
  const value = ["--write", "--reusable", "--password-stdin", "--sso"].includes(flag) ? "true" : args2[++index];
106150
106152
  if (!value || value.startsWith("--")) throw new ArtiumError("INVALID_INPUT");
106151
- if (["--exact", "--command"].includes(flag) && value.includes("*")) throw new ArtiumError(
106153
+ if (["--exact", "--command", "--api-write"].includes(flag) && value.includes("*")) throw new ArtiumError(
106152
106154
  "INVALID_INPUT",
106153
106155
  "Wildcards are not supported yet.",
106154
106156
  "Select exact commands or use --tool for tool-wide access."
@@ -106165,11 +106167,16 @@ async function tokenCommand(args2, output3, managed2) {
106165
106167
  return tool.data;
106166
106168
  };
106167
106169
  const tools = (flags.get("--tool") ?? []).map((tool) => ({ tool: readTool(tool) }));
106168
- const picks = [...flags.get("--exact") ?? [], ...flags.get("--command") ?? []].map((value) => {
106170
+ const pick2 = (value) => {
106169
106171
  const separator = value.indexOf(":");
106170
106172
  if (separator < 0) throw new ArtiumError("INVALID_INPUT");
106171
106173
  return { tool: readTool(value.slice(0, separator)), commands: [value.slice(separator + 1)] };
106172
- });
106174
+ };
106175
+ if (flags.has("--api-write") && !flags.has("--write")) throw new ArtiumError("INVALID_INPUT", "API write selections need a writable token.", "Add --write.");
106176
+ const picks = [
106177
+ ...[...flags.get("--exact") ?? [], ...flags.get("--command") ?? []].map(pick2),
106178
+ ...(flags.get("--api-write") ?? []).map((value) => ({ ...pick2(value), apiWrites: true }))
106179
+ ];
106173
106180
  const instances = /* @__PURE__ */ new Map();
106174
106181
  for (const value of flags.get("--instance") ?? []) {
106175
106182
  const separator = value.indexOf(":");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowttl/artium-axi",
3
- "version": "0.0.60",
3
+ "version": "0.0.61",
4
4
  "description": "Client CLI and embedded skill for the Artium managed tools server.",
5
5
  "license": "MIT",
6
6
  "type": "module",