@pushary/agent-hooks 1.9.26 → 1.9.28
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/CHANGELOG.md +17 -0
- package/data/SKILL.md +1 -1
- package/data/cursor-plugin/skills/pushary/SKILL.md +1 -1
- package/data/vscode-plugin/skills/pushary/SKILL.md +1 -1
- package/dist/bin/pushary-bell-hook.js +25 -25
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +24 -24
- package/dist/bin/pushary-clean.js +29 -29
- package/dist/bin/pushary-codex-bridge.js +17 -17
- package/dist/bin/pushary-codex-hook.js +32 -32
- package/dist/bin/pushary-codex.js +12 -12
- package/dist/bin/pushary-connect.js +24 -24
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +36 -32
- package/dist/bin/pushary-disconnect.js +24 -24
- package/dist/bin/pushary-doctor.js +35 -35
- package/dist/bin/pushary-elicitation-hook.js +25 -25
- package/dist/bin/pushary-gemini-bridge.js +13 -13
- package/dist/bin/pushary-gemini-hook.js +29 -29
- package/dist/bin/pushary-hook.js +40 -32
- package/dist/bin/pushary-login.js +12 -12
- package/dist/bin/pushary-logout.js +24 -24
- package/dist/bin/pushary-mcp.js +9 -9
- package/dist/bin/pushary-mode.js +12 -12
- package/dist/bin/pushary-notification-hook.js +24 -24
- package/dist/bin/pushary-opencode-hook.js +26 -26
- package/dist/bin/pushary-permission-denied-hook.js +29 -29
- package/dist/bin/pushary-permission-hook.js +28 -28
- package/dist/bin/pushary-post-hook.js +24 -24
- package/dist/bin/pushary-prompt-hook.js +24 -24
- package/dist/bin/pushary-session-end-hook.js +24 -24
- package/dist/bin/pushary-session-start-hook.js +28 -28
- package/dist/bin/pushary-setup.js +35 -35
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +26 -26
- package/dist/bin/pushary-stop-hook.js +24 -24
- package/dist/bin/pushary-stopfailure-hook.js +24 -24
- package/dist/bin/pushary-suggestions.js +12 -12
- package/dist/bin/pushary-transcript-register.js +17 -17
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +30 -30
- package/dist/bin/pushary-wait.js +12 -12
- package/dist/bin/pushary.js +6 -6
- package/dist/{chunk-SCFKXAHX.js → chunk-3OFFLLSJ.js} +21 -13
- package/dist/{chunk-DDRSG6JL.js → chunk-3TF5FHAT.js} +5 -5
- package/dist/{chunk-PTJYAKZX.js → chunk-43DOHHZZ.js} +2 -2
- package/dist/{chunk-CXG7XA4E.js → chunk-56U55YDV.js} +3 -3
- package/dist/{chunk-GRL4VVUP.js → chunk-5NXOJ3JG.js} +3 -3
- package/dist/{chunk-MPBWPDXQ.js → chunk-64LLZV5F.js} +8 -7
- package/dist/{chunk-RQPJEYLM.js → chunk-74YRZTGP.js} +2 -2
- package/dist/{chunk-TVP5UU33.js → chunk-7DXPQW2H.js} +250 -38
- package/dist/{chunk-47RVFUEG.js → chunk-7RKX7WRQ.js} +1 -1
- package/dist/{chunk-F2HVTVQG.js → chunk-7TBCGHJT.js} +2 -2
- package/dist/{chunk-BWXRLXNE.js → chunk-7ZWU4BNG.js} +5 -5
- package/dist/{chunk-GEN4YTNR.js → chunk-A24TEUD6.js} +11 -11
- package/dist/{chunk-RZTIB2TY.js → chunk-AR7XOG6W.js} +1 -1
- package/dist/{chunk-4GKLAQY4.js → chunk-AXGA3WJI.js} +1 -1
- package/dist/{chunk-3DLVLVEM.js → chunk-BG7T5MNV.js} +1 -1
- package/dist/{chunk-2YF72RC5.js → chunk-BXUYF5HB.js} +3 -3
- package/dist/{chunk-3ZDIA6ZC.js → chunk-CJTTAF4O.js} +3 -3
- package/dist/{chunk-L62RNE5F.js → chunk-COEOZ2NC.js} +5 -5
- package/dist/{chunk-KTRRDTZN.js → chunk-EBO5KWWC.js} +1 -1
- package/dist/{chunk-5FL4M4YF.js → chunk-EP425PGA.js} +8 -8
- package/dist/{chunk-BIV2LKDK.js → chunk-FD3QASU3.js} +18 -9
- package/dist/{chunk-GPDABKLD.js → chunk-FY2XCYLK.js} +5 -5
- package/dist/{chunk-BIKHLGEL.js → chunk-FYYWKCPO.js} +2 -2
- package/dist/{chunk-ZPLDPPZO.js → chunk-GXZFDZJG.js} +1 -1
- package/dist/{chunk-NCAVDVXP.js → chunk-HRAZMBUX.js} +1 -1
- package/dist/{chunk-CW72FZ2M.js → chunk-ICMVPBRQ.js} +2 -2
- package/dist/{chunk-3HBLQXCJ.js → chunk-IDXEDMWI.js} +3 -3
- package/dist/{chunk-4YWINUPJ.js → chunk-IWPQBWFN.js} +1 -1
- package/dist/{chunk-TS3CRCI7.js → chunk-IWYBFBRW.js} +32 -4
- package/dist/{chunk-AF2QZRYH.js → chunk-JOZWN4YI.js} +32 -22
- package/dist/{chunk-KJ2W7ECE.js → chunk-L5ZMZOQL.js} +2 -2
- package/dist/{chunk-LGMSGVDN.js → chunk-ME2PKG7C.js} +2 -2
- package/dist/{chunk-OGTWSEWN.js → chunk-MNHY3EIN.js} +1 -1
- package/dist/{chunk-5UKZXDHV.js → chunk-OK4WDRGM.js} +1 -1
- package/dist/{chunk-PUJQFTKF.js → chunk-OQKV3OXH.js} +1 -1
- package/dist/{chunk-JXHJYLFF.js → chunk-S3NAONBN.js} +4 -4
- package/dist/{chunk-Y5O4TO7U.js → chunk-SGAQYFGS.js} +1 -1
- package/dist/{chunk-3TRGUDQ3.js → chunk-TAPGV2YV.js} +4 -4
- package/dist/{chunk-3G4R2FLX.js → chunk-UJZ3KD4E.js} +2 -2
- package/dist/{chunk-R5ABJ5H5.js → chunk-UMTGSFAI.js} +39 -10
- package/dist/{chunk-K4OV2VLB.js → chunk-URZOKMAV.js} +2 -2
- package/dist/{chunk-XUVKAWV3.js → chunk-V5BIWNB3.js} +1 -1
- package/dist/{chunk-FDT7KSQY.js → chunk-VAJLOCFP.js} +2 -2
- package/dist/{chunk-P7WJ2KKO.js → chunk-VU6O4P2N.js} +5 -5
- package/dist/{chunk-IU5PAJDG.js → chunk-VYKUGORF.js} +4 -4
- package/dist/{chunk-CA2EOOZG.js → chunk-W6MUIG6S.js} +3 -3
- package/dist/{chunk-XDTGYZIT.js → chunk-WIAWMH6T.js} +4 -4
- package/dist/{chunk-FA3YPD4P.js → chunk-YRB2VBKK.js} +2 -2
- package/dist/{chunk-I52A3NLY.js → chunk-YTCMVHW5.js} +1 -1
- package/dist/{chunk-TEQJNXJH.js → chunk-YW7JQ7Z4.js} +5 -5
- package/dist/{chunk-ZXYHVZZZ.js → chunk-ZH32OREM.js} +1 -1
- package/dist/{chunk-PPOQG2U6.js → chunk-ZMWCN3QS.js} +4 -4
- package/dist/{chunk-AG5ATWVT.js → chunk-ZREXC363.js} +3 -3
- package/dist/{chunk-AXOMDPA7.js → chunk-ZX5ISG5O.js} +10 -9
- package/dist/{global-upgrade-3XKMGVAR.js → global-upgrade-MBW4MRJ2.js} +6 -6
- package/dist/{paths-UB2IUM57.js → paths-H4XMIYUS.js} +2 -2
- package/dist/{reapply-B7KMGQH7.js → reapply-JFEY77OC.js} +22 -20
- package/dist/src/index.js +19 -19
- package/dist/{upgrade-lock-6LLAEJTW.js → upgrade-lock-2RGMG5ZV.js} +3 -3
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETUP_FLAGS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SGAQYFGS.js";
|
|
4
4
|
import {
|
|
5
5
|
parseFlags
|
|
6
6
|
} from "./chunk-GMXKITVA.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-7QLSKOSU.js";
|
|
10
10
|
import {
|
|
11
11
|
NPX_LATEST_COMMAND
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7RKX7WRQ.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_CONNECTOR_GUIDE,
|
|
15
15
|
CLAUDE_CONNECTOR_STEPS,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
CLAUDE_CONNECTOR_URL,
|
|
18
18
|
COWORK_CONNECTOR_LIMIT,
|
|
19
19
|
COWORK_STANDING_INSTRUCTIONS
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-7DXPQW2H.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/cowork.ts
|
|
23
23
|
import { readFileSync } from "fs";
|
|
@@ -2,23 +2,23 @@ import {
|
|
|
2
2
|
CLAUDE_HOOK_EVENTS,
|
|
3
3
|
GEMINI_HOOK_EVENTS,
|
|
4
4
|
hasGeminiHooks
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BXUYF5HB.js";
|
|
6
6
|
import {
|
|
7
7
|
AGENT_CHOICES
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SGAQYFGS.js";
|
|
9
9
|
import {
|
|
10
10
|
BELL_HOOK_BINARY
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GXZFDZJG.js";
|
|
12
12
|
import {
|
|
13
13
|
CODEX_HOOK_EVENTS,
|
|
14
14
|
hasCodexHooks,
|
|
15
15
|
holdBudgetOf
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TAPGV2YV.js";
|
|
17
17
|
import {
|
|
18
18
|
CURSOR_GATE_EVENTS,
|
|
19
19
|
HOOK_LOCATOR_BINARY,
|
|
20
20
|
hookCommandHoldBudget
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-7DXPQW2H.js";
|
|
22
22
|
|
|
23
23
|
// src/diagnostics/bridge.ts
|
|
24
24
|
import { execFileSync } from "child_process";
|
|
@@ -6,38 +6,38 @@ import {
|
|
|
6
6
|
} from "./chunk-VTR4VRL2.js";
|
|
7
7
|
import {
|
|
8
8
|
ensureDaemonRunning
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VU6O4P2N.js";
|
|
10
10
|
import {
|
|
11
11
|
buildTranscriptRecords,
|
|
12
12
|
decodePublicKey,
|
|
13
13
|
generateSessionKey,
|
|
14
14
|
wrapSessionKey
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-HRAZMBUX.js";
|
|
16
16
|
import {
|
|
17
17
|
fetchTranscriptRecipients,
|
|
18
18
|
uploadTranscriptRecords
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-AXGA3WJI.js";
|
|
20
20
|
import {
|
|
21
21
|
transcriptEnvironmentPreference,
|
|
22
22
|
transcriptsEnabled
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-MNHY3EIN.js";
|
|
24
24
|
import {
|
|
25
25
|
hookOwnerOf
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-COEOZ2NC.js";
|
|
27
27
|
import {
|
|
28
28
|
readTranscriptPreference
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-IDXEDMWI.js";
|
|
30
30
|
import {
|
|
31
31
|
codexHome,
|
|
32
32
|
pusharyDir
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-TAPGV2YV.js";
|
|
34
34
|
import {
|
|
35
35
|
writeJsonAtomic
|
|
36
36
|
} from "./chunk-AQFEP65J.js";
|
|
37
37
|
import {
|
|
38
38
|
getApiKey,
|
|
39
39
|
getBaseUrl
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-OK4WDRGM.js";
|
|
41
41
|
|
|
42
42
|
// src/transcript-registration.ts
|
|
43
43
|
import { createHash } from "crypto";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
IDLE_PROMPT_NOTIFICATION,
|
|
3
3
|
NOTIFICATION_PUSH_TYPES,
|
|
4
4
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-V5BIWNB3.js";
|
|
6
6
|
import {
|
|
7
7
|
cancelQuestion,
|
|
8
8
|
clientErrorKindOf,
|
|
@@ -10,29 +10,30 @@ import {
|
|
|
10
10
|
reportClientError,
|
|
11
11
|
sendNotification,
|
|
12
12
|
waitForAnswer
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3TF5FHAT.js";
|
|
14
14
|
import {
|
|
15
15
|
withRetry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZREXC363.js";
|
|
17
17
|
import {
|
|
18
18
|
getMachineId
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-IWPQBWFN.js";
|
|
20
20
|
import {
|
|
21
21
|
reportedInstallSource
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-L5ZMZOQL.js";
|
|
23
23
|
import {
|
|
24
24
|
canonicalJson
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-TAPGV2YV.js";
|
|
26
26
|
import {
|
|
27
27
|
writeFileAtomic
|
|
28
28
|
} from "./chunk-AQFEP65J.js";
|
|
29
29
|
import {
|
|
30
30
|
getApiKey,
|
|
31
31
|
getBaseUrl
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-OK4WDRGM.js";
|
|
33
33
|
import {
|
|
34
34
|
ACTION_BODY_MAX,
|
|
35
35
|
AGENT_LABELS_BY_TYPE,
|
|
36
|
+
BLANK_TASK_INPUT_TOOL,
|
|
36
37
|
BLOCKED_ACTION_GRANT_TTL_SECONDS,
|
|
37
38
|
DECISION_LINE_MAX,
|
|
38
39
|
FILE_TARGET_TOOLS,
|
|
@@ -42,6 +43,8 @@ import {
|
|
|
42
43
|
NO_RESPONSE_REASON,
|
|
43
44
|
PENDING_COMMAND_PREFIX,
|
|
44
45
|
REPO_AWARE_AGENTS,
|
|
46
|
+
TASK_OUTPUT_TOOL,
|
|
47
|
+
TASK_STOP_TOOL,
|
|
45
48
|
blockedActionIdentity,
|
|
46
49
|
canonicalToolName,
|
|
47
50
|
gateOutputFor,
|
|
@@ -60,7 +63,7 @@ import {
|
|
|
60
63
|
resolvePolicy,
|
|
61
64
|
toToolLookup,
|
|
62
65
|
truncateLine
|
|
63
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-7DXPQW2H.js";
|
|
64
67
|
|
|
65
68
|
// ../hook-mapping/src/describe.ts
|
|
66
69
|
import { isAbsolute, relative, resolve } from "path";
|
|
@@ -80,7 +83,13 @@ var hookPrefixes = {
|
|
|
80
83
|
// fallback prints `Task: done` and `WebSearch: done`, which name the tool and
|
|
81
84
|
// drop the only part a person reads: which subagent, and what it looked for.
|
|
82
85
|
Task: (input) => `subagent: ${describeTaskCall(input)}`,
|
|
83
|
-
WebSearch: (input) => `web search: ${firstString(input.query) ?? "(no query)"}
|
|
86
|
+
WebSearch: (input) => `web search: ${firstString(input.query) ?? "(no query)"}`,
|
|
87
|
+
[TASK_OUTPUT_TOOL]: (input) => {
|
|
88
|
+
const task = firstString(input.task_id);
|
|
89
|
+
return task ? `check background task ${task}` : "list background tasks";
|
|
90
|
+
},
|
|
91
|
+
[TASK_STOP_TOOL]: (input) => `stop background task ${firstString(input.task_id) ?? "(unnamed)"}`,
|
|
92
|
+
[BLANK_TASK_INPUT_TOOL]: (input) => `send blank input, such as Enter, to background task ${firstString(input.task_id) ?? "(unnamed)"}`
|
|
84
93
|
};
|
|
85
94
|
var describeTaskCall = (input) => firstString(input.description) ?? firstString(input.subagent_type) ?? "(unnamed)";
|
|
86
95
|
var describeTodoProgress = (todos) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
APPROVAL_SETTINGS_PATH
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VYKUGORF.js";
|
|
4
4
|
import {
|
|
5
5
|
readMacAppAgentKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-S3NAONBN.js";
|
|
7
7
|
import {
|
|
8
8
|
findExportedKeyLines,
|
|
9
9
|
isAdoptedMacAppKey,
|
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
readConfigFileKey,
|
|
14
14
|
readKeySource,
|
|
15
15
|
readMacAppKeyPrefix
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-IDXEDMWI.js";
|
|
17
17
|
import {
|
|
18
18
|
absoluteUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-5NXOJ3JG.js";
|
|
20
20
|
import {
|
|
21
21
|
isValidApiKey
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-7DXPQW2H.js";
|
|
23
23
|
|
|
24
24
|
// src/key-revocation.ts
|
|
25
25
|
var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TAPGV2YV.js";
|
|
4
4
|
import {
|
|
5
5
|
readJsonSafe,
|
|
6
6
|
writeFileAtomic
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
serializeDeclinedAgents,
|
|
14
14
|
withDeclinedAgent,
|
|
15
15
|
withoutDeclinedAgent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7DXPQW2H.js";
|
|
17
17
|
|
|
18
18
|
// src/declined-agents-file.ts
|
|
19
19
|
import { join } from "path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-L5ZMZOQL.js";
|
|
4
4
|
import {
|
|
5
5
|
backupFile,
|
|
6
6
|
readJsonSafe,
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./chunk-AQFEP65J.js";
|
|
10
10
|
import {
|
|
11
11
|
configFilePath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OK4WDRGM.js";
|
|
13
13
|
import {
|
|
14
14
|
API_KEY_PREFIX_PATTERN,
|
|
15
15
|
isRecord
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7DXPQW2H.js";
|
|
17
17
|
|
|
18
18
|
// src/shell-alias.ts
|
|
19
19
|
import { homedir } from "os";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-POFBE6ZY.js";
|
|
4
4
|
import {
|
|
5
5
|
autoUpdateState
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TAPGV2YV.js";
|
|
7
7
|
import {
|
|
8
8
|
readJsonSafe,
|
|
9
9
|
writeJsonAtomic
|
|
@@ -13,8 +13,9 @@ import {
|
|
|
13
13
|
POSIX_GLOBAL_ROOT_SEGMENTS,
|
|
14
14
|
cliPackagePathSegments,
|
|
15
15
|
globalUpgradeEntry,
|
|
16
|
+
isAutoUpdateResult,
|
|
16
17
|
ownPackageRoot
|
|
17
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-7DXPQW2H.js";
|
|
18
19
|
|
|
19
20
|
// src/auto-update.ts
|
|
20
21
|
import { spawn } from "child_process";
|
|
@@ -25,9 +26,7 @@ var PENDING_FINISH_RETRY_DELAYS_MS = [5 * 60 * 1e3, 60 * 60 * 1e3];
|
|
|
25
26
|
var FIRST_FINISH_ATTEMPT = 1;
|
|
26
27
|
var AUTO_UPDATE_FLAG = "--auto";
|
|
27
28
|
var NON_GLOBAL_INSTALL_SEGMENTS = ["/_npx/", "/.volta/"];
|
|
28
|
-
var AUTO_UPDATE_RESULTS = ["updated", "current", "needs_manual", "failed", "finish_pending", "finish_blocked"];
|
|
29
29
|
var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
30
|
-
var isAutoUpdateResult = (value) => typeof value === "string" && AUTO_UPDATE_RESULTS.some((result) => result === value);
|
|
31
30
|
var stringField = (record, key) => {
|
|
32
31
|
const value = record[key];
|
|
33
32
|
return typeof value === "string" ? value : void 0;
|
|
@@ -101,6 +100,34 @@ var autoUpdateDecision = (input) => {
|
|
|
101
100
|
if (checkedWithinInterval(input.state.lastCheckAt, input.now, autoUpdateCheckInterval(input.state))) return { kind: "skip", reason: "checked_recently" };
|
|
102
101
|
return { kind: "check", ...location };
|
|
103
102
|
};
|
|
103
|
+
var autoUpdateReportState = (decision) => {
|
|
104
|
+
if (decision.kind === "check") return "on";
|
|
105
|
+
switch (decision.reason) {
|
|
106
|
+
case "subagent_start":
|
|
107
|
+
case "checked_recently":
|
|
108
|
+
return "on";
|
|
109
|
+
default:
|
|
110
|
+
return decision.reason;
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
var autoUpdateReport = (input) => ({
|
|
114
|
+
state: autoUpdateReportState(autoUpdateDecision({ ...input, isSubagentStart: false })),
|
|
115
|
+
lastResult: input.state.lastResult ?? null,
|
|
116
|
+
lastCheckAt: input.state.lastCheckAt ?? null
|
|
117
|
+
});
|
|
118
|
+
var readLocalAutoUpdateReport = () => {
|
|
119
|
+
try {
|
|
120
|
+
return autoUpdateReport({
|
|
121
|
+
env: process.env,
|
|
122
|
+
state: readAutoUpdateState(autoUpdateState()),
|
|
123
|
+
now: Date.now(),
|
|
124
|
+
platform: process.platform,
|
|
125
|
+
packageRoot: ownPackageRoot()
|
|
126
|
+
});
|
|
127
|
+
} catch {
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
104
131
|
var parseAutoUpdateFlag = (args) => {
|
|
105
132
|
const token = args.find((arg) => arg === AUTO_UPDATE_FLAG || arg.startsWith(`${AUTO_UPDATE_FLAG}=`));
|
|
106
133
|
if (token === void 0) return { kind: "absent" };
|
|
@@ -184,6 +211,7 @@ export {
|
|
|
184
211
|
globalInstallLocation,
|
|
185
212
|
upgradeEntryFor,
|
|
186
213
|
nextFinishAttempt,
|
|
214
|
+
readLocalAutoUpdateReport,
|
|
187
215
|
parseAutoUpdateFlag,
|
|
188
216
|
describeAutoUpdateCheck,
|
|
189
217
|
isUnfinishedAutoUpdate,
|
|
@@ -14,19 +14,19 @@ import {
|
|
|
14
14
|
} from "./chunk-FO3MDD26.js";
|
|
15
15
|
import {
|
|
16
16
|
callMcpTool
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ZREXC363.js";
|
|
18
18
|
import {
|
|
19
19
|
reportedInstallSource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-L5ZMZOQL.js";
|
|
21
21
|
import {
|
|
22
22
|
NPX_LATEST_COMMAND
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-7RKX7WRQ.js";
|
|
24
24
|
import {
|
|
25
25
|
NO_PAIRING_COMPUTER,
|
|
26
26
|
PAIR_TTL_SECONDS,
|
|
27
27
|
classifyConfirmResponse,
|
|
28
28
|
isAnswerSource
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-7DXPQW2H.js";
|
|
30
30
|
|
|
31
31
|
// src/reach.ts
|
|
32
32
|
var reachVerdict = (channels) => {
|
|
@@ -740,7 +740,23 @@ var PAIR_HINT_AFTER_MS = 45e3;
|
|
|
740
740
|
var PAIR_BROWSER_FALLBACK_AFTER_MS = 6e4;
|
|
741
741
|
var BROWSER_CONNECT_COMMAND = `${NPX_LATEST_COMMAND} setup --connect browser`;
|
|
742
742
|
var PAIR_BROWSER_FALLBACK_LINE = `Still waiting? Ctrl-C, then: ${BROWSER_CONNECT_COMMAND}`;
|
|
743
|
-
var PAIR_INSTALL_HINT = "No app yet? Install it, sign in, then scan the
|
|
743
|
+
var PAIR_INSTALL_HINT = "No app yet? Install it, sign in, then scan the QR above. Ctrl-C to stop.";
|
|
744
|
+
var PAIR_WAITING_LABEL = "Waiting for the app to authorize";
|
|
745
|
+
var PAIR_ADVICE_ROTATION_MS = 5e3;
|
|
746
|
+
var PAIR_ADVICE = [
|
|
747
|
+
{ afterMs: PAIR_HINT_AFTER_MS, text: PAIR_INSTALL_HINT },
|
|
748
|
+
{ afterMs: PAIR_BROWSER_FALLBACK_AFTER_MS, text: PAIR_BROWSER_FALLBACK_LINE }
|
|
749
|
+
];
|
|
750
|
+
var adviceDueAt = (elapsedMs) => PAIR_ADVICE.filter((advice) => elapsedMs >= advice.afterMs);
|
|
751
|
+
var pairAdviceDue = (elapsedMs) => adviceDueAt(elapsedMs).map((advice) => advice.text);
|
|
752
|
+
var pairCountdownLabel = (elapsedMs, minutesLeft) => elapsedMs < PAIR_HINT_AFTER_MS ? PAIR_WAITING_LABEL : `Waiting for the app ${dim(`(${minutesLeft}m left)`)}`;
|
|
753
|
+
var pairWaitingLabel = (elapsedMs, minutesLeft) => {
|
|
754
|
+
const due = adviceDueAt(elapsedMs);
|
|
755
|
+
const newest = due[due.length - 1];
|
|
756
|
+
if (newest === void 0) return PAIR_WAITING_LABEL;
|
|
757
|
+
const labels = [...due.map((advice) => dim(advice.text)).reverse(), pairCountdownLabel(elapsedMs, minutesLeft)];
|
|
758
|
+
return labels[Math.floor((elapsedMs - newest.afterMs) / PAIR_ADVICE_ROTATION_MS) % labels.length] ?? PAIR_WAITING_LABEL;
|
|
759
|
+
};
|
|
744
760
|
var PAIR_GET_APP_LINE = "No app yet? Get it at pushary.com/download. Setup keeps waiting.";
|
|
745
761
|
var describePairingScreen = (screen) => [
|
|
746
762
|
bold("Connect your phone"),
|
|
@@ -860,19 +876,16 @@ var connectViaAppPairing = async (options = {}) => {
|
|
|
860
876
|
console.log(` ${describePairingFingerprint(publicKeyFingerprint(keypair.publicKeyB64))}`);
|
|
861
877
|
const startedAt = clock.now();
|
|
862
878
|
const deadline = requestedAt + PAIR_TIMEOUT_MS;
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
const
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
}
|
|
874
|
-
return `Waiting for the app ${dim(`(${left}m left)`)}`;
|
|
875
|
-
});
|
|
879
|
+
const elapsed = () => clock.now() - startedAt;
|
|
880
|
+
const minutesLeft = () => Math.max(0, Math.ceil((deadline - clock.now()) / 6e4));
|
|
881
|
+
const advisesInTheLabel = humanIsTty();
|
|
882
|
+
let adviceWritten = 0;
|
|
883
|
+
const writeAdviceThatFellDue = () => {
|
|
884
|
+
const due = pairAdviceDue(elapsed());
|
|
885
|
+
for (const advice of due.slice(adviceWritten)) writeStatusLine(dim(advice));
|
|
886
|
+
adviceWritten = due.length;
|
|
887
|
+
};
|
|
888
|
+
const stop = startSpinner(() => advisesInTheLabel ? pairWaitingLabel(elapsed(), minutesLeft()) : pairCountdownLabel(elapsed(), minutesLeft()));
|
|
876
889
|
let cancelled = false;
|
|
877
890
|
const cancelOnSignal = (exitCode) => () => {
|
|
878
891
|
if (cancelled) return;
|
|
@@ -889,10 +902,7 @@ var connectViaAppPairing = async (options = {}) => {
|
|
|
889
902
|
try {
|
|
890
903
|
while (clock.now() < deadline) {
|
|
891
904
|
if (cancelled) return pairFailed("cancelled");
|
|
892
|
-
if (!
|
|
893
|
-
browserFallbackShown = true;
|
|
894
|
-
writeStatusLine(dim(PAIR_BROWSER_FALLBACK_LINE));
|
|
895
|
-
}
|
|
905
|
+
if (!advisesInTheLabel) writeAdviceThatFellDue();
|
|
896
906
|
const claim = await claimPairing(pairId);
|
|
897
907
|
if (claim === null) {
|
|
898
908
|
consecutiveFailures += 1;
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
codexHooksJsonIn,
|
|
9
9
|
isPusharyCodexCommand,
|
|
10
10
|
resolvePathBinary
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TAPGV2YV.js";
|
|
12
12
|
import {
|
|
13
13
|
getPackageVersion
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7DXPQW2H.js";
|
|
15
15
|
|
|
16
16
|
// src/codex-app-server.ts
|
|
17
17
|
import { existsSync, realpathSync } from "fs";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
macAppBridgeAvailable
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YW7JQ7Z4.js";
|
|
4
4
|
import {
|
|
5
5
|
keyPrefix
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IDXEDMWI.js";
|
|
7
7
|
import {
|
|
8
8
|
bridgeAgentKey
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TAPGV2YV.js";
|
|
10
10
|
import {
|
|
11
11
|
readJsonSafe
|
|
12
12
|
} from "./chunk-AQFEP65J.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7DXPQW2H.js";
|
|
16
16
|
|
|
17
17
|
// src/shared-mcp-key.ts
|
|
18
18
|
var asRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
isReleaseVersion,
|
|
14
14
|
ownPackageName,
|
|
15
15
|
withHookHoldBudget
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7DXPQW2H.js";
|
|
17
17
|
|
|
18
18
|
// src/setup/paths.ts
|
|
19
19
|
import { homedir as homedir2 } from "os";
|
|
@@ -395,9 +395,9 @@ var installGlobally = (options) => {
|
|
|
395
395
|
}
|
|
396
396
|
const started = (async () => {
|
|
397
397
|
if (!npmIsOnPath()) throw new NpmMissingError();
|
|
398
|
-
const { withUpgradeLock } = await import("./global-upgrade-
|
|
399
|
-
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-
|
|
400
|
-
const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-
|
|
398
|
+
const { withUpgradeLock } = await import("./global-upgrade-MBW4MRJ2.js");
|
|
399
|
+
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-2RGMG5ZV.js");
|
|
400
|
+
const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-H4XMIYUS.js");
|
|
401
401
|
let result = "skipped";
|
|
402
402
|
const install = async () => {
|
|
403
403
|
const platform = process.platform;
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
keyPrefix,
|
|
5
5
|
readConfigFileKey,
|
|
6
6
|
readMacAppKeyPrefix
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IDXEDMWI.js";
|
|
8
8
|
import {
|
|
9
9
|
NPX_LATEST_COMMAND
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7RKX7WRQ.js";
|
|
11
11
|
|
|
12
12
|
// src/key-signed-out.ts
|
|
13
13
|
var VERDICT_BY_CHECK = {
|