log-llm-config 1.3.12 → 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.
- package/dist/cli.js +3 -1
- package/dist/compliance_prompt_gate.js +10 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -29,7 +29,9 @@ const main = async () => {
|
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
31
|
if (args[0] === 'compliance_prompt_gate') {
|
|
32
|
-
await import('./compliance_prompt_gate.js');
|
|
32
|
+
const { runCompliancePromptGateCli } = await import('./compliance_prompt_gate.js');
|
|
33
|
+
await runCompliancePromptGateCli();
|
|
34
|
+
process.exit(0);
|
|
33
35
|
return;
|
|
34
36
|
}
|
|
35
37
|
if (args[0] === 'compliance_check_runner') {
|
|
@@ -82,7 +82,15 @@ function autofixDialogLine(v) {
|
|
|
82
82
|
const short = d.length > 160 ? `${d.slice(0, 157)}…` : d;
|
|
83
83
|
return `• [${v.finding_formatted_id}] ${short}`;
|
|
84
84
|
}
|
|
85
|
-
/**
|
|
85
|
+
/**
|
|
86
|
+
* Entry when the default npm bin (`log-llm-config` / cli.js) dispatches
|
|
87
|
+
* `compliance_prompt_gate` — npx does not execute compliance_prompt_gate.js as argv[1], so
|
|
88
|
+
* {@link isRunAsCliModule} is false and the gate must be invoked explicitly from cli.ts.
|
|
89
|
+
*/
|
|
90
|
+
export async function runCompliancePromptGateCli() {
|
|
91
|
+
await runCompliancePromptGate().catch(() => printAllow(parseIde()));
|
|
92
|
+
}
|
|
93
|
+
/** Exported for tests; runs when `dist/compliance_prompt_gate.js` is the process entry (argv[1]). */
|
|
86
94
|
export async function runCompliancePromptGate() {
|
|
87
95
|
const ide = parseIde();
|
|
88
96
|
hookLogSessionBanner('compliance_prompt_gate (before submit)');
|
|
@@ -152,5 +160,5 @@ export async function runCompliancePromptGate() {
|
|
|
152
160
|
printAllow(ide);
|
|
153
161
|
}
|
|
154
162
|
if (isRunAsCliModule()) {
|
|
155
|
-
|
|
163
|
+
runCompliancePromptGateCli().finally(() => process.exit(0));
|
|
156
164
|
}
|