@hwip/cli 0.1.14 → 0.1.15
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 +5 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -487,7 +487,8 @@ const handleNotify = async (args) => {
|
|
|
487
487
|
// dial now works for every hook-driven agent. Gated-out → silent success.
|
|
488
488
|
// With no dial the mode falls back to --pushmode-default, then to quiet.
|
|
489
489
|
// Quiet still pushes when the user has left the terminal (presence.ts).
|
|
490
|
-
|
|
490
|
+
const isAuto = (0, args_js_1.flagOn)(args, 'auto');
|
|
491
|
+
if (isAuto) {
|
|
491
492
|
const marker = (0, gate_js_1.normalizeMarker)(typeof args.marker === 'string' ? args.marker : undefined);
|
|
492
493
|
const pushMode = (0, gate_js_1.autoPushMode)(projectDir, args[gate_js_1.PUSHMODE_DEFAULT_FLAG]);
|
|
493
494
|
const verdict = (0, gate_js_1.decidePush)({
|
|
@@ -505,7 +506,7 @@ const handleNotify = async (args) => {
|
|
|
505
506
|
}
|
|
506
507
|
// Past the gates, this IS a push attempt — its outcome is recorded for
|
|
507
508
|
// `hwip verify` and the plugin (notify-failure.ts), since hooks discard stderr.
|
|
508
|
-
const hook = createHook(args,
|
|
509
|
+
const hook = createHook(args, isAuto ? HOOK_REQUEST_TIMEOUT_MS : undefined);
|
|
509
510
|
if (!hook) {
|
|
510
511
|
(0, notify_failure_js_1.recordNotifyFailure)({ kind: 'no-key', status: null, code: null });
|
|
511
512
|
return 3;
|
|
@@ -532,10 +533,11 @@ const handleNotify = async (args) => {
|
|
|
532
533
|
targetDeviceId: args.device,
|
|
533
534
|
sessionId,
|
|
534
535
|
}));
|
|
536
|
+
// Hook mode: stdout is the hook's response (Codex parses it as JSON), so stay silent.
|
|
535
537
|
if (isJson) {
|
|
536
538
|
printJson({ pushId: result.pushId, status: 'ok' });
|
|
537
539
|
}
|
|
538
|
-
else {
|
|
540
|
+
else if (!isAuto) {
|
|
539
541
|
console.log(`Push sent: ${result.pushId}`);
|
|
540
542
|
}
|
|
541
543
|
return 0;
|