pushary 1.9.71 → 1.9.72
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 +6 -0
- package/dist/{api-HEIRLMTZ.js → api-K4UGZNOE.js} +10 -10
- package/dist/bin/pushary-bell-hook.js +25 -25
- package/dist/bin/pushary-bell.js +10 -10
- package/dist/bin/pushary-claude.js +202 -67
- package/dist/bin/pushary-clean.js +33 -33
- package/dist/bin/pushary-codex-bridge.js +23 -21
- package/dist/bin/pushary-codex-hook.js +30 -30
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +13 -13
- package/dist/bin/pushary-connect.js +26 -26
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +38 -38
- package/dist/bin/pushary-disconnect.js +25 -25
- package/dist/bin/pushary-doctor.js +41 -41
- package/dist/bin/pushary-elicitation-hook.js +25 -25
- package/dist/bin/pushary-gemini-bridge.js +45 -48
- package/dist/bin/pushary-gemini-hook.js +27 -27
- package/dist/bin/pushary-hook.js +29 -29
- package/dist/bin/pushary-login.js +20 -20
- package/dist/bin/pushary-logout.js +24 -24
- package/dist/bin/pushary-mcp.js +11 -11
- package/dist/bin/pushary-mode.js +15 -15
- 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 +29 -29
- 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 +26 -26
- package/dist/bin/pushary-session-start-hook.js +34 -34
- package/dist/bin/pushary-setup.js +47 -46
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +31 -31
- package/dist/bin/pushary-stop-hook.js +24 -24
- package/dist/bin/pushary-stopfailure-hook.js +24 -24
- package/dist/bin/pushary-suggestions.js +15 -15
- package/dist/bin/pushary-transcript-register.js +16 -16
- package/dist/bin/pushary-transcripts.js +20 -19
- package/dist/bin/pushary-upgrade.js +39 -39
- package/dist/bin/pushary-wait.js +15 -15
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-B3KPRSCM.js → chunk-2BVLEMGX.js} +5 -5
- package/dist/{chunk-VSQDVH43.js → chunk-2KDTIUC7.js} +1 -1
- package/dist/{chunk-AN26S5DC.js → chunk-37OD7FUI.js} +6 -6
- package/dist/{chunk-NHC5YUH6.js → chunk-3S5X7VZJ.js} +5 -5
- package/dist/{chunk-ZZ7VB6QC.js → chunk-4TRA3GDE.js} +3 -3
- package/dist/{chunk-J7BLYQ7Z.js → chunk-4U7F7VMC.js} +4 -4
- package/dist/{chunk-AUOVB62W.js → chunk-4W7CKRWR.js} +3 -3
- package/dist/{chunk-3CN2EFKK.js → chunk-4Y7EI5W5.js} +1 -1
- package/dist/{chunk-2XD4TTUM.js → chunk-5KQN7AIL.js} +10 -10
- package/dist/{chunk-3FY5ZPIZ.js → chunk-5KS3E3T5.js} +1 -1
- package/dist/{chunk-JGEPODEP.js → chunk-5XKJH5GD.js} +36 -0
- package/dist/{chunk-LWAYXE7G.js → chunk-5XYYBB5Z.js} +2 -2
- package/dist/{chunk-EBOGB7JR.js → chunk-6HTAOF6H.js} +1 -1
- package/dist/{chunk-D536PHXF.js → chunk-6YZ72YP3.js} +4 -4
- package/dist/{chunk-AZ56FPRG.js → chunk-7KMLITXH.js} +1 -1
- package/dist/{chunk-X2KK42JA.js → chunk-BMVWGPYB.js} +1 -1
- package/dist/{chunk-LA3MMHLO.js → chunk-CAUNUTYE.js} +2 -2
- package/dist/{chunk-DOMDCMGC.js → chunk-CR3HOHJC.js} +5 -5
- package/dist/{chunk-EZHM6I2V.js → chunk-D6COE26P.js} +4 -4
- package/dist/{chunk-LKKIFFUC.js → chunk-DNCEZWRC.js} +1 -1
- package/dist/{chunk-YG3NFC5N.js → chunk-DU7L7R4A.js} +5 -5
- package/dist/{chunk-GIE7PLZD.js → chunk-E56VJY23.js} +4 -4
- package/dist/{chunk-5NQ3SMVP.js → chunk-EEFFP64A.js} +12 -11
- package/dist/{chunk-7OYWCOVC.js → chunk-EEQG7VF2.js} +4 -4
- package/dist/{chunk-HR6M44CX.js → chunk-EPARIXRC.js} +7 -7
- package/dist/{chunk-YX6VQGLG.js → chunk-EW7CZHYP.js} +2 -2
- package/dist/{chunk-25W6AD3W.js → chunk-GNDPZBG3.js} +6 -6
- package/dist/{chunk-T7FPZN5V.js → chunk-GUJBS6TK.js} +3 -3
- package/dist/{chunk-YMBJU4CT.js → chunk-HIHA3GOR.js} +2 -2
- package/dist/{chunk-XSUWXBHF.js → chunk-IBHZ3JFE.js} +3 -3
- package/dist/{chunk-NPO3ZTR4.js → chunk-ILWEGI4H.js} +1 -1
- package/dist/{chunk-LRS4TJU2.js → chunk-KFGRDWAW.js} +4 -4
- package/dist/{chunk-XJMUEOXT.js → chunk-KYEZFN6K.js} +1 -1
- package/dist/chunk-L2FQBHIR.js +74 -0
- package/dist/{chunk-C3YAMEO2.js → chunk-L3S2ZTQZ.js} +2 -2
- package/dist/{chunk-IPSO7DUB.js → chunk-L6F62LKX.js} +3 -3
- package/dist/{chunk-WOZLV3LN.js → chunk-LCBZLTHW.js} +4 -4
- package/dist/{chunk-BJRLJJS2.js → chunk-LFBQ55OO.js} +1 -1
- package/dist/{chunk-LMP2FAS6.js → chunk-LISVMDVS.js} +3 -3
- package/dist/{chunk-X6CSZSSQ.js → chunk-LKXOSW2L.js} +4 -4
- package/dist/{chunk-BZ7XGS5L.js → chunk-LT2DOCFI.js} +1 -1
- package/dist/{chunk-6W2ASRZO.js → chunk-MWR25RQZ.js} +3 -3
- package/dist/{chunk-SMIU5URV.js → chunk-N4NSX5MB.js} +2 -2
- package/dist/chunk-N5P2FLOJ.js +82 -0
- package/dist/{chunk-MGF7D2ZL.js → chunk-N7A44RIA.js} +36 -35
- package/dist/{chunk-YRWGCYHH.js → chunk-NVM4S37G.js} +1 -1
- package/dist/{chunk-4QPF4BGP.js → chunk-OFTTOPTD.js} +6 -6
- package/dist/{chunk-5WHSFMV2.js → chunk-OGGUOTIK.js} +1 -1
- package/dist/{chunk-FA6INGK7.js → chunk-PIO66HPG.js} +3 -3
- package/dist/{chunk-ONZ3UGNY.js → chunk-PWVQALO2.js} +2 -2
- package/dist/{chunk-KGZH5RTB.js → chunk-PZV27E4J.js} +6 -6
- package/dist/{chunk-G3J5JKEJ.js → chunk-QDISUNK3.js} +6 -6
- package/dist/{chunk-VMQEB56V.js → chunk-QFF3QVIV.js} +2 -2
- package/dist/{chunk-QSZQCKPB.js → chunk-QQ7VXRIN.js} +5 -5
- package/dist/{chunk-QWCOMSDH.js → chunk-R4B5AVFC.js} +3 -3
- package/dist/{chunk-IYMYGKFB.js → chunk-RO5G3OEN.js} +10 -11
- package/dist/{chunk-JMACQEPU.js → chunk-RRW2LVVR.js} +2 -2
- package/dist/{chunk-JEZGDP55.js → chunk-RXR44U2J.js} +5 -5
- package/dist/{chunk-LKAO35SY.js → chunk-S6BD346V.js} +3 -3
- package/dist/{chunk-FTOKESSK.js → chunk-SAXNYDPS.js} +1 -1
- package/dist/{chunk-EVJRITSI.js → chunk-SMVTNLXU.js} +1 -1
- package/dist/{chunk-MZ6GL46A.js → chunk-TM4JH7YR.js} +1 -1
- package/dist/{chunk-ZBPBX656.js → chunk-UTVNXB6U.js} +3 -3
- package/dist/{chunk-OJFOIKRM.js → chunk-VFF7TP5B.js} +3 -3
- package/dist/{chunk-TATE22GH.js → chunk-VZG76CWC.js} +1 -1
- package/dist/{chunk-XZTFYFC7.js → chunk-WHM3OVBA.js} +2 -2
- package/dist/{chunk-SWQTCKLM.js → chunk-XGGAZJWJ.js} +6 -6
- package/dist/{chunk-4XFFGFHN.js → chunk-XHVHGDMB.js} +13 -13
- package/dist/{chunk-KEPESIIR.js → chunk-XMSDA5WA.js} +1 -70
- package/dist/{chunk-ITKAMUHG.js → chunk-YDSOTAZ6.js} +3 -3
- package/dist/{chunk-AERRQEWZ.js → chunk-ZWCKS65X.js} +2 -2
- package/dist/{codex-app-cards-switch-A77HUVKT.js → codex-app-cards-switch-PWLWIWKG.js} +11 -11
- package/dist/{codex-desktop-launch-FSHKRCRL.js → codex-desktop-launch-S3PDGLAY.js} +1 -1
- package/dist/{codex-session-launch-VAXYRXK6.js → codex-session-launch-PY5IMFJU.js} +20 -18
- package/dist/{config-SMJ2QWQF.js → config-SWV4YOP3.js} +3 -3
- package/dist/{global-upgrade-63X4UFFP.js → global-upgrade-DI3LGOQP.js} +10 -10
- package/dist/{identity-3L2YHAZP.js → identity-AY35DGAO.js} +4 -4
- package/dist/{live-capabilities-QBQX7RFM.js → live-capabilities-IH3EGKL3.js} +5 -5
- package/dist/{paths-5VPGINSP.js → paths-I4Q77ULZ.js} +3 -3
- package/dist/{reapply-MSIZJULX.js → reapply-OAV4IAG3.js} +27 -27
- package/dist/src/index.js +28 -28
- package/dist/{upgrade-lock-KKW6XZ7B.js → upgrade-lock-7U5BOK6V.js} +4 -4
- package/dist/{usage-ICF3NG4F.js → usage-NTER4GHT.js} +3 -3
- package/package.json +2 -1
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
reachVerdict,
|
|
13
13
|
reachesYou,
|
|
14
14
|
verifyDelivery
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XGGAZJWJ.js";
|
|
16
16
|
import {
|
|
17
17
|
humanIsTty,
|
|
18
18
|
writeHuman
|
|
@@ -24,14 +24,14 @@ import {
|
|
|
24
24
|
} from "./chunk-FO3MDD26.js";
|
|
25
25
|
import {
|
|
26
26
|
reportedInstallSource
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-ZWCKS65X.js";
|
|
28
28
|
import {
|
|
29
29
|
NPX_LATEST_COMMAND
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-7KMLITXH.js";
|
|
31
31
|
import {
|
|
32
32
|
NO_PAIRING_COMPUTER,
|
|
33
33
|
PAIR_TTL_SECONDS
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-5XKJH5GD.js";
|
|
35
35
|
|
|
36
36
|
// src/onboarding.ts
|
|
37
37
|
import qrcodeTerminal from "qrcode-terminal";
|
|
@@ -5,19 +5,19 @@ import {
|
|
|
5
5
|
hermesAppWiringRecord,
|
|
6
6
|
hermesConfigReceipt,
|
|
7
7
|
hermesSetupReceipt
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-N4NSX5MB.js";
|
|
9
9
|
import {
|
|
10
10
|
readJsonSafe,
|
|
11
11
|
resolvePathBinary,
|
|
12
12
|
writeJsonAtomic
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GUJBS6TK.js";
|
|
14
14
|
import {
|
|
15
15
|
isNewerVersion,
|
|
16
16
|
isReleaseVersion
|
|
17
17
|
} from "./chunk-QTOLNRET.js";
|
|
18
18
|
import {
|
|
19
19
|
isRecord
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-5XKJH5GD.js";
|
|
21
21
|
|
|
22
22
|
// src/hermes/plugin-payload.ts
|
|
23
23
|
import { createHash } from "crypto";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
quoteIfNeeded,
|
|
5
5
|
shellDoubleQuoted,
|
|
6
6
|
writeFileAtomic
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GUJBS6TK.js";
|
|
8
8
|
import {
|
|
9
9
|
CLAUDE_PRETOOLUSE_MATCHER,
|
|
10
10
|
CODEX_QUESTION_TOOLS,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
HOOK_LOCATOR_BINARY,
|
|
13
13
|
PRETOOLUSE_GATED_TOOLS,
|
|
14
14
|
withHookHoldBudget
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5XKJH5GD.js";
|
|
16
16
|
|
|
17
17
|
// src/setup/paths.ts
|
|
18
18
|
import { createHash as createHash2 } from "crypto";
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import {
|
|
2
|
+
external_exports
|
|
3
|
+
} from "./chunk-XMSDA5WA.js";
|
|
4
|
+
|
|
5
|
+
// src/command-receipts.ts
|
|
6
|
+
import { randomUUID } from "crypto";
|
|
7
|
+
var controllerCommandSchema = external_exports.object({
|
|
8
|
+
id: external_exports.string().uuid(),
|
|
9
|
+
text: external_exports.string().min(1).max(2e3),
|
|
10
|
+
expiresAtMs: external_exports.number().finite(),
|
|
11
|
+
state: external_exports.literal("dispatching").optional(),
|
|
12
|
+
dispatchId: external_exports.string().uuid().optional()
|
|
13
|
+
}).refine((value) => value.state !== "dispatching" || value.dispatchId !== void 0);
|
|
14
|
+
var CommandReceipts = class {
|
|
15
|
+
constructor(options) {
|
|
16
|
+
this.options = options;
|
|
17
|
+
}
|
|
18
|
+
pending = /* @__PURE__ */ new Map();
|
|
19
|
+
flushing;
|
|
20
|
+
async receive(command, acknowledge) {
|
|
21
|
+
if (this.pending.has(command.id)) {
|
|
22
|
+
await this.flush();
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (this.pending.size >= 32) return;
|
|
26
|
+
const receipt = {
|
|
27
|
+
acknowledge,
|
|
28
|
+
dispatchId: command.dispatchId ?? randomUUID(),
|
|
29
|
+
state: command.state === "dispatching" ? "uncertain" : "dispatching"
|
|
30
|
+
};
|
|
31
|
+
this.pending.set(command.id, receipt);
|
|
32
|
+
if (command.state === "dispatching") {
|
|
33
|
+
if (await this.options.wasAccepted?.(command.id).catch(() => false)) receipt.state = "delivered";
|
|
34
|
+
await this.flush();
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const dispatched = await acknowledge("dispatching", receipt.dispatchId).catch(() => false);
|
|
38
|
+
if (!dispatched) {
|
|
39
|
+
this.pending.delete(command.id);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
try {
|
|
43
|
+
const result = await this.options.submit(command);
|
|
44
|
+
if (result) receipt.state = result;
|
|
45
|
+
} catch {
|
|
46
|
+
receipt.state = "uncertain";
|
|
47
|
+
this.options.log("[pushary] instruction outcome is unknown; it will not be replayed automatically");
|
|
48
|
+
}
|
|
49
|
+
await this.flush();
|
|
50
|
+
}
|
|
51
|
+
accepted(commandId) {
|
|
52
|
+
const receipt = this.pending.get(commandId);
|
|
53
|
+
if (receipt) receipt.state = "delivered";
|
|
54
|
+
}
|
|
55
|
+
async flush() {
|
|
56
|
+
if (this.flushing) return this.flushing;
|
|
57
|
+
this.flushing = this.flushPending();
|
|
58
|
+
try {
|
|
59
|
+
await this.flushing;
|
|
60
|
+
} finally {
|
|
61
|
+
this.flushing = void 0;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async flushPending() {
|
|
65
|
+
for (const [id, receipt] of this.pending) {
|
|
66
|
+
if (receipt.state === "dispatching") continue;
|
|
67
|
+
const state = receipt.state;
|
|
68
|
+
try {
|
|
69
|
+
const confirmed = await receipt.acknowledge(state, receipt.dispatchId);
|
|
70
|
+
if (confirmed && receipt.state === state) this.pending.delete(id);
|
|
71
|
+
if (!confirmed) this.options.log("[pushary] receipt not confirmed; retrying on reconnect");
|
|
72
|
+
} catch {
|
|
73
|
+
this.options.log("[pushary] receipt could not be confirmed; retrying on reconnect");
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export {
|
|
80
|
+
controllerCommandSchema,
|
|
81
|
+
CommandReceipts
|
|
82
|
+
};
|
|
@@ -4,30 +4,34 @@ import {
|
|
|
4
4
|
postLiveSession,
|
|
5
5
|
postLiveSessionUntilAccepted,
|
|
6
6
|
startLiveSessionHeartbeat
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5KS3E3T5.js";
|
|
8
|
+
import {
|
|
9
|
+
CommandReceipts,
|
|
10
|
+
controllerCommandSchema
|
|
11
|
+
} from "./chunk-N5P2FLOJ.js";
|
|
8
12
|
import {
|
|
9
13
|
SESSION_IDLE_TIMEOUT_MS,
|
|
10
14
|
describeIdleWindow,
|
|
11
15
|
idleDeadlinePassed,
|
|
12
16
|
startProcessOwnership
|
|
13
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-YDSOTAZ6.js";
|
|
14
18
|
import {
|
|
15
19
|
spawnClaude
|
|
16
20
|
} from "./chunk-XHKBHWLX.js";
|
|
17
21
|
import {
|
|
18
22
|
repoKeyFor
|
|
19
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-ILWEGI4H.js";
|
|
20
24
|
import {
|
|
21
25
|
isAskUserResponse,
|
|
22
26
|
isDecisionStopped,
|
|
23
27
|
isWaitForAnswerResponse,
|
|
24
28
|
withdrawQuestion,
|
|
25
29
|
writeDegraded
|
|
26
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-DU7L7R4A.js";
|
|
27
31
|
import {
|
|
28
32
|
callMcpTool,
|
|
29
33
|
isRetryable
|
|
30
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-E56VJY23.js";
|
|
31
35
|
import {
|
|
32
36
|
AGENT_QUESTION_DESCRIPTION_MAX,
|
|
33
37
|
AGENT_QUESTION_HEADER_MAX,
|
|
@@ -48,7 +52,7 @@ import {
|
|
|
48
52
|
parseCodexQuestions,
|
|
49
53
|
planElicitationAsk,
|
|
50
54
|
readElicitationFields
|
|
51
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-5XKJH5GD.js";
|
|
52
56
|
|
|
53
57
|
// src/codex-question-owner.ts
|
|
54
58
|
import { createHash } from "crypto";
|
|
@@ -777,49 +781,42 @@ var runCodexBridge = async (options) => {
|
|
|
777
781
|
if (startedTurnId && startedTurnId !== lastCompletedTurnId) activeTurnId = startedTurnId;
|
|
778
782
|
};
|
|
779
783
|
if (options.prompt) await startTurn(options.prompt, `spawn-${options.spawnId}`);
|
|
780
|
-
|
|
784
|
+
const receipts = new CommandReceipts({
|
|
785
|
+
submit: async (command) => {
|
|
786
|
+
await startTurn(command.text, command.id);
|
|
787
|
+
return "delivered";
|
|
788
|
+
},
|
|
789
|
+
log: (message) => process.stderr.write(`${message}
|
|
790
|
+
`)
|
|
791
|
+
});
|
|
781
792
|
while (!options.signal.aborted && !rpc.isClosed) {
|
|
782
793
|
if (idleDeadlineReached()) {
|
|
783
794
|
idledOut = true;
|
|
784
795
|
break;
|
|
785
796
|
}
|
|
786
797
|
try {
|
|
787
|
-
|
|
788
|
-
const acknowledged = await postLiveSession(options, "/api/agent/command/ack", pendingAck);
|
|
789
|
-
if (acknowledged.ok) pendingAck = null;
|
|
790
|
-
}
|
|
791
|
-
if (pendingAck) {
|
|
792
|
-
await liveSessionSleep(options.pollIntervalMs ?? 2e3, options.signal);
|
|
793
|
-
continue;
|
|
794
|
-
}
|
|
798
|
+
await receipts.flush();
|
|
795
799
|
const response = await postLiveSession(options, "/api/agent/command/drain", {
|
|
796
800
|
sessionId: threadId,
|
|
797
801
|
machineId: options.machineId,
|
|
798
|
-
ackMode: true
|
|
802
|
+
ackMode: true,
|
|
803
|
+
receiptVersion: 1
|
|
799
804
|
});
|
|
800
805
|
if (response.ok) {
|
|
801
|
-
const
|
|
802
|
-
const
|
|
803
|
-
|
|
804
|
-
if (commandId && text) {
|
|
806
|
+
const body = await response.json();
|
|
807
|
+
const parsed = controllerCommandSchema.safeParse(object(body)?.command);
|
|
808
|
+
if (parsed.success) {
|
|
805
809
|
idleSince = now();
|
|
806
|
-
|
|
807
|
-
await
|
|
808
|
-
|
|
809
|
-
commandId,
|
|
810
|
+
await receipts.receive(parsed.data, async (state, dispatchId) => {
|
|
811
|
+
const response2 = await postLiveSession(options, "/api/agent/command/ack", {
|
|
812
|
+
commandId: parsed.data.id,
|
|
810
813
|
sessionId: threadId,
|
|
811
814
|
machineId: options.machineId,
|
|
812
|
-
state
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
sessionId: threadId,
|
|
818
|
-
machineId: options.machineId,
|
|
819
|
-
state: "failed",
|
|
820
|
-
failureCode: "codex_rejected"
|
|
821
|
-
};
|
|
822
|
-
}
|
|
815
|
+
state,
|
|
816
|
+
dispatchId
|
|
817
|
+
});
|
|
818
|
+
return response2.ok;
|
|
819
|
+
});
|
|
823
820
|
}
|
|
824
821
|
}
|
|
825
822
|
} catch {
|
|
@@ -856,6 +853,10 @@ var runCodexBridge = async (options) => {
|
|
|
856
853
|
await liveSessionSleep(200 * (attempt + 1), options.signal);
|
|
857
854
|
}
|
|
858
855
|
}
|
|
856
|
+
if (options.signal.aborted) {
|
|
857
|
+
await report("session_closed", "Session stopped").catch(() => null);
|
|
858
|
+
return "stopped";
|
|
859
|
+
}
|
|
859
860
|
await report("error", `Live bridge failed: ${message}`.slice(0, FAILURE_MESSAGE_MAX)).catch(() => null);
|
|
860
861
|
return "failed";
|
|
861
862
|
} finally {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
announceSubscriptionRequired,
|
|
3
3
|
isDeferAnswer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4Y7EI5W5.js";
|
|
5
5
|
import {
|
|
6
6
|
AUTO_DECISION_WINDOW_MS,
|
|
7
7
|
DEFAULT_SESSION,
|
|
@@ -10,19 +10,19 @@ import {
|
|
|
10
10
|
permissionDeniedAction,
|
|
11
11
|
releaseThrottle,
|
|
12
12
|
reportEvent
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EEFFP64A.js";
|
|
14
14
|
import {
|
|
15
15
|
askUser,
|
|
16
16
|
isDecisionStopped,
|
|
17
17
|
isQuestionLimitRefusal,
|
|
18
18
|
waitForQuestion
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-DU7L7R4A.js";
|
|
20
20
|
import {
|
|
21
21
|
SubscriptionRequiredError
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-E56VJY23.js";
|
|
23
23
|
import {
|
|
24
24
|
getMachineId
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-5XYYBB5Z.js";
|
|
26
26
|
import {
|
|
27
27
|
ASK_CONTEXT_MAX,
|
|
28
28
|
agentQuestionContext,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
questionsShownAsASet,
|
|
35
35
|
shouldDeferToNativeMode,
|
|
36
36
|
wireVerdictFor
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-5XKJH5GD.js";
|
|
38
38
|
|
|
39
39
|
// src/machine-decision-audit.ts
|
|
40
40
|
import { basename } from "path";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CODEX_HOOK_STATUS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WHM3OVBA.js";
|
|
4
4
|
import {
|
|
5
5
|
retryAgentCommand
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-R4B5AVFC.js";
|
|
7
7
|
import {
|
|
8
8
|
NPX_LATEST_COMMAND
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7KMLITXH.js";
|
|
10
10
|
|
|
11
11
|
// src/setup/codex-trust.ts
|
|
12
12
|
var CODEX_TRUST_TELEMETRY = {
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
forkFinishWithUpgradeLock,
|
|
4
4
|
installWithUpgradeLock,
|
|
5
5
|
releaseAutoUpdateLock
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-L3S2ZTQZ.js";
|
|
7
7
|
import {
|
|
8
8
|
phoneStartIsRequired
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EEQG7VF2.js";
|
|
10
10
|
import {
|
|
11
11
|
describeAutoUpdateCheck,
|
|
12
12
|
globalInstallLocation,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
readAutoUpdateState,
|
|
19
19
|
updateAutoUpdateState,
|
|
20
20
|
upgradeEntryFor
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-L6F62LKX.js";
|
|
22
22
|
import {
|
|
23
23
|
EXIT
|
|
24
24
|
} from "./chunk-KZERVKTD.js";
|
|
@@ -26,17 +26,17 @@ import {
|
|
|
26
26
|
autoUpdateLock,
|
|
27
27
|
autoUpdateLog,
|
|
28
28
|
autoUpdateState
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-N4NSX5MB.js";
|
|
30
30
|
import {
|
|
31
31
|
execNpm,
|
|
32
32
|
fetchLatestPublishedVersion,
|
|
33
33
|
npmErrorMessage,
|
|
34
34
|
readGlobalCliInstallAt,
|
|
35
35
|
readGlobalPrefix
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-GUJBS6TK.js";
|
|
37
37
|
import {
|
|
38
38
|
NPX_LATEST_COMMAND
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-7KMLITXH.js";
|
|
40
40
|
import {
|
|
41
41
|
commandsPackage,
|
|
42
42
|
globalUpgradeEntry,
|
|
@@ -4,23 +4,23 @@ import {
|
|
|
4
4
|
} from "./chunk-XHKBHWLX.js";
|
|
5
5
|
import {
|
|
6
6
|
readControlMode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6YZ72YP3.js";
|
|
8
8
|
import {
|
|
9
9
|
getMachineId
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5XYYBB5Z.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-N4NSX5MB.js";
|
|
14
14
|
import {
|
|
15
15
|
readJsonSafe,
|
|
16
16
|
resolveGlobalBinary,
|
|
17
17
|
writeFileAtomic,
|
|
18
18
|
writeJsonAtomic,
|
|
19
19
|
writeJsonAtomicDurable
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-GUJBS6TK.js";
|
|
21
21
|
import {
|
|
22
22
|
getApiKey
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-BMVWGPYB.js";
|
|
24
24
|
import {
|
|
25
25
|
CLI_PACKAGE_NAMES,
|
|
26
26
|
cmdShimTarget,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from "./chunk-QTOLNRET.js";
|
|
31
31
|
import {
|
|
32
32
|
isRecord
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-5XKJH5GD.js";
|
|
34
34
|
|
|
35
35
|
// src/daemon-lifecycle.ts
|
|
36
36
|
import { dirname, join, win32 as win32Path } from "path";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
absoluteUrl
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4TRA3GDE.js";
|
|
4
4
|
import {
|
|
5
5
|
KEY_SCOPE
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5XKJH5GD.js";
|
|
7
7
|
|
|
8
8
|
// src/cli/approval-settings-pages.ts
|
|
9
9
|
var API_KEYS_PATH = "/dashboard/agent/settings";
|
|
@@ -3,24 +3,24 @@ import {
|
|
|
3
3
|
expectedLaunchCapabilities,
|
|
4
4
|
hasSpawnProvider,
|
|
5
5
|
resolveControlPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EEQG7VF2.js";
|
|
7
7
|
import {
|
|
8
8
|
daemonHasRemoteProof,
|
|
9
9
|
daemonServiceManagerAvailable,
|
|
10
10
|
hasDaemonServiceDefinition,
|
|
11
11
|
readDaemonNeedsLogin,
|
|
12
12
|
readDaemonStatus
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-QDISUNK3.js";
|
|
14
14
|
import {
|
|
15
15
|
readControlMode,
|
|
16
16
|
readKeySource
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-6YZ72YP3.js";
|
|
18
18
|
import {
|
|
19
19
|
getMachineId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-5XYYBB5Z.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-BMVWGPYB.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
26
|
} from "./chunk-QTOLNRET.js";
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
NpmMissingError,
|
|
4
4
|
NpmPermissionError,
|
|
5
5
|
writeFileAtomic
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GUJBS6TK.js";
|
|
7
7
|
import {
|
|
8
8
|
NPX_LATEST_COMMAND
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7KMLITXH.js";
|
|
10
10
|
import {
|
|
11
11
|
readSetupAgentFailures
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5XKJH5GD.js";
|
|
13
13
|
|
|
14
14
|
// src/setup/config-write.ts
|
|
15
15
|
var AgentConfigWriteError = class extends Error {
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
loadPin,
|
|
4
4
|
savePin,
|
|
5
5
|
verifyRecipients
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SAXNYDPS.js";
|
|
7
7
|
import {
|
|
8
8
|
ensureDaemonRunning
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QDISUNK3.js";
|
|
10
10
|
import {
|
|
11
11
|
hookOwnerOf
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LCBZLTHW.js";
|
|
13
13
|
import {
|
|
14
14
|
buildTranscriptRecords,
|
|
15
15
|
decodePublicKey,
|
|
@@ -18,26 +18,26 @@ import {
|
|
|
18
18
|
recordSealerFor,
|
|
19
19
|
uploadTranscriptRecords,
|
|
20
20
|
wrapSessionKey
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-CAUNUTYE.js";
|
|
22
22
|
import {
|
|
23
23
|
transcriptEnvironmentPreference,
|
|
24
24
|
transcriptsEnabled
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-VZG76CWC.js";
|
|
26
26
|
import {
|
|
27
27
|
readTranscriptPreference
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-6YZ72YP3.js";
|
|
29
29
|
import {
|
|
30
30
|
claudeConfigDir,
|
|
31
31
|
codexHome,
|
|
32
32
|
pusharyDir
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-N4NSX5MB.js";
|
|
34
34
|
import {
|
|
35
35
|
writeJsonAtomic
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-GUJBS6TK.js";
|
|
37
37
|
import {
|
|
38
38
|
getApiKey,
|
|
39
39
|
getBaseUrl
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-BMVWGPYB.js";
|
|
41
41
|
|
|
42
42
|
// src/transcript-registration.ts
|
|
43
43
|
import { createHash } from "crypto";
|
|
@@ -462,8 +462,7 @@ var withoutTrailingSlash = (url) => url.replace(/\/+$/, "");
|
|
|
462
462
|
var sameServer = (url, registry) => withoutTrailingSlash(url) === withoutTrailingSlash(registry.baseUrl);
|
|
463
463
|
var fileFor2 = (registry, sessionId) => join3(registry.directory, `${createHash("sha256").update(accountFor(registry) + sessionId).digest("hex")}.json`);
|
|
464
464
|
var permitted = (registry, raw) => raw.account === accountFor(registry) && consent(raw) && !raw.drained && (raw.source !== "claude" || !!raw.expectedSiteId || !macOwnsClaudeHooks(raw.cwd)) && (!raw.expectedSiteId || raw.expectedSiteId === raw.verifiedSiteId && !!raw.expectedBaseUrl && sameServer(raw.expectedBaseUrl, registry));
|
|
465
|
-
var registeredTranscriptEnabled = (apiKey, sessionId) => {
|
|
466
|
-
const registry = cliRegistry(apiKey);
|
|
465
|
+
var registeredTranscriptEnabled = (apiKey, sessionId, registry = cliRegistry(apiKey)) => {
|
|
467
466
|
try {
|
|
468
467
|
return permitted(registry, read(fileFor2(registry, sessionId)));
|
|
469
468
|
} catch {
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
keyPrefix,
|
|
5
5
|
readConfigFileKey,
|
|
6
6
|
readMacAppKeyPrefix
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6YZ72YP3.js";
|
|
8
8
|
import {
|
|
9
9
|
NPX_LATEST_COMMAND
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7KMLITXH.js";
|
|
11
11
|
|
|
12
12
|
// src/key-signed-out.ts
|
|
13
13
|
var VERDICT_BY_CHECK = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readMacAppAgentKey
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2BVLEMGX.js";
|
|
4
4
|
import {
|
|
5
5
|
API_KEYS_PATH
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QFF3QVIV.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-6YZ72YP3.js";
|
|
17
17
|
import {
|
|
18
18
|
absoluteUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-4TRA3GDE.js";
|
|
20
20
|
import {
|
|
21
21
|
isValidApiKey
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-5XKJH5GD.js";
|
|
23
23
|
|
|
24
24
|
// src/key-revocation.ts
|
|
25
25
|
var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
findNativeClaudeInstall
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LFBQ55OO.js";
|
|
4
4
|
import {
|
|
5
5
|
parseVersion
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GUJBS6TK.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5XKJH5GD.js";
|
|
10
10
|
|
|
11
11
|
// src/setup/agent-probe.ts
|
|
12
12
|
import { execSync } from "child_process";
|