@pensar/apex 2.3.0 → 2.4.0-canary.09a8744f

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.
Files changed (81) hide show
  1. package/build/{agent-9xna7jhw.js → agent-4gcavfr4.js} +12 -11
  2. package/build/agent-7x7b5hz1.js +30 -0
  3. package/build/agent-zx1cw89c.js +20 -0
  4. package/build/{apps-43pqbz7r.js → apps-xqecgcbn.js} +75 -34
  5. package/build/{auth-c1z670rx.js → auth-62z3kedh.js} +46 -23
  6. package/build/authentication-phbasmkj.js +20 -0
  7. package/build/blackboxAgent-3s34dabp.js +20 -0
  8. package/build/blackboxPentest-mg2p9s1m.js +70 -0
  9. package/build/{cli-zk1ch6qf.js → cli-4a1c4tkn.js} +61 -10
  10. package/build/{cli-zx8gk8xv.js → cli-51503njj.js} +661 -328
  11. package/build/cli-53rm0rrz.js +15 -0
  12. package/build/{cli-eveg9djy.js → cli-5tbg4dyb.js} +3 -2
  13. package/build/cli-68260ckj.js +12136 -0
  14. package/build/{cli-baqhqbe5.js → cli-7gcsfnw6.js} +3 -3
  15. package/build/cli-7q3ae3ft.js +6 -0
  16. package/build/{cli-72b18z0n.js → cli-8nj7pnew.js} +28 -5
  17. package/build/{cli-f7hanqbw.js → cli-9fds4ss0.js} +2 -2
  18. package/build/cli-9pbk8m32.js +32 -0
  19. package/build/{cli-3k1x5rn3.js → cli-avmhkjtv.js} +2970 -4450
  20. package/build/{cli-vckbhnyk.js → cli-b3d97zgc.js} +2 -2
  21. package/build/{cli-8rxa073f.js → cli-bc05qbss.js} +8 -6
  22. package/build/{cli-7tw4xfnw.js → cli-cdk877bx.js} +1 -1
  23. package/build/{cli-q24twygk.js → cli-dm0fc0bm.js} +1 -1
  24. package/build/{cli-barsn8br.js → cli-e1gmqsyh.js} +11 -5
  25. package/build/{cli-yz80qkzn.js → cli-ee3axgts.js} +7 -1
  26. package/build/{cli-f71s6kcw.js → cli-ex9r1x7c.js} +81 -215
  27. package/build/{cli-n2m2yy5b.js → cli-hc4w41as.js} +2105 -957
  28. package/build/{cli-gpnb45ck.js → cli-j54qa6tm.js} +7 -7
  29. package/build/{cli-j0n189ee.js → cli-j5p6jwm8.js} +2 -2
  30. package/build/{cli-wszshs5e.js → cli-k71t434r.js} +4 -4
  31. package/build/cli-knd276ed.js +1485 -0
  32. package/build/{cli-zm8tfpv7.js → cli-n36kxpcz.js} +62 -44
  33. package/build/{cli-bv2807tj.js → cli-n4cmzq79.js} +5 -3
  34. package/build/{cli-jyp2c6th.js → cli-nvqny4ej.js} +5 -3
  35. package/build/{cli-50906d27.js → cli-nw9ytp7z.js} +122 -43
  36. package/build/{cli-bnkgdywr.js → cli-ppj4c75j.js} +1 -1
  37. package/build/cli.js +546 -98
  38. package/build/{config-jzqjz606.js → config-7f07yemp.js} +20 -17
  39. package/build/{doctor-q3qws68e.js → doctor-gwvyn249.js} +11 -9
  40. package/build/{fastStrike-ebz1ph9a.js → fastStrike-zxsk2q40.js} +39 -16
  41. package/build/{fixes-86yebsj0.js → fixes-zqe8v8ye.js} +27 -22
  42. package/build/getMachineId-bsd-xj3bn2fv.js +36 -0
  43. package/build/getMachineId-darwin-07jzjcx6.js +36 -0
  44. package/build/getMachineId-linux-ahngynxd.js +29 -0
  45. package/build/getMachineId-unsupported-vy43b44z.js +19 -0
  46. package/build/getMachineId-win-8x66cynz.js +38 -0
  47. package/build/{index-32hn8rrw.js → index-4j14ssrg.js} +3 -3
  48. package/build/{index-gq9h8j5j.js → index-5wh7gq37.js} +135 -133
  49. package/build/{index-468j74f3.js → index-6s313ddp.js} +121 -97
  50. package/build/{index-e8c8zcrf.js → index-9j3pakz7.js} +32 -26
  51. package/build/{index-h2hj2hj9.js → index-cbwn03kz.js} +16 -16
  52. package/build/{index-8db1d2q3.js → index-cmvmnes1.js} +18 -18
  53. package/build/{index-tke6896d.js → index-psqjpw5m.js} +10 -10
  54. package/build/index-r4z6r7vf.js +12 -0
  55. package/build/{index-97vx1a24.js → index-rdqjtnp7.js} +2774 -2236
  56. package/build/{index-mr2cseg4.js → index-wddghhbd.js} +20 -19
  57. package/build/{issues-kh4wg8c5.js → issues-j7ybeaz9.js} +36 -28
  58. package/build/{logs-bj28xmbf.js → logs-qdceq54y.js} +27 -22
  59. package/build/{multipart-parser-6zd16497.js → multipart-parser-g2xxkezz.js} +2 -2
  60. package/build/{offesecAgent-8ky7gccp.js → offesecAgent-9tecezzm.js} +12 -11
  61. package/build/{parse-7djk9jyf.js → parse-rtccymzn.js} +3 -3
  62. package/build/pentest-qk82s64n.js +30 -0
  63. package/build/{pentests-62d6zw6p.js → pentests-97d3rwzr.js} +28 -23
  64. package/build/{targetedPentest-me4jnr3z.js → targetedPentest-g9x0g0zp.js} +15 -14
  65. package/build/{targets-e5k1mrky.js → targets-6m1cp1hx.js} +29 -24
  66. package/build/threatModel-a4gsw56r.js +29 -0
  67. package/build/{token-rdcbn380.js → token-3bbp59y6.js} +3 -3
  68. package/build/{token-util-sxb85ahn.js → token-util-6xjme11b.js} +2 -2
  69. package/build/{uninstall-jt1bca2p.js → uninstall-pkxkzt35.js} +7 -4
  70. package/build/{upload-krd8bnex.js → upload-w71jnkg0.js} +12 -11
  71. package/build/{utils-skmqhyfg.js → utils-846z7q2v.js} +18 -13
  72. package/package.json +8 -2
  73. package/build/agent-71z4e7jg.js +0 -19
  74. package/build/agent-ga5fecfs.js +0 -27
  75. package/build/authentication-hgs7ym0m.js +0 -19
  76. package/build/blackboxAgent-gem3mxa9.js +0 -19
  77. package/build/blackboxPentest-tgc2t3y6.js +0 -37
  78. package/build/index-ag14v3sg.js +0 -12
  79. package/build/main-3d7dfdvs.js +0 -324
  80. package/build/pentest-rs0181nf.js +0 -29
  81. package/build/threatModel-k4f3zgqd.js +0 -27
@@ -3,18 +3,21 @@ import {
3
3
  isSensitiveHeaderName,
4
4
  renderHeaderValue
5
5
  } from "./cli-e08r86zk.js";
6
+ import {
7
+ markCommandFailed
8
+ } from "./cli-7q3ae3ft.js";
6
9
  import {
7
10
  formatParseError,
8
11
  parseHeaderLine,
9
12
  parseHeadersFromFile
10
- } from "./cli-q24twygk.js";
13
+ } from "./cli-dm0fc0bm.js";
11
14
  import {
12
15
  config,
13
16
  init_config
14
- } from "./cli-f7hanqbw.js";
15
- import"./cli-eveg9djy.js";
16
- import"./cli-barsn8br.js";
17
- import"./cli-8rxa073f.js";
17
+ } from "./cli-9fds4ss0.js";
18
+ import"./cli-5tbg4dyb.js";
19
+ import"./cli-e1gmqsyh.js";
20
+ import"./cli-bc05qbss.js";
18
21
 
19
22
  // src/cli/config.ts
20
23
  init_config();
@@ -68,19 +71,19 @@ async function cmdAdd(args, allowOverwrite) {
68
71
  const value = args[0];
69
72
  if (!value) {
70
73
  console.error('Error: expected "Name: Value" argument');
71
- process.exit(1);
74
+ return markCommandFailed();
72
75
  }
73
76
  const parsed = parseHeaderLine(value);
74
77
  if (!parsed.ok) {
75
78
  console.error(`Invalid header:
76
79
  ${formatParseError(parsed.error)}`);
77
- process.exit(1);
80
+ return markCommandFailed();
78
81
  }
79
82
  const headers = await loadDefaults();
80
83
  const canonical = Object.keys(headers).find((k) => k.toLowerCase() === parsed.value.name.toLowerCase());
81
84
  if (canonical && !allowOverwrite) {
82
85
  console.error(`Header "${canonical}" already exists. Use \`pensar config headers set\` to overwrite.`);
83
- process.exit(1);
86
+ return markCommandFailed();
84
87
  }
85
88
  if (canonical && canonical !== parsed.value.name) {
86
89
  delete headers[canonical];
@@ -93,13 +96,13 @@ async function cmdRemove(args) {
93
96
  const name = args[0];
94
97
  if (!name) {
95
98
  console.error("Error: expected <Name> argument");
96
- process.exit(1);
99
+ return markCommandFailed();
97
100
  }
98
101
  const headers = await loadDefaults();
99
102
  const canonical = Object.keys(headers).find((k) => k.toLowerCase() === name.toLowerCase());
100
103
  if (!canonical) {
101
104
  console.error(`No default header named "${name}".`);
102
- process.exit(1);
105
+ return markCommandFailed();
103
106
  }
104
107
  delete headers[canonical];
105
108
  await saveDefaults(headers);
@@ -109,7 +112,7 @@ async function cmdClear(args) {
109
112
  const confirmed = args.includes("--yes") || args.includes("-y");
110
113
  if (!confirmed) {
111
114
  console.error("Refusing to clear without confirmation. Pass --yes to proceed.");
112
- process.exit(1);
115
+ return markCommandFailed();
113
116
  }
114
117
  await saveDefaults({});
115
118
  console.log("Cleared all default headers.");
@@ -118,7 +121,7 @@ async function cmdImport(args) {
118
121
  const file = args[0];
119
122
  if (!file) {
120
123
  console.error("Error: expected <file> argument");
121
- process.exit(1);
124
+ return markCommandFailed();
122
125
  }
123
126
  const parsed = await parseHeadersFromFile(file);
124
127
  if (!parsed.ok) {
@@ -126,7 +129,7 @@ async function cmdImport(args) {
126
129
  console.error(`Import error:
127
130
  ${formatParseError(err)}`);
128
131
  }
129
- process.exit(1);
132
+ return markCommandFailed();
130
133
  }
131
134
  const next = {};
132
135
  for (const entry of parsed.value) {
@@ -145,7 +148,7 @@ async function main() {
145
148
  if (sub !== "headers") {
146
149
  console.error(`Unknown 'pensar config' subcommand: ${sub}`);
147
150
  console.error("Only 'headers' is supported today.");
148
- process.exit(1);
151
+ return markCommandFailed();
149
152
  }
150
153
  const op = args[1];
151
154
  const rest = args.slice(2);
@@ -178,11 +181,11 @@ async function main() {
178
181
  default:
179
182
  console.error(`Unknown headers operation: ${op}`);
180
183
  showHelp();
181
- process.exit(1);
184
+ return markCommandFailed();
182
185
  }
183
186
  }
184
- main().catch((err) => {
187
+ await main().catch((err) => {
185
188
  console.error(`
186
189
  Error: ${err instanceof Error ? err.message : String(err)}`);
187
- process.exit(1);
190
+ return markCommandFailed();
188
191
  });
@@ -1,14 +1,15 @@
1
1
  import {
2
2
  toolExists
3
- } from "./cli-7tw4xfnw.js";
4
- import"./cli-zx8gk8xv.js";
5
- import"./cli-vckbhnyk.js";
6
- import"./cli-3k1x5rn3.js";
7
- import"./cli-gpnb45ck.js";
8
- import"./cli-f7hanqbw.js";
9
- import"./cli-eveg9djy.js";
10
- import"./cli-barsn8br.js";
11
- import"./cli-8rxa073f.js";
3
+ } from "./cli-cdk877bx.js";
4
+ import"./cli-51503njj.js";
5
+ import"./cli-b3d97zgc.js";
6
+ import"./cli-avmhkjtv.js";
7
+ import"./cli-j54qa6tm.js";
8
+ import"./cli-9fds4ss0.js";
9
+ import"./cli-5tbg4dyb.js";
10
+ import"./cli-e1gmqsyh.js";
11
+ import"./cli-knd276ed.js";
12
+ import"./cli-bc05qbss.js";
12
13
 
13
14
  // src/core/doctor.ts
14
15
  import { execSync, spawnSync } from "node:child_process";
@@ -50,6 +51,7 @@ function checkApiKeys() {
50
51
  { provider: "OpenAI", env: "OPENAI_API_KEY" },
51
52
  { provider: "Google", env: "GOOGLE_GENERATIVE_AI_API_KEY" },
52
53
  { provider: "OpenRouter", env: "OPENROUTER_API_KEY" },
54
+ { provider: "Concentrate", env: "CONCENTRATE_API_KEY" },
53
55
  { provider: "AWS Bedrock", env: "BEDROCK_API_KEY" },
54
56
  { provider: "AWS IAM", env: "AWS_ACCESS_KEY_ID" },
55
57
  { provider: "vLLM (local)", env: "LOCAL_MODEL_URL" }
@@ -4,29 +4,30 @@ import {
4
4
  buildPentestReport,
5
5
  renderJson,
6
6
  renderMarkdown
7
- } from "./cli-72b18z0n.js";
7
+ } from "./cli-8nj7pnew.js";
8
8
  import"./cli-9fsre5pt.js";
9
- import"./cli-jyp2c6th.js";
9
+ import"./cli-nvqny4ej.js";
10
10
  import {
11
11
  FindingsRegistry,
12
12
  OffensiveSecurityAgent
13
- } from "./cli-n2m2yy5b.js";
14
- import"./cli-7tw4xfnw.js";
13
+ } from "./cli-hc4w41as.js";
14
+ import"./cli-cdk877bx.js";
15
15
  import {
16
16
  createThreatModelPrompt
17
17
  } from "./cli-fw5r7pfj.js";
18
18
  import"./cli-c8131c4q.js";
19
- import"./cli-zx8gk8xv.js";
20
- import"./cli-vckbhnyk.js";
19
+ import"./cli-51503njj.js";
20
+ import"./cli-b3d97zgc.js";
21
21
  import {
22
22
  exports_external,
23
23
  init_zod
24
- } from "./cli-3k1x5rn3.js";
25
- import"./cli-gpnb45ck.js";
26
- import"./cli-f7hanqbw.js";
27
- import"./cli-eveg9djy.js";
28
- import"./cli-barsn8br.js";
29
- import"./cli-8rxa073f.js";
24
+ } from "./cli-avmhkjtv.js";
25
+ import"./cli-j54qa6tm.js";
26
+ import"./cli-9fds4ss0.js";
27
+ import"./cli-5tbg4dyb.js";
28
+ import"./cli-e1gmqsyh.js";
29
+ import"./cli-knd276ed.js";
30
+ import"./cli-bc05qbss.js";
30
31
 
31
32
  // src/core/workflows/fastStrike.ts
32
33
  init_zod();
@@ -42,14 +43,15 @@ Run this loop, tightly:
42
43
 
43
44
  1. OBSERVE — Read every response for signal before you act. Note the stack, headers, cookies, tokens, form fields, error messages, redirects, disabled controls, ID patterns. State what you just learned in one line before the next move.
44
45
  2. HYPOTHESIZE — From that signal and your deep knowledge of web/app vulnerability classes, name the single most likely vulnerability and why the evidence points to it. Rank leads by signal strength and go for the strongest first. A disabled form field, an ID in a URL or JWT, advertised demo creds, an exposed schema — these are tells; read them.
45
- 3. ACT — Test that one hypothesis with the minimum number of commands. Every tool call should exist to confirm or kill a specific hypothesis.
46
+ 3. ACT — Test that one hypothesis with the strongest available technique. Use direct tools for quick probes, but treat the shell as a working environment rather than merely a way to issue one-off commands. When the work becomes stateful, repetitive, concurrent, protocol-heavy, or multi-stage, externalize it into an editable script in the session scratchpad directory identified in the workspace instructions. Never create a scratchpad/ directory inside the target repository. Run the script, inspect the results, modify it, and rerun it as the attack develops.
46
47
  4. PRUNE — If the evidence disproves a lead, drop it and move to the next-strongest. Do NOT re-run a disproven approach or grind a dead end. Do NOT enumerate, brute-force, or run wordlists unless a specific signal demands it — choose techniques from evidence, not from a checklist.
47
- 5. EXPLOIT — When a vulnerability is confirmed, exploit it: capture the flag, extract the sensitive data, and pivot through it if the objective requires more. Multi-step objectives are yours to finish end to end — foothold, then privesc, then the goal.
48
- 6. DOCUMENT & FINISH — Record each confirmed vulnerability with the document_vulnerability tool as you go. When the objective is met (or every credible lead is exhausted), call the response tool with your result.
48
+ 5. EXPLOIT — When a vulnerability is confirmed, exploit it: capture the flag, extract the sensitive data, and pivot through it if the objective requires more. Preserve viable primitives and build on them. Prefer extending a working script into an end-to-end exploit over rebuilding the chain with repeated one-off tool calls or stopping at the next network or protocol boundary.
49
+ 6. DOCUMENT & FINISH — Record each confirmed vulnerability with the document_vulnerability tool as you go. Before concluding that every credible lead is exhausted, account for each viable primitive and pursue any concrete path that could still close the objective. After this check, whether the objective was met or every credible lead was genuinely exhausted, call the response tool with the correct solved value and a concise summary.
49
50
 
50
51
  Rules:
51
52
  - You are one operator. Plan in your head and in short text notes — never via planning tools, task lists, or sub-agents.
52
53
  - Recon and exploitation are the same loop. Do just enough recon to form the first hypothesis, then start testing. Do not map the entire surface before acting.
54
+ - Spend your reasoning on choosing techniques and interpreting evidence; use scripts for deterministic mechanics, iteration, and chain execution.
53
55
  - Bias toward the shortest path that proves impact. Speed comes from picking the right lead, not from skipping verification — always confirm a finding before you claim it.
54
56
  - Stay in scope. Only touch the target you were given and hosts it legitimately depends on.`;
55
57
  async function runFastStrike(input) {
@@ -62,6 +64,7 @@ async function runFastStrike(input) {
62
64
  abortSignal,
63
65
  eventBus,
64
66
  onStepFinish,
67
+ onCacheMetrics,
65
68
  enableThinking,
66
69
  openAIReasoningEffort,
67
70
  prompt,
@@ -118,10 +121,29 @@ ${combined}` : combined;
118
121
  abortSignal,
119
122
  eventBus,
120
123
  onStepFinish,
124
+ onCacheMetrics,
121
125
  enableThinking,
122
126
  openAIReasoningEffort
123
127
  });
124
- const strikeResult = await agent.consume();
128
+ eventBus?.emit("subagent-spawn", {
129
+ subagentId: "fast-strike",
130
+ name: "Fast Strike",
131
+ input: { target }
132
+ });
133
+ let strikeResult;
134
+ try {
135
+ strikeResult = await agent.consume();
136
+ eventBus?.emit("subagent-complete", {
137
+ subagentId: "fast-strike",
138
+ status: "completed"
139
+ });
140
+ } catch (e) {
141
+ eventBus?.emit("subagent-complete", {
142
+ subagentId: "fast-strike",
143
+ status: "failed"
144
+ });
145
+ throw e;
146
+ }
125
147
  if (abortSignal?.aborted) {
126
148
  throw new DOMException("Pentest aborted by user", "AbortError");
127
149
  }
@@ -152,5 +174,6 @@ ${combined}` : combined;
152
174
  };
153
175
  }
154
176
  export {
177
+ FAST_STRIKE_SYSTEM_PROMPT,
155
178
  runFastStrike
156
179
  };
@@ -1,29 +1,34 @@
1
1
  #!/usr/bin/env bun
2
+ import {
3
+ markCommandFailed
4
+ } from "./cli-7q3ae3ft.js";
2
5
  import {
3
6
  getFix,
4
7
  listFixes
5
- } from "./cli-f71s6kcw.js";
6
- import"./cli-zm8tfpv7.js";
7
- import"./cli-bv2807tj.js";
8
- import"./cli-72b18z0n.js";
9
- import"./cli-50906d27.js";
10
- import"./cli-zk1ch6qf.js";
11
- import"./cli-j0n189ee.js";
12
- import"./cli-baqhqbe5.js";
8
+ } from "./cli-ex9r1x7c.js";
9
+ import"./cli-9pbk8m32.js";
10
+ import"./cli-n36kxpcz.js";
11
+ import"./cli-7gcsfnw6.js";
12
+ import"./cli-n4cmzq79.js";
13
+ import"./cli-nw9ytp7z.js";
14
+ import"./cli-8nj7pnew.js";
15
+ import"./cli-4a1c4tkn.js";
16
+ import"./cli-j5p6jwm8.js";
13
17
  import"./cli-9fsre5pt.js";
14
- import"./cli-jyp2c6th.js";
15
- import"./cli-n2m2yy5b.js";
16
- import"./cli-7tw4xfnw.js";
18
+ import"./cli-nvqny4ej.js";
19
+ import"./cli-hc4w41as.js";
20
+ import"./cli-cdk877bx.js";
17
21
  import"./cli-fw5r7pfj.js";
18
22
  import"./cli-c8131c4q.js";
19
- import"./cli-zx8gk8xv.js";
20
- import"./cli-vckbhnyk.js";
21
- import"./cli-3k1x5rn3.js";
22
- import"./cli-gpnb45ck.js";
23
- import"./cli-f7hanqbw.js";
24
- import"./cli-eveg9djy.js";
25
- import"./cli-barsn8br.js";
26
- import"./cli-8rxa073f.js";
23
+ import"./cli-51503njj.js";
24
+ import"./cli-b3d97zgc.js";
25
+ import"./cli-avmhkjtv.js";
26
+ import"./cli-j54qa6tm.js";
27
+ import"./cli-9fds4ss0.js";
28
+ import"./cli-5tbg4dyb.js";
29
+ import"./cli-e1gmqsyh.js";
30
+ import"./cli-knd276ed.js";
31
+ import"./cli-bc05qbss.js";
27
32
 
28
33
  // src/cli/fixes.ts
29
34
  function showHelp() {
@@ -49,7 +54,7 @@ async function main() {
49
54
  if (!fixId) {
50
55
  console.error("Error: fix ID is required");
51
56
  console.error("Usage: pensar fixes get <fixId>");
52
- process.exit(1);
57
+ return markCommandFailed();
53
58
  }
54
59
  const fix = await getFix(fixId);
55
60
  console.log(JSON.stringify(fix, null, 2));
@@ -60,7 +65,7 @@ async function main() {
60
65
  } catch (err) {
61
66
  console.error(`
62
67
  Error: ${err instanceof Error ? err.message : String(err)}`);
63
- process.exit(1);
68
+ return markCommandFailed();
64
69
  }
65
70
  }
66
- main();
71
+ await main();
@@ -0,0 +1,36 @@
1
+ import {
2
+ require_execAsync
3
+ } from "./cli-53rm0rrz.js";
4
+ import {
5
+ require_src
6
+ } from "./cli-knd276ed.js";
7
+ import {
8
+ __commonJS,
9
+ __require
10
+ } from "./cli-bc05qbss.js";
11
+
12
+ // node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-bsd.js
13
+ var require_getMachineId_bsd = __commonJS(function(exports) {
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.getMachineId = undefined;
16
+ var fs_1 = __require("fs");
17
+ var execAsync_1 = require_execAsync();
18
+ var api_1 = require_src();
19
+ async function getMachineId() {
20
+ try {
21
+ const result = await fs_1.promises.readFile("/etc/hostid", { encoding: "utf8" });
22
+ return result.trim();
23
+ } catch (e) {
24
+ api_1.diag.debug(`error reading machine id: ${e}`);
25
+ }
26
+ try {
27
+ const result = await (0, execAsync_1.execAsync)("kenv -q smbios.system.uuid");
28
+ return result.stdout.trim();
29
+ } catch (e) {
30
+ api_1.diag.debug(`error reading machine id: ${e}`);
31
+ }
32
+ return;
33
+ }
34
+ exports.getMachineId = getMachineId;
35
+ });
36
+ export default require_getMachineId_bsd();
@@ -0,0 +1,36 @@
1
+ import {
2
+ require_execAsync
3
+ } from "./cli-53rm0rrz.js";
4
+ import {
5
+ require_src
6
+ } from "./cli-knd276ed.js";
7
+ import {
8
+ __commonJS
9
+ } from "./cli-bc05qbss.js";
10
+
11
+ // node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-darwin.js
12
+ var require_getMachineId_darwin = __commonJS(function(exports) {
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.getMachineId = undefined;
15
+ var execAsync_1 = require_execAsync();
16
+ var api_1 = require_src();
17
+ async function getMachineId() {
18
+ try {
19
+ const result = await (0, execAsync_1.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"');
20
+ const idLine = result.stdout.split(`
21
+ `).find((line) => line.includes("IOPlatformUUID"));
22
+ if (!idLine) {
23
+ return;
24
+ }
25
+ const parts = idLine.split('" = "');
26
+ if (parts.length === 2) {
27
+ return parts[1].slice(0, -1);
28
+ }
29
+ } catch (e) {
30
+ api_1.diag.debug(`error reading machine id: ${e}`);
31
+ }
32
+ return;
33
+ }
34
+ exports.getMachineId = getMachineId;
35
+ });
36
+ export default require_getMachineId_darwin();
@@ -0,0 +1,29 @@
1
+ import {
2
+ require_src
3
+ } from "./cli-knd276ed.js";
4
+ import {
5
+ __commonJS,
6
+ __require
7
+ } from "./cli-bc05qbss.js";
8
+
9
+ // node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-linux.js
10
+ var require_getMachineId_linux = __commonJS(function(exports) {
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.getMachineId = undefined;
13
+ var fs_1 = __require("fs");
14
+ var api_1 = require_src();
15
+ async function getMachineId() {
16
+ const paths = ["/etc/machine-id", "/var/lib/dbus/machine-id"];
17
+ for (const path of paths) {
18
+ try {
19
+ const result = await fs_1.promises.readFile(path, { encoding: "utf8" });
20
+ return result.trim();
21
+ } catch (e) {
22
+ api_1.diag.debug(`error reading machine id: ${e}`);
23
+ }
24
+ }
25
+ return;
26
+ }
27
+ exports.getMachineId = getMachineId;
28
+ });
29
+ export default require_getMachineId_linux();
@@ -0,0 +1,19 @@
1
+ import {
2
+ require_src
3
+ } from "./cli-knd276ed.js";
4
+ import {
5
+ __commonJS
6
+ } from "./cli-bc05qbss.js";
7
+
8
+ // node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-unsupported.js
9
+ var require_getMachineId_unsupported = __commonJS(function(exports) {
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.getMachineId = undefined;
12
+ var api_1 = require_src();
13
+ async function getMachineId() {
14
+ api_1.diag.debug("could not read machine-id: unsupported platform");
15
+ return;
16
+ }
17
+ exports.getMachineId = getMachineId;
18
+ });
19
+ export default require_getMachineId_unsupported();
@@ -0,0 +1,38 @@
1
+ import {
2
+ require_execAsync
3
+ } from "./cli-53rm0rrz.js";
4
+ import {
5
+ require_src
6
+ } from "./cli-knd276ed.js";
7
+ import {
8
+ __commonJS,
9
+ __require
10
+ } from "./cli-bc05qbss.js";
11
+
12
+ // node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-win.js
13
+ var require_getMachineId_win = __commonJS(function(exports) {
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.getMachineId = undefined;
16
+ var process = __require("process");
17
+ var execAsync_1 = require_execAsync();
18
+ var api_1 = require_src();
19
+ async function getMachineId() {
20
+ const args = "QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid";
21
+ let command = "%windir%\\System32\\REG.exe";
22
+ if (process.arch === "ia32" && "PROCESSOR_ARCHITEW6432" in process.env) {
23
+ command = "%windir%\\sysnative\\cmd.exe /c " + command;
24
+ }
25
+ try {
26
+ const result = await (0, execAsync_1.execAsync)(`${command} ${args}`);
27
+ const parts = result.stdout.split("REG_SZ");
28
+ if (parts.length === 2) {
29
+ return parts[1].trim();
30
+ }
31
+ } catch (e) {
32
+ api_1.diag.debug(`error reading machine id: ${e}`);
33
+ }
34
+ return;
35
+ }
36
+ exports.getMachineId = getMachineId;
37
+ });
38
+ export default require_getMachineId_win();
@@ -3,9 +3,9 @@ import {
3
3
  init,
4
4
  init_config,
5
5
  update
6
- } from "./cli-eveg9djy.js";
7
- import"./cli-barsn8br.js";
8
- import"./cli-8rxa073f.js";
6
+ } from "./cli-5tbg4dyb.js";
7
+ import"./cli-e1gmqsyh.js";
8
+ import"./cli-bc05qbss.js";
9
9
 
10
10
  // src/core/config/index.ts
11
11
  init_config();