@knowttl/artium-axi 0.0.58 → 0.0.60
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 +1 -1
- package/bin/artium-axi.mjs +101 -53
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -78,7 +78,7 @@ Write capabilities below require administrator opt-in.
|
|
|
78
78
|
| --- | --- | --- | --- |
|
|
79
79
|
| 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
80
|
| 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 | Exact administrator grants; native RTR profile opt-in and confirmation | [Capabilities](docs/safety.md#write-gates-by-tool) |
|
|
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) |
|
|
82
82
|
| 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
83
|
| 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
84
|
| Vectra | Hosts, detections and response workflows | Reads; selected writes | [Credentials](docs/tool-credentials.md#vectra) |
|
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.60",
|
|
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.3.0",
|
|
32776
|
+
integrity: "sha512-l0It1HsvJ5dZpRzpptwnak5AeHqDGwrnkuxNxCP8FOGOWYxxKAay3s7KJGEevzchhuR5Gffq+CeroMEFMG3PKg==",
|
|
32777
32777
|
sources: [
|
|
32778
32778
|
{
|
|
32779
32779
|
path: "package.json",
|
|
32780
|
-
sha256: "
|
|
32780
|
+
sha256: "ff043b82242630525eebee7f0ff04ba900563019da4128f010b84ae4cabeaea3"
|
|
32781
32781
|
},
|
|
32782
32782
|
{
|
|
32783
32783
|
path: "artium-invocations.json",
|
|
32784
|
-
sha256: "
|
|
32784
|
+
sha256: "4c1386a4ae8fd45189624fe631c1807827c5dd12b0531d7f709ec86cb6fa0d1f"
|
|
32785
32785
|
},
|
|
32786
32786
|
{
|
|
32787
32787
|
path: ".typescript-build/native/checksums.json",
|
|
@@ -32801,7 +32801,7 @@ var init_falcon_axi = __esm({
|
|
|
32801
32801
|
},
|
|
32802
32802
|
{
|
|
32803
32803
|
path: ".typescript-build/src/cli.js",
|
|
32804
|
-
sha256: "
|
|
32804
|
+
sha256: "74fef0bd4797312e9ded16fc3bdd4f92c761087ec12a98f58d1dfd36ba75bd5d"
|
|
32805
32805
|
},
|
|
32806
32806
|
{
|
|
32807
32807
|
path: ".typescript-build/src/core.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: "475718324be41fc175fbd8fc488a1a2abb607047563e60cadf2cdbb88489ac6f"
|
|
32837
32837
|
},
|
|
32838
32838
|
{
|
|
32839
32839
|
path: ".typescript-build/src/hook.js",
|
|
@@ -32843,6 +32843,10 @@ 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
32852
|
sha256: "ad931ff1910aa75bcddffcae993ac23e7ef5428f7e816ebe68c64e20cf73c7cb"
|
|
@@ -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: "75259379d624dbf94c24c762f64e36f06ac48fb9a2614965f03f4b4df7c09ab4"
|
|
32873
32877
|
},
|
|
32874
32878
|
{
|
|
32875
32879
|
path: ".typescript-build/src/origin.js",
|
|
@@ -32881,7 +32885,7 @@ var init_falcon_axi = __esm({
|
|
|
32881
32885
|
},
|
|
32882
32886
|
{
|
|
32883
32887
|
path: ".typescript-build/src/raw.js",
|
|
32884
|
-
sha256: "
|
|
32888
|
+
sha256: "d07ce1ea17fe8e1694f70d15b28faaa094fce331140c07bb8df007b4c5b043c9"
|
|
32885
32889
|
},
|
|
32886
32890
|
{
|
|
32887
32891
|
path: ".typescript-build/src/render.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: "03f32fd85bb2d3c2accdb2d29c487e5094683a459541946d73e0c77870db3595"
|
|
32941
32945
|
},
|
|
32942
32946
|
{
|
|
32943
32947
|
path: ".typescript-build/src/transport/operations.js",
|
|
@@ -32959,9 +32963,13 @@ var init_falcon_axi = __esm({
|
|
|
32959
32963
|
path: ".typescript-build/src/transport/search-authority.js",
|
|
32960
32964
|
sha256: "a1a0df55cff342d65ebd4b35e97bb28d3ad465fb8f45062af874403c27e10e69"
|
|
32961
32965
|
},
|
|
32966
|
+
{
|
|
32967
|
+
path: ".typescript-build/src/transport/traffic-exclusion.js",
|
|
32968
|
+
sha256: "128de9562e4c9da2803aeaf94a5c3a4959a8a5eb937e8bb0a8561f6eb9d59efc"
|
|
32969
|
+
},
|
|
32962
32970
|
{
|
|
32963
32971
|
path: ".typescript-build/src/version.js",
|
|
32964
|
-
sha256: "
|
|
32972
|
+
sha256: "9d645d9194628da7400da240b0df077b599789f161f3b24d6870008681373550"
|
|
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: "f5ee73bf5bbaed74ed0614cc8aeddeeff48395ba0ae5de90b9fd2288388db633"
|
|
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",
|
|
@@ -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: "1a3a87d560934f4fedd8bdeb8e060ce31eaf54472c5cde8e1cd0810eaaf5b16c"
|
|
33205
|
+
},
|
|
33194
33206
|
{
|
|
33195
33207
|
path: "skills/falcon-axi/references/image-list.md",
|
|
33196
33208
|
sha256: "ea5cf6c5dedb86b24deb1d8ab49e24110d8b2cd1d2739b230685ad5f29ffe9cc"
|
|
@@ -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: {
|
|
@@ -51844,7 +51872,23 @@ function transferRoutesFor(tool) {
|
|
|
51844
51872
|
function decodedFileBytes(value) {
|
|
51845
51873
|
return value.length / 4 * 3 - (value.endsWith("==") ? 2 : value.endsWith("=") ? 1 : 0);
|
|
51846
51874
|
}
|
|
51847
|
-
|
|
51875
|
+
function parseRunRequest(request) {
|
|
51876
|
+
const parsed = runRequestSchema.safeParse(request);
|
|
51877
|
+
if (parsed.success) return parsed.data;
|
|
51878
|
+
const issues = parsed.error.issues;
|
|
51879
|
+
const index = issues.find((issue2) => issue2.code === "custom" && issue2.message === argumentByteLimitIssue && issue2.path[0] === "args")?.path[1];
|
|
51880
|
+
const args2 = request && typeof request === "object" && "args" in request ? request.args : void 0;
|
|
51881
|
+
if (typeof index === "number" && Array.isArray(args2) && typeof args2[index] === "string") {
|
|
51882
|
+
const bytes = byteLength(args2[index]);
|
|
51883
|
+
throw new ArtiumError(
|
|
51884
|
+
"INVALID_INPUT",
|
|
51885
|
+
`Argument ${index + 1} is ${bytes} bytes, over the ${inputLimits.argumentBytes}-byte (${inputLimits.argumentBytes / 1024} KiB) limit.`,
|
|
51886
|
+
"Shorten that argument and run the command again."
|
|
51887
|
+
);
|
|
51888
|
+
}
|
|
51889
|
+
throw new ArtiumError("INVALID_INPUT");
|
|
51890
|
+
}
|
|
51891
|
+
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
51892
|
var init_api2 = __esm({
|
|
51849
51893
|
"src/shared/api.ts"() {
|
|
51850
51894
|
"use strict";
|
|
@@ -53105,9 +53149,10 @@ var init_api2 = __esm({
|
|
|
53105
53149
|
"Duplicate names or total file byte limit exceeded"
|
|
53106
53150
|
).optional()
|
|
53107
53151
|
});
|
|
53152
|
+
argumentByteLimitIssue = "Argument exceeds byte limit";
|
|
53108
53153
|
runRequestSchema = runInputSchema.extend({
|
|
53109
53154
|
instance: instanceNameSchema.optional(),
|
|
53110
|
-
args: external_exports.array(text.refine((value) => byteLength(value) <= inputLimits.argumentBytes,
|
|
53155
|
+
args: external_exports.array(text.refine((value) => byteLength(value) <= inputLimits.argumentBytes, argumentByteLimitIssue)).max(inputLimits.arguments)
|
|
53111
53156
|
});
|
|
53112
53157
|
counts = external_exports.strictObject({ stdout: external_exports.number().int().nonnegative(), stderr: external_exports.number().int().nonnegative() });
|
|
53113
53158
|
runSuccessSchema = external_exports.strictObject({
|
|
@@ -66527,9 +66572,9 @@ var init_ado_axi = __esm({
|
|
|
66527
66572
|
ado_axi_default = {
|
|
66528
66573
|
generatedBy: "scripts/ado-inventory.ts",
|
|
66529
66574
|
tool: "ado-axi",
|
|
66530
|
-
version: "0.5.
|
|
66531
|
-
integrity: "sha512-
|
|
66532
|
-
skillSha256: "
|
|
66575
|
+
version: "0.5.4",
|
|
66576
|
+
integrity: "sha512-wZ4+8CWdKID/B3UxfoUX5SPSTYFhHhvXJuXkYXboZXE4qLd6BfHa9quoFH5pfm6x7UmgzVhu7AdZ5YTwviGQHA==",
|
|
66577
|
+
skillSha256: "e32ee6793c784eba40075e39a2ae411078178110f71cbdf9af3a9cccdea5dbf6",
|
|
66533
66578
|
parserEvidence: "Reviewed published dispatch switches, aliases and command flag constants",
|
|
66534
66579
|
sources: [
|
|
66535
66580
|
{
|
|
@@ -66542,7 +66587,7 @@ var init_ado_axi = __esm({
|
|
|
66542
66587
|
},
|
|
66543
66588
|
{
|
|
66544
66589
|
path: "dist/lib/client.js",
|
|
66545
|
-
sha256: "
|
|
66590
|
+
sha256: "e9c39ab7cd84808c1e9314ee6133e271bda81e55834667ee2b751b671c3dab9f"
|
|
66546
66591
|
},
|
|
66547
66592
|
{
|
|
66548
66593
|
path: "dist/lib/args.js",
|
|
@@ -66570,7 +66615,7 @@ var init_ado_axi = __esm({
|
|
|
66570
66615
|
},
|
|
66571
66616
|
{
|
|
66572
66617
|
path: "dist/lib/writes.js",
|
|
66573
|
-
sha256: "
|
|
66618
|
+
sha256: "dc5a6a6aa5b12443e9ad5aa532c730ff0e2fffb8bfaefd94a0a723bee5b24a71"
|
|
66574
66619
|
},
|
|
66575
66620
|
{
|
|
66576
66621
|
path: "dist/lib/audit.js",
|
|
@@ -66582,7 +66627,7 @@ var init_ado_axi = __esm({
|
|
|
66582
66627
|
},
|
|
66583
66628
|
{
|
|
66584
66629
|
path: "dist/commands/api.js",
|
|
66585
|
-
sha256: "
|
|
66630
|
+
sha256: "2c456a936f7925d2e555ae834a6551672cc90c772aa811b5de587f21619309bb"
|
|
66586
66631
|
},
|
|
66587
66632
|
{
|
|
66588
66633
|
path: "dist/commands/classification.js",
|
|
@@ -66698,7 +66743,6 @@ var init_ado_axi = __esm({
|
|
|
66698
66743
|
blockedCommands: [
|
|
66699
66744
|
"work-item attach",
|
|
66700
66745
|
"work-item attachment get",
|
|
66701
|
-
"pipeline runs artifact download",
|
|
66702
66746
|
"config",
|
|
66703
66747
|
"config list",
|
|
66704
66748
|
"config show",
|
|
@@ -67750,18 +67794,14 @@ var init_ado_axi = __esm({
|
|
|
67750
67794
|
},
|
|
67751
67795
|
{
|
|
67752
67796
|
command: "pipeline runs artifact download",
|
|
67753
|
-
effect: "
|
|
67797
|
+
effect: "read",
|
|
67754
67798
|
flags: {
|
|
67755
67799
|
profile: "value",
|
|
67756
67800
|
org: "value",
|
|
67757
67801
|
project: "value",
|
|
67758
67802
|
config: "value",
|
|
67759
67803
|
help: "boolean",
|
|
67760
|
-
|
|
67761
|
-
fields: "value",
|
|
67762
|
-
name: "value",
|
|
67763
|
-
out: "value",
|
|
67764
|
-
force: "boolean"
|
|
67804
|
+
name: "value"
|
|
67765
67805
|
},
|
|
67766
67806
|
positionals: 1,
|
|
67767
67807
|
aliases: []
|
|
@@ -101563,7 +101603,7 @@ function rewriteSuggestions(output3, tool, truncated = false, invocation) {
|
|
|
101563
101603
|
const flags = managedFlags[tool];
|
|
101564
101604
|
if (!flags) return output3;
|
|
101565
101605
|
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("
|
|
101606
|
+
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
101607
|
let spans;
|
|
101568
101608
|
let field;
|
|
101569
101609
|
let unknownOutcome = false;
|
|
@@ -101602,7 +101642,7 @@ function rewriteSuggestions(output3, tool, truncated = false, invocation) {
|
|
|
101602
101642
|
} catch {
|
|
101603
101643
|
return output3;
|
|
101604
101644
|
}
|
|
101605
|
-
const replacements = spans.map((span) => hostedHelp(span.value, tool, flags, /^[ \t]*(?:Command|Native operation|Examples|Usage):/m.test(span.value)));
|
|
101645
|
+
const replacements = spans.map((span) => hostedHelp(span.value, tool, flags, /^[ \t]*(?:Command|Native operation|Examples|Usage):/m.test(span.value), invocation?.instance));
|
|
101606
101646
|
if (field && replacements.some((value) => !value.trim())) {
|
|
101607
101647
|
const values = replacements.filter((value) => value.trim());
|
|
101608
101648
|
const help3 = field.array ? values : values[0] ?? "";
|
|
@@ -101636,10 +101676,10 @@ function rewriteSuggestions(output3, tool, truncated = false, invocation) {
|
|
|
101636
101676
|
const insertions = /* @__PURE__ */ new Map();
|
|
101637
101677
|
const removals = /* @__PURE__ */ new Map();
|
|
101638
101678
|
for (const span of spans) {
|
|
101639
|
-
let commandEdit2 = function(start, end, wrapped) {
|
|
101679
|
+
let commandEdit2 = function(start, end, wrapped, instance) {
|
|
101640
101680
|
const command = span.value.slice(start, end);
|
|
101641
101681
|
if (!wrapped) {
|
|
101642
|
-
insertions.set(span.start + offsets[start], "artium-axi ");
|
|
101682
|
+
insertions.set(span.start + offsets[start], instance === void 0 ? "artium-axi " : `artium-axi --instance ${instance} `);
|
|
101643
101683
|
if (command.startsWith("npx -y @knowttl/")) removals.set(span.start + offsets[start], span.start + offsets[start + "npx -y @knowttl/".length]);
|
|
101644
101684
|
}
|
|
101645
101685
|
const tokens = [...command.matchAll(/(?:[^\s'"]+|'[^']*'|"(?:\\.|[^"\\])*")+/g)];
|
|
@@ -101675,12 +101715,14 @@ function rewriteSuggestions(output3, tool, truncated = false, invocation) {
|
|
|
101675
101715
|
if (commandRanges.some(([start, end]) => match.index >= start && match.index < end)) continue;
|
|
101676
101716
|
const preceding = span.value.slice(0, match.index);
|
|
101677
101717
|
if (/(?:^|\n)[ \t]*[Vv]alid flags for $/.test(preceding) && match[1] === "`" && match[3] === "`") continue;
|
|
101678
|
-
|
|
101679
|
-
if (
|
|
101680
|
-
|
|
101718
|
+
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);
|
|
101719
|
+
if (!recovery) {
|
|
101720
|
+
if (!/^(?:artium-axi |npx -y @knowttl\/)?[^\s`'"]+-axi(?:\s|$)/.test(match[2])) return output3;
|
|
101721
|
+
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;
|
|
101722
|
+
}
|
|
101681
101723
|
if (executable.test(match[2])) {
|
|
101682
101724
|
if (!match[3]) return output3;
|
|
101683
|
-
commandEdit2(match.index + 1, match.index + 1 + match[2].length,
|
|
101725
|
+
commandEdit2(match.index + 1, match.index + 1 + match[2].length, match[2].startsWith(`artium-axi ${tool}`), recovery ? invocation?.instance : void 0);
|
|
101684
101726
|
}
|
|
101685
101727
|
}
|
|
101686
101728
|
}
|
|
@@ -101703,7 +101745,7 @@ function managedFlagRanges(command, tool) {
|
|
|
101703
101745
|
}
|
|
101704
101746
|
return ranges;
|
|
101705
101747
|
}
|
|
101706
|
-
function hostedHelp(help3, tool, flags, commands3) {
|
|
101748
|
+
function hostedHelp(help3, tool, flags, commands3, instance) {
|
|
101707
101749
|
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
101750
|
return "Ask an administrator to update the managed credential.";
|
|
101709
101751
|
}
|
|
@@ -101751,7 +101793,7 @@ function hostedHelp(help3, tool, flags, commands3) {
|
|
|
101751
101793
|
if (tool === "falcon-axi") {
|
|
101752
101794
|
const rootPosture = help3.includes("\nRTR execution requires");
|
|
101753
101795
|
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.";
|
|
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.";
|
|
101755
101797
|
if (rootPosture && !help3.includes(guidance)) help3 = help3.trimEnd() + "\n" + guidance + "\n";
|
|
101756
101798
|
}
|
|
101757
101799
|
if (tool === "gh-axi") {
|
|
@@ -101761,11 +101803,14 @@ function hostedHelp(help3, tool, flags, commands3) {
|
|
|
101761
101803
|
else if (!help3.includes(guidance)) help3 = help3.trimEnd() + "\n" + guidance + "\n";
|
|
101762
101804
|
}
|
|
101763
101805
|
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.";
|
|
101806
|
+
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
101807
|
if (/^(?:Usage: |(?:Run|Use) [`'"]?)?(?:artium-axi )?ado-axi api(?:\s|$)/.test(help3)) {
|
|
101766
101808
|
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
101809
|
}
|
|
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(
|
|
101810
|
+
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(
|
|
101811
|
+
/^(Azure DevOps REST API paths start with _apis\/, for example `)ado-axi api _apis\/pipelines`$/,
|
|
101812
|
+
`$1artium-axi${instance === void 0 ? "" : ` --instance ${instance}`} ado-axi api _apis/projects --no-project\``
|
|
101813
|
+
).replace("raw REST escape hatch for everything else", "REST calls on managed paths").replace(/ \| config\b/g, "")).join("\n");
|
|
101769
101814
|
if (!help3.trim()) help3 = guidance;
|
|
101770
101815
|
else if (commands3 && !help3.includes(guidance)) help3 = help3.trimEnd() + "\n" + guidance + "\n";
|
|
101771
101816
|
}
|
|
@@ -102340,7 +102385,7 @@ var init_help = __esm({
|
|
|
102340
102385
|
"falcon-axi": {
|
|
102341
102386
|
usage: "artium-axi falcon-axi [<args>]",
|
|
102342
102387
|
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."],
|
|
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."],
|
|
102344
102389
|
example: `artium-axi falcon-axi ${falcon_axi_default.discovery.example.join(" ")}`
|
|
102345
102390
|
},
|
|
102346
102391
|
"vectra-axi": {
|
|
@@ -102938,10 +102983,9 @@ async function technitiumToolInput(original) {
|
|
|
102938
102983
|
const content = Buffer.from(JSON.stringify(value));
|
|
102939
102984
|
files.unshift({ name: "input.json", size: content.length, contentBase64: content.toString("base64") });
|
|
102940
102985
|
args2.splice(index, inline ? 1 : 2, "--input-file", "input.json");
|
|
102941
|
-
const
|
|
102942
|
-
|
|
102943
|
-
|
|
102944
|
-
return parsed.data;
|
|
102986
|
+
const request = parseRunRequest({ args: args2, files });
|
|
102987
|
+
technitiumInput(route.operation, "input.json", request);
|
|
102988
|
+
return request;
|
|
102945
102989
|
}
|
|
102946
102990
|
var init_technitium_input2 = __esm({
|
|
102947
102991
|
"src/cli/technitium-input.ts"() {
|
|
@@ -102979,7 +103023,7 @@ async function readBounded(stream, limit, stdinAlternative) {
|
|
|
102979
103023
|
return Buffer.concat(chunks);
|
|
102980
103024
|
}
|
|
102981
103025
|
async function toolInput(tool, original) {
|
|
102982
|
-
|
|
103026
|
+
parseRunRequest({ args: original });
|
|
102983
103027
|
if (tool === "technitium-axi") {
|
|
102984
103028
|
const prepared = await technitiumToolInput(original);
|
|
102985
103029
|
if (prepared) return prepared;
|
|
@@ -103028,14 +103072,14 @@ async function toolInput(tool, original) {
|
|
|
103028
103072
|
const flags = route.flags;
|
|
103029
103073
|
const shorts = route.shortFlags;
|
|
103030
103074
|
const repeatable = route.repeatableFlags;
|
|
103031
|
-
const
|
|
103075
|
+
const parsed = parseArgs2({ args: args2.slice(length).map((arg) => {
|
|
103032
103076
|
const match = /^--([^=]+)=(true|false)$/.exec(arg);
|
|
103033
103077
|
return match && flags[match[1]] === "boolean" ? "--" + match[1] : arg;
|
|
103034
103078
|
}), allowPositionals: true, strict: true, tokens: true, options: Object.fromEntries(Object.entries(flags).map(([name, type]) => {
|
|
103035
103079
|
const short = Object.entries(shorts).find(([, target]) => target === name)?.[0];
|
|
103036
103080
|
return [name, { type: type === "boolean" ? "boolean" : "string", multiple: repeatable.includes(name), ...short ? { short } : {} }];
|
|
103037
103081
|
})) });
|
|
103038
|
-
giteaFiles = new Map(
|
|
103082
|
+
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
103083
|
} catch {
|
|
103040
103084
|
throw new ArtiumError("INVALID_INPUT");
|
|
103041
103085
|
}
|
|
@@ -103109,10 +103153,9 @@ async function toolInput(tool, original) {
|
|
|
103109
103153
|
if (stdin.length) input2.stdin = stdin.toString("utf8");
|
|
103110
103154
|
}
|
|
103111
103155
|
}
|
|
103112
|
-
const
|
|
103113
|
-
|
|
103114
|
-
|
|
103115
|
-
return parsed.data;
|
|
103156
|
+
const request = parseRunRequest({ args: args2, ...input2 });
|
|
103157
|
+
validateFileInput(tool, request.args, request);
|
|
103158
|
+
return request;
|
|
103116
103159
|
}
|
|
103117
103160
|
var init_input = __esm({
|
|
103118
103161
|
"src/cli/input.ts"() {
|
|
@@ -106575,7 +106618,12 @@ remoteRevocation: ${verified ? "verified" : "unverified"}
|
|
|
106575
106618
|
failureContext = "rewriteSuggestions";
|
|
106576
106619
|
const forwarded = args2.slice(1);
|
|
106577
106620
|
const firstFlag = forwarded.findIndex((arg) => arg.startsWith("-"));
|
|
106578
|
-
const
|
|
106621
|
+
const qualifySuggestions = command === "falcon-axi" || command === "ado-axi";
|
|
106622
|
+
const invocation = command === "unifi-axi" || command === "proxmox-axi" || qualifySuggestions ? {
|
|
106623
|
+
command: forwarded.slice(0, firstFlag < 0 ? forwarded.length : firstFlag).join(" ") || "home",
|
|
106624
|
+
help: forwarded.includes("--help"),
|
|
106625
|
+
...qualifySuggestions ? { instance: parsed.data.instance ?? instance } : {}
|
|
106626
|
+
} : void 0;
|
|
106579
106627
|
output2("stdout", rewriteSuggestions(stdout, command, truncated.stdout, invocation));
|
|
106580
106628
|
output2("stderr", rewriteSuggestions(stderr, command, truncated.stderr, invocation));
|
|
106581
106629
|
if (exitCode !== 0 && client.requestId) output2("stderr", `${stderr && !stderr.endsWith("\n") ? "\n" : ""}artium-axi: request_id ${client.requestId}
|