@devness/useai-cli 0.4.17 → 0.4.19
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/index.js +6 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4899,13 +4899,13 @@ process.stdin.on('end', () => {
|
|
|
4899
4899
|
if (!hook.transcript_path) process.exit(0);
|
|
4900
4900
|
let transcript;
|
|
4901
4901
|
try { transcript = readFileSync(hook.transcript_path, 'utf-8'); } catch { process.exit(0); }
|
|
4902
|
-
var starts = (transcript.match(/
|
|
4902
|
+
var starts = (transcript.match(/useai_start/g) || []).length;
|
|
4903
4903
|
if (starts === 0) process.exit(0);
|
|
4904
|
-
var ends = (transcript.match(/
|
|
4904
|
+
var ends = (transcript.match(/useai_end/g) || []).length;
|
|
4905
4905
|
if (ends >= starts) process.exit(0);
|
|
4906
4906
|
process.stdout.write(JSON.stringify({
|
|
4907
4907
|
decision: 'block',
|
|
4908
|
-
reason: 'Before ending, call
|
|
4908
|
+
reason: 'Before ending, call useai_end with milestones (generic descriptions of accomplishments), languages used, and files_touched_count.'
|
|
4909
4909
|
}));
|
|
4910
4910
|
} catch { process.exit(0); }
|
|
4911
4911
|
});
|
|
@@ -4922,13 +4922,13 @@ process.stdin.on('end', () => {
|
|
|
4922
4922
|
if (!hook.transcript_path) process.exit(0);
|
|
4923
4923
|
let transcript;
|
|
4924
4924
|
try { transcript = readFileSync(hook.transcript_path, 'utf-8'); } catch { process.exit(0); }
|
|
4925
|
-
var starts = (transcript.match(/
|
|
4926
|
-
var ends = (transcript.match(/
|
|
4925
|
+
var starts = (transcript.match(/useai_start/g) || []).length;
|
|
4926
|
+
var ends = (transcript.match(/useai_end/g) || []).length;
|
|
4927
4927
|
if (starts > ends) process.exit(0);
|
|
4928
4928
|
process.stdout.write(JSON.stringify({
|
|
4929
4929
|
hookSpecificOutput: {
|
|
4930
4930
|
hookEventName: 'UserPromptSubmit',
|
|
4931
|
-
additionalContext: 'UseAI: Call
|
|
4931
|
+
additionalContext: 'UseAI: Call useai_start with the appropriate task_type before doing any work.'
|
|
4932
4932
|
}
|
|
4933
4933
|
}));
|
|
4934
4934
|
} catch { process.exit(0); }
|