@knowttl/artium-axi 0.0.59 → 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 +4 -4
- package/bin/artium-axi.mjs +134 -79
- package/package.json +1 -1
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, MalQuery and restricted RTR |
|
|
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
|
-
|
|
108
|
-
|
|
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.
|
package/bin/artium-axi.mjs
CHANGED
|
@@ -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.
|
|
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.
|
|
32776
|
-
integrity: "sha512-
|
|
32775
|
+
version: "1.4.0",
|
|
32776
|
+
integrity: "sha512-9z9cA0OqOw/ZxBDM1MmFvdOQ0DtCRes77GBrMxZXQ5HUy1WWteNh9U/HllLD6Glntmp7/YVN8J44ZnwXeIJadA==",
|
|
32777
32777
|
sources: [
|
|
32778
32778
|
{
|
|
32779
32779
|
path: "package.json",
|
|
32780
|
-
sha256: "
|
|
32780
|
+
sha256: "29176b3339c614810b34b078d5960ea7c3635aad01898f7e97833467a3426756"
|
|
32781
32781
|
},
|
|
32782
32782
|
{
|
|
32783
32783
|
path: "artium-invocations.json",
|
|
32784
|
-
sha256: "
|
|
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: "
|
|
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: "
|
|
32804
|
+
sha256: "8544efa3d31a6b25dcb4eaec581bb23a5a5ccdb2528cb820a5ee3b935e48613e"
|
|
32805
32805
|
},
|
|
32806
32806
|
{
|
|
32807
32807
|
path: ".typescript-build/src/core.js",
|
|
32808
|
-
sha256: "
|
|
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: "
|
|
32836
|
+
sha256: "b7cf0b2708fbf291c0880c027ea820cb4be14efe21ea132079eed5c3e4008854"
|
|
32837
32837
|
},
|
|
32838
32838
|
{
|
|
32839
32839
|
path: ".typescript-build/src/hook.js",
|
|
@@ -32843,9 +32843,13 @@ var init_falcon_axi = __esm({
|
|
|
32843
32843
|
path: ".typescript-build/src/identity-rule.js",
|
|
32844
32844
|
sha256: "47d6f02fe329a150e2dc6fd1925e8652424c17f7f4ad3c693b62a926f303f374"
|
|
32845
32845
|
},
|
|
32846
|
+
{
|
|
32847
|
+
path: ".typescript-build/src/identity-traffic.js",
|
|
32848
|
+
sha256: "6ccb1f0c16cdb152284b9f80e99cea79710730495308b049b052b31b542daa6e"
|
|
32849
|
+
},
|
|
32846
32850
|
{
|
|
32847
32851
|
path: ".typescript-build/src/identity.js",
|
|
32848
|
-
sha256: "
|
|
32852
|
+
sha256: "7d303455bafe47b4c91d615a32708d477534ea52b484eff2af809eaae27ae6f1"
|
|
32849
32853
|
},
|
|
32850
32854
|
{
|
|
32851
32855
|
path: ".typescript-build/src/inspection-commands.json",
|
|
@@ -32869,7 +32873,7 @@ var init_falcon_axi = __esm({
|
|
|
32869
32873
|
},
|
|
32870
32874
|
{
|
|
32871
32875
|
path: ".typescript-build/src/metadata.js",
|
|
32872
|
-
sha256: "
|
|
32876
|
+
sha256: "e57b67ec9dc4ca009ed5c844b3c55d978b46886be275340864e68cc31b793cd1"
|
|
32873
32877
|
},
|
|
32874
32878
|
{
|
|
32875
32879
|
path: ".typescript-build/src/origin.js",
|
|
@@ -32881,11 +32885,11 @@ var init_falcon_axi = __esm({
|
|
|
32881
32885
|
},
|
|
32882
32886
|
{
|
|
32883
32887
|
path: ".typescript-build/src/raw.js",
|
|
32884
|
-
sha256: "
|
|
32888
|
+
sha256: "b7b744f7b1365268d8dbf0a9ab36b2b9d7fb50baa7b20aa8e27c476f060ab6e0"
|
|
32885
32889
|
},
|
|
32886
32890
|
{
|
|
32887
32891
|
path: ".typescript-build/src/render.js",
|
|
32888
|
-
sha256: "
|
|
32892
|
+
sha256: "129cde505e59bac4a5c152fec092d1a2e49d2ecff9a8125da056c08e7b9cad1c"
|
|
32889
32893
|
},
|
|
32890
32894
|
{
|
|
32891
32895
|
path: ".typescript-build/src/response.js",
|
|
@@ -32905,11 +32909,11 @@ var init_falcon_axi = __esm({
|
|
|
32905
32909
|
},
|
|
32906
32910
|
{
|
|
32907
32911
|
path: ".typescript-build/src/search-commands.json",
|
|
32908
|
-
sha256: "
|
|
32912
|
+
sha256: "8dd602ff338696db2255e078e076289ffc84104f86855ba9b63f5b7b2aa429df"
|
|
32909
32913
|
},
|
|
32910
32914
|
{
|
|
32911
32915
|
path: ".typescript-build/src/search-help.json",
|
|
32912
|
-
sha256: "
|
|
32916
|
+
sha256: "87509f9a1e4451c921170a128a8224f897c259b9ed5606d1d7573a7ec8a2b854"
|
|
32913
32917
|
},
|
|
32914
32918
|
{
|
|
32915
32919
|
path: ".typescript-build/src/search.js",
|
|
@@ -32937,7 +32941,7 @@ var init_falcon_axi = __esm({
|
|
|
32937
32941
|
},
|
|
32938
32942
|
{
|
|
32939
32943
|
path: ".typescript-build/src/transport/https.js",
|
|
32940
|
-
sha256: "
|
|
32944
|
+
sha256: "fa0437e61f2a207a195ff5c9d2a8bc663559af2fbdc60d4f4f20d4950eb96b7c"
|
|
32941
32945
|
},
|
|
32942
32946
|
{
|
|
32943
32947
|
path: ".typescript-build/src/transport/operations.js",
|
|
@@ -32957,11 +32961,15 @@ var init_falcon_axi = __esm({
|
|
|
32957
32961
|
},
|
|
32958
32962
|
{
|
|
32959
32963
|
path: ".typescript-build/src/transport/search-authority.js",
|
|
32960
|
-
sha256: "
|
|
32964
|
+
sha256: "9747f73697418c7cadfb02514acaa8e109431035a5bb823c11c31296053d90ec"
|
|
32965
|
+
},
|
|
32966
|
+
{
|
|
32967
|
+
path: ".typescript-build/src/transport/traffic-exclusion.js",
|
|
32968
|
+
sha256: "128de9562e4c9da2803aeaf94a5c3a4959a8a5eb937e8bb0a8561f6eb9d59efc"
|
|
32961
32969
|
},
|
|
32962
32970
|
{
|
|
32963
32971
|
path: ".typescript-build/src/version.js",
|
|
32964
|
-
sha256: "
|
|
32972
|
+
sha256: "4cea48a8ae19fd9dd378065f1a82bcd0617d0dbd4c0d589205a0036beade6794"
|
|
32965
32973
|
},
|
|
32966
32974
|
{
|
|
32967
32975
|
path: ".typescript-build/src/windows-acl.js",
|
|
@@ -32993,7 +33001,7 @@ var init_falcon_axi = __esm({
|
|
|
32993
33001
|
},
|
|
32994
33002
|
{
|
|
32995
33003
|
path: "skills/falcon-axi/references/agent-guide.md",
|
|
32996
|
-
sha256: "
|
|
33004
|
+
sha256: "fae9ac802113a9a7627093dfb50774c85c0815c57994c4fa4798b4b8c3385467"
|
|
32997
33005
|
},
|
|
32998
33006
|
{
|
|
32999
33007
|
path: "skills/falcon-axi/references/application-list.md",
|
|
@@ -33121,7 +33129,7 @@ var init_falcon_axi = __esm({
|
|
|
33121
33129
|
},
|
|
33122
33130
|
{
|
|
33123
33131
|
path: "skills/falcon-axi/references/host-list.md",
|
|
33124
|
-
sha256: "
|
|
33132
|
+
sha256: "f09132ef9f29ad359d0960f6ff3a12a9a79ac0740503a64b83e6f2b5e8693486"
|
|
33125
33133
|
},
|
|
33126
33134
|
{
|
|
33127
33135
|
path: "skills/falcon-axi/references/host-logins.md",
|
|
@@ -33149,11 +33157,11 @@ var init_falcon_axi = __esm({
|
|
|
33149
33157
|
},
|
|
33150
33158
|
{
|
|
33151
33159
|
path: "skills/falcon-axi/references/identity-graphql.md",
|
|
33152
|
-
sha256: "
|
|
33160
|
+
sha256: "280fdd587939ac39eaa0afd7f20ad63cd1c2ad02fed58cb71005b208bd749eed"
|
|
33153
33161
|
},
|
|
33154
33162
|
{
|
|
33155
33163
|
path: "skills/falcon-axi/references/identity-list.md",
|
|
33156
|
-
sha256: "
|
|
33164
|
+
sha256: "225e5412d2adb9dec4f67f246257302407012fcd76c9fc4df677d023709565f5"
|
|
33157
33165
|
},
|
|
33158
33166
|
{
|
|
33159
33167
|
path: "skills/falcon-axi/references/identity-rule-create.md",
|
|
@@ -33191,6 +33199,10 @@ var init_falcon_axi = __esm({
|
|
|
33191
33199
|
path: "skills/falcon-axi/references/identity-timeline.md",
|
|
33192
33200
|
sha256: "469ba41aa0146fa9dbfac9a9dd78a7ac85beed1d66b339199910094200fae0bb"
|
|
33193
33201
|
},
|
|
33202
|
+
{
|
|
33203
|
+
path: "skills/falcon-axi/references/identity-traffic-exclusion-remove.md",
|
|
33204
|
+
sha256: "db2816c928bbc82ad1e044e8803b896aa08cae0c52cfabc8f861f3096ca9f1a0"
|
|
33205
|
+
},
|
|
33194
33206
|
{
|
|
33195
33207
|
path: "skills/falcon-axi/references/image-list.md",
|
|
33196
33208
|
sha256: "ea5cf6c5dedb86b24deb1d8ab49e24110d8b2cd1d2739b230685ad5f29ffe9cc"
|
|
@@ -33305,7 +33317,7 @@ var init_falcon_axi = __esm({
|
|
|
33305
33317
|
},
|
|
33306
33318
|
{
|
|
33307
33319
|
path: "skills/falcon-axi/references/raw-write.md",
|
|
33308
|
-
sha256: "
|
|
33320
|
+
sha256: "c57922cbc63d618fc396bc1d2937b501134bcaa9a5ba58bcccee173a0b4bab40"
|
|
33309
33321
|
},
|
|
33310
33322
|
{
|
|
33311
33323
|
path: "skills/falcon-axi/references/recon-notification-list.md",
|
|
@@ -33413,7 +33425,7 @@ var init_falcon_axi = __esm({
|
|
|
33413
33425
|
},
|
|
33414
33426
|
{
|
|
33415
33427
|
path: "skills/falcon-axi/SKILL.md",
|
|
33416
|
-
sha256: "
|
|
33428
|
+
sha256: "8b4b67042f60ae531893fdafb375910f68cf6463a061824084daca0f59100b80"
|
|
33417
33429
|
}
|
|
33418
33430
|
],
|
|
33419
33431
|
credentialSchema: {
|
|
@@ -33528,7 +33540,7 @@ var init_falcon_axi = __esm({
|
|
|
33528
33540
|
}
|
|
33529
33541
|
}
|
|
33530
33542
|
},
|
|
33531
|
-
skillSha256: "
|
|
33543
|
+
skillSha256: "8b4b67042f60ae531893fdafb375910f68cf6463a061824084daca0f59100b80",
|
|
33532
33544
|
parser: {
|
|
33533
33545
|
path: ".typescript-build/src/parser.js",
|
|
33534
33546
|
sha256: "111ca5c9f53bcfac677a3728109a4c5275a7516272ce859455333e312274034f",
|
|
@@ -34481,6 +34493,22 @@ var init_falcon_axi = __esm({
|
|
|
34481
34493
|
effect: "write",
|
|
34482
34494
|
positional: "rule identifier"
|
|
34483
34495
|
},
|
|
34496
|
+
{
|
|
34497
|
+
command: "identity traffic-exclusion remove",
|
|
34498
|
+
flags: {
|
|
34499
|
+
help: "boolean",
|
|
34500
|
+
"allow-unknown-origin": "boolean",
|
|
34501
|
+
"no-member-cid": "boolean",
|
|
34502
|
+
config: "value",
|
|
34503
|
+
profile: "value",
|
|
34504
|
+
region: "value",
|
|
34505
|
+
"member-cid": "value",
|
|
34506
|
+
execute: "boolean",
|
|
34507
|
+
confirm: "value"
|
|
34508
|
+
},
|
|
34509
|
+
effect: "write",
|
|
34510
|
+
positional: "IP address list"
|
|
34511
|
+
},
|
|
34484
34512
|
{
|
|
34485
34513
|
command: "ioc list",
|
|
34486
34514
|
flags: {
|
|
@@ -35172,13 +35200,11 @@ var init_falcon_axi = __esm({
|
|
|
35172
35200
|
profile: "value",
|
|
35173
35201
|
region: "value",
|
|
35174
35202
|
"member-cid": "value",
|
|
35175
|
-
execute: "boolean",
|
|
35176
35203
|
method: "value",
|
|
35177
35204
|
path: "value",
|
|
35178
35205
|
query: "value",
|
|
35179
35206
|
"query-file": "value",
|
|
35180
|
-
"body-file": "value"
|
|
35181
|
-
confirm: "value"
|
|
35207
|
+
"body-file": "value"
|
|
35182
35208
|
},
|
|
35183
35209
|
effect: "write",
|
|
35184
35210
|
positional: null
|
|
@@ -35339,7 +35365,7 @@ var init_falcon_axi = __esm({
|
|
|
35339
35365
|
temporaryFiles: [
|
|
35340
35366
|
"falcon-axi/config.json"
|
|
35341
35367
|
],
|
|
35342
|
-
nativeWrites: "
|
|
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."
|
|
35343
35369
|
},
|
|
35344
35370
|
healthRead: [
|
|
35345
35371
|
"auth",
|
|
@@ -51844,7 +51870,23 @@ function transferRoutesFor(tool) {
|
|
|
51844
51870
|
function decodedFileBytes(value) {
|
|
51845
51871
|
return value.length / 4 * 3 - (value.endsWith("==") ? 2 : value.endsWith("=") ? 1 : 0);
|
|
51846
51872
|
}
|
|
51847
|
-
|
|
51873
|
+
function parseRunRequest(request) {
|
|
51874
|
+
const parsed = runRequestSchema.safeParse(request);
|
|
51875
|
+
if (parsed.success) return parsed.data;
|
|
51876
|
+
const issues = parsed.error.issues;
|
|
51877
|
+
const index = issues.find((issue2) => issue2.code === "custom" && issue2.message === argumentByteLimitIssue && issue2.path[0] === "args")?.path[1];
|
|
51878
|
+
const args2 = request && typeof request === "object" && "args" in request ? request.args : void 0;
|
|
51879
|
+
if (typeof index === "number" && Array.isArray(args2) && typeof args2[index] === "string") {
|
|
51880
|
+
const bytes = byteLength(args2[index]);
|
|
51881
|
+
throw new ArtiumError(
|
|
51882
|
+
"INVALID_INPUT",
|
|
51883
|
+
`Argument ${index + 1} is ${bytes} bytes, over the ${inputLimits.argumentBytes}-byte (${inputLimits.argumentBytes / 1024} KiB) limit.`,
|
|
51884
|
+
"Shorten that argument and run the command again."
|
|
51885
|
+
);
|
|
51886
|
+
}
|
|
51887
|
+
throw new ArtiumError("INVALID_INPUT");
|
|
51888
|
+
}
|
|
51889
|
+
var inputLimits, transferLimits, transferWarning, sha256Schema, sampleSha256Schema, reportIdSchema, transferOwnerIdSchema, mailSelectorSchema, transferSelectionSchema, transferPrepareSchema, transferPrepareRequestSchema, transferIdSchema, transferScopeSchema, transferPreviewSchema, transferExecuteSchema, transferRetrieveSchema, transferOutcomeSchema, transferSaveOutcomeSchema, transferArchiveSchema, transferReceiptSchema, transferEvidenceSchema, transferStatusSchema, transferRoutes, transferAuditSchema, byteLength, passwordSchema, passwordChangeSchema, loginSchema, refreshSchema, reauthSchema, reauthResponseSchema, loginResponseSchema, deviceUserCodeSchema, devicePollSchema, deviceStartResponseSchema, devicePollResponseSchema, ssoReauthSchema, ssoReauthResponseSchema, accountId, toolSchema, delegationScopeSchema, meResponseSchema, createDelegationSchema, delegatedExchangeSchema, createdDelegationSchema, skillsResponseSchema, adminUserSchema, adminPageQuerySchema, adminUsersQuerySchema, adminUsersResponseSchema, adminUserDetailSchema, adminUserCreateSchema, adminUserPatchSchema, adminUserUnlockSchema, adminUserResetSchema, adminUserParamsSchema, userSessionsSchema, sessionParamsSchema, emptyInputSchema, revokedSchema, adminUserRoutes, text, auditCursorSchema, auditFiltersSchema, orderedAuditRange, adminAuditQuerySchema, adminAuditExportRoute, adminAuditRecordSchema, adminAuditRoute, falconRtrSettingsSchema, ghWriteOperations, falconWriteOperations, unifiWriteOperations, proxmoxWriteOperations, technitiumWriteOperations, nativeSettingsSchemas, diagnosticSchema, healthSchema, toolWriteStateSchema, writeAccessInputSchema, rawApiModeSchema, rawApiRoutePatterns, rawApiRoutesSchema, toolRawApiSchema, adminToolSchema, adminCredentialSchema, adminToolParamsSchema, adminInstanceParamsSchema, adminInstanceSchema, certificateDetailsSchema, certificateInspectionSchema, trustedCredentialCertificateSchema, adminCertificateRoutes, githubConnectionInput, githubDeviceRoutes, adminToolRoutes, instanceBase, instanceRevisions, adminInstanceRoutes, oidcIssuerSchema, providerSettings, entraSettings, oidcSettings, providerSettingsSchema, providerFields, adminProviderSchema, adminProviderCredentialSchema, adminProviderRoutes, roleRuleSettingsSchema, adminRoleRuleSchema, adminRoleRuleRoutes, invitationLifetimeSchema, adminInvitationSchema, invitationLinkSchema, adminInvitationRoutes, adminRoleSchema, adminRolesResponseSchema, adminRoleRoutes, adminRoleToolParamsSchema, toolsResponseSchema, inputFileSchema, runInputSchema, argumentByteLimitIssue, runRequestSchema, counts, runSuccessSchema, errorResponseSchema, runResponseSchema;
|
|
51848
51890
|
var init_api2 = __esm({
|
|
51849
51891
|
"src/shared/api.ts"() {
|
|
51850
51892
|
"use strict";
|
|
@@ -52037,7 +52079,8 @@ var init_api2 = __esm({
|
|
|
52037
52079
|
tools: external_exports.array(external_exports.strictObject({
|
|
52038
52080
|
tool: toolSchema,
|
|
52039
52081
|
commands: external_exports.array(external_exports.string().min(1).max(200)).min(1).max(100).optional(),
|
|
52040
|
-
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()
|
|
52041
52084
|
})).min(1).max(36)
|
|
52042
52085
|
});
|
|
52043
52086
|
meResponseSchema = external_exports.union([
|
|
@@ -52459,7 +52502,7 @@ var init_api2 = __esm({
|
|
|
52459
52502
|
rawApiModeSchema = external_exports.enum(["off", "read", "read-writes"]);
|
|
52460
52503
|
rawApiRoutePatterns = external_exports.array(external_exports.string().min(1).max(256)).max(50);
|
|
52461
52504
|
rawApiRoutesSchema = external_exports.strictObject({ get: rawApiRoutePatterns, write: rawApiRoutePatterns });
|
|
52462
|
-
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 });
|
|
52463
52506
|
adminToolSchema = external_exports.strictObject({
|
|
52464
52507
|
name: toolSchema,
|
|
52465
52508
|
enabled: external_exports.boolean(),
|
|
@@ -53105,9 +53148,10 @@ var init_api2 = __esm({
|
|
|
53105
53148
|
"Duplicate names or total file byte limit exceeded"
|
|
53106
53149
|
).optional()
|
|
53107
53150
|
});
|
|
53151
|
+
argumentByteLimitIssue = "Argument exceeds byte limit";
|
|
53108
53152
|
runRequestSchema = runInputSchema.extend({
|
|
53109
53153
|
instance: instanceNameSchema.optional(),
|
|
53110
|
-
args: external_exports.array(text.refine((value) => byteLength(value) <= inputLimits.argumentBytes,
|
|
53154
|
+
args: external_exports.array(text.refine((value) => byteLength(value) <= inputLimits.argumentBytes, argumentByteLimitIssue)).max(inputLimits.arguments)
|
|
53111
53155
|
});
|
|
53112
53156
|
counts = external_exports.strictObject({ stdout: external_exports.number().int().nonnegative(), stderr: external_exports.number().int().nonnegative() });
|
|
53113
53157
|
runSuccessSchema = external_exports.strictObject({
|
|
@@ -66527,9 +66571,9 @@ var init_ado_axi = __esm({
|
|
|
66527
66571
|
ado_axi_default = {
|
|
66528
66572
|
generatedBy: "scripts/ado-inventory.ts",
|
|
66529
66573
|
tool: "ado-axi",
|
|
66530
|
-
version: "0.5.
|
|
66531
|
-
integrity: "sha512-
|
|
66532
|
-
skillSha256: "
|
|
66574
|
+
version: "0.5.4",
|
|
66575
|
+
integrity: "sha512-wZ4+8CWdKID/B3UxfoUX5SPSTYFhHhvXJuXkYXboZXE4qLd6BfHa9quoFH5pfm6x7UmgzVhu7AdZ5YTwviGQHA==",
|
|
66576
|
+
skillSha256: "e32ee6793c784eba40075e39a2ae411078178110f71cbdf9af3a9cccdea5dbf6",
|
|
66533
66577
|
parserEvidence: "Reviewed published dispatch switches, aliases and command flag constants",
|
|
66534
66578
|
sources: [
|
|
66535
66579
|
{
|
|
@@ -66542,7 +66586,7 @@ var init_ado_axi = __esm({
|
|
|
66542
66586
|
},
|
|
66543
66587
|
{
|
|
66544
66588
|
path: "dist/lib/client.js",
|
|
66545
|
-
sha256: "
|
|
66589
|
+
sha256: "e9c39ab7cd84808c1e9314ee6133e271bda81e55834667ee2b751b671c3dab9f"
|
|
66546
66590
|
},
|
|
66547
66591
|
{
|
|
66548
66592
|
path: "dist/lib/args.js",
|
|
@@ -66570,7 +66614,7 @@ var init_ado_axi = __esm({
|
|
|
66570
66614
|
},
|
|
66571
66615
|
{
|
|
66572
66616
|
path: "dist/lib/writes.js",
|
|
66573
|
-
sha256: "
|
|
66617
|
+
sha256: "dc5a6a6aa5b12443e9ad5aa532c730ff0e2fffb8bfaefd94a0a723bee5b24a71"
|
|
66574
66618
|
},
|
|
66575
66619
|
{
|
|
66576
66620
|
path: "dist/lib/audit.js",
|
|
@@ -66582,7 +66626,7 @@ var init_ado_axi = __esm({
|
|
|
66582
66626
|
},
|
|
66583
66627
|
{
|
|
66584
66628
|
path: "dist/commands/api.js",
|
|
66585
|
-
sha256: "
|
|
66629
|
+
sha256: "2c456a936f7925d2e555ae834a6551672cc90c772aa811b5de587f21619309bb"
|
|
66586
66630
|
},
|
|
66587
66631
|
{
|
|
66588
66632
|
path: "dist/commands/classification.js",
|
|
@@ -66698,7 +66742,6 @@ var init_ado_axi = __esm({
|
|
|
66698
66742
|
blockedCommands: [
|
|
66699
66743
|
"work-item attach",
|
|
66700
66744
|
"work-item attachment get",
|
|
66701
|
-
"pipeline runs artifact download",
|
|
66702
66745
|
"config",
|
|
66703
66746
|
"config list",
|
|
66704
66747
|
"config show",
|
|
@@ -67750,18 +67793,14 @@ var init_ado_axi = __esm({
|
|
|
67750
67793
|
},
|
|
67751
67794
|
{
|
|
67752
67795
|
command: "pipeline runs artifact download",
|
|
67753
|
-
effect: "
|
|
67796
|
+
effect: "read",
|
|
67754
67797
|
flags: {
|
|
67755
67798
|
profile: "value",
|
|
67756
67799
|
org: "value",
|
|
67757
67800
|
project: "value",
|
|
67758
67801
|
config: "value",
|
|
67759
67802
|
help: "boolean",
|
|
67760
|
-
|
|
67761
|
-
fields: "value",
|
|
67762
|
-
name: "value",
|
|
67763
|
-
out: "value",
|
|
67764
|
-
force: "boolean"
|
|
67803
|
+
name: "value"
|
|
67765
67804
|
},
|
|
67766
67805
|
positionals: 1,
|
|
67767
67806
|
aliases: []
|
|
@@ -101563,7 +101602,7 @@ function rewriteSuggestions(output3, tool, truncated = false, invocation) {
|
|
|
101563
101602
|
const flags = managedFlags[tool];
|
|
101564
101603
|
if (!flags) return output3;
|
|
101565
101604
|
const executable = new RegExp(`^(?:artium-axi |npx -y @knowttl/)?${tool}(?=\\s|$)`);
|
|
101566
|
-
if (executable.test(output3.replace(/^[ \t]*(?:(?:Command|Native operation|Examples|Usage): )?/, "")) || tool === "ado-axi" && output3.startsWith("
|
|
101605
|
+
if (executable.test(output3.replace(/^[ \t]*(?:(?:Command|Native operation|Examples|Usage): )?/, "")) || tool === "ado-axi" && output3.startsWith("Dedicated write commands require ADO_AXI_WRITES=1 ") || tool === "ldap-axi" && ldapHelp.test(output3)) return hostedHelp(output3, tool, flags, true, invocation?.instance);
|
|
101567
101606
|
let spans;
|
|
101568
101607
|
let field;
|
|
101569
101608
|
let unknownOutcome = false;
|
|
@@ -101602,7 +101641,7 @@ function rewriteSuggestions(output3, tool, truncated = false, invocation) {
|
|
|
101602
101641
|
} catch {
|
|
101603
101642
|
return output3;
|
|
101604
101643
|
}
|
|
101605
|
-
const replacements = spans.map((span) => hostedHelp(span.value, tool, flags, /^[ \t]*(?:Command|Native operation|Examples|Usage):/m.test(span.value)));
|
|
101644
|
+
const replacements = spans.map((span) => hostedHelp(span.value, tool, flags, /^[ \t]*(?:Command|Native operation|Examples|Usage):/m.test(span.value), invocation?.instance));
|
|
101606
101645
|
if (field && replacements.some((value) => !value.trim())) {
|
|
101607
101646
|
const values = replacements.filter((value) => value.trim());
|
|
101608
101647
|
const help3 = field.array ? values : values[0] ?? "";
|
|
@@ -101636,10 +101675,10 @@ function rewriteSuggestions(output3, tool, truncated = false, invocation) {
|
|
|
101636
101675
|
const insertions = /* @__PURE__ */ new Map();
|
|
101637
101676
|
const removals = /* @__PURE__ */ new Map();
|
|
101638
101677
|
for (const span of spans) {
|
|
101639
|
-
let commandEdit2 = function(start, end, wrapped) {
|
|
101678
|
+
let commandEdit2 = function(start, end, wrapped, instance) {
|
|
101640
101679
|
const command = span.value.slice(start, end);
|
|
101641
101680
|
if (!wrapped) {
|
|
101642
|
-
insertions.set(span.start + offsets[start], "artium-axi ");
|
|
101681
|
+
insertions.set(span.start + offsets[start], instance === void 0 ? "artium-axi " : `artium-axi --instance ${instance} `);
|
|
101643
101682
|
if (command.startsWith("npx -y @knowttl/")) removals.set(span.start + offsets[start], span.start + offsets[start + "npx -y @knowttl/".length]);
|
|
101644
101683
|
}
|
|
101645
101684
|
const tokens = [...command.matchAll(/(?:[^\s'"]+|'[^']*'|"(?:\\.|[^"\\])*")+/g)];
|
|
@@ -101675,12 +101714,14 @@ function rewriteSuggestions(output3, tool, truncated = false, invocation) {
|
|
|
101675
101714
|
if (commandRanges.some(([start, end]) => match.index >= start && match.index < end)) continue;
|
|
101676
101715
|
const preceding = span.value.slice(0, match.index);
|
|
101677
101716
|
if (/(?:^|\n)[ \t]*[Vv]alid flags for $/.test(preceding) && match[1] === "`" && match[3] === "`") continue;
|
|
101678
|
-
|
|
101679
|
-
if (
|
|
101680
|
-
|
|
101717
|
+
const recovery = tool === "falcon-axi" && match[1] === "`" && match[2].startsWith("falcon-axi identity graphql --query ") && /(?:^|\n|\S[`'"])[ \t]*Re-read the list with[ \t]+$/.test(preceding);
|
|
101718
|
+
if (!recovery) {
|
|
101719
|
+
if (!/^(?:artium-axi |npx -y @knowttl\/)?[^\s`'"]+-axi(?:\s|$)/.test(match[2])) return output3;
|
|
101720
|
+
if (!/(?:^|\n|\S[`'"])[ \t]*(?:(?:Run|Use|run|use|Verify with|If you're unsure, run|Check current state before trying again:|or(?:, if you're unsure, run)?)[ \t]+)?$/.test(preceding)) return output3;
|
|
101721
|
+
}
|
|
101681
101722
|
if (executable.test(match[2])) {
|
|
101682
101723
|
if (!match[3]) return output3;
|
|
101683
|
-
commandEdit2(match.index + 1, match.index + 1 + match[2].length,
|
|
101724
|
+
commandEdit2(match.index + 1, match.index + 1 + match[2].length, match[2].startsWith(`artium-axi ${tool}`), recovery ? invocation?.instance : void 0);
|
|
101684
101725
|
}
|
|
101685
101726
|
}
|
|
101686
101727
|
}
|
|
@@ -101703,7 +101744,7 @@ function managedFlagRanges(command, tool) {
|
|
|
101703
101744
|
}
|
|
101704
101745
|
return ranges;
|
|
101705
101746
|
}
|
|
101706
|
-
function hostedHelp(help3, tool, flags, commands3) {
|
|
101747
|
+
function hostedHelp(help3, tool, flags, commands3, instance) {
|
|
101707
101748
|
if ((tool === "unifi-axi" || tool === "proxmox-axi" || tool === "gitea-axi") && (new RegExp(`\\b${tool} (?:auth|config|profile|setup|update)\\b`).test(help3) || /\b(?:(?:UNIFI|GITEA)_AXI_[A-Z_]+|PROXMOX_AXI_(?!(?:STREAM|RESULT)_FD\b)[A-Z_]+)\b/.test(help3))) {
|
|
101708
101749
|
return "Ask an administrator to update the managed credential.";
|
|
101709
101750
|
}
|
|
@@ -101751,7 +101792,7 @@ function hostedHelp(help3, tool, flags, commands3) {
|
|
|
101751
101792
|
if (tool === "falcon-axi") {
|
|
101752
101793
|
const rootPosture = help3.includes("\nRTR execution requires");
|
|
101753
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");
|
|
101754
|
-
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, 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.";
|
|
101755
101796
|
if (rootPosture && !help3.includes(guidance)) help3 = help3.trimEnd() + "\n" + guidance + "\n";
|
|
101756
101797
|
}
|
|
101757
101798
|
if (tool === "gh-axi") {
|
|
@@ -101761,11 +101802,14 @@ function hostedHelp(help3, tool, flags, commands3) {
|
|
|
101761
101802
|
else if (!help3.includes(guidance)) help3 = help3.trimEnd() + "\n" + guidance + "\n";
|
|
101762
101803
|
}
|
|
101763
101804
|
if (tool === "ado-axi") {
|
|
101764
|
-
const guidance = "Artium manages the organization, profile, config and PAT. Only authorized writes receive the native write switch. api defaults to GET. POST/PATCH/PUT/DELETE require allowWrites, a server-listed relative path and a JSON --body up to 65536 bytes; decisions are journaled (TD-067). No write host/query overrides, stdin, attachment uploads or downloads. Use pipeline watch --timeout 50 or less.";
|
|
101805
|
+
const guidance = "Artium manages the organization, profile, config and PAT. Only authorized writes receive the native write switch. api defaults to GET. POST/PATCH/PUT/DELETE require allowWrites, a server-listed relative path and a JSON --body up to 65536 bytes; decisions are journaled (TD-067). No write host/query overrides, stdin, attachment uploads or attachment downloads. pipeline runs artifact download <run-id> --name <name> delivers the unextracted ZIP, up to the protected result size limit, through the protected result path, never a file: the same caller retrieves it once within five minutes. Use pipeline watch --timeout 50 or less.";
|
|
101765
101806
|
if (/^(?:Usage: |(?:Run|Use) [`'"]?)?(?:artium-axi )?ado-axi api(?:\s|$)/.test(help3)) {
|
|
101766
101807
|
help3 = "ado-axi api [GET|POST|PATCH|PUT|DELETE] <relative-path> [-X|--method <method>] [--body <json>] [--content-type json|json-patch|merge-patch] [--api-version <version>] [--no-project] [--raw] [--limit <n>] [--full] [--fields <fields>]\nGET also accepts --query <query> and --host dev|vsrm|vssps|almsearch.\n";
|
|
101767
101808
|
}
|
|
101768
|
-
help3 = help3.replace(/\n"built-in":\n[\s\S]*$/, "").replace(/ # [^\n]*\bADO_AXI_WRITES\b[^\n]*/g, "").replace(/^.*\bADO_AXI_WRITES\b.*(?:\n|$)/gm, "").replace(/^\s*(?:ado-axi work-item )?attach(?:ment)?\b.*(?:\n|$)/gm, "").replace(
|
|
101809
|
+
help3 = help3.replace(/\n"built-in":\n[\s\S]*$/, "").replace(/ # [^\n]*\bADO_AXI_WRITES\b[^\n]*/g, "").replace(/^.*\bADO_AXI_WRITES\b.*(?:\n|$)/gm, "").replace(/^\s*(?:ado-axi work-item )?attach(?:ment)?\b.*(?:\n|$)/gm, "").replace(/^.*artifact download.*$/gm, (line) => line.replace(/ --out [^\s`'"]+(?: \[--force\])?/, "").replace(/ # ZIP;.*$/, " # ZIP up to the protected result size limit, retrieved once through the protected result path").replace(/ to save an artifact ZIP$/, " to retrieve an artifact ZIP once through the protected result path")).split("\n").filter((line) => /^\s*(?:(?:Run|Use) [`'"]?|Usage: )?(?:artium-axi )?ado-axi (?!config\b|update\b)/.test(line) || !/(?:\bado-axi (?:config|update)\b|\baz (?:CLI )?login\b|\baz login\b|\bADO_[A-Z_]+\b|\bPAT\b.*\benv\b|stdin|piped|--profile|--org\b|--config\b)/i.test(line)).map((line) => line.replace(/<path\|url>/g, "<relative-path>").replace(/--timeout 1800/g, "--timeout 50").replace(/^([ \t]*MSYS_NO_PATHCONV=1 )ado-axi(?=\s|$)/, "$1artium-axi ado-axi").replace(
|
|
101810
|
+
/^(Azure DevOps REST API paths start with _apis\/, for example `)ado-axi api _apis\/pipelines`$/,
|
|
101811
|
+
`$1artium-axi${instance === void 0 ? "" : ` --instance ${instance}`} ado-axi api _apis/projects --no-project\``
|
|
101812
|
+
).replace("raw REST escape hatch for everything else", "REST calls on managed paths").replace(/ \| config\b/g, "")).join("\n");
|
|
101769
101813
|
if (!help3.trim()) help3 = guidance;
|
|
101770
101814
|
else if (commands3 && !help3.includes(guidance)) help3 = help3.trimEnd() + "\n" + guidance + "\n";
|
|
101771
101815
|
}
|
|
@@ -102340,7 +102384,7 @@ var init_help = __esm({
|
|
|
102340
102384
|
"falcon-axi": {
|
|
102341
102385
|
usage: "artium-axi falcon-axi [<args>]",
|
|
102342
102386
|
purpose: "Run Falcon commands with your managed credentials.",
|
|
102343
|
-
flags: ["Reads retain native --help. Search start/stop, host usb, identity activity, identity rule create and delete, 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."],
|
|
102344
102388
|
example: `artium-axi falcon-axi ${falcon_axi_default.discovery.example.join(" ")}`
|
|
102345
102389
|
},
|
|
102346
102390
|
"vectra-axi": {
|
|
@@ -102791,8 +102835,11 @@ function inputFileFlags(tool, args2) {
|
|
|
102791
102835
|
}
|
|
102792
102836
|
function falconGraphqlQueryIndex(args2) {
|
|
102793
102837
|
if (args2[0] !== "identity" || args2[1] !== "graphql" || args2.includes("--help")) return void 0;
|
|
102794
|
-
|
|
102795
|
-
|
|
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;
|
|
102796
102843
|
}
|
|
102797
102844
|
function ghReleaseUploadFileIndexes(args2) {
|
|
102798
102845
|
if (args2[0] !== "release" || args2[1] !== "upload" || args2.some((arg) => ["--help", "-h"].includes(arg))) return [];
|
|
@@ -102938,10 +102985,9 @@ async function technitiumToolInput(original) {
|
|
|
102938
102985
|
const content = Buffer.from(JSON.stringify(value));
|
|
102939
102986
|
files.unshift({ name: "input.json", size: content.length, contentBase64: content.toString("base64") });
|
|
102940
102987
|
args2.splice(index, inline ? 1 : 2, "--input-file", "input.json");
|
|
102941
|
-
const
|
|
102942
|
-
|
|
102943
|
-
|
|
102944
|
-
return parsed.data;
|
|
102988
|
+
const request = parseRunRequest({ args: args2, files });
|
|
102989
|
+
technitiumInput(route.operation, "input.json", request);
|
|
102990
|
+
return request;
|
|
102945
102991
|
}
|
|
102946
102992
|
var init_technitium_input2 = __esm({
|
|
102947
102993
|
"src/cli/technitium-input.ts"() {
|
|
@@ -102979,7 +103025,7 @@ async function readBounded(stream, limit, stdinAlternative) {
|
|
|
102979
103025
|
return Buffer.concat(chunks);
|
|
102980
103026
|
}
|
|
102981
103027
|
async function toolInput(tool, original) {
|
|
102982
|
-
|
|
103028
|
+
parseRunRequest({ args: original });
|
|
102983
103029
|
if (tool === "technitium-axi") {
|
|
102984
103030
|
const prepared = await technitiumToolInput(original);
|
|
102985
103031
|
if (prepared) return prepared;
|
|
@@ -103028,14 +103074,14 @@ async function toolInput(tool, original) {
|
|
|
103028
103074
|
const flags = route.flags;
|
|
103029
103075
|
const shorts = route.shortFlags;
|
|
103030
103076
|
const repeatable = route.repeatableFlags;
|
|
103031
|
-
const
|
|
103077
|
+
const parsed = parseArgs2({ args: args2.slice(length).map((arg) => {
|
|
103032
103078
|
const match = /^--([^=]+)=(true|false)$/.exec(arg);
|
|
103033
103079
|
return match && flags[match[1]] === "boolean" ? "--" + match[1] : arg;
|
|
103034
103080
|
}), allowPositionals: true, strict: true, tokens: true, options: Object.fromEntries(Object.entries(flags).map(([name, type]) => {
|
|
103035
103081
|
const short = Object.entries(shorts).find(([, target]) => target === name)?.[0];
|
|
103036
103082
|
return [name, { type: type === "boolean" ? "boolean" : "string", multiple: repeatable.includes(name), ...short ? { short } : {} }];
|
|
103037
103083
|
})) });
|
|
103038
|
-
giteaFiles = new Map(
|
|
103084
|
+
giteaFiles = new Map(parsed.tokens.flatMap((token) => token.kind === "option" && fileFlags.includes(token.name) && !(parsed.values.help && !args2.includes("--help=false")) ? [[length + token.index, { name: token.name, value: token.value, inline: token.inlineValue === true }]] : []));
|
|
103039
103085
|
} catch {
|
|
103040
103086
|
throw new ArtiumError("INVALID_INPUT");
|
|
103041
103087
|
}
|
|
@@ -103109,10 +103155,9 @@ async function toolInput(tool, original) {
|
|
|
103109
103155
|
if (stdin.length) input2.stdin = stdin.toString("utf8");
|
|
103110
103156
|
}
|
|
103111
103157
|
}
|
|
103112
|
-
const
|
|
103113
|
-
|
|
103114
|
-
|
|
103115
|
-
return parsed.data;
|
|
103158
|
+
const request = parseRunRequest({ args: args2, ...input2 });
|
|
103159
|
+
validateFileInput(tool, request.args, request);
|
|
103160
|
+
return request;
|
|
103116
103161
|
}
|
|
103117
103162
|
var init_input = __esm({
|
|
103118
103163
|
"src/cli/input.ts"() {
|
|
@@ -106073,7 +106118,7 @@ import { setTimeout as delay2 } from "node:timers/promises";
|
|
|
106073
106118
|
async function tokenCommand(args2, output3, managed2) {
|
|
106074
106119
|
const action = args2[0];
|
|
106075
106120
|
if (args2.includes("--help")) {
|
|
106076
|
-
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");
|
|
106077
106122
|
return;
|
|
106078
106123
|
}
|
|
106079
106124
|
if (managed2) throw new ArtiumError("INVALID_INPUT", "Token management is unavailable in managed mode.");
|
|
@@ -106092,7 +106137,7 @@ async function tokenCommand(args2, output3, managed2) {
|
|
|
106092
106137
|
action === "list" ? "Use artium-axi token list; valid flags: --help." : "Use artium-axi token revoke <id>; valid flags: --help."
|
|
106093
106138
|
);
|
|
106094
106139
|
if (action !== "create") throw new ArtiumError("INVALID_INPUT", "Invalid token command.", "Use artium-axi token --help.");
|
|
106095
|
-
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"];
|
|
106096
106141
|
const flags = /* @__PURE__ */ new Map();
|
|
106097
106142
|
for (let index = 1; index < args2.length; index++) {
|
|
106098
106143
|
const flag = args2[index];
|
|
@@ -106102,10 +106147,10 @@ async function tokenCommand(args2, output3, managed2) {
|
|
|
106102
106147
|
`Valid flags: --help, ${createFlags.join(", ")}.`
|
|
106103
106148
|
);
|
|
106104
106149
|
const values = flags.get(flag) ?? [];
|
|
106105
|
-
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");
|
|
106106
106151
|
const value = ["--write", "--reusable", "--password-stdin", "--sso"].includes(flag) ? "true" : args2[++index];
|
|
106107
106152
|
if (!value || value.startsWith("--")) throw new ArtiumError("INVALID_INPUT");
|
|
106108
|
-
if (["--exact", "--command"].includes(flag) && value.includes("*")) throw new ArtiumError(
|
|
106153
|
+
if (["--exact", "--command", "--api-write"].includes(flag) && value.includes("*")) throw new ArtiumError(
|
|
106109
106154
|
"INVALID_INPUT",
|
|
106110
106155
|
"Wildcards are not supported yet.",
|
|
106111
106156
|
"Select exact commands or use --tool for tool-wide access."
|
|
@@ -106122,11 +106167,16 @@ async function tokenCommand(args2, output3, managed2) {
|
|
|
106122
106167
|
return tool.data;
|
|
106123
106168
|
};
|
|
106124
106169
|
const tools = (flags.get("--tool") ?? []).map((tool) => ({ tool: readTool(tool) }));
|
|
106125
|
-
const
|
|
106170
|
+
const pick2 = (value) => {
|
|
106126
106171
|
const separator = value.indexOf(":");
|
|
106127
106172
|
if (separator < 0) throw new ArtiumError("INVALID_INPUT");
|
|
106128
106173
|
return { tool: readTool(value.slice(0, separator)), commands: [value.slice(separator + 1)] };
|
|
106129
|
-
}
|
|
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
|
+
];
|
|
106130
106180
|
const instances = /* @__PURE__ */ new Map();
|
|
106131
106181
|
for (const value of flags.get("--instance") ?? []) {
|
|
106132
106182
|
const separator = value.indexOf(":");
|
|
@@ -106575,7 +106625,12 @@ remoteRevocation: ${verified ? "verified" : "unverified"}
|
|
|
106575
106625
|
failureContext = "rewriteSuggestions";
|
|
106576
106626
|
const forwarded = args2.slice(1);
|
|
106577
106627
|
const firstFlag = forwarded.findIndex((arg) => arg.startsWith("-"));
|
|
106578
|
-
const
|
|
106628
|
+
const qualifySuggestions = command === "falcon-axi" || command === "ado-axi";
|
|
106629
|
+
const invocation = command === "unifi-axi" || command === "proxmox-axi" || qualifySuggestions ? {
|
|
106630
|
+
command: forwarded.slice(0, firstFlag < 0 ? forwarded.length : firstFlag).join(" ") || "home",
|
|
106631
|
+
help: forwarded.includes("--help"),
|
|
106632
|
+
...qualifySuggestions ? { instance: parsed.data.instance ?? instance } : {}
|
|
106633
|
+
} : void 0;
|
|
106579
106634
|
output2("stdout", rewriteSuggestions(stdout, command, truncated.stdout, invocation));
|
|
106580
106635
|
output2("stderr", rewriteSuggestions(stderr, command, truncated.stderr, invocation));
|
|
106581
106636
|
if (exitCode !== 0 && client.requestId) output2("stderr", `${stderr && !stderr.endsWith("\n") ? "\n" : ""}artium-axi: request_id ${client.requestId}
|