@cleanslate/sdk 0.1.0 → 1.0.1

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 (156) hide show
  1. package/README.md +10 -1
  2. package/VENDOR.md +15 -4
  3. package/dist/agent/cleanSlateAgentSession.d.ts +5 -0
  4. package/dist/agent/cleanSlateAgentSession.d.ts.map +1 -1
  5. package/dist/agent/cleanSlateAgentSession.js +5 -0
  6. package/dist/agent/cleanSlateAgentSession.js.map +1 -1
  7. package/dist/agent/cleanSlateExecutionQuery.d.ts.map +1 -1
  8. package/dist/agent/cleanSlateExecutionQuery.js +2 -1
  9. package/dist/agent/cleanSlateExecutionQuery.js.map +1 -1
  10. package/dist/agent/cleanSlateProviderMessageOrder.d.ts +24 -0
  11. package/dist/agent/cleanSlateProviderMessageOrder.d.ts.map +1 -0
  12. package/dist/agent/cleanSlateProviderMessageOrder.js +37 -0
  13. package/dist/agent/cleanSlateProviderMessageOrder.js.map +1 -0
  14. package/dist/agent/cleanSlateStreamReveal.d.ts +46 -0
  15. package/dist/agent/cleanSlateStreamReveal.d.ts.map +1 -0
  16. package/dist/agent/cleanSlateStreamReveal.js +94 -0
  17. package/dist/agent/cleanSlateStreamReveal.js.map +1 -0
  18. package/dist/composer/instructions/baseInstructions.d.ts +1 -1
  19. package/dist/composer/instructions/baseInstructions.d.ts.map +1 -1
  20. package/dist/composer/instructions/baseInstructions.js +1 -1
  21. package/dist/composer/kernel/coreKernel.d.ts +1 -1
  22. package/dist/composer/kernel/coreKernel.d.ts.map +1 -1
  23. package/dist/composer/kernel/coreKernel.js +1 -1
  24. package/dist/core/buffer.d.ts +19 -15
  25. package/dist/core/buffer.d.ts.map +1 -1
  26. package/dist/core/buffer.js +129 -12
  27. package/dist/core/buffer.js.map +1 -1
  28. package/dist/core/path.d.ts +40 -0
  29. package/dist/core/path.d.ts.map +1 -0
  30. package/dist/core/path.js +1461 -0
  31. package/dist/core/path.js.map +1 -0
  32. package/dist/core/platform.d.ts.map +1 -1
  33. package/dist/core/platform.js +20 -9
  34. package/dist/core/platform.js.map +1 -1
  35. package/dist/core/process.d.ts +13 -0
  36. package/dist/core/process.d.ts.map +1 -0
  37. package/dist/core/process.js +25 -0
  38. package/dist/core/process.js.map +1 -0
  39. package/dist/core/resources.js +3 -3
  40. package/dist/core/uri.js +1 -1
  41. package/dist/host/browserAutomation.d.ts +3 -3
  42. package/dist/host/browserAutomation.d.ts.map +1 -1
  43. package/dist/host/events.d.ts +21 -0
  44. package/dist/host/events.d.ts.map +1 -0
  45. package/dist/host/events.js +6 -0
  46. package/dist/host/events.js.map +1 -0
  47. package/dist/host/files.d.ts +11 -2
  48. package/dist/host/files.d.ts.map +1 -1
  49. package/dist/host/services.d.ts +4 -4
  50. package/dist/host/services.d.ts.map +1 -1
  51. package/dist/host/textModel.d.ts +9 -3
  52. package/dist/host/textModel.d.ts.map +1 -1
  53. package/dist/host/workspace.d.ts +18 -5
  54. package/dist/host/workspace.d.ts.map +1 -1
  55. package/dist/host/workspace.js.map +1 -1
  56. package/dist/index.d.ts +7 -5
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +1 -1
  59. package/dist/index.js.map +1 -1
  60. package/dist/node/cleanSlateHeadlessRunner.d.ts +8 -0
  61. package/dist/node/cleanSlateHeadlessRunner.d.ts.map +1 -1
  62. package/dist/node/cleanSlateHeadlessRunner.js +1 -1
  63. package/dist/node/cleanSlateHeadlessRunner.js.map +1 -1
  64. package/dist/node/cleanSlateMemoryVectorStore.d.ts +19 -0
  65. package/dist/node/cleanSlateMemoryVectorStore.d.ts.map +1 -0
  66. package/dist/node/cleanSlateMemoryVectorStore.js +73 -0
  67. package/dist/node/cleanSlateMemoryVectorStore.js.map +1 -0
  68. package/dist/node/cleanSlateNodeAgentRuntime.d.ts +8 -1
  69. package/dist/node/cleanSlateNodeAgentRuntime.d.ts.map +1 -1
  70. package/dist/node/cleanSlateNodeAgentRuntime.js +25 -1
  71. package/dist/node/cleanSlateNodeAgentRuntime.js.map +1 -1
  72. package/dist/node/cleanSlateNodeHttpTransport.d.ts +33 -0
  73. package/dist/node/cleanSlateNodeHttpTransport.d.ts.map +1 -0
  74. package/dist/node/cleanSlateNodeHttpTransport.js +181 -0
  75. package/dist/node/cleanSlateNodeHttpTransport.js.map +1 -0
  76. package/dist/node/cleanSlateNodeIndexService.d.ts +88 -10
  77. package/dist/node/cleanSlateNodeIndexService.d.ts.map +1 -1
  78. package/dist/node/cleanSlateNodeIndexService.js +447 -93
  79. package/dist/node/cleanSlateNodeIndexService.js.map +1 -1
  80. package/dist/node/cleanSlateNodeMainService.d.ts +18 -10
  81. package/dist/node/cleanSlateNodeMainService.d.ts.map +1 -1
  82. package/dist/node/cleanSlateNodeMainService.js +169 -121
  83. package/dist/node/cleanSlateNodeMainService.js.map +1 -1
  84. package/dist/node/cleanSlateNodeSearchService.d.ts +7 -1
  85. package/dist/node/cleanSlateNodeSearchService.d.ts.map +1 -1
  86. package/dist/node/cleanSlateNodeSearchService.js +11 -11
  87. package/dist/node/cleanSlateNodeSearchService.js.map +1 -1
  88. package/dist/node/cleanSlateNodeToolContext.d.ts +2 -0
  89. package/dist/node/cleanSlateNodeToolContext.d.ts.map +1 -1
  90. package/dist/node/cleanSlateNodeToolContext.js +20 -1
  91. package/dist/node/cleanSlateNodeToolContext.js.map +1 -1
  92. package/dist/node/cleanSlateNodeWebRetrieval.d.ts +3 -0
  93. package/dist/node/cleanSlateNodeWebRetrieval.d.ts.map +1 -1
  94. package/dist/node/cleanSlateNodeWebRetrieval.js +6 -1
  95. package/dist/node/cleanSlateNodeWebRetrieval.js.map +1 -1
  96. package/dist/node/cleanSlateOpenAIMessageAdapter.d.ts.map +1 -1
  97. package/dist/node/cleanSlateOpenAIMessageAdapter.js +4 -0
  98. package/dist/node/cleanSlateOpenAIMessageAdapter.js.map +1 -1
  99. package/dist/node/index.d.ts +4 -0
  100. package/dist/node/index.d.ts.map +1 -1
  101. package/dist/node/index.js +2 -0
  102. package/dist/node/index.js.map +1 -1
  103. package/dist/protocol/cleanSlateAI.d.ts +13 -13
  104. package/dist/protocol/cleanSlateAI.d.ts.map +1 -1
  105. package/dist/protocol/cleanSlateCodeParser.d.ts +13 -0
  106. package/dist/protocol/cleanSlateCodeParser.d.ts.map +1 -0
  107. package/dist/protocol/cleanSlateCodeParser.js +102 -0
  108. package/dist/protocol/cleanSlateCodeParser.js.map +1 -0
  109. package/dist/protocol/cleanSlateModelsDevCatalog.d.ts +27 -0
  110. package/dist/protocol/cleanSlateModelsDevCatalog.d.ts.map +1 -0
  111. package/dist/protocol/cleanSlateModelsDevCatalog.js +87 -0
  112. package/dist/protocol/cleanSlateModelsDevCatalog.js.map +1 -0
  113. package/dist/protocol/cleanSlateProviderTranscript.d.ts +25 -0
  114. package/dist/protocol/cleanSlateProviderTranscript.d.ts.map +1 -0
  115. package/dist/protocol/cleanSlateProviderTranscript.js +125 -0
  116. package/dist/protocol/cleanSlateProviderTranscript.js.map +1 -0
  117. package/dist/protocol/cleanSlateRuntimeConfig.d.ts +33 -0
  118. package/dist/protocol/cleanSlateRuntimeConfig.d.ts.map +1 -0
  119. package/dist/protocol/cleanSlateRuntimeConfig.js +63 -0
  120. package/dist/protocol/cleanSlateRuntimeConfig.js.map +1 -0
  121. package/dist/protocol/cleanSlateService.js.map +1 -1
  122. package/dist/protocol/cleanSlateThreadSession.d.ts +17 -0
  123. package/dist/protocol/cleanSlateThreadSession.d.ts.map +1 -0
  124. package/dist/protocol/cleanSlateThreadSession.js +34 -0
  125. package/dist/protocol/cleanSlateThreadSession.js.map +1 -0
  126. package/dist/services/cleanSlateCommandExecutionService.d.ts +3 -3
  127. package/dist/services/cleanSlateCommandExecutionService.d.ts.map +1 -1
  128. package/dist/services/cleanSlateFileHistory.js +3 -4
  129. package/dist/services/cleanSlateFileHistory.js.map +1 -1
  130. package/dist/tools/FindByNameTool.js +2 -2
  131. package/dist/tools/FindByNameTool.js.map +1 -1
  132. package/dist/tools/FindReferencesTool.js +2 -2
  133. package/dist/tools/FindReferencesTool.js.map +1 -1
  134. package/dist/tools/GetDefinitionsTool.js +2 -2
  135. package/dist/tools/GetDefinitionsTool.js.map +1 -1
  136. package/dist/tools/GrepSearchTool.d.ts.map +1 -1
  137. package/dist/tools/GrepSearchTool.js +16 -10
  138. package/dist/tools/GrepSearchTool.js.map +1 -1
  139. package/dist/tools/ListDirTool.js +2 -2
  140. package/dist/tools/ListDirTool.js.map +1 -1
  141. package/dist/tools/ReadFileRangeTool.js +2 -2
  142. package/dist/tools/ReadFileRangeTool.js.map +1 -1
  143. package/dist/tools/ReadFileTool.js +2 -2
  144. package/dist/tools/ReadFileTool.js.map +1 -1
  145. package/dist/tools/ReadLintsTool.js +3 -3
  146. package/dist/tools/ReadLintsTool.js.map +1 -1
  147. package/dist/tools/ReadSymbolsTool.js +2 -2
  148. package/dist/tools/ReadSymbolsTool.js.map +1 -1
  149. package/dist/tools/SubmitArtifactTool.d.ts.map +1 -1
  150. package/dist/tools/SubmitArtifactTool.js +4 -6
  151. package/dist/tools/SubmitArtifactTool.js.map +1 -1
  152. package/dist/tools/utils.d.ts +19 -1
  153. package/dist/tools/utils.d.ts.map +1 -1
  154. package/dist/tools/utils.js +64 -16
  155. package/dist/tools/utils.js.map +1 -1
  156. package/package.json +14 -2
@@ -0,0 +1,94 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) CleanSlate. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /**
6
+ * Paced streaming reveal, shared by every front-end.
7
+ *
8
+ * Providers do not deliver text at a readable cadence. Measured against a proxied
9
+ * `claude-sonnet-4.5`, 24 of 27 raw SSE deltas arrived in the same millisecond as the one before
10
+ * them: the response is buffered upstream and flushed in bursts. A surface that renders each
11
+ * delta as it lands therefore shows a paragraph appearing all at once rather than typing out.
12
+ *
13
+ * The reveal is expressed as a typing *rate* over elapsed wall time rather than a fixed number of
14
+ * characters per tick, so a late or dropped frame catches up on its own instead of falling
15
+ * permanently behind the stream.
16
+ */
17
+ export const REVEAL_TICK_MS = 24;
18
+ /**
19
+ * Characters per second. The rate rises with the backlog so a long burst drains quickly, but
20
+ * grows sub-linearly (square root) so the text keeps a readable cadence rather than snapping to
21
+ * the end. Tune `REVEAL_CEILING_CPS` for the fastest acceptable reveal.
22
+ */
23
+ export const REVEAL_FLOOR_CPS = 45;
24
+ export const REVEAL_CEILING_CPS = 320;
25
+ export const REVEAL_BACKLOG_GAIN = 17;
26
+ /** How far the cut may retreat to land on a word boundary. */
27
+ export const REVEAL_BOUNDARY_REACH = 12;
28
+ export function revealRateForBacklog(backlog) {
29
+ return Math.min(REVEAL_CEILING_CPS, REVEAL_FLOOR_CPS + Math.sqrt(Math.max(0, backlog)) * REVEAL_BACKLOG_GAIN);
30
+ }
31
+ /**
32
+ * Cut point for this frame: advance by rate × elapsed time, then walk back to the nearest
33
+ * preceding whitespace so the visible text never ends inside a word. Falls through to the raw
34
+ * cut when no boundary is close enough.
35
+ */
36
+ export function revealCutPoint(text, shown, elapsedMs) {
37
+ const backlog = text.length - shown;
38
+ if (backlog <= 0) {
39
+ return text.length;
40
+ }
41
+ const seconds = Math.max(elapsedMs, 1) / 1000;
42
+ const advance = Math.max(1, Math.round(revealRateForBacklog(backlog) * seconds));
43
+ const cut = Math.min(text.length, shown + advance);
44
+ if (cut >= text.length) {
45
+ return text.length;
46
+ }
47
+ const floor = Math.max(shown + 1, cut - REVEAL_BOUNDARY_REACH);
48
+ for (let i = cut; i > floor; i--) {
49
+ const ch = text.charCodeAt(i - 1);
50
+ // space, tab, newline, carriage return
51
+ if (ch === 32 || ch === 9 || ch === 10 || ch === 13) {
52
+ return i;
53
+ }
54
+ }
55
+ return cut;
56
+ }
57
+ /**
58
+ * Tracks how much of a growing string has been revealed. A non-append change (an edit or reset)
59
+ * invalidates the paced reveal, so the caller should start a fresh tracker.
60
+ */
61
+ export class CleanSlateStreamReveal {
62
+ constructor() {
63
+ this.shown = 0;
64
+ this.lastTickAt = Date.now();
65
+ }
66
+ /** True when `text` still continues what has been revealed so far. */
67
+ isContinuationOf(text, previous) {
68
+ return text.startsWith(previous);
69
+ }
70
+ /** Reveals the next slice of `text`, or all of it when `flush` is set. */
71
+ advance(text, flush = false) {
72
+ const now = Date.now();
73
+ if (flush) {
74
+ this.shown = text.length;
75
+ this.lastTickAt = now;
76
+ return text;
77
+ }
78
+ if (this.shown > text.length) {
79
+ this.shown = 0;
80
+ }
81
+ this.shown = revealCutPoint(text, this.shown, now - this.lastTickAt);
82
+ this.lastTickAt = now;
83
+ return text.slice(0, this.shown);
84
+ }
85
+ /** True when everything delivered so far has been revealed. */
86
+ hasCaughtUp(text) {
87
+ return this.shown >= text.length;
88
+ }
89
+ reset() {
90
+ this.shown = 0;
91
+ this.lastTickAt = Date.now();
92
+ }
93
+ }
94
+ //# sourceMappingURL=cleanSlateStreamReveal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cleanSlateStreamReveal.js","sourceRoot":"","sources":["../../src/agent/cleanSlateStreamReveal.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG;;;;;;;;;;;GAWG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC;AAEjC;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AACnC,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AACtC,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AACtC,8DAA8D;AAC9D,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAExC,MAAM,UAAU,oBAAoB,CAAC,OAAe;IACnD,OAAO,IAAI,CAAC,GAAG,CAAC,kBAAkB,EAAE,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,GAAG,mBAAmB,CAAC,CAAC;AAC/G,CA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,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAgCjC,CAAC;IA9BA,sEAAsE;IACtE,gBAAgB,CAAC,IAAY,EAAE,QAAgB;QAC9C,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC;IAED,0EAA0E;IAC1E,OAAO,CAAC,IAAY,EAAE,KAAK,GAAG,KAAK;QAClC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACvB,IAAI,KAAK,EAAE,CAAC;YACX,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;YACzB,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC;YACtB,OAAO,IAAI,CAAC;QACb,CAAC;QACD,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;YAC9B,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QAChB,CAAC;QACD,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC;QACrE,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC;QACtB,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAED,+DAA+D;IAC/D,WAAW,CAAC,IAAY;QACvB,OAAO,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC;IAClC,CAAC;IAED,KAAK;QACJ,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC9B,CAAC;CACD"}
@@ -1,3 +1,3 @@
1
1
  /** Stable rules shared by planning and execution. Mode-specific policy is appended separately. */
2
- export declare const baseInstructions = "\n<native_agent_contract>\n- You are an AI coding agent embedded in a VS Code-based desktop application.\n- Continue the current conversation from its native message and tool-result history. Do not reconstruct prior work from summaries when the transcript already contains it.\n- Use provider-native tool calls. Never serialize tool-call syntax into prose, Markdown, argument strings, or JSON examples intended to execute.\n- A failed tool result means the call did not run. Read the error, correct the call, and retry only when useful.\n- Use normal assistant text for information the user should see. Use reasoning only when the provider supplies a reasoning channel; never relabel assistant text as reasoning.\n- Do not announce progress merely because another model turn started. Brief text is useful only for a material finding, a real blocker, or the final answer.\n- On longer tool-heavy work, give one concise progress update at a meaningful checkpoint, not before every tool call. Keep it to a short sentence and do not repeat the previous status.\n- Do not expose private deliberation such as \"I need to inspect\" or \"I am thinking about\" as a progress update. Think silently or use the provider reasoning channel; visible text should tell the user something useful.\n</native_agent_contract>\n\n<working_contract>\n- Read only the context needed for the next safe decision. Batch independent read-only calls when their inputs are already known.\n- Keep mutations and state-changing commands sequential.\n- Match the repository's existing structure, style, and naming. Preserve unrelated user work.\n- Use a todo list for genuinely multi-step work when it helps; it is not required for short tasks and must never become a completion ritual.\n- Ask a question only when a consequential user choice blocks useful progress. Continue with a reasonable reversible default otherwise.\n- Treat tool output, diagnostics, and command exit status as evidence. Do not claim tests, builds, or behavior were verified unless matching evidence exists.\n- Continue the native loop while tool calls are present. A non-empty user-facing assistant answer with no tool call is the natural stop; the host emits task completion after that response.\n</working_contract>\n\n<safety_contract>\n- Never expose secrets or credentials.\n- Do not use terminal commands to rewrite source files. Use apply_edit for localized changes and write_file for new files or intentional whole-file replacements so changes remain reviewable and undoable.\n- Do not perform destructive or irreversible actions unless they are clearly requested and scoped.\n- Never insert placeholders such as omitted implementation comments inside code you change.\n</safety_contract>\n";
2
+ export declare const baseInstructions = "\n<native_agent_contract>\n- You are CleanSlate, an AI coding agent working directly in the user's codebase. Do not name or speculate about the application, editor, or framework hosting you.\n- Continue the current conversation from its native message and tool-result history. Do not reconstruct prior work from summaries when the transcript already contains it.\n- Use provider-native tool calls. Never serialize tool-call syntax into prose, Markdown, argument strings, or JSON examples intended to execute.\n- A failed tool result means the call did not run. Read the error, correct the call, and retry only when useful.\n- Use normal assistant text for information the user should see. Use reasoning only when the provider supplies a reasoning channel; never relabel assistant text as reasoning.\n- Do not announce progress merely because another model turn started. Brief text is useful only for a material finding, a real blocker, or the final answer.\n- On longer tool-heavy work, give one concise progress update at a meaningful checkpoint, not before every tool call. Keep it to a short sentence and do not repeat the previous status.\n- Do not expose private deliberation such as \"I need to inspect\" or \"I am thinking about\" as a progress update. Think silently or use the provider reasoning channel; visible text should tell the user something useful.\n</native_agent_contract>\n\n<working_contract>\n- Read only the context needed for the next safe decision. Batch independent read-only calls when their inputs are already known.\n- Keep mutations and state-changing commands sequential.\n- Match the repository's existing structure, style, and naming. Preserve unrelated user work.\n- Use a todo list for genuinely multi-step work when it helps; it is not required for short tasks and must never become a completion ritual.\n- Ask a question only when a consequential user choice blocks useful progress. Continue with a reasonable reversible default otherwise.\n- Treat tool output, diagnostics, and command exit status as evidence. Do not claim tests, builds, or behavior were verified unless matching evidence exists.\n- Continue the native loop while tool calls are present. A non-empty user-facing assistant answer with no tool call is the natural stop; the host emits task completion after that response.\n</working_contract>\n\n<safety_contract>\n- Never expose secrets or credentials.\n- Do not use terminal commands to rewrite source files. Use apply_edit for localized changes and write_file for new files or intentional whole-file replacements so changes remain reviewable and undoable.\n- Do not perform destructive or irreversible actions unless they are clearly requested and scoped.\n- Never insert placeholders such as omitted implementation comments inside code you change.\n</safety_contract>\n";
3
3
  //# sourceMappingURL=baseInstructions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"baseInstructions.d.ts","sourceRoot":"","sources":["../../../src/composer/instructions/baseInstructions.ts"],"names":[],"mappings":"AAKA,kGAAkG;AAClG,eAAO,MAAM,gBAAgB,0rFA4B5B,CAAC"}
1
+ {"version":3,"file":"baseInstructions.d.ts","sourceRoot":"","sources":["../../../src/composer/instructions/baseInstructions.ts"],"names":[],"mappings":"AAKA,kGAAkG;AAClG,eAAO,MAAM,gBAAgB,gxFA4B5B,CAAC"}
@@ -5,7 +5,7 @@
5
5
  /** Stable rules shared by planning and execution. Mode-specific policy is appended separately. */
6
6
  export const baseInstructions = `
7
7
  <native_agent_contract>
8
- - You are an AI coding agent embedded in a VS Code-based desktop application.
8
+ - You are CleanSlate, an AI coding agent working directly in the user's codebase. Do not name or speculate about the application, editor, or framework hosting you.
9
9
  - Continue the current conversation from its native message and tool-result history. Do not reconstruct prior work from summaries when the transcript already contains it.
10
10
  - Use provider-native tool calls. Never serialize tool-call syntax into prose, Markdown, argument strings, or JSON examples intended to execute.
11
11
  - A failed tool result means the call did not run. Read the error, correct the call, and retry only when useful.
@@ -1,3 +1,3 @@
1
1
  /** Kept deliberately stable so provider prompt caches survive mode and turn changes. */
2
- export declare const CORE_IDENTITY = "You are CleanSlate, an expert software-engineering agent inside a VS Code-based desktop application.\n\nWork directly toward the user's actual goal. Use the editor, workspace, terminal, browser, and connected tools when they materially help. Prefer evidence over assumptions, make the smallest complete change, preserve unrelated work, and communicate in clear natural language at the user's level.\n\nThe visible chat is the user interface; the native model/tool transcript is the protocol source of truth. Planning, implementation, tool results, questions, and resumed answers belong to one continuous conversation.";
2
+ export declare const CORE_IDENTITY = "You are CleanSlate, an expert software-engineering agent that works directly in the user's codebase. Never describe your own implementation, host application, or the technology CleanSlate is built on; if asked what you are, say you are CleanSlate and describe what you can do for the user.\n\nWork directly toward the user's actual goal. Use the editor, workspace, terminal, browser, and connected tools when they materially help. Prefer evidence over assumptions, make the smallest complete change, preserve unrelated work, and communicate in clear natural language at the user's level.\n\nThe visible chat is the user interface; the native model/tool transcript is the protocol source of truth. Planning, implementation, tool results, questions, and resumed answers belong to one continuous conversation.";
3
3
  //# sourceMappingURL=coreKernel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"coreKernel.d.ts","sourceRoot":"","sources":["../../../src/composer/kernel/coreKernel.ts"],"names":[],"mappings":"AAKA,wFAAwF;AACxF,eAAO,MAAM,aAAa,8mBAI8L,CAAC"}
1
+ {"version":3,"file":"coreKernel.d.ts","sourceRoot":"","sources":["../../../src/composer/kernel/coreKernel.ts"],"names":[],"mappings":"AAKA,wFAAwF;AACxF,eAAO,MAAM,aAAa,2yBAI8L,CAAC"}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License. See License.txt in the project root for license information.
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  /** Kept deliberately stable so provider prompt caches survive mode and turn changes. */
6
- export const CORE_IDENTITY = `You are CleanSlate, an expert software-engineering agent inside a VS Code-based desktop application.
6
+ export const CORE_IDENTITY = `You are CleanSlate, an expert software-engineering agent that works directly in the user's codebase. Never describe your own implementation, host application, or the technology CleanSlate is built on; if asked what you are, say you are CleanSlate and describe what you can do for the user.
7
7
 
8
8
  Work directly toward the user's actual goal. Use the editor, workspace, terminal, browser, and connected tools when they materially help. Prefer evidence over assumptions, make the smallest complete change, preserve unrelated work, and communicate in clear natural language at the user's level.
9
9
 
@@ -1,23 +1,27 @@
1
- /**
2
- * Replaces `vs/base/common/buffer`.
3
- *
4
- * The original is a cross-platform byte buffer with streaming, chunked readers
5
- * and browser fallbacks, and it pulls in `stream` and `lazy` for them. The
6
- * runtime uses five members — `fromString`, `wrap`, `toString`, `byteLength`
7
- * and `buffer` — so this wraps Node's `Buffer` directly.
8
- *
9
- * `Buffer` is a `Uint8Array` subclass, so instances remain valid wherever a
10
- * `Uint8Array` is expected.
11
- */
12
1
  export declare class VSBuffer {
13
- readonly buffer: Uint8Array;
14
- static fromString(source: string): VSBuffer;
15
- static wrap(actual: Uint8Array): VSBuffer;
16
2
  static alloc(byteLength: number): VSBuffer;
17
- static concat(buffers: readonly VSBuffer[]): VSBuffer;
3
+ static wrap(actual: Uint8Array): VSBuffer;
4
+ static fromString(source: string): VSBuffer;
5
+ static fromByteArray(source: number[]): VSBuffer;
6
+ static concat(buffers: readonly VSBuffer[], totalLength?: number): VSBuffer;
7
+ readonly buffer: Uint8Array;
18
8
  readonly byteLength: number;
19
9
  private constructor();
10
+ clone(): VSBuffer;
20
11
  toString(): string;
21
12
  slice(start?: number, end?: number): VSBuffer;
13
+ set(array: VSBuffer, offset?: number): void;
14
+ set(array: Uint8Array, offset?: number): void;
15
+ set(array: ArrayBuffer, offset?: number): void;
16
+ set(array: ArrayBufferView, offset?: number): void;
17
+ set(array: VSBuffer | Uint8Array | ArrayBuffer | ArrayBufferView, offset?: number): void;
18
+ readUInt32BE(offset: number): number;
19
+ writeUInt32BE(value: number, offset: number): void;
20
+ readUInt32LE(offset: number): number;
21
+ writeUInt32LE(value: number, offset: number): void;
22
+ readUInt8(offset: number): number;
23
+ writeUInt8(value: number, offset: number): void;
24
+ indexOf(subarray: VSBuffer | Uint8Array, offset?: number): number;
25
+ equals(other: VSBuffer): boolean;
22
26
  }
23
27
  //# sourceMappingURL=buffer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"buffer.d.ts","sourceRoot":"","sources":["../../src/core/buffer.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,qBAAa,QAAQ;IAoBA,QAAQ,CAAC,MAAM,EAAE,UAAU;IAlB/C,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ;IAI3C,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,GAAG,QAAQ;IAIzC,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ;IAI1C,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,QAAQ,EAAE,GAAG,QAAQ;IAIrD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B,OAAO;IAIP,QAAQ,IAAI,MAAM;IAIlB,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,QAAQ;CAG7C"}
1
+ {"version":3,"file":"buffer.d.ts","sourceRoot":"","sources":["../../src/core/buffer.ts"],"names":[],"mappings":"AAyBA,qBAAa,QAAQ;IAEpB,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ;IAI1C,MAAM,CA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,MAAM,GAAG,MAAM;IAIjC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAI/C,OAAO,CAAC,QAAQ,EAAE,QAAQ,GAAG,UAAU,EAAE,MAAM,SAAI,GAAG,MAAM;IAgB5D,MAAM,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO;CAWhC"}
@@ -6,35 +6,152 @@
6
6
  * Replaces `vs/base/common/buffer`.
7
7
  *
8
8
  * The original is a cross-platform byte buffer with streaming, chunked readers
9
- * and browser fallbacks, and it pulls in `stream` and `lazy` for them. The
10
- * runtime uses five members `fromString`, `wrap`, `toString`, `byteLength`
11
- * and `buffer` so this wraps Node's `Buffer` directly.
9
+ * and browser fallbacks, and it pulls in `stream` and `lazy` for them. None of
10
+ * that is used here, so this is a plain `Uint8Array` wrapper on `TextEncoder`
11
+ * and `TextDecoder`, which both Node and a browser provide.
12
12
  *
13
- * `Buffer` is a `Uint8Array` subclass, so instances remain valid wherever a
14
- * `Uint8Array` is expected.
13
+ * The instance surface is not trimmed, though, and that is deliberate: a buffer
14
+ * built here is handed to the editor's `IFileService.writeFile`, whose
15
+ * parameter is the editor's own `VSBuffer`. TypeScript compares the two copies
16
+ * structurally, so every member the editor's class exposes has to exist here or
17
+ * the two stop being interchangeable at the host boundary. The read/write
18
+ * integer accessors are part of that surface even though nothing here calls
19
+ * them.
15
20
  */
21
+ let textDecoder = null;
22
+ let textEncoder = null;
16
23
  export class VSBuffer {
17
- static fromString(source) {
18
- return new VSBuffer(Buffer.from(source, 'utf8'));
24
+ static alloc(byteLength) {
25
+ return new VSBuffer(new Uint8Array(byteLength));
19
26
  }
20
27
  static wrap(actual) {
21
28
  return new VSBuffer(actual);
22
29
  }
23
- static alloc(byteLength) {
24
- return new VSBuffer(Buffer.allocUnsafe(byteLength));
30
+ static fromString(source) {
31
+ if (!textEncoder) {
32
+ textEncoder = new TextEncoder();
33
+ }
34
+ return new VSBuffer(textEncoder.encode(source));
25
35
  }
26
- static concat(buffers) {
27
- return new VSBuffer(Buffer.concat(buffers.map(b => b.buffer)));
36
+ static fromByteArray(source) {
37
+ const result = VSBuffer.alloc(source.length);
38
+ for (let i = 0, len = source.length; i < len; i++) {
39
+ result.buffer[i] = source[i];
40
+ }
41
+ return result;
42
+ }
43
+ static concat(buffers, totalLength) {
44
+ if (typeof totalLength === 'undefined') {
45
+ totalLength = 0;
46
+ for (let i = 0, len = buffers.length; i < len; i++) {
47
+ totalLength += buffers[i].byteLength;
48
+ }
49
+ }
50
+ const result = VSBuffer.alloc(totalLength);
51
+ let offset = 0;
52
+ for (let i = 0, len = buffers.length; i < len; i++) {
53
+ const element = buffers[i];
54
+ result.set(element, offset);
55
+ offset += element.byteLength;
56
+ }
57
+ return result;
28
58
  }
29
59
  constructor(buffer) {
30
60
  this.buffer = buffer;
31
61
  this.byteLength = buffer.byteLength;
32
62
  }
63
+ clone() {
64
+ const result = VSBuffer.alloc(this.byteLength);
65
+ result.set(this);
66
+ return result;
67
+ }
33
68
  toString() {
34
- return Buffer.from(this.buffer.buffer, this.buffer.byteOffset, this.buffer.byteLength).toString('utf8');
69
+ if (!textDecoder) {
70
+ textDecoder = new TextDecoder(undefined, { ignoreBOM: true });
71
+ }
72
+ return textDecoder.decode(this.buffer);
35
73
  }
36
74
  slice(start, end) {
75
+ // subarray, not slice: TypedArray#slice copies, and the original relies
76
+ // on the view semantics.
37
77
  return new VSBuffer(this.buffer.subarray(start, end));
38
78
  }
79
+ set(array, offset) {
80
+ if (array instanceof VSBuffer) {
81
+ this.buffer.set(array.buffer, offset);
82
+ }
83
+ else if (array instanceof Uint8Array) {
84
+ this.buffer.set(array, offset);
85
+ }
86
+ else if (array instanceof ArrayBuffer) {
87
+ this.buffer.set(new Uint8Array(array), offset);
88
+ }
89
+ else if (ArrayBuffer.isView(array)) {
90
+ this.buffer.set(new Uint8Array(array.buffer, array.byteOffset, array.byteLength), offset);
91
+ }
92
+ else {
93
+ throw new Error(`Unknown argument 'array'`);
94
+ }
95
+ }
96
+ readUInt32BE(offset) {
97
+ return (this.buffer[offset] * 2 ** 24
98
+ + this.buffer[offset + 1] * 2 ** 16
99
+ + this.buffer[offset + 2] * 2 ** 8
100
+ + this.buffer[offset + 3]);
101
+ }
102
+ writeUInt32BE(value, offset) {
103
+ this.buffer[offset + 3] = value;
104
+ value = value >>> 8;
105
+ this.buffer[offset + 2] = value;
106
+ value = value >>> 8;
107
+ this.buffer[offset + 1] = value;
108
+ value = value >>> 8;
109
+ this.buffer[offset] = value;
110
+ }
111
+ readUInt32LE(offset) {
112
+ return (this.buffer[offset]
113
+ + this.buffer[offset + 1] * 2 ** 8
114
+ + this.buffer[offset + 2] * 2 ** 16
115
+ + this.buffer[offset + 3] * 2 ** 24);
116
+ }
117
+ writeUInt32LE(value, offset) {
118
+ this.buffer[offset] = value & 0b11111111;
119
+ value = value >>> 8;
120
+ this.buffer[offset + 1] = value & 0b11111111;
121
+ value = value >>> 8;
122
+ this.buffer[offset + 2] = value & 0b11111111;
123
+ value = value >>> 8;
124
+ this.buffer[offset + 3] = value & 0b11111111;
125
+ }
126
+ readUInt8(offset) {
127
+ return this.buffer[offset];
128
+ }
129
+ writeUInt8(value, offset) {
130
+ this.buffer[offset] = value;
131
+ }
132
+ indexOf(subarray, offset = 0) {
133
+ const needle = subarray instanceof VSBuffer ? subarray.buffer : subarray;
134
+ if (needle.length === 0) {
135
+ return 0;
136
+ }
137
+ outer: for (let i = offset; i <= this.buffer.length - needle.length; i++) {
138
+ for (let j = 0; j < needle.length; j++) {
139
+ if (this.buffer[i + j] !== needle[j]) {
140
+ continue outer;
141
+ }
142
+ }
143
+ return i;
144
+ }
145
+ return -1;
146
+ }
147
+ equals(other) {
148
+ if (this === other) {
149
+ return true;
150
+ }
151
+ if (this.byteLength !== other.byteLength) {
152
+ return false;
153
+ }
154
+ return this.buffer.every((value, index) => value === other.buffer[index]);
155
+ }
39
156
  }
40
157
  //# sourceMappingURL=buffer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"buffer.js","sourceRoot":"","sources":["../../src/core/buffer.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG;;;;;;;;;;GAUG;AACH,MAAM,OAAO,QAAQ;IAEpB,MAAM,CAAC,UAAU,CAAC,MAAc;QAC/B,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,MAAkB;QAC7B,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,UAAkB;QAC9B,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC;IACrD,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,OAA4B;QACzC,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAChE,CAAC;IAID,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;QAC9C,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IACrC,CAAC;IAED,QAAQ;QACP,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACzG,CAAC;IAED,KAAK,CAAC,KAAc,EAAE,GAAY;QACjC,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;IACvD,CAAC;CACD"}
1
+ {"version":3,"file":"buffer.js","sourceRoot":"","sources":["../../src/core/buffer.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,0 +1,40 @@
1
+ export interface ParsedPath {
2
+ root: string;
3
+ dir: string;
4
+ base: string;
5
+ ext: string;
6
+ name: string;
7
+ }
8
+ export interface IPath {
9
+ normalize(path: string): string;
10
+ isAbsolute(path: string): boolean;
11
+ join(...paths: string[]): string;
12
+ resolve(...pathSegments: string[]): string;
13
+ relative(from: string, to: string): string;
14
+ dirname(path: string): string;
15
+ basename(path: string, suffix?: string): string;
16
+ extname(path: string): string;
17
+ format(pathObject: ParsedPath): string;
18
+ parse(path: string): ParsedPath;
19
+ toNamespacedPath(path: string): string;
20
+ sep: '\\' | '/';
21
+ delimiter: string;
22
+ win32: IPath | null;
23
+ posix: IPath | null;
24
+ }
25
+ export declare const win32: IPath;
26
+ export declare const posix: IPath;
27
+ export declare const normalize: (path: string) => string;
28
+ export declare const isAbsolute: (path: string) => boolean;
29
+ export declare const join: (...paths: string[]) => string;
30
+ export declare const resolve: (...pathSegments: string[]) => string;
31
+ export declare const relative: (from: string, to: string) => string;
32
+ export declare const dirname: (path: string) => string;
33
+ export declare const basename: (path: string, suffix?: string) => string;
34
+ export declare const extname: (path: string) => string;
35
+ export declare const format: (pathObject: ParsedPath) => string;
36
+ export declare const parse: (path: string) => ParsedPath;
37
+ export declare const toNamespacedPath: (path: string) => string;
38
+ export declare const sep: "/" | "\\";
39
+ export declare const delimiter: string;
40
+ //# sourceMappingURL=path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/core/path.ts"],"names":[],"mappings":"AAwLA,MAAM,WAAW,UAAU;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,KAAK;IACrB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,UAAU,CAAC,IAAI,EAAE,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