pushary 1.9.60 → 1.9.61
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/README.md +6 -0
- package/dist/{api-ASQA5PZM.js → api-LW3PJQYY.js} +8 -7
- package/dist/bin/pushary-bell-hook.js +16 -15
- package/dist/bin/pushary-bell.js +4 -3
- package/dist/bin/pushary-claude.js +16 -15
- package/dist/bin/pushary-clean.js +26 -24
- package/dist/bin/pushary-codex-bridge.js +11 -10
- package/dist/bin/pushary-codex-hook.js +20 -19
- package/dist/bin/pushary-codex-session.js +9 -8
- package/dist/bin/pushary-codex.js +9 -8
- package/dist/bin/pushary-connect.js +18 -17
- package/dist/bin/pushary-cowork.js +1 -0
- package/dist/bin/pushary-daemon.js +24 -23
- package/dist/bin/pushary-disconnect.js +18 -17
- package/dist/bin/pushary-doctor.js +26 -25
- package/dist/bin/pushary-elicitation-hook.js +17 -16
- package/dist/bin/pushary-gemini-bridge.js +6 -5
- package/dist/bin/pushary-gemini-hook.js +18 -17
- package/dist/bin/pushary-hook.js +19 -18
- package/dist/bin/pushary-login.js +7 -6
- package/dist/bin/pushary-logout.js +17 -16
- package/dist/bin/pushary-mcp.js +9 -8
- package/dist/bin/pushary-mode.js +7 -6
- package/dist/bin/pushary-notification-hook.js +16 -15
- package/dist/bin/pushary-opencode-hook.js +17 -16
- package/dist/bin/pushary-permission-denied-hook.js +19 -18
- package/dist/bin/pushary-permission-hook.js +19 -18
- package/dist/bin/pushary-post-hook.js +16 -15
- package/dist/bin/pushary-prompt-hook.js +16 -15
- package/dist/bin/pushary-session-end-hook.js +16 -15
- package/dist/bin/pushary-session-start-hook.js +22 -21
- package/dist/bin/pushary-setup.js +4180 -78
- package/dist/bin/pushary-stats.js +1 -0
- package/dist/bin/pushary-status.js +20 -19
- package/dist/bin/pushary-stop-hook.js +16 -15
- package/dist/bin/pushary-stopfailure-hook.js +16 -15
- package/dist/bin/pushary-suggestions.js +7 -6
- package/dist/bin/pushary-transcript-register.js +9 -8
- package/dist/bin/pushary-transcripts.js +1 -0
- package/dist/bin/pushary-upgrade.js +33 -27
- package/dist/bin/pushary-wait.js +7 -6
- package/dist/bin/pushary.js +5 -4
- package/dist/{chunk-VIJIG5YL.js → chunk-4N5E4JNF.js} +2 -2
- package/dist/{chunk-WXZHQ3TT.js → chunk-4VRTSDGP.js} +2 -2
- package/dist/{chunk-YGE6ML3O.js → chunk-64S5PQBQ.js} +1 -1
- package/dist/{chunk-6MC2XXFD.js → chunk-6FJ6CK32.js} +3 -3
- package/dist/{chunk-RLVJ6TVL.js → chunk-6T5Z64KS.js} +24 -16
- package/dist/{chunk-4MWRR5IT.js → chunk-7BAO42UV.js} +1 -1
- package/dist/{chunk-5RU35K57.js → chunk-7HDGH3Z2.js} +1 -1
- package/dist/{chunk-J4KQL7YZ.js → chunk-7MCCXE5Y.js} +3 -3
- package/dist/{chunk-CDQHQAS7.js → chunk-BJTSKOH3.js} +3 -3
- package/dist/{chunk-4PZXI7WU.js → chunk-BQ2VV7LY.js} +2 -2
- package/dist/{chunk-56JCQQLS.js → chunk-BUZIEL7Y.js} +2 -2
- package/dist/{chunk-QUBIEZXC.js → chunk-CICLXLQN.js} +2 -2
- package/dist/{chunk-2QREHU4O.js → chunk-CJ5TCFD4.js} +3 -3
- package/dist/{chunk-W2IVTHIG.js → chunk-DQLCFGHK.js} +7 -5
- package/dist/{chunk-CEQ2AZH4.js → chunk-EUIPTDLX.js} +3 -3
- package/dist/{chunk-6LOQE4J4.js → chunk-G36T5LAP.js} +1 -1
- package/dist/{chunk-S54C6TQC.js → chunk-GDKQUB52.js} +4 -4
- package/dist/{chunk-PUHP4IBA.js → chunk-GKFO5JLN.js} +3 -3
- package/dist/{chunk-WXPVVXBU.js → chunk-GZCSWDAS.js} +3 -3
- package/dist/{chunk-DJ7EZIQA.js → chunk-HUI4OE43.js} +1 -1
- package/dist/{chunk-4MUFZU2G.js → chunk-IFPOHFDJ.js} +1 -1
- package/dist/{chunk-SOCJ2N3E.js → chunk-JGQV4MDQ.js} +5 -5
- package/dist/{chunk-U7NR4JVD.js → chunk-KPNZ7JUL.js} +2 -2
- package/dist/{chunk-HC3FHDKB.js → chunk-LBHJJEKT.js} +3 -3
- package/dist/{chunk-L3AFVFGQ.js → chunk-LN7DE5LY.js} +1 -1
- package/dist/chunk-MLKGABMK.js +9 -0
- package/dist/{chunk-6MJWYYAS.js → chunk-MWLTTLPK.js} +46 -2
- package/dist/{chunk-MUNL23WE.js → chunk-O65F2IIN.js} +3 -3
- package/dist/{chunk-625DZLT5.js → chunk-ORX5BTV4.js} +5 -5
- package/dist/{chunk-QLMOU57V.js → chunk-P3VQH65N.js} +7 -7
- package/dist/{chunk-Y5V4PA2Z.js → chunk-PITQ5ZIQ.js} +2 -2
- package/dist/{chunk-V57XLKZL.js → chunk-QER5R7Z6.js} +1 -1
- package/dist/{chunk-IF26ZGZ7.js → chunk-RGSW36XH.js} +1 -1
- package/dist/{chunk-EZHY65QA.js → chunk-RJHX66EY.js} +3 -3
- package/dist/{chunk-O6IUZGWV.js → chunk-SFAP4AJY.js} +1 -1
- package/dist/{chunk-7WFRY6OL.js → chunk-SHJVFW22.js} +1 -1
- package/dist/{chunk-FDWMG6NY.js → chunk-UADSXJZ4.js} +1 -1
- package/dist/{chunk-ZGOJLNKS.js → chunk-VX2MJ4X7.js} +1 -1
- package/dist/{chunk-SEILUNWB.js → chunk-XAO6EYGM.js} +2 -2
- package/dist/{chunk-CSOROFJY.js → chunk-Y6Z7DA5Y.js} +3 -3
- package/dist/{chunk-METMK3L4.js → chunk-YDR4BQ7R.js} +1 -1
- package/dist/{chunk-RPPXQNIA.js → chunk-ZEWIMY63.js} +1 -1
- package/dist/{chunk-QGSHV3WO.js → chunk-ZGU3NXL2.js} +75 -16
- package/dist/{codex-app-cards-switch-ZO76D2NY.js → codex-app-cards-switch-BD7LCI2I.js} +7 -6
- package/dist/{codex-desktop-launch-MJT5E3O3.js → codex-desktop-launch-V5CASSBB.js} +2 -1
- package/dist/{codex-session-launch-PTFCVIC7.js → codex-session-launch-5PKFKUFD.js} +11 -10
- package/dist/{config-SXV6XNVU.js → config-AEKH7HGC.js} +1 -0
- package/dist/{global-upgrade-ETDP32LO.js → global-upgrade-IUXJJDWF.js} +7 -6
- package/dist/{identity-OOLIOSMR.js → identity-YJIV2XTY.js} +4 -3
- package/dist/{live-capabilities-2XIFA7YO.js → live-capabilities-QYFW5QAW.js} +3 -2
- package/dist/{paths-IIOQZESZ.js → paths-A5GAR5PL.js} +3 -2
- package/dist/{reapply-KFAJSKOQ.js → reapply-BKJGICRJ.js} +18 -17
- package/dist/src/index.js +14 -13
- package/dist/{upgrade-lock-T6ILR644.js → upgrade-lock-DDB7WEWC.js} +4 -3
- package/dist/{usage-6TN7FVWS.js → usage-HBDNFZ3O.js} +1 -0
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
outcomeOfFailedAsk,
|
|
5
5
|
reportMachineDenial,
|
|
6
6
|
storedWaitDeadline
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ORX5BTV4.js";
|
|
8
8
|
import {
|
|
9
9
|
isGatingMoment,
|
|
10
10
|
recordKeylessMoment
|
|
@@ -12,11 +12,11 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
isDeferAnswer,
|
|
14
14
|
oncePerSession
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZEWIMY63.js";
|
|
16
16
|
import {
|
|
17
17
|
activeHookSource,
|
|
18
18
|
activeIdentity
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GKFO5JLN.js";
|
|
20
20
|
import {
|
|
21
21
|
DEFAULT_SESSION,
|
|
22
22
|
UNNAMED_ACTION,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
reportEvent,
|
|
41
41
|
scopePathFor,
|
|
42
42
|
settleQuestionsForToolUse
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-DQLCFGHK.js";
|
|
44
44
|
import {
|
|
45
45
|
repoKeyFor
|
|
46
46
|
} from "./chunk-YPD3MTFU.js";
|
|
@@ -58,13 +58,13 @@ import {
|
|
|
58
58
|
sendNotification,
|
|
59
59
|
waitForQuestion,
|
|
60
60
|
waitsForThePhone
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-RJHX66EY.js";
|
|
62
62
|
import {
|
|
63
63
|
getMachineId
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-SFAP4AJY.js";
|
|
65
65
|
import {
|
|
66
66
|
claudeConfigDir
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-MWLTTLPK.js";
|
|
68
68
|
import {
|
|
69
69
|
getApiKey,
|
|
70
70
|
getBaseUrl
|
|
@@ -294,7 +294,7 @@ var loadedOnce = (load) => {
|
|
|
294
294
|
};
|
|
295
295
|
|
|
296
296
|
// src/codex-desktop-proxy.ts
|
|
297
|
-
var loadThePhone = () => import("./api-
|
|
297
|
+
var loadThePhone = () => import("./api-LW3PJQYY.js");
|
|
298
298
|
var theFirstCardLoadsAgain = () => {
|
|
299
299
|
};
|
|
300
300
|
var APP_SERVER_COMMAND = "app-server";
|
|
@@ -827,7 +827,7 @@ var codexDesktopCommand = async (args, entry, readAccount) => {
|
|
|
827
827
|
return runCodexDesktopProxy(engine2, args.slice(3), readAccount, { watchesForCards: layoutIsKnown });
|
|
828
828
|
}
|
|
829
829
|
if (args[0] === APP_CARDS_FLAG) {
|
|
830
|
-
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-
|
|
830
|
+
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-BD7LCI2I.js");
|
|
831
831
|
return codexAppCardsCommandOnThisMac(args.slice(1), entry, readAccount);
|
|
832
832
|
}
|
|
833
833
|
if (args.length > 2) throw new Error("Usage: pushary codex --desktop [path/to/Codex.app]");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SubscriptionRequiredError,
|
|
3
3
|
callMcpTool
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XAO6EYGM.js";
|
|
5
5
|
import {
|
|
6
6
|
CLIENT_REPORT_DISABLE_ENV,
|
|
7
7
|
isDisabledByEnv
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
installNetworkDefaults,
|
|
11
11
|
isNetworkFailure
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7BAO42UV.js";
|
|
13
13
|
import {
|
|
14
14
|
clientReportClaims
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MWLTTLPK.js";
|
|
16
16
|
import {
|
|
17
17
|
getApiKey,
|
|
18
18
|
getBaseUrl
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
APPROVAL_SETTINGS_PATH
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-64S5PQBQ.js";
|
|
4
4
|
import {
|
|
5
5
|
readMacAppAgentKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KPNZ7JUL.js";
|
|
7
7
|
import {
|
|
8
8
|
findExportedKeyLines,
|
|
9
9
|
isAdoptedMacAppKey,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-WN3RACVD.js";
|
|
17
17
|
import {
|
|
18
18
|
absoluteUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-YDR4BQ7R.js";
|
|
20
20
|
import {
|
|
21
21
|
isValidApiKey
|
|
22
22
|
} from "./chunk-AXJLJJ3M.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GKFO5JLN.js";
|
|
4
4
|
import {
|
|
5
5
|
hookOwnerOf,
|
|
6
6
|
hookOwnerOfCommands,
|
|
7
7
|
liveBridgeProbe,
|
|
8
8
|
resolveBridgeStub
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BJTSKOH3.js";
|
|
10
10
|
import {
|
|
11
11
|
AGENT_CHOICES
|
|
12
12
|
} from "./chunk-XV6S5PWW.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
guardedArgv,
|
|
19
19
|
pusharyDir,
|
|
20
20
|
vscodePluginDir
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-MWLTTLPK.js";
|
|
22
22
|
import {
|
|
23
23
|
readJsonSafe
|
|
24
24
|
} from "./chunk-QENTGE75.js";
|
|
@@ -141,18 +141,21 @@ const tell = (payload) => {
|
|
|
141
141
|
// tools: bash asks with { command }, write and edit both ask under "edit" with
|
|
142
142
|
// { filepath, diff }, webfetch with { url }, and a shell command reaching outside
|
|
143
143
|
// the worktree asks a second time under "external_directory".
|
|
144
|
-
const inputFrom = (permission, metadata) => {
|
|
144
|
+
const inputFrom = (permission, metadata, resources) => {
|
|
145
145
|
const meta = metadata && typeof metadata === "object" ? metadata : {}
|
|
146
|
+
if (permission === "read" && resources?.length === 1) return { file_path: resources[0] }
|
|
146
147
|
const command = text(meta.command)
|
|
147
148
|
if (command) return { command }
|
|
148
|
-
const
|
|
149
|
+
const preview = Array.isArray(meta.files) && meta.files.length === 1 ? meta.files[0] : undefined
|
|
150
|
+
const filepath = text(preview?.file) ?? text(meta.filepath) ?? text(meta.file_path) ?? text(meta.path)
|
|
149
151
|
// The diff rides along, because it is what the person is actually approving.
|
|
150
152
|
// OpenCode computes it before raising the permission and hands it over; without
|
|
151
153
|
// it the phone shows a filename and nothing to judge.
|
|
152
|
-
|
|
154
|
+
const diff = text(preview?.patch) ?? text(meta.diff)
|
|
155
|
+
if (filepath) return { file_path: filepath, ...(diff ? { diff } : {}) }
|
|
153
156
|
const url = text(meta.url)
|
|
154
157
|
if (url) return { url }
|
|
155
|
-
return { permission }
|
|
158
|
+
return { permission, ...(resources?.length ? { resources } : {}) }
|
|
156
159
|
}
|
|
157
160
|
|
|
158
161
|
// Two spellings of one request: the runtime publishes PermissionV1.Request
|
|
@@ -166,10 +169,11 @@ const askedFrom = (properties) => {
|
|
|
166
169
|
return {
|
|
167
170
|
id,
|
|
168
171
|
sessionID,
|
|
169
|
-
permission: text(properties.permission) ?? text(properties.type) ?? "unknown",
|
|
172
|
+
permission: text(properties.action) ?? text(properties.permission) ?? text(properties.type) ?? "unknown",
|
|
170
173
|
metadata: properties.metadata,
|
|
171
|
-
|
|
172
|
-
|
|
174
|
+
resources: Array.isArray(properties.resources) ? properties.resources.filter((item) => typeof item === "string") : undefined,
|
|
175
|
+
title: text(properties.title) ?? text(properties.message),
|
|
176
|
+
callID: text(properties.source && properties.source.id) ?? text(properties.callID) ?? text(properties.tool && properties.tool.callID),
|
|
173
177
|
}
|
|
174
178
|
}
|
|
175
179
|
|
|
@@ -178,7 +182,7 @@ const repliedID = (properties) => {
|
|
|
178
182
|
return text(properties.requestID) ?? text(properties.permissionID) ?? text(properties.id)
|
|
179
183
|
}
|
|
180
184
|
|
|
181
|
-
|
|
185
|
+
const PusharyPlugin = async ({ client, directory, worktree, replyPermission }) => {
|
|
182
186
|
const cwd = directory || worktree || process.cwd()
|
|
183
187
|
// OpenCode raises a permission under a coarse key \u2014 "edit" covers both write and
|
|
184
188
|
// edit \u2014 and names the actual tool only on tool.execute.before. Keeping the
|
|
@@ -195,6 +199,12 @@ export const PusharyPlugin = async ({ client, directory, worktree }) => {
|
|
|
195
199
|
// /session/{id}/permissions/{permissionID}, v2 exposes permission.reply against
|
|
196
200
|
// /permission/{requestID}/reply. Both routes are live in the server today.
|
|
197
201
|
const respond = async (asked, allow) => {
|
|
202
|
+
if (replyPermission) {
|
|
203
|
+
try {
|
|
204
|
+
await replyPermission({ sessionID: asked.sessionID, requestID: asked.id, decision: allow ? "once" : "reject" })
|
|
205
|
+
} catch {}
|
|
206
|
+
return
|
|
207
|
+
}
|
|
198
208
|
const legacy = client && typeof client.postSessionIdPermissionsPermissionId === "function"
|
|
199
209
|
? () => client.postSessionIdPermissionsPermissionId({
|
|
200
210
|
path: { id: asked.sessionID, permissionID: asked.id },
|
|
@@ -224,11 +234,17 @@ export const PusharyPlugin = async ({ client, directory, worktree }) => {
|
|
|
224
234
|
}
|
|
225
235
|
|
|
226
236
|
const gate = async (asked) => {
|
|
237
|
+
if (asked.permission === "external_directory") return
|
|
238
|
+
if (replyPermission && !["shell", "read", "edit", "webfetch"].includes(asked.permission)) return
|
|
239
|
+
if (Array.isArray(asked.metadata?.files) && asked.metadata.files.length > 1) return
|
|
240
|
+
if (["read", "edit"].includes(asked.permission) && asked.resources?.length > 1) return
|
|
241
|
+
const tool = tools.get(asked.callID)
|
|
242
|
+
if (["shell", "bash"].includes(tool?.name) && text(tool.input?.workdir) && tool.input.workdir !== cwd) return
|
|
227
243
|
const reply = await run({
|
|
228
244
|
...base(asked.sessionID),
|
|
229
245
|
hook_event_name: "${OPENCODE_APPROVAL_EVENT}",
|
|
230
|
-
tool_name:
|
|
231
|
-
tool_input: inputFrom(asked.permission, asked.metadata),
|
|
246
|
+
tool_name: tool?.name ?? asked.permission,
|
|
247
|
+
tool_input: inputFrom(asked.permission, { ...tool?.input, ...asked.metadata }, asked.resources),
|
|
232
248
|
permission_id: asked.id,
|
|
233
249
|
permission_type: asked.permission,
|
|
234
250
|
title: asked.title,
|
|
@@ -256,7 +272,7 @@ export const PusharyPlugin = async ({ client, directory, worktree }) => {
|
|
|
256
272
|
|
|
257
273
|
return {
|
|
258
274
|
"tool.execute.before": async (input) => {
|
|
259
|
-
remember(tools, input && input.callID, input
|
|
275
|
+
remember(tools, input && input.callID, { name: input?.tool, input: input?.args })
|
|
260
276
|
},
|
|
261
277
|
|
|
262
278
|
"tool.execute.after": async (input, output) => {
|
|
@@ -267,7 +283,7 @@ export const PusharyPlugin = async ({ client, directory, worktree }) => {
|
|
|
267
283
|
hook_event_name: "tool.execute.after",
|
|
268
284
|
tool_name: text(input && input.tool) ?? "unknown",
|
|
269
285
|
tool_input: input && input.args && typeof input.args === "object" ? input.args : {},
|
|
270
|
-
tool_result: { title: text(output && output.title), output: text(output && output.output) },
|
|
286
|
+
tool_result: output?.error ? { error: output.error } : { title: text(output && output.title), output: text(output && output.output) },
|
|
271
287
|
})
|
|
272
288
|
},
|
|
273
289
|
|
|
@@ -290,7 +306,7 @@ export const PusharyPlugin = async ({ client, directory, worktree }) => {
|
|
|
290
306
|
const properties = event && event.properties
|
|
291
307
|
if (${OPENCODE_APPROVAL_EVENTS_PLACEHOLDER}.includes(type)) {
|
|
292
308
|
const asked = askedFrom(properties)
|
|
293
|
-
if (asked) void gate(asked)
|
|
309
|
+
if (asked && !waiting.has(asked.id)) void gate(asked)
|
|
294
310
|
return
|
|
295
311
|
}
|
|
296
312
|
if (type === ${JSON.stringify(OPENCODE_REPLIED_EVENT)}) {
|
|
@@ -316,6 +332,49 @@ export const PusharyPlugin = async ({ client, directory, worktree }) => {
|
|
|
316
332
|
},
|
|
317
333
|
}
|
|
318
334
|
}
|
|
335
|
+
|
|
336
|
+
export default {
|
|
337
|
+
id: "pushary",
|
|
338
|
+
server: PusharyPlugin,
|
|
339
|
+
async setup(ctx) {
|
|
340
|
+
const hooks = await PusharyPlugin({
|
|
341
|
+
directory: ctx.location.directory,
|
|
342
|
+
replyPermission: (request) => ctx.permission.reply(request),
|
|
343
|
+
})
|
|
344
|
+
await ctx.tool.hook("execute.before", (event) => hooks["tool.execute.before"]({
|
|
345
|
+
callID: event.id, tool: event.tool, sessionID: event.sessionID, args: event.input,
|
|
346
|
+
}))
|
|
347
|
+
await ctx.tool.hook("execute.after", (event) => hooks["tool.execute.after"]({
|
|
348
|
+
callID: event.id, tool: event.tool, sessionID: event.sessionID, args: event.input,
|
|
349
|
+
}, { output: event.status === "completed" && Array.isArray(event.result.content)
|
|
350
|
+
? event.result.content.filter((part) => part.type === "text").map((part) => part.text).join("\\n")
|
|
351
|
+
: undefined, error: event.status === "error" ? event.error.message : undefined }))
|
|
352
|
+
await ctx.session.hook("prompt", (event) => hooks["chat.message"]({ sessionID: event.sessionID }, {
|
|
353
|
+
parts: [{ type: "text", text: event.prompt.text }],
|
|
354
|
+
}))
|
|
355
|
+
const controller = new AbortController()
|
|
356
|
+
const consume = async () => {
|
|
357
|
+
try {
|
|
358
|
+
for await (const event of ctx.event.subscribe({ signal: controller.signal })) {
|
|
359
|
+
if (controller.signal.aborted) break
|
|
360
|
+
if (event.location && (event.location.directory !== ctx.location.directory || event.location.workspaceID !== ctx.location.workspaceID)) continue
|
|
361
|
+
const type = event.type === "session.execution.succeeded" ? "session.idle" : event.type
|
|
362
|
+
await hooks.event({ event: { type, properties: event.data } })
|
|
363
|
+
}
|
|
364
|
+
} catch {
|
|
365
|
+
if (!controller.signal.aborted) console.error("Pushary event subscription stopped; native prompts remain available.")
|
|
366
|
+
} finally {
|
|
367
|
+
await hooks.dispose()
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
const events = consume()
|
|
371
|
+
return async () => {
|
|
372
|
+
controller.abort()
|
|
373
|
+
await hooks.dispose()
|
|
374
|
+
await events
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
}
|
|
319
378
|
`;
|
|
320
379
|
var openCodePluginModule = () => ({
|
|
321
380
|
marker: OPENCODE_PLUGIN_MARKER,
|
|
@@ -22,23 +22,24 @@ import {
|
|
|
22
22
|
turnCodexAppCardsOff,
|
|
23
23
|
turnCodexAppCardsOn,
|
|
24
24
|
whyLaunchctlFailed
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-BQ2VV7LY.js";
|
|
26
|
+
import "./chunk-PITQ5ZIQ.js";
|
|
27
27
|
import "./chunk-XCEN33UP.js";
|
|
28
28
|
import "./chunk-QCGNGEGE.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-LBHJJEKT.js";
|
|
30
30
|
import "./chunk-XHKBHWLX.js";
|
|
31
31
|
import "./chunk-WN3RACVD.js";
|
|
32
32
|
import "./chunk-E46NE7FB.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-SFAP4AJY.js";
|
|
34
34
|
import "./chunk-Y5VKZNFN.js";
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-MWLTTLPK.js";
|
|
36
|
+
import "./chunk-CJ5TCFD4.js";
|
|
37
37
|
import "./chunk-QENTGE75.js";
|
|
38
38
|
import "./chunk-BG4Y64FW.js";
|
|
39
39
|
import "./chunk-ERK24P76.js";
|
|
40
40
|
import "./chunk-QTOLNRET.js";
|
|
41
41
|
import "./chunk-AXJLJJ3M.js";
|
|
42
|
+
import "./chunk-MLKGABMK.js";
|
|
42
43
|
export {
|
|
43
44
|
CODEX_APP_CARDS_DIRECTORY,
|
|
44
45
|
CODEX_APP_CARDS_LOGIN_ITEM,
|
|
@@ -11,11 +11,12 @@ import {
|
|
|
11
11
|
installedCodexApp,
|
|
12
12
|
shellQuoted,
|
|
13
13
|
writeDesktopProxy
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-PITQ5ZIQ.js";
|
|
15
15
|
import "./chunk-XCEN33UP.js";
|
|
16
16
|
import {
|
|
17
17
|
CODEX_APP_LAUNCH_VARIABLE
|
|
18
18
|
} from "./chunk-E46NE7FB.js";
|
|
19
|
+
import "./chunk-MLKGABMK.js";
|
|
19
20
|
export {
|
|
20
21
|
CODEX_APP_LAUNCH_VARIABLE,
|
|
21
22
|
LAUNCHCTL,
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
isCodexQuestionLeftWithTheLocalClient,
|
|
12
12
|
planCodexElicitation,
|
|
13
13
|
reportOwnedQuestion
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-O65F2IIN.js";
|
|
15
15
|
import "./chunk-ELLJPP6O.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-G36T5LAP.js";
|
|
17
17
|
import "./chunk-USE5IEEW.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-SHJVFW22.js";
|
|
19
19
|
import "./chunk-VUFHYMSP.js";
|
|
20
20
|
import "./chunk-2AELPDMT.js";
|
|
21
21
|
import "./chunk-GAMVAORR.js";
|
|
@@ -24,16 +24,16 @@ import "./chunk-6ICPEJY5.js";
|
|
|
24
24
|
import "./chunk-YPD3MTFU.js";
|
|
25
25
|
import {
|
|
26
26
|
writeDegraded
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-RJHX66EY.js";
|
|
28
|
+
import "./chunk-XAO6EYGM.js";
|
|
29
29
|
import "./chunk-POFBE6ZY.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-YDR4BQ7R.js";
|
|
31
|
+
import "./chunk-7BAO42UV.js";
|
|
32
|
+
import "./chunk-SFAP4AJY.js";
|
|
33
33
|
import "./chunk-PPY5N2E6.js";
|
|
34
34
|
import "./chunk-KZERVKTD.js";
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-MWLTTLPK.js";
|
|
36
|
+
import "./chunk-CJ5TCFD4.js";
|
|
37
37
|
import "./chunk-QENTGE75.js";
|
|
38
38
|
import "./chunk-BG4Y64FW.js";
|
|
39
39
|
import "./chunk-ERK24P76.js";
|
|
@@ -41,6 +41,7 @@ import "./chunk-QTOLNRET.js";
|
|
|
41
41
|
import {
|
|
42
42
|
canonicalJsonText
|
|
43
43
|
} from "./chunk-AXJLJJ3M.js";
|
|
44
|
+
import "./chunk-MLKGABMK.js";
|
|
44
45
|
|
|
45
46
|
// src/codex-session-launch.ts
|
|
46
47
|
import { spawn as spawn2 } from "child_process";
|
|
@@ -7,21 +7,22 @@ import {
|
|
|
7
7
|
recordUnfinishedUpgrade,
|
|
8
8
|
upgradeInstalledPackage,
|
|
9
9
|
withUpgradeLock
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-JGQV4MDQ.js";
|
|
11
|
+
import "./chunk-4N5E4JNF.js";
|
|
12
|
+
import "./chunk-G36T5LAP.js";
|
|
13
13
|
import "./chunk-USE5IEEW.js";
|
|
14
14
|
import "./chunk-VUFHYMSP.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-7HDGH3Z2.js";
|
|
16
16
|
import "./chunk-6ICPEJY5.js";
|
|
17
17
|
import "./chunk-POFBE6ZY.js";
|
|
18
18
|
import "./chunk-KZERVKTD.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-MWLTTLPK.js";
|
|
20
|
+
import "./chunk-CJ5TCFD4.js";
|
|
21
21
|
import "./chunk-QENTGE75.js";
|
|
22
22
|
import "./chunk-ERK24P76.js";
|
|
23
23
|
import "./chunk-QTOLNRET.js";
|
|
24
24
|
import "./chunk-AXJLJJ3M.js";
|
|
25
|
+
import "./chunk-MLKGABMK.js";
|
|
25
26
|
export {
|
|
26
27
|
finishGlobalUpgrade,
|
|
27
28
|
finishUpgradeWithLock,
|
|
@@ -2,12 +2,13 @@ import {
|
|
|
2
2
|
getMachineId,
|
|
3
3
|
getOrCreateMachineId,
|
|
4
4
|
readExistingMachineId
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-SFAP4AJY.js";
|
|
6
|
+
import "./chunk-MWLTTLPK.js";
|
|
7
|
+
import "./chunk-CJ5TCFD4.js";
|
|
8
8
|
import "./chunk-QENTGE75.js";
|
|
9
9
|
import "./chunk-QTOLNRET.js";
|
|
10
10
|
import "./chunk-AXJLJJ3M.js";
|
|
11
|
+
import "./chunk-MLKGABMK.js";
|
|
11
12
|
export {
|
|
12
13
|
getMachineId,
|
|
13
14
|
getOrCreateMachineId,
|
|
@@ -22,14 +22,15 @@ import {
|
|
|
22
22
|
resolveControlPolicy,
|
|
23
23
|
resolveProviderBinary,
|
|
24
24
|
trackProviderInventory
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-G36T5LAP.js";
|
|
26
26
|
import "./chunk-USE5IEEW.js";
|
|
27
27
|
import "./chunk-VUFHYMSP.js";
|
|
28
28
|
import "./chunk-6ICPEJY5.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-CJ5TCFD4.js";
|
|
30
30
|
import "./chunk-QENTGE75.js";
|
|
31
31
|
import "./chunk-QTOLNRET.js";
|
|
32
32
|
import "./chunk-AXJLJJ3M.js";
|
|
33
|
+
import "./chunk-MLKGABMK.js";
|
|
33
34
|
export {
|
|
34
35
|
CLAUDE_BRIDGE_CAPABILITY,
|
|
35
36
|
CLAUDE_RESUME_CAPABILITY,
|
|
@@ -33,10 +33,11 @@ import {
|
|
|
33
33
|
serviceOwedBackMark,
|
|
34
34
|
vscodePluginDir,
|
|
35
35
|
vscodePluginMcp
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
36
|
+
} from "./chunk-MWLTTLPK.js";
|
|
37
|
+
import "./chunk-CJ5TCFD4.js";
|
|
38
38
|
import "./chunk-QTOLNRET.js";
|
|
39
39
|
import "./chunk-AXJLJJ3M.js";
|
|
40
|
+
import "./chunk-MLKGABMK.js";
|
|
40
41
|
export {
|
|
41
42
|
autoUpdateLock,
|
|
42
43
|
autoUpdateLog,
|
|
@@ -11,41 +11,42 @@ import {
|
|
|
11
11
|
reapplyOpenCodePlugin,
|
|
12
12
|
reapplyVsCodePlugin,
|
|
13
13
|
repairCodexHolds
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-6T5Z64KS.js";
|
|
15
|
+
import "./chunk-BUZIEL7Y.js";
|
|
16
|
+
import "./chunk-4VRTSDGP.js";
|
|
17
|
+
import "./chunk-UADSXJZ4.js";
|
|
18
|
+
import "./chunk-ZGU3NXL2.js";
|
|
19
19
|
import "./chunk-USE5IEEW.js";
|
|
20
20
|
import "./chunk-VUFHYMSP.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-GKFO5JLN.js";
|
|
22
|
+
import "./chunk-BJTSKOH3.js";
|
|
23
|
+
import "./chunk-RGSW36XH.js";
|
|
24
24
|
import "./chunk-XV6S5PWW.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-IFPOHFDJ.js";
|
|
26
26
|
import "./chunk-NMUI3ZWG.js";
|
|
27
27
|
import "./chunk-XHKBHWLX.js";
|
|
28
28
|
import "./chunk-6ICPEJY5.js";
|
|
29
29
|
import "./chunk-WN3RACVD.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-DQLCFGHK.js";
|
|
31
31
|
import "./chunk-33OOEVPG.js";
|
|
32
32
|
import "./chunk-YPD3MTFU.js";
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-RJHX66EY.js";
|
|
34
|
+
import "./chunk-XAO6EYGM.js";
|
|
35
35
|
import "./chunk-POFBE6ZY.js";
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-YDR4BQ7R.js";
|
|
37
|
+
import "./chunk-7BAO42UV.js";
|
|
38
|
+
import "./chunk-SFAP4AJY.js";
|
|
39
39
|
import "./chunk-PPY5N2E6.js";
|
|
40
40
|
import "./chunk-KZERVKTD.js";
|
|
41
41
|
import "./chunk-Y5VKZNFN.js";
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-MWLTTLPK.js";
|
|
43
|
+
import "./chunk-CJ5TCFD4.js";
|
|
44
44
|
import "./chunk-QENTGE75.js";
|
|
45
45
|
import "./chunk-BG4Y64FW.js";
|
|
46
46
|
import "./chunk-ERK24P76.js";
|
|
47
47
|
import "./chunk-QTOLNRET.js";
|
|
48
48
|
import "./chunk-AXJLJJ3M.js";
|
|
49
|
+
import "./chunk-MLKGABMK.js";
|
|
49
50
|
export {
|
|
50
51
|
ensureCodexTrustAfterReapply,
|
|
51
52
|
inspectConfiguredManagedProviders,
|