pybao-cli 1.3.4 → 1.3.5
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/README.zh-CN.md +35 -35
- package/cli-acp.js +3 -3
- package/cli.js +4 -4
- package/dist/REPL-4YZC3LJO.js +42 -0
- package/dist/{acp-ZK4PEHBS.js → acp-SE4B3WSL.js} +43 -43
- package/dist/acp-SE4B3WSL.js.map +7 -0
- package/dist/{agentsValidate-CNLZLCPF.js → agentsValidate-LZISHE5F.js} +15 -15
- package/dist/agentsValidate-LZISHE5F.js.map +7 -0
- package/dist/{ask-NQBBFHNS.js → ask-5IDOHI4E.js} +26 -26
- package/dist/ask-5IDOHI4E.js.map +7 -0
- package/dist/{autoUpdater-7SQ4X6WM.js → autoUpdater-ECGS62JN.js} +3 -3
- package/dist/{chunk-DS3EM3LE.js → chunk-3X2KNIS3.js} +5 -5
- package/dist/chunk-3X2KNIS3.js.map +7 -0
- package/dist/{chunk-FPLHZKHG.js → chunk-4U4MLA4R.js} +18 -18
- package/dist/chunk-4U4MLA4R.js.map +7 -0
- package/dist/{chunk-PCXUZ6AT.js → chunk-5AGDLQAW.js} +3 -3
- package/dist/chunk-5AGDLQAW.js.map +7 -0
- package/dist/{chunk-27GYWUY2.js → chunk-5JHD6MUL.js} +3 -3
- package/dist/chunk-5JHD6MUL.js.map +7 -0
- package/dist/{chunk-ONRCOGHT.js → chunk-5JTKXNG4.js} +6 -6
- package/dist/chunk-5JTKXNG4.js.map +7 -0
- package/dist/{chunk-UWYVKM6V.js → chunk-5UJ7KHM7.js} +34 -33
- package/dist/chunk-5UJ7KHM7.js.map +7 -0
- package/dist/{chunk-LQH5OITU.js → chunk-6BSVSUGW.js} +3 -3
- package/dist/{chunk-UEANWPJI.js → chunk-AT7FEIUK.js} +7 -7
- package/dist/chunk-AT7FEIUK.js.map +7 -0
- package/dist/{chunk-T6GVXTNQ.js → chunk-B6IMQJZM.js} +7 -7
- package/dist/chunk-B6IMQJZM.js.map +7 -0
- package/dist/{chunk-H5WLCP2Q.js → chunk-BO63S4OP.js} +9 -9
- package/dist/chunk-BO63S4OP.js.map +7 -0
- package/dist/{chunk-EMMXJ26S.js → chunk-C66U55GA.js} +11 -11
- package/dist/chunk-C66U55GA.js.map +7 -0
- package/dist/{chunk-66YCDEA2.js → chunk-CTKC574I.js} +11 -11
- package/dist/chunk-CTKC574I.js.map +7 -0
- package/dist/{chunk-YPIUGZMS.js → chunk-E2R24MD6.js} +139 -129
- package/dist/chunk-E2R24MD6.js.map +7 -0
- package/dist/{chunk-EREH4M6C.js → chunk-EGHIB45T.js} +5 -5
- package/dist/chunk-EGHIB45T.js.map +7 -0
- package/dist/{chunk-VVZQUQB5.js → chunk-G2W2B3A3.js} +25 -25
- package/dist/chunk-G2W2B3A3.js.map +7 -0
- package/dist/{chunk-2QWJPY3A.js → chunk-HBWCMS4E.js} +7 -7
- package/dist/chunk-HBWCMS4E.js.map +7 -0
- package/dist/{chunk-7X3QUKZJ.js → chunk-KVP2VINI.js} +4 -4
- package/dist/chunk-KVP2VINI.js.map +7 -0
- package/dist/{chunk-JL3N5JHZ.js → chunk-MLU76W2R.js} +3 -3
- package/dist/{chunk-G2IOASOV.js → chunk-MRHGVQ5T.js} +1 -1
- package/dist/{chunk-G2IOASOV.js.map → chunk-MRHGVQ5T.js.map} +1 -1
- package/dist/{chunk-VRGR4ZTQ.js → chunk-MWPFU2KU.js} +2 -2
- package/dist/chunk-MWPFU2KU.js.map +7 -0
- package/dist/{chunk-Z7YDRXPH.js → chunk-NAXCFXKW.js} +7 -7
- package/dist/chunk-NAXCFXKW.js.map +7 -0
- package/dist/{chunk-HIP7XQSM.js → chunk-NRKOXQT5.js} +11 -11
- package/dist/chunk-NRKOXQT5.js.map +7 -0
- package/dist/{chunk-QLP2QCPC.js → chunk-OTNHBUGC.js} +5 -5
- package/dist/chunk-OTNHBUGC.js.map +7 -0
- package/dist/{chunk-T7WZHV42.js → chunk-PGLKCZAE.js} +2 -2
- package/dist/{chunk-6UHQEJU5.js → chunk-PMKSJ3AZ.js} +3 -3
- package/dist/chunk-PMKSJ3AZ.js.map +7 -0
- package/dist/{chunk-QM5NC7TO.js → chunk-R6WNNB47.js} +6 -6
- package/dist/{chunk-QM5NC7TO.js.map → chunk-R6WNNB47.js.map} +2 -2
- package/dist/{chunk-CY54GWA4.js → chunk-V3AKMLFM.js} +14 -14
- package/dist/chunk-V3AKMLFM.js.map +7 -0
- package/dist/{chunk-TCCONYNZ.js → chunk-VF3J4G4Z.js} +27 -27
- package/dist/chunk-VF3J4G4Z.js.map +7 -0
- package/dist/{chunk-EAXM67TE.js → chunk-VKMVP2QQ.js} +12 -12
- package/dist/chunk-VKMVP2QQ.js.map +7 -0
- package/dist/chunk-XI4LTVYT.js.map +7 -0
- package/dist/{chunk-S74HKDFU.js → chunk-YDXW3IJK.js} +4 -4
- package/dist/{chunk-S74HKDFU.js.map → chunk-YDXW3IJK.js.map} +1 -1
- package/dist/{chunk-TM6EL75Y.js → chunk-ZZQ6WGYG.js} +4 -4
- package/dist/{cli-ZJ7IBHJY.js → cli-MBYLENJH.js} +119 -119
- package/dist/cli-MBYLENJH.js.map +7 -0
- package/dist/commands-ECIN5O3E.js +46 -0
- package/dist/{config-EUUK7YTG.js → config-45ETSXTS.js} +4 -4
- package/dist/{context-MQKNXW2P.js → context-34YXWOMP.js} +5 -5
- package/dist/{customCommands-G6OTNNST.js → customCommands-J52KDUBX.js} +4 -4
- package/dist/{env-3A7JSF3L.js → env-ODQXSPMW.js} +8 -8
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/{llm-TFMCL3FJ.js → llm-BBYIGM3X.js} +34 -34
- package/dist/llm-BBYIGM3X.js.map +7 -0
- package/dist/{llmLazy-JF4W3ECN.js → llmLazy-VHWTJ7FY.js} +1 -1
- package/dist/{loader-E3DJWZ43.js → loader-TXZ3EJZO.js} +4 -4
- package/dist/{mcp-CLIGTX2Y.js → mcp-SHR6KH2Y.js} +7 -7
- package/dist/{mentionProcessor-D44ZKAHF.js → mentionProcessor-CDELTWDV.js} +5 -5
- package/dist/{messages-IFBBCPBX.js → messages-R4ICGYOI.js} +1 -1
- package/dist/{model-KHNUZMSI.js → model-AO4OE46E.js} +5 -5
- package/dist/{openai-4XFA4KMK.js → openai-F7WL45GM.js} +5 -5
- package/dist/{outputStyles-NUAH4FME.js → outputStyles-BWAE3CTZ.js} +4 -4
- package/dist/{pluginRuntime-KYFB3F2O.js → pluginRuntime-AHKVCUSE.js} +8 -8
- package/dist/pluginRuntime-AHKVCUSE.js.map +7 -0
- package/dist/{pluginValidation-TCIL3PVT.js → pluginValidation-YSUVH4GM.js} +6 -6
- package/dist/prompts-4AUAETB4.js +48 -0
- package/dist/pybAgentSessionId-3HDHCCI5.js +13 -0
- package/dist/pybAgentSessionLoad-5FMAFO4P.js +18 -0
- package/dist/pybAgentSessionResume-GCVJHXVV.js +16 -0
- package/dist/{kodeAgentStreamJson-3T26CHCP.js → pybAgentStreamJson-UG22YE4Z.js} +5 -5
- package/dist/{kodeAgentStreamJsonSession-E2WXNFYU.js → pybAgentStreamJsonSession-BRWXPZ5Z.js} +9 -9
- package/dist/pybAgentStreamJsonSession-BRWXPZ5Z.js.map +7 -0
- package/dist/{kodeAgentStructuredStdio-TNB6U6SP.js → pybAgentStructuredStdio-QDF6UGAJ.js} +3 -3
- package/dist/{kodeHooks-KEIFTKSA.js → pybHooks-WXEUSK2Y.js} +7 -7
- package/dist/query-JNWSOFYQ.js +50 -0
- package/dist/{ripgrep-BQTXXOCY.js → ripgrep-ON745BFW.js} +3 -3
- package/dist/{skillMarketplace-WPLPA36Z.js → skillMarketplace-ZLW4PQFC.js} +3 -3
- package/dist/{state-6OLUFGTV.js → state-E57SH5ZM.js} +2 -2
- package/dist/{theme-FKIHHDYJ.js → theme-XJG6O2YU.js} +5 -5
- package/dist/{toolPermissionSettings-2YSDIYCD.js → toolPermissionSettings-BXLCU7BK.js} +6 -6
- package/dist/tools-UJZBVLIU.js +47 -0
- package/dist/{userInput-5HJRPHLY.js → userInput-IVM4BDPE.js} +34 -34
- package/dist/userInput-IVM4BDPE.js.map +7 -0
- package/package.json +1 -1
- package/scripts/binary-utils.cjs +8 -8
- package/scripts/cli-acp-wrapper.cjs +3 -3
- package/scripts/cli-wrapper.cjs +4 -4
- package/scripts/postinstall.js +7 -7
- package/dist/REPL-DWIFIJDL.js +0 -42
- package/dist/acp-ZK4PEHBS.js.map +0 -7
- package/dist/agentsValidate-CNLZLCPF.js.map +0 -7
- package/dist/ask-NQBBFHNS.js.map +0 -7
- package/dist/chunk-27GYWUY2.js.map +0 -7
- package/dist/chunk-2QWJPY3A.js.map +0 -7
- package/dist/chunk-66YCDEA2.js.map +0 -7
- package/dist/chunk-6UHQEJU5.js.map +0 -7
- package/dist/chunk-7X3QUKZJ.js.map +0 -7
- package/dist/chunk-CY54GWA4.js.map +0 -7
- package/dist/chunk-DS3EM3LE.js.map +0 -7
- package/dist/chunk-EAXM67TE.js.map +0 -7
- package/dist/chunk-EMMXJ26S.js.map +0 -7
- package/dist/chunk-EREH4M6C.js.map +0 -7
- package/dist/chunk-FPLHZKHG.js.map +0 -7
- package/dist/chunk-H5WLCP2Q.js.map +0 -7
- package/dist/chunk-HIP7XQSM.js.map +0 -7
- package/dist/chunk-M624LT6O.js.map +0 -7
- package/dist/chunk-ONRCOGHT.js.map +0 -7
- package/dist/chunk-PCXUZ6AT.js.map +0 -7
- package/dist/chunk-QLP2QCPC.js.map +0 -7
- package/dist/chunk-T6GVXTNQ.js.map +0 -7
- package/dist/chunk-TCCONYNZ.js.map +0 -7
- package/dist/chunk-UEANWPJI.js.map +0 -7
- package/dist/chunk-UWYVKM6V.js.map +0 -7
- package/dist/chunk-VRGR4ZTQ.js.map +0 -7
- package/dist/chunk-VVZQUQB5.js.map +0 -7
- package/dist/chunk-YPIUGZMS.js.map +0 -7
- package/dist/chunk-Z7YDRXPH.js.map +0 -7
- package/dist/cli-ZJ7IBHJY.js.map +0 -7
- package/dist/commands-26Q4GJ7U.js +0 -46
- package/dist/kodeAgentSessionId-PROTVRBR.js +0 -13
- package/dist/kodeAgentSessionLoad-63BYTKTV.js +0 -18
- package/dist/kodeAgentSessionResume-B74VONCU.js +0 -16
- package/dist/kodeAgentStreamJsonSession-E2WXNFYU.js.map +0 -7
- package/dist/llm-TFMCL3FJ.js.map +0 -7
- package/dist/pluginRuntime-KYFB3F2O.js.map +0 -7
- package/dist/prompts-JD7BGHKJ.js +0 -48
- package/dist/query-J5JOOKFI.js +0 -50
- package/dist/tools-S6P5P65H.js +0 -47
- package/dist/userInput-5HJRPHLY.js.map +0 -7
- /package/dist/{REPL-DWIFIJDL.js.map → REPL-4YZC3LJO.js.map} +0 -0
- /package/dist/{autoUpdater-7SQ4X6WM.js.map → autoUpdater-ECGS62JN.js.map} +0 -0
- /package/dist/{chunk-LQH5OITU.js.map → chunk-6BSVSUGW.js.map} +0 -0
- /package/dist/{chunk-JL3N5JHZ.js.map → chunk-MLU76W2R.js.map} +0 -0
- /package/dist/{chunk-T7WZHV42.js.map → chunk-PGLKCZAE.js.map} +0 -0
- /package/dist/{chunk-M624LT6O.js → chunk-XI4LTVYT.js} +0 -0
- /package/dist/{chunk-TM6EL75Y.js.map → chunk-ZZQ6WGYG.js.map} +0 -0
- /package/dist/{commands-26Q4GJ7U.js.map → commands-ECIN5O3E.js.map} +0 -0
- /package/dist/{config-EUUK7YTG.js.map → config-45ETSXTS.js.map} +0 -0
- /package/dist/{context-MQKNXW2P.js.map → context-34YXWOMP.js.map} +0 -0
- /package/dist/{customCommands-G6OTNNST.js.map → customCommands-J52KDUBX.js.map} +0 -0
- /package/dist/{env-3A7JSF3L.js.map → env-ODQXSPMW.js.map} +0 -0
- /package/dist/{kodeAgentSessionId-PROTVRBR.js.map → llmLazy-VHWTJ7FY.js.map} +0 -0
- /package/dist/{kodeAgentSessionLoad-63BYTKTV.js.map → loader-TXZ3EJZO.js.map} +0 -0
- /package/dist/{kodeAgentSessionResume-B74VONCU.js.map → mcp-SHR6KH2Y.js.map} +0 -0
- /package/dist/{mentionProcessor-D44ZKAHF.js.map → mentionProcessor-CDELTWDV.js.map} +0 -0
- /package/dist/{kodeAgentStreamJson-3T26CHCP.js.map → messages-R4ICGYOI.js.map} +0 -0
- /package/dist/{kodeAgentStructuredStdio-TNB6U6SP.js.map → model-AO4OE46E.js.map} +0 -0
- /package/dist/{kodeHooks-KEIFTKSA.js.map → openai-F7WL45GM.js.map} +0 -0
- /package/dist/{llmLazy-JF4W3ECN.js.map → outputStyles-BWAE3CTZ.js.map} +0 -0
- /package/dist/{loader-E3DJWZ43.js.map → pluginValidation-YSUVH4GM.js.map} +0 -0
- /package/dist/{mcp-CLIGTX2Y.js.map → prompts-4AUAETB4.js.map} +0 -0
- /package/dist/{messages-IFBBCPBX.js.map → pybAgentSessionId-3HDHCCI5.js.map} +0 -0
- /package/dist/{model-KHNUZMSI.js.map → pybAgentSessionLoad-5FMAFO4P.js.map} +0 -0
- /package/dist/{openai-4XFA4KMK.js.map → pybAgentSessionResume-GCVJHXVV.js.map} +0 -0
- /package/dist/{outputStyles-NUAH4FME.js.map → pybAgentStreamJson-UG22YE4Z.js.map} +0 -0
- /package/dist/{pluginValidation-TCIL3PVT.js.map → pybAgentStructuredStdio-QDF6UGAJ.js.map} +0 -0
- /package/dist/{prompts-JD7BGHKJ.js.map → pybHooks-WXEUSK2Y.js.map} +0 -0
- /package/dist/{query-J5JOOKFI.js.map → query-JNWSOFYQ.js.map} +0 -0
- /package/dist/{ripgrep-BQTXXOCY.js.map → ripgrep-ON745BFW.js.map} +0 -0
- /package/dist/{skillMarketplace-WPLPA36Z.js.map → skillMarketplace-ZLW4PQFC.js.map} +0 -0
- /package/dist/{state-6OLUFGTV.js.map → state-E57SH5ZM.js.map} +0 -0
- /package/dist/{theme-FKIHHDYJ.js.map → theme-XJG6O2YU.js.map} +0 -0
- /package/dist/{toolPermissionSettings-2YSDIYCD.js.map → toolPermissionSettings-BXLCU7BK.js.map} +0 -0
- /package/dist/{tools-S6P5P65H.js.map → tools-UJZBVLIU.js.map} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createRequire as __pybCreateRequire } from "node:module";
|
|
2
2
|
const require = __pybCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
} from "./chunk-
|
|
4
|
+
listPybAgentSessions
|
|
5
|
+
} from "./chunk-HBWCMS4E.js";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULT_TIMEOUT_MS,
|
|
8
8
|
FallbackToolUseRejectedMessage,
|
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
listMCPServers,
|
|
17
17
|
loadMergedSettings,
|
|
18
18
|
normalizeSandboxRuntimeConfigFromSettings
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-AT7FEIUK.js";
|
|
20
20
|
import {
|
|
21
21
|
formatValidationResult,
|
|
22
22
|
validatePluginOrMarketplacePath
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-R6WNNB47.js";
|
|
24
24
|
import {
|
|
25
25
|
addMarketplace,
|
|
26
26
|
disableSkillPlugin,
|
|
@@ -33,15 +33,15 @@ import {
|
|
|
33
33
|
refreshMarketplaceAsync,
|
|
34
34
|
removeMarketplace,
|
|
35
35
|
uninstallSkillPlugin
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-V3AKMLFM.js";
|
|
37
37
|
import {
|
|
38
|
-
|
|
39
|
-
} from "./chunk-
|
|
38
|
+
loadPybAgentSessionMessages
|
|
39
|
+
} from "./chunk-BO63S4OP.js";
|
|
40
40
|
import {
|
|
41
41
|
appendSessionCustomTitleRecord,
|
|
42
42
|
appendSessionJsonlFromMessage,
|
|
43
43
|
appendSessionTagRecord
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-C66U55GA.js";
|
|
45
45
|
import {
|
|
46
46
|
getRequestStatus,
|
|
47
47
|
setRequestStatus,
|
|
@@ -58,11 +58,11 @@ import {
|
|
|
58
58
|
runStopHooks,
|
|
59
59
|
runUserPromptSubmitHooks,
|
|
60
60
|
updateHookTranscriptForMessages
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-5UJ7KHM7.js";
|
|
62
62
|
import {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
} from "./chunk-
|
|
63
|
+
getPybAgentSessionId,
|
|
64
|
+
setPybAgentSessionId
|
|
65
|
+
} from "./chunk-B6IMQJZM.js";
|
|
66
66
|
import {
|
|
67
67
|
DEFAULT_OUTPUT_STYLE,
|
|
68
68
|
getAvailableOutputStyles,
|
|
@@ -71,34 +71,34 @@ import {
|
|
|
71
71
|
getOutputStyleSystemPromptAdditions,
|
|
72
72
|
resolveOutputStyleName,
|
|
73
73
|
setCurrentOutputStyle
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-VKMVP2QQ.js";
|
|
75
75
|
import {
|
|
76
76
|
fetchCustomModels,
|
|
77
77
|
getModelFeatures
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-PGLKCZAE.js";
|
|
79
79
|
import {
|
|
80
80
|
queryLLM,
|
|
81
81
|
queryQuick,
|
|
82
82
|
verifyApiKey
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-ZZQ6WGYG.js";
|
|
84
84
|
import {
|
|
85
85
|
listAllContentFiles,
|
|
86
86
|
ripGrep
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-EGHIB45T.js";
|
|
88
88
|
import {
|
|
89
89
|
getCustomCommandDirectories,
|
|
90
90
|
hasCustomCommands,
|
|
91
91
|
loadCustomCommands,
|
|
92
92
|
reloadCustomCommands
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-VF3J4G4Z.js";
|
|
94
94
|
import {
|
|
95
95
|
loadToolPermissionContextFromDisk,
|
|
96
96
|
persistToolPermissionUpdateToDisk
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-3X2KNIS3.js";
|
|
98
98
|
import {
|
|
99
99
|
getSettingsFileCandidates,
|
|
100
100
|
loadSettingsWithLegacyFallback
|
|
101
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-NAXCFXKW.js";
|
|
102
102
|
import {
|
|
103
103
|
applyToolPermissionContextUpdate,
|
|
104
104
|
createDefaultToolPermissionContext
|
|
@@ -111,7 +111,7 @@ import {
|
|
|
111
111
|
resetReminderSession,
|
|
112
112
|
setTodos,
|
|
113
113
|
systemReminderService
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-PMKSJ3AZ.js";
|
|
115
115
|
import {
|
|
116
116
|
getSessionState
|
|
117
117
|
} from "./chunk-ERMQRV55.js";
|
|
@@ -120,7 +120,7 @@ import {
|
|
|
120
120
|
getActiveAgents,
|
|
121
121
|
getAgentByType,
|
|
122
122
|
getAllAgents
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-NRKOXQT5.js";
|
|
124
124
|
import {
|
|
125
125
|
getSessionPlugins
|
|
126
126
|
} from "./chunk-BJSWTHRM.js";
|
|
@@ -153,22 +153,22 @@ import {
|
|
|
153
153
|
processUserInput,
|
|
154
154
|
reorderMessages,
|
|
155
155
|
stripSystemMessages
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-MRHGVQ5T.js";
|
|
157
157
|
import {
|
|
158
158
|
ModelManager,
|
|
159
159
|
getModelManager,
|
|
160
160
|
isDefaultSlowAndCapableModel
|
|
161
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-5JTKXNG4.js";
|
|
162
162
|
import {
|
|
163
163
|
getCodeStyle,
|
|
164
164
|
getContext,
|
|
165
165
|
getGitState,
|
|
166
166
|
getIsGit,
|
|
167
167
|
getProjectDocs
|
|
168
|
-
} from "./chunk-
|
|
168
|
+
} from "./chunk-KVP2VINI.js";
|
|
169
169
|
import {
|
|
170
170
|
getTheme
|
|
171
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-OTNHBUGC.js";
|
|
172
172
|
import {
|
|
173
173
|
DEFAULT_GLOBAL_CONFIG,
|
|
174
174
|
enableConfigs,
|
|
@@ -181,7 +181,7 @@ import {
|
|
|
181
181
|
saveGlobalConfig,
|
|
182
182
|
setAllPointersToModel,
|
|
183
183
|
setModelPointer
|
|
184
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-MLU76W2R.js";
|
|
185
185
|
import {
|
|
186
186
|
AbortError
|
|
187
187
|
} from "./chunk-RQVLBMP7.js";
|
|
@@ -190,7 +190,7 @@ import {
|
|
|
190
190
|
getCurrentRequest,
|
|
191
191
|
logUserFriendly,
|
|
192
192
|
markPhase
|
|
193
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-CTKC574I.js";
|
|
194
194
|
import {
|
|
195
195
|
ASCII_LOGO,
|
|
196
196
|
BunShell,
|
|
@@ -209,13 +209,13 @@ import {
|
|
|
209
209
|
exitPlanModeForConversationKey,
|
|
210
210
|
formatDate,
|
|
211
211
|
getCwd,
|
|
212
|
-
getKodeBaseDir,
|
|
213
212
|
getMessagesPath,
|
|
214
213
|
getNextAvailableLogForkNumber,
|
|
215
214
|
getOriginalCwd,
|
|
216
215
|
getPlanConversationKey,
|
|
217
216
|
getPlanFilePath,
|
|
218
217
|
getPlanModeSystemPromptAdditions,
|
|
218
|
+
getPybBaseDir,
|
|
219
219
|
getTaskOutputFilePath,
|
|
220
220
|
hydratePlanSlugFromMessages,
|
|
221
221
|
isMainPlanFilePathForActiveConversation,
|
|
@@ -226,10 +226,10 @@ import {
|
|
|
226
226
|
renderBashNotification,
|
|
227
227
|
setActivePlanConversationKey,
|
|
228
228
|
setCwd
|
|
229
|
-
} from "./chunk-
|
|
229
|
+
} from "./chunk-G2W2B3A3.js";
|
|
230
230
|
import {
|
|
231
231
|
MACRO
|
|
232
|
-
} from "./chunk-
|
|
232
|
+
} from "./chunk-YDXW3IJK.js";
|
|
233
233
|
import {
|
|
234
234
|
formatTotalCost,
|
|
235
235
|
getTotalAPIDuration,
|
|
@@ -262,9 +262,9 @@ function buildBashCommandPrefixDetectionPrompt(command4) {
|
|
|
262
262
|
This policy spec defines how to determine the prefix of a Bash command:`
|
|
263
263
|
],
|
|
264
264
|
userPrompt: `<policy_spec>
|
|
265
|
-
#
|
|
265
|
+
# Pyb Agent Bash command prefix detection
|
|
266
266
|
|
|
267
|
-
This document defines risk levels for actions that the
|
|
267
|
+
This document defines risk levels for actions that the Pyb Agent may take. This classification system is part of a broader safety framework and is used to determine when additional user confirmation or oversight may be needed.
|
|
268
268
|
|
|
269
269
|
## Definitions
|
|
270
270
|
|
|
@@ -417,7 +417,7 @@ var getCommandSubcommandPrefix = memoize(
|
|
|
417
417
|
var getCommandPrefix = memoize(
|
|
418
418
|
async (command4, abortSignal) => {
|
|
419
419
|
const { systemPrompt, userPrompt } = buildBashCommandPrefixDetectionPrompt(command4);
|
|
420
|
-
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-
|
|
420
|
+
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-BBYIGM3X.js");
|
|
421
421
|
const response = await queryQuick2({
|
|
422
422
|
systemPrompt,
|
|
423
423
|
userPrompt,
|
|
@@ -777,10 +777,10 @@ function getSandboxDefaultWriteAllowPaths(homeDir) {
|
|
|
777
777
|
"/dev/tty",
|
|
778
778
|
"/dev/dtracehelper",
|
|
779
779
|
"/dev/autofs_nowait",
|
|
780
|
-
"/tmp/
|
|
781
|
-
"/private/tmp/
|
|
780
|
+
"/tmp/pyb",
|
|
781
|
+
"/private/tmp/pyb",
|
|
782
782
|
join2(homeDir, ".npm", "_logs"),
|
|
783
|
-
join2(homeDir, ".
|
|
783
|
+
join2(homeDir, ".pyb", "debug")
|
|
784
784
|
];
|
|
785
785
|
}
|
|
786
786
|
function matchExcludedCommand(command4, excludedCommands) {
|
|
@@ -1337,7 +1337,7 @@ function parseBoolLike(value) {
|
|
|
1337
1337
|
return null;
|
|
1338
1338
|
}
|
|
1339
1339
|
function getSystemSandboxModeFromEnv() {
|
|
1340
|
-
const raw = process.env.
|
|
1340
|
+
const raw = process.env.PYB_SYSTEM_SANDBOX;
|
|
1341
1341
|
if (!raw) return null;
|
|
1342
1342
|
const bool = parseBoolLike(raw);
|
|
1343
1343
|
if (bool === true) return "auto";
|
|
@@ -1349,7 +1349,7 @@ function getSystemSandboxModeFromEnv() {
|
|
|
1349
1349
|
return null;
|
|
1350
1350
|
}
|
|
1351
1351
|
function getSystemSandboxNetworkModeFromEnv() {
|
|
1352
|
-
const raw = process.env.
|
|
1352
|
+
const raw = process.env.PYB_SYSTEM_SANDBOX_NETWORK;
|
|
1353
1353
|
if (!raw) return null;
|
|
1354
1354
|
const v = raw.trim().toLowerCase();
|
|
1355
1355
|
if (["inherit", "allow", "enabled", "true", "1"].includes(v)) return "inherit";
|
|
@@ -1387,8 +1387,9 @@ var SENSITIVE_DIR_NAMES = /* @__PURE__ */ new Set([
|
|
|
1387
1387
|
".git",
|
|
1388
1388
|
".vscode",
|
|
1389
1389
|
".idea",
|
|
1390
|
+
".cursor",
|
|
1390
1391
|
".claude",
|
|
1391
|
-
".
|
|
1392
|
+
".pyb",
|
|
1392
1393
|
".ssh"
|
|
1393
1394
|
]);
|
|
1394
1395
|
var SENSITIVE_FILE_NAMES = /* @__PURE__ */ new Set([
|
|
@@ -1528,8 +1529,8 @@ function isWriteProtectedPath(inputPath, options) {
|
|
|
1528
1529
|
);
|
|
1529
1530
|
if (normalized.endsWith("/.claude/settings.json")) return true;
|
|
1530
1531
|
if (normalized.endsWith("/.claude/settings.local.json")) return true;
|
|
1531
|
-
if (normalized.endsWith("/.
|
|
1532
|
-
if (normalized.endsWith("/.
|
|
1532
|
+
if (normalized.endsWith("/.pyb/settings.json")) return true;
|
|
1533
|
+
if (normalized.endsWith("/.pyb/settings.local.json")) return true;
|
|
1533
1534
|
if (settingsPaths.has(normalized)) return true;
|
|
1534
1535
|
const projectRoot = options?.projectDir ?? getOriginalCwd();
|
|
1535
1536
|
const projectRootPosix = toPosixPath(resolveLikeCliPath(projectRoot));
|
|
@@ -1537,9 +1538,9 @@ function isWriteProtectedPath(inputPath, options) {
|
|
|
1537
1538
|
POSIX.join(projectRootPosix, ".claude", "commands"),
|
|
1538
1539
|
POSIX.join(projectRootPosix, ".claude", "agents"),
|
|
1539
1540
|
POSIX.join(projectRootPosix, ".claude", "skills"),
|
|
1540
|
-
POSIX.join(projectRootPosix, ".
|
|
1541
|
-
POSIX.join(projectRootPosix, ".
|
|
1542
|
-
POSIX.join(projectRootPosix, ".
|
|
1541
|
+
POSIX.join(projectRootPosix, ".pyb", "commands"),
|
|
1542
|
+
POSIX.join(projectRootPosix, ".pyb", "agents"),
|
|
1543
|
+
POSIX.join(projectRootPosix, ".pyb", "skills")
|
|
1543
1544
|
];
|
|
1544
1545
|
for (const dir of protectedDirs) {
|
|
1545
1546
|
if (isPosixSubpath(dir, toPosixPath(absolutePath))) return true;
|
|
@@ -1622,7 +1623,7 @@ function rootPathForSource(source) {
|
|
|
1622
1623
|
case "session":
|
|
1623
1624
|
return resolveLikeCliPath(getOriginalCwd());
|
|
1624
1625
|
case "userSettings":
|
|
1625
|
-
return resolveLikeCliPath(
|
|
1626
|
+
return resolveLikeCliPath(getPybBaseDir());
|
|
1626
1627
|
case "policySettings":
|
|
1627
1628
|
case "projectSettings":
|
|
1628
1629
|
case "localSettings":
|
|
@@ -1812,7 +1813,7 @@ function suggestFilePermissionUpdates(args) {
|
|
|
1812
1813
|
function getSpecialAllowedReadReason(args) {
|
|
1813
1814
|
const absolute = resolveLikeCliPath(args.inputPath);
|
|
1814
1815
|
const conversationKey = getPlanConversationKey(args.context);
|
|
1815
|
-
const baseDirResolved = resolveLikeCliPath(
|
|
1816
|
+
const baseDirResolved = resolveLikeCliPath(getPybBaseDir());
|
|
1816
1817
|
const bashOutputsDir = resolveLikeCliPath(
|
|
1817
1818
|
path.join(baseDirResolved, "bash-outputs", conversationKey)
|
|
1818
1819
|
);
|
|
@@ -2576,7 +2577,7 @@ function validatePathRestrictedCommand(baseCommand, args, cwd2, toolPermissionCo
|
|
|
2576
2577
|
if (hasCdInCompound && op !== "read") {
|
|
2577
2578
|
return {
|
|
2578
2579
|
behavior: "ask",
|
|
2579
|
-
message: "Commands that change directories and perform write operations require explicit approval to ensure paths are evaluated correctly. For security,
|
|
2580
|
+
message: "Commands that change directories and perform write operations require explicit approval to ensure paths are evaluated correctly. For security, Pyb Agent cannot automatically determine the final working directory when 'cd' is used in compound commands.",
|
|
2580
2581
|
decisionReason: {
|
|
2581
2582
|
type: "other",
|
|
2582
2583
|
reason: "Compound command contains cd with write operation - manual approval required to prevent path resolution bypass"
|
|
@@ -2645,7 +2646,7 @@ function validateOutputRedirections(redirections, cwd2, toolPermissionContext, h
|
|
|
2645
2646
|
if (hasCdInCompound && redirections.length > 0) {
|
|
2646
2647
|
return {
|
|
2647
2648
|
behavior: "ask",
|
|
2648
|
-
message: "Commands that change directories and write via output redirection require explicit approval to ensure paths are evaluated correctly. For security,
|
|
2649
|
+
message: "Commands that change directories and write via output redirection require explicit approval to ensure paths are evaluated correctly. For security, Pyb Agent cannot automatically determine the final working directory when 'cd' is used in compound commands.",
|
|
2649
2650
|
decisionReason: {
|
|
2650
2651
|
type: "other",
|
|
2651
2652
|
reason: "Compound command contains cd with output redirection - manual approval required to prevent path resolution bypass"
|
|
@@ -4456,7 +4457,7 @@ function formatParseError(error) {
|
|
|
4456
4457
|
return error instanceof Error ? error.message : String(error);
|
|
4457
4458
|
}
|
|
4458
4459
|
async function defaultGateQuery(args) {
|
|
4459
|
-
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-
|
|
4460
|
+
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-BBYIGM3X.js");
|
|
4460
4461
|
const messages = [
|
|
4461
4462
|
{
|
|
4462
4463
|
type: "user",
|
|
@@ -4760,7 +4761,7 @@ function RequestStatusIndicator() {
|
|
|
4760
4761
|
}, 250);
|
|
4761
4762
|
return () => clearInterval(timer);
|
|
4762
4763
|
}, []);
|
|
4763
|
-
return /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "row", marginTop: 1 }, /* @__PURE__ */ React2.createElement(Box2, { flexWrap: "nowrap", height: 1, width: 2 }, /* @__PURE__ */ React2.createElement(Text2, { color: theme.
|
|
4764
|
+
return /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "row", marginTop: 1 }, /* @__PURE__ */ React2.createElement(Box2, { flexWrap: "nowrap", height: 1, width: 2 }, /* @__PURE__ */ React2.createElement(Text2, { color: theme.pyb }, frames[frame])), /* @__PURE__ */ React2.createElement(Text2, { color: theme.pyb }, getLabel(status), "\u2026 "), /* @__PURE__ */ React2.createElement(Text2, { color: theme.secondaryText }, "(", elapsedTime, "s \xB7 ", /* @__PURE__ */ React2.createElement(Text2, { bold: true }, "esc"), " to interrupt)"));
|
|
4764
4765
|
}
|
|
4765
4766
|
|
|
4766
4767
|
// src/tools/system/BashTool/BashToolRunInBackgroundOverlay.tsx
|
|
@@ -5118,9 +5119,9 @@ var WebFetchTool = {
|
|
|
5118
5119
|
async description(input) {
|
|
5119
5120
|
const url2 = input?.url;
|
|
5120
5121
|
try {
|
|
5121
|
-
return `
|
|
5122
|
+
return `Pyb Agent wants to fetch content from ${new URL(url2 || "").hostname}`;
|
|
5122
5123
|
} catch {
|
|
5123
|
-
return "
|
|
5124
|
+
return "Pyb Agent wants to fetch content from this URL";
|
|
5124
5125
|
}
|
|
5125
5126
|
},
|
|
5126
5127
|
userFacingName: () => "Fetch",
|
|
@@ -5304,13 +5305,13 @@ function SelectOption({
|
|
|
5304
5305
|
paddingRight: 1
|
|
5305
5306
|
}),
|
|
5306
5307
|
focusIndicator: () => ({
|
|
5307
|
-
color: appTheme.
|
|
5308
|
+
color: appTheme.pyb
|
|
5308
5309
|
}),
|
|
5309
5310
|
label: ({
|
|
5310
5311
|
isFocused: isFocused2,
|
|
5311
5312
|
isSelected: isSelected2
|
|
5312
5313
|
}) => ({
|
|
5313
|
-
color: isSelected2 ? appTheme.success : isFocused2 ? appTheme.
|
|
5314
|
+
color: isSelected2 ? appTheme.success : isFocused2 ? appTheme.pyb : appTheme.text,
|
|
5314
5315
|
bold: isSelected2
|
|
5315
5316
|
}),
|
|
5316
5317
|
selectedIndicator: () => ({
|
|
@@ -9014,7 +9015,7 @@ var MeasuredText = class {
|
|
|
9014
9015
|
// src/utils/terminal/imagePaste.ts
|
|
9015
9016
|
import { execSync } from "child_process";
|
|
9016
9017
|
import { readFileSync as readFileSync5 } from "fs";
|
|
9017
|
-
var SCREENSHOT_PATH = "/tmp/
|
|
9018
|
+
var SCREENSHOT_PATH = "/tmp/pyb_cli_latest_screenshot.png";
|
|
9018
9019
|
var CLIPBOARD_ERROR_MESSAGE = "No image found in clipboard. Use Cmd + Ctrl + Shift + 4 to copy a screenshot to clipboard.";
|
|
9019
9020
|
function getImageFromClipboard() {
|
|
9020
9021
|
if (process.platform !== "darwin") {
|
|
@@ -10342,7 +10343,7 @@ function Help({
|
|
|
10342
10343
|
useInput8((_, key) => {
|
|
10343
10344
|
if (key.return) onClose();
|
|
10344
10345
|
});
|
|
10345
|
-
return /* @__PURE__ */ React26.createElement(Box20, { flexDirection: "column", padding: 1 }, /* @__PURE__ */ React26.createElement(Text23, { bold: true, color: theme.
|
|
10346
|
+
return /* @__PURE__ */ React26.createElement(Box20, { flexDirection: "column", padding: 1 }, /* @__PURE__ */ React26.createElement(Text23, { bold: true, color: theme.pyb }, `${PRODUCT_NAME} v${MACRO.VERSION}`), /* @__PURE__ */ React26.createElement(Box20, { marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React26.createElement(Text23, null, PRODUCT_NAME, " is a beta research preview. Always review", " ", PRODUCT_NAME, "'s responses, especially when running code.", " ", PRODUCT_NAME, " has read access to files in the current directory and can run commands and edit files with your permission.")), count >= 1 && /* @__PURE__ */ React26.createElement(Box20, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React26.createElement(Text23, { bold: true }, "Usage Modes:"), /* @__PURE__ */ React26.createElement(Text23, null, "\u2022 REPL: ", /* @__PURE__ */ React26.createElement(Text23, { bold: true }, PRODUCT_COMMAND), " (interactive session)"), /* @__PURE__ */ React26.createElement(Text23, null, "\u2022 Non-interactive:", " ", /* @__PURE__ */ React26.createElement(Text23, { bold: true }, PRODUCT_COMMAND, ' -p "question"')), /* @__PURE__ */ React26.createElement(Box20, { marginTop: 1 }, /* @__PURE__ */ React26.createElement(Text23, null, "Run ", /* @__PURE__ */ React26.createElement(Text23, { bold: true }, PRODUCT_COMMAND, " -h"), " for all command line options"))), count >= 2 && /* @__PURE__ */ React26.createElement(Box20, { marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React26.createElement(Text23, { bold: true }, "Common Tasks:"), /* @__PURE__ */ React26.createElement(Text23, null, "\u2022 Ask questions about your codebase", " ", /* @__PURE__ */ React26.createElement(Text23, { color: getTheme().secondaryText }, "> How does foo.py work?")), /* @__PURE__ */ React26.createElement(Text23, null, "\u2022 Edit files", " ", /* @__PURE__ */ React26.createElement(Text23, { color: getTheme().secondaryText }, "> Update bar.ts to...")), /* @__PURE__ */ React26.createElement(Text23, null, "\u2022 Fix errors", " ", /* @__PURE__ */ React26.createElement(Text23, { color: getTheme().secondaryText }, "> cargo build")), /* @__PURE__ */ React26.createElement(Text23, null, "\u2022 Run commands", " ", /* @__PURE__ */ React26.createElement(Text23, { color: getTheme().secondaryText }, "> /help")), /* @__PURE__ */ React26.createElement(Text23, null, "\u2022 Run bash commands", " ", /* @__PURE__ */ React26.createElement(Text23, { color: getTheme().secondaryText }, "> !ls"))), count >= 3 && /* @__PURE__ */ React26.createElement(Box20, { marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React26.createElement(Text23, { bold: true }, "Built-in Commands:"), /* @__PURE__ */ React26.createElement(Box20, { flexDirection: "column" }, builtInCommands.map((cmd, i) => /* @__PURE__ */ React26.createElement(Box20, { key: i, marginLeft: 1 }, /* @__PURE__ */ React26.createElement(Text23, { bold: true }, `/${cmd.name}`), /* @__PURE__ */ React26.createElement(Text23, null, " - ", cmd.description)))), customCommands.length > 0 && /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(Box20, { marginTop: 1 }, /* @__PURE__ */ React26.createElement(Text23, { bold: true }, "Custom Commands:")), /* @__PURE__ */ React26.createElement(Box20, { flexDirection: "column" }, customCommands.map((cmd, i) => /* @__PURE__ */ React26.createElement(Box20, { key: i, marginLeft: 1 }, /* @__PURE__ */ React26.createElement(Text23, { bold: true, color: theme.pyb }, `/${cmd.name}`), /* @__PURE__ */ React26.createElement(Text23, null, " - ", cmd.description), cmd.aliases && cmd.aliases.length > 0 && /* @__PURE__ */ React26.createElement(Text23, { color: theme.secondaryText }, " ", "(aliases: ", cmd.aliases.join(", "), ")"), cmd.scope && /* @__PURE__ */ React26.createElement(Text23, { color: theme.secondaryText }, " [", cmd.scope, "]"))))), hasCustomCommands() || customCommands.length > 0 ? /* @__PURE__ */ React26.createElement(Box20, { marginTop: 1 }, /* @__PURE__ */ React26.createElement(Text23, { color: theme.secondaryText }, "Custom commands loaded from:"), /* @__PURE__ */ React26.createElement(Text23, { color: theme.secondaryText }, "\u2022 ", getCustomCommandDirectories().userClaudeCommands, " (`.claude` user scope)"), /* @__PURE__ */ React26.createElement(Text23, { color: theme.secondaryText }, "\u2022 ", getCustomCommandDirectories().projectClaudeCommands, " ", "(`.claude` project scope)"), /* @__PURE__ */ React26.createElement(Text23, { color: theme.secondaryText }, "Skills loaded from:"), /* @__PURE__ */ React26.createElement(Text23, { color: theme.secondaryText }, "\u2022 ", getCustomCommandDirectories().userClaudeSkills, " (`.claude` user scope)"), /* @__PURE__ */ React26.createElement(Text23, { color: theme.secondaryText }, "\u2022 ", getCustomCommandDirectories().projectClaudeSkills, " (`.claude` project scope)"), /* @__PURE__ */ React26.createElement(Text23, { color: theme.secondaryText }, "Use /refresh-commands to reload after changes")) : /* @__PURE__ */ React26.createElement(Box20, { marginTop: 1 }, /* @__PURE__ */ React26.createElement(Text23, { color: theme.secondaryText }, "Create custom commands by adding `.md` files to:"), /* @__PURE__ */ React26.createElement(Text23, { color: theme.secondaryText }, "\u2022 ", getCustomCommandDirectories().userClaudeCommands, " (`.claude` user scope)"), /* @__PURE__ */ React26.createElement(Text23, { color: theme.secondaryText }, "\u2022 ", getCustomCommandDirectories().projectClaudeCommands, " ", "(`.claude` project scope)"), /* @__PURE__ */ React26.createElement(Text23, { color: theme.secondaryText }, "Create skills by adding directories containing `SKILL.md` to:"), /* @__PURE__ */ React26.createElement(Text23, { color: theme.secondaryText }, "\u2022 ", getCustomCommandDirectories().userClaudeSkills, " (`.claude` user scope)"), /* @__PURE__ */ React26.createElement(Text23, { color: theme.secondaryText }, "\u2022 ", getCustomCommandDirectories().projectClaudeSkills, " (`.claude` project scope)"), /* @__PURE__ */ React26.createElement(Text23, { color: theme.secondaryText }, "Use /refresh-commands to reload after creation"))), /* @__PURE__ */ React26.createElement(Box20, { marginTop: 1 }, /* @__PURE__ */ React26.createElement(Text23, { color: theme.secondaryText }, moreHelp)), /* @__PURE__ */ React26.createElement(Box20, { marginTop: 2 }, /* @__PURE__ */ React26.createElement(PressEnterToContinue, null)));
|
|
10346
10347
|
}
|
|
10347
10348
|
|
|
10348
10349
|
// src/commands/help.tsx
|
|
@@ -10446,7 +10447,16 @@ function ProjectOnboarding({
|
|
|
10446
10447
|
marginRight: 1
|
|
10447
10448
|
},
|
|
10448
10449
|
/* @__PURE__ */ React28.createElement(Box21, { flexDirection: "column", gap: 0 }, /* @__PURE__ */ React28.createElement(Box21, { marginBottom: 1 }, /* @__PURE__ */ React28.createElement(Text24, null, "\u{1F195} What's new in v", MACRO.VERSION, ":")), /* @__PURE__ */ React28.createElement(Box21, { flexDirection: "column", marginLeft: 1 }, releaseNotesToShow.map((note, noteIndex) => /* @__PURE__ */ React28.createElement(React28.Fragment, { key: noteIndex }, /* @__PURE__ */ React28.createElement(Text24, { color: getTheme().secondaryText }, "\u2022 ", note)))))
|
|
10449
|
-
), workspaceDir === homedir6() && /* @__PURE__ */ React28.createElement(
|
|
10450
|
+
), workspaceDir === homedir6() && /* @__PURE__ */ React28.createElement(
|
|
10451
|
+
Box21,
|
|
10452
|
+
{
|
|
10453
|
+
borderStyle: "round",
|
|
10454
|
+
borderColor: theme.warning,
|
|
10455
|
+
paddingX: 1,
|
|
10456
|
+
flexDirection: "column"
|
|
10457
|
+
},
|
|
10458
|
+
/* @__PURE__ */ React28.createElement(Text24, { color: theme.warning }, "Note: You have launched ", /* @__PURE__ */ React28.createElement(Text24, { bold: true }, "Pyb-cli"), " in your home directory.")
|
|
10459
|
+
));
|
|
10450
10460
|
}
|
|
10451
10461
|
|
|
10452
10462
|
// src/commands/init.ts
|
|
@@ -10992,7 +11002,7 @@ async function createAndStoreApiKey(accessToken) {
|
|
|
10992
11002
|
}
|
|
10993
11003
|
saveGlobalConfig(config2);
|
|
10994
11004
|
try {
|
|
10995
|
-
const { resetAnthropicClient } = await import("./llm-
|
|
11005
|
+
const { resetAnthropicClient } = await import("./llm-BBYIGM3X.js");
|
|
10996
11006
|
resetAnthropicClient();
|
|
10997
11007
|
} catch {
|
|
10998
11008
|
}
|
|
@@ -11009,7 +11019,7 @@ import { Box as Box22, Text as Text25 } from "ink";
|
|
|
11009
11019
|
import React29 from "react";
|
|
11010
11020
|
function AsciiLogo() {
|
|
11011
11021
|
const theme = getTheme();
|
|
11012
|
-
return /* @__PURE__ */ React29.createElement(Box22, { flexDirection: "column", alignItems: "flex-start" }, /* @__PURE__ */ React29.createElement(Text25, { color: theme.
|
|
11022
|
+
return /* @__PURE__ */ React29.createElement(Box22, { flexDirection: "column", alignItems: "flex-start" }, /* @__PURE__ */ React29.createElement(Text25, { color: theme.pyb }, ASCII_LOGO));
|
|
11013
11023
|
}
|
|
11014
11024
|
|
|
11015
11025
|
// src/ui/components/Spinner.tsx
|
|
@@ -11094,7 +11104,7 @@ function Spinner() {
|
|
|
11094
11104
|
}, 1e3);
|
|
11095
11105
|
return () => clearInterval(timer);
|
|
11096
11106
|
}, []);
|
|
11097
|
-
return /* @__PURE__ */ React30.createElement(Box23, { flexDirection: "row", marginTop: 1 }, /* @__PURE__ */ React30.createElement(Box23, { flexWrap: "nowrap", height: 1, width: 2 }, /* @__PURE__ */ React30.createElement(Text26, { color: getTheme().
|
|
11107
|
+
return /* @__PURE__ */ React30.createElement(Box23, { flexDirection: "row", marginTop: 1 }, /* @__PURE__ */ React30.createElement(Box23, { flexWrap: "nowrap", height: 1, width: 2 }, /* @__PURE__ */ React30.createElement(Text26, { color: getTheme().pyb }, frames[frame])), /* @__PURE__ */ React30.createElement(Text26, { color: getTheme().pyb }, message.current, "\u2026 "), /* @__PURE__ */ React30.createElement(Text26, { color: getTheme().secondaryText }, "(", elapsedTime, "s \xB7 ", /* @__PURE__ */ React30.createElement(Text26, { bold: true }, "esc"), " to interrupt)"), /* @__PURE__ */ React30.createElement(Text26, { color: getTheme().secondaryText }, "\xB7 ", getSessionState("currentError")));
|
|
11098
11108
|
}
|
|
11099
11109
|
function SimpleSpinner() {
|
|
11100
11110
|
const frames = [...CHARACTERS2, ...[...CHARACTERS2].reverse()];
|
|
@@ -11118,8 +11128,8 @@ import { Box as Box24, Text as Text27 } from "ink";
|
|
|
11118
11128
|
import * as React31 from "react";
|
|
11119
11129
|
var MIN_LOGO_WIDTH = 50;
|
|
11120
11130
|
var DEFAULT_UPDATE_COMMANDS = [
|
|
11121
|
-
"bun add -g @shareai-lab/
|
|
11122
|
-
"npm install -g @shareai-lab/
|
|
11131
|
+
"bun add -g @shareai-lab/pyb@latest",
|
|
11132
|
+
"npm install -g @shareai-lab/pyb@latest"
|
|
11123
11133
|
];
|
|
11124
11134
|
function Logo({
|
|
11125
11135
|
mcpClients,
|
|
@@ -11139,7 +11149,7 @@ function Logo({
|
|
|
11139
11149
|
return /* @__PURE__ */ React31.createElement(Box24, { flexDirection: "column" }, /* @__PURE__ */ React31.createElement(
|
|
11140
11150
|
Box24,
|
|
11141
11151
|
{
|
|
11142
|
-
borderColor: theme.
|
|
11152
|
+
borderColor: theme.pyb,
|
|
11143
11153
|
borderStyle: "round",
|
|
11144
11154
|
flexDirection: "column",
|
|
11145
11155
|
gap: 1,
|
|
@@ -11148,7 +11158,7 @@ function Logo({
|
|
|
11148
11158
|
width
|
|
11149
11159
|
},
|
|
11150
11160
|
updateBannerVersion ? /* @__PURE__ */ React31.createElement(Box24, { flexDirection: "column" }, /* @__PURE__ */ React31.createElement(Text27, { color: "yellow" }, "New version available: ", updateBannerVersion, " (current:", " ", MACRO.VERSION, ")"), /* @__PURE__ */ React31.createElement(Text27, null, "Run the following command to update:"), /* @__PURE__ */ React31.createElement(Text27, null, " ", updateBannerCommands?.[1] ?? DEFAULT_UPDATE_COMMANDS[1]), process.platform !== "win32" && /* @__PURE__ */ React31.createElement(Text27, { dimColor: true }, 'Note: you may need to prefix with "sudo" on macOS/Linux.')) : null,
|
|
11151
|
-
/* @__PURE__ */ React31.createElement(Text27, null, /* @__PURE__ */ React31.createElement(Text27, { color: theme.
|
|
11161
|
+
/* @__PURE__ */ React31.createElement(Text27, null, /* @__PURE__ */ React31.createElement(Text27, { color: theme.pyb }, "\u273B"), " Welcome to", " ", /* @__PURE__ */ React31.createElement(Text27, { bold: true }, PRODUCT_NAME), " ", /* @__PURE__ */ React31.createElement(Text27, null, "research preview!")),
|
|
11152
11162
|
/* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement(Box24, { paddingLeft: 2, flexDirection: "column", gap: 1 }, /* @__PURE__ */ React31.createElement(Text27, { color: theme.secondaryText, italic: true }, "/help for help"), /* @__PURE__ */ React31.createElement(Text27, { color: theme.secondaryText }, "cwd: ", getCwd())), hasOverrides && /* @__PURE__ */ React31.createElement(
|
|
11153
11163
|
Box24,
|
|
11154
11164
|
{
|
|
@@ -13071,7 +13081,7 @@ var WindowedOptions = React34.memo(function WindowedOptions2({
|
|
|
13071
13081
|
return /* @__PURE__ */ React34.createElement(Box27, { flexDirection: "column", gap: 0 }, showUp && /* @__PURE__ */ React34.createElement(Text30, { color: theme.secondaryText }, figures3.arrowUp, " More"), options.slice(start, end).map((opt, idx) => {
|
|
13072
13082
|
const absoluteIndex = start + idx;
|
|
13073
13083
|
const isFocused = absoluteIndex === focusedIndex;
|
|
13074
|
-
return /* @__PURE__ */ React34.createElement(Box27, { key: opt.value, flexDirection: "row" }, /* @__PURE__ */ React34.createElement(Text30, { color: isFocused ? theme.
|
|
13084
|
+
return /* @__PURE__ */ React34.createElement(Box27, { key: opt.value, flexDirection: "row" }, /* @__PURE__ */ React34.createElement(Text30, { color: isFocused ? theme.pyb : theme.secondaryText }, isFocused ? figures3.pointer : " "), /* @__PURE__ */ React34.createElement(
|
|
13075
13085
|
Text30,
|
|
13076
13086
|
{
|
|
13077
13087
|
color: isFocused ? theme.text : theme.secondaryText,
|
|
@@ -14962,12 +14972,12 @@ function WelcomeBox() {
|
|
|
14962
14972
|
return /* @__PURE__ */ React35.createElement(
|
|
14963
14973
|
Box28,
|
|
14964
14974
|
{
|
|
14965
|
-
borderColor: theme.
|
|
14975
|
+
borderColor: theme.pyb,
|
|
14966
14976
|
borderStyle: "round",
|
|
14967
14977
|
paddingX: 1,
|
|
14968
14978
|
width: MIN_LOGO_WIDTH
|
|
14969
14979
|
},
|
|
14970
|
-
/* @__PURE__ */ React35.createElement(Text31, null, /* @__PURE__ */ React35.createElement(Text31, { color: theme.
|
|
14980
|
+
/* @__PURE__ */ React35.createElement(Text31, null, /* @__PURE__ */ React35.createElement(Text31, { color: theme.pyb }, "\u273B"), " Welcome to", " ", /* @__PURE__ */ React35.createElement(Text31, { bold: true }, PRODUCT_NAME), " research preview!")
|
|
14971
14981
|
);
|
|
14972
14982
|
}
|
|
14973
14983
|
|
|
@@ -15105,7 +15115,7 @@ function ConsoleOAuthFlow({ onDone }) {
|
|
|
15105
15115
|
);
|
|
15106
15116
|
if (apiKey) {
|
|
15107
15117
|
setOAuthStatus({ state: "success", apiKey });
|
|
15108
|
-
sendNotification({ message: "
|
|
15118
|
+
sendNotification({ message: "Pyb login successful" });
|
|
15109
15119
|
} else {
|
|
15110
15120
|
setOAuthStatus({
|
|
15111
15121
|
state: "error",
|
|
@@ -15139,7 +15149,7 @@ function ConsoleOAuthFlow({ onDone }) {
|
|
|
15139
15149
|
}
|
|
15140
15150
|
)));
|
|
15141
15151
|
case "creating_api_key":
|
|
15142
|
-
return /* @__PURE__ */ React36.createElement(Box29, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ React36.createElement(Box29, null, /* @__PURE__ */ React36.createElement(SimpleSpinner, null), /* @__PURE__ */ React36.createElement(Text32, null, "Creating API key for
|
|
15152
|
+
return /* @__PURE__ */ React36.createElement(Box29, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ React36.createElement(Box29, null, /* @__PURE__ */ React36.createElement(SimpleSpinner, null), /* @__PURE__ */ React36.createElement(Text32, null, "Creating API key for Pyb\u2026")));
|
|
15143
15153
|
case "about_to_retry":
|
|
15144
15154
|
return /* @__PURE__ */ React36.createElement(Box29, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ React36.createElement(Text32, { color: theme.permission }, "Retrying\u2026"));
|
|
15145
15155
|
case "success":
|
|
@@ -15330,7 +15340,7 @@ async function refreshPluginRuntimeFromInstalls() {
|
|
|
15330
15340
|
const existingRoots = getSessionPlugins().map((p) => p.rootDir);
|
|
15331
15341
|
const dirs = Array.from(/* @__PURE__ */ new Set([...existingRoots, ...installedRoots]));
|
|
15332
15342
|
if (dirs.length === 0) return [];
|
|
15333
|
-
const { configureSessionPlugins } = await import("./pluginRuntime-
|
|
15343
|
+
const { configureSessionPlugins } = await import("./pluginRuntime-AHKVCUSE.js");
|
|
15334
15344
|
const { errors } = await configureSessionPlugins({ pluginDirs: dirs });
|
|
15335
15345
|
return errors;
|
|
15336
15346
|
}
|
|
@@ -15514,7 +15524,7 @@ var plugin = {
|
|
|
15514
15524
|
if (!target) {
|
|
15515
15525
|
return [
|
|
15516
15526
|
"Usage: /plugin validate <path>",
|
|
15517
|
-
"
|
|
15527
|
+
" pyb plugin validate <path>"
|
|
15518
15528
|
].join("\n");
|
|
15519
15529
|
}
|
|
15520
15530
|
const result = validatePluginOrMarketplacePath(target);
|
|
@@ -15999,7 +16009,7 @@ async function call(onDone, context) {
|
|
|
15999
16009
|
ModelConfig,
|
|
16000
16010
|
{
|
|
16001
16011
|
onClose: () => {
|
|
16002
|
-
import("./model-
|
|
16012
|
+
import("./model-AO4OE46E.js").then(({ reloadModelManager: reloadModelManager2 }) => {
|
|
16003
16013
|
reloadModelManager2();
|
|
16004
16014
|
triggerModelConfigChange();
|
|
16005
16015
|
onDone();
|
|
@@ -16037,12 +16047,12 @@ function ModelStatusDisplay({ onClose }) {
|
|
|
16037
16047
|
try {
|
|
16038
16048
|
const model = modelManager.getModel(pointer);
|
|
16039
16049
|
if (model && model.name && model.provider) {
|
|
16040
|
-
return /* @__PURE__ */ React43.createElement(Box34, { key: pointer, flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ React43.createElement(Text38, null, "\u{1F3AF}", " ", /* @__PURE__ */ React43.createElement(Text38, { bold: true, color: theme.
|
|
16050
|
+
return /* @__PURE__ */ React43.createElement(Box34, { key: pointer, flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ React43.createElement(Text38, null, "\u{1F3AF}", " ", /* @__PURE__ */ React43.createElement(Text38, { bold: true, color: theme.pyb }, pointer.toUpperCase()), " ", "\u2192 ", model.name), /* @__PURE__ */ React43.createElement(Text38, { color: theme.secondaryText }, " ", "Provider: ", model.provider), /* @__PURE__ */ React43.createElement(Text38, { color: theme.secondaryText }, " ", "Model: ", model.modelName || "unknown"), /* @__PURE__ */ React43.createElement(Text38, { color: theme.secondaryText }, " ", "Context:", " ", model.contextLength ? Math.round(model.contextLength / 1e3) : "unknown", "k tokens"), /* @__PURE__ */ React43.createElement(Text38, { color: theme.secondaryText }, " ", "Active: ", model.isActive ? "\u2705" : "\u274C"));
|
|
16041
16051
|
} else {
|
|
16042
|
-
return /* @__PURE__ */ React43.createElement(Box34, { key: pointer, flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ React43.createElement(Text38, null, "\u{1F3AF}", " ", /* @__PURE__ */ React43.createElement(Text38, { bold: true, color: theme.
|
|
16052
|
+
return /* @__PURE__ */ React43.createElement(Box34, { key: pointer, flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ React43.createElement(Text38, null, "\u{1F3AF}", " ", /* @__PURE__ */ React43.createElement(Text38, { bold: true, color: theme.pyb }, pointer.toUpperCase()), " ", "\u2192 ", /* @__PURE__ */ React43.createElement(Text38, { color: theme.error }, "\u274C Not configured")));
|
|
16043
16053
|
}
|
|
16044
16054
|
} catch (pointerError) {
|
|
16045
|
-
return /* @__PURE__ */ React43.createElement(Box34, { key: pointer, flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ React43.createElement(Text38, null, "\u{1F3AF}", " ", /* @__PURE__ */ React43.createElement(Text38, { bold: true, color: theme.
|
|
16055
|
+
return /* @__PURE__ */ React43.createElement(Box34, { key: pointer, flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ React43.createElement(Text38, null, "\u{1F3AF}", " ", /* @__PURE__ */ React43.createElement(Text38, { bold: true, color: theme.pyb }, pointer.toUpperCase()), " ", "\u2192", " ", /* @__PURE__ */ React43.createElement(Text38, { color: theme.error }, "\u274C Error: ", String(pointerError))));
|
|
16046
16056
|
}
|
|
16047
16057
|
}),
|
|
16048
16058
|
/* @__PURE__ */ React43.createElement(Text38, null, " "),
|
|
@@ -16323,7 +16333,7 @@ var rename = {
|
|
|
16323
16333
|
const customTitle = args.trim();
|
|
16324
16334
|
if (!customTitle) return "Usage: /rename <title>";
|
|
16325
16335
|
appendSessionCustomTitleRecord({
|
|
16326
|
-
sessionId:
|
|
16336
|
+
sessionId: getPybAgentSessionId(),
|
|
16327
16337
|
customTitle
|
|
16328
16338
|
});
|
|
16329
16339
|
return `Session renamed to: ${customTitle}`;
|
|
@@ -16335,12 +16345,12 @@ var rename_default = rename;
|
|
|
16335
16345
|
var statusline_default = {
|
|
16336
16346
|
type: "prompt",
|
|
16337
16347
|
name: "statusline",
|
|
16338
|
-
description: "Set up
|
|
16348
|
+
description: "Set up Pyb's status line UI",
|
|
16339
16349
|
isEnabled: true,
|
|
16340
16350
|
isHidden: false,
|
|
16341
16351
|
progressMessage: "setting up statusLine",
|
|
16342
16352
|
disableNonInteractive: true,
|
|
16343
|
-
allowedTools: ["Task", "Read(~/**)", "Edit(~/.
|
|
16353
|
+
allowedTools: ["Task", "Read(~/**)", "Edit(~/.pyb/settings.json)"],
|
|
16344
16354
|
userFacingName() {
|
|
16345
16355
|
return "statusline";
|
|
16346
16356
|
},
|
|
@@ -16376,7 +16386,7 @@ var tag = {
|
|
|
16376
16386
|
const value = args.trim();
|
|
16377
16387
|
if (!value) return "Usage: /tag <tag>";
|
|
16378
16388
|
appendSessionTagRecord({
|
|
16379
|
-
sessionId:
|
|
16389
|
+
sessionId: getPybAgentSessionId(),
|
|
16380
16390
|
tag: value
|
|
16381
16391
|
});
|
|
16382
16392
|
return `Session tagged as: ${value}`;
|
|
@@ -16494,7 +16504,7 @@ function CostThresholdDialog({ onDone }) {
|
|
|
16494
16504
|
padding: 1,
|
|
16495
16505
|
borderColor: getTheme().secondaryBorder
|
|
16496
16506
|
},
|
|
16497
|
-
/* @__PURE__ */ React48.createElement(Box36, { marginBottom: 1, flexDirection: "column" }, /* @__PURE__ */ React48.createElement(Text41, { bold: true }, "You've spent $5 on AI model API calls this session."), /* @__PURE__ */ React48.createElement(Text41, null, "Learn more about monitoring your AI usage costs:"), /* @__PURE__ */ React48.createElement(Link, { url: "https://github.com/
|
|
16507
|
+
/* @__PURE__ */ React48.createElement(Box36, { marginBottom: 1, flexDirection: "column" }, /* @__PURE__ */ React48.createElement(Text41, { bold: true }, "You've spent $5 on AI model API calls this session."), /* @__PURE__ */ React48.createElement(Text41, null, "Learn more about monitoring your AI usage costs:"), /* @__PURE__ */ React48.createElement(Link, { url: "https://github.com/pyb-xc/pyb-ts/blob/main/README.md" })),
|
|
16498
16508
|
/* @__PURE__ */ React48.createElement(Box36, null, /* @__PURE__ */ React48.createElement(
|
|
16499
16509
|
Select,
|
|
16500
16510
|
{
|
|
@@ -17550,14 +17560,14 @@ function UserBashInputMessage({
|
|
|
17550
17560
|
return /* @__PURE__ */ React61.createElement(Box43, { flexDirection: "column", marginTop: addMargin ? 1 : 0, width: "100%" }, /* @__PURE__ */ React61.createElement(Box43, null, /* @__PURE__ */ React61.createElement(Text49, { color: getTheme().bashBorder }, "!"), /* @__PURE__ */ React61.createElement(Text49, { color: getTheme().secondaryText }, " ", input)));
|
|
17551
17561
|
}
|
|
17552
17562
|
|
|
17553
|
-
// src/ui/components/messages/
|
|
17563
|
+
// src/ui/components/messages/UserPybInputMessage.tsx
|
|
17554
17564
|
import { Box as Box44, Text as Text50 } from "ink";
|
|
17555
17565
|
import * as React62 from "react";
|
|
17556
|
-
function
|
|
17566
|
+
function UserPybInputMessage({
|
|
17557
17567
|
param: { text },
|
|
17558
17568
|
addMargin
|
|
17559
17569
|
}) {
|
|
17560
|
-
const input = extractTag(text, "
|
|
17570
|
+
const input = extractTag(text, "pyb-input");
|
|
17561
17571
|
if (!input) {
|
|
17562
17572
|
return null;
|
|
17563
17573
|
}
|
|
@@ -17601,8 +17611,8 @@ function UserTextMessage({ addMargin, param }) {
|
|
|
17601
17611
|
if (param.text.trim() === NO_CONTENT_MESSAGE) {
|
|
17602
17612
|
return null;
|
|
17603
17613
|
}
|
|
17604
|
-
if (param.text.includes("<
|
|
17605
|
-
return /* @__PURE__ */ React65.createElement(
|
|
17614
|
+
if (param.text.includes("<pyb-input>")) {
|
|
17615
|
+
return /* @__PURE__ */ React65.createElement(UserPybInputMessage, { addMargin, param });
|
|
17606
17616
|
}
|
|
17607
17617
|
if (param.text.includes("<bash-input>")) {
|
|
17608
17618
|
return /* @__PURE__ */ React65.createElement(UserBashInputMessage, { addMargin, param });
|
|
@@ -19716,7 +19726,7 @@ var EnterPlanModeTool = {
|
|
|
19716
19726
|
},
|
|
19717
19727
|
renderToolResultMessage(_output) {
|
|
19718
19728
|
const theme = getTheme();
|
|
19719
|
-
return /* @__PURE__ */ React83.createElement(Box63, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React83.createElement(Box63, { flexDirection: "row" }, /* @__PURE__ */ React83.createElement(Text68, { color: theme.planMode }, BLACK_CIRCLE), /* @__PURE__ */ React83.createElement(Text68, null, " Entered plan mode")), /* @__PURE__ */ React83.createElement(Box63, { paddingLeft: 2 }, /* @__PURE__ */ React83.createElement(Text68, { dimColor: true }, "
|
|
19729
|
+
return /* @__PURE__ */ React83.createElement(Box63, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React83.createElement(Box63, { flexDirection: "row" }, /* @__PURE__ */ React83.createElement(Text68, { color: theme.planMode }, BLACK_CIRCLE), /* @__PURE__ */ React83.createElement(Text68, null, " Entered plan mode")), /* @__PURE__ */ React83.createElement(Box63, { paddingLeft: 2 }, /* @__PURE__ */ React83.createElement(Text68, { dimColor: true }, "Pyb Agent is now exploring and designing an implementation approach.")));
|
|
19720
19730
|
},
|
|
19721
19731
|
renderResultForAssistant(output) {
|
|
19722
19732
|
return `${output.message}
|
|
@@ -19795,7 +19805,7 @@ var ExitPlanModeTool = {
|
|
|
19795
19805
|
const conversationKey = typeof options.conversationKey === "string" && options.conversationKey.trim() ? options.conversationKey.trim() : void 0;
|
|
19796
19806
|
const { content } = readPlanFile(void 0, conversationKey);
|
|
19797
19807
|
const plan = getExitPlanModePlanText(conversationKey);
|
|
19798
|
-
return /* @__PURE__ */ React84.createElement(Box64, { flexDirection: "column", marginTop: 1, width: "100%" }, /* @__PURE__ */ React84.createElement(Box64, { flexDirection: "row" }, /* @__PURE__ */ React84.createElement(Text69, null, "\xA0\xA0\u23BF \xA0"), /* @__PURE__ */ React84.createElement(Box64, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React84.createElement(Text69, { color: theme.error }, "User rejected
|
|
19808
|
+
return /* @__PURE__ */ React84.createElement(Box64, { flexDirection: "column", marginTop: 1, width: "100%" }, /* @__PURE__ */ React84.createElement(Box64, { flexDirection: "row" }, /* @__PURE__ */ React84.createElement(Text69, null, "\xA0\xA0\u23BF \xA0"), /* @__PURE__ */ React84.createElement(Box64, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React84.createElement(Text69, { color: theme.error }, "User rejected Pyb Agent's plan:"), /* @__PURE__ */ React84.createElement(
|
|
19799
19809
|
Box64,
|
|
19800
19810
|
{
|
|
19801
19811
|
borderStyle: "round",
|
|
@@ -19811,7 +19821,7 @@ var ExitPlanModeTool = {
|
|
|
19811
19821
|
const theme = getTheme();
|
|
19812
19822
|
const planPath = typeof output.filePath === "string" ? output.filePath : null;
|
|
19813
19823
|
const plan = output.plan || "No plan found";
|
|
19814
|
-
return /* @__PURE__ */ React84.createElement(Box64, { flexDirection: "column", marginTop: 1, width: "100%" }, /* @__PURE__ */ React84.createElement(Box64, { flexDirection: "row" }, /* @__PURE__ */ React84.createElement(Text69, { color: theme.planMode }, BLACK_CIRCLE), /* @__PURE__ */ React84.createElement(Text69, null, " User approved
|
|
19824
|
+
return /* @__PURE__ */ React84.createElement(Box64, { flexDirection: "column", marginTop: 1, width: "100%" }, /* @__PURE__ */ React84.createElement(Box64, { flexDirection: "row" }, /* @__PURE__ */ React84.createElement(Text69, { color: theme.planMode }, BLACK_CIRCLE), /* @__PURE__ */ React84.createElement(Text69, null, " User approved Pyb Agent's plan")), /* @__PURE__ */ React84.createElement(Box64, { flexDirection: "row" }, /* @__PURE__ */ React84.createElement(Text69, null, "\xA0\xA0\u23BF \xA0"), /* @__PURE__ */ React84.createElement(Box64, { flexDirection: "column" }, planPath ? /* @__PURE__ */ React84.createElement(Text69, { dimColor: true }, "Plan saved to: ", planPath, " \xB7 /plan to edit") : null, /* @__PURE__ */ React84.createElement(Text69, { dimColor: true }, plan))));
|
|
19815
19825
|
},
|
|
19816
19826
|
renderResultForAssistant(output) {
|
|
19817
19827
|
if (output.isAgent) {
|
|
@@ -20030,7 +20040,7 @@ async function launchExternalEditor(initialText) {
|
|
|
20030
20040
|
)
|
|
20031
20041
|
};
|
|
20032
20042
|
}
|
|
20033
|
-
const dir = mkdtempSync(join8(tmpdir(), "
|
|
20043
|
+
const dir = mkdtempSync(join8(tmpdir(), "pyb-edit-"));
|
|
20034
20044
|
const filePath = join8(dir, "message.txt");
|
|
20035
20045
|
writeFileSync4(filePath, initialText, "utf-8");
|
|
20036
20046
|
const wasRaw = Boolean(process.stdin.isTTY && process.stdin.isRaw);
|
|
@@ -20267,7 +20277,7 @@ function ExitPlanModePermissionRequest({
|
|
|
20267
20277
|
paddingBottom: 1
|
|
20268
20278
|
},
|
|
20269
20279
|
/* @__PURE__ */ React86.createElement(PermissionRequestTitle, { title: "No, keep planning", riskScore: null }),
|
|
20270
|
-
/* @__PURE__ */ React86.createElement(Box66, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React86.createElement(Text71, { dimColor: true }, "Type here to tell
|
|
20280
|
+
/* @__PURE__ */ React86.createElement(Box66, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React86.createElement(Text71, { dimColor: true }, "Type here to tell Pyb Agent what to change (Enter submits, Esc cancels)"), rejectError ? /* @__PURE__ */ React86.createElement(Text71, { color: theme.error }, rejectError) : null, /* @__PURE__ */ React86.createElement(
|
|
20271
20281
|
TextInput,
|
|
20272
20282
|
{
|
|
20273
20283
|
value: rejectFeedback,
|
|
@@ -20308,7 +20318,7 @@ function ExitPlanModePermissionRequest({
|
|
|
20308
20318
|
paddingBottom: 1
|
|
20309
20319
|
},
|
|
20310
20320
|
/* @__PURE__ */ React86.createElement(PermissionRequestTitle, { title: "Ready to code?", riskScore: null }),
|
|
20311
|
-
/* @__PURE__ */ React86.createElement(Box66, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React86.createElement(Text71, null, "Here is
|
|
20321
|
+
/* @__PURE__ */ React86.createElement(Box66, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React86.createElement(Text71, null, "Here is Pyb Agent's plan:"), /* @__PURE__ */ React86.createElement(
|
|
20312
20322
|
Box66,
|
|
20313
20323
|
{
|
|
20314
20324
|
borderStyle: "dashed",
|
|
@@ -20432,7 +20442,7 @@ var AskUserQuestionTool = {
|
|
|
20432
20442
|
},
|
|
20433
20443
|
renderToolResultMessage(output, _options) {
|
|
20434
20444
|
const theme = getTheme();
|
|
20435
|
-
return /* @__PURE__ */ React87.createElement(Box67, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React87.createElement(Box67, { flexDirection: "row" }, /* @__PURE__ */ React87.createElement(Text72, { color: theme.text }, BLACK_CIRCLE, "\xA0"), /* @__PURE__ */ React87.createElement(Text72, null, "User answered
|
|
20445
|
+
return /* @__PURE__ */ React87.createElement(Box67, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React87.createElement(Box67, { flexDirection: "row" }, /* @__PURE__ */ React87.createElement(Text72, { color: theme.text }, BLACK_CIRCLE, "\xA0"), /* @__PURE__ */ React87.createElement(Text72, null, "User answered Pyb Agent's questions:")), /* @__PURE__ */ React87.createElement(Box67, { flexDirection: "column", paddingLeft: 2 }, Object.entries(output.answers).map(([question, answer]) => /* @__PURE__ */ React87.createElement(Box67, { key: question }, /* @__PURE__ */ React87.createElement(Text72, { dimColor: true }, "\xB7 ", question, " \u2192 ", answer)))));
|
|
20436
20446
|
},
|
|
20437
20447
|
renderResultForAssistant(output) {
|
|
20438
20448
|
const formatted = Object.entries(output.answers).map(([question, answer]) => `"${question}"="${answer}"`).join(", ");
|
|
@@ -23153,7 +23163,7 @@ function isTruthyEnv(value) {
|
|
|
23153
23163
|
return ["1", "true", "yes", "on"].includes(value.trim().toLowerCase());
|
|
23154
23164
|
}
|
|
23155
23165
|
function isEnabled3() {
|
|
23156
|
-
return isTruthyEnv(process.env.
|
|
23166
|
+
return isTruthyEnv(process.env.PYB_STARTUP_PROFILE);
|
|
23157
23167
|
}
|
|
23158
23168
|
var seen = /* @__PURE__ */ new Set();
|
|
23159
23169
|
function logStartupProfile(event) {
|
|
@@ -23241,9 +23251,9 @@ function useStatusLine() {
|
|
|
23241
23251
|
// src/ui/components/PromptInput.tsx
|
|
23242
23252
|
async function interpretHashCommand(input) {
|
|
23243
23253
|
try {
|
|
23244
|
-
const { queryQuick: queryQuick2 } = await import("./llm-
|
|
23254
|
+
const { queryQuick: queryQuick2 } = await import("./llm-BBYIGM3X.js");
|
|
23245
23255
|
const systemPrompt = [
|
|
23246
|
-
"You're helping the user structure notes that will be added to their
|
|
23256
|
+
"You're helping the user structure notes that will be added to their PYB.md file.",
|
|
23247
23257
|
"Format the user's input into a well-structured note that will be useful for later reference.",
|
|
23248
23258
|
"Add appropriate markdown formatting, headings, bullet points, or other structural elements as needed.",
|
|
23249
23259
|
"The goal is to transform the raw note into something that will be more useful when reviewed later.",
|
|
@@ -23251,7 +23261,7 @@ async function interpretHashCommand(input) {
|
|
|
23251
23261
|
];
|
|
23252
23262
|
const result = await queryQuick2({
|
|
23253
23263
|
systemPrompt,
|
|
23254
|
-
userPrompt: `Transform this note for
|
|
23264
|
+
userPrompt: `Transform this note for PYB.md: ${input}`
|
|
23255
23265
|
});
|
|
23256
23266
|
if (typeof result.message.content === "string") {
|
|
23257
23267
|
return result.message.content;
|
|
@@ -23554,7 +23564,7 @@ function PromptInput({
|
|
|
23554
23564
|
if (messages2.length) {
|
|
23555
23565
|
if (mode === "bash") {
|
|
23556
23566
|
onQuery(messages2, newAbortController).then(async () => {
|
|
23557
|
-
const { getCwd: getCwd2 } = await import("./state-
|
|
23567
|
+
const { getCwd: getCwd2 } = await import("./state-E57SH5ZM.js");
|
|
23558
23568
|
setCurrentPwd(getCwd2());
|
|
23559
23569
|
});
|
|
23560
23570
|
} else {
|
|
@@ -24102,17 +24112,17 @@ function getBinaryFeedbackResultForChoice(m1, m2, choice) {
|
|
|
24102
24112
|
async function logBinaryFeedbackEvent(_m1, _m2, _choice) {
|
|
24103
24113
|
}
|
|
24104
24114
|
|
|
24105
|
-
// src/services/context/
|
|
24106
|
-
var
|
|
24115
|
+
// src/services/context/pybContext.ts
|
|
24116
|
+
var PybContextManager = class _PybContextManager {
|
|
24107
24117
|
static instance;
|
|
24108
24118
|
projectDocsCache = "";
|
|
24109
24119
|
cacheInitialized = false;
|
|
24110
24120
|
initPromise = null;
|
|
24111
24121
|
static getInstance() {
|
|
24112
|
-
if (!
|
|
24113
|
-
|
|
24122
|
+
if (!_PybContextManager.instance) {
|
|
24123
|
+
_PybContextManager.instance = new _PybContextManager();
|
|
24114
24124
|
}
|
|
24115
|
-
return
|
|
24125
|
+
return _PybContextManager.instance;
|
|
24116
24126
|
}
|
|
24117
24127
|
async initialize() {
|
|
24118
24128
|
if (this.initPromise) return this.initPromise;
|
|
@@ -24123,7 +24133,7 @@ var KodeContextManager = class _KodeContextManager {
|
|
|
24123
24133
|
this.cacheInitialized = true;
|
|
24124
24134
|
} catch (error) {
|
|
24125
24135
|
logError(error);
|
|
24126
|
-
debug.warn("
|
|
24136
|
+
debug.warn("PYB_CONTEXT_LOAD_FAILED", {
|
|
24127
24137
|
error: error instanceof Error ? error.message : String(error)
|
|
24128
24138
|
});
|
|
24129
24139
|
this.projectDocsCache = "";
|
|
@@ -24132,11 +24142,11 @@ var KodeContextManager = class _KodeContextManager {
|
|
|
24132
24142
|
})();
|
|
24133
24143
|
return this.initPromise;
|
|
24134
24144
|
}
|
|
24135
|
-
|
|
24145
|
+
getPybContext() {
|
|
24136
24146
|
if (!this.cacheInitialized) {
|
|
24137
24147
|
this.initialize().catch((error) => {
|
|
24138
24148
|
logError(error);
|
|
24139
|
-
debug.warn("
|
|
24149
|
+
debug.warn("PYB_CONTEXT_LOAD_FAILED", {
|
|
24140
24150
|
error: error instanceof Error ? error.message : String(error)
|
|
24141
24151
|
});
|
|
24142
24152
|
});
|
|
@@ -24150,16 +24160,16 @@ var KodeContextManager = class _KodeContextManager {
|
|
|
24150
24160
|
await this.initialize();
|
|
24151
24161
|
}
|
|
24152
24162
|
};
|
|
24153
|
-
var
|
|
24154
|
-
var
|
|
24155
|
-
return
|
|
24163
|
+
var pybContextManager = PybContextManager.getInstance();
|
|
24164
|
+
var generatePybContext = () => {
|
|
24165
|
+
return pybContextManager.getPybContext();
|
|
24156
24166
|
};
|
|
24157
|
-
var
|
|
24158
|
-
await
|
|
24167
|
+
var refreshPybContext = async () => {
|
|
24168
|
+
await pybContextManager.refreshCache();
|
|
24159
24169
|
};
|
|
24160
24170
|
if (process.env.NODE_ENV !== "test") {
|
|
24161
24171
|
setTimeout(() => {
|
|
24162
|
-
|
|
24172
|
+
refreshPybContext().catch(() => {
|
|
24163
24173
|
});
|
|
24164
24174
|
}, 0);
|
|
24165
24175
|
}
|
|
@@ -24189,10 +24199,10 @@ function formatSystemPromptWithContext(systemPrompt, context, agentId, skipConte
|
|
|
24189
24199
|
const hasContext = Object.entries(context).length > 0;
|
|
24190
24200
|
if (hasContext) {
|
|
24191
24201
|
if (!skipContextReminders) {
|
|
24192
|
-
const
|
|
24193
|
-
if (
|
|
24202
|
+
const pybContext = generatePybContext();
|
|
24203
|
+
if (pybContext) {
|
|
24194
24204
|
enhancedPrompt.push("\n---\n# \u9879\u76EE\u4E0A\u4E0B\u6587\n");
|
|
24195
|
-
enhancedPrompt.push(
|
|
24205
|
+
enhancedPrompt.push(pybContext);
|
|
24196
24206
|
enhancedPrompt.push("\n---\n");
|
|
24197
24207
|
}
|
|
24198
24208
|
}
|
|
@@ -25760,7 +25770,7 @@ function REPL({
|
|
|
25760
25770
|
if (!passedAbortController) {
|
|
25761
25771
|
setAbortController(controllerToUse);
|
|
25762
25772
|
}
|
|
25763
|
-
const
|
|
25773
|
+
const isPybRequest = newMessages.length > 0 && newMessages[0].type === "user" && "options" in newMessages[0] && newMessages[0].options?.isPybRequest === true;
|
|
25764
25774
|
setMessages2((oldMessages) => [...oldMessages, ...newMessages]);
|
|
25765
25775
|
markProjectOnboardingComplete();
|
|
25766
25776
|
const lastMessage = newMessages[newMessages.length - 1];
|
|
@@ -25795,7 +25805,7 @@ function REPL({
|
|
|
25795
25805
|
verbose,
|
|
25796
25806
|
safeMode,
|
|
25797
25807
|
maxThinkingTokens,
|
|
25798
|
-
|
|
25808
|
+
isKodingingRequest: KodingKodingRequest || void 0,
|
|
25799
25809
|
toolPermissionContext: getToolPermissionContextForConversationKey({
|
|
25800
25810
|
conversationKey: `${messageLogName}:${forkNumber}`,
|
|
25801
25811
|
isBypassPermissionsModeAvailable: !(safeMode ?? false)
|
|
@@ -25813,7 +25823,7 @@ function REPL({
|
|
|
25813
25823
|
lastAssistantMessage = message;
|
|
25814
25824
|
}
|
|
25815
25825
|
}
|
|
25816
|
-
if (
|
|
25826
|
+
if (isPybRequest && lastAssistantMessage && lastAssistantMessage.type === "assistant") {
|
|
25817
25827
|
try {
|
|
25818
25828
|
const content = typeof lastAssistantMessage.message.content === "string" ? lastAssistantMessage.message.content : lastAssistantMessage.message.content.filter((block) => block.type === "text").map((block) => block.type === "text" ? block.text : "").join("\n");
|
|
25819
25829
|
if (content && content.trim().length > 0) {
|
|
@@ -25821,7 +25831,7 @@ function REPL({
|
|
|
25821
25831
|
}
|
|
25822
25832
|
} catch (error) {
|
|
25823
25833
|
logError(error);
|
|
25824
|
-
debug.error("
|
|
25834
|
+
debug.error("REPL_PYB_SAVE_PROJECT_DOCS_ERROR", { error });
|
|
25825
25835
|
}
|
|
25826
25836
|
}
|
|
25827
25837
|
setIsLoading(false);
|
|
@@ -26179,8 +26189,8 @@ function ResumeConversation({
|
|
|
26179
26189
|
context.unmount?.();
|
|
26180
26190
|
const resumedFromSessionId = selected.sessionId;
|
|
26181
26191
|
const effectiveSessionId = forkSession ? forkSessionId?.trim() || randomUUID4() : resumedFromSessionId;
|
|
26182
|
-
|
|
26183
|
-
const messages =
|
|
26192
|
+
setPybAgentSessionId(effectiveSessionId);
|
|
26193
|
+
const messages = loadPybAgentSessionMessages({
|
|
26184
26194
|
cwd: cwd2,
|
|
26185
26195
|
sessionId: resumedFromSessionId
|
|
26186
26196
|
});
|
|
@@ -26231,7 +26241,7 @@ var resume_default = {
|
|
|
26231
26241
|
async call(onDone, context) {
|
|
26232
26242
|
const { commands = [], tools = [], verbose = false } = context.options || {};
|
|
26233
26243
|
const cwd2 = process.cwd();
|
|
26234
|
-
const sessions =
|
|
26244
|
+
const sessions = listPybAgentSessions({ cwd: cwd2 });
|
|
26235
26245
|
if (sessions.length === 0) {
|
|
26236
26246
|
onDone("No conversation found to resume");
|
|
26237
26247
|
return null;
|
|
@@ -26313,7 +26323,7 @@ import { homedir as homedir7 } from "os";
|
|
|
26313
26323
|
// src/commands/agents/generation.ts
|
|
26314
26324
|
import { randomUUID as randomUUID5 } from "crypto";
|
|
26315
26325
|
async function generateAgentWithClaude(prompt) {
|
|
26316
|
-
const { queryModel } = await import("./llm-
|
|
26326
|
+
const { queryModel } = await import("./llm-BBYIGM3X.js");
|
|
26317
26327
|
const systemPrompt = `You are an expert at creating AI agent configurations. Based on the user's description, generate a specialized agent configuration.
|
|
26318
26328
|
|
|
26319
26329
|
Return your response as a JSON object with exactly these fields:
|
|
@@ -26492,8 +26502,8 @@ ${systemPrompt}
|
|
|
26492
26502
|
}
|
|
26493
26503
|
|
|
26494
26504
|
// src/commands/agents/storage.ts
|
|
26495
|
-
var PRIMARY_FOLDER = ".
|
|
26496
|
-
var LEGACY_FOLDER = ".
|
|
26505
|
+
var PRIMARY_FOLDER = ".pyb";
|
|
26506
|
+
var LEGACY_FOLDER = ".claude";
|
|
26497
26507
|
var AGENTS_DIR = "agents";
|
|
26498
26508
|
function getAgentDirectory(location) {
|
|
26499
26509
|
if (location === "user") {
|
|
@@ -28775,7 +28785,7 @@ var hasPermissionsToUseTool = async (tool, input, context, _assistantMessage) =>
|
|
|
28775
28785
|
shouldPromptUser: false
|
|
28776
28786
|
};
|
|
28777
28787
|
if (permissionMode === "bypassPermissions" && !requiresUserInteraction) {
|
|
28778
|
-
const bypassSafetyFloor = parseBoolLike3(process.env.
|
|
28788
|
+
const bypassSafetyFloor = parseBoolLike3(process.env.PYB_BYPASS_SAFETY_FLOOR) && !safeMode;
|
|
28779
28789
|
if (!bypassSafetyFloor) {
|
|
28780
28790
|
const denyIfUnsafeWrite = (toolPath) => {
|
|
28781
28791
|
const safety = getWriteSafetyCheckForPath(toolPath);
|
|
@@ -29389,7 +29399,7 @@ function WebFetchPermissionRequest({
|
|
|
29389
29399
|
}
|
|
29390
29400
|
] : [],
|
|
29391
29401
|
{
|
|
29392
|
-
label: `No, and tell
|
|
29402
|
+
label: `No, and tell Pyb Agent what to do differently ${chalk16.bold("(esc)")}`,
|
|
29393
29403
|
value: "no"
|
|
29394
29404
|
}
|
|
29395
29405
|
],
|
|
@@ -29513,7 +29523,7 @@ var BashTool = {
|
|
|
29513
29523
|
inputSchema: inputSchema13,
|
|
29514
29524
|
userFacingName(input) {
|
|
29515
29525
|
if (!input) return "Bash";
|
|
29516
|
-
const raw = process.env.KODE_BASH_SANDBOX_SHOW_INDICATOR ?? process.env.CLAUDE_CODE_BASH_SANDBOX_SHOW_INDICATOR;
|
|
29526
|
+
const raw = process.env.PYB_BASH_SANDBOX_SHOW_INDICATOR ?? process.env.KODE_BASH_SANDBOX_SHOW_INDICATOR ?? process.env.CLAUDE_CODE_BASH_SANDBOX_SHOW_INDICATOR;
|
|
29517
29527
|
const showIndicator = raw ? ["1", "true", "yes", "on"].includes(raw.trim().toLowerCase()) : false;
|
|
29518
29528
|
if (!showIndicator) return "Bash";
|
|
29519
29529
|
const plan = getBunShellSandboxPlan({
|
|
@@ -30228,8 +30238,8 @@ export {
|
|
|
30228
30238
|
getAgentPrompt,
|
|
30229
30239
|
getMaxThinkingTokens,
|
|
30230
30240
|
getReasoningEffort,
|
|
30231
|
-
|
|
30232
|
-
|
|
30241
|
+
generatePybContext,
|
|
30242
|
+
refreshPybContext,
|
|
30233
30243
|
formatSystemPromptWithContext,
|
|
30234
30244
|
useExitOnCtrlCD,
|
|
30235
30245
|
clearTerminal,
|