@moda-ai/cli 1.55.69 → 1.55.71

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 (33) hide show
  1. package/dist/{agent-grf8tb4m.js → agent-6a97sf18.js} +9 -9
  2. package/dist/{cli-67sp41tx.js → cli-0qnmrybh.js} +7 -7
  3. package/dist/{cli-45m0bz7q.js → cli-1ykm231r.js} +5 -5
  4. package/dist/{cli-wcax07xh.js → cli-22yvg5kh.js} +2 -2
  5. package/dist/{cli-m702wdtv.js → cli-5ms8rw8x.js} +1 -1
  6. package/dist/{cli-bpnt0z0y.js → cli-87xy1evx.js} +1 -1
  7. package/dist/{cli-p2tfx93b.js → cli-k8hzbxtn.js} +4 -4
  8. package/dist/{cli-rdwy3y4f.js → cli-n1406hqg.js} +3 -3
  9. package/dist/{cli-9a4b1wxz.js → cli-p5grm12t.js} +1 -1
  10. package/dist/{cli-9rmx2zzy.js → cli-qq4gd126.js} +2 -2
  11. package/dist/{cli-27kkk5z4.js → cli-rrggdmf8.js} +1 -1
  12. package/dist/{cli-c7mj168q.js → cli-snswkrxd.js} +1 -1
  13. package/dist/{cli-bwzvsmwk.js → cli-tgjvf91h.js} +266 -17
  14. package/dist/{cli-y5d33a1y.js → cli-y7dtztan.js} +1 -1
  15. package/dist/{cli-15pzedv3.js → cli-z1t3sf7b.js} +1 -1
  16. package/dist/cli.js +20 -20
  17. package/dist/{doctor-zzxmt09g.js → doctor-0afher5t.js} +8 -8
  18. package/dist/{harness-zbxfgaer.js → harness-29rxrwfg.js} +7 -7
  19. package/dist/{harness-github-actions-ed8ncma3.js → harness-github-actions-6p1czt5h.js} +7 -7
  20. package/dist/{index-s1agk3km.js → index-8pzrw7v9.js} +9 -7
  21. package/dist/{index-x0knnchy.js → index-vj7cr35e.js} +13 -13
  22. package/dist/{production-intelligence-40teyxyv.js → production-intelligence-vsjhv4n2.js} +4 -4
  23. package/dist/{profile-commands-fa2858ez.js → profile-commands-1fdvrs5y.js} +5 -5
  24. package/dist/{prompt-attribution-8qhwgssy.js → prompt-attribution-80nzjmz0.js} +7 -7
  25. package/dist/prompt-source-mcp.js +7 -7
  26. package/dist/{prompt-sources-1hycgx6r.js → prompt-sources-3mq04qc6.js} +2 -2
  27. package/dist/{prompts-6gv5qqp6.js → prompts-r1hp4gry.js} +6 -6
  28. package/dist/{provision-2bb73ywd.js → provision-ya3vebee.js} +6 -6
  29. package/dist/{registry-ztn727mn.js → registry-c64qr7ta.js} +4 -4
  30. package/dist/{skills-c25dmy28.js → skills-pqhvfc1r.js} +6 -6
  31. package/dist/{sync-q549frt7.js → sync-fz5tfk4n.js} +9 -9
  32. package/package.json +1 -1
  33. package/skills/integration/index.json +2 -2
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  buildDoctorReport
3
- } from "./cli-45m0bz7q.js";
4
- import"./cli-27kkk5z4.js";
5
- import"./cli-67sp41tx.js";
3
+ } from "./cli-1ykm231r.js";
4
+ import"./cli-rrggdmf8.js";
5
+ import"./cli-0qnmrybh.js";
6
6
  import"./cli-mm48br00.js";
7
7
  import {
8
8
  readHarnessSyncState
@@ -15,21 +15,21 @@ import {
15
15
  readHarnessReport,
16
16
  validateHarnessReport
17
17
  } from "./cli-9ww72mrd.js";
18
- import"./cli-m702wdtv.js";
18
+ import"./cli-5ms8rw8x.js";
19
19
  import"./cli-e0kbye4s.js";
20
- import"./cli-wcax07xh.js";
21
- import"./cli-bpnt0z0y.js";
20
+ import"./cli-22yvg5kh.js";
21
+ import"./cli-87xy1evx.js";
22
22
  import {
23
23
  resolveApiKey,
24
24
  resolveIngestUrl,
25
25
  resolveModaBaseUrl,
26
26
  resolveTenantId
27
- } from "./cli-15pzedv3.js";
27
+ } from "./cli-z1t3sf7b.js";
28
28
  import {
29
29
  CliInputError
30
30
  } from "./cli-k4tqwah4.js";
31
31
  import"./cli-9kfxkxmk.js";
32
- import"./cli-9a4b1wxz.js";
32
+ import"./cli-p5grm12t.js";
33
33
  import {
34
34
  __require
35
35
  } from "./cli-0v6na3yp.js";
@@ -95,7 +95,7 @@ async function buildAgentContext(context) {
95
95
  const graph = readHarnessGraphIfPresent(context.cwd);
96
96
  const reportState = readHarnessReportState(context.cwd);
97
97
  const syncState = readHarnessSyncState(context.cwd);
98
- const harness = graph ? await import("./harness-zbxfgaer.js") : undefined;
98
+ const harness = graph ? await import("./harness-29rxrwfg.js") : undefined;
99
99
  const topFindings = doctor.checks.filter((check) => check.status === "fail" || check.status === "warning").slice(0, 12).map(checkToFinding);
100
100
  const evidenceRefs = [
101
101
  ...doctor.checks.map(checkToEvidenceRef),
@@ -4,14 +4,14 @@ import {
4
4
  } from "./cli-mm48br00.js";
5
5
  import {
6
6
  createCommandContext
7
- } from "./cli-m702wdtv.js";
7
+ } from "./cli-5ms8rw8x.js";
8
8
  import {
9
9
  assertFlags,
10
10
  assertPositionals
11
- } from "./cli-wcax07xh.js";
11
+ } from "./cli-22yvg5kh.js";
12
12
  import {
13
13
  callControlAPI
14
- } from "./cli-bpnt0z0y.js";
14
+ } from "./cli-87xy1evx.js";
15
15
  import {
16
16
  CliInputError
17
17
  } from "./cli-k4tqwah4.js";
@@ -5543,7 +5543,7 @@ import {
5543
5543
  import { dirname, isAbsolute, join, relative, resolve } from "node:path";
5544
5544
  var promptSourcesModule;
5545
5545
  async function loadPromptSources() {
5546
- promptSourcesModule ??= await import("./prompt-sources-1hycgx6r.js");
5546
+ promptSourcesModule ??= await import("./prompt-sources-3mq04qc6.js");
5547
5547
  return promptSourcesModule;
5548
5548
  }
5549
5549
  var MODA_DIR = ".moda";
@@ -5768,7 +5768,7 @@ async function runPromptSyncExclusive(flags, profileOptions, options) {
5768
5768
  const analyzedDefinitions = new Map;
5769
5769
  if (flags["no-analyze"] !== "true") {
5770
5770
  options.onProgress?.("Analyzing prompt sources before sync.");
5771
- const { analyzeHarnessPrompts } = await import("./harness-zbxfgaer.js");
5771
+ const { analyzeHarnessPrompts } = await import("./harness-29rxrwfg.js");
5772
5772
  const result = await analyzeHarnessPrompts({
5773
5773
  rootDir: process.cwd(),
5774
5774
  existing: established.flatMap((prompt) => prompt.sourceDefinition ? [prompt.sourceDefinition.source] : []),
@@ -5796,7 +5796,7 @@ async function runPromptSyncExclusive(flags, profileOptions, options) {
5796
5796
  const mergedSources = mergePromptSources(manifest.sources, extraSources);
5797
5797
  const manifestUpdate = stableJson(mergedSources) === stableJson(mergePromptSources(manifest.sources, [])) ? undefined : $stringify({ version: 2, prompt_paths: manifest.promptPaths, sources: mergedSources });
5798
5798
  const prompts = await discoverPrompts(extraSources);
5799
- const { checkPromptAttribution } = await import("./prompt-attribution-8qhwgssy.js");
5799
+ const { checkPromptAttribution } = await import("./prompt-attribution-80nzjmz0.js");
5800
5800
  const attribution = checkPromptAttribution(process.cwd(), prompts.map((prompt) => prompt.key));
5801
5801
  const brokenAttribution = attribution.references.filter((reference) => reference.status === "missing");
5802
5802
  if (brokenAttribution.length) {
@@ -6102,7 +6102,7 @@ async function migratePromptManifest(options = {}) {
6102
6102
  let addedSources = [];
6103
6103
  let pendingSources = [];
6104
6104
  if (options.discover) {
6105
- const { analyzeHarnessPrompts } = await import("./harness-zbxfgaer.js");
6105
+ const { analyzeHarnessPrompts } = await import("./harness-29rxrwfg.js");
6106
6106
  const result = await analyzeHarnessPrompts({
6107
6107
  rootDir: root,
6108
6108
  existing: manifest.sources,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  isAuthSessionValid,
3
3
  loadAuthSession
4
- } from "./cli-27kkk5z4.js";
4
+ } from "./cli-rrggdmf8.js";
5
5
  import {
6
6
  inspectPromptManifest
7
- } from "./cli-67sp41tx.js";
7
+ } from "./cli-0qnmrybh.js";
8
8
  import {
9
9
  readHarnessSyncState,
10
10
  renderDoctorHuman,
@@ -12,7 +12,7 @@ import {
12
12
  } from "./cli-k0vxtzxb.js";
13
13
  import {
14
14
  callDataAPI
15
- } from "./cli-bpnt0z0y.js";
15
+ } from "./cli-87xy1evx.js";
16
16
  import {
17
17
  describeModaBaseUrl,
18
18
  ensureSecretFilePermissions,
@@ -27,7 +27,7 @@ import {
27
27
  resolveSecretReference,
28
28
  resolveTenantId,
29
29
  secretFilePathFromRef
30
- } from "./cli-15pzedv3.js";
30
+ } from "./cli-z1t3sf7b.js";
31
31
  import {
32
32
  __require
33
33
  } from "./cli-0v6na3yp.js";
@@ -395,7 +395,7 @@ async function harnessCurrentCheck(cwd, manifestPath, manifestExists, tenantId)
395
395
  };
396
396
  }
397
397
  try {
398
- const { scanHarness } = await import("./harness-zbxfgaer.js");
398
+ const { scanHarness } = await import("./harness-29rxrwfg.js");
399
399
  const current = scanHarness({
400
400
  rootDir: cwd,
401
401
  scannerVersion: "doctor",
@@ -2,7 +2,7 @@ import {
2
2
  ApiError,
3
3
  callControlAPI,
4
4
  callDataAPI
5
- } from "./cli-bpnt0z0y.js";
5
+ } from "./cli-87xy1evx.js";
6
6
  import {
7
7
  continuationCommand,
8
8
  embeddedTenantIdFromApiKey,
@@ -11,7 +11,7 @@ import {
11
11
  resolveApiTenantId,
12
12
  setPlatformTenantOverride,
13
13
  shellArg
14
- } from "./cli-15pzedv3.js";
14
+ } from "./cli-z1t3sf7b.js";
15
15
  import {
16
16
  CliAccessError,
17
17
  CliInputError
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createCliOutput,
3
3
  outputModeFromFlags
4
- } from "./cli-15pzedv3.js";
4
+ } from "./cli-z1t3sf7b.js";
5
5
 
6
6
  // src/command-context.ts
7
7
  function flagEnabled(flags, key) {
@@ -3,7 +3,7 @@ import {
3
3
  recordApiRequest,
4
4
  resolveApiKey,
5
5
  resolveModaBaseUrl
6
- } from "./cli-15pzedv3.js";
6
+ } from "./cli-z1t3sf7b.js";
7
7
 
8
8
  // src/api-client.ts
9
9
  var REQUEST_TIMEOUT_MS = 30000;
@@ -13,22 +13,22 @@ import {
13
13
  } from "./cli-hcwdz9sd.js";
14
14
  import {
15
15
  createCommandContext
16
- } from "./cli-m702wdtv.js";
16
+ } from "./cli-5ms8rw8x.js";
17
17
  import {
18
18
  assertFlags,
19
19
  assertPositionals,
20
20
  writeDryRun
21
- } from "./cli-wcax07xh.js";
21
+ } from "./cli-22yvg5kh.js";
22
22
  import {
23
23
  callControlAPI
24
- } from "./cli-bpnt0z0y.js";
24
+ } from "./cli-87xy1evx.js";
25
25
  import {
26
26
  recordApiRequest,
27
27
  resolveApiKey,
28
28
  resolveIngestUrl,
29
29
  resolveTenantId,
30
30
  shellArg
31
- } from "./cli-15pzedv3.js";
31
+ } from "./cli-z1t3sf7b.js";
32
32
  import {
33
33
  CliInputError
34
34
  } from "./cli-k4tqwah4.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  fetchApiKeyProbe
3
- } from "./cli-c7mj168q.js";
3
+ } from "./cli-snswkrxd.js";
4
4
  import {
5
5
  authFetch,
6
6
  getCachedLoginContext
7
- } from "./cli-27kkk5z4.js";
7
+ } from "./cli-rrggdmf8.js";
8
8
  import {
9
9
  embeddedTenantIdFromApiKey,
10
10
  getModaDir,
@@ -15,7 +15,7 @@ import {
15
15
  resolveTenantIdFromActiveProfile,
16
16
  saveCliConfig,
17
17
  writeSecretJsonFile
18
- } from "./cli-15pzedv3.js";
18
+ } from "./cli-z1t3sf7b.js";
19
19
  import {
20
20
  CliAccessError,
21
21
  CliInputError,
@@ -339,4 +339,4 @@ function packSnapshot(inputs, opts) {
339
339
  skips
340
340
  };
341
341
  }
342
- export { 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 };
342
+ export { 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, redactSnapshotText, packSnapshot };
@@ -3,10 +3,10 @@ import {
3
3
  } from "./cli-e0kbye4s.js";
4
4
  import {
5
5
  callDataAPI
6
- } from "./cli-bpnt0z0y.js";
6
+ } from "./cli-87xy1evx.js";
7
7
  import {
8
8
  shellArg
9
- } from "./cli-15pzedv3.js";
9
+ } from "./cli-z1t3sf7b.js";
10
10
  import {
11
11
  CliInputError
12
12
  } from "./cli-k4tqwah4.js";
@@ -6,7 +6,7 @@ import {
6
6
  saveProfileConfig,
7
7
  secretFilePathFromRef,
8
8
  writeSecretJsonFile
9
- } from "./cli-15pzedv3.js";
9
+ } from "./cli-z1t3sf7b.js";
10
10
  import {
11
11
  CliAuthError,
12
12
  CliInputError
@@ -5,7 +5,7 @@ import {
5
5
  resolveApiKey,
6
6
  resolveApiKeyFromActiveProfile,
7
7
  resolveModaBaseUrl
8
- } from "./cli-15pzedv3.js";
8
+ } from "./cli-z1t3sf7b.js";
9
9
 
10
10
  // src/api-key-auth.ts
11
11
  var PROBE_TIMEOUT_MS = 1e4;
@@ -36,16 +36,16 @@ import {
36
36
  import {
37
37
  createCommandContext,
38
38
  stringOption
39
- } from "./cli-m702wdtv.js";
39
+ } from "./cli-5ms8rw8x.js";
40
40
  import {
41
41
  assertFlags,
42
42
  assertPositionals,
43
43
  requireTenant
44
- } from "./cli-wcax07xh.js";
44
+ } from "./cli-22yvg5kh.js";
45
45
  import {
46
46
  ApiError,
47
47
  callControlAPI
48
- } from "./cli-bpnt0z0y.js";
48
+ } from "./cli-87xy1evx.js";
49
49
  import {
50
50
  EXIT_DEGRADED,
51
51
  embeddedTenantIdFromApiKey,
@@ -56,7 +56,7 @@ import {
56
56
  resolveModaBaseUrl,
57
57
  resolveTenantId,
58
58
  shellArg
59
- } from "./cli-15pzedv3.js";
59
+ } from "./cli-z1t3sf7b.js";
60
60
  import {
61
61
  CliInputError,
62
62
  CliInputRequiredError
@@ -72,7 +72,7 @@ import {
72
72
  require_typescript,
73
73
  resolvePromptSource,
74
74
  validatePromptSource
75
- } from "./cli-y5d33a1y.js";
75
+ } from "./cli-y7dtztan.js";
76
76
  import {
77
77
  $isMap,
78
78
  $isNode,
@@ -97,8 +97,9 @@ import {
97
97
  isTextFile,
98
98
  packSnapshot,
99
99
  redactDeep,
100
+ redactSnapshotText,
100
101
  shouldInventoryFile
101
- } from "./cli-9a4b1wxz.js";
102
+ } from "./cli-p5grm12t.js";
102
103
  import {
103
104
  __require,
104
105
  __toESM
@@ -3119,7 +3120,61 @@ var realtimeEventSink = {
3119
3120
  return;
3120
3121
  }
3121
3122
  };
3122
- var CALL_SINKS = [realtimeEventSink, anthropicSink, openaiSink, aiSdkSink, workersAiSink, fetchSink, websocketSink, providerFactorySink, agentEntrySink, clientChatSink, hostedModelSink];
3123
+ function effectiveField(object, key) {
3124
+ let last = -1;
3125
+ object.properties.forEach((property, index) => {
3126
+ if (!import_typescript5.default.isSpreadAssignment(property) && propertyNameText(property.name) === key)
3127
+ last = index;
3128
+ });
3129
+ const fields = [];
3130
+ const value = last >= 0 ? propertyValue(object, key) : undefined;
3131
+ if (value)
3132
+ fields.push({ node: value });
3133
+ object.properties.forEach((property, index) => {
3134
+ if (index > last && import_typescript5.default.isSpreadAssignment(property))
3135
+ fields.push({ node: property.expression, key });
3136
+ });
3137
+ return fields;
3138
+ }
3139
+ var GATEWAY_METHODS = new Set(["call", "stream"]);
3140
+ var GATEWAY_BODY_KEYS = { system: "system", messages: "messages", prompt: "prompt", model: "model", tools: "tools" };
3141
+ var modelGatewaySink = {
3142
+ id: "model-gateway",
3143
+ sdk: "model-gateway",
3144
+ match(call) {
3145
+ if (!import_typescript5.default.isCallExpression(call) || call.arguments.length !== 1)
3146
+ return;
3147
+ const callee = unwrap(call.expression);
3148
+ if (!import_typescript5.default.isPropertyAccessExpression(callee) || !GATEWAY_METHODS.has(callee.name.text))
3149
+ return;
3150
+ const receiver = unwrap(callee.expression);
3151
+ if (!import_typescript5.default.isPropertyAccessExpression(receiver) || receiver.name.text !== "models")
3152
+ return;
3153
+ const request = unwrap(call.arguments[0]);
3154
+ if (!import_typescript5.default.isObjectLiteralExpression(request) || !propertyValue(request, "kind"))
3155
+ return;
3156
+ const roles = [];
3157
+ for (const body of effectiveField(request, "body")) {
3158
+ for (const [key, role] of Object.entries(GATEWAY_BODY_KEYS)) {
3159
+ if (body.key) {
3160
+ roles.push({ role, node: body.node, key: `${body.key}.${key}` });
3161
+ continue;
3162
+ }
3163
+ const literal = unwrap(body.node);
3164
+ if (!import_typescript5.default.isObjectLiteralExpression(literal)) {
3165
+ roles.push({ role, node: body.node, key });
3166
+ continue;
3167
+ }
3168
+ for (const field of effectiveField(literal, key))
3169
+ roles.push({ role, ...field });
3170
+ }
3171
+ }
3172
+ for (const field of effectiveField(request, "prompt"))
3173
+ roles.push({ role: "prompt", ...field });
3174
+ return roles.length > 0 ? { api: `models.${callee.name.text}`, roles } : undefined;
3175
+ }
3176
+ };
3177
+ var CALL_SINKS = [modelGatewaySink, realtimeEventSink, anthropicSink, openaiSink, aiSdkSink, workersAiSink, fetchSink, websocketSink, providerFactorySink, agentEntrySink, clientChatSink, hostedModelSink];
3123
3178
  function registerCallSink(recognizer) {
3124
3179
  CALL_SINKS.push(recognizer);
3125
3180
  }
@@ -3350,14 +3405,31 @@ function readSourcePathRelativeToEvidence(artifact, rootDir) {
3350
3405
  }
3351
3406
  return;
3352
3407
  }
3408
+ var PRIVATE_KEY_BLOCK = /-----BEGIN ([A-Z ]*)PRIVATE KEY-----(?:[\s\S]*?-----END \1PRIVATE KEY-----|(?:(?:\r\n|\r|\n)[ \t]*[A-Za-z0-9+/=]+[ \t]*(?=[\r\n]|$))*)/g;
3409
+ function maskPrivateKeyBlock(block) {
3410
+ return block.split(/(\r\n|\r|\n)/).map((part, index) => index === 0 ? "[REDACTED PRIVATE KEY]" : index % 2 === 1 ? part : "").join("");
3411
+ }
3412
+ var CREDENTIAL_FIELD = /(\b(?:[A-Za-z0-9]+[_-])*(?:api[_-]?key|apikey|secret(?:[_-]?key)?|password|passwd|access[_-]?token|auth[_-]?token|refresh[_-]?token|client[_-]?secret|private[_-]?key)\b["']?\s*[:=]\s*["']?)(?![<${]|process\.env|os\.environ)([^\s"'`,;]{8,})/gi;
3413
+ var CALL_OR_INDEX = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*[([]/;
3414
+ var DOTTED_REFERENCE = /^[A-Za-z_$][\w$]{0,39}(?:\.[A-Za-z_$][\w$]{0,39})+$/;
3415
+ function isCredentialReference(field, value) {
3416
+ if (/["']$/.test(field))
3417
+ return false;
3418
+ return CALL_OR_INDEX.test(value) || DOTTED_REFERENCE.test(value);
3419
+ }
3420
+ function redactArtifactBody(body) {
3421
+ const masked = body.replace(PRIVATE_KEY_BLOCK, maskPrivateKeyBlock).replace(CREDENTIAL_FIELD, (match, field, value) => isCredentialReference(field, value) ? match : `${field}[REDACTED]`);
3422
+ return redactSnapshotText(masked).text;
3423
+ }
3353
3424
  function hydratePromptAndToolBodies(graph, rootDir) {
3354
3425
  for (const artifact of graph.artifacts) {
3355
- if (!requiresArtifactBody(artifact.type) || artifactHasBody(artifact)) {
3356
- continue;
3426
+ if (requiresArtifactBody(artifact.type) && !artifactHasBody(artifact)) {
3427
+ const hydrated = hydrateArtifactBody(artifact, rootDir);
3428
+ if (hydrated)
3429
+ artifact.body = hydrated;
3357
3430
  }
3358
- const hydrated = hydrateArtifactBody(artifact, rootDir);
3359
- if (hydrated)
3360
- artifact.body = hydrated;
3431
+ if (typeof artifact.body === "string")
3432
+ artifact.body = redactArtifactBody(artifact.body);
3361
3433
  }
3362
3434
  }
3363
3435
  function countIncompletePromptToolBodies(graph) {
@@ -17319,7 +17391,7 @@ function applyPromptDiscovery(graph, discovery) {
17319
17391
  type: "prompt",
17320
17392
  scope: prior?.scope ?? "shared",
17321
17393
  sourcePath: item.sourcePath,
17322
- body: item.content,
17394
+ body: redactArtifactBody(item.content),
17323
17395
  contentHash: item.sourceDefinition.sourceHash,
17324
17396
  promptSource: source,
17325
17397
  sourceDefinition: item.sourceDefinition,
@@ -18911,7 +18983,7 @@ async function runHarnessCommand(context) {
18911
18983
  throw new CliInputError("Focused remote prompt analysis is not supported yet.", "Use local --analyst=claude|codex|cursor|local-scan, or drop --concern for a full remote report.");
18912
18984
  }
18913
18985
  if (context.flags["github-actions"] === "true") {
18914
- const { runGithubActionsAnalyze } = await import("./harness-github-actions-ed8ncma3.js");
18986
+ const { runGithubActionsAnalyze } = await import("./harness-github-actions-6p1czt5h.js");
18915
18987
  const result = await runGithubActionsAnalyze(rootDir, {
18916
18988
  writeReport: (report2) => {
18917
18989
  const normalized = normalizeHarnessReport(report2);
@@ -19084,7 +19156,7 @@ async function runHarnessCommand(context) {
19084
19156
  }
19085
19157
  case "extract": {
19086
19158
  writeHumanProgress(context, "Harness extract: tracing model call sites (no LLM, no network)...");
19087
- const { extractHarness: extractHarness2, serializeExtractResult } = await import("./index-s1agk3km.js");
19159
+ const { extractHarness: extractHarness2, serializeExtractResult } = await import("./index-8pzrw7v9.js");
19088
19160
  const result = extractHarness2(rootDir, { fresh: true });
19089
19161
  writeHumanProgress(context, `Harness extract: ${result.callSites.length} call sites, ${result.roles.length} traced roles across ${result.files} files (${result.programs} programs, ${result.durationMs.toLocaleString()} ms).`);
19090
19162
  context.output.writeData(serializeExtractResult(result), {
@@ -19593,7 +19665,7 @@ function resolveWithInferredKind(rootDir, source) {
19593
19665
  }
19594
19666
  function applyResolvedPromptSource(artifact, source) {
19595
19667
  artifact.promptSource = source.sourceDefinition.source;
19596
- artifact.body = source.content;
19668
+ artifact.body = redactArtifactBody(source.content);
19597
19669
  artifact.sourceDefinition = source.sourceDefinition;
19598
19670
  artifact.sourcePath = source.sourcePath;
19599
19671
  artifact.contentHash = source.sourceDefinition.sourceHash;
@@ -19989,6 +20061,15 @@ function mergeDeterministicArtifacts(graph, rootDir, options = {}) {
19989
20061
  }
19990
20062
  const extracted = !allowedTypes || allowedTypes.has("model_config") ? extractedModelItems(rootDir) : { artifacts: [], unknowns: [], rewritten: new Set, enabled: false };
19991
20063
  promoted = withExtractedModels(promoted, extracted, rootDir);
20064
+ if (extracted.enabled && isRecord2(graph.scan)) {
20065
+ try {
20066
+ const { literals, truncated } = collectModelLiterals(rootDir);
20067
+ const scan = graph.scan;
20068
+ scan.modelLiterals = literals;
20069
+ if (truncated)
20070
+ scan.modelLiteralsTruncated = true;
20071
+ } catch {}
20072
+ }
19992
20073
  const extractedIds = new Set(extracted.artifacts.map((artifact) => artifact.id));
19993
20074
  backfillRefutationEvidenceReasons(graph);
19994
20075
  const refuted = analystRefutations(graph);
@@ -26321,6 +26402,174 @@ function modelUnknowns(result) {
26321
26402
  };
26322
26403
  });
26323
26404
  }
26405
+ var MODEL_LITERAL_FILE = /\.(?:[cm]?[jt]sx?|svelte|vue|py|sql|toml|ya?ml|jsonc?)$/i;
26406
+ var MODEL_LITERAL_SHAPE = /^[@A-Za-z0-9][\w.:/@+-]{1,127}$/;
26407
+ var MAX_MODEL_LITERALS = 2000;
26408
+ var MODEL_LITERAL_EXCLUDED = /(?:^(?:pnpm-lock\.ya?ml|package-lock\.json|npm-shrinkwrap\.json)$|\.d\.[cm]?ts$|\.min\.[cm]?js$)/i;
26409
+ var MODEL_LITERAL_DATA_FILE = /\.(?:jsonc?|ya?ml|toml)$/i;
26410
+ var MAX_MODEL_LITERAL_BYTES = 4 * 1024 * 1024;
26411
+ var C_COMMENTS = { line: ["//"], block: [["/*", "*/"]], triple: false };
26412
+ var MARKUP_COMMENTS = { line: ["//"], block: [["/*", "*/"], ["<!--", "-->"]], triple: false };
26413
+ var HASH_COMMENTS = { line: ["#"], block: [], triple: true };
26414
+ var PYTHON_COMMENTS = { ...HASH_COMMENTS, fstrings: true };
26415
+ var SQL_COMMENTS = { line: ["--"], block: [["/*", "*/"]], triple: false };
26416
+ function commentSyntax(name) {
26417
+ const ext = name.slice(name.lastIndexOf(".") + 1).toLowerCase();
26418
+ if (ext === "svelte" || ext === "vue")
26419
+ return MARKUP_COMMENTS;
26420
+ if (ext === "py")
26421
+ return PYTHON_COMMENTS;
26422
+ if (ext === "toml" || ext === "yaml" || ext === "yml")
26423
+ return HASH_COMMENTS;
26424
+ if (ext === "sql")
26425
+ return SQL_COMMENTS;
26426
+ return C_COMMENTS;
26427
+ }
26428
+ function opensFString(text, index) {
26429
+ let start = index;
26430
+ while (start > 0 && index - start < 2 && /[A-Za-z]/.test(text[start - 1]))
26431
+ start -= 1;
26432
+ const prefix = text.slice(start, index).toLowerCase();
26433
+ return (prefix === "f" || prefix === "rf" || prefix === "fr") && (start === 0 || !/\w/.test(text[start - 1]));
26434
+ }
26435
+ function quotedLiterals(text, syntax) {
26436
+ const out = [];
26437
+ const stack = [{ kind: "code", braces: 0, fexpr: false }];
26438
+ let i = 0;
26439
+ while (i < text.length) {
26440
+ const frame = stack[stack.length - 1];
26441
+ const char = text[i];
26442
+ if (frame.kind === "string") {
26443
+ if (char === "\\") {
26444
+ i += 2;
26445
+ continue;
26446
+ }
26447
+ if (char === frame.quote || char === `
26448
+ ` && !frame.template) {
26449
+ stack.pop();
26450
+ if (char === frame.quote && !frame.interpolated)
26451
+ out.push(frame.value);
26452
+ i += 1;
26453
+ continue;
26454
+ }
26455
+ if (frame.template && text.startsWith("${", i)) {
26456
+ frame.interpolated = true;
26457
+ stack.push({ kind: "code", braces: 0, fexpr: false });
26458
+ i += 2;
26459
+ continue;
26460
+ }
26461
+ if (frame.fstring && char === "{") {
26462
+ if (text[i + 1] === "{") {
26463
+ frame.value += "{";
26464
+ i += 2;
26465
+ continue;
26466
+ }
26467
+ frame.interpolated = true;
26468
+ stack.push({ kind: "code", braces: 0, fexpr: true });
26469
+ i += 1;
26470
+ continue;
26471
+ }
26472
+ frame.value += char;
26473
+ i += 1;
26474
+ continue;
26475
+ }
26476
+ if (frame.kind === "format") {
26477
+ if (char === "{")
26478
+ stack.push({ kind: "code", braces: 0, fexpr: true });
26479
+ else if (char === "}")
26480
+ stack.pop();
26481
+ i += 1;
26482
+ continue;
26483
+ }
26484
+ if (syntax.triple && (text.startsWith('"""', i) || text.startsWith("'''", i))) {
26485
+ const end = text.indexOf(text.slice(i, i + 3), i + 3);
26486
+ i = end < 0 ? text.length : end + 3;
26487
+ continue;
26488
+ }
26489
+ const lineOpener = frame.fexpr ? undefined : syntax.line.find((opener) => text.startsWith(opener, i));
26490
+ if (lineOpener) {
26491
+ const end = text.indexOf(`
26492
+ `, i);
26493
+ i = end < 0 ? text.length : end + 1;
26494
+ continue;
26495
+ }
26496
+ const block = syntax.block.find(([open]) => text.startsWith(open, i));
26497
+ if (block) {
26498
+ const end = text.indexOf(block[1], i + block[0].length);
26499
+ i = end < 0 ? text.length : end + block[1].length;
26500
+ continue;
26501
+ }
26502
+ if (char === '"' || char === "'" || char === "`") {
26503
+ const fstring = Boolean(syntax.fstrings) && char !== "`" && opensFString(text, i);
26504
+ stack.push({ kind: "string", quote: char, template: char === "`", fstring, value: "", interpolated: false });
26505
+ } else if (char === "{" || frame.fexpr && (char === "(" || char === "[")) {
26506
+ frame.braces += 1;
26507
+ } else if (char === "}" || frame.fexpr && (char === ")" || char === "]")) {
26508
+ if (frame.braces > 0)
26509
+ frame.braces -= 1;
26510
+ else if (char === "}" && stack.length > 1)
26511
+ stack.pop();
26512
+ } else if (frame.fexpr && frame.braces === 0 && char === ":" && text[i + 1] !== "=") {
26513
+ stack[stack.length - 1] = { kind: "format" };
26514
+ }
26515
+ i += 1;
26516
+ }
26517
+ return out;
26518
+ }
26519
+ function collectModelLiterals(rootDir) {
26520
+ const found = new Set;
26521
+ let seen = 0;
26522
+ let capped = false;
26523
+ let skipped = false;
26524
+ const walk = (dir, rel2) => {
26525
+ let entries;
26526
+ try {
26527
+ entries = readdirSync7(dir, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0);
26528
+ } catch {
26529
+ skipped = true;
26530
+ return;
26531
+ }
26532
+ for (const entry of entries) {
26533
+ if (capped)
26534
+ return;
26535
+ const childRel = rel2 ? `${rel2}/${entry.name}` : entry.name;
26536
+ if (entry.isDirectory()) {
26537
+ if (!entry.name.startsWith(".") && !SCAN_SKIPPED_DIRS.has(entry.name))
26538
+ walk(join12(dir, entry.name), childRel);
26539
+ continue;
26540
+ }
26541
+ if (!entry.isFile() || !MODEL_LITERAL_FILE.test(entry.name) || MODEL_LITERAL_EXCLUDED.test(entry.name) || isTestOnly(childRel))
26542
+ continue;
26543
+ if (seen >= MAX_SCANNED_FILES) {
26544
+ capped = true;
26545
+ return;
26546
+ }
26547
+ seen += 1;
26548
+ const absolute = join12(dir, entry.name);
26549
+ try {
26550
+ if (statSync5(absolute).size > MAX_MODEL_LITERAL_BYTES) {
26551
+ if (!MODEL_LITERAL_DATA_FILE.test(entry.name))
26552
+ skipped = true;
26553
+ continue;
26554
+ }
26555
+ const text = readFileSync14(absolute, "utf8");
26556
+ for (const literal of quotedLiterals(text, commentSyntax(entry.name))) {
26557
+ if (!MODEL_LITERAL_SHAPE.test(literal) || !isModelId(literal) || found.has(literal))
26558
+ continue;
26559
+ if (found.size >= MAX_MODEL_LITERALS) {
26560
+ capped = true;
26561
+ return;
26562
+ }
26563
+ found.add(literal);
26564
+ }
26565
+ } catch {
26566
+ skipped = true;
26567
+ }
26568
+ }
26569
+ };
26570
+ walk(resolve12(rootDir), "");
26571
+ return { literals: [...found].sort(), truncated: capped || skipped };
26572
+ }
26324
26573
 
26325
26574
  // src/harness-extract/types.ts
26326
26575
  var EXTRACT_SCHEMA_VERSION = 1;
@@ -26945,4 +27194,4 @@ function assignAgentIds(result, agentForScope) {
26945
27194
  }
26946
27195
  }
26947
27196
 
26948
- export { startRemoteAnalyze, pollRemoteAnalyzeUntilDone, isRecoverableRemoteRun, checkPromptMapping, safePromptEvidencePath, discoverHarnessPromptSources, valueChildren, selectKey, allValues, renderings, CALL_SINKS, registerCallSink, registerClassSink, isModelId, collectModels, modelArtifacts, modelUnknowns, EXTRACT_SCHEMA_VERSION, ENUMERATORS, toolNamesOf, clearExtractCache, extractHarness, extractHarnessWithContext, serializeExtractResult, runEnumerators, assignAgentIds, runHarnessCommand, writeHarnessAnalyzeResult, emitWrittenArtifacts, analyzeHarnessPrompts, isToolGroupPlaceholder, repairExternalAnalystReport, deriveRelationshipsFromGraph, deterministicArtifacts, deterministicGraphItems, mergeDeterministicArtifacts, analystRefutations, describeCodingAgentEvent, analystEventProgress, isRetryableExternalAnalystFailure, sleep, summarizeInvalidAnalystReport, isDeterministicLocalAnalyst, resolveHarnessAnalyzeConcern, resolveExternalHarnessAnalystInvocation, detectAvailableCodingAgents, codingAgentDisplayName, runCodingAgent, readOnlyClaudeExtraArgs, resolveAnalystModel, renderExternalHarnessAnalystPrompt, CONCERN_CANDIDATE_KINDS, SEED_CANDIDATE_KIND_LABELS, renderAnalystCandidateLines, renderAnalystSeedLines, truncateText, scanHarness, summarizeHarness, buildSourceSnapshot, writeHumanProgress, describeSyncIdentity, describeSyncTenantLabel, findFresherHarnessReports, writeHarnessArtifacts, assertHarnessGraphSyncQuality, graphForSync, inventoryFiles, numericEnv, numericEnvAllowZero, computeDeterministicFloor, stableId, titleFromId, promptNameFromPath };
27197
+ export { startRemoteAnalyze, pollRemoteAnalyzeUntilDone, isRecoverableRemoteRun, checkPromptMapping, safePromptEvidencePath, discoverHarnessPromptSources, valueChildren, selectKey, allValues, renderings, CALL_SINKS, registerCallSink, registerClassSink, isModelId, collectModels, modelArtifacts, modelUnknowns, collectModelLiterals, EXTRACT_SCHEMA_VERSION, ENUMERATORS, toolNamesOf, clearExtractCache, extractHarness, extractHarnessWithContext, serializeExtractResult, runEnumerators, assignAgentIds, runHarnessCommand, writeHarnessAnalyzeResult, emitWrittenArtifacts, analyzeHarnessPrompts, isToolGroupPlaceholder, repairExternalAnalystReport, deriveRelationshipsFromGraph, deterministicArtifacts, deterministicGraphItems, mergeDeterministicArtifacts, analystRefutations, describeCodingAgentEvent, analystEventProgress, isRetryableExternalAnalystFailure, sleep, summarizeInvalidAnalystReport, isDeterministicLocalAnalyst, resolveHarnessAnalyzeConcern, resolveExternalHarnessAnalystInvocation, detectAvailableCodingAgents, codingAgentDisplayName, runCodingAgent, readOnlyClaudeExtraArgs, resolveAnalystModel, renderExternalHarnessAnalystPrompt, CONCERN_CANDIDATE_KINDS, SEED_CANDIDATE_KIND_LABELS, renderAnalystCandidateLines, renderAnalystSeedLines, truncateText, scanHarness, summarizeHarness, buildSourceSnapshot, writeHumanProgress, describeSyncIdentity, describeSyncTenantLabel, findFresherHarnessReports, writeHarnessArtifacts, assertHarnessGraphSyncQuality, graphForSync, inventoryFiles, numericEnv, numericEnvAllowZero, computeDeterministicFloor, stableId, titleFromId, promptNameFromPath };
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  SECRET_KEYS,
6
6
  redactString
7
- } from "./cli-9a4b1wxz.js";
7
+ } from "./cli-p5grm12t.js";
8
8
  import {
9
9
  __commonJS,
10
10
  __require,
@@ -12,7 +12,7 @@ import {
12
12
  } from "./cli-k4tqwah4.js";
13
13
  import {
14
14
  redactDeep
15
- } from "./cli-9a4b1wxz.js";
15
+ } from "./cli-p5grm12t.js";
16
16
 
17
17
  // src/profiles.ts
18
18
  import {