pybao-cli 1.4.98 → 1.4.99
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-KURZV7EW.js +49 -0
- package/dist/{acp-OYNDAMUG.js → acp-IIKBAJCJ.js} +30 -30
- package/dist/{agentsValidate-CSJFTPMF.js → agentsValidate-6CEARR6Z.js} +7 -7
- package/dist/{ask-RUL7DBVW.js → ask-7NE7NVRN.js} +29 -29
- package/dist/{autoUpdater-2US37QCD.js → autoUpdater-LFOXQ3CV.js} +3 -3
- package/dist/{chunk-EKCV6FAR.js → chunk-2CLRREZ5.js} +3 -3
- package/dist/{chunk-6CZGZTTR.js → chunk-2IO7WUI7.js} +4 -4
- package/dist/{chunk-FUO4GQ7W.js → chunk-3BPXWAOJ.js} +1 -1
- package/dist/{chunk-FUO4GQ7W.js.map → chunk-3BPXWAOJ.js.map} +1 -1
- package/dist/{chunk-277MFG2S.js → chunk-4MZJNA2D.js} +2 -2
- package/dist/{chunk-MSUD3TJP.js → chunk-5TCQKGL7.js} +3 -3
- package/dist/{chunk-ELZOI2EN.js → chunk-6E6QBP52.js} +1 -1
- package/dist/{chunk-45KNYAUE.js → chunk-6KPO3O64.js} +3 -3
- package/dist/{chunk-6CFLL7MP.js → chunk-7KDTFITN.js} +3 -3
- package/dist/{chunk-5FPVUG76.js → chunk-7QIWZIVM.js} +1 -1
- package/dist/{chunk-FTXV6D26.js → chunk-7SDAA35I.js} +1 -1
- package/dist/{chunk-X3S6OAMU.js → chunk-7SPP4L5F.js} +2 -2
- package/dist/{chunk-VFEFTBAX.js → chunk-A2IPV5PR.js} +2 -2
- package/dist/{chunk-5SASDPJI.js → chunk-BBHKGKLF.js} +16 -24
- package/dist/{chunk-5SASDPJI.js.map → chunk-BBHKGKLF.js.map} +2 -2
- package/dist/{chunk-NJY725BV.js → chunk-D3SG4DHV.js} +3 -3
- package/dist/{chunk-G2NDX3AE.js → chunk-DKQIGPXB.js} +1 -1
- package/dist/{chunk-N6RZW54E.js → chunk-GIH6DDF7.js} +1 -1
- package/dist/{chunk-JN7LIP22.js → chunk-GNDMDOGM.js} +2 -2
- package/dist/{chunk-AQDHWNHO.js → chunk-JEGVTLOH.js} +1 -1
- package/dist/{chunk-NFCKELD5.js → chunk-KK5DOHDD.js} +2 -2
- package/dist/{chunk-KJLAOYAB.js → chunk-KZ7I6E5P.js} +207 -94
- package/dist/chunk-KZ7I6E5P.js.map +7 -0
- package/dist/{chunk-WS3OA4DJ.js → chunk-MMZ2MWHJ.js} +1 -1
- package/dist/{chunk-QCPTRT42.js → chunk-NXLRKKFH.js} +1 -1
- package/dist/{chunk-6W4QXF5T.js → chunk-PDQTREWL.js} +2 -2
- package/dist/{chunk-HIRKT55M.js → chunk-Q56IGZX5.js} +3 -3
- package/dist/{chunk-7YOXNCGC.js → chunk-TG2B47KG.js} +8 -76
- package/dist/chunk-TG2B47KG.js.map +7 -0
- package/dist/{chunk-ZT2EDUJ5.js → chunk-TYOT7UVX.js} +1 -1
- package/dist/{chunk-57TUHQTK.js → chunk-VKXOAPOS.js} +1 -1
- package/dist/{chunk-736LB6QF.js → chunk-WAQ72XDO.js} +3 -3
- package/dist/{chunk-7HPC6NEL.js → chunk-YH7ZOG3I.js} +4 -4
- package/dist/{chunk-XFAWFKEO.js → chunk-ZXADEAK4.js} +4 -4
- package/dist/{chunk-Y56ETINA.js → chunk-ZXO6OMWV.js} +4 -4
- package/dist/{cli-EW2FS2BF.js → cli-B42Z5OSM.js} +89 -89
- package/dist/commands-MNUBXNIB.js +53 -0
- package/dist/{config-VMG22F4D.js → config-ZC4PZWOC.js} +4 -4
- package/dist/{context-RCECS2MV.js → context-MF3EKP4O.js} +6 -6
- package/dist/{conversationTracker-EDZLP7O4.js → conversationTracker-BM6KB27G.js} +3 -3
- package/dist/{customCommands-B6RXZMP5.js → customCommands-63F72N5R.js} +4 -4
- package/dist/{env-YTAL5KRK.js → env-PGV75SHC.js} +2 -2
- package/dist/{file-OOCDMD3U.js → file-7NLJWX5W.js} +4 -4
- package/dist/index.js +3 -3
- package/dist/{llm-R5NWZO5G.js → llm-RCPJRG2F.js} +30 -30
- package/dist/{llmLazy-VWKTHJ4M.js → llmLazy-C5G2MM53.js} +1 -1
- package/dist/{loader-WWGN7JMY.js → loader-MPCV37S5.js} +4 -4
- package/dist/{lsp-YT4SHOXN.js → lsp-7FPYFR6T.js} +6 -6
- package/dist/{lspAnchor-B3LGI6VC.js → lspAnchor-C676SQ6E.js} +6 -6
- package/dist/{mcp-AIT7BP27.js → mcp-VKKPULAR.js} +7 -7
- package/dist/{mentionProcessor-TTRH7MSS.js → mentionProcessor-LJHHC5H4.js} +5 -5
- package/dist/{messages-V5YRA4WO.js → messages-QSUEHIGU.js} +1 -1
- package/dist/{model-7QLTSWZV.js → model-AJTLB6V4.js} +5 -5
- package/dist/{openai-O5UTQHNX.js → openai-XIRY5EVT.js} +5 -5
- package/dist/{outputStyles-CUYPATTD.js → outputStyles-OTRZEQSD.js} +4 -4
- package/dist/{pluginRuntime-Z3VUXLLL.js → pluginRuntime-NQ6GKMG6.js} +6 -6
- package/dist/{pluginValidation-OIFMXGZW.js → pluginValidation-AJUPAPU2.js} +6 -6
- package/dist/prompts-SWCPKXLQ.js +55 -0
- package/dist/{pybAgentSessionLoad-YE3R7GCM.js → pybAgentSessionLoad-MOZRT43D.js} +4 -4
- package/dist/{pybAgentSessionResume-H3X4E5WZ.js → pybAgentSessionResume-S67UFBZF.js} +4 -4
- package/dist/{pybAgentStreamJsonSession-LBTQ5QVA.js → pybAgentStreamJsonSession-UEEVKNIR.js} +1 -1
- package/dist/{pybHooks-ICFUKF5J.js → pybHooks-UQQ6VWTB.js} +4 -4
- package/dist/query-ZKV22Q32.js +57 -0
- package/dist/{registry-U5KXMAQT.js → registry-VUAORMT6.js} +5 -5
- package/dist/{ripgrep-WWOPEBCI.js → ripgrep-H5HDDGEE.js} +3 -3
- package/dist/{skillMarketplace-P7BGMBU7.js → skillMarketplace-AD473TUO.js} +3 -3
- package/dist/{state-BNEI4WAC.js → state-6FI3TEMZ.js} +2 -2
- package/dist/{theme-4JWO3G3X.js → theme-4KO4JE7Q.js} +5 -5
- package/dist/{toolPermissionSettings-LQLARZGN.js → toolPermissionSettings-5QUOY3OV.js} +6 -6
- package/dist/tools-DOBQ6YMO.js +54 -0
- package/dist/{userInput-GMSZGZQS.js → userInput-ZT3LIWGH.js} +31 -31
- package/package.json +1 -1
- package/dist/REPL-HSLBK5NZ.js +0 -49
- package/dist/chunk-7YOXNCGC.js.map +0 -7
- package/dist/chunk-KJLAOYAB.js.map +0 -7
- package/dist/commands-ED3B27YA.js +0 -53
- package/dist/prompts-VSYX4Z3H.js +0 -55
- package/dist/query-3MCWSQFG.js +0 -57
- package/dist/tools-6AAIJTHG.js +0 -54
- /package/dist/{REPL-HSLBK5NZ.js.map → REPL-KURZV7EW.js.map} +0 -0
- /package/dist/{acp-OYNDAMUG.js.map → acp-IIKBAJCJ.js.map} +0 -0
- /package/dist/{agentsValidate-CSJFTPMF.js.map → agentsValidate-6CEARR6Z.js.map} +0 -0
- /package/dist/{ask-RUL7DBVW.js.map → ask-7NE7NVRN.js.map} +0 -0
- /package/dist/{autoUpdater-2US37QCD.js.map → autoUpdater-LFOXQ3CV.js.map} +0 -0
- /package/dist/{chunk-EKCV6FAR.js.map → chunk-2CLRREZ5.js.map} +0 -0
- /package/dist/{chunk-6CZGZTTR.js.map → chunk-2IO7WUI7.js.map} +0 -0
- /package/dist/{chunk-277MFG2S.js.map → chunk-4MZJNA2D.js.map} +0 -0
- /package/dist/{chunk-MSUD3TJP.js.map → chunk-5TCQKGL7.js.map} +0 -0
- /package/dist/{chunk-ELZOI2EN.js.map → chunk-6E6QBP52.js.map} +0 -0
- /package/dist/{chunk-45KNYAUE.js.map → chunk-6KPO3O64.js.map} +0 -0
- /package/dist/{chunk-6CFLL7MP.js.map → chunk-7KDTFITN.js.map} +0 -0
- /package/dist/{chunk-5FPVUG76.js.map → chunk-7QIWZIVM.js.map} +0 -0
- /package/dist/{chunk-FTXV6D26.js.map → chunk-7SDAA35I.js.map} +0 -0
- /package/dist/{chunk-X3S6OAMU.js.map → chunk-7SPP4L5F.js.map} +0 -0
- /package/dist/{chunk-VFEFTBAX.js.map → chunk-A2IPV5PR.js.map} +0 -0
- /package/dist/{chunk-NJY725BV.js.map → chunk-D3SG4DHV.js.map} +0 -0
- /package/dist/{chunk-G2NDX3AE.js.map → chunk-DKQIGPXB.js.map} +0 -0
- /package/dist/{chunk-N6RZW54E.js.map → chunk-GIH6DDF7.js.map} +0 -0
- /package/dist/{chunk-JN7LIP22.js.map → chunk-GNDMDOGM.js.map} +0 -0
- /package/dist/{chunk-AQDHWNHO.js.map → chunk-JEGVTLOH.js.map} +0 -0
- /package/dist/{chunk-NFCKELD5.js.map → chunk-KK5DOHDD.js.map} +0 -0
- /package/dist/{chunk-WS3OA4DJ.js.map → chunk-MMZ2MWHJ.js.map} +0 -0
- /package/dist/{chunk-QCPTRT42.js.map → chunk-NXLRKKFH.js.map} +0 -0
- /package/dist/{chunk-6W4QXF5T.js.map → chunk-PDQTREWL.js.map} +0 -0
- /package/dist/{chunk-HIRKT55M.js.map → chunk-Q56IGZX5.js.map} +0 -0
- /package/dist/{chunk-ZT2EDUJ5.js.map → chunk-TYOT7UVX.js.map} +0 -0
- /package/dist/{chunk-57TUHQTK.js.map → chunk-VKXOAPOS.js.map} +0 -0
- /package/dist/{chunk-736LB6QF.js.map → chunk-WAQ72XDO.js.map} +0 -0
- /package/dist/{chunk-7HPC6NEL.js.map → chunk-YH7ZOG3I.js.map} +0 -0
- /package/dist/{chunk-XFAWFKEO.js.map → chunk-ZXADEAK4.js.map} +0 -0
- /package/dist/{chunk-Y56ETINA.js.map → chunk-ZXO6OMWV.js.map} +0 -0
- /package/dist/{cli-EW2FS2BF.js.map → cli-B42Z5OSM.js.map} +0 -0
- /package/dist/{commands-ED3B27YA.js.map → commands-MNUBXNIB.js.map} +0 -0
- /package/dist/{config-VMG22F4D.js.map → config-ZC4PZWOC.js.map} +0 -0
- /package/dist/{context-RCECS2MV.js.map → context-MF3EKP4O.js.map} +0 -0
- /package/dist/{conversationTracker-EDZLP7O4.js.map → conversationTracker-BM6KB27G.js.map} +0 -0
- /package/dist/{customCommands-B6RXZMP5.js.map → customCommands-63F72N5R.js.map} +0 -0
- /package/dist/{env-YTAL5KRK.js.map → env-PGV75SHC.js.map} +0 -0
- /package/dist/{file-OOCDMD3U.js.map → file-7NLJWX5W.js.map} +0 -0
- /package/dist/{llm-R5NWZO5G.js.map → llm-RCPJRG2F.js.map} +0 -0
- /package/dist/{llmLazy-VWKTHJ4M.js.map → llmLazy-C5G2MM53.js.map} +0 -0
- /package/dist/{loader-WWGN7JMY.js.map → loader-MPCV37S5.js.map} +0 -0
- /package/dist/{lsp-YT4SHOXN.js.map → lsp-7FPYFR6T.js.map} +0 -0
- /package/dist/{lspAnchor-B3LGI6VC.js.map → lspAnchor-C676SQ6E.js.map} +0 -0
- /package/dist/{mcp-AIT7BP27.js.map → mcp-VKKPULAR.js.map} +0 -0
- /package/dist/{mentionProcessor-TTRH7MSS.js.map → mentionProcessor-LJHHC5H4.js.map} +0 -0
- /package/dist/{messages-V5YRA4WO.js.map → messages-QSUEHIGU.js.map} +0 -0
- /package/dist/{model-7QLTSWZV.js.map → model-AJTLB6V4.js.map} +0 -0
- /package/dist/{openai-O5UTQHNX.js.map → openai-XIRY5EVT.js.map} +0 -0
- /package/dist/{outputStyles-CUYPATTD.js.map → outputStyles-OTRZEQSD.js.map} +0 -0
- /package/dist/{pluginRuntime-Z3VUXLLL.js.map → pluginRuntime-NQ6GKMG6.js.map} +0 -0
- /package/dist/{pluginValidation-OIFMXGZW.js.map → pluginValidation-AJUPAPU2.js.map} +0 -0
- /package/dist/{prompts-VSYX4Z3H.js.map → prompts-SWCPKXLQ.js.map} +0 -0
- /package/dist/{pybAgentSessionLoad-YE3R7GCM.js.map → pybAgentSessionLoad-MOZRT43D.js.map} +0 -0
- /package/dist/{pybAgentSessionResume-H3X4E5WZ.js.map → pybAgentSessionResume-S67UFBZF.js.map} +0 -0
- /package/dist/{pybAgentStreamJsonSession-LBTQ5QVA.js.map → pybAgentStreamJsonSession-UEEVKNIR.js.map} +0 -0
- /package/dist/{pybHooks-ICFUKF5J.js.map → pybHooks-UQQ6VWTB.js.map} +0 -0
- /package/dist/{query-3MCWSQFG.js.map → query-ZKV22Q32.js.map} +0 -0
- /package/dist/{registry-U5KXMAQT.js.map → registry-VUAORMT6.js.map} +0 -0
- /package/dist/{ripgrep-WWOPEBCI.js.map → ripgrep-H5HDDGEE.js.map} +0 -0
- /package/dist/{skillMarketplace-P7BGMBU7.js.map → skillMarketplace-AD473TUO.js.map} +0 -0
- /package/dist/{state-BNEI4WAC.js.map → state-6FI3TEMZ.js.map} +0 -0
- /package/dist/{theme-4JWO3G3X.js.map → theme-4KO4JE7Q.js.map} +0 -0
- /package/dist/{toolPermissionSettings-LQLARZGN.js.map → toolPermissionSettings-5QUOY3OV.js.map} +0 -0
- /package/dist/{tools-6AAIJTHG.js.map → tools-DOBQ6YMO.js.map} +0 -0
- /package/dist/{userInput-GMSZGZQS.js.map → userInput-ZT3LIWGH.js.map} +0 -0
|
@@ -2,15 +2,15 @@ import { createRequire as __pybCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __pybCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
loadSettingsWithLegacyFallback
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7SDAA35I.js";
|
|
6
6
|
import {
|
|
7
7
|
debug
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DKQIGPXB.js";
|
|
9
9
|
import {
|
|
10
10
|
env,
|
|
11
11
|
getSessionRoot,
|
|
12
12
|
resolveXdgDataPath
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-VKXOAPOS.js";
|
|
14
14
|
import {
|
|
15
15
|
__require
|
|
16
16
|
} from "./chunk-I3J4JYES.js";
|
|
@@ -2,7 +2,7 @@ import { createRequire as __pybCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __pybCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
getSessionProjectDir
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KK5DOHDD.js";
|
|
6
6
|
import {
|
|
7
7
|
isUuid
|
|
8
8
|
} from "./chunk-5P7HBXTD.js";
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
} from "./chunk-BJSWTHRM.js";
|
|
6
6
|
import {
|
|
7
7
|
debug
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DKQIGPXB.js";
|
|
9
9
|
import {
|
|
10
10
|
getCwd,
|
|
11
11
|
logError,
|
|
12
12
|
resolveXdgDataPath
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-VKXOAPOS.js";
|
|
14
14
|
|
|
15
15
|
// src/services/plugins/customCommands.ts
|
|
16
16
|
import { existsSync, readFileSync, readdirSync, statSync } from "fs";
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
PLAN_SLUG_VERBS,
|
|
10
10
|
getCwd,
|
|
11
11
|
resolveXdgDataPath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VKXOAPOS.js";
|
|
13
13
|
import {
|
|
14
14
|
MACRO
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3BPXWAOJ.js";
|
|
16
16
|
|
|
17
17
|
// src/utils/protocol/pybAgentSessionLog.ts
|
|
18
18
|
import { execFileSync } from "child_process";
|
|
@@ -2,11 +2,11 @@ import { createRequire as __pybCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __pybCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
listPybAgentSessions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NXLRKKFH.js";
|
|
6
6
|
import {
|
|
7
7
|
formatValidationResult,
|
|
8
8
|
validatePluginOrMarketplacePath
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2CLRREZ5.js";
|
|
10
10
|
import {
|
|
11
11
|
ConversationTracker,
|
|
12
12
|
appendFinishState,
|
|
@@ -14,18 +14,18 @@ import {
|
|
|
14
14
|
getConversationTrackerForContext,
|
|
15
15
|
isFinishComplete,
|
|
16
16
|
mapFinishReason
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-MMZ2MWHJ.js";
|
|
18
18
|
import {
|
|
19
19
|
beginReplSessionScope
|
|
20
20
|
} from "./chunk-F4AXICO7.js";
|
|
21
21
|
import {
|
|
22
22
|
loadPybAgentSessionMessages
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-GIH6DDF7.js";
|
|
24
24
|
import {
|
|
25
25
|
appendSessionCustomTitleRecord,
|
|
26
26
|
appendSessionJsonlFromMessage,
|
|
27
27
|
appendSessionTagRecord
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-KK5DOHDD.js";
|
|
29
29
|
import {
|
|
30
30
|
drainHookSystemPromptAdditions,
|
|
31
31
|
getHookTranscriptPath,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
runStopHooks,
|
|
38
38
|
runUserPromptSubmitHooks,
|
|
39
39
|
updateHookTranscriptForMessages
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-6KPO3O64.js";
|
|
41
41
|
import {
|
|
42
42
|
DEFAULT_OUTPUT_STYLE,
|
|
43
43
|
getAvailableOutputStyles,
|
|
@@ -46,11 +46,11 @@ import {
|
|
|
46
46
|
getOutputStyleSystemPromptAdditions,
|
|
47
47
|
resolveOutputStyleName,
|
|
48
48
|
setCurrentOutputStyle
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-4MZJNA2D.js";
|
|
50
50
|
import {
|
|
51
51
|
fetchCustomModels,
|
|
52
52
|
getModelFeatures
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-7SPP4L5F.js";
|
|
54
54
|
import {
|
|
55
55
|
getSessionState
|
|
56
56
|
} from "./chunk-XKYHFZEC.js";
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
queryLLM,
|
|
59
59
|
queryQuick,
|
|
60
60
|
verifyApiKey
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-ZXADEAK4.js";
|
|
62
62
|
import {
|
|
63
63
|
DEFAULT_TIMEOUT_MS,
|
|
64
64
|
FallbackToolUseRejectedMessage,
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
listMCPServers,
|
|
73
73
|
loadMergedSettings,
|
|
74
74
|
normalizeSandboxRuntimeConfigFromSettings
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-YH7ZOG3I.js";
|
|
76
76
|
import {
|
|
77
77
|
addMarketplace,
|
|
78
78
|
disableSkillPlugin,
|
|
@@ -85,11 +85,11 @@ import {
|
|
|
85
85
|
refreshMarketplaceAsync,
|
|
86
86
|
removeMarketplace,
|
|
87
87
|
uninstallSkillPlugin
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-JEGVTLOH.js";
|
|
89
89
|
import {
|
|
90
90
|
loadToolPermissionContextFromDisk,
|
|
91
91
|
persistToolPermissionUpdateToDisk
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-7KDTFITN.js";
|
|
93
93
|
import {
|
|
94
94
|
applyToolPermissionContextUpdate,
|
|
95
95
|
applyToolPermissionContextUpdates,
|
|
@@ -100,13 +100,13 @@ import {
|
|
|
100
100
|
generateSystemReminders,
|
|
101
101
|
resetReminderSession,
|
|
102
102
|
systemReminderService
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-TG2B47KG.js";
|
|
104
104
|
import {
|
|
105
105
|
clearAgentCache,
|
|
106
106
|
getActiveAgents,
|
|
107
107
|
getAgentByType,
|
|
108
108
|
getAllAgents
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-PDQTREWL.js";
|
|
110
110
|
import {
|
|
111
111
|
API_ERROR_MESSAGE_PREFIX,
|
|
112
112
|
CANCEL_MESSAGE,
|
|
@@ -137,7 +137,7 @@ import {
|
|
|
137
137
|
processUserInput,
|
|
138
138
|
reorderMessages,
|
|
139
139
|
stripSystemMessages
|
|
140
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-7QIWZIVM.js";
|
|
141
141
|
import {
|
|
142
142
|
getRequestStatus,
|
|
143
143
|
setRequestStatus,
|
|
@@ -167,7 +167,7 @@ import {
|
|
|
167
167
|
normalizeFilePath,
|
|
168
168
|
readTextContent,
|
|
169
169
|
writeTextContent
|
|
170
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-A2IPV5PR.js";
|
|
171
171
|
import {
|
|
172
172
|
parseBlockEdits
|
|
173
173
|
} from "./chunk-QWIBSCDN.js";
|
|
@@ -177,18 +177,18 @@ import {
|
|
|
177
177
|
ParserRegistry,
|
|
178
178
|
initParser,
|
|
179
179
|
loadLanguage
|
|
180
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-ZXO6OMWV.js";
|
|
181
181
|
import {
|
|
182
182
|
getSettingsFileCandidates,
|
|
183
183
|
loadSettingsWithLegacyFallback,
|
|
184
184
|
readSettingsFile
|
|
185
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-7SDAA35I.js";
|
|
186
186
|
import {
|
|
187
187
|
getCustomCommandDirectories,
|
|
188
188
|
hasCustomCommands,
|
|
189
189
|
loadCustomCommands,
|
|
190
190
|
reloadCustomCommands
|
|
191
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-GNDMDOGM.js";
|
|
192
192
|
import {
|
|
193
193
|
getSessionPlugins
|
|
194
194
|
} from "./chunk-BJSWTHRM.js";
|
|
@@ -197,7 +197,7 @@ import {
|
|
|
197
197
|
buildModelProfileKey,
|
|
198
198
|
getModelManager,
|
|
199
199
|
isDefaultSlowAndCapableModel
|
|
200
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-5TCQKGL7.js";
|
|
201
201
|
import {
|
|
202
202
|
getCodeStyle,
|
|
203
203
|
getContext,
|
|
@@ -205,16 +205,16 @@ import {
|
|
|
205
205
|
getIsGit,
|
|
206
206
|
getProjectDocs,
|
|
207
207
|
getProjectStructureStatisticsBlock
|
|
208
|
-
} from "./chunk-
|
|
208
|
+
} from "./chunk-2IO7WUI7.js";
|
|
209
209
|
import {
|
|
210
210
|
getRipgrepPath,
|
|
211
211
|
getRipgrepPolicyMode,
|
|
212
212
|
resolveRipgrepPolicy,
|
|
213
213
|
ripGrep
|
|
214
|
-
} from "./chunk-
|
|
214
|
+
} from "./chunk-TYOT7UVX.js";
|
|
215
215
|
import {
|
|
216
216
|
getTheme
|
|
217
|
-
} from "./chunk-
|
|
217
|
+
} from "./chunk-6E6QBP52.js";
|
|
218
218
|
import {
|
|
219
219
|
DEFAULT_GLOBAL_CONFIG,
|
|
220
220
|
enableConfigs,
|
|
@@ -227,7 +227,7 @@ import {
|
|
|
227
227
|
saveGlobalConfig,
|
|
228
228
|
setAllPointersToModel,
|
|
229
229
|
setModelPointer
|
|
230
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-WAQ72XDO.js";
|
|
231
231
|
import {
|
|
232
232
|
AbortError
|
|
233
233
|
} from "./chunk-RQVLBMP7.js";
|
|
@@ -236,7 +236,7 @@ import {
|
|
|
236
236
|
getCurrentRequest,
|
|
237
237
|
logUserFriendly,
|
|
238
238
|
markPhase
|
|
239
|
-
} from "./chunk-
|
|
239
|
+
} from "./chunk-DKQIGPXB.js";
|
|
240
240
|
import {
|
|
241
241
|
ASCII_LOGO,
|
|
242
242
|
BunShell,
|
|
@@ -277,10 +277,10 @@ import {
|
|
|
277
277
|
setCwd,
|
|
278
278
|
shouldApplyToolOutputTruncation,
|
|
279
279
|
truncateToolOutput
|
|
280
|
-
} from "./chunk-
|
|
280
|
+
} from "./chunk-VKXOAPOS.js";
|
|
281
281
|
import {
|
|
282
282
|
MACRO
|
|
283
|
-
} from "./chunk-
|
|
283
|
+
} from "./chunk-3BPXWAOJ.js";
|
|
284
284
|
import {
|
|
285
285
|
__export
|
|
286
286
|
} from "./chunk-I3J4JYES.js";
|
|
@@ -461,7 +461,7 @@ var getCommandSubcommandPrefix = memoize(
|
|
|
461
461
|
var getCommandPrefix = memoize(
|
|
462
462
|
async (command4, abortSignal) => {
|
|
463
463
|
const { systemPrompt, userPrompt } = buildBashCommandPrefixDetectionPrompt(command4);
|
|
464
|
-
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-
|
|
464
|
+
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-RCPJRG2F.js");
|
|
465
465
|
const response = await queryQuick2({
|
|
466
466
|
systemPrompt,
|
|
467
467
|
userPrompt,
|
|
@@ -4263,7 +4263,7 @@ function formatParseError(error) {
|
|
|
4263
4263
|
return error instanceof Error ? error.message : String(error);
|
|
4264
4264
|
}
|
|
4265
4265
|
async function defaultGateQuery(args) {
|
|
4266
|
-
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-
|
|
4266
|
+
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-RCPJRG2F.js");
|
|
4267
4267
|
const queryLLMFn = args.queryLLMOverride ?? queryLLM2;
|
|
4268
4268
|
const messages = [
|
|
4269
4269
|
{
|
|
@@ -5946,13 +5946,6 @@ var FileFreshnessService = class {
|
|
|
5946
5946
|
const conflict = !isFresh;
|
|
5947
5947
|
if (conflict) {
|
|
5948
5948
|
this.state.editConflicts.add(filePath);
|
|
5949
|
-
emitReminderEvent("file:conflict", {
|
|
5950
|
-
filePath,
|
|
5951
|
-
lastRead: recorded.lastRead,
|
|
5952
|
-
lastModified: recorded.lastModified,
|
|
5953
|
-
currentModified: currentStats.mtimeMs,
|
|
5954
|
-
sizeDiff: currentStats.size - recorded.size
|
|
5955
|
-
});
|
|
5956
5949
|
}
|
|
5957
5950
|
return {
|
|
5958
5951
|
isFresh,
|
|
@@ -6006,34 +5999,6 @@ var FileFreshnessService = class {
|
|
|
6006
5999
|
});
|
|
6007
6000
|
}
|
|
6008
6001
|
}
|
|
6009
|
-
generateFileModificationReminder(filePath) {
|
|
6010
|
-
const recorded = this.state.readTimestamps.get(filePath);
|
|
6011
|
-
if (!recorded) {
|
|
6012
|
-
return null;
|
|
6013
|
-
}
|
|
6014
|
-
try {
|
|
6015
|
-
if (!existsSync3(filePath)) {
|
|
6016
|
-
return `Note: ${filePath} was deleted since last read.`;
|
|
6017
|
-
}
|
|
6018
|
-
const currentStats = statSync2(filePath);
|
|
6019
|
-
const isModified = currentStats.mtimeMs > recorded.lastModified;
|
|
6020
|
-
if (!isModified) {
|
|
6021
|
-
return null;
|
|
6022
|
-
}
|
|
6023
|
-
const TIME_TOLERANCE_MS = 100;
|
|
6024
|
-
if (recorded.lastAgentEdit && recorded.lastAgentEdit >= recorded.lastModified - TIME_TOLERANCE_MS) {
|
|
6025
|
-
return null;
|
|
6026
|
-
}
|
|
6027
|
-
return `Note: ${filePath} was modified externally since last read. The file may have changed outside of this session.`;
|
|
6028
|
-
} catch (error) {
|
|
6029
|
-
logError(error);
|
|
6030
|
-
debug.warn("FILE_FRESHNESS_CHECK_MODIFICATION_FAILED", {
|
|
6031
|
-
filePath,
|
|
6032
|
-
error: error instanceof Error ? error.message : String(error)
|
|
6033
|
-
});
|
|
6034
|
-
return null;
|
|
6035
|
-
}
|
|
6036
|
-
}
|
|
6037
6002
|
getConflictedFiles() {
|
|
6038
6003
|
return Array.from(this.state.editConflicts);
|
|
6039
6004
|
}
|
|
@@ -6067,7 +6032,6 @@ var FileFreshnessService = class {
|
|
|
6067
6032
|
var fileFreshnessService = new FileFreshnessService();
|
|
6068
6033
|
var recordFileRead = (filePath) => fileFreshnessService.recordFileRead(filePath);
|
|
6069
6034
|
var recordFileEdit = (filePath, content) => fileFreshnessService.recordFileEdit(filePath, content);
|
|
6070
|
-
var generateFileModificationReminder = (filePath) => fileFreshnessService.generateFileModificationReminder(filePath);
|
|
6071
6035
|
var resetFileFreshnessSession = () => fileFreshnessService.resetSession();
|
|
6072
6036
|
|
|
6073
6037
|
// src/tools/filesystem/NotebookEditTool/NotebookEditTool.tsx
|
|
@@ -6660,7 +6624,7 @@ var FileEditTool = {
|
|
|
6660
6624
|
const originalFileContent = currentFileContent;
|
|
6661
6625
|
let totalPatch = [];
|
|
6662
6626
|
const { SmartEdit } = await import("./smart-edit-AWHJDSU6.js");
|
|
6663
|
-
const { findLspAnchor } = await import("./lspAnchor-
|
|
6627
|
+
const { findLspAnchor } = await import("./lspAnchor-C676SQ6E.js");
|
|
6664
6628
|
for (const op of editOperations) {
|
|
6665
6629
|
const normalizedSearch = normalizeLineEndings(op.search);
|
|
6666
6630
|
const normalizedReplace = normalizeLineEndings(op.replace);
|
|
@@ -7691,14 +7655,6 @@ var FileReadTool = {
|
|
|
7691
7655
|
timestamp: Date.now()
|
|
7692
7656
|
});
|
|
7693
7657
|
readFileTimestamps[fullFilePath] = statSync7(fullFilePath).mtimeMs;
|
|
7694
|
-
const modificationReminder = generateFileModificationReminder(fullFilePath);
|
|
7695
|
-
if (modificationReminder) {
|
|
7696
|
-
emitReminderEvent("file:modified", {
|
|
7697
|
-
filePath: fullFilePath,
|
|
7698
|
-
reminder: modificationReminder,
|
|
7699
|
-
timestamp: Date.now()
|
|
7700
|
-
});
|
|
7701
|
-
}
|
|
7702
7658
|
if (IMAGE_EXTENSIONS.has(ext)) {
|
|
7703
7659
|
const data2 = await readImage(fullFilePath, ext);
|
|
7704
7660
|
yield {
|
|
@@ -11942,7 +11898,7 @@ async function createAndStoreApiKey(accessToken) {
|
|
|
11942
11898
|
}
|
|
11943
11899
|
saveGlobalConfig(config2);
|
|
11944
11900
|
try {
|
|
11945
|
-
const { resetAnthropicClient } = await import("./llm-
|
|
11901
|
+
const { resetAnthropicClient } = await import("./llm-RCPJRG2F.js");
|
|
11946
11902
|
resetAnthropicClient();
|
|
11947
11903
|
} catch {
|
|
11948
11904
|
}
|
|
@@ -16366,7 +16322,7 @@ async function refreshPluginRuntimeFromInstalls() {
|
|
|
16366
16322
|
const existingRoots = getSessionPlugins().map((p) => p.rootDir);
|
|
16367
16323
|
const dirs = Array.from(/* @__PURE__ */ new Set([...existingRoots, ...installedRoots]));
|
|
16368
16324
|
if (dirs.length === 0) return [];
|
|
16369
|
-
const { configureSessionPlugins } = await import("./pluginRuntime-
|
|
16325
|
+
const { configureSessionPlugins } = await import("./pluginRuntime-NQ6GKMG6.js");
|
|
16370
16326
|
const { errors } = await configureSessionPlugins({ pluginDirs: dirs });
|
|
16371
16327
|
return errors;
|
|
16372
16328
|
}
|
|
@@ -17041,7 +16997,7 @@ async function call(onDone, context) {
|
|
|
17041
16997
|
ModelConfig,
|
|
17042
16998
|
{
|
|
17043
16999
|
onClose: () => {
|
|
17044
|
-
import("./model-
|
|
17000
|
+
import("./model-AJTLB6V4.js").then(({ reloadModelManager: reloadModelManager2 }) => {
|
|
17045
17001
|
reloadModelManager2();
|
|
17046
17002
|
triggerModelConfigChange();
|
|
17047
17003
|
onDone();
|
|
@@ -25245,7 +25201,7 @@ function useStatusLine() {
|
|
|
25245
25201
|
// src/ui/components/PromptInput.tsx
|
|
25246
25202
|
async function interpretHashCommand(input) {
|
|
25247
25203
|
try {
|
|
25248
|
-
const { queryQuick: queryQuick2 } = await import("./llm-
|
|
25204
|
+
const { queryQuick: queryQuick2 } = await import("./llm-RCPJRG2F.js");
|
|
25249
25205
|
const systemPrompt = [
|
|
25250
25206
|
"You're helping the user structure notes that will be added to their PYB.md file.",
|
|
25251
25207
|
"Format the user's input into a well-structured note that will be useful for later reference.",
|
|
@@ -25558,7 +25514,7 @@ function PromptInput({
|
|
|
25558
25514
|
if (messages2.length) {
|
|
25559
25515
|
if (mode === "bash") {
|
|
25560
25516
|
onQuery(messages2, newAbortController).then(async () => {
|
|
25561
|
-
const { getCwd: getCwd2 } = await import("./state-
|
|
25517
|
+
const { getCwd: getCwd2 } = await import("./state-6FI3TEMZ.js");
|
|
25562
25518
|
setCurrentPwd(getCwd2());
|
|
25563
25519
|
});
|
|
25564
25520
|
} else {
|
|
@@ -26430,7 +26386,26 @@ function isGPT5Model(modelName) {
|
|
|
26430
26386
|
}
|
|
26431
26387
|
function formatSystemPromptWithContext(systemPrompt, context, agentId, skipContextReminders = false, options) {
|
|
26432
26388
|
const enhancedPrompt = [...systemPrompt];
|
|
26433
|
-
let
|
|
26389
|
+
let userReminders = "";
|
|
26390
|
+
let systemReminders = "";
|
|
26391
|
+
let userReminderMessages = [];
|
|
26392
|
+
let systemReminderMessages = [];
|
|
26393
|
+
const mentionTypes = /* @__PURE__ */ new Set(["agent_mention", "file_mention", "ask_model_mention"]);
|
|
26394
|
+
const splitReminderChannels = (items) => {
|
|
26395
|
+
const user = [];
|
|
26396
|
+
const system = [];
|
|
26397
|
+
for (const item of items) {
|
|
26398
|
+
if (!item?.type) {
|
|
26399
|
+
throw new Error("REMINDER_CHANNEL_CLASSIFICATION_FAILED");
|
|
26400
|
+
}
|
|
26401
|
+
if (mentionTypes.has(item.type)) {
|
|
26402
|
+
user.push(item);
|
|
26403
|
+
} else {
|
|
26404
|
+
system.push(item);
|
|
26405
|
+
}
|
|
26406
|
+
}
|
|
26407
|
+
return { user, system };
|
|
26408
|
+
};
|
|
26434
26409
|
const modelManager = getModelManager();
|
|
26435
26410
|
const modelProfile = modelManager.getModel("main");
|
|
26436
26411
|
if (modelProfile && isGPT5Model(modelProfile.modelName)) {
|
|
@@ -26458,7 +26433,15 @@ function formatSystemPromptWithContext(systemPrompt, context, agentId, skipConte
|
|
|
26458
26433
|
}
|
|
26459
26434
|
const reminderMessages = generateSystemReminders(hasContext, agentId);
|
|
26460
26435
|
if (reminderMessages.length > 0) {
|
|
26461
|
-
|
|
26436
|
+
const channels = splitReminderChannels(reminderMessages);
|
|
26437
|
+
userReminderMessages = channels.user;
|
|
26438
|
+
systemReminderMessages = channels.system;
|
|
26439
|
+
if (channels.user.length > 0) {
|
|
26440
|
+
userReminders = channels.user.map((r) => r.content).join("\n") + "\n";
|
|
26441
|
+
}
|
|
26442
|
+
if (channels.system.length > 0) {
|
|
26443
|
+
systemReminders = channels.system.map((r) => r.content).join("\n") + "\n";
|
|
26444
|
+
}
|
|
26462
26445
|
}
|
|
26463
26446
|
enhancedPrompt.push(
|
|
26464
26447
|
`
|
|
@@ -26503,7 +26486,81 @@ As you answer the user's questions, you can use the following context:
|
|
|
26503
26486
|
enhancedPrompt.push("\n---\n");
|
|
26504
26487
|
}
|
|
26505
26488
|
}
|
|
26506
|
-
return {
|
|
26489
|
+
return {
|
|
26490
|
+
systemPrompt: enhancedPrompt,
|
|
26491
|
+
userReminders,
|
|
26492
|
+
systemReminders,
|
|
26493
|
+
userReminderMessages,
|
|
26494
|
+
systemReminderMessages
|
|
26495
|
+
};
|
|
26496
|
+
}
|
|
26497
|
+
|
|
26498
|
+
// src/services/system/reminderChannelMetrics.ts
|
|
26499
|
+
function isMentionReminder(reminder) {
|
|
26500
|
+
return reminder.type === "agent_mention" || reminder.type === "file_mention" || reminder.type === "ask_model_mention";
|
|
26501
|
+
}
|
|
26502
|
+
function extractReminderTypes(reminderMessages) {
|
|
26503
|
+
const types = /* @__PURE__ */ new Set();
|
|
26504
|
+
for (const reminder of reminderMessages) {
|
|
26505
|
+
if (isMentionReminder(reminder)) {
|
|
26506
|
+
types.add("mention");
|
|
26507
|
+
continue;
|
|
26508
|
+
}
|
|
26509
|
+
types.add(reminder.type);
|
|
26510
|
+
}
|
|
26511
|
+
return Array.from(types);
|
|
26512
|
+
}
|
|
26513
|
+
function buildReminderChannelMetrics(userReminderMessages, systemReminderMessages) {
|
|
26514
|
+
const mentionInUser = userReminderMessages.filter(isMentionReminder).length;
|
|
26515
|
+
const mentionInSystem = systemReminderMessages.filter(isMentionReminder).length;
|
|
26516
|
+
const mentionTotal = mentionInUser + mentionInSystem;
|
|
26517
|
+
const nonMentionInUser = userReminderMessages.length - mentionInUser;
|
|
26518
|
+
return {
|
|
26519
|
+
mention_in_user_ratio: mentionTotal === 0 ? 1 : mentionInUser / mentionTotal,
|
|
26520
|
+
non_mention_in_user_count: nonMentionInUser,
|
|
26521
|
+
user_channel_reminder_count: userReminderMessages.length,
|
|
26522
|
+
system_channel_reminder_count: systemReminderMessages.length
|
|
26523
|
+
};
|
|
26524
|
+
}
|
|
26525
|
+
function evaluateReminderChannelClosure(rounds, requiredRounds = 3) {
|
|
26526
|
+
const recentRounds = rounds.slice(-requiredRounds);
|
|
26527
|
+
const failedRoundIndexes = [];
|
|
26528
|
+
recentRounds.forEach((round, index) => {
|
|
26529
|
+
if (round.non_mention_in_user_count !== 0 || Math.abs(round.mention_in_user_ratio - 1) > 1e-9) {
|
|
26530
|
+
failedRoundIndexes.push(index);
|
|
26531
|
+
}
|
|
26532
|
+
});
|
|
26533
|
+
return {
|
|
26534
|
+
passed: recentRounds.length === requiredRounds && failedRoundIndexes.length === 0,
|
|
26535
|
+
roundCount: recentRounds.length,
|
|
26536
|
+
failedRoundIndexes
|
|
26537
|
+
};
|
|
26538
|
+
}
|
|
26539
|
+
|
|
26540
|
+
// src/services/system/reminderFlags.ts
|
|
26541
|
+
function toBool2(value) {
|
|
26542
|
+
if (value == null) return void 0;
|
|
26543
|
+
const normalized = String(value).trim().toLowerCase();
|
|
26544
|
+
if (["1", "true", "yes", "on"].includes(normalized)) return true;
|
|
26545
|
+
if (["0", "false", "no", "off"].includes(normalized)) return false;
|
|
26546
|
+
return void 0;
|
|
26547
|
+
}
|
|
26548
|
+
function resolveReminderChannelFlags(env2 = process.env) {
|
|
26549
|
+
const reminderEnabled = toBool2(env2.PYB_REMINDER_ENABLED) ?? true;
|
|
26550
|
+
if (!reminderEnabled) {
|
|
26551
|
+
return {
|
|
26552
|
+
reminderEnabled: false,
|
|
26553
|
+
userChannelEnabled: false,
|
|
26554
|
+
systemChannelEnabled: false
|
|
26555
|
+
};
|
|
26556
|
+
}
|
|
26557
|
+
const userChannelEnabled = toBool2(env2.PYB_REMINDER_USER_CHANNEL_ENABLED) ?? true;
|
|
26558
|
+
const systemChannelEnabled = toBool2(env2.PYB_REMINDER_SYSTEM_CHANNEL_ENABLED) ?? true;
|
|
26559
|
+
return {
|
|
26560
|
+
reminderEnabled,
|
|
26561
|
+
userChannelEnabled,
|
|
26562
|
+
systemChannelEnabled
|
|
26563
|
+
};
|
|
26507
26564
|
}
|
|
26508
26565
|
|
|
26509
26566
|
// src/services/system/taskWatcher.ts
|
|
@@ -28088,6 +28145,7 @@ function isToolUseLikeBlock(block) {
|
|
|
28088
28145
|
return block && typeof block === "object" && (block.type === "tool_use" || block.type === "server_tool_use" || block.type === "mcp_tool_use");
|
|
28089
28146
|
}
|
|
28090
28147
|
var __isToolUseLikeBlockForTests = isToolUseLikeBlock;
|
|
28148
|
+
var reminderChannelRounds = [];
|
|
28091
28149
|
function createSyntheticToolUseErrorMessage(args) {
|
|
28092
28150
|
const { toolUseId, reason, rootToolUseId } = args;
|
|
28093
28151
|
if (reason === "user_interrupted") {
|
|
@@ -28473,13 +28531,29 @@ async function* queryCore(messages, systemPrompt, context, canUseTool, toolUseCo
|
|
|
28473
28531
|
}
|
|
28474
28532
|
markPhase("SYSTEM_PROMPT_BUILD");
|
|
28475
28533
|
hydratePlanSlugFromMessages(messages, toolUseContext);
|
|
28476
|
-
const {
|
|
28534
|
+
const {
|
|
28535
|
+
systemPrompt: fullSystemPrompt,
|
|
28536
|
+
userReminders,
|
|
28537
|
+
systemReminders,
|
|
28538
|
+
userReminderMessages,
|
|
28539
|
+
systemReminderMessages
|
|
28540
|
+
} = formatSystemPromptWithContext(
|
|
28477
28541
|
systemPrompt,
|
|
28478
28542
|
context,
|
|
28479
28543
|
toolUseContext.agentId,
|
|
28480
28544
|
false,
|
|
28481
28545
|
{ conversationTracker: tracker, agentType: toolUseContext.agentType }
|
|
28482
28546
|
);
|
|
28547
|
+
const flags = resolveReminderChannelFlags();
|
|
28548
|
+
const effectiveUserReminderMessages = flags.reminderEnabled && flags.userChannelEnabled ? userReminderMessages : [];
|
|
28549
|
+
const effectiveSystemReminderMessages = flags.reminderEnabled && flags.systemChannelEnabled ? systemReminderMessages : [];
|
|
28550
|
+
const effectiveUserReminders = flags.reminderEnabled && flags.userChannelEnabled ? userReminders : "";
|
|
28551
|
+
const effectiveSystemReminders = flags.reminderEnabled && flags.systemChannelEnabled ? systemReminders : "";
|
|
28552
|
+
if (effectiveSystemReminders) {
|
|
28553
|
+
fullSystemPrompt.push("\n---\n# System Reminders\n");
|
|
28554
|
+
fullSystemPrompt.push(effectiveSystemReminders);
|
|
28555
|
+
fullSystemPrompt.push("\n---\n");
|
|
28556
|
+
}
|
|
28483
28557
|
const planModeAdditions = getPlanModeSystemPromptAdditions(
|
|
28484
28558
|
messages,
|
|
28485
28559
|
toolUseContext
|
|
@@ -28505,15 +28579,50 @@ async function* queryCore(messages, systemPrompt, context, canUseTool, toolUseCo
|
|
|
28505
28579
|
requestId: currentRequest?.id,
|
|
28506
28580
|
config: conversationTrackingConfig
|
|
28507
28581
|
});
|
|
28508
|
-
|
|
28509
|
-
|
|
28510
|
-
|
|
28511
|
-
|
|
28512
|
-
|
|
28582
|
+
if (!hookState?.startupEmitted) {
|
|
28583
|
+
emitReminderEvent("session:startup", {
|
|
28584
|
+
agentId: toolUseContext.agentId,
|
|
28585
|
+
messages: messages.length,
|
|
28586
|
+
timestamp: Date.now()
|
|
28587
|
+
});
|
|
28588
|
+
}
|
|
28513
28589
|
if (!toolUseContext.agentId || toolUseContext.agentId === "main") {
|
|
28514
28590
|
startWatchingTaskList();
|
|
28515
28591
|
}
|
|
28516
|
-
|
|
28592
|
+
const reminderMessages = [
|
|
28593
|
+
...effectiveUserReminderMessages,
|
|
28594
|
+
...effectiveSystemReminderMessages
|
|
28595
|
+
];
|
|
28596
|
+
const rawReminderCount = userReminderMessages.length + systemReminderMessages.length;
|
|
28597
|
+
if (reminderMessages.length > 0) {
|
|
28598
|
+
const metrics = buildReminderChannelMetrics(
|
|
28599
|
+
effectiveUserReminderMessages,
|
|
28600
|
+
effectiveSystemReminderMessages
|
|
28601
|
+
);
|
|
28602
|
+
reminderChannelRounds.push(metrics);
|
|
28603
|
+
if (reminderChannelRounds.length > 20) {
|
|
28604
|
+
reminderChannelRounds.shift();
|
|
28605
|
+
}
|
|
28606
|
+
const closure = evaluateReminderChannelClosure(reminderChannelRounds, 3);
|
|
28607
|
+
logUserFriendly("REMINDER_INJECTION_SUMMARY", {
|
|
28608
|
+
queryId: activeQueryId,
|
|
28609
|
+
reminderTypes: extractReminderTypes(reminderMessages),
|
|
28610
|
+
userReminderCount: effectiveUserReminderMessages.length,
|
|
28611
|
+
systemReminderCount: effectiveSystemReminderMessages.length,
|
|
28612
|
+
rawReminderCount,
|
|
28613
|
+
user_channel_reminder_count: metrics.user_channel_reminder_count,
|
|
28614
|
+
system_channel_reminder_count: metrics.system_channel_reminder_count,
|
|
28615
|
+
mention_in_user_ratio: metrics.mention_in_user_ratio,
|
|
28616
|
+
non_mention_in_user_count: metrics.non_mention_in_user_count,
|
|
28617
|
+
closure_three_round_passed: closure.passed,
|
|
28618
|
+
closure_three_round_window_count: closure.roundCount,
|
|
28619
|
+
closure_three_round_failed_indexes: closure.failedRoundIndexes,
|
|
28620
|
+
reminder_enabled: flags.reminderEnabled,
|
|
28621
|
+
reminder_user_channel_enabled: flags.userChannelEnabled,
|
|
28622
|
+
reminder_system_channel_enabled: flags.systemChannelEnabled
|
|
28623
|
+
});
|
|
28624
|
+
}
|
|
28625
|
+
if (effectiveUserReminders && messages.length > 0) {
|
|
28517
28626
|
for (let i = messages.length - 1; i >= 0; i--) {
|
|
28518
28627
|
const msg = messages[i];
|
|
28519
28628
|
if (msg?.type === "user") {
|
|
@@ -28522,9 +28631,9 @@ async function* queryCore(messages, systemPrompt, context, canUseTool, toolUseCo
|
|
|
28522
28631
|
...lastUserMessage,
|
|
28523
28632
|
message: {
|
|
28524
28633
|
...lastUserMessage.message,
|
|
28525
|
-
content: typeof lastUserMessage.message.content === "string" ?
|
|
28634
|
+
content: typeof lastUserMessage.message.content === "string" ? effectiveUserReminders + lastUserMessage.message.content : [
|
|
28526
28635
|
...Array.isArray(lastUserMessage.message.content) ? lastUserMessage.message.content : [],
|
|
28527
|
-
{ type: "text", text:
|
|
28636
|
+
{ type: "text", text: effectiveUserReminders }
|
|
28528
28637
|
]
|
|
28529
28638
|
}
|
|
28530
28639
|
};
|
|
@@ -28587,7 +28696,8 @@ async function* queryCore(messages, systemPrompt, context, canUseTool, toolUseCo
|
|
|
28587
28696
|
getBinaryFeedbackResponse,
|
|
28588
28697
|
{
|
|
28589
28698
|
stopHookActive: true,
|
|
28590
|
-
stopHookAttempts: stopHookAttempts + 1
|
|
28699
|
+
stopHookAttempts: stopHookAttempts + 1,
|
|
28700
|
+
startupEmitted: true
|
|
28591
28701
|
}
|
|
28592
28702
|
);
|
|
28593
28703
|
return;
|
|
@@ -28656,7 +28766,10 @@ async function* queryCore(messages, systemPrompt, context, canUseTool, toolUseCo
|
|
|
28656
28766
|
canUseTool,
|
|
28657
28767
|
toolUseContext,
|
|
28658
28768
|
getBinaryFeedbackResponse,
|
|
28659
|
-
|
|
28769
|
+
{
|
|
28770
|
+
...hookState ?? {},
|
|
28771
|
+
startupEmitted: true
|
|
28772
|
+
}
|
|
28660
28773
|
);
|
|
28661
28774
|
} catch (error) {
|
|
28662
28775
|
throw error;
|
|
@@ -30195,7 +30308,7 @@ import { homedir as homedir8 } from "os";
|
|
|
30195
30308
|
// src/commands/agents/generation.ts
|
|
30196
30309
|
import { randomUUID as randomUUID6 } from "crypto";
|
|
30197
30310
|
async function generateAgentWithClaude(prompt) {
|
|
30198
|
-
const { queryModel } = await import("./llm-
|
|
30311
|
+
const { queryModel } = await import("./llm-RCPJRG2F.js");
|
|
30199
30312
|
const systemPrompt = `You are an expert at creating AI agent configurations. Based on the user's description, generate a specialized agent configuration.
|
|
30200
30313
|
|
|
30201
30314
|
Return your response as a JSON object with exactly these fields:
|