@staff0rd/assist 0.330.3 → 0.330.4
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 +10 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.330.
|
|
9
|
+
version: "0.330.4",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -3901,13 +3901,19 @@ var daemonPaths = {
|
|
|
3901
3901
|
// src/commands/sessions/daemon/ensureHooksSettings.ts
|
|
3902
3902
|
var RUNNING = "assist sessions set-status running";
|
|
3903
3903
|
var WAITING = "assist sessions set-status waiting";
|
|
3904
|
-
function on(command) {
|
|
3905
|
-
|
|
3904
|
+
function on(command, matcher) {
|
|
3905
|
+
const hooks = [{ type: "command", command }];
|
|
3906
|
+
return [matcher == null ? { hooks } : { matcher, hooks }];
|
|
3906
3907
|
}
|
|
3908
|
+
var ASK_USER_QUESTION = "AskUserQuestion";
|
|
3909
|
+
var NOT_ASK_USER_QUESTION = `^(?!${ASK_USER_QUESTION}$).*`;
|
|
3907
3910
|
var hooksSettings = {
|
|
3908
3911
|
hooks: {
|
|
3909
3912
|
UserPromptSubmit: on(RUNNING),
|
|
3910
|
-
PreToolUse:
|
|
3913
|
+
PreToolUse: [
|
|
3914
|
+
...on(WAITING, ASK_USER_QUESTION),
|
|
3915
|
+
...on(RUNNING, NOT_ASK_USER_QUESTION)
|
|
3916
|
+
],
|
|
3911
3917
|
// tool finished, agent resumes; restores running
|
|
3912
3918
|
PostToolUse: on(RUNNING),
|
|
3913
3919
|
Stop: on(WAITING),
|