@moda-ai/cli 1.31.1 → 1.32.0
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 +87 -13
- package/dist/cli-bh8gxmm8.js +187022 -0
- package/dist/{cli-59yacef3.js → cli-drabjmaj.js} +90 -63
- package/dist/{cli-pq6rte0w.js → cli-scjxgaba.js} +2 -2
- package/dist/cli-w22qhyk4.js +8524 -0
- package/dist/{cli-9xw5bq1j.js → cli-yz99t7n8.js} +1 -1
- package/dist/cli.js +20 -14
- package/dist/harness-4s8pybt1.js +91 -0
- package/dist/{harness-github-actions-kbw4z7q4.js → harness-github-actions-53mhczg2.js} +2 -2
- package/dist/{index-4enh6fq6.js → index-tbrrfhhf.js} +14 -6
- package/dist/{provision-r0cq3g2v.js → provision-d242y9qd.js} +3 -3
- package/package.json +3 -1
- package/skills/integration/index.json +2 -2
- package/skills/integration/integration-cloudflare-think/SKILL.md +25 -22
- package/dist/cli-j3rr0nh7.js +0 -2972
- package/dist/cli-p3271yp2.js +0 -7789
|
@@ -1,64 +1,36 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
function __accessProp(key) {
|
|
8
|
+
return this[key];
|
|
9
|
+
}
|
|
10
|
+
var __toESMCache_node;
|
|
11
|
+
var __toESMCache_esm;
|
|
12
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
13
|
+
var canCache = mod != null && typeof mod === "object";
|
|
14
|
+
if (canCache) {
|
|
15
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
16
|
+
var cached = cache.get(mod);
|
|
17
|
+
if (cached)
|
|
18
|
+
return cached;
|
|
11
19
|
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
super(message);
|
|
27
|
-
this.input_request = input_request;
|
|
28
|
-
this.name = "CliInputRequiredError";
|
|
29
|
-
if (usage)
|
|
30
|
-
this.usage = usage;
|
|
31
|
-
}
|
|
32
|
-
usage;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
class CliAuthError extends Error {
|
|
36
|
-
auth;
|
|
37
|
-
constructor(message, auth, usage) {
|
|
38
|
-
super(message);
|
|
39
|
-
this.auth = auth;
|
|
40
|
-
this.name = "CliAuthError";
|
|
41
|
-
if (usage)
|
|
42
|
-
this.usage = usage;
|
|
43
|
-
}
|
|
44
|
-
usage;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
class CliCancellationError extends Error {
|
|
48
|
-
constructor(message) {
|
|
49
|
-
super(message);
|
|
50
|
-
this.name = "CliCancellationError";
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function isNetworkLikeError(error) {
|
|
54
|
-
return error instanceof Error && (error.message.startsWith("Network error:") || error.message.startsWith("Request timed out") || error.name === "AbortError" || /(?:ECONNRESET|ECONNREFUSED|ETIMEDOUT|ENOTFOUND|socket hang up)/i.test(error.message));
|
|
55
|
-
}
|
|
56
|
-
function isApiLikeError(error) {
|
|
57
|
-
return error instanceof Error && (error.name === "ApiError" || ("statusCode" in error) && typeof error.statusCode === "number");
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// src/config.ts
|
|
61
|
-
import { readFileSync as readFileSync2 } from "node:fs";
|
|
20
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
|
+
for (let key of __getOwnPropNames(mod))
|
|
23
|
+
if (!__hasOwnProp.call(to, key))
|
|
24
|
+
__defProp(to, key, {
|
|
25
|
+
get: __accessProp.bind(mod, key),
|
|
26
|
+
enumerable: true
|
|
27
|
+
});
|
|
28
|
+
if (canCache)
|
|
29
|
+
cache.set(mod, to);
|
|
30
|
+
return to;
|
|
31
|
+
};
|
|
32
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
33
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
62
34
|
|
|
63
35
|
// src/profiles.ts
|
|
64
36
|
import {
|
|
@@ -566,7 +538,64 @@ function writeSecretJsonFile(path, value) {
|
|
|
566
538
|
} catch {}
|
|
567
539
|
}
|
|
568
540
|
|
|
541
|
+
// src/errors.ts
|
|
542
|
+
class CliInputError extends Error {
|
|
543
|
+
usage;
|
|
544
|
+
constructor(message, usage) {
|
|
545
|
+
super(message);
|
|
546
|
+
this.usage = usage;
|
|
547
|
+
this.name = "CliInputError";
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
class CliAccessError extends Error {
|
|
552
|
+
guidance;
|
|
553
|
+
constructor(message, options = {}) {
|
|
554
|
+
super(message);
|
|
555
|
+
this.name = "CliAccessError";
|
|
556
|
+
this.guidance = options.guidance;
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
class CliInputRequiredError extends Error {
|
|
561
|
+
input_request;
|
|
562
|
+
constructor(message, input_request, usage) {
|
|
563
|
+
super(message);
|
|
564
|
+
this.input_request = input_request;
|
|
565
|
+
this.name = "CliInputRequiredError";
|
|
566
|
+
if (usage)
|
|
567
|
+
this.usage = usage;
|
|
568
|
+
}
|
|
569
|
+
usage;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
class CliAuthError extends Error {
|
|
573
|
+
auth;
|
|
574
|
+
constructor(message, auth, usage) {
|
|
575
|
+
super(message);
|
|
576
|
+
this.auth = auth;
|
|
577
|
+
this.name = "CliAuthError";
|
|
578
|
+
if (usage)
|
|
579
|
+
this.usage = usage;
|
|
580
|
+
}
|
|
581
|
+
usage;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
class CliCancellationError extends Error {
|
|
585
|
+
constructor(message) {
|
|
586
|
+
super(message);
|
|
587
|
+
this.name = "CliCancellationError";
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
function isNetworkLikeError(error) {
|
|
591
|
+
return error instanceof Error && (error.message.startsWith("Network error:") || error.message.startsWith("Request timed out") || error.name === "AbortError" || /(?:ECONNRESET|ECONNREFUSED|ETIMEDOUT|ENOTFOUND|socket hang up)/i.test(error.message));
|
|
592
|
+
}
|
|
593
|
+
function isApiLikeError(error) {
|
|
594
|
+
return error instanceof Error && (error.name === "ApiError" || ("statusCode" in error) && typeof error.statusCode === "number");
|
|
595
|
+
}
|
|
596
|
+
|
|
569
597
|
// src/config.ts
|
|
598
|
+
import { readFileSync as readFileSync2 } from "node:fs";
|
|
570
599
|
var pkg = JSON.parse(readFileSync2(new URL("../package.json", import.meta.url), "utf8"));
|
|
571
600
|
var VERSION = pkg.version;
|
|
572
601
|
var MODA_BASE_URL = resolveBaseUrl();
|
|
@@ -619,9 +648,6 @@ function validateConfig() {
|
|
|
619
648
|
}
|
|
620
649
|
}
|
|
621
650
|
|
|
622
|
-
// src/output.ts
|
|
623
|
-
import { randomUUID } from "node:crypto";
|
|
624
|
-
|
|
625
651
|
// ../../packages/harness-snapshot/src/policy.ts
|
|
626
652
|
var MAX_SCANNED_FILE_BYTES = 512 * 1024;
|
|
627
653
|
var DEFAULT_MAX_INVENTORY_FILES = 12000;
|
|
@@ -962,6 +988,7 @@ function packSnapshot(inputs, opts) {
|
|
|
962
988
|
};
|
|
963
989
|
}
|
|
964
990
|
// src/output.ts
|
|
991
|
+
import { randomUUID } from "node:crypto";
|
|
965
992
|
var AGENT_SCHEMA_VERSION = "moda.agent.v1";
|
|
966
993
|
var AGENT_EVENT_SCHEMA_VERSION = "moda.agent_event.v1";
|
|
967
994
|
var FEEDBACK_TIP = 'Help us improve! If a result in this response looks wrong or is missing data, flag it: moda feedback "<describe what looked wrong>" [--category=...] [--conversation-id=... | --cluster-id=... | --tool-name=...]. Only submit genuine observations.';
|
|
@@ -1573,4 +1600,4 @@ function createCommandContext(input, options = {}) {
|
|
|
1573
1600
|
};
|
|
1574
1601
|
}
|
|
1575
1602
|
|
|
1576
|
-
export { __require, PROD_BASE_URL, DEFAULT_INGEST_URL, getModaPaths, getModaDir, isLoopbackBaseUrl, assertValidProfileName, loadProfileConfig, saveProfileConfig, getActiveProfile, setActiveProfile, upsertProfile, clearStoredApiKeyCredentials, secretFilePathFromRef, resolveSecretReference, resolveApiKeyFromActiveProfile, resolveTenantIdFromActiveProfile, ensureSecretFilePermissions, writeSecretJsonFile, CliInputError, CliAccessError, CliInputRequiredError, CliAuthError, CliCancellationError, isNetworkLikeError, isApiLikeError, VERSION, MODA_BASE_URL, loadCliConfig, saveCliConfig, resolveApiKey, embeddedTenantIdFromApiKey, resolveIngestUrl2 as resolveIngestUrl, resolveTenantId, resolveModaBaseUrl, validateConfig, MAX_SCANNED_FILE_BYTES, DEFAULT_MAX_INVENTORY_FILES, DEFAULT_MAX_INVENTORY_TEXT_BYTES, MAX_RECORDED_SKIPS, SKIPPED_DIRS, isSkippedDir, isSkippedPathPrefix, isEvalLikePath, shouldInventoryFile, isTextFile, isSecretishPath, redactDeep, packSnapshot, EXIT_OK, EXIT_ERROR, EXIT_DEGRADED, EXIT_AUTH_REQUIRED, EXIT_INPUT_REQUIRED, EXIT_CANCELLED, AGENT_ERROR_CODES, wasOutputCancelled, safeWriteStdout, safeWriteStderr, resolveOutputMode, createCliOutput, stringOption, createCommandContext };
|
|
1603
|
+
export { __toESM, __commonJS, __require, PROD_BASE_URL, DEFAULT_INGEST_URL, getModaPaths, getModaDir, isLoopbackBaseUrl, assertValidProfileName, loadProfileConfig, saveProfileConfig, getActiveProfile, setActiveProfile, upsertProfile, clearStoredApiKeyCredentials, secretFilePathFromRef, resolveSecretReference, resolveApiKeyFromActiveProfile, resolveTenantIdFromActiveProfile, ensureSecretFilePermissions, writeSecretJsonFile, CliInputError, CliAccessError, CliInputRequiredError, CliAuthError, CliCancellationError, isNetworkLikeError, isApiLikeError, VERSION, MODA_BASE_URL, loadCliConfig, saveCliConfig, resolveApiKey, embeddedTenantIdFromApiKey, resolveIngestUrl2 as resolveIngestUrl, resolveTenantId, resolveModaBaseUrl, validateConfig, MAX_SCANNED_FILE_BYTES, DEFAULT_MAX_INVENTORY_FILES, DEFAULT_MAX_INVENTORY_TEXT_BYTES, MAX_RECORDED_SKIPS, SKIPPED_DIRS, isSkippedDir, isSkippedPathPrefix, isEvalLikePath, shouldInventoryFile, isTextFile, isSecretishPath, SECRET_KEYS, redactDeep, redactString, packSnapshot, EXIT_OK, EXIT_ERROR, EXIT_DEGRADED, EXIT_AUTH_REQUIRED, EXIT_INPUT_REQUIRED, EXIT_CANCELLED, AGENT_ERROR_CODES, wasOutputCancelled, safeWriteStdout, safeWriteStderr, resolveOutputMode, createCliOutput, stringOption, createCommandContext };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
authFetch,
|
|
3
3
|
getCachedLoginContext
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-yz99t7n8.js";
|
|
5
5
|
import {
|
|
6
6
|
CliAccessError,
|
|
7
7
|
CliInputError,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
resolveTenantIdFromActiveProfile,
|
|
16
16
|
saveCliConfig,
|
|
17
17
|
writeSecretJsonFile
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-drabjmaj.js";
|
|
19
19
|
|
|
20
20
|
// src/init/tenant.ts
|
|
21
21
|
import { randomUUID } from "node:crypto";
|