@intuned/runtime 1.3.11 → 1.3.13

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.
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+
3
+ require("../dist/common/binStartupScript.js");
4
+ require("../dist/commands/get-headless-user-agent.js");
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ var _commander = require("commander");
4
+ var _dotenv = _interopRequireDefault(require("dotenv"));
5
+ var _launchBrowser = require("../common/launchBrowser");
6
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
7
+ _dotenv.default.config();
8
+ _commander.program.description("get headless user agent").action(async () => {
9
+ try {
10
+ console.log(await (0, _launchBrowser.getHeadlessUserAgent)({
11
+ executablePath: await (0, _launchBrowser.getBrowserExecutablePath)()
12
+ }));
13
+ } catch (error) {
14
+ console.error("Error getting headless user agent:", error);
15
+ process.exit(1);
16
+ }
17
+ });
18
+ _commander.program.parse(process.argv);
@@ -16,9 +16,9 @@ export declare function executeRunCreateAuthSessionCLI({ id, input, checkRetries
16
16
  metadata?: AuthSessionMetadata;
17
17
  } & BaseCommandOptions): Promise<{
18
18
  cookies: {
19
+ path: string;
19
20
  value: string;
20
21
  name: string;
21
- path: string;
22
22
  domain: string;
23
23
  expires: number;
24
24
  httpOnly: boolean;
@@ -33,11 +33,11 @@ export declare function executeRunCreateAuthSessionCLI({ id, input, checkRetries
33
33
  }[];
34
34
  }[];
35
35
  sessionStorage?: {
36
+ origin: string;
36
37
  sessionStorage: {
37
38
  value: string;
38
39
  name: string;
39
40
  }[];
40
- origin: string;
41
41
  }[] | undefined;
42
42
  }>;
43
43
  export declare function executeRunUpdateAuthSessionCLI({ id, input, checkRetries, createRetries, ...rest }: {
@@ -47,9 +47,9 @@ export declare function executeRunUpdateAuthSessionCLI({ id, input, checkRetries
47
47
  createRetries: number;
48
48
  } & BaseCommandOptions): Promise<{
49
49
  cookies: {
50
+ path: string;
50
51
  value: string;
51
52
  name: string;
52
- path: string;
53
53
  domain: string;
54
54
  expires: number;
55
55
  httpOnly: boolean;
@@ -64,11 +64,11 @@ export declare function executeRunUpdateAuthSessionCLI({ id, input, checkRetries
64
64
  }[];
65
65
  }[];
66
66
  sessionStorage?: {
67
+ origin: string;
67
68
  sessionStorage: {
68
69
  value: string;
69
70
  name: string;
70
71
  }[];
71
- origin: string;
72
72
  }[] | undefined;
73
73
  }>;
74
74
  export declare function executeAttemptCreateAuthSessionCLI({ id, input, ...rest }: {
@@ -76,9 +76,9 @@ export declare function executeAttemptCreateAuthSessionCLI({ id, input, ...rest
76
76
  input: any;
77
77
  } & BaseCommandOptions): Promise<{
78
78
  cookies: {
79
+ path: string;
79
80
  value: string;
80
81
  name: string;
81
- path: string;
82
82
  domain: string;
83
83
  expires: number;
84
84
  httpOnly: boolean;
@@ -93,20 +93,20 @@ export declare function executeAttemptCreateAuthSessionCLI({ id, input, ...rest
93
93
  }[];
94
94
  }[];
95
95
  sessionStorage?: {
96
+ origin: string;
96
97
  sessionStorage: {
97
98
  value: string;
98
99
  name: string;
99
100
  }[];
100
- origin: string;
101
101
  }[] | undefined;
102
102
  }>;
103
103
  export declare function executeAttemptCheckAuthSessionCLI({ id, ...rest }: {
104
104
  id: string;
105
105
  } & BaseCommandOptions): Promise<{
106
106
  cookies: {
107
+ path: string;
107
108
  value: string;
108
109
  name: string;
109
- path: string;
110
110
  domain: string;
111
111
  expires: number;
112
112
  httpOnly: boolean;
@@ -121,11 +121,11 @@ export declare function executeAttemptCheckAuthSessionCLI({ id, ...rest }: {
121
121
  }[];
122
122
  }[];
123
123
  sessionStorage?: {
124
+ origin: string;
124
125
  sessionStorage: {
125
126
  value: string;
126
127
  name: string;
127
128
  }[];
128
- origin: string;
129
129
  }[] | undefined;
130
130
  }>;
131
131
  declare function runCheck({ auth, proxy, headless, timeout, traceId, keepBrowserOpen, cdpUrl, }: {
@@ -138,9 +138,9 @@ declare function runCreate({ authSessionInput, proxy, headless, timeout, traceId
138
138
  traceId?: string;
139
139
  } & Omit<BaseCommandOptions, "trace">): Promise<{
140
140
  cookies: {
141
+ path: string;
141
142
  value: string;
142
143
  name: string;
143
- path: string;
144
144
  domain: string;
145
145
  expires: number;
146
146
  httpOnly: boolean;
@@ -155,11 +155,11 @@ declare function runCreate({ authSessionInput, proxy, headless, timeout, traceId
155
155
  }[];
156
156
  }[];
157
157
  sessionStorage?: {
158
+ origin: string;
158
159
  sessionStorage: {
159
160
  value: string;
160
161
  name: string;
161
162
  }[];
162
- origin: string;
163
163
  }[] | undefined;
164
164
  }>;
165
165
  export declare const _runCreate: typeof runCreate;
@@ -175,9 +175,9 @@ declare function runCreateWithRetries({ authSessionId, authSessionInput, retries
175
175
  metadata?: AuthSessionMetadata;
176
176
  } & BaseCommandOptions): Promise<{
177
177
  cookies: {
178
+ path: string;
178
179
  value: string;
179
180
  name: string;
180
- path: string;
181
181
  domain: string;
182
182
  expires: number;
183
183
  httpOnly: boolean;
@@ -192,11 +192,11 @@ declare function runCreateWithRetries({ authSessionId, authSessionInput, retries
192
192
  }[];
193
193
  }[];
194
194
  sessionStorage?: {
195
+ origin: string;
195
196
  sessionStorage: {
196
197
  value: string;
197
198
  name: string;
198
199
  }[];
199
- origin: string;
200
200
  }[] | undefined;
201
201
  }>;
202
202
  export declare const _runCreateWithRetries: typeof runCreateWithRetries;
@@ -6,9 +6,9 @@ export declare function assertAuthConsistent(authSession: string | undefined): P
6
6
  export declare function loadAuthSessionInstance(authSessionId: string): Promise<{
7
7
  storageState: {
8
8
  cookies: {
9
+ path: string;
9
10
  value: string;
10
11
  name: string;
11
- path: string;
12
12
  domain: string;
13
13
  expires: number;
14
14
  httpOnly: boolean;
@@ -23,11 +23,11 @@ export declare function loadAuthSessionInstance(authSessionId: string): Promise<
23
23
  }[];
24
24
  }[];
25
25
  sessionStorage?: {
26
+ origin: string;
26
27
  sessionStorage: {
27
28
  value: string;
28
29
  name: string;
29
30
  }[];
30
- origin: string;
31
31
  }[] | undefined;
32
32
  };
33
33
  metadata: AuthSessionMetadata;
@@ -1,4 +1,4 @@
1
- import { RunAutomationError } from "../../../common/runApi";
1
+ import { RunAutomationError } from "../../../common/runApi/errors";
2
2
  export declare class CLIError extends Error {
3
3
  autoColor: boolean;
4
4
  constructor(message: string, options?: {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.CLIError = exports.CLIAssertionError = exports.AbortedCLIError = void 0;
7
7
  exports.logAutomationError = logAutomationError;
8
- var _runApi = require("../../../common/runApi");
8
+ var _errors = require("../../../common/runApi/errors");
9
9
  var _terminal = require("./terminal");
10
10
  class CLIError extends Error {
11
11
  constructor(message, options) {
@@ -31,7 +31,7 @@ class CLIAssertionError extends CLIError {
31
31
  exports.CLIAssertionError = CLIAssertionError;
32
32
  function logAutomationError(error) {
33
33
  (0, _terminal.terminal)(`^r^+An error occurred while running the API:^:\n`);
34
- if (error instanceof _runApi.AutomationError) {
34
+ if (error instanceof _errors.AutomationError) {
35
35
  if (error.error.stack) {
36
36
  const stackLines = error.error.stack.split("\n").filter(line => !line.includes("@intuned/runtime") && !line.includes("node:"));
37
37
  (0, _terminal.terminal)(`^r${stackLines.join("\n")}^:\n`);
@@ -1,139 +1,4 @@
1
- import { z } from "zod";
2
- export declare const intunedJsonSchema: z.ZodIntersection<z.ZodObject<{
3
- projectName: z.ZodOptional<z.ZodString>;
4
- workspaceId: z.ZodOptional<z.ZodString>;
5
- metadata: z.ZodCatch<z.ZodOptional<z.ZodObject<{
6
- defaultJobInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
7
- defaultRunPlaygroundInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
8
- testAuthSessionInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
9
- }, "strip", z.ZodTypeAny, {
10
- defaultJobInput?: Record<string, any> | undefined;
11
- defaultRunPlaygroundInput?: Record<string, any> | undefined;
12
- testAuthSessionInput?: Record<string, any> | undefined;
13
- }, {
14
- defaultJobInput?: unknown;
15
- defaultRunPlaygroundInput?: unknown;
16
- testAuthSessionInput?: unknown;
17
- }>>>;
18
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
19
- projectName: z.ZodOptional<z.ZodString>;
20
- workspaceId: z.ZodOptional<z.ZodString>;
21
- metadata: z.ZodCatch<z.ZodOptional<z.ZodObject<{
22
- defaultJobInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
23
- defaultRunPlaygroundInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
24
- testAuthSessionInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
25
- }, "strip", z.ZodTypeAny, {
26
- defaultJobInput?: Record<string, any> | undefined;
27
- defaultRunPlaygroundInput?: Record<string, any> | undefined;
28
- testAuthSessionInput?: Record<string, any> | undefined;
29
- }, {
30
- defaultJobInput?: unknown;
31
- defaultRunPlaygroundInput?: unknown;
32
- testAuthSessionInput?: unknown;
33
- }>>>;
34
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
35
- projectName: z.ZodOptional<z.ZodString>;
36
- workspaceId: z.ZodOptional<z.ZodString>;
37
- metadata: z.ZodCatch<z.ZodOptional<z.ZodObject<{
38
- defaultJobInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
39
- defaultRunPlaygroundInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
40
- testAuthSessionInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
41
- }, "strip", z.ZodTypeAny, {
42
- defaultJobInput?: Record<string, any> | undefined;
43
- defaultRunPlaygroundInput?: Record<string, any> | undefined;
44
- testAuthSessionInput?: Record<string, any> | undefined;
45
- }, {
46
- defaultJobInput?: unknown;
47
- defaultRunPlaygroundInput?: unknown;
48
- testAuthSessionInput?: unknown;
49
- }>>>;
50
- }, z.ZodTypeAny, "passthrough">>, z.ZodUnion<[z.ZodObject<{
51
- authSessions: z.ZodObject<{
52
- enabled: z.ZodLiteral<false>;
53
- }, "strip", z.ZodTypeAny, {
54
- enabled: false;
55
- }, {
56
- enabled: false;
57
- }>;
58
- apiAccess: z.ZodObject<{
59
- enabled: z.ZodLiteral<false>;
60
- }, "strip", z.ZodTypeAny, {
61
- enabled: false;
62
- }, {
63
- enabled: false;
64
- }>;
65
- }, "strip", z.ZodTypeAny, {
66
- authSessions: {
67
- enabled: false;
68
- };
69
- apiAccess: {
70
- enabled: false;
71
- };
72
- }, {
73
- authSessions: {
74
- enabled: false;
75
- };
76
- apiAccess: {
77
- enabled: false;
78
- };
79
- }>, z.ZodObject<{
80
- authSessions: z.ZodUnion<[z.ZodObject<{
81
- enabled: z.ZodLiteral<false>;
82
- }, "strip", z.ZodTypeAny, {
83
- enabled: false;
84
- }, {
85
- enabled: false;
86
- }>, z.ZodObject<{
87
- enabled: z.ZodLiteral<true>;
88
- type: z.ZodEnum<["MANUAL", "API"]>;
89
- startUrl: z.ZodOptional<z.ZodString>;
90
- finishUrl: z.ZodOptional<z.ZodString>;
91
- }, "strip", z.ZodTypeAny, {
92
- type: "API" | "MANUAL";
93
- enabled: true;
94
- startUrl?: string | undefined;
95
- finishUrl?: string | undefined;
96
- }, {
97
- type: "API" | "MANUAL";
98
- enabled: true;
99
- startUrl?: string | undefined;
100
- finishUrl?: string | undefined;
101
- }>]>;
102
- apiAccess: z.ZodObject<{
103
- enabled: z.ZodLiteral<true>;
104
- }, "strip", z.ZodTypeAny, {
105
- enabled: true;
106
- }, {
107
- enabled: true;
108
- }>;
109
- }, "strip", z.ZodTypeAny, {
110
- authSessions: {
111
- enabled: false;
112
- } | {
113
- type: "API" | "MANUAL";
114
- enabled: true;
115
- startUrl?: string | undefined;
116
- finishUrl?: string | undefined;
117
- };
118
- apiAccess: {
119
- enabled: true;
120
- };
121
- }, {
122
- authSessions: {
123
- enabled: false;
124
- } | {
125
- type: "API" | "MANUAL";
126
- enabled: true;
127
- startUrl?: string | undefined;
128
- finishUrl?: string | undefined;
129
- };
130
- apiAccess: {
131
- enabled: true;
132
- };
133
- }>]>>;
134
- export type IntunedJson = z.infer<typeof intunedJsonSchema>;
135
- export declare const intunedSettingsFileNames: readonly ["Intuned.json", "Intuned.jsonc", "Intuned.yaml", "Intuned.yml", "Intuned.toml"];
136
- export declare function loadIntunedJson(): Promise<{
1
+ export declare const loadIntunedJson: () => Promise<{
137
2
  projectName?: string | undefined;
138
3
  workspaceId?: string | undefined;
139
4
  metadata?: {
@@ -141,6 +6,9 @@ export declare function loadIntunedJson(): Promise<{
141
6
  defaultRunPlaygroundInput?: Record<string, any> | undefined;
142
7
  testAuthSessionInput?: Record<string, any> | undefined;
143
8
  } | undefined;
9
+ stealthMode?: {
10
+ enabled: boolean;
11
+ } | undefined;
144
12
  } & {
145
13
  [k: string]: unknown;
146
14
  } & ({
@@ -163,9 +31,9 @@ export declare function loadIntunedJson(): Promise<{
163
31
  enabled: true;
164
32
  };
165
33
  })>;
166
- export declare function getIntunedSettingsFile(): Promise<{
167
- name: typeof intunedSettingsFileNames[number];
34
+ export declare const getIntunedSettingsFile: () => Promise<{
35
+ name: "Intuned.json" | "Intuned.jsonc" | "Intuned.yaml" | "Intuned.yml" | "Intuned.toml";
168
36
  path: string;
169
37
  parse: (content: string) => any;
170
38
  }>;
171
- export declare function getIntunedSettingsFileName(): Promise<string>;
39
+ export declare const getIntunedSettingsFileName: () => Promise<"Intuned.json" | "Intuned.jsonc" | "Intuned.yaml" | "Intuned.yml" | "Intuned.toml">;
@@ -3,85 +3,18 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getIntunedSettingsFile = getIntunedSettingsFile;
7
- exports.getIntunedSettingsFileName = getIntunedSettingsFileName;
8
- exports.intunedSettingsFileNames = exports.intunedJsonSchema = void 0;
9
- exports.loadIntunedJson = loadIntunedJson;
10
- var _path = _interopRequireDefault(require("path"));
11
- var fs = _interopRequireWildcard(require("fs-extra"));
12
- var _zod = require("zod");
6
+ exports.loadIntunedJson = exports.getIntunedSettingsFileName = exports.getIntunedSettingsFile = void 0;
13
7
  var _errors = require("./errors");
14
- var JSONC = _interopRequireWildcard(require("jsonc-parser"));
15
- var YAML = _interopRequireWildcard(require("yaml"));
16
- var TOML = _interopRequireWildcard(require("smol-toml"));
17
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
18
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
20
- const intunedJsonSchema = exports.intunedJsonSchema = _zod.z.object({
21
- projectName: _zod.z.string().optional(),
22
- workspaceId: _zod.z.string().optional(),
23
- metadata: _zod.z.object({
24
- defaultJobInput: _zod.z.record(_zod.z.any()).optional().catch(undefined),
25
- defaultRunPlaygroundInput: _zod.z.record(_zod.z.any()).optional().catch(undefined),
26
- testAuthSessionInput: _zod.z.record(_zod.z.any()).optional().catch(undefined)
27
- }).optional().catch(undefined)
28
- }).passthrough().and(_zod.z.union([_zod.z.object({
29
- authSessions: _zod.z.object({
30
- enabled: _zod.z.literal(false)
31
- }),
32
- apiAccess: _zod.z.object({
33
- enabled: _zod.z.literal(false)
34
- })
35
- }), _zod.z.object({
36
- authSessions: _zod.z.union([_zod.z.object({
37
- enabled: _zod.z.literal(false)
38
- }), _zod.z.object({
39
- enabled: _zod.z.literal(true),
40
- type: _zod.z.enum(["MANUAL", "API"]),
41
- startUrl: _zod.z.string().optional(),
42
- finishUrl: _zod.z.string().optional()
43
- })]),
44
- apiAccess: _zod.z.object({
45
- enabled: _zod.z.literal(true)
46
- })
47
- })]));
48
- const intunedSettingsFileNames = exports.intunedSettingsFileNames = ["Intuned.json", "Intuned.jsonc", "Intuned.yaml", "Intuned.yml", "Intuned.toml"];
49
- async function loadIntunedJson() {
50
- const settingsFile = await getIntunedSettingsFile();
51
- const intunedJsonContent = await fs.readFile(settingsFile.path, "utf-8");
52
- let intunedJson;
53
- try {
54
- intunedJson = settingsFile.parse(intunedJsonContent);
55
- } catch (e) {
56
- throw new _errors.CLIError(`Failed to parse ${settingsFile.name}: ${e.message}`);
57
- }
58
- const parseResult = intunedJsonSchema.safeParse(intunedJson);
59
- if (!parseResult.success) {
60
- const formattedError = parseResult.error.errors.map(e => `- ${e.path.join(".")}: ${e.message}`).join("\n");
61
- throw new _errors.CLIError(`${settingsFile.name} is not valid:\n${formattedError}\nPlease fix the errors and try again.`);
62
- }
63
- return parseResult.data;
64
- }
65
- const intunedSettingsParsers = {
66
- "Intuned.json": JSON.parse,
67
- "Intuned.jsonc": JSONC.parse,
68
- "Intuned.yaml": YAML.parse,
69
- "Intuned.yml": YAML.parse,
70
- "Intuned.toml": TOML.parse
71
- };
72
- async function getIntunedSettingsFile() {
73
- for (const fileName of intunedSettingsFileNames) {
74
- const filePath = _path.default.join(process.cwd(), fileName);
75
- if (await fs.exists(filePath)) {
76
- return {
77
- name: fileName,
78
- path: filePath,
79
- parse: intunedSettingsParsers[fileName]
80
- };
8
+ var _intunedJson = require("../../../common/intunedJson");
9
+ function unwrapped(fn) {
10
+ return async (...args) => {
11
+ const result = await fn(...args);
12
+ if (result.isErr()) {
13
+ throw new _errors.CLIError(result.error);
81
14
  }
82
- }
83
- throw new _errors.CLIError(`No Intuned settings file found.`);
15
+ return result.value;
16
+ };
84
17
  }
85
- async function getIntunedSettingsFileName() {
86
- return (await getIntunedSettingsFile()).name;
87
- }
18
+ const loadIntunedJson = exports.loadIntunedJson = unwrapped(_intunedJson.loadIntunedJson);
19
+ const getIntunedSettingsFile = exports.getIntunedSettingsFile = unwrapped(_intunedJson.getIntunedSettingsFile);
20
+ const getIntunedSettingsFileName = exports.getIntunedSettingsFileName = unwrapped(_intunedJson.getIntunedSettingsFileName);
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  var _dotenv = _interopRequireDefault(require("dotenv"));
4
- var fs = _interopRequireWildcard(require("fs"));
5
4
  var path = _interopRequireWildcard(require("path"));
5
+ var _intunedJson = require("./intunedJson");
6
6
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
7
7
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -11,10 +11,13 @@ _dotenv.default.config({
11
11
  });
12
12
  function isStealthModeEnabled() {
13
13
  try {
14
- const intunedConfigPath = path.resolve(process.cwd(), process.env.ROOT || "./", "Intuned.json");
15
- const configContent = fs.readFileSync(intunedConfigPath, "utf8");
16
- const config = JSON.parse(configContent);
17
- return config.stealthMode?.enabled === true;
14
+ const settingsResult = (0, _intunedJson.loadIntunedJsonSync)();
15
+ if (settingsResult.isErr()) {
16
+ console.error(`Warning: Failed to load Intuned settings: ${settingsResult.error}
17
+ Stealth mode will not be enabled.`);
18
+ return false;
19
+ }
20
+ return settingsResult.value.stealthMode?.enabled === true;
18
21
  } catch (error) {
19
22
  console.error("Error reading Intuned.json:", error.message);
20
23
  return false;
@@ -8,3 +8,5 @@ export declare const API_KEY_ENV_VAR_KEY = "INTUNED_API_KEY";
8
8
  export declare const API_KEY_HEADER_NAME = "x-api-key";
9
9
  export declare const API_BASE_URL_ENV_VAR_KEY = "INTUNED_API_BASE_URL";
10
10
  export declare const CLI_ENV_VAR_KEY = "INTUNED_CLI";
11
+ export declare const INTUNED_AI_GATEWAY_BASE_URL_ENV_VAR = "INTUNED_AI_GATEWAY_BASE_URL";
12
+ export declare const INTUNED_AI_GATEWAY_API_KEY_ENV_VAR = "INTUNED_AI_GATEWAY_API_KEY";
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.WORKSPACE_ID_ENV_VAR_KEY = exports.PROJECT_ID_ENV_VAR_KEY = exports.EXTENSION_PATH_ENV_VAR_KEY = exports.CLI_ENV_VAR_KEY = exports.AUTH_SESSIONS_INSTANCES_FOLDER_NAME = exports.AUTH_SESSIONS_FOLDER_NAME = exports.API_KEY_HEADER_NAME = exports.API_KEY_ENV_VAR_KEY = exports.API_FOLDER_NAME = exports.API_BASE_URL_ENV_VAR_KEY = void 0;
6
+ exports.WORKSPACE_ID_ENV_VAR_KEY = exports.PROJECT_ID_ENV_VAR_KEY = exports.INTUNED_AI_GATEWAY_BASE_URL_ENV_VAR = exports.INTUNED_AI_GATEWAY_API_KEY_ENV_VAR = exports.EXTENSION_PATH_ENV_VAR_KEY = exports.CLI_ENV_VAR_KEY = exports.AUTH_SESSIONS_INSTANCES_FOLDER_NAME = exports.AUTH_SESSIONS_FOLDER_NAME = exports.API_KEY_HEADER_NAME = exports.API_KEY_ENV_VAR_KEY = exports.API_FOLDER_NAME = exports.API_BASE_URL_ENV_VAR_KEY = void 0;
7
7
  const API_FOLDER_NAME = exports.API_FOLDER_NAME = "api";
8
8
  const AUTH_SESSIONS_FOLDER_NAME = exports.AUTH_SESSIONS_FOLDER_NAME = "auth-sessions";
9
9
  const AUTH_SESSIONS_INSTANCES_FOLDER_NAME = exports.AUTH_SESSIONS_INSTANCES_FOLDER_NAME = "auth-sessions-instances";
@@ -13,4 +13,6 @@ const PROJECT_ID_ENV_VAR_KEY = exports.PROJECT_ID_ENV_VAR_KEY = "INTUNED_PROJECT
13
13
  const API_KEY_ENV_VAR_KEY = exports.API_KEY_ENV_VAR_KEY = "INTUNED_API_KEY";
14
14
  const API_KEY_HEADER_NAME = exports.API_KEY_HEADER_NAME = "x-api-key";
15
15
  const API_BASE_URL_ENV_VAR_KEY = exports.API_BASE_URL_ENV_VAR_KEY = "INTUNED_API_BASE_URL";
16
- const CLI_ENV_VAR_KEY = exports.CLI_ENV_VAR_KEY = "INTUNED_CLI";
16
+ const CLI_ENV_VAR_KEY = exports.CLI_ENV_VAR_KEY = "INTUNED_CLI";
17
+ const INTUNED_AI_GATEWAY_BASE_URL_ENV_VAR = exports.INTUNED_AI_GATEWAY_BASE_URL_ENV_VAR = "INTUNED_AI_GATEWAY_BASE_URL";
18
+ const INTUNED_AI_GATEWAY_API_KEY_ENV_VAR = exports.INTUNED_AI_GATEWAY_API_KEY_ENV_VAR = "INTUNED_AI_GATEWAY_API_KEY";