xibecode 0.9.0 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +1 -1
  2. package/dist/commands/run-pr.js +1 -1
  3. package/dist/commands/run.js +1 -1
  4. package/dist/components/AssistantMarkdown.d.ts +1 -0
  5. package/dist/components/AssistantMarkdown.d.ts.map +1 -1
  6. package/dist/components/AssistantMarkdown.js +20 -6
  7. package/dist/components/AssistantMarkdown.js.map +1 -1
  8. package/dist/constants/spinnerVerbs.d.ts +6 -0
  9. package/dist/constants/spinnerVerbs.d.ts.map +1 -0
  10. package/dist/constants/spinnerVerbs.js +202 -0
  11. package/dist/constants/spinnerVerbs.js.map +1 -0
  12. package/dist/core/agent.d.ts +2 -1
  13. package/dist/core/agent.d.ts.map +1 -1
  14. package/dist/core/agent.js +30 -14
  15. package/dist/core/agent.js.map +1 -1
  16. package/dist/core/modes.d.ts +3 -1
  17. package/dist/core/modes.d.ts.map +1 -1
  18. package/dist/core/modes.js +15 -4
  19. package/dist/core/modes.js.map +1 -1
  20. package/dist/core/swarm.d.ts +15 -0
  21. package/dist/core/swarm.d.ts.map +1 -1
  22. package/dist/core/swarm.js +32 -0
  23. package/dist/core/swarm.js.map +1 -1
  24. package/dist/core/tools.d.ts.map +1 -1
  25. package/dist/core/tools.js +81 -1
  26. package/dist/core/tools.js.map +1 -1
  27. package/dist/ui/claude-style-chat.d.ts.map +1 -1
  28. package/dist/ui/claude-style-chat.js +170 -12
  29. package/dist/ui/claude-style-chat.js.map +1 -1
  30. package/dist/ui/enhanced-tui.d.ts.map +1 -1
  31. package/dist/ui/enhanced-tui.js +8 -0
  32. package/dist/ui/enhanced-tui.js.map +1 -1
  33. package/dist/utils/auto-memory.d.ts +24 -0
  34. package/dist/utils/auto-memory.d.ts.map +1 -0
  35. package/dist/utils/auto-memory.js +153 -0
  36. package/dist/utils/auto-memory.js.map +1 -0
  37. package/dist/utils/tool-display.d.ts +5 -0
  38. package/dist/utils/tool-display.d.ts.map +1 -1
  39. package/dist/utils/tool-display.js +58 -1
  40. package/dist/utils/tool-display.js.map +1 -1
  41. package/dist/webui/server.js +1 -1
  42. package/package.json +12 -9
package/README.md CHANGED
@@ -10,7 +10,7 @@ AI-powered autonomous coding assistant for your terminal, browser, and desktop.
10
10
 
11
11
  XibeCode is a CLI agent that can read and edit code, run commands, and iterate on tasks from your terminal using LLMs. It includes a **WebUI** for a browser-based experience, a **Desktop App** (Electron) for native IDE-like usage, **AI-powered test generation**, and **multi-model support** for both Anthropic and OpenAI models.
12
12
 
13
- ## What's New in v0.9.0
13
+ ## What's New in v0.9.1
14
14
 
15
15
  ### Reliability and anti-hallucination upgrades
16
16
 
@@ -209,7 +209,7 @@ export async function runPrCommand(prompt, options) {
209
209
  const ui = new EnhancedUI(options.verbose);
210
210
  const config = new ConfigManager();
211
211
  const cwd = process.cwd();
212
- ui.header('0.9.0');
212
+ ui.header('0.9.2');
213
213
  // ── Pre-flight checks ────────────────────────────────────────────────────
214
214
  try {
215
215
  await assertGitRepo(cwd);
@@ -17,7 +17,7 @@ import chalk from 'chalk';
17
17
  export async function runCommand(prompt, options) {
18
18
  const ui = new EnhancedUI(options.verbose);
19
19
  const config = new ConfigManager();
20
- ui.header('0.9.0');
20
+ ui.header('0.9.2');
21
21
  // Get API key
22
22
  const apiKey = options.apiKey || config.getApiKey();
23
23
  if (!apiKey) {
@@ -4,6 +4,7 @@ type Props = {
4
4
  /**
5
5
  * Renders assistant Markdown in the TUI (marked + marked-terminal → ANSI in Ink Text).
6
6
  * Uses Ink's Text directly so theme foreground does not override chalk/ANSI from the renderer.
7
+ * `[[TASK_COMPLETE | summary=... | evidence=...]]` is stripped from the prose and shown as a short bordered block.
7
8
  */
8
9
  export declare function AssistantMarkdown({ content }: Props): import("react/jsx-runtime").JSX.Element;
9
10
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantMarkdown.d.ts","sourceRoot":"","sources":["../../src/components/AssistantMarkdown.tsx"],"names":[],"mappings":"AAMA,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAMF;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,EAAE,KAAK,2CAenD"}
1
+ {"version":3,"file":"AssistantMarkdown.d.ts","sourceRoot":"","sources":["../../src/components/AssistantMarkdown.tsx"],"names":[],"mappings":"AAWA,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAgBF;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,EAAE,KAAK,2CA6CnD"}
@@ -1,25 +1,39 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useMemo } from 'react';
3
3
  import { Text as InkText } from 'ink';
4
4
  import { Marked } from 'marked';
5
5
  import * as markedTerminalModule from 'marked-terminal';
6
- import { Box } from '../ink.js';
6
+ import { Box, Text } from '../ink.js';
7
+ import { parseTaskComplete, stripModeRequests, stripTaskComplete, } from '../core/modes.js';
7
8
  /** Runtime export; `@types/marked-terminal` only models the legacy default class. */
8
9
  const markedTerminal = markedTerminalModule
9
10
  .markedTerminal;
11
+ function markdownBodyForDisplay(raw) {
12
+ return stripModeRequests(stripTaskComplete(raw)).trim();
13
+ }
14
+ function shouldShowEvidence(evidence) {
15
+ if (evidence === undefined)
16
+ return false;
17
+ const t = evidence.trim();
18
+ return t.length > 0 && t.toLowerCase() !== 'none';
19
+ }
10
20
  /**
11
21
  * Renders assistant Markdown in the TUI (marked + marked-terminal → ANSI in Ink Text).
12
22
  * Uses Ink's Text directly so theme foreground does not override chalk/ANSI from the renderer.
23
+ * `[[TASK_COMPLETE | summary=... | evidence=...]]` is stripped from the prose and shown as a short bordered block.
13
24
  */
14
25
  export function AssistantMarkdown({ content }) {
15
26
  const width = Math.max(40, (process.stdout.columns ?? 80) - 8);
27
+ const taskMeta = useMemo(() => parseTaskComplete(content), [content]);
28
+ const mdSource = useMemo(() => markdownBodyForDisplay(content), [content]);
16
29
  const ansi = useMemo(() => {
17
30
  const md = new Marked();
18
- // marked-terminal defaults showSectionPrefix: true, which prints literal ## before headings.
19
31
  md.use(markedTerminal({ reflowText: true, width, showSectionPrefix: false }));
20
- const src = content.trim().length > 0 ? content : ' ';
32
+ const src = mdSource.length > 0 ? mdSource : ' ';
21
33
  return md.parse(src).trim();
22
- }, [content, width]);
23
- return (_jsx(Box, { flexDirection: "column", children: _jsx(InkText, { children: ansi }) }));
34
+ }, [mdSource, width]);
35
+ const showProse = mdSource.length > 0;
36
+ const showTaskFooter = taskMeta !== null;
37
+ return (_jsxs(Box, { flexDirection: "column", children: [showProse && (_jsx(Box, { flexDirection: "column", children: _jsx(InkText, { children: ansi }) })), showTaskFooter && taskMeta && (_jsxs(Box, { marginTop: showProse ? 1 : 0, borderStyle: "round", borderColor: "success", flexDirection: "column", paddingX: 1, children: [_jsx(Text, { bold: true, color: "success", children: "Task complete" }), _jsx(Text, { wrap: "wrap", color: "text", children: taskMeta.summary }), shouldShowEvidence(taskMeta.evidence) && (_jsxs(Text, { wrap: "wrap", dimColor: true, children: ["Evidence: ", taskMeta.evidence] }))] }))] }));
24
38
  }
25
39
  //# sourceMappingURL=AssistantMarkdown.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantMarkdown.js","sourceRoot":"","sources":["../../src/components/AssistantMarkdown.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,KAAK,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,oBAAoB,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAMhC,qFAAqF;AACrF,MAAM,cAAc,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C,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC;QACjD,OAAQ,EAAE,CAAC,KAAK,CAAC,GAAG,CAAY,CAAC,IAAI,EAAE,CAAC;IAC1C,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;IAEtB,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;IACtC,MAAM,cAAc,GAAG,QAAQ,KAAK,IAAI,CAAC;IAEzC,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,aACxB,SAAS,IAAI,CACZ,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,YACzB,KAAC,OAAO,cAAE,IAAI,GAAW,GACrB,CACP,EACA,cAAc,IAAI,QAAQ,IAAI,CAC7B,MAAC,GAAG,IACF,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAC5B,WAAW,EAAC,OAAO,EACnB,WAAW,EAAC,SAAS,EACrB,aAAa,EAAC,QAAQ,EACtB,QAAQ,EAAE,CAAC,aAEX,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,SAAS,8BAEnB,EACP,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,MAAM,YAC3B,QAAQ,CAAC,OAAO,GACZ,EACN,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CACxC,MAAC,IAAI,IAAC,IAAI,EAAC,MAAM,EAAC,QAAQ,iCACb,QAAQ,CAAC,QAAQ,IACvB,CACR,IACG,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Cycling “working” phrases for the chat TUI loading state.
3
+ * Aligned with OpenClaude’s spinner verb list for parity.
4
+ */
5
+ export declare const SPINNER_VERBS: readonly ["Cooking", "Cooking hard", "Letting it cook", "Overcooking", "Serving", "Serving code", "Locked in", "Locked tf in", "Dialed in", "In the zone", "Vibing", "Big braining", "Galaxy braining", "Thinking real hard", "Thinking… probably", "Lowkey thinking", "Highkey cooking", "Thinking in 4D", "Thinking in 5D", "Overthinking it", "Underthinking it", "Brain buffering", "Loading brain cells", "Overclocking brain", "Neuron activation", "Mentally compiling", "Debugging like a menace", "Fighting demons (bugs)", "Summoning bugs", "Banishing bugs", "Fixing my own mess", "Creating new bugs", "Deleting bugs", "Wrestling bugs", "Hotfixing life", "Refactoring reality", "Rewriting destiny", "Breaking everything", "Definitely not breaking it", "Probably fixing it", "Chaos mode", "Goblin mode", "Gremlin mode", "Unhinged mode", "Ferally coding", "Delulu coding", "Brainrotting", "Maximum brainrot", "Certified chaos", "Chaotic neutral coding", "Wildin", "Going insane", "Descending into madness", "Grinding", "Grinding hard", "Tryharding", "Sweating", "Clutching up", "Speedrunning", "Min-maxing", "Hyperfixating", "Tunnel vision", "Locked in fr", "Full sending", "No thoughts just code", "Running on vibes", "Powered by caffeine", "Doing questionable things", "Making questionable decisions", "Acting unwise", "Risking it all", "Wingin it", "Freestyling", "Guessing and hoping", "Rolling the dice", "Trust me bro", "This might work", "No promises", "Doing AI things", "Consulting the AI gods", "Talking to the void", "Bending space-time", "Breaking reality", "Hacking the matrix", "Summoning solutions", "Compiling thoughts", "Downloading knowledge", "Uploading genius", "Reading your messy code", "Judging your code", "Fixing your code", "Improving your code", "Making it less cursed", "Uncursing code", "Cooking up a fix", "Scanning files", "Digging through code", "Peeking into files", "Internally screaming", "Silently panicking", "Holding it together", "Barely holding it together", "Suffering (efficiently)", "Grinding through pain", "Emotionally debugging", "Soul searching", "Doing wizard shit", "Casting spells", "Code go brrr", "Going god mode", "Ultra instinct coding", "Engaging turbo mode", "Boosting performance", "Optimizing vibes", "Aligning stars", "Processing…", "Still processing…", "Almost there", "Nearly done", "Just a moment fr", "Hold on…", "Wait a sec…", "One sec bro", "Gooning (for code)", "Code gooning", "Entering goon mode", "Goon mode activated", "Focus gooning", "Deep focus mode", "Oh god kill me", "What is this code bro", "Who wrote this…", "This code is questionable", "This is… interesting", "Not judging… but wow", "I have concerns", "This might be cursed", "This is mildly terrifying", "I’ve seen worse… barely", "This code needs therapy", "This is a crime", "Calling the code police", "We need to talk about this code", "I refuse to believe this works", "How is this even running", "This shouldn’t work… but it does", "I’m scared", "I’m concerned for humanity", "This code is fighting back", "This code is alive", "This is personal now", "Me vs this code", "It’s not a bug, it’s a feature 💀", "This is fine… probably", "Everything is fine", "Totally normal code", "Nothing suspicious here", "Just a little chaos", "Minor war crimes in code", "This is illegal in 12 countries", "I’m gonna pretend I didn’t see that", "Let’s fix… whatever this is", "Time to clean this mess", "Fixing your masterpiece", "Respectfully… what is this", "No offense but this is wild", "I’m judging silently", "This hurt me emotionally", "My eyes…", "kill me", "gooning on you", "why are gey gey", "I need a minute", "Processing this disaster", "Stabilizing this chaos", "Attempting recovery", "Trying to fix this mess", "Damage control", "We can save this… maybe", "This is fixable… I think", "Praying this works", "Sending thoughts and prayers"];
6
+ //# sourceMappingURL=spinnerVerbs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spinnerVerbs.d.ts","sourceRoot":"","sources":["../../src/constants/spinnerVerbs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,aAAa,6xHAgNhB,CAAC"}
@@ -0,0 +1,202 @@
1
+ /**
2
+ * Cycling “working” phrases for the chat TUI loading state.
3
+ * Aligned with OpenClaude’s spinner verb list for parity.
4
+ */
5
+ export const SPINNER_VERBS = [
6
+ // Core vibe
7
+ 'Cooking',
8
+ 'Cooking hard',
9
+ 'Letting it cook',
10
+ 'Overcooking',
11
+ 'Serving',
12
+ 'Serving code',
13
+ 'Locked in',
14
+ 'Locked tf in',
15
+ 'Dialed in',
16
+ 'In the zone',
17
+ 'Vibing',
18
+ // Brain activity
19
+ 'Big braining',
20
+ 'Galaxy braining',
21
+ 'Thinking real hard',
22
+ 'Thinking… probably',
23
+ 'Lowkey thinking',
24
+ 'Highkey cooking',
25
+ 'Thinking in 4D',
26
+ 'Thinking in 5D',
27
+ 'Overthinking it',
28
+ 'Underthinking it',
29
+ 'Brain buffering',
30
+ 'Loading brain cells',
31
+ 'Overclocking brain',
32
+ 'Neuron activation',
33
+ 'Mentally compiling',
34
+ // Dev chaos
35
+ 'Debugging like a menace',
36
+ 'Fighting demons (bugs)',
37
+ 'Summoning bugs',
38
+ 'Banishing bugs',
39
+ 'Fixing my own mess',
40
+ 'Creating new bugs',
41
+ 'Deleting bugs',
42
+ 'Wrestling bugs',
43
+ 'Hotfixing life',
44
+ 'Refactoring reality',
45
+ 'Rewriting destiny',
46
+ 'Breaking everything',
47
+ 'Definitely not breaking it',
48
+ 'Probably fixing it',
49
+ // Chaos modes
50
+ 'Chaos mode',
51
+ 'Goblin mode',
52
+ 'Gremlin mode',
53
+ 'Unhinged mode',
54
+ 'Ferally coding',
55
+ 'Delulu coding',
56
+ 'Brainrotting',
57
+ 'Maximum brainrot',
58
+ 'Certified chaos',
59
+ 'Chaotic neutral coding',
60
+ 'Wildin',
61
+ 'Going insane',
62
+ 'Descending into madness',
63
+ // Focus / grind
64
+ 'Grinding',
65
+ 'Grinding hard',
66
+ 'Tryharding',
67
+ 'Sweating',
68
+ 'Clutching up',
69
+ 'Speedrunning',
70
+ 'Min-maxing',
71
+ 'Hyperfixating',
72
+ 'Tunnel vision',
73
+ 'Locked in fr',
74
+ 'Full sending',
75
+ 'No thoughts just code',
76
+ 'Running on vibes',
77
+ 'Powered by caffeine',
78
+ // Questionable behavior
79
+ 'Doing questionable things',
80
+ 'Making questionable decisions',
81
+ 'Acting unwise',
82
+ 'Risking it all',
83
+ 'Wingin it',
84
+ 'Freestyling',
85
+ 'Guessing and hoping',
86
+ 'Rolling the dice',
87
+ 'Trust me bro',
88
+ 'This might work',
89
+ 'No promises',
90
+ // AI / cosmic
91
+ 'Doing AI things',
92
+ 'Consulting the AI gods',
93
+ 'Talking to the void',
94
+ 'Bending space-time',
95
+ 'Breaking reality',
96
+ 'Hacking the matrix',
97
+ 'Summoning solutions',
98
+ 'Compiling thoughts',
99
+ 'Downloading knowledge',
100
+ 'Uploading genius',
101
+ // Code interaction
102
+ 'Reading your messy code',
103
+ 'Judging your code',
104
+ 'Fixing your code',
105
+ 'Improving your code',
106
+ 'Making it less cursed',
107
+ 'Uncursing code',
108
+ 'Cooking up a fix',
109
+ 'Scanning files',
110
+ 'Digging through code',
111
+ 'Peeking into files',
112
+ // Emotional damage
113
+ 'Internally screaming',
114
+ 'Silently panicking',
115
+ 'Holding it together',
116
+ 'Barely holding it together',
117
+ 'Suffering (efficiently)',
118
+ 'Grinding through pain',
119
+ 'Emotionally debugging',
120
+ 'Soul searching',
121
+ // Meme tier
122
+ 'Doing wizard shit',
123
+ 'Casting spells',
124
+ 'Code go brrr',
125
+ 'Going god mode',
126
+ 'Ultra instinct coding',
127
+ 'Engaging turbo mode',
128
+ 'Boosting performance',
129
+ 'Optimizing vibes',
130
+ 'Aligning stars',
131
+ // Progress feel
132
+ 'Processing…',
133
+ 'Still processing…',
134
+ 'Almost there',
135
+ 'Nearly done',
136
+ 'Just a moment fr',
137
+ 'Hold on…',
138
+ 'Wait a sec…',
139
+ 'One sec bro',
140
+ // Goon-tier chaos (controlled)
141
+ 'Gooning (for code)',
142
+ 'Code gooning',
143
+ 'Entering goon mode',
144
+ 'Goon mode activated',
145
+ 'Focus gooning',
146
+ 'Deep focus mode',
147
+ // Suffering + roast vibes
148
+ 'Oh god kill me',
149
+ 'What is this code bro',
150
+ 'Who wrote this…',
151
+ 'This code is questionable',
152
+ 'This is… interesting',
153
+ 'Not judging… but wow',
154
+ 'I have concerns',
155
+ 'This might be cursed',
156
+ 'This is mildly terrifying',
157
+ 'I’ve seen worse… barely',
158
+ 'This code needs therapy',
159
+ 'This is a crime',
160
+ 'Calling the code police',
161
+ 'We need to talk about this code',
162
+ 'I refuse to believe this works',
163
+ 'How is this even running',
164
+ 'This shouldn’t work… but it does',
165
+ 'I’m scared',
166
+ 'I’m concerned for humanity',
167
+ 'This code is fighting back',
168
+ 'This code is alive',
169
+ 'This is personal now',
170
+ 'Me vs this code',
171
+ 'It’s not a bug, it’s a feature 💀',
172
+ 'This is fine… probably',
173
+ 'Everything is fine',
174
+ 'Totally normal code',
175
+ 'Nothing suspicious here',
176
+ 'Just a little chaos',
177
+ 'Minor war crimes in code',
178
+ 'This is illegal in 12 countries',
179
+ 'I’m gonna pretend I didn’t see that',
180
+ 'Let’s fix… whatever this is',
181
+ 'Time to clean this mess',
182
+ 'Fixing your masterpiece',
183
+ 'Respectfully… what is this',
184
+ 'No offense but this is wild',
185
+ 'I’m judging silently',
186
+ 'This hurt me emotionally',
187
+ 'My eyes…',
188
+ 'kill me',
189
+ 'gooning on you',
190
+ 'why are gey gey',
191
+ 'I need a minute',
192
+ 'Processing this disaster',
193
+ 'Stabilizing this chaos',
194
+ 'Attempting recovery',
195
+ 'Trying to fix this mess',
196
+ 'Damage control',
197
+ 'We can save this… maybe',
198
+ 'This is fixable… I think',
199
+ 'Praying this works',
200
+ 'Sending thoughts and prayers',
201
+ ];
202
+ //# sourceMappingURL=spinnerVerbs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spinnerVerbs.js","sourceRoot":"","sources":["../../src/constants/spinnerVerbs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,YAAY;IACZ,SAAS;IACT,cAAc;IACd,iBAAiB;IACjB,aAAa;IACb,SAAS;IACT,cAAc;IACd,WAAW;IACX,cAAc;IACd,WAAW;IACX,aAAa;IACb,QAAQ;IAER,iBAAiB;IACjB,cAAc;IACd,iBAAiB;IACjB,oBAAoB;IACpB,oBAAoB;IACpB,iBAAiB;IACjB,iBAAiB;IACjB,gBAAgB;IAChB,gBAAgB;IAChB,iBAAiB;IACjB,kBAAkB;IAClB,iBAAiB;IACjB,qBAAqB;IACrB,oBAAoB;IACpB,mBAAmB;IACnB,oBAAoB;IAEpB,YAAY;IACZ,yBAAyB;IACzB,wBAAwB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,sBAAsB;IACtB,kBAAkB;IAClB,gBAAgB;IAEhB,gBAAgB;IAChB,aAAa;IACb,mBAAmB;IACnB,cAAc;IACd,aAAa;IACb,kBAAkB;IAClB,UAAU;IACV,aAAa;IACb,aAAa;IAEb,+BAA+B;IAC/B,oBAAoB;IACpB,cAAc;IACd,oBAAoB;IACpB,qBAAqB;IACrB,eAAe;IACf,iBAAiB;IAEjB,0BAA0B;IAC1B,gBAAgB;IAChB,uBAAuB;IACvB,iBAAiB;IACjB,2BAA2B;IAC3B,sBAAsB;IACtB,sBAAsB;IACtB,iBAAiB;IACjB,sBAAsB;IACtB,2BAA2B;IAC3B,yBAAyB;IACzB,yBAAyB;IACzB,iBAAiB;IACjB,yBAAyB;IACzB,iCAAiC;IACjC,gCAAgC;IAChC,0BAA0B;IAC1B,kCAAkC;IAClC,YAAY;IACZ,4BAA4B;IAC5B,4BAA4B;IAC5B,oBAAoB;IACpB,sBAAsB;IACtB,iBAAiB;IACjB,mCAAmC;IACnC,wBAAwB;IACxB,oBAAoB;IACpB,qBAAqB;IACrB,yBAAyB;IACzB,qBAAqB;IACrB,0BAA0B;IAC1B,iCAAiC;IACjC,qCAAqC;IACrC,6BAA6B;IAC7B,yBAAyB;IACzB,yBAAyB;IACzB,4BAA4B;IAC5B,6BAA6B;IAC7B,sBAAsB;IACtB,0BAA0B;IAC1B,UAAU;IACV,SAAS;IACT,gBAAgB;IAChB,iBAAiB;IACjB,iBAAiB;IACjB,0BAA0B;IAC1B,wBAAwB;IACxB,qBAAqB;IACrB,yBAAyB;IACzB,gBAAgB;IAChB,yBAAyB;IACzB,0BAA0B;IAC1B,oBAAoB;IACpB,8BAA8B;CACtB,CAAC"}
@@ -73,7 +73,8 @@ export declare class EnhancedAgent extends EventEmitter {
73
73
  private modeState;
74
74
  private modeOrchestrator;
75
75
  private provider;
76
- private projectMemory;
76
+ /** Ranked markdown memories (user + project + .xibecode/memories); injected in getSystemPrompt */
77
+ private autoMemoryMarkdownSection;
77
78
  private totalInputTokens;
78
79
  private totalOutputTokens;
79
80
  private sessionCost;
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/core/agent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAyC,MAAM,sCAAsC,CAAC;AAGtH,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,SAAS,EAA8K,MAAM,YAAY,CAAC;AAEnN,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAoB,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAKpE,wIAAwI;AACxI,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,UAAU,GAAG,aAAa,CAAC;AAErE,oFAAoF;AACpF,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,WAAW,GAAG,aAAa,CAAC;AAE1E,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,oBAAoB,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAC;IAC9C,8FAA8F;IAC9F,aAAa,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,WAAW,CAAC;IAChD,oGAAoG;IACpG,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4EAA4E;IAC5E,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,uFAAuF;IACvF,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iEAAiE;IACjE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,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E,YAAY,EAAE;IAIpC;;OAEG;IACH,OAAO,IAAI,SAAS;IAIpB;;OAEG;IACH,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM;IAY/C;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,YAAY,CAAC,EAAE,MAAM;IAQxD;;OAEG;IACH,cAAc,IAAI,MAAM,GAAG,IAAI;CAGhC"}
@@ -1,6 +1,7 @@
1
1
  import Anthropic from '@anthropic-ai/sdk';
2
2
  import fetch from 'node-fetch';
3
- import * as fsSync from 'fs';
3
+ import { existsSync, readFileSync } from 'fs';
4
+ import { join } from 'path';
4
5
  import { EventEmitter } from 'events';
5
6
  import { MODE_CONFIG, createModeState, transitionMode, ModeOrchestrator, parseModeRequest, stripModeRequests, parseTaskComplete, stripTaskComplete } from './modes.js';
6
7
  import { NeuralMemory } from './memory.js';
@@ -8,6 +9,7 @@ import { PROVIDER_CONFIGS } from '../utils/config.js';
8
9
  import { PermissionManager } from './permissions.js';
9
10
  import { ToolOrchestrator } from './tool-orchestrator.js';
10
11
  import { compactConversation } from './context-compactor.js';
12
+ import { autoLoadProjectMemories, formatMemoriesForContext, isAutoMemoryLoadEnabled, } from '../utils/auto-memory.js';
11
13
  export class LoopDetector {
12
14
  history = [];
13
15
  maxRepeats = 3;
@@ -172,7 +174,8 @@ export class EnhancedAgent extends EventEmitter {
172
174
  modeState;
173
175
  modeOrchestrator;
174
176
  provider;
175
- projectMemory = '';
177
+ /** Ranked markdown memories (user + project + .xibecode/memories); injected in getSystemPrompt */
178
+ autoMemoryMarkdownSection = '';
176
179
  totalInputTokens = 0;
177
180
  totalOutputTokens = 0;
178
181
  sessionCost = 0;
@@ -343,13 +346,6 @@ export class EnhancedAgent extends EventEmitter {
343
346
  this.contextHintFiles = config.contextHintFiles ?? [];
344
347
  this.memory = new NeuralMemory();
345
348
  this.memory.init().catch(console.error);
346
- try {
347
- const memoryPath = require('path').join(process.cwd(), '.xibecode', 'memory.md');
348
- if (fsSync.existsSync(memoryPath)) {
349
- this.projectMemory = fsSync.readFileSync(memoryPath, 'utf-8').trim();
350
- }
351
- }
352
- catch { /* no memory file */ }
353
349
  }
354
350
  detectProvider(model) {
355
351
  const m = model.toLowerCase();
@@ -390,6 +386,27 @@ export class EnhancedAgent extends EventEmitter {
390
386
  this.toolCallCount = 0;
391
387
  this.loopDetector.reset();
392
388
  this.evidenceTrail = [];
389
+ this.autoMemoryMarkdownSection = '';
390
+ if (isAutoMemoryLoadEnabled()) {
391
+ try {
392
+ const ranked = await autoLoadProjectMemories(process.cwd(), initialPrompt, []);
393
+ this.autoMemoryMarkdownSection = formatMemoriesForContext(ranked);
394
+ }
395
+ catch {
396
+ /* non-fatal */
397
+ }
398
+ }
399
+ if (!this.autoMemoryMarkdownSection.trim()) {
400
+ const fallbackMd = join(process.cwd(), '.xibecode', 'memory.md');
401
+ if (existsSync(fallbackMd)) {
402
+ try {
403
+ this.autoMemoryMarkdownSection = `\n\n## Project Memory\n\n${readFileSync(fallbackMd, 'utf-8').trim()}`;
404
+ }
405
+ catch {
406
+ /* ignore */
407
+ }
408
+ }
409
+ }
393
410
  this.messages.push({
394
411
  role: 'user',
395
412
  content: initialPrompt,
@@ -1188,13 +1205,11 @@ ${this.defaultSkillsPrompt ? `${this.defaultSkillsPrompt}\n\n` : ''}
1188
1205
  5. **Error Recovery**: If something fails, analyze the error and try a different approach
1189
1206
  6. **Search First**: Use grep_code to find code patterns, usages, and references before making changes
1190
1207
  7. **Web Research**: Use web_search and fetch_url when you need documentation, error solutions, or up-to-date info
1191
- 8. **Remember Important Things**: Use update_memory to save project knowledge for future sessions${this.projectMemory ? `
1192
-
1193
- ## Project Memory
1208
+ 8. **Remember Important Things**: Use update_memory to save project knowledge for future sessions${this.autoMemoryMarkdownSection ? `
1194
1209
 
1195
- The following knowledge was saved from previous sessions:
1210
+ The following markdown memories were selected for this session (keyword-ranked; verify critical facts):
1196
1211
 
1197
- ${this.projectMemory}` : ''}
1212
+ ${this.autoMemoryMarkdownSection}` : ''}
1198
1213
 
1199
1214
  ${this.activeSkill ? `## Active Skill: ${this.activeSkill.name}
1200
1215
 
@@ -1607,6 +1622,7 @@ ${MODE_CONFIG[this.modeState.current].promptSuffix}`;
1607
1622
  setModeFromUser(mode, reason) {
1608
1623
  const oldMode = this.modeState.current;
1609
1624
  this.modeState = transitionMode(this.modeState, mode, reason);
1625
+ this.permissionManager.setMode(mode);
1610
1626
  this.emit('mode_changed', {
1611
1627
  from: oldMode,
1612
1628
  to: mode,