pushary 1.9.210 → 1.9.213

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.
Files changed (145) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/{api-GBK5CCGM.js → api-XXA3DBK5.js} +11 -11
  3. package/dist/bin/pushary-audit.js +3 -3
  4. package/dist/bin/pushary-bell-hook.js +28 -28
  5. package/dist/bin/pushary-bell.js +12 -12
  6. package/dist/bin/pushary-calls.js +15 -15
  7. package/dist/bin/pushary-claude.js +36 -35
  8. package/dist/bin/pushary-clean.js +39 -39
  9. package/dist/bin/pushary-codex-bridge.js +24 -24
  10. package/dist/bin/pushary-codex-hook.js +38 -42
  11. package/dist/bin/pushary-codex-session.js +8 -8
  12. package/dist/bin/pushary-codex.js +16 -16
  13. package/dist/bin/pushary-connect.js +35 -35
  14. package/dist/bin/pushary-cowork.js +5 -5
  15. package/dist/bin/pushary-daemon.js +46 -47
  16. package/dist/bin/pushary-disconnect.js +30 -30
  17. package/dist/bin/pushary-display-hook.js +1 -0
  18. package/dist/bin/pushary-doctor.js +48 -47
  19. package/dist/bin/pushary-elicitation-hook.js +28 -29
  20. package/dist/bin/pushary-gemini-bridge.js +19 -19
  21. package/dist/bin/pushary-gemini-hook.js +33 -35
  22. package/dist/bin/pushary-hook.js +34 -36
  23. package/dist/bin/pushary-login.js +22 -22
  24. package/dist/bin/pushary-logout.js +30 -30
  25. package/dist/bin/pushary-mcp.js +12 -12
  26. package/dist/bin/pushary-mode.js +16 -16
  27. package/dist/bin/pushary-notification-hook.js +27 -27
  28. package/dist/bin/pushary-opencode-bridge.js +24 -24
  29. package/dist/bin/pushary-opencode-hook.js +35 -39
  30. package/dist/bin/pushary-permission-denied-hook.js +34 -36
  31. package/dist/bin/pushary-permission-hook.js +34 -36
  32. package/dist/bin/pushary-post-hook.js +28 -28
  33. package/dist/bin/pushary-prompt-hook.js +27 -27
  34. package/dist/bin/pushary-session-end-hook.js +27 -27
  35. package/dist/bin/pushary-session-start-hook.js +39 -40
  36. package/dist/bin/pushary-sessions.js +14 -14
  37. package/dist/bin/pushary-setup.js +63 -65
  38. package/dist/bin/pushary-stats.js +5 -5
  39. package/dist/bin/pushary-status.js +36 -36
  40. package/dist/bin/pushary-stop-hook.js +27 -27
  41. package/dist/bin/pushary-stopfailure-hook.js +27 -27
  42. package/dist/bin/pushary-suggestions.js +16 -16
  43. package/dist/bin/pushary-transcript-register.js +22 -20
  44. package/dist/bin/pushary-transcripts.js +26 -26
  45. package/dist/bin/pushary-upgrade.js +49 -50
  46. package/dist/bin/pushary-wait.js +16 -16
  47. package/dist/bin/pushary.js +7 -7
  48. package/dist/{chunk-ULDH35EQ.js → chunk-2BKMZ2CZ.js} +5 -5
  49. package/dist/{chunk-HFDMGCBY.js → chunk-2DNM6F7C.js} +5 -5
  50. package/dist/{chunk-FZDIXPVK.js → chunk-2OREQ7MI.js} +2 -2
  51. package/dist/{chunk-DVCYIK56.js → chunk-2WCI5BY6.js} +2 -2
  52. package/dist/{chunk-M2PWMMXD.js → chunk-3T7KADQO.js} +422 -71
  53. package/dist/{chunk-73TR7RU4.js → chunk-3USB6JEH.js} +3 -3
  54. package/dist/{chunk-JJB34JRR.js → chunk-47G72ONB.js} +3 -3
  55. package/dist/{chunk-52MSHZYI.js → chunk-4DXHNWUY.js} +6 -6
  56. package/dist/{chunk-672F6V2L.js → chunk-4NJBLOER.js} +2 -2
  57. package/dist/{chunk-JMKJHN6U.js → chunk-53PLSLF5.js} +45 -167
  58. package/dist/{chunk-GS4RR3LH.js → chunk-5B5PPHJH.js} +1 -1
  59. package/dist/{chunk-37HOIRPC.js → chunk-5ML6PZ4U.js} +15 -17
  60. package/dist/{chunk-7AYZRIII.js → chunk-5XBZABC5.js} +2 -2
  61. package/dist/{chunk-6EPBLKBZ.js → chunk-6D54GFZC.js} +5 -5
  62. package/dist/{chunk-XE47DXLF.js → chunk-6FLCKWIH.js} +5 -5
  63. package/dist/{chunk-JWPOZFT6.js → chunk-6FN7NPOE.js} +2 -2
  64. package/dist/{chunk-TGYDKCOB.js → chunk-6N73T3G2.js} +2 -2
  65. package/dist/{chunk-LSUB2RBM.js → chunk-7H6BFJU5.js} +1 -1
  66. package/dist/{chunk-2L6RQHDJ.js → chunk-7MPVFAYZ.js} +1 -1
  67. package/dist/{chunk-JFSAQQO2.js → chunk-ARTOOCLW.js} +1 -1
  68. package/dist/{chunk-5AY2STJB.js → chunk-BKTWGQLC.js} +30 -10
  69. package/dist/{chunk-FGYQI6YP.js → chunk-CJRHVIUJ.js} +1 -1
  70. package/dist/{chunk-GAJ5BULC.js → chunk-CR5X46JQ.js} +1 -1
  71. package/dist/{chunk-SWUBCXOZ.js → chunk-CXLHBAN4.js} +3 -3
  72. package/dist/{chunk-NQAET7YS.js → chunk-FBDVDCMC.js} +9 -6
  73. package/dist/{chunk-SK65JVE3.js → chunk-FCIJEVDH.js} +1 -1
  74. package/dist/{chunk-NQQDBWMM.js → chunk-FJJRXIZC.js} +7 -7
  75. package/dist/{chunk-AYITBDTL.js → chunk-FUZSKAEQ.js} +3 -3
  76. package/dist/{chunk-X6KWCU54.js → chunk-FYAEQIYF.js} +4 -4
  77. package/dist/{chunk-QMXE2YQO.js → chunk-G4UCXWJX.js} +6 -6
  78. package/dist/{chunk-5SGCCWNR.js → chunk-GJ5XTWNZ.js} +1 -1
  79. package/dist/{chunk-ERVRBZNI.js → chunk-GKMSHV5D.js} +2 -2
  80. package/dist/{chunk-XRURBIKQ.js → chunk-GKTQXPUM.js} +1 -1
  81. package/dist/{chunk-TC6DWKY5.js → chunk-HFDNWC2K.js} +1 -1
  82. package/dist/{chunk-RYK2DXDF.js → chunk-HT4WO7V6.js} +7 -7
  83. package/dist/{chunk-TFCNGH7V.js → chunk-ID7W4YBQ.js} +1 -1
  84. package/dist/{chunk-BV74A4Q3.js → chunk-IHG2TFXZ.js} +3 -3
  85. package/dist/{chunk-VM6WBORP.js → chunk-JKM7YRYV.js} +141 -7
  86. package/dist/{chunk-Q2NOGE3Y.js → chunk-JYDVDSBM.js} +8 -13
  87. package/dist/{chunk-CJAHB4QY.js → chunk-K3HFMX5R.js} +6 -6
  88. package/dist/{chunk-7WVGOW6O.js → chunk-K5IPDN4D.js} +5 -5
  89. package/dist/{chunk-VUUC2V3L.js → chunk-KJA5JZXV.js} +2 -2
  90. package/dist/{chunk-VIKKRYII.js → chunk-KQRWWJLF.js} +1 -1
  91. package/dist/{chunk-BPEYHTXU.js → chunk-LBPGPPHU.js} +2 -2
  92. package/dist/{chunk-TSUPVKMX.js → chunk-NTNEBBYW.js} +10 -10
  93. package/dist/{chunk-52CYFOP4.js → chunk-O372NWUI.js} +5 -5
  94. package/dist/{chunk-SA634ZQS.js → chunk-ODF2RMXP.js} +4 -4
  95. package/dist/{chunk-ADNPGA5K.js → chunk-OLD2IPCZ.js} +6 -6
  96. package/dist/{chunk-5QEFRYVG.js → chunk-OV7W5JYC.js} +9 -9
  97. package/dist/{chunk-YOM5NVDW.js → chunk-PKDU2BY4.js} +3 -3
  98. package/dist/{chunk-JF3IB3QX.js → chunk-POXHWH73.js} +14 -3
  99. package/dist/{chunk-JSTAZSTC.js → chunk-PSKPKVM6.js} +1 -1
  100. package/dist/{chunk-HUDP6NKM.js → chunk-QEMU3P55.js} +3 -3
  101. package/dist/{chunk-7V4ZAQNO.js → chunk-QLKIY3FD.js} +1 -1
  102. package/dist/{chunk-XELCQFDJ.js → chunk-QQEJDPYK.js} +1 -1
  103. package/dist/{chunk-3MO2JND5.js → chunk-RDWNFNDW.js} +4 -4
  104. package/dist/{chunk-NPYCMOFC.js → chunk-RE5KA47K.js} +3 -3
  105. package/dist/{chunk-E2WCYHXF.js → chunk-RN2PB5JJ.js} +5 -5
  106. package/dist/{chunk-TAKPXBNF.js → chunk-RZISUO3M.js} +23 -13
  107. package/dist/{chunk-VXXWVOKF.js → chunk-SGOP6D4K.js} +1 -1
  108. package/dist/{chunk-EH6ATZZU.js → chunk-SK6242SK.js} +2 -2
  109. package/dist/{chunk-GTNSTDUB.js → chunk-SR3FOAJE.js} +2 -2
  110. package/dist/{chunk-LEOHGIZ5.js → chunk-T63XZCBU.js} +5 -5
  111. package/dist/{chunk-GTHM6XOG.js → chunk-TBCV2U6Y.js} +1 -1
  112. package/dist/{chunk-GXGJYRAN.js → chunk-UPZHYN4N.js} +4 -4
  113. package/dist/{chunk-V3PYEJRY.js → chunk-UQQN6ST3.js} +1 -1
  114. package/dist/{chunk-IYGEE7XO.js → chunk-VKGJ4XY5.js} +1 -1
  115. package/dist/{chunk-JA6DFYFJ.js → chunk-VUCXVBDQ.js} +3 -3
  116. package/dist/{chunk-AJV7HEGB.js → chunk-VZD4SLJE.js} +15 -13
  117. package/dist/{chunk-XMZEG5QB.js → chunk-W6PL3FPJ.js} +4 -4
  118. package/dist/{chunk-W7EUKTEI.js → chunk-W7Z4GJZI.js} +3 -3
  119. package/dist/{chunk-GC64OIDA.js → chunk-WIWFIQL4.js} +2 -2
  120. package/dist/{chunk-VQLAGEHH.js → chunk-WXWWCODY.js} +1 -1
  121. package/dist/{chunk-SOMSKUI6.js → chunk-Y3OHWGZV.js} +2 -2
  122. package/dist/{chunk-E4AOJK33.js → chunk-YN4Q3ZXZ.js} +6 -4
  123. package/dist/{chunk-SW33W47V.js → chunk-Z6QGSQEN.js} +4 -4
  124. package/dist/{chunk-7Y4AMZG3.js → chunk-ZJYSZDFR.js} +1 -1
  125. package/dist/{chunk-GILLSUOE.js → chunk-ZRDDV7QK.js} +5 -5
  126. package/dist/{chunk-RMASRYS4.js → chunk-ZYXC6ZEQ.js} +1 -1
  127. package/dist/{codex-app-cards-switch-VSNLHN5H.js → codex-app-cards-switch-3A5N6T77.js} +11 -11
  128. package/dist/{codex-card-routing-EBLLT4JN.js → codex-card-routing-SYP6VQTQ.js} +2 -2
  129. package/dist/{codex-desktop-launch-XGXKINN5.js → codex-desktop-launch-XFYCWMO6.js} +1 -1
  130. package/dist/{codex-session-launch-YQNK4MEM.js → codex-session-launch-O4ZB2CTG.js} +20 -20
  131. package/dist/{config-QTON6UUP.js → config-KVGNGI6J.js} +3 -3
  132. package/dist/{global-upgrade-AOZNS5TM.js → global-upgrade-MRY3EP7V.js} +9 -9
  133. package/dist/{identity-TILIXUYO.js → identity-PSFVJNH5.js} +4 -4
  134. package/dist/{live-capabilities-BE7NSCFI.js → live-capabilities-VBKANCXF.js} +4 -4
  135. package/dist/{paths-MIWMKITN.js → paths-JPEMX4YI.js} +3 -3
  136. package/dist/reapply-TBGC63MP.js +74 -0
  137. package/dist/src/index.d.ts +2 -21
  138. package/dist/src/index.js +33 -35
  139. package/dist/{upgrade-lock-N75TGVFZ.js → upgrade-lock-RW44O57U.js} +4 -4
  140. package/dist/{usage-IH2QUEKB.js → usage-NCJLUCAW.js} +3 -3
  141. package/package.json +1 -1
  142. package/dist/chunk-BXFI56J5.js +0 -78
  143. package/dist/chunk-ELY55B2S.js +0 -162
  144. package/dist/chunk-SHK2PLZC.js +0 -39
  145. package/dist/reapply-NBOQ7UO2.js +0 -75
@@ -1,78 +0,0 @@
1
- import {
2
- serviceNodeFor
3
- } from "./chunk-52MSHZYI.js";
4
- import {
5
- OWNER_ONLY_FILE_MODE,
6
- readOwnerOnlyJson
7
- } from "./chunk-P6DUWKAO.js";
8
- import {
9
- plannedGlobalPackage,
10
- readGlobalPrefix
11
- } from "./chunk-E4AOJK33.js";
12
- import {
13
- globalTranscriptRegisterEntry
14
- } from "./chunk-CXQWDQCJ.js";
15
-
16
- // src/hermes/history-helper.ts
17
- import { chmodSync, existsSync, mkdirSync, renameSync, rmSync, writeFileSync } from "fs";
18
- import { dirname, join } from "path";
19
- var HERMES_HISTORY_HELPER_RECORD_FILE = "hermes-history-helper.json";
20
- var HERMES_HISTORY_HELPER_RECORD_VERSION = 1;
21
- var HERMES_HISTORY_HELPER_RECORD_MAX_BYTES = 8192;
22
- var PUSHARY_DIRECTORY_MODE = 448;
23
- var hermesHistoryNeedsTheCliHelper = (facts) => facts.sessionHistory && facts.macAppHistory === "none";
24
- var hermesHistoryHelperRecordPath = (pusharyDirectory) => join(pusharyDirectory, HERMES_HISTORY_HELPER_RECORD_FILE);
25
- var hermesHistoryHelperRecordFor = (runtime, entry) => ({
26
- version: HERMES_HISTORY_HELPER_RECORD_VERSION,
27
- command: [runtime, entry]
28
- });
29
- var hermesHistoryHelperRecordFailed = (outcome) => outcome.kind === "helper_not_installed" || outcome.kind === "write_failed";
30
- var serializedRecord = (record) => `${JSON.stringify(record, null, 2)}
31
- `;
32
- var recordIsAlreadyInPlace = (record, path) => {
33
- try {
34
- return JSON.stringify(readOwnerOnlyJson(path, HERMES_HISTORY_HELPER_RECORD_MAX_BYTES)) === JSON.stringify(record);
35
- } catch {
36
- return false;
37
- }
38
- };
39
- var discardStagedRecord = (staged) => {
40
- try {
41
- rmSync(staged, { force: true });
42
- } catch {
43
- return;
44
- }
45
- };
46
- var writeHermesHistoryHelperRecord = (record, path) => {
47
- if (record === null || !record.command.every((part) => existsSync(part))) return { kind: "helper_not_installed" };
48
- if (recordIsAlreadyInPlace(record, path)) return { kind: "unchanged", path };
49
- const staged = `${path}.${process.pid}.tmp`;
50
- try {
51
- mkdirSync(dirname(path), { recursive: true, mode: PUSHARY_DIRECTORY_MODE });
52
- writeFileSync(staged, serializedRecord(record), { mode: OWNER_ONLY_FILE_MODE });
53
- chmodSync(staged, OWNER_ONLY_FILE_MODE);
54
- renameSync(staged, path);
55
- return { kind: "written", path };
56
- } catch {
57
- discardStagedRecord(staged);
58
- return { kind: "write_failed", path };
59
- }
60
- };
61
- var installedHermesHistoryHelper = (execPath) => {
62
- const prefix = readGlobalPrefix();
63
- if (prefix === void 0) return null;
64
- const entry = globalTranscriptRegisterEntry(prefix, plannedGlobalPackage(), process.platform);
65
- return hermesHistoryHelperRecordFor(serviceNodeFor(execPath, existsSync), entry);
66
- };
67
- var recordInstalledHermesHistoryHelper = (pusharyDirectory, execPath = process.execPath, platform = process.platform) => {
68
- const record = installedHermesHistoryHelper(execPath);
69
- if (platform === "win32") return record?.command.every((part) => existsSync(part)) ? { kind: "on_path" } : { kind: "helper_not_installed" };
70
- return writeHermesHistoryHelperRecord(record, hermesHistoryHelperRecordPath(pusharyDirectory));
71
- };
72
-
73
- export {
74
- hermesHistoryNeedsTheCliHelper,
75
- hermesHistoryHelperRecordPath,
76
- hermesHistoryHelperRecordFailed,
77
- recordInstalledHermesHistoryHelper
78
- };
@@ -1,162 +0,0 @@
1
- import {
2
- announceSubscriptionRequired,
3
- isDeferAnswer
4
- } from "./chunk-SHK2PLZC.js";
5
- import {
6
- askUser,
7
- isDecisionStopped,
8
- isQuestionLimitRefusal,
9
- isThePersonsStop,
10
- waitForOpenQuestion,
11
- waitForQuestion
12
- } from "./chunk-Q2NOGE3Y.js";
13
- import {
14
- SubscriptionRequiredError
15
- } from "./chunk-HFDMGCBY.js";
16
- import {
17
- getMachineId
18
- } from "./chunk-FGYQI6YP.js";
19
- import {
20
- ASK_CONTEXT_MAX,
21
- agentQuestionContext,
22
- answersToQuestionsAsAsked,
23
- fitsAPlainSelect,
24
- isAgentQuestionSet,
25
- isTypedAnswerQuestion,
26
- parseAgentQuestionAnswers,
27
- plainAskOf,
28
- questionsShownAsASet
29
- } from "./chunk-JF3IB3QX.js";
30
-
31
- // src/agent-question-ask.ts
32
- var ONLY_QUESTION = { index: 0, total: 1 };
33
- var STOPPED = { kind: "stopped" };
34
- var UNAVAILABLE = { kind: "unavailable" };
35
- var UNANSWERED = { kind: "unanswered" };
36
- var answeredWith = (answers) => ({ kind: "answered", answers });
37
- var failedAskOutcome = (error, sessionId) => outcomeOfFailedAsk(error, sessionId, UNAVAILABLE) ?? UNANSWERED;
38
- var richCardOf = (question) => {
39
- const shownAsASet = questionsShownAsASet([question]);
40
- if (!shownAsASet) return void 0;
41
- return isAgentQuestionSet(shownAsASet) || !fitsAPlainSelect(question) ? shownAsASet : void 0;
42
- };
43
- var writeInTravelsBesideThePlainSelect = (question, ask, richCard) => ask.type === "select" && richCard === void 0 && question.allowOther !== false;
44
- var cardOf = (question) => {
45
- const ask = plainAskOf(question);
46
- const richCard = richCardOf(question);
47
- return {
48
- type: ask.type,
49
- ...ask.type === "select" ? { options: [...ask.options] } : {},
50
- ...richCard ? { questions: [...richCard] } : {},
51
- ...writeInTravelsBesideThePlainSelect(question, ask, richCard) ? { allowOther: true } : {}
52
- };
53
- };
54
- var positionedToolUseId = (toolUseId, position) => toolUseId && position.total > 1 ? `${toolUseId}#q${position.index}` : toolUseId;
55
- var outcomeOfFailedAsk = (error, sessionId, failure) => {
56
- if (isQuestionLimitRefusal(error)) return void 0;
57
- if (!(error instanceof SubscriptionRequiredError)) return failure;
58
- announceSubscriptionRequired(error.upgradeUrl, sessionId);
59
- return void 0;
60
- };
61
- var storedWaitDeadline = (result, requestedDeadline) => {
62
- const stored = result.waitEndsAt ? Date.parse(result.waitEndsAt) : Number.NaN;
63
- return Number.isFinite(stored) ? Math.min(stored, requestedDeadline) : requestedDeadline;
64
- };
65
- var questionContext = (question, index, total, project) => {
66
- const subject = agentQuestionContext(question.header, project);
67
- const line = total > 1 ? `${subject} (${index + 1} of ${total})` : subject;
68
- return line.slice(0, ASK_CONTEXT_MAX);
69
- };
70
- var legacyAnswerMap = (question, value) => JSON.stringify({ [question.question]: question.multiSelect ? JSON.stringify([value]) : value });
71
- var answerInTheEarlierForm = (question, value) => isTypedAnswerQuestion(question) ? null : parseAgentQuestionAnswers([question], legacyAnswerMap(question, value));
72
- var answersOnOneCard = (question, value, typedAnswer = false) => answersToQuestionsAsAsked([question], value, typedAnswer) ?? answerInTheEarlierForm(question, value);
73
- var answersToTheCard = (question, value, typedAnswer = false) => richCardOf(question) ? answersToQuestionsAsAsked([question], value, typedAnswer) : answersOnOneCard(question, value, typedAnswer);
74
- var oneCardAsk = (call, only, position = ONLY_QUESTION) => ({
75
- question: only.question,
76
- ...cardOf(only),
77
- context: questionContext(only, position.index, position.total, call.projectName),
78
- agentName: call.agentName,
79
- sessionId: call.sessionId,
80
- machineId: getMachineId(),
81
- toolName: call.toolName,
82
- toolUseId: positionedToolUseId(call.toolUseId, position)
83
- });
84
- var outcomeOfOneCardAnswer = (only, answer) => {
85
- const values = answer.answered && answer.value ? answersToTheCard(only, answer.value, answer.typedAnswer) : null;
86
- if (!values || !answer.typedAnswer && isDeferAnswer(answer.value)) {
87
- return UNANSWERED;
88
- }
89
- return answeredWith(values);
90
- };
91
- var askAsOneCard = async (apiKey, call, only) => {
92
- let result;
93
- try {
94
- result = await askUser(apiKey, { ...oneCardAsk(call, only), waitEndsAt: new Date(call.deadline).toISOString() });
95
- } catch (error) {
96
- return failedAskOutcome(error, call.sessionId);
97
- }
98
- if (isDecisionStopped(result)) return STOPPED;
99
- call.onQuestionCreated?.(result.correlationId);
100
- const answer = await waitForQuestion(apiKey, result, storedWaitDeadline(result, call.deadline), void 0, call.signal);
101
- if (isDecisionStopped(answer)) return STOPPED;
102
- return outcomeOfOneCardAnswer(only, answer);
103
- };
104
- var askAgentQuestionWhileOpen = async (apiKey, call, only, askerStillWaits, position = ONLY_QUESTION) => {
105
- let result;
106
- try {
107
- result = await askUser(apiKey, oneCardAsk(call, only, position));
108
- } catch (error) {
109
- return failedAskOutcome(error, call.sessionId);
110
- }
111
- if (isThePersonsStop(result)) return STOPPED;
112
- call.onQuestionCreated?.(result.correlationId);
113
- const answer = await waitForOpenQuestion(apiKey, result, askerStillWaits);
114
- if (isThePersonsStop(answer)) return STOPPED;
115
- return outcomeOfOneCardAnswer(only, answer);
116
- };
117
- var askQuestionByQuestion = async (apiKey, call, questions) => {
118
- const answers = {};
119
- for (const [index, question] of questions.entries()) {
120
- if (call.signal?.aborted) return UNANSWERED;
121
- let result;
122
- try {
123
- result = await askUser(apiKey, {
124
- question: question.question,
125
- ...cardOf(question),
126
- context: questionContext(question, index, questions.length, call.projectName),
127
- agentName: call.agentName,
128
- sessionId: call.sessionId,
129
- machineId: getMachineId(),
130
- toolName: call.toolName,
131
- toolUseId: positionedToolUseId(call.toolUseId, { index, total: questions.length }),
132
- waitEndsAt: new Date(call.deadline).toISOString()
133
- });
134
- } catch (error) {
135
- return failedAskOutcome(error, call.sessionId);
136
- }
137
- if (isDecisionStopped(result)) return STOPPED;
138
- call.onQuestionCreated?.(result.correlationId);
139
- const answer = await waitForQuestion(apiKey, result, storedWaitDeadline(result, call.deadline), void 0, call.signal);
140
- if (isDecisionStopped(answer)) return STOPPED;
141
- const legacyValue = answer.answered ? answer.value?.trim() : void 0;
142
- const values = legacyValue ? answersOnOneCard(question, legacyValue, answer.typedAnswer) : null;
143
- const value = values?.[question.question];
144
- if (!value || !answer.typedAnswer && isDeferAnswer(answer.value)) {
145
- return UNANSWERED;
146
- }
147
- answers[question.question] = value;
148
- }
149
- return answeredWith(answers);
150
- };
151
- var askAgentQuestions = (apiKey, call, questions) => {
152
- const [only, ...rest] = questions;
153
- if (!only) return Promise.resolve(UNANSWERED);
154
- return rest.length === 0 ? askAsOneCard(apiKey, call, only) : askQuestionByQuestion(apiKey, call, questions);
155
- };
156
-
157
- export {
158
- outcomeOfFailedAsk,
159
- storedWaitDeadline,
160
- askAgentQuestionWhileOpen,
161
- askAgentQuestions
162
- };
@@ -1,39 +0,0 @@
1
- import {
2
- DEFAULT_SESSION
3
- } from "./chunk-M2PWMMXD.js";
4
-
5
- // src/answer.ts
6
- var isDeferAnswer = (value) => value === "defer";
7
-
8
- // src/session-notice.ts
9
- import { existsSync, writeFileSync } from "fs";
10
- import { tmpdir } from "os";
11
- import { join } from "path";
12
- var SUBSCRIPTION_REQUIRED_NOTICE_KIND = "subscription-required";
13
- var oncePerSession = (kind, sessionId) => {
14
- try {
15
- const key = (sessionId || DEFAULT_SESSION).replace(/[^a-zA-Z0-9_-]/g, "");
16
- const marker = join(tmpdir(), `pushary-${kind}-${key}`);
17
- if (existsSync(marker)) return false;
18
- writeFileSync(marker, "1", "utf-8");
19
- return true;
20
- } catch {
21
- return false;
22
- }
23
- };
24
- var subscriptionRequiredNotice = (upgradeUrl) => `[pushary] Your Pushary workspace has no active subscription, so approvals stay with your agent. Subscribe: ${upgradeUrl}`;
25
- var announceSubscriptionRequired = (upgradeUrl, sessionId) => {
26
- try {
27
- if (!oncePerSession(SUBSCRIPTION_REQUIRED_NOTICE_KIND, sessionId)) return;
28
- process.stderr.write(`${subscriptionRequiredNotice(upgradeUrl)}
29
- `);
30
- } catch {
31
- return;
32
- }
33
- };
34
-
35
- export {
36
- isDeferAnswer,
37
- oncePerSession,
38
- announceSubscriptionRequired
39
- };
@@ -1,75 +0,0 @@
1
- import {
2
- ensureCodexTrustAfterReapply,
3
- inspectConfiguredManagedProviders,
4
- reapplyAllAgents,
5
- reapplyClaudeForVersion,
6
- reapplyClaudeSettings,
7
- reapplyClineSettings,
8
- reapplyCodexSettings,
9
- reapplyCompatibleHooks,
10
- reapplyCursorPlugin,
11
- reapplyGeminiSettings,
12
- reapplyOpenCodePlugin,
13
- reapplyVsCodePlugin,
14
- repairCodexHolds
15
- } from "./chunk-37HOIRPC.js";
16
- import "./chunk-BXFI56J5.js";
17
- import "./chunk-TWWOQKXK.js";
18
- import "./chunk-VM6WBORP.js";
19
- import "./chunk-5AY2STJB.js";
20
- import "./chunk-BV74A4Q3.js";
21
- import "./chunk-GILLSUOE.js";
22
- import "./chunk-SWUBCXOZ.js";
23
- import "./chunk-W7EUKTEI.js";
24
- import "./chunk-NQQDBWMM.js";
25
- import "./chunk-XELCQFDJ.js";
26
- import "./chunk-JSTAZSTC.js";
27
- import "./chunk-ERVRBZNI.js";
28
- import "./chunk-TCE3J44Z.js";
29
- import "./chunk-E2WCYHXF.js";
30
- import "./chunk-52MSHZYI.js";
31
- import "./chunk-SW33W47V.js";
32
- import "./chunk-M2PWMMXD.js";
33
- import "./chunk-V3PYEJRY.js";
34
- import "./chunk-IYGEE7XO.js";
35
- import "./chunk-GTHM6XOG.js";
36
- import "./chunk-BZIBNSQE.js";
37
- import "./chunk-P6DUWKAO.js";
38
- import "./chunk-5SGCCWNR.js";
39
- import "./chunk-3PSNUHC5.js";
40
- import "./chunk-Q2NOGE3Y.js";
41
- import "./chunk-TFCNGH7V.js";
42
- import "./chunk-POFBE6ZY.js";
43
- import "./chunk-HFDMGCBY.js";
44
- import "./chunk-TC6DWKY5.js";
45
- import "./chunk-7V4ZAQNO.js";
46
- import "./chunk-JJB34JRR.js";
47
- import "./chunk-73TR7RU4.js";
48
- import "./chunk-FGYQI6YP.js";
49
- import "./chunk-YOM5NVDW.js";
50
- import "./chunk-SOMSKUI6.js";
51
- import "./chunk-GTNSTDUB.js";
52
- import "./chunk-E4AOJK33.js";
53
- import "./chunk-7Y4AMZG3.js";
54
- import "./chunk-CINBAX5G.js";
55
- import "./chunk-PM2NRK6Y.js";
56
- import "./chunk-VIKKRYII.js";
57
- import "./chunk-BG4HHB7E.js";
58
- import "./chunk-CXQWDQCJ.js";
59
- import "./chunk-JF3IB3QX.js";
60
- import "./chunk-MLKGABMK.js";
61
- export {
62
- ensureCodexTrustAfterReapply,
63
- inspectConfiguredManagedProviders,
64
- reapplyAllAgents,
65
- reapplyClaudeForVersion,
66
- reapplyClaudeSettings,
67
- reapplyClineSettings,
68
- reapplyCodexSettings,
69
- reapplyCompatibleHooks,
70
- reapplyCursorPlugin,
71
- reapplyGeminiSettings,
72
- reapplyOpenCodePlugin,
73
- reapplyVsCodePlugin,
74
- repairCodexHolds
75
- };