@moda-ai/cli 1.55.27 → 1.55.29
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/dist/{agent-vp9prdma.js → agent-0w9rtdsw.js} +22 -16
- package/dist/cli-3n0gz4d0.js +17971 -0
- package/dist/{cli-q9nsvqqg.js → cli-3retgh64.js} +85 -1165
- package/dist/{cli-ccjfwzqx.js → cli-97jew729.js} +1 -1
- package/dist/{cli-r5pp7qny.js → cli-99p2jh28.js} +42 -456
- package/dist/{cli-0pkc8jhg.js → cli-9bgk5jeh.js} +8 -6
- package/dist/{cli-hmjdgxrn.js → cli-9bgnvth2.js} +5 -3
- package/dist/cli-9kfxkxmk.js +6994 -0
- package/dist/cli-cesds766.js +1516 -0
- package/dist/{cli-v8q7sd7g.js → cli-dr6x0zv7.js} +1 -1
- package/dist/{cli-pg5qfmqc.js → cli-e23g9ywa.js} +1 -1
- package/dist/{cli-vdkwkkp5.js → cli-fwpqghgc.js} +4 -2
- package/dist/cli-k4tqwah4.js +89 -0
- package/dist/{cli-6et4z504.js → cli-mg5zv4s6.js} +15 -13
- package/dist/{cli-wzds257x.js → cli-n2hng3gv.js} +6 -4
- package/dist/cli-ns5fcnkz.js +341 -0
- package/dist/{cli-4h0ave0f.js → cli-ny48a8de.js} +12 -9
- package/dist/{cli-qwgct6x7.js → cli-qpq84eee.js} +5220 -32716
- package/dist/cli-xq45etg1.js +1098 -0
- package/dist/cli-yf39avhh.js +754 -0
- package/dist/cli-yz8xcpyk.js +12 -0
- package/dist/cli.js +435 -192
- package/dist/doctor-k3ta6h2y.js +24 -0
- package/dist/{fix-75s9s0d6.js → fix-w5z02wt4.js} +8 -9
- package/dist/{harness-a7tb9a23.js → harness-7azmzytc.js} +15 -7
- package/dist/{harness-github-actions-6v4wydb8.js → harness-github-actions-bv2qrnqb.js} +11 -5
- package/dist/harness-report-rd9c4e9v.js +54 -0
- package/dist/{index-91bpc8g8.js → index-d1z50dsq.js} +41 -33
- package/dist/{production-intelligence-7nqddd4f.js → production-intelligence-wvsgjxth.js} +9 -6
- package/dist/{profile-commands-49yn02yg.js → profile-commands-h8evz9x0.js} +7 -4
- package/dist/prompt-attribution-1nytc9wj.js +148 -0
- package/dist/prompt-source-mcp.js +14 -7
- package/dist/prompt-sources-07tczyqa.js +19 -0
- package/dist/{prompts-17wyrst6.js → prompts-6y9wfq5z.js} +8 -7
- package/dist/prompts-ab-ezrd63sk.js +70 -0
- package/dist/prompts-propose-2k3enm2q.js +255 -0
- package/dist/{provision-bc3h68e1.js → provision-y5bdbh4y.js} +9 -6
- package/dist/{registry-fpzhjznj.js → registry-96aze5wp.js} +7 -4
- package/dist/{skills-ccdbqghj.js → skills-j8865009.js} +7 -5
- package/dist/{sync-hkxce5zh.js → sync-ew7yvy0e.js} +16 -10
- package/package.json +1 -1
- package/skills/integration/index.json +2 -2
- package/dist/doctor-wmre3mr7.js +0 -22
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildDoctorReport,
|
|
3
|
+
promptsDiscoveredCheck,
|
|
4
|
+
runDoctorCommand,
|
|
5
|
+
runStatusCommand
|
|
6
|
+
} from "./cli-ny48a8de.js";
|
|
7
|
+
import"./cli-9bgnvth2.js";
|
|
8
|
+
import"./cli-3retgh64.js";
|
|
9
|
+
import"./cli-mm48br00.js";
|
|
10
|
+
import"./cli-xq45etg1.js";
|
|
11
|
+
import"./cli-dr6x0zv7.js";
|
|
12
|
+
import"./cli-n2hng3gv.js";
|
|
13
|
+
import"./cli-e23g9ywa.js";
|
|
14
|
+
import"./cli-99p2jh28.js";
|
|
15
|
+
import"./cli-k4tqwah4.js";
|
|
16
|
+
import"./cli-9kfxkxmk.js";
|
|
17
|
+
import"./cli-ns5fcnkz.js";
|
|
18
|
+
import"./cli-0v6na3yp.js";
|
|
19
|
+
export {
|
|
20
|
+
runStatusCommand,
|
|
21
|
+
runDoctorCommand,
|
|
22
|
+
promptsDiscoveredCheck,
|
|
23
|
+
buildDoctorReport
|
|
24
|
+
};
|
|
@@ -2,19 +2,14 @@ import {
|
|
|
2
2
|
DEFAULT_POLL_INTERVAL_MS,
|
|
3
3
|
DEFAULT_WAIT_TIMEOUT_MS,
|
|
4
4
|
fetchLatestRun
|
|
5
|
-
} from "./cli-
|
|
6
|
-
import"./cli-mm48br00.js";
|
|
7
|
-
import"./cli-qwgct6x7.js";
|
|
8
|
-
import"./cli-97fnztpy.js";
|
|
9
|
-
import"./cli-v8q7sd7g.js";
|
|
5
|
+
} from "./cli-yz8xcpyk.js";
|
|
10
6
|
import {
|
|
11
7
|
assertFlags
|
|
12
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-n2hng3gv.js";
|
|
13
9
|
import {
|
|
14
10
|
callControlAPI
|
|
15
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-e23g9ywa.js";
|
|
16
12
|
import {
|
|
17
|
-
CliInputError,
|
|
18
13
|
EXIT_DEGRADED,
|
|
19
14
|
EXIT_ERROR,
|
|
20
15
|
EXIT_OK,
|
|
@@ -22,7 +17,11 @@ import {
|
|
|
22
17
|
resolveApiTenantId,
|
|
23
18
|
shellArg,
|
|
24
19
|
validateConfig
|
|
25
|
-
} from "./cli-
|
|
20
|
+
} from "./cli-99p2jh28.js";
|
|
21
|
+
import {
|
|
22
|
+
CliInputError
|
|
23
|
+
} from "./cli-k4tqwah4.js";
|
|
24
|
+
import"./cli-ns5fcnkz.js";
|
|
26
25
|
import"./cli-0v6na3yp.js";
|
|
27
26
|
|
|
28
27
|
// src/fix.ts
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CONCERN_CANDIDATE_KINDS,
|
|
3
|
-
HARNESS_ANALYZE_CONCERNS,
|
|
4
3
|
SEED_CANDIDATE_KIND_LABELS,
|
|
5
4
|
analystEventProgress,
|
|
6
5
|
analyzeHarnessPrompts,
|
|
@@ -23,7 +22,6 @@ import {
|
|
|
23
22
|
numericEnv,
|
|
24
23
|
numericEnvAllowZero,
|
|
25
24
|
promptNameFromPath,
|
|
26
|
-
readHarnessSyncState,
|
|
27
25
|
renderAnalystCandidateLines,
|
|
28
26
|
renderAnalystSeedLines,
|
|
29
27
|
renderExternalHarnessAnalystPrompt,
|
|
@@ -42,12 +40,22 @@ import {
|
|
|
42
40
|
writeHarnessAnalyzeResult,
|
|
43
41
|
writeHarnessArtifacts,
|
|
44
42
|
writeHumanProgress
|
|
45
|
-
} from "./cli-
|
|
43
|
+
} from "./cli-3n0gz4d0.js";
|
|
44
|
+
import {
|
|
45
|
+
readHarnessSyncState
|
|
46
|
+
} from "./cli-xq45etg1.js";
|
|
46
47
|
import"./cli-97fnztpy.js";
|
|
47
|
-
import
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
import"./cli-
|
|
48
|
+
import {
|
|
49
|
+
HARNESS_ANALYZE_CONCERNS
|
|
50
|
+
} from "./cli-cesds766.js";
|
|
51
|
+
import"./cli-qpq84eee.js";
|
|
52
|
+
import"./cli-dr6x0zv7.js";
|
|
53
|
+
import"./cli-n2hng3gv.js";
|
|
54
|
+
import"./cli-e23g9ywa.js";
|
|
55
|
+
import"./cli-99p2jh28.js";
|
|
56
|
+
import"./cli-k4tqwah4.js";
|
|
57
|
+
import"./cli-9kfxkxmk.js";
|
|
58
|
+
import"./cli-ns5fcnkz.js";
|
|
51
59
|
import"./cli-0v6na3yp.js";
|
|
52
60
|
export {
|
|
53
61
|
writeHumanProgress,
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildSourceSnapshot
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-3n0gz4d0.js";
|
|
4
|
+
import"./cli-xq45etg1.js";
|
|
4
5
|
import"./cli-97fnztpy.js";
|
|
5
|
-
import"./cli-
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-
|
|
6
|
+
import"./cli-cesds766.js";
|
|
7
|
+
import"./cli-qpq84eee.js";
|
|
8
|
+
import"./cli-dr6x0zv7.js";
|
|
9
|
+
import"./cli-n2hng3gv.js";
|
|
10
|
+
import"./cli-e23g9ywa.js";
|
|
8
11
|
import {
|
|
9
12
|
recordApiRequest
|
|
10
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-99p2jh28.js";
|
|
14
|
+
import"./cli-k4tqwah4.js";
|
|
15
|
+
import"./cli-9kfxkxmk.js";
|
|
16
|
+
import"./cli-ns5fcnkz.js";
|
|
11
17
|
import"./cli-0v6na3yp.js";
|
|
12
18
|
|
|
13
19
|
// src/harness-github-actions.ts
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
HARNESS_ANALYZE_CONCERNS,
|
|
3
|
+
HARNESS_REPORT_APPROVAL_PATH,
|
|
4
|
+
HARNESS_REPORT_APPROVAL_SCHEMA_VERSION,
|
|
5
|
+
HARNESS_REPORT_MARKDOWN_PATH,
|
|
6
|
+
HARNESS_REPORT_PATH,
|
|
7
|
+
HARNESS_REPORT_SCHEMA_VERSION,
|
|
8
|
+
HARNESS_REPORT_VALIDATION_PATH,
|
|
9
|
+
HARNESS_REPORT_VALIDATION_SCHEMA_VERSION,
|
|
10
|
+
approveHarnessReport,
|
|
11
|
+
artifactHasBody,
|
|
12
|
+
createHarnessReport,
|
|
13
|
+
firstEvidencePath,
|
|
14
|
+
graphForReport,
|
|
15
|
+
hashHarnessReport,
|
|
16
|
+
hashStableJson,
|
|
17
|
+
loadHarnessReportForSync,
|
|
18
|
+
normalizeHarnessReport,
|
|
19
|
+
readHarnessReport,
|
|
20
|
+
renderHarnessReportMarkdown,
|
|
21
|
+
requiresArtifactBody,
|
|
22
|
+
resolveHarnessReportPath,
|
|
23
|
+
stampRemoteSnapshotTruncation,
|
|
24
|
+
validateHarnessReport,
|
|
25
|
+
writeHarnessReportArtifacts
|
|
26
|
+
} from "./cli-cesds766.js";
|
|
27
|
+
import"./cli-k4tqwah4.js";
|
|
28
|
+
import"./cli-0v6na3yp.js";
|
|
29
|
+
export {
|
|
30
|
+
writeHarnessReportArtifacts,
|
|
31
|
+
validateHarnessReport,
|
|
32
|
+
stampRemoteSnapshotTruncation,
|
|
33
|
+
resolveHarnessReportPath,
|
|
34
|
+
requiresArtifactBody,
|
|
35
|
+
renderHarnessReportMarkdown,
|
|
36
|
+
readHarnessReport,
|
|
37
|
+
normalizeHarnessReport,
|
|
38
|
+
loadHarnessReportForSync,
|
|
39
|
+
hashStableJson,
|
|
40
|
+
hashHarnessReport,
|
|
41
|
+
graphForReport,
|
|
42
|
+
firstEvidencePath,
|
|
43
|
+
createHarnessReport,
|
|
44
|
+
artifactHasBody,
|
|
45
|
+
approveHarnessReport,
|
|
46
|
+
HARNESS_REPORT_VALIDATION_SCHEMA_VERSION,
|
|
47
|
+
HARNESS_REPORT_VALIDATION_PATH,
|
|
48
|
+
HARNESS_REPORT_SCHEMA_VERSION,
|
|
49
|
+
HARNESS_REPORT_PATH,
|
|
50
|
+
HARNESS_REPORT_MARKDOWN_PATH,
|
|
51
|
+
HARNESS_REPORT_APPROVAL_SCHEMA_VERSION,
|
|
52
|
+
HARNESS_REPORT_APPROVAL_PATH,
|
|
53
|
+
HARNESS_ANALYZE_CONCERNS
|
|
54
|
+
};
|
|
@@ -1,24 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
selectTenantAndCreateKey
|
|
3
|
-
} from "./cli-0pkc8jhg.js";
|
|
4
|
-
import"./cli-ccjfwzqx.js";
|
|
5
1
|
import {
|
|
6
2
|
buildDoctorReport
|
|
7
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-ny48a8de.js";
|
|
4
|
+
import {
|
|
5
|
+
selectTenantAndCreateKey
|
|
6
|
+
} from "./cli-9bgk5jeh.js";
|
|
7
|
+
import"./cli-97jew729.js";
|
|
8
8
|
import {
|
|
9
9
|
ConnectCodeError,
|
|
10
10
|
connectWithCode,
|
|
11
11
|
loadAuthSession,
|
|
12
12
|
loadToken,
|
|
13
13
|
login
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-9bgnvth2.js";
|
|
15
|
+
import {
|
|
16
|
+
bundledSkillsDir,
|
|
17
|
+
installIntegrationSkill,
|
|
18
|
+
readBundledIndex
|
|
19
|
+
} from "./cli-frhm2wz7.js";
|
|
20
|
+
import {
|
|
21
|
+
agentsMdProblem,
|
|
22
|
+
runSkillSync
|
|
23
|
+
} from "./cli-mg5zv4s6.js";
|
|
24
|
+
import {
|
|
25
|
+
detectAgents,
|
|
26
|
+
installRules,
|
|
27
|
+
summarizeInstall
|
|
28
|
+
} from "./cli-8dtnwp9r.js";
|
|
15
29
|
import {
|
|
16
30
|
initPrompts,
|
|
17
31
|
runPromptSync
|
|
18
|
-
} from "./cli-
|
|
32
|
+
} from "./cli-3retgh64.js";
|
|
19
33
|
import"./cli-mm48br00.js";
|
|
20
34
|
import {
|
|
21
|
-
canonicalText,
|
|
22
35
|
codingAgentDisplayName,
|
|
23
36
|
describeCodingAgentEvent,
|
|
24
37
|
describeSyncIdentity,
|
|
@@ -27,46 +40,41 @@ import {
|
|
|
27
40
|
isDeterministicLocalAnalyst,
|
|
28
41
|
isRecoverableRemoteRun,
|
|
29
42
|
pollRemoteAnalyzeUntilDone,
|
|
43
|
+
runCodingAgent,
|
|
44
|
+
runHarnessCommand,
|
|
45
|
+
startRemoteAnalyze
|
|
46
|
+
} from "./cli-3n0gz4d0.js";
|
|
47
|
+
import {
|
|
48
|
+
canonicalText,
|
|
30
49
|
renderInitBanner,
|
|
31
50
|
renderInitComplete,
|
|
32
51
|
renderInitNote,
|
|
33
52
|
renderInitSetupPlan,
|
|
34
|
-
renderInitStep
|
|
35
|
-
|
|
36
|
-
runHarnessCommand,
|
|
37
|
-
startRemoteAnalyze
|
|
38
|
-
} from "./cli-qwgct6x7.js";
|
|
53
|
+
renderInitStep
|
|
54
|
+
} from "./cli-xq45etg1.js";
|
|
39
55
|
import {
|
|
40
56
|
stripAnsi
|
|
41
57
|
} from "./cli-97fnztpy.js";
|
|
42
|
-
import
|
|
43
|
-
|
|
44
|
-
installIntegrationSkill,
|
|
45
|
-
readBundledIndex
|
|
46
|
-
} from "./cli-frhm2wz7.js";
|
|
47
|
-
import {
|
|
48
|
-
agentsMdProblem,
|
|
49
|
-
runSkillSync
|
|
50
|
-
} from "./cli-6et4z504.js";
|
|
58
|
+
import"./cli-cesds766.js";
|
|
59
|
+
import"./cli-qpq84eee.js";
|
|
51
60
|
import {
|
|
52
61
|
createCommandContext
|
|
53
|
-
} from "./cli-
|
|
54
|
-
import"./cli-
|
|
55
|
-
import"./cli-
|
|
62
|
+
} from "./cli-dr6x0zv7.js";
|
|
63
|
+
import"./cli-n2hng3gv.js";
|
|
64
|
+
import"./cli-e23g9ywa.js";
|
|
56
65
|
import {
|
|
57
|
-
CliAuthError,
|
|
58
|
-
CliInputError,
|
|
59
66
|
VERSION,
|
|
60
67
|
recordApiRequest,
|
|
61
68
|
resolveIngestUrl,
|
|
62
69
|
resolveModaBaseUrl,
|
|
63
70
|
shellArg
|
|
64
|
-
} from "./cli-
|
|
71
|
+
} from "./cli-99p2jh28.js";
|
|
65
72
|
import {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
73
|
+
CliAuthError,
|
|
74
|
+
CliInputError
|
|
75
|
+
} from "./cli-k4tqwah4.js";
|
|
76
|
+
import"./cli-9kfxkxmk.js";
|
|
77
|
+
import"./cli-ns5fcnkz.js";
|
|
70
78
|
import"./cli-0v6na3yp.js";
|
|
71
79
|
|
|
72
80
|
// src/init/index.ts
|
|
@@ -2123,7 +2131,7 @@ Harness analysis keeps running on Moda. Resume anytime with \`${HARNESS_PULL_REC
|
|
|
2123
2131
|
laneBoard?.update("sdk", message);
|
|
2124
2132
|
emitLaneProgress("apply", "sdk", message);
|
|
2125
2133
|
},
|
|
2126
|
-
onPhase: (
|
|
2134
|
+
onPhase: (_phase, message) => {
|
|
2127
2135
|
laneBoard?.update("sdk", message);
|
|
2128
2136
|
emitLaneProgress("apply", "sdk", message);
|
|
2129
2137
|
},
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
contextTarget,
|
|
7
7
|
frustrationAnchorIndex,
|
|
8
8
|
frustrationsFromEmotions
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-fwpqghgc.js";
|
|
10
10
|
import {
|
|
11
11
|
renderMarkdownForTerminal,
|
|
12
12
|
shouldColorTerminalOutput,
|
|
@@ -16,20 +16,23 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
callControlAPI,
|
|
18
18
|
callDataAPI
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-e23g9ywa.js";
|
|
20
20
|
import {
|
|
21
|
-
CliAuthError,
|
|
22
|
-
CliInputError,
|
|
23
21
|
EXIT_DEGRADED,
|
|
24
22
|
EXIT_OK,
|
|
25
|
-
apiErrorStatus,
|
|
26
23
|
apiKeyHeaders,
|
|
27
24
|
recordApiRequest,
|
|
28
25
|
resolveApiKey,
|
|
29
26
|
resolveModaBaseUrl,
|
|
30
27
|
safeWriteStderr,
|
|
31
28
|
shellArg
|
|
32
|
-
} from "./cli-
|
|
29
|
+
} from "./cli-99p2jh28.js";
|
|
30
|
+
import {
|
|
31
|
+
CliAuthError,
|
|
32
|
+
CliInputError,
|
|
33
|
+
apiErrorStatus
|
|
34
|
+
} from "./cli-k4tqwah4.js";
|
|
35
|
+
import"./cli-ns5fcnkz.js";
|
|
33
36
|
import"./cli-0v6na3yp.js";
|
|
34
37
|
|
|
35
38
|
// src/production-intelligence.ts
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
probeApiKey,
|
|
3
3
|
redactApiKey,
|
|
4
4
|
resolveApiKeyCredential
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-97jew729.js";
|
|
6
6
|
import {
|
|
7
7
|
authFetch,
|
|
8
8
|
clearAuthSession,
|
|
@@ -10,9 +10,8 @@ import {
|
|
|
10
10
|
loadAuthSession,
|
|
11
11
|
login,
|
|
12
12
|
revokeCliSessionToken
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-9bgnvth2.js";
|
|
14
14
|
import {
|
|
15
|
-
CliInputError,
|
|
16
15
|
DEFAULT_INGEST_URL,
|
|
17
16
|
EXIT_AUTH_REQUIRED,
|
|
18
17
|
EXIT_DEGRADED,
|
|
@@ -36,7 +35,11 @@ import {
|
|
|
36
35
|
setActiveProfile,
|
|
37
36
|
shellArg,
|
|
38
37
|
upsertProfile
|
|
39
|
-
} from "./cli-
|
|
38
|
+
} from "./cli-99p2jh28.js";
|
|
39
|
+
import {
|
|
40
|
+
CliInputError
|
|
41
|
+
} from "./cli-k4tqwah4.js";
|
|
42
|
+
import"./cli-ns5fcnkz.js";
|
|
40
43
|
import"./cli-0v6na3yp.js";
|
|
41
44
|
|
|
42
45
|
// src/profile-commands.ts
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import {
|
|
2
|
+
inventoryFiles,
|
|
3
|
+
safePromptEvidencePath
|
|
4
|
+
} from "./cli-3n0gz4d0.js";
|
|
5
|
+
import"./cli-xq45etg1.js";
|
|
6
|
+
import"./cli-97fnztpy.js";
|
|
7
|
+
import"./cli-cesds766.js";
|
|
8
|
+
import {
|
|
9
|
+
require_typescript
|
|
10
|
+
} from "./cli-qpq84eee.js";
|
|
11
|
+
import"./cli-dr6x0zv7.js";
|
|
12
|
+
import"./cli-n2hng3gv.js";
|
|
13
|
+
import"./cli-e23g9ywa.js";
|
|
14
|
+
import"./cli-99p2jh28.js";
|
|
15
|
+
import"./cli-k4tqwah4.js";
|
|
16
|
+
import"./cli-9kfxkxmk.js";
|
|
17
|
+
import"./cli-ns5fcnkz.js";
|
|
18
|
+
import {
|
|
19
|
+
__toESM
|
|
20
|
+
} from "./cli-0v6na3yp.js";
|
|
21
|
+
|
|
22
|
+
// src/prompt-attribution.ts
|
|
23
|
+
var import_typescript = __toESM(require_typescript(), 1);
|
|
24
|
+
import { dirname, extname, resolve } from "node:path";
|
|
25
|
+
function checkPromptAttribution(rootDir, keys) {
|
|
26
|
+
const result = { references: [], coverage: "partial", issues: [] };
|
|
27
|
+
const known = new Set(keys), lock = resolve(rootDir, ".moda/prompts.lock.json");
|
|
28
|
+
let files;
|
|
29
|
+
try {
|
|
30
|
+
files = inventoryFiles(rootDir, []);
|
|
31
|
+
} catch (error) {
|
|
32
|
+
result.issues.push({ path: ".", reason: `Attribution scan incomplete: ${error instanceof Error ? error.message : String(error)}` });
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
35
|
+
for (const file of files) {
|
|
36
|
+
if (![".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs"].includes(extname(file.path)) || !file.text?.includes("prompts.lock.json"))
|
|
37
|
+
continue;
|
|
38
|
+
if (/(^|\/)(?:tests?|__tests__|fixtures?)(\/|$)|\.(?:test|spec)\.[^.]+$/.test(file.path))
|
|
39
|
+
continue;
|
|
40
|
+
try {
|
|
41
|
+
const absolute = safePromptEvidencePath(rootDir, file.path);
|
|
42
|
+
const program = import_typescript.default.createProgram([absolute], { noResolve: true, noLib: true, types: [], allowJs: true });
|
|
43
|
+
const sf = program.getSourceFile(absolute);
|
|
44
|
+
if (!sf || program.getSyntacticDiagnostics(sf).length) {
|
|
45
|
+
result.issues.push({ path: file.path, reason: "Attribution source could not be parsed" });
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
const checker = program.getTypeChecker();
|
|
49
|
+
const declaration = (node) => {
|
|
50
|
+
const all = checker.getSymbolAtLocation(node)?.declarations;
|
|
51
|
+
return all?.length === 1 ? all[0] : undefined;
|
|
52
|
+
};
|
|
53
|
+
const imported = (node) => {
|
|
54
|
+
if (import_typescript.default.isImportSpecifier(node) && node.isTypeOnly)
|
|
55
|
+
return false;
|
|
56
|
+
let parent = node;
|
|
57
|
+
while (parent && !import_typescript.default.isImportDeclaration(parent))
|
|
58
|
+
parent = parent.parent;
|
|
59
|
+
return !!parent && import_typescript.default.isImportDeclaration(parent) && !parent.importClause?.isTypeOnly && import_typescript.default.isStringLiteral(parent.moduleSpecifier) && parent.moduleSpecifier.text.startsWith(".") && resolve(dirname(absolute), parent.moduleSpecifier.text) === lock;
|
|
60
|
+
};
|
|
61
|
+
const initializer = (node) => {
|
|
62
|
+
const decl = declaration(node);
|
|
63
|
+
return decl && import_typescript.default.isVariableDeclaration(decl) && import_typescript.default.isVariableDeclarationList(decl.parent) && !!(decl.parent.flags & import_typescript.default.NodeFlags.Const) ? decl.initializer : undefined;
|
|
64
|
+
};
|
|
65
|
+
const unwrap = (node) => {
|
|
66
|
+
while (import_typescript.default.isParenthesizedExpression(node) || import_typescript.default.isAsExpression(node) || import_typescript.default.isTypeAssertionExpression(node) || import_typescript.default.isNonNullExpression(node))
|
|
67
|
+
node = node.expression;
|
|
68
|
+
return node;
|
|
69
|
+
};
|
|
70
|
+
const literal = (expression, seen = new Set) => {
|
|
71
|
+
const node = unwrap(expression);
|
|
72
|
+
if (seen.has(node))
|
|
73
|
+
return;
|
|
74
|
+
seen.add(node);
|
|
75
|
+
if (import_typescript.default.isStringLiteral(node) || import_typescript.default.isNoSubstitutionTemplateLiteral(node))
|
|
76
|
+
return node.text;
|
|
77
|
+
if (import_typescript.default.isIdentifier(node)) {
|
|
78
|
+
const init = initializer(node);
|
|
79
|
+
return init ? literal(init, seen) : undefined;
|
|
80
|
+
}
|
|
81
|
+
if (import_typescript.default.isBinaryExpression(node) && node.operatorToken.kind === import_typescript.default.SyntaxKind.PlusToken) {
|
|
82
|
+
const a = literal(node.left, new Set(seen)), b = literal(node.right, new Set(seen));
|
|
83
|
+
return a !== undefined && b !== undefined ? a + b : undefined;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
const lockPath = (node) => import_typescript.default.isStringLiteral(node) && node.text.startsWith(".") && resolve(dirname(absolute), node.text) === lock;
|
|
87
|
+
const isConstBinding = (node) => import_typescript.default.isVariableDeclarationList(node.parent) && !!(node.parent.flags & import_typescript.default.NodeFlags.Const);
|
|
88
|
+
const isLock = (expression, seen = new Set) => {
|
|
89
|
+
const node = unwrap(expression);
|
|
90
|
+
if (seen.has(node))
|
|
91
|
+
return false;
|
|
92
|
+
seen.add(node);
|
|
93
|
+
if (import_typescript.default.isCallExpression(node) && import_typescript.default.isIdentifier(node.expression) && node.expression.text === "require" && !declaration(node.expression) && node.arguments.length === 1)
|
|
94
|
+
return lockPath(node.arguments[0]);
|
|
95
|
+
if (!import_typescript.default.isIdentifier(node))
|
|
96
|
+
return false;
|
|
97
|
+
const decl = declaration(node);
|
|
98
|
+
if (decl && (import_typescript.default.isImportClause(decl) || import_typescript.default.isNamespaceImport(decl)))
|
|
99
|
+
return imported(decl);
|
|
100
|
+
const init = initializer(node);
|
|
101
|
+
return !!init && isLock(init, seen);
|
|
102
|
+
};
|
|
103
|
+
const isTable = (expression, seen = new Set) => {
|
|
104
|
+
const node = unwrap(expression);
|
|
105
|
+
if (seen.has(node))
|
|
106
|
+
return false;
|
|
107
|
+
seen.add(node);
|
|
108
|
+
if (import_typescript.default.isPropertyAccessExpression(node))
|
|
109
|
+
return node.name.text === "prompts" && isLock(node.expression);
|
|
110
|
+
if (import_typescript.default.isElementAccessExpression(node))
|
|
111
|
+
return literal(node.argumentExpression) === "prompts" && isLock(node.expression);
|
|
112
|
+
if (import_typescript.default.isIdentifier(node)) {
|
|
113
|
+
const decl = declaration(node);
|
|
114
|
+
if (decl && import_typescript.default.isBindingElement(decl) && import_typescript.default.isObjectBindingPattern(decl.parent) && import_typescript.default.isVariableDeclaration(decl.parent.parent)) {
|
|
115
|
+
const owner = decl.parent.parent;
|
|
116
|
+
const name = decl.propertyName ?? decl.name;
|
|
117
|
+
if (!decl.dotDotDotToken && !decl.initializer && (import_typescript.default.isIdentifier(name) || import_typescript.default.isStringLiteral(name)) && name.text === "prompts" && isConstBinding(owner) && owner.initializer)
|
|
118
|
+
return isLock(owner.initializer);
|
|
119
|
+
}
|
|
120
|
+
if (decl && import_typescript.default.isImportSpecifier(decl))
|
|
121
|
+
return (decl.propertyName?.text ?? decl.name.text) === "prompts" && imported(decl);
|
|
122
|
+
const init = initializer(node);
|
|
123
|
+
return !!init && isTable(init, seen);
|
|
124
|
+
}
|
|
125
|
+
return false;
|
|
126
|
+
};
|
|
127
|
+
const visit = (node) => {
|
|
128
|
+
if ((import_typescript.default.isElementAccessExpression(node) || import_typescript.default.isPropertyAccessExpression(node)) && isTable(node.expression)) {
|
|
129
|
+
const key = import_typescript.default.isElementAccessExpression(node) ? literal(node.argumentExpression) : node.name.text;
|
|
130
|
+
result.references.push({
|
|
131
|
+
path: file.path,
|
|
132
|
+
line: sf.getLineAndCharacterOfPosition(node.getStart(sf)).line + 1,
|
|
133
|
+
key,
|
|
134
|
+
status: key === undefined ? "unresolved" : known.has(key) ? "mapped" : "missing"
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
import_typescript.default.forEachChild(node, visit);
|
|
138
|
+
};
|
|
139
|
+
visit(sf);
|
|
140
|
+
} catch (error) {
|
|
141
|
+
result.issues.push({ path: file.path, reason: error instanceof Error ? error.message : String(error) });
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return result;
|
|
145
|
+
}
|
|
146
|
+
export {
|
|
147
|
+
checkPromptAttribution
|
|
148
|
+
};
|
|
@@ -2,15 +2,22 @@
|
|
|
2
2
|
import {
|
|
3
3
|
checkPromptMapping,
|
|
4
4
|
discoverHarnessPromptSources,
|
|
5
|
-
inspectCodeSelectors,
|
|
6
|
-
inspectPythonSelectors,
|
|
7
5
|
safePromptEvidencePath
|
|
8
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-3n0gz4d0.js";
|
|
7
|
+
import"./cli-xq45etg1.js";
|
|
9
8
|
import"./cli-97fnztpy.js";
|
|
10
|
-
import"./cli-
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
import"./cli-cesds766.js";
|
|
10
|
+
import {
|
|
11
|
+
inspectCodeSelectors,
|
|
12
|
+
inspectPythonSelectors
|
|
13
|
+
} from "./cli-qpq84eee.js";
|
|
14
|
+
import"./cli-dr6x0zv7.js";
|
|
15
|
+
import"./cli-n2hng3gv.js";
|
|
16
|
+
import"./cli-e23g9ywa.js";
|
|
17
|
+
import"./cli-99p2jh28.js";
|
|
18
|
+
import"./cli-k4tqwah4.js";
|
|
19
|
+
import"./cli-9kfxkxmk.js";
|
|
20
|
+
import"./cli-ns5fcnkz.js";
|
|
14
21
|
import {
|
|
15
22
|
__commonJS,
|
|
16
23
|
__toESM
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
backfillPromptSource,
|
|
3
|
+
discoverCodePromptCandidates,
|
|
4
|
+
discoverCodePromptSources,
|
|
5
|
+
discoverStructuredPromptSources,
|
|
6
|
+
resolvePromptSource,
|
|
7
|
+
validatePromptSource
|
|
8
|
+
} from "./cli-qpq84eee.js";
|
|
9
|
+
import"./cli-9kfxkxmk.js";
|
|
10
|
+
import"./cli-ns5fcnkz.js";
|
|
11
|
+
import"./cli-0v6na3yp.js";
|
|
12
|
+
export {
|
|
13
|
+
validatePromptSource,
|
|
14
|
+
resolvePromptSource,
|
|
15
|
+
discoverStructuredPromptSources,
|
|
16
|
+
discoverCodePromptSources,
|
|
17
|
+
discoverCodePromptCandidates,
|
|
18
|
+
backfillPromptSource
|
|
19
|
+
};
|
|
@@ -11,16 +11,17 @@ import {
|
|
|
11
11
|
runPromptSync,
|
|
12
12
|
runPromptsCommand,
|
|
13
13
|
writePromptSyncProgress
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-3retgh64.js";
|
|
15
15
|
import {
|
|
16
16
|
promptSourceHashPayload
|
|
17
17
|
} from "./cli-mm48br00.js";
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
23
|
-
import"./cli-
|
|
18
|
+
import"./cli-dr6x0zv7.js";
|
|
19
|
+
import"./cli-n2hng3gv.js";
|
|
20
|
+
import"./cli-e23g9ywa.js";
|
|
21
|
+
import"./cli-99p2jh28.js";
|
|
22
|
+
import"./cli-k4tqwah4.js";
|
|
23
|
+
import"./cli-9kfxkxmk.js";
|
|
24
|
+
import"./cli-ns5fcnkz.js";
|
|
24
25
|
import"./cli-0v6na3yp.js";
|
|
25
26
|
export {
|
|
26
27
|
writePromptSyncProgress,
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_PROBLEM_MAX_CASES,
|
|
3
|
+
MAX_AUTO_GENERATE_CASES,
|
|
4
|
+
MAX_REPLAY_TRACES,
|
|
5
|
+
PLAYOUT_CONFIRM_THRESHOLD,
|
|
6
|
+
REPLAY_MODEL_ALLOWLIST,
|
|
7
|
+
TERMINAL_RUN_STATUSES,
|
|
8
|
+
assertAllowedModel,
|
|
9
|
+
assertArmSourceShape,
|
|
10
|
+
assertPlayoutBudget,
|
|
11
|
+
candidateOutcome,
|
|
12
|
+
describePlayouts,
|
|
13
|
+
describeProblemCases,
|
|
14
|
+
enqueueAndPollComparison,
|
|
15
|
+
fetchProblemCases,
|
|
16
|
+
fetchReplaySetCases,
|
|
17
|
+
formatVerdict,
|
|
18
|
+
parseTraceRef,
|
|
19
|
+
planReplaySet,
|
|
20
|
+
replayCasePin,
|
|
21
|
+
rerunWithYes,
|
|
22
|
+
resolvePromptArmSpec,
|
|
23
|
+
runPromptAb,
|
|
24
|
+
selectProblemCases,
|
|
25
|
+
waitLabel
|
|
26
|
+
} from "./cli-yf39avhh.js";
|
|
27
|
+
import {
|
|
28
|
+
DEFAULT_POLL_INTERVAL_MS,
|
|
29
|
+
DEFAULT_WAIT_TIMEOUT_MS,
|
|
30
|
+
fetchLatestRun
|
|
31
|
+
} from "./cli-yz8xcpyk.js";
|
|
32
|
+
import"./cli-3retgh64.js";
|
|
33
|
+
import"./cli-mm48br00.js";
|
|
34
|
+
import"./cli-dr6x0zv7.js";
|
|
35
|
+
import"./cli-n2hng3gv.js";
|
|
36
|
+
import"./cli-e23g9ywa.js";
|
|
37
|
+
import"./cli-99p2jh28.js";
|
|
38
|
+
import"./cli-k4tqwah4.js";
|
|
39
|
+
import"./cli-9kfxkxmk.js";
|
|
40
|
+
import"./cli-ns5fcnkz.js";
|
|
41
|
+
import"./cli-0v6na3yp.js";
|
|
42
|
+
export {
|
|
43
|
+
waitLabel,
|
|
44
|
+
selectProblemCases,
|
|
45
|
+
runPromptAb,
|
|
46
|
+
resolvePromptArmSpec,
|
|
47
|
+
rerunWithYes,
|
|
48
|
+
replayCasePin,
|
|
49
|
+
planReplaySet,
|
|
50
|
+
parseTraceRef,
|
|
51
|
+
formatVerdict,
|
|
52
|
+
fetchReplaySetCases,
|
|
53
|
+
fetchProblemCases,
|
|
54
|
+
fetchLatestRun,
|
|
55
|
+
enqueueAndPollComparison,
|
|
56
|
+
describeProblemCases,
|
|
57
|
+
describePlayouts,
|
|
58
|
+
candidateOutcome,
|
|
59
|
+
assertPlayoutBudget,
|
|
60
|
+
assertArmSourceShape,
|
|
61
|
+
assertAllowedModel,
|
|
62
|
+
TERMINAL_RUN_STATUSES,
|
|
63
|
+
REPLAY_MODEL_ALLOWLIST,
|
|
64
|
+
PLAYOUT_CONFIRM_THRESHOLD,
|
|
65
|
+
MAX_REPLAY_TRACES,
|
|
66
|
+
MAX_AUTO_GENERATE_CASES,
|
|
67
|
+
DEFAULT_WAIT_TIMEOUT_MS,
|
|
68
|
+
DEFAULT_PROBLEM_MAX_CASES,
|
|
69
|
+
DEFAULT_POLL_INTERVAL_MS
|
|
70
|
+
};
|