pybao-cli 1.4.17 → 1.4.19
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/dist/REPL-QRF527CC.js +47 -0
- package/dist/{acp-2LOJ6G5I.js → acp-J4PMGCCD.js} +29 -29
- package/dist/{agentsValidate-JHFP6CBL.js → agentsValidate-PC7Z5N2N.js} +7 -7
- package/dist/{ask-7S7OPAEK.js → ask-7JLTEYEJ.js} +28 -28
- package/dist/{autoUpdater-JB2N6XSK.js → autoUpdater-2Z4UDR22.js} +3 -3
- package/dist/{chunk-3H7JCOX7.js → chunk-57AOXC5J.js} +1 -1
- package/dist/{chunk-ULOUEAT2.js → chunk-6LI77GR5.js} +16 -16
- package/dist/{chunk-RJK6AYKB.js → chunk-AX7D3TRL.js} +3 -3
- package/dist/{chunk-7SGVFJWX.js → chunk-BDSXUEMJ.js} +1 -1
- package/dist/{chunk-AHK3NVAX.js → chunk-BY3F7D65.js} +3 -3
- package/dist/{chunk-XVZ7ZX2L.js → chunk-DUPGYYL5.js} +1 -1
- package/dist/{chunk-5KZB52GW.js → chunk-EELKMURO.js} +1 -1
- package/dist/{chunk-PPTMKZPO.js → chunk-EKBV663F.js} +1 -1
- package/dist/{chunk-PPTMKZPO.js.map → chunk-EKBV663F.js.map} +1 -1
- package/dist/{chunk-26DNH5MY.js → chunk-FDOWFD5Y.js} +2 -2
- package/dist/{chunk-5IIJ6XQX.js → chunk-GRNLX3GA.js} +4 -4
- package/dist/{chunk-JUVESM6V.js → chunk-HXRWRZCF.js} +4 -4
- package/dist/{chunk-KEBVFZAX.js → chunk-KDKWNUAD.js} +1 -1
- package/dist/{chunk-AHO6SRRR.js → chunk-KQXHZ6XX.js} +3 -3
- package/dist/{chunk-ZHPKJVUT.js → chunk-LL4UN36W.js} +3 -3
- package/dist/{chunk-KKILDPBV.js → chunk-MGVONCTT.js} +2 -2
- package/dist/{chunk-S4KCBRDZ.js → chunk-MTS7RTUF.js} +35 -35
- package/dist/{chunk-XM7MBTOO.js → chunk-OGMZVVQ3.js} +63 -3
- package/dist/chunk-OGMZVVQ3.js.map +7 -0
- package/dist/{chunk-QSP2L4AM.js → chunk-RKPXK6YP.js} +3 -3
- package/dist/{chunk-ZQ4IZUPH.js → chunk-SUDT5I6F.js} +3 -3
- package/dist/{chunk-26VECGIJ.js → chunk-TKWD34G5.js} +3 -3
- package/dist/{chunk-26VECGIJ.js.map → chunk-TKWD34G5.js.map} +1 -1
- package/dist/{chunk-YJWJ5DGO.js → chunk-UD66WITQ.js} +2 -2
- package/dist/{chunk-EHFY3DA7.js → chunk-UI6SHGSM.js} +1 -1
- package/dist/{chunk-CZRFLOQG.js → chunk-UTK4DWRS.js} +4 -4
- package/dist/{chunk-K45LL6PV.js → chunk-UZ4Z56ZS.js} +2 -2
- package/dist/{chunk-DXIIHIJG.js → chunk-UZLOWDHI.js} +1 -1
- package/dist/{chunk-QKOT6XYY.js → chunk-WTWCL3W2.js} +2 -2
- package/dist/{chunk-CDKFT2GF.js → chunk-XE5USG7G.js} +1 -1
- package/dist/{chunk-NSID4TSV.js → chunk-Y4GYDU7C.js} +3 -3
- package/dist/{chunk-X6LUQUI4.js → chunk-ZIIUNR5I.js} +4 -4
- package/dist/{chunk-CIUNX2UP.js → chunk-ZJ3M5VDZ.js} +1 -1
- package/dist/{cli-HMY2IU2T.js → cli-FVH5R7EI.js} +87 -87
- package/dist/commands-GLSE3AYA.js +51 -0
- package/dist/{config-A7PN2NDW.js → config-ZXQFEZGB.js} +4 -4
- package/dist/{context-SXT7XLXT.js → context-KHK262JT.js} +6 -6
- package/dist/{customCommands-KXTQJO3S.js → customCommands-J7DMX5Q7.js} +4 -4
- package/dist/{env-MACCQLTW.js → env-MSSOW7XA.js} +2 -2
- package/dist/{file-HC4EKI7Z.js → file-OIK35VA7.js} +4 -4
- package/dist/index.js +3 -3
- package/dist/{llm-OTFTXTXY.js → llm-WTC26PPD.js} +29 -29
- package/dist/{llmLazy-PQ5HCZ4E.js → llmLazy-V5S6NFE3.js} +1 -1
- package/dist/{loader-VHBERR5P.js → loader-MH3JU44G.js} +4 -4
- package/dist/{lsp-Y5UUXXVU.js → lsp-M52JKG5O.js} +6 -6
- package/dist/{lspAnchor-FJ2SXT5X.js → lspAnchor-V3SHZVR2.js} +6 -6
- package/dist/{mcp-V3E2FBYM.js → mcp-QD6K44AU.js} +7 -7
- package/dist/{mentionProcessor-FCHEM7NU.js → mentionProcessor-SS6FM7P3.js} +5 -5
- package/dist/{messages-UYHRONQS.js → messages-Q6DXNJTS.js} +1 -1
- package/dist/{model-YPKZ4DQ3.js → model-KBT7MSFR.js} +5 -5
- package/dist/{openai-P2TQWQKC.js → openai-UMT6BWBE.js} +5 -5
- package/dist/{outputStyles-CSGYX64E.js → outputStyles-NX7QJLY2.js} +4 -4
- package/dist/{pluginRuntime-EP4ATLRC.js → pluginRuntime-XYBSQJAU.js} +6 -6
- package/dist/{pluginValidation-3ZURFUHM.js → pluginValidation-RR72EKCC.js} +6 -6
- package/dist/prompts-Y5BIWARO.js +53 -0
- package/dist/{pybAgentSessionLoad-QZIINLCD.js → pybAgentSessionLoad-X5XQL577.js} +4 -4
- package/dist/{pybAgentSessionResume-3XND5AZG.js → pybAgentSessionResume-WJSA6TUW.js} +4 -4
- package/dist/{pybAgentStreamJsonSession-JQPASPNN.js → pybAgentStreamJsonSession-JEOF6NWA.js} +1 -1
- package/dist/{pybHooks-J3KPSFJI.js → pybHooks-7C56USJD.js} +4 -4
- package/dist/query-KZH67VSS.js +55 -0
- package/dist/{registry-HBS4R3GL.js → registry-MNDY2FFY.js} +5 -5
- package/dist/{ripgrep-IDPG6V7P.js → ripgrep-IHWIDDRM.js} +3 -3
- package/dist/{skillMarketplace-VA7VL5D5.js → skillMarketplace-J6SB6KWR.js} +3 -3
- package/dist/{state-GU2VJXIZ.js → state-MWT54BRL.js} +2 -2
- package/dist/{theme-GZQWHNWP.js → theme-GX66OZMI.js} +5 -5
- package/dist/{toolPermissionSettings-XJ6CKWDG.js → toolPermissionSettings-6YI7H7RF.js} +6 -6
- package/dist/tools-LESMC5K2.js +52 -0
- package/dist/{userInput-ABKKAHHH.js → userInput-ZVYD5QBX.js} +30 -30
- package/package.json +1 -1
- package/resources/output-styles/accessibility-champion.md +66 -0
- package/resources/output-styles/api-designer.md +88 -0
- package/resources/output-styles/concise-engineer.md +32 -0
- package/resources/output-styles/critical-code-reviewer.md +36 -0
- package/resources/output-styles/data-engineer.md +104 -0
- package/resources/output-styles/defensive-programmer.md +81 -0
- package/resources/output-styles/devil-advocate.md +43 -0
- package/resources/output-styles/devops-automator.md +118 -0
- package/resources/output-styles/distributed-systems-architect.md +77 -0
- package/resources/output-styles/documentation-writer.md +47 -0
- package/resources/output-styles/evan-king-system-design-reviewer.md +45 -0
- package/resources/output-styles/functional-purist.md +84 -0
- package/resources/output-styles/legacy-system-maintainer.md +47 -0
- package/resources/output-styles/performance-optimizer.md +49 -0
- package/resources/output-styles/refactoring-expert.md +118 -0
- package/resources/output-styles/security-auditor.md +49 -0
- package/resources/output-styles/startup-pragmatist.md +58 -0
- package/resources/output-styles/test-driven-developer.md +48 -0
- package/dist/REPL-2HTMFGA5.js +0 -47
- package/dist/chunk-XM7MBTOO.js.map +0 -7
- package/dist/commands-AAP4MYTL.js +0 -51
- package/dist/prompts-ATUILKIJ.js +0 -53
- package/dist/query-ID3RUBSI.js +0 -55
- package/dist/tools-EVR75R24.js +0 -52
- /package/dist/{REPL-2HTMFGA5.js.map → REPL-QRF527CC.js.map} +0 -0
- /package/dist/{acp-2LOJ6G5I.js.map → acp-J4PMGCCD.js.map} +0 -0
- /package/dist/{agentsValidate-JHFP6CBL.js.map → agentsValidate-PC7Z5N2N.js.map} +0 -0
- /package/dist/{ask-7S7OPAEK.js.map → ask-7JLTEYEJ.js.map} +0 -0
- /package/dist/{autoUpdater-JB2N6XSK.js.map → autoUpdater-2Z4UDR22.js.map} +0 -0
- /package/dist/{chunk-3H7JCOX7.js.map → chunk-57AOXC5J.js.map} +0 -0
- /package/dist/{chunk-ULOUEAT2.js.map → chunk-6LI77GR5.js.map} +0 -0
- /package/dist/{chunk-RJK6AYKB.js.map → chunk-AX7D3TRL.js.map} +0 -0
- /package/dist/{chunk-7SGVFJWX.js.map → chunk-BDSXUEMJ.js.map} +0 -0
- /package/dist/{chunk-AHK3NVAX.js.map → chunk-BY3F7D65.js.map} +0 -0
- /package/dist/{chunk-XVZ7ZX2L.js.map → chunk-DUPGYYL5.js.map} +0 -0
- /package/dist/{chunk-5KZB52GW.js.map → chunk-EELKMURO.js.map} +0 -0
- /package/dist/{chunk-26DNH5MY.js.map → chunk-FDOWFD5Y.js.map} +0 -0
- /package/dist/{chunk-5IIJ6XQX.js.map → chunk-GRNLX3GA.js.map} +0 -0
- /package/dist/{chunk-JUVESM6V.js.map → chunk-HXRWRZCF.js.map} +0 -0
- /package/dist/{chunk-KEBVFZAX.js.map → chunk-KDKWNUAD.js.map} +0 -0
- /package/dist/{chunk-AHO6SRRR.js.map → chunk-KQXHZ6XX.js.map} +0 -0
- /package/dist/{chunk-ZHPKJVUT.js.map → chunk-LL4UN36W.js.map} +0 -0
- /package/dist/{chunk-KKILDPBV.js.map → chunk-MGVONCTT.js.map} +0 -0
- /package/dist/{chunk-S4KCBRDZ.js.map → chunk-MTS7RTUF.js.map} +0 -0
- /package/dist/{chunk-QSP2L4AM.js.map → chunk-RKPXK6YP.js.map} +0 -0
- /package/dist/{chunk-ZQ4IZUPH.js.map → chunk-SUDT5I6F.js.map} +0 -0
- /package/dist/{chunk-YJWJ5DGO.js.map → chunk-UD66WITQ.js.map} +0 -0
- /package/dist/{chunk-EHFY3DA7.js.map → chunk-UI6SHGSM.js.map} +0 -0
- /package/dist/{chunk-CZRFLOQG.js.map → chunk-UTK4DWRS.js.map} +0 -0
- /package/dist/{chunk-K45LL6PV.js.map → chunk-UZ4Z56ZS.js.map} +0 -0
- /package/dist/{chunk-DXIIHIJG.js.map → chunk-UZLOWDHI.js.map} +0 -0
- /package/dist/{chunk-QKOT6XYY.js.map → chunk-WTWCL3W2.js.map} +0 -0
- /package/dist/{chunk-CDKFT2GF.js.map → chunk-XE5USG7G.js.map} +0 -0
- /package/dist/{chunk-NSID4TSV.js.map → chunk-Y4GYDU7C.js.map} +0 -0
- /package/dist/{chunk-X6LUQUI4.js.map → chunk-ZIIUNR5I.js.map} +0 -0
- /package/dist/{chunk-CIUNX2UP.js.map → chunk-ZJ3M5VDZ.js.map} +0 -0
- /package/dist/{cli-HMY2IU2T.js.map → cli-FVH5R7EI.js.map} +0 -0
- /package/dist/{commands-AAP4MYTL.js.map → commands-GLSE3AYA.js.map} +0 -0
- /package/dist/{config-A7PN2NDW.js.map → config-ZXQFEZGB.js.map} +0 -0
- /package/dist/{context-SXT7XLXT.js.map → context-KHK262JT.js.map} +0 -0
- /package/dist/{customCommands-KXTQJO3S.js.map → customCommands-J7DMX5Q7.js.map} +0 -0
- /package/dist/{env-MACCQLTW.js.map → env-MSSOW7XA.js.map} +0 -0
- /package/dist/{file-HC4EKI7Z.js.map → file-OIK35VA7.js.map} +0 -0
- /package/dist/{llm-OTFTXTXY.js.map → llm-WTC26PPD.js.map} +0 -0
- /package/dist/{llmLazy-PQ5HCZ4E.js.map → llmLazy-V5S6NFE3.js.map} +0 -0
- /package/dist/{loader-VHBERR5P.js.map → loader-MH3JU44G.js.map} +0 -0
- /package/dist/{lsp-Y5UUXXVU.js.map → lsp-M52JKG5O.js.map} +0 -0
- /package/dist/{lspAnchor-FJ2SXT5X.js.map → lspAnchor-V3SHZVR2.js.map} +0 -0
- /package/dist/{mcp-V3E2FBYM.js.map → mcp-QD6K44AU.js.map} +0 -0
- /package/dist/{mentionProcessor-FCHEM7NU.js.map → mentionProcessor-SS6FM7P3.js.map} +0 -0
- /package/dist/{messages-UYHRONQS.js.map → messages-Q6DXNJTS.js.map} +0 -0
- /package/dist/{model-YPKZ4DQ3.js.map → model-KBT7MSFR.js.map} +0 -0
- /package/dist/{openai-P2TQWQKC.js.map → openai-UMT6BWBE.js.map} +0 -0
- /package/dist/{outputStyles-CSGYX64E.js.map → outputStyles-NX7QJLY2.js.map} +0 -0
- /package/dist/{pluginRuntime-EP4ATLRC.js.map → pluginRuntime-XYBSQJAU.js.map} +0 -0
- /package/dist/{pluginValidation-3ZURFUHM.js.map → pluginValidation-RR72EKCC.js.map} +0 -0
- /package/dist/{prompts-ATUILKIJ.js.map → prompts-Y5BIWARO.js.map} +0 -0
- /package/dist/{pybAgentSessionLoad-QZIINLCD.js.map → pybAgentSessionLoad-X5XQL577.js.map} +0 -0
- /package/dist/{pybAgentSessionResume-3XND5AZG.js.map → pybAgentSessionResume-WJSA6TUW.js.map} +0 -0
- /package/dist/{pybAgentStreamJsonSession-JQPASPNN.js.map → pybAgentStreamJsonSession-JEOF6NWA.js.map} +0 -0
- /package/dist/{pybHooks-J3KPSFJI.js.map → pybHooks-7C56USJD.js.map} +0 -0
- /package/dist/{query-ID3RUBSI.js.map → query-KZH67VSS.js.map} +0 -0
- /package/dist/{registry-HBS4R3GL.js.map → registry-MNDY2FFY.js.map} +0 -0
- /package/dist/{ripgrep-IDPG6V7P.js.map → ripgrep-IHWIDDRM.js.map} +0 -0
- /package/dist/{skillMarketplace-VA7VL5D5.js.map → skillMarketplace-J6SB6KWR.js.map} +0 -0
- /package/dist/{state-GU2VJXIZ.js.map → state-MWT54BRL.js.map} +0 -0
- /package/dist/{theme-GZQWHNWP.js.map → theme-GX66OZMI.js.map} +0 -0
- /package/dist/{toolPermissionSettings-XJ6CKWDG.js.map → toolPermissionSettings-6YI7H7RF.js.map} +0 -0
- /package/dist/{tools-EVR75R24.js.map → tools-LESMC5K2.js.map} +0 -0
- /package/dist/{userInput-ABKKAHHH.js.map → userInput-ZVYD5QBX.js.map} +0 -0
|
@@ -2,13 +2,13 @@ import { createRequire as __pybCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __pybCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
MarketplaceManifestSchema
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BDSXUEMJ.js";
|
|
6
6
|
import {
|
|
7
7
|
parseFrontmatter
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UD66WITQ.js";
|
|
9
9
|
import {
|
|
10
10
|
getCwd
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-XE5USG7G.js";
|
|
12
12
|
|
|
13
13
|
// src/services/plugins/pluginValidation.ts
|
|
14
14
|
import { existsSync, lstatSync, readFileSync } from "node:fs";
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
} from "./chunk-ERMQRV55.js";
|
|
7
7
|
import {
|
|
8
8
|
debug
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UI6SHGSM.js";
|
|
10
10
|
import {
|
|
11
11
|
logError,
|
|
12
12
|
resolveXdgDataPath
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XE5USG7G.js";
|
|
14
14
|
|
|
15
15
|
// src/utils/agent/storage.ts
|
|
16
16
|
import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
|
|
@@ -3,18 +3,18 @@ const require = __pybCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
formatValidationResult,
|
|
5
5
|
validatePluginOrMarketplacePath
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LL4UN36W.js";
|
|
7
7
|
import {
|
|
8
8
|
loadPybAgentSessionMessages
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-57AOXC5J.js";
|
|
10
10
|
import {
|
|
11
11
|
listPybAgentSessions
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZJ3M5VDZ.js";
|
|
13
13
|
import {
|
|
14
14
|
appendSessionCustomTitleRecord,
|
|
15
15
|
appendSessionJsonlFromMessage,
|
|
16
16
|
appendSessionTagRecord
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-FDOWFD5Y.js";
|
|
18
18
|
import {
|
|
19
19
|
drainHookSystemPromptAdditions,
|
|
20
20
|
getHookTranscriptPath,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
runStopHooks,
|
|
27
27
|
runUserPromptSubmitHooks,
|
|
28
28
|
updateHookTranscriptForMessages
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-KQXHZ6XX.js";
|
|
30
30
|
import {
|
|
31
31
|
DEFAULT_OUTPUT_STYLE,
|
|
32
32
|
getAvailableOutputStyles,
|
|
@@ -35,16 +35,16 @@ import {
|
|
|
35
35
|
getOutputStyleSystemPromptAdditions,
|
|
36
36
|
resolveOutputStyleName,
|
|
37
37
|
setCurrentOutputStyle
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-OGMZVVQ3.js";
|
|
39
39
|
import {
|
|
40
40
|
fetchCustomModels,
|
|
41
41
|
getModelFeatures
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-UZ4Z56ZS.js";
|
|
43
43
|
import {
|
|
44
44
|
queryLLM,
|
|
45
45
|
queryQuick,
|
|
46
46
|
verifyApiKey
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-HXRWRZCF.js";
|
|
48
48
|
import {
|
|
49
49
|
DEFAULT_TIMEOUT_MS,
|
|
50
50
|
FallbackToolUseRejectedMessage,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
listMCPServers,
|
|
59
59
|
loadMergedSettings,
|
|
60
60
|
normalizeSandboxRuntimeConfigFromSettings
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-UTK4DWRS.js";
|
|
62
62
|
import {
|
|
63
63
|
addMarketplace,
|
|
64
64
|
disableSkillPlugin,
|
|
@@ -71,11 +71,11 @@ import {
|
|
|
71
71
|
refreshMarketplaceAsync,
|
|
72
72
|
removeMarketplace,
|
|
73
73
|
uninstallSkillPlugin
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-BDSXUEMJ.js";
|
|
75
75
|
import {
|
|
76
76
|
loadToolPermissionContextFromDisk,
|
|
77
77
|
persistToolPermissionUpdateToDisk
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-RKPXK6YP.js";
|
|
79
79
|
import {
|
|
80
80
|
applyToolPermissionContextUpdate,
|
|
81
81
|
createDefaultToolPermissionContext
|
|
@@ -88,7 +88,7 @@ import {
|
|
|
88
88
|
resetReminderSession,
|
|
89
89
|
setTodos,
|
|
90
90
|
systemReminderService
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-MGVONCTT.js";
|
|
92
92
|
import {
|
|
93
93
|
getSessionState
|
|
94
94
|
} from "./chunk-ERMQRV55.js";
|
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
getActiveAgents,
|
|
98
98
|
getAgentByType,
|
|
99
99
|
getAllAgents
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-TKWD34G5.js";
|
|
101
101
|
import {
|
|
102
102
|
API_ERROR_MESSAGE_PREFIX,
|
|
103
103
|
CANCEL_MESSAGE,
|
|
@@ -127,7 +127,7 @@ import {
|
|
|
127
127
|
processUserInput,
|
|
128
128
|
reorderMessages,
|
|
129
129
|
stripSystemMessages
|
|
130
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-EELKMURO.js";
|
|
131
131
|
import {
|
|
132
132
|
getRequestStatus,
|
|
133
133
|
setRequestStatus,
|
|
@@ -157,7 +157,7 @@ import {
|
|
|
157
157
|
normalizeFilePath,
|
|
158
158
|
readTextContent,
|
|
159
159
|
writeTextContent
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-WTWCL3W2.js";
|
|
161
161
|
import {
|
|
162
162
|
parseBlockEdits
|
|
163
163
|
} from "./chunk-QWIBSCDN.js";
|
|
@@ -167,18 +167,18 @@ import {
|
|
|
167
167
|
ParserRegistry,
|
|
168
168
|
initParser,
|
|
169
169
|
loadLanguage
|
|
170
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-GRNLX3GA.js";
|
|
171
171
|
import {
|
|
172
172
|
getSettingsFileCandidates,
|
|
173
173
|
loadSettingsWithLegacyFallback,
|
|
174
174
|
readSettingsFile
|
|
175
|
-
} from "./chunk-
|
|
175
|
+
} from "./chunk-KDKWNUAD.js";
|
|
176
176
|
import {
|
|
177
177
|
getCustomCommandDirectories,
|
|
178
178
|
hasCustomCommands,
|
|
179
179
|
loadCustomCommands,
|
|
180
180
|
reloadCustomCommands
|
|
181
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-UD66WITQ.js";
|
|
182
182
|
import {
|
|
183
183
|
getSessionPlugins
|
|
184
184
|
} from "./chunk-BJSWTHRM.js";
|
|
@@ -186,7 +186,7 @@ import {
|
|
|
186
186
|
ModelManager,
|
|
187
187
|
getModelManager,
|
|
188
188
|
isDefaultSlowAndCapableModel
|
|
189
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-AX7D3TRL.js";
|
|
190
190
|
import {
|
|
191
191
|
getCodeStyle,
|
|
192
192
|
getContext,
|
|
@@ -194,13 +194,13 @@ import {
|
|
|
194
194
|
getIsGit,
|
|
195
195
|
getProjectDocs,
|
|
196
196
|
getProjectStructureStatisticsBlock
|
|
197
|
-
} from "./chunk-
|
|
197
|
+
} from "./chunk-ZIIUNR5I.js";
|
|
198
198
|
import {
|
|
199
199
|
ripGrep
|
|
200
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-DUPGYYL5.js";
|
|
201
201
|
import {
|
|
202
202
|
getTheme
|
|
203
|
-
} from "./chunk-
|
|
203
|
+
} from "./chunk-UZLOWDHI.js";
|
|
204
204
|
import {
|
|
205
205
|
DEFAULT_GLOBAL_CONFIG,
|
|
206
206
|
enableConfigs,
|
|
@@ -213,7 +213,7 @@ import {
|
|
|
213
213
|
saveGlobalConfig,
|
|
214
214
|
setAllPointersToModel,
|
|
215
215
|
setModelPointer
|
|
216
|
-
} from "./chunk-
|
|
216
|
+
} from "./chunk-Y4GYDU7C.js";
|
|
217
217
|
import {
|
|
218
218
|
AbortError
|
|
219
219
|
} from "./chunk-RQVLBMP7.js";
|
|
@@ -222,7 +222,7 @@ import {
|
|
|
222
222
|
getCurrentRequest,
|
|
223
223
|
logUserFriendly,
|
|
224
224
|
markPhase
|
|
225
|
-
} from "./chunk-
|
|
225
|
+
} from "./chunk-UI6SHGSM.js";
|
|
226
226
|
import {
|
|
227
227
|
ASCII_LOGO,
|
|
228
228
|
BunShell,
|
|
@@ -262,10 +262,10 @@ import {
|
|
|
262
262
|
setCwd,
|
|
263
263
|
shouldApplyToolOutputTruncation,
|
|
264
264
|
truncateToolOutput
|
|
265
|
-
} from "./chunk-
|
|
265
|
+
} from "./chunk-XE5USG7G.js";
|
|
266
266
|
import {
|
|
267
267
|
MACRO
|
|
268
|
-
} from "./chunk-
|
|
268
|
+
} from "./chunk-EKBV663F.js";
|
|
269
269
|
import {
|
|
270
270
|
__export
|
|
271
271
|
} from "./chunk-I3J4JYES.js";
|
|
@@ -446,7 +446,7 @@ var getCommandSubcommandPrefix = memoize(
|
|
|
446
446
|
var getCommandPrefix = memoize(
|
|
447
447
|
async (command4, abortSignal) => {
|
|
448
448
|
const { systemPrompt, userPrompt } = buildBashCommandPrefixDetectionPrompt(command4);
|
|
449
|
-
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-
|
|
449
|
+
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-WTC26PPD.js");
|
|
450
450
|
const response = await queryQuick2({
|
|
451
451
|
systemPrompt,
|
|
452
452
|
userPrompt,
|
|
@@ -4248,7 +4248,7 @@ function formatParseError(error) {
|
|
|
4248
4248
|
return error instanceof Error ? error.message : String(error);
|
|
4249
4249
|
}
|
|
4250
4250
|
async function defaultGateQuery(args) {
|
|
4251
|
-
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-
|
|
4251
|
+
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-WTC26PPD.js");
|
|
4252
4252
|
const queryLLMFn = args.queryLLMOverride ?? queryLLM2;
|
|
4253
4253
|
const messages = [
|
|
4254
4254
|
{
|
|
@@ -6509,7 +6509,7 @@ var FileEditTool = {
|
|
|
6509
6509
|
const originalFileContent = currentFileContent;
|
|
6510
6510
|
let totalPatch = [];
|
|
6511
6511
|
const { SmartEdit } = await import("./smart-edit-AWHJDSU6.js");
|
|
6512
|
-
const { findLspAnchor } = await import("./lspAnchor-
|
|
6512
|
+
const { findLspAnchor } = await import("./lspAnchor-V3SHZVR2.js");
|
|
6513
6513
|
for (const op of editOperations) {
|
|
6514
6514
|
const normalizedSearch = normalizeLineEndings(op.search);
|
|
6515
6515
|
const normalizedReplace = normalizeLineEndings(op.replace);
|
|
@@ -11070,7 +11070,7 @@ async function createAndStoreApiKey(accessToken) {
|
|
|
11070
11070
|
}
|
|
11071
11071
|
saveGlobalConfig(config2);
|
|
11072
11072
|
try {
|
|
11073
|
-
const { resetAnthropicClient } = await import("./llm-
|
|
11073
|
+
const { resetAnthropicClient } = await import("./llm-WTC26PPD.js");
|
|
11074
11074
|
resetAnthropicClient();
|
|
11075
11075
|
} catch {
|
|
11076
11076
|
}
|
|
@@ -15352,7 +15352,7 @@ async function refreshPluginRuntimeFromInstalls() {
|
|
|
15352
15352
|
const existingRoots = getSessionPlugins().map((p) => p.rootDir);
|
|
15353
15353
|
const dirs = Array.from(/* @__PURE__ */ new Set([...existingRoots, ...installedRoots]));
|
|
15354
15354
|
if (dirs.length === 0) return [];
|
|
15355
|
-
const { configureSessionPlugins } = await import("./pluginRuntime-
|
|
15355
|
+
const { configureSessionPlugins } = await import("./pluginRuntime-XYBSQJAU.js");
|
|
15356
15356
|
const { errors } = await configureSessionPlugins({ pluginDirs: dirs });
|
|
15357
15357
|
return errors;
|
|
15358
15358
|
}
|
|
@@ -16021,7 +16021,7 @@ async function call(onDone, context) {
|
|
|
16021
16021
|
ModelConfig,
|
|
16022
16022
|
{
|
|
16023
16023
|
onClose: () => {
|
|
16024
|
-
import("./model-
|
|
16024
|
+
import("./model-KBT7MSFR.js").then(({ reloadModelManager: reloadModelManager2 }) => {
|
|
16025
16025
|
reloadModelManager2();
|
|
16026
16026
|
triggerModelConfigChange();
|
|
16027
16027
|
onDone();
|
|
@@ -23756,7 +23756,7 @@ function useStatusLine() {
|
|
|
23756
23756
|
// src/ui/components/PromptInput.tsx
|
|
23757
23757
|
async function interpretHashCommand(input) {
|
|
23758
23758
|
try {
|
|
23759
|
-
const { queryQuick: queryQuick2 } = await import("./llm-
|
|
23759
|
+
const { queryQuick: queryQuick2 } = await import("./llm-WTC26PPD.js");
|
|
23760
23760
|
const systemPrompt = [
|
|
23761
23761
|
"You're helping the user structure notes that will be added to their PYB.md file.",
|
|
23762
23762
|
"Format the user's input into a well-structured note that will be useful for later reference.",
|
|
@@ -24069,7 +24069,7 @@ function PromptInput({
|
|
|
24069
24069
|
if (messages2.length) {
|
|
24070
24070
|
if (mode === "bash") {
|
|
24071
24071
|
onQuery(messages2, newAbortController).then(async () => {
|
|
24072
|
-
const { getCwd: getCwd2 } = await import("./state-
|
|
24072
|
+
const { getCwd: getCwd2 } = await import("./state-MWT54BRL.js");
|
|
24073
24073
|
setCurrentPwd(getCwd2());
|
|
24074
24074
|
});
|
|
24075
24075
|
} else {
|
|
@@ -26939,7 +26939,7 @@ import { homedir as homedir7 } from "os";
|
|
|
26939
26939
|
// src/commands/agents/generation.ts
|
|
26940
26940
|
import { randomUUID as randomUUID5 } from "crypto";
|
|
26941
26941
|
async function generateAgentWithClaude(prompt) {
|
|
26942
|
-
const { queryModel } = await import("./llm-
|
|
26942
|
+
const { queryModel } = await import("./llm-WTC26PPD.js");
|
|
26943
26943
|
const systemPrompt = `You are an expert at creating AI agent configurations. Based on the user's description, generate a specialized agent configuration.
|
|
26944
26944
|
|
|
26945
26945
|
Return your response as a JSON object with exactly these fields:
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
getSettingsFileCandidates,
|
|
8
8
|
loadSettingsWithLegacyFallback,
|
|
9
9
|
saveSettingsToPrimaryAndSyncLegacy
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KDKWNUAD.js";
|
|
11
11
|
import {
|
|
12
12
|
getSessionPlugins
|
|
13
13
|
} from "./chunk-BJSWTHRM.js";
|
|
14
14
|
import {
|
|
15
15
|
getCwd,
|
|
16
16
|
getXdgConfigDir
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-XE5USG7G.js";
|
|
18
18
|
|
|
19
19
|
// src/services/ui/outputStyles.ts
|
|
20
20
|
import figures from "figures";
|
|
@@ -22,6 +22,7 @@ import { memoize } from "lodash-es";
|
|
|
22
22
|
import { existsSync, readdirSync, readFileSync, statSync } from "fs";
|
|
23
23
|
import { basename, dirname, join, resolve } from "path";
|
|
24
24
|
import { homedir } from "os";
|
|
25
|
+
import { fileURLToPath } from "url";
|
|
25
26
|
import matter from "gray-matter";
|
|
26
27
|
import yaml from "js-yaml";
|
|
27
28
|
|
|
@@ -60,6 +61,14 @@ function updateLocalSettings(patch, options) {
|
|
|
60
61
|
|
|
61
62
|
// src/services/ui/outputStyles.ts
|
|
62
63
|
var DEFAULT_OUTPUT_STYLE = "default";
|
|
64
|
+
var getRuntimeDirname = () => {
|
|
65
|
+
try {
|
|
66
|
+
return __dirname;
|
|
67
|
+
} catch {
|
|
68
|
+
return dirname(fileURLToPath(import.meta.url));
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
var runtimeDirname = getRuntimeDirname();
|
|
63
72
|
function normalizeString(value) {
|
|
64
73
|
if (typeof value !== "string") return null;
|
|
65
74
|
const trimmed = value.trim();
|
|
@@ -127,6 +136,19 @@ function markdownFirstLineOrHeading(content, fallback) {
|
|
|
127
136
|
}
|
|
128
137
|
return fallback;
|
|
129
138
|
}
|
|
139
|
+
function resolveBuiltInOutputStyleDirs() {
|
|
140
|
+
const dirs = [];
|
|
141
|
+
const envDir = normalizeString(process.env.PYB_OUTPUT_STYLE_DIR);
|
|
142
|
+
if (envDir) dirs.push(resolve(envDir));
|
|
143
|
+
if (runtimeDirname.includes("dist") || runtimeDirname.includes("node_modules")) {
|
|
144
|
+
dirs.push(resolve(runtimeDirname, "../resources/output-styles"));
|
|
145
|
+
} else {
|
|
146
|
+
dirs.push(resolve(runtimeDirname, "../../../resources/output-styles"));
|
|
147
|
+
const templatesDir = resolve(runtimeDirname, "../../../../templates");
|
|
148
|
+
if (existsSync(templatesDir)) dirs.push(templatesDir);
|
|
149
|
+
}
|
|
150
|
+
return Array.from(new Set(dirs));
|
|
151
|
+
}
|
|
130
152
|
function listMarkdownFilesRecursively(rootDir) {
|
|
131
153
|
const files = [];
|
|
132
154
|
const visitedDirs = /* @__PURE__ */ new Set();
|
|
@@ -204,6 +226,40 @@ function inodeKeyForPath(filePath) {
|
|
|
204
226
|
return null;
|
|
205
227
|
}
|
|
206
228
|
}
|
|
229
|
+
function parseBuiltInOutputStyleFile(options) {
|
|
230
|
+
const parsed = readMarkdownFile(options.filePath);
|
|
231
|
+
if (!parsed) return null;
|
|
232
|
+
const base = basename(options.filePath, ".md");
|
|
233
|
+
const name = normalizeString(parsed.frontmatter?.name) ?? base;
|
|
234
|
+
const description = normalizeString(parsed.frontmatter?.description) ?? markdownFirstLineOrHeading(parsed.content, `Built-in ${base} output style`);
|
|
235
|
+
const keepCodingInstructions = parseKeepCodingInstructions(
|
|
236
|
+
parsed.frontmatter?.["keep-coding-instructions"]
|
|
237
|
+
);
|
|
238
|
+
const prompt = parsed.content.trim();
|
|
239
|
+
if (!prompt) return null;
|
|
240
|
+
return {
|
|
241
|
+
name,
|
|
242
|
+
description,
|
|
243
|
+
prompt,
|
|
244
|
+
source: "built-in",
|
|
245
|
+
...keepCodingInstructions !== void 0 ? { keepCodingInstructions } : {}
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
function loadBundledOutputStyles() {
|
|
249
|
+
const out = [];
|
|
250
|
+
const seen = /* @__PURE__ */ new Set();
|
|
251
|
+
for (const dirPath of resolveBuiltInOutputStyleDirs()) {
|
|
252
|
+
for (const filePath of listMarkdownFilesRecursively(dirPath)) {
|
|
253
|
+
const inodeKey = inodeKeyForPath(filePath);
|
|
254
|
+
const dedupeKey = inodeKey ? `inode:${inodeKey}` : `path:${filePath}`;
|
|
255
|
+
if (seen.has(dedupeKey)) continue;
|
|
256
|
+
seen.add(dedupeKey);
|
|
257
|
+
const style = parseBuiltInOutputStyleFile({ filePath });
|
|
258
|
+
if (style && style.name !== DEFAULT_OUTPUT_STYLE) out.push(style);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return out;
|
|
262
|
+
}
|
|
207
263
|
var INSIGHTS_SECTION = `
|
|
208
264
|
## Insights
|
|
209
265
|
In order to encourage learning, before and after writing code, always provide brief educational explanations about implementation choices using (with backticks):
|
|
@@ -213,7 +269,7 @@ In order to encourage learning, before and after writing code, always provide br
|
|
|
213
269
|
|
|
214
270
|
These insights should be included in the conversation, not in the codebase. You should generally focus on interesting insights that are specific to the codebase or the code you just wrote, rather than general programming concepts.`;
|
|
215
271
|
function getBuiltInOutputStyles() {
|
|
216
|
-
|
|
272
|
+
const builtIn = {
|
|
217
273
|
[DEFAULT_OUTPUT_STYLE]: null,
|
|
218
274
|
Explanatory: {
|
|
219
275
|
name: "Explanatory",
|
|
@@ -306,6 +362,10 @@ Share one insight connecting their code to broader patterns or system effects. A
|
|
|
306
362
|
${INSIGHTS_SECTION}`
|
|
307
363
|
}
|
|
308
364
|
};
|
|
365
|
+
for (const style of loadBundledOutputStyles()) {
|
|
366
|
+
builtIn[style.name] = style;
|
|
367
|
+
}
|
|
368
|
+
return builtIn;
|
|
309
369
|
}
|
|
310
370
|
function parseKeepCodingInstructions(value) {
|
|
311
371
|
if (value === "true") return true;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/services/ui/outputStyles.ts", "../src/utils/config/localSettings.ts"],
|
|
4
|
+
"sourcesContent": ["import figures from 'figures'\nimport { memoize } from 'lodash-es'\nimport { existsSync, readdirSync, readFileSync, statSync } from 'fs'\nimport { basename, dirname, join, resolve } from 'path'\nimport { homedir } from 'os'\nimport { fileURLToPath } from 'url'\nimport matter from 'gray-matter'\nimport yaml from 'js-yaml'\nimport { getSessionPlugins } from '@utils/session/sessionPlugins'\nimport { readLocalSettings, updateLocalSettings } from '@utils/config/localSettings'\nimport { getCwd } from '@utils/state'\nimport { isSettingSourceEnabled } from '@utils/config/settingSources'\nimport { getXdgConfigDir } from '@utils/config/env'\n\nexport type OutputStyleSource =\n | 'built-in'\n | 'plugin'\n | 'userSettings'\n | 'projectSettings'\n | 'policySettings'\n\nexport type OutputStyleDefinition = {\n name: string\n description: string\n prompt: string\n source: OutputStyleSource\n keepCodingInstructions?: boolean\n}\n\nexport type OutputStyleMap = Record<string, OutputStyleDefinition | null>\n\nexport const DEFAULT_OUTPUT_STYLE = 'default'\n\nconst getRuntimeDirname = () => {\n try {\n return __dirname\n } catch {\n return dirname(fileURLToPath(import.meta.url))\n }\n}\n\nconst runtimeDirname = getRuntimeDirname()\n\nfunction normalizeString(value: unknown): string | null {\n if (typeof value !== 'string') return null\n const trimmed = value.trim()\n return trimmed ? trimmed : null\n}\n\nfunction getClaudePolicyBaseDir(): string {\n switch (process.platform) {\n case 'darwin':\n return '/Library/Application Support/ClaudeCode'\n case 'win32':\n return existsSync('C:\\\\Program Files\\\\ClaudeCode')\n ? 'C:\\\\Program Files\\\\ClaudeCode'\n : 'C:\\\\ProgramData\\\\ClaudeCode'\n default:\n return '/etc/claude-code'\n }\n}\n\nfunction getUserConfigBaseDirs(): { claude: string; pyb: string }[] {\n const out: { claude: string; pyb: string }[] = []\n\n const hasAnyOverride =\n typeof process.env.CLAUDE_CONFIG_DIR === 'string' ||\n typeof process.env.PYB_CONFIG_DIR === 'string'\n\n const claudeBase = normalizeString(process.env.CLAUDE_CONFIG_DIR)\n const pybBase = normalizeString(process.env.PYB_CONFIG_DIR)\n\n if (claudeBase) out.push({ claude: resolve(claudeBase), pyb: resolve(claudeBase) })\n if (pybBase) out.push({ claude: resolve(pybBase), pyb: resolve(pybBase) })\n\n if (hasAnyOverride) {\n return dedupeConfigBases(out)\n }\n\n return dedupeConfigBases([\n { claude: getXdgConfigDir(), pyb: getXdgConfigDir() },\n { claude: join(homedir(), '.claude'), pyb: join(homedir(), '.claude') },\n { claude: join(homedir(), '.pyb'), pyb: join(homedir(), '.pyb') },\n ])\n}\n\nfunction dedupeConfigBases(\n bases: Array<{ claude: string; pyb: string }>,\n): Array<{ claude: string; pyb: string }> {\n const seen = new Set<string>()\n const out: Array<{ claude: string; pyb: string }> = []\n for (const base of bases) {\n const key = `${base.claude}::${base.pyb}`\n if (seen.has(key)) continue\n seen.add(key)\n out.push(base)\n }\n return out\n}\n\nfunction findProjectSubdirs(subdir: string, cwd: string): string[] {\n const result: string[] = []\n const home = resolve(homedir())\n let current = resolve(cwd)\n\n while (current !== home) {\n const claudeDir = join(current, '.claude', subdir)\n if (existsSync(claudeDir)) result.push(claudeDir)\n\n const pybDir = join(current, '.pyb', subdir)\n if (existsSync(pybDir)) result.push(pybDir)\n\n const parent = dirname(current)\n if (parent === current) break\n current = parent\n }\n\n return result\n}\n\nfunction markdownFirstLineOrHeading(content: string, fallback: string): string {\n const lines = content.split('\\n')\n for (const line of lines) {\n const trimmed = line.trim()\n if (!trimmed) continue\n const heading = trimmed.match(/^#+\\s+(.+)$/)?.[1] ?? trimmed\n return heading.length > 100 ? `${heading.substring(0, 97)}...` : heading\n }\n return fallback\n}\n\nfunction resolveBuiltInOutputStyleDirs(): string[] {\n const dirs: string[] = []\n const envDir = normalizeString(process.env.PYB_OUTPUT_STYLE_DIR)\n if (envDir) dirs.push(resolve(envDir))\n\n if (runtimeDirname.includes('dist') || runtimeDirname.includes('node_modules')) {\n dirs.push(resolve(runtimeDirname, '../resources/output-styles'))\n } else {\n dirs.push(resolve(runtimeDirname, '../../../resources/output-styles'))\n const templatesDir = resolve(runtimeDirname, '../../../../templates')\n if (existsSync(templatesDir)) dirs.push(templatesDir)\n }\n\n return Array.from(new Set(dirs))\n}\n\nfunction listMarkdownFilesRecursively(rootDir: string): string[] {\n const files: string[] = []\n const visitedDirs = new Set<string>()\n\n const walk = (dirPath: string) => {\n let dirStat: ReturnType<typeof statSync>\n try {\n dirStat = statSync(dirPath)\n } catch {\n return\n }\n if (!dirStat.isDirectory()) return\n\n const dirKey = `${dirStat.dev}:${dirStat.ino}`\n if (visitedDirs.has(dirKey)) return\n visitedDirs.add(dirKey)\n\n let entries: Array<{ name: string; isDirectory(): boolean; isFile(): boolean; isSymbolicLink(): boolean }>\n try {\n entries = readdirSync(dirPath, { withFileTypes: true, encoding: 'utf8' }) as any\n } catch {\n return\n }\n\n for (const entry of entries) {\n const name = String(entry.name ?? '')\n const fullPath = join(dirPath, name)\n\n if (entry.isDirectory()) {\n walk(fullPath)\n continue\n }\n\n if (entry.isFile()) {\n if (name.endsWith('.md')) files.push(fullPath)\n continue\n }\n\n if (entry.isSymbolicLink()) {\n try {\n const st = statSync(fullPath)\n if (st.isDirectory()) {\n walk(fullPath)\n } else if (st.isFile() && name.endsWith('.md')) {\n files.push(fullPath)\n }\n } catch {\n continue\n }\n }\n }\n }\n\n if (!existsSync(rootDir)) return []\n walk(rootDir)\n return files\n}\n\nfunction readMarkdownFile(filePath: string): { frontmatter: any; content: string } | null {\n try {\n const raw = readFileSync(filePath, 'utf8')\n const yamlSchema = (yaml as any).JSON_SCHEMA\n const matterOptions = {\n engines: {\n yaml: {\n parse: (input: string) =>\n yaml.load(input, yamlSchema ? { schema: yamlSchema } : undefined) ??\n {},\n },\n },\n }\n const parsed = matter(raw, matterOptions)\n return { frontmatter: (parsed.data as any) ?? {}, content: String(parsed.content ?? '') }\n } catch {\n return null\n }\n}\n\nfunction inodeKeyForPath(filePath: string): string | null {\n try {\n const st = statSync(filePath)\n if (typeof (st as any).dev === 'number' && typeof (st as any).ino === 'number') {\n return `${(st as any).dev}:${(st as any).ino}`\n }\n return null\n } catch {\n return null\n }\n}\n\nfunction parseBuiltInOutputStyleFile(options: {\n filePath: string\n}): OutputStyleDefinition | null {\n const parsed = readMarkdownFile(options.filePath)\n if (!parsed) return null\n\n const base = basename(options.filePath, '.md')\n const name = normalizeString(parsed.frontmatter?.name) ?? base\n const description =\n normalizeString(parsed.frontmatter?.description) ??\n markdownFirstLineOrHeading(parsed.content, `Built-in ${base} output style`)\n const keepCodingInstructions = parseKeepCodingInstructions(\n parsed.frontmatter?.['keep-coding-instructions'],\n )\n const prompt = parsed.content.trim()\n if (!prompt) return null\n\n return {\n name,\n description,\n prompt,\n source: 'built-in',\n ...(keepCodingInstructions !== undefined ? { keepCodingInstructions } : {}),\n }\n}\n\nfunction loadBundledOutputStyles(): OutputStyleDefinition[] {\n const out: OutputStyleDefinition[] = []\n const seen = new Set<string>()\n for (const dirPath of resolveBuiltInOutputStyleDirs()) {\n for (const filePath of listMarkdownFilesRecursively(dirPath)) {\n const inodeKey = inodeKeyForPath(filePath)\n const dedupeKey = inodeKey ? `inode:${inodeKey}` : `path:${filePath}`\n if (seen.has(dedupeKey)) continue\n seen.add(dedupeKey)\n const style = parseBuiltInOutputStyleFile({ filePath })\n if (style && style.name !== DEFAULT_OUTPUT_STYLE) out.push(style)\n }\n }\n return out\n}\n\nconst INSIGHTS_SECTION = `\n## Insights\nIn order to encourage learning, before and after writing code, always provide brief educational explanations about implementation choices using (with backticks):\n\"\\`${figures.star} Insight \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\\`\n[2-3 key educational points]\n\\`\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\\`\"\n\nThese insights should be included in the conversation, not in the codebase. You should generally focus on interesting insights that are specific to the codebase or the code you just wrote, rather than general programming concepts.`\n\nfunction getBuiltInOutputStyles(): OutputStyleMap {\n const builtIn: OutputStyleMap = {\n [DEFAULT_OUTPUT_STYLE]: null,\n Explanatory: {\n name: 'Explanatory',\n source: 'built-in',\n description: 'Claude explains its implementation choices and codebase patterns',\n keepCodingInstructions: true,\n prompt: `You are an interactive CLI tool that helps users with software engineering tasks. In addition to software engineering tasks, you should provide educational insights about the codebase along the way.\n\nYou should be clear and educational, providing helpful explanations while remaining focused on the task. Balance educational content with task completion. When providing insights, you may exceed typical length constraints, but remain focused and relevant.\n\n# Explanatory Style Active\n${INSIGHTS_SECTION}`,\n },\n Learning: {\n name: 'Learning',\n source: 'built-in',\n description:\n 'Claude pauses and asks you to write small pieces of code for hands-on practice',\n keepCodingInstructions: true,\n prompt: `You are an interactive CLI tool that helps users with software engineering tasks. In addition to software engineering tasks, you should help users learn more about the codebase through hands-on practice and educational insights.\n\nYou should be collaborative and encouraging. Balance task completion with learning by requesting user input for meaningful design decisions while handling routine implementation yourself. \n\n# Learning Style Active\n## Requesting Human Contributions\nIn order to encourage learning, ask the human to contribute 2-10 line code pieces when generating 20+ lines involving:\n- Design decisions (error handling, data structures)\n- Business logic with multiple valid approaches \n- Key algorithms or interface definitions\n\n**TodoList Integration**: If using a TodoList for the overall task, include a specific todo item like \"Request human input on [specific decision]\" when planning to request human input. This ensures proper task tracking. Note: TodoList is not required for all tasks.\n\nExample TodoList flow:\n \u2713 \"Set up component structure with placeholder for logic\"\n \u2713 \"Request human collaboration on decision logic implementation\"\n \u2713 \"Integrate contribution and complete feature\"\n\n### Request Format\n\\`\\`\\`\n${figures.bullet} **Learn by Doing**\n**Context:** [what's built and why this decision matters]\n**Your Task:** [specific function/section in file, mention file and TODO(human) but do not include line numbers]\n**Guidance:** [trade-offs and constraints to consider]\n\\`\\`\\`\n\n### Key Guidelines\n- Frame contributions as valuable design decisions, not busy work\n- You must first add a TODO(human) section into the codebase with your editing tools before making the Learn by Doing request \n- Make sure there is one and only one TODO(human) section in the code\n- Don't take any action or output anything after the Learn by Doing request. Wait for human implementation before proceeding.\n\n### Example Requests\n\n**Whole Function Example:**\n\\`\\`\\`\n${figures.bullet} **Learn by Doing**\n\n**Context:** I've set up the hint feature UI with a button that triggers the hint system. The infrastructure is ready: when clicked, it calls selectHintCell() to determine which cell to hint, then highlights that cell with a yellow background and shows possible values. The hint system needs to decide which empty cell would be most helpful to reveal to the user.\n\n**Your Task:** In sudoku.js, implement the selectHintCell(board) function. Look for TODO(human). This function should analyze the board and return {row, col} for the best cell to hint, or null if the puzzle is complete.\n\n**Guidance:** Consider multiple strategies: prioritize cells with only one possible value (naked singles), or cells that appear in rows/columns/boxes with many filled cells. You could also consider a balanced approach that helps without making it too easy. The board parameter is a 9x9 array where 0 represents empty cells.\n\\`\\`\\`\n\n**Partial Function Example:**\n\\`\\`\\`\n${figures.bullet} **Learn by Doing**\n\n**Context:** I've built a file upload component that validates files before accepting them. The main validation logic is complete, but it needs specific handling for different file type categories in the switch statement.\n\n**Your Task:** In upload.js, inside the validateFile() function's switch statement, implement the 'case \"document\":' branch. Look for TODO(human). This should validate document files (pdf, doc, docx).\n\n**Guidance:** Consider checking file size limits (maybe 10MB for documents?), validating the file extension matches the MIME type, and returning {valid: boolean, error?: string}. The file object has properties: name, size, type.\n\\`\\`\\`\n\n**Debugging Example:**\n\\`\\`\\`\n${figures.bullet} **Learn by Doing**\n\n**Context:** The user reported that number inputs aren't working correctly in the calculator. I've identified the handleInput() function as the likely source, but need to understand what values are being processed.\n\n**Your Task:** In calculator.js, inside the handleInput() function, add 2-3 console.log statements after the TODO(human) comment to help debug why number inputs fail.\n\n**Guidance:** Consider logging: the raw input value, the parsed result, and any validation state. This will help us understand where the conversion breaks.\n\\`\\`\\`\n\n### After Contributions\nShare one insight connecting their code to broader patterns or system effects. Avoid praise or repetition.\n\n## Insights\n${INSIGHTS_SECTION}`,\n },\n }\n for (const style of loadBundledOutputStyles()) {\n builtIn[style.name] = style\n }\n return builtIn\n}\n\nfunction parseKeepCodingInstructions(value: unknown): boolean | undefined {\n if (value === 'true') return true\n if (value === 'false') return false\n return undefined\n}\n\nfunction parseCustomOutputStyleFile(options: {\n filePath: string\n source: Exclude<OutputStyleSource, 'built-in' | 'plugin'>\n}): OutputStyleDefinition | null {\n const parsed = readMarkdownFile(options.filePath)\n if (!parsed) return null\n\n const base = basename(options.filePath, '.md')\n const name = normalizeString(parsed.frontmatter?.name) ?? base\n const description =\n normalizeString(parsed.frontmatter?.description) ??\n markdownFirstLineOrHeading(parsed.content, `Custom ${base} output style`)\n const keepCodingInstructions = parseKeepCodingInstructions(\n parsed.frontmatter?.['keep-coding-instructions'],\n )\n const prompt = parsed.content.trim()\n\n return {\n name,\n description,\n prompt,\n source: options.source,\n ...(keepCodingInstructions !== undefined ? { keepCodingInstructions } : {}),\n }\n}\n\nfunction parsePluginOutputStyleFile(options: {\n filePath: string\n pluginName: string\n seen: Set<string>\n}): OutputStyleDefinition | null {\n const inodeKey = inodeKeyForPath(options.filePath)\n const dedupeKey = inodeKey ? `inode:${inodeKey}` : `path:${options.filePath}`\n if (options.seen.has(dedupeKey)) return null\n options.seen.add(dedupeKey)\n\n const parsed = readMarkdownFile(options.filePath)\n if (!parsed) return null\n\n const base = basename(options.filePath, '.md')\n const styleName = normalizeString(parsed.frontmatter?.name) ?? base\n const fullName = `${options.pluginName}:${styleName}`\n const description =\n normalizeString(parsed.frontmatter?.description) ??\n markdownFirstLineOrHeading(\n parsed.content,\n `Output style from ${options.pluginName} plugin`,\n )\n const prompt = parsed.content.trim()\n\n return {\n name: fullName,\n description,\n prompt,\n source: 'plugin',\n }\n}\n\nfunction loadPluginOutputStyles(): OutputStyleDefinition[] {\n const out: OutputStyleDefinition[] = []\n const plugins = getSessionPlugins()\n for (const plugin of plugins) {\n const pluginName = plugin.name\n const seen = new Set<string>()\n for (const dir of plugin.outputStylesDirs ?? []) {\n let st: ReturnType<typeof statSync>\n try {\n st = statSync(dir)\n } catch {\n continue\n }\n if (st.isFile()) {\n if (!dir.endsWith('.md')) continue\n const style = parsePluginOutputStyleFile({\n filePath: dir,\n pluginName,\n seen,\n })\n if (style) out.push(style)\n continue\n }\n\n if (st.isDirectory()) {\n const files = listMarkdownFilesRecursively(dir)\n for (const filePath of files) {\n const style = parsePluginOutputStyleFile({\n filePath,\n pluginName,\n seen,\n })\n if (style) out.push(style)\n }\n }\n }\n }\n return out\n}\n\nfunction loadCustomOutputStyles(options: { cwd: string }): OutputStyleDefinition[] {\n const out: OutputStyleDefinition[] = []\n const seen = new Set<string>()\n\n const policyDir = join(\n getClaudePolicyBaseDir(),\n '.claude',\n 'output-styles',\n )\n for (const filePath of listMarkdownFilesRecursively(policyDir)) {\n const inodeKey = inodeKeyForPath(filePath)\n const dedupeKey = inodeKey ? `inode:${inodeKey}` : `path:${filePath}`\n if (seen.has(dedupeKey)) continue\n seen.add(dedupeKey)\n const style = parseCustomOutputStyleFile({\n filePath,\n source: 'policySettings',\n })\n if (style) out.push(style)\n }\n\n if (isSettingSourceEnabled('userSettings')) {\n const userBases = getUserConfigBaseDirs()\n for (const base of userBases) {\n for (const userBaseDir of new Set([base.claude, base.pyb])) {\n const dirPath = join(userBaseDir, 'output-styles')\n for (const filePath of listMarkdownFilesRecursively(dirPath)) {\n const inodeKey = inodeKeyForPath(filePath)\n const dedupeKey = inodeKey ? `inode:${inodeKey}` : `path:${filePath}`\n if (seen.has(dedupeKey)) continue\n seen.add(dedupeKey)\n const style = parseCustomOutputStyleFile({\n filePath,\n source: 'userSettings',\n })\n if (style) out.push(style)\n }\n }\n }\n }\n\n if (isSettingSourceEnabled('projectSettings')) {\n for (const dirPath of findProjectSubdirs('output-styles', options.cwd)) {\n for (const filePath of listMarkdownFilesRecursively(dirPath)) {\n const inodeKey = inodeKeyForPath(filePath)\n const dedupeKey = inodeKey ? `inode:${inodeKey}` : `path:${filePath}`\n if (seen.has(dedupeKey)) continue\n seen.add(dedupeKey)\n const style = parseCustomOutputStyleFile({\n filePath,\n source: 'projectSettings',\n })\n if (style) out.push(style)\n }\n }\n }\n\n return out\n}\n\nexport const getAvailableOutputStyles = memoize((): OutputStyleMap => {\n const cwd = getCwd()\n const builtIn = getBuiltInOutputStyles()\n const merged: OutputStyleMap = { ...builtIn }\n\n for (const style of loadPluginOutputStyles()) {\n merged[style.name] = style\n }\n\n const custom = loadCustomOutputStyles({ cwd })\n const user = custom.filter(s => s.source === 'userSettings')\n const project = custom.filter(s => s.source === 'projectSettings')\n const policy = custom.filter(s => s.source === 'policySettings')\n\n for (const style of user) merged[style.name] = style\n for (const style of project) merged[style.name] = style\n for (const style of policy) merged[style.name] = style\n\n return merged\n})\n\nexport function clearOutputStyleCache(): void {\n ;(getAvailableOutputStyles as any).cache?.clear?.()\n}\n\nexport function getCurrentOutputStyle(): string {\n if (!isSettingSourceEnabled('localSettings')) return DEFAULT_OUTPUT_STYLE\n\n const settings = readLocalSettings()\n const candidate = normalizeString(settings.outputStyle)\n return candidate ?? DEFAULT_OUTPUT_STYLE\n}\n\nexport function setCurrentOutputStyle(styleName: string): void {\n updateLocalSettings({ outputStyle: styleName })\n}\n\nexport function resolveOutputStyleName(input: string): string | null {\n const raw = normalizeString(input)\n if (!raw) return null\n const styles = getAvailableOutputStyles()\n if (raw in styles) return raw\n const lower = raw.toLowerCase()\n for (const name of Object.keys(styles)) {\n if (name.toLowerCase() === lower) return name\n }\n return null\n}\n\nexport function getCurrentOutputStyleDefinition(): OutputStyleDefinition | null {\n const current = getCurrentOutputStyle()\n const styles = getAvailableOutputStyles()\n return styles[current] ?? null\n}\n\nexport function getOutputStyleSystemPromptAdditions(): string[] {\n const style = getCurrentOutputStyleDefinition()\n if (!style) return []\n const prompt = style.prompt.trim()\n if (!prompt) return []\n return [`\\n# Output Style: ${style.name}\\n${prompt}\\n`]\n}\n", "import { join } from 'path'\nimport { getCwd } from '@utils/state'\nimport {\n getSettingsFileCandidates,\n loadSettingsWithLegacyFallback,\n saveSettingsToPrimaryAndSyncLegacy,\n} from '@utils/config/settingsFiles'\n\nexport type LocalSettings = {\n outputStyle?: unknown\n [key: string]: unknown\n}\n\nexport function getLocalSettingsPath(options?: {\n projectDir?: string\n}): string {\n const projectDir = options?.projectDir ?? getCwd()\n return join(projectDir, '.pyb', 'settings.local.json')\n}\n\nexport function readLocalSettings(options?: {\n projectDir?: string\n}): LocalSettings {\n const projectDir = options?.projectDir ?? getCwd()\n const loaded = loadSettingsWithLegacyFallback({\n destination: 'localSettings',\n projectDir,\n migrateToPrimary: true,\n })\n return (loaded.settings as LocalSettings | null) ?? {}\n}\n\nexport function updateLocalSettings(\n patch: Record<string, unknown>,\n options?: {\n projectDir?: string\n },\n): LocalSettings {\n const projectDir = options?.projectDir ?? getCwd()\n const candidates = getSettingsFileCandidates({\n destination: 'localSettings',\n projectDir,\n })\n const existing =\n (candidates\n ? loadSettingsWithLegacyFallback({\n destination: 'localSettings',\n projectDir,\n migrateToPrimary: true,\n }).settings\n : null) ?? {}\n\n const next = { ...(existing as Record<string, unknown>), ...patch }\n\n if (candidates) {\n saveSettingsToPrimaryAndSyncLegacy({\n destination: 'localSettings',\n projectDir,\n settings: next,\n syncLegacyIfExists: true,\n })\n }\n\n return next as LocalSettings\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA,OAAO,aAAa;AACpB,SAAS,eAAe;AACxB,SAAS,YAAY,aAAa,cAAc,gBAAgB;AAChE,SAAS,UAAU,SAA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AM,OAAO,KAAK;AACjC,MAAI,CAAC,OAAQ,QAAO,CAAC;AACrB,SAAO,CAAC;AAAA,kBAAqB,MAAM,IAAI;AAAA,EAAK,MAAM;AAAA,CAAI;AACxD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
getSettingsFileCandidates,
|
|
9
9
|
loadSettingsWithLegacyFallback,
|
|
10
10
|
saveSettingsToPrimaryAndSyncLegacy
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-KDKWNUAD.js";
|
|
12
12
|
import {
|
|
13
13
|
getCurrentProjectConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-Y4GYDU7C.js";
|
|
15
15
|
import {
|
|
16
16
|
getCwd,
|
|
17
17
|
logError
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-XE5USG7G.js";
|
|
19
19
|
|
|
20
20
|
// src/utils/permissions/toolPermissionSettings.ts
|
|
21
21
|
function uniqueStrings(value) {
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
PRODUCT_NAME,
|
|
5
5
|
execFileNoThrow,
|
|
6
6
|
logError
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XE5USG7G.js";
|
|
8
8
|
import {
|
|
9
9
|
MACRO
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EKBV663F.js";
|
|
11
11
|
|
|
12
12
|
// src/utils/session/autoUpdater.ts
|
|
13
13
|
async function getSemver() {
|
|
@@ -82,7 +82,7 @@ async function checkAndNotifyUpdate() {
|
|
|
82
82
|
const [
|
|
83
83
|
{ isAutoUpdaterDisabled, getGlobalConfig, saveGlobalConfig },
|
|
84
84
|
{ env }
|
|
85
|
-
] = await Promise.all([import("./config-
|
|
85
|
+
] = await Promise.all([import("./config-ZXQFEZGB.js"), import("./env-MSSOW7XA.js")]);
|
|
86
86
|
if (await isAutoUpdaterDisabled()) return;
|
|
87
87
|
if (await env.getIsDocker()) return;
|
|
88
88
|
if (!await env.hasInternetAccess()) return;
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
} from "./chunk-BJSWTHRM.js";
|
|
9
9
|
import {
|
|
10
10
|
debug
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UI6SHGSM.js";
|
|
12
12
|
import {
|
|
13
13
|
getCwd,
|
|
14
14
|
getXdgConfigDir,
|
|
15
15
|
logError
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XE5USG7G.js";
|
|
17
17
|
|
|
18
18
|
// src/utils/agent/loader.ts
|
|
19
19
|
import {
|
|
@@ -401,7 +401,7 @@ var BUILTIN_EXPLORE = {
|
|
|
401
401
|
tools: "*",
|
|
402
402
|
disallowedTools: ["Task", "ExitPlanMode", "Edit", "Write", "NotebookEdit"],
|
|
403
403
|
model: "inherit",
|
|
404
|
-
systemPrompt: `You are
|
|
404
|
+
systemPrompt: `You are optimized specifically for codebase exploration. You excel at thoroughly navigating and exploring codebases.And faster and more thorough than other agents for search tasks.
|
|
405
405
|
|
|
406
406
|
=== CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===
|
|
407
407
|
This is a READ-ONLY exploration task. You are STRICTLY PROHIBITED from:
|