vibecodepilot 0.0.0-stage → 1.0.0

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 (157) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +174 -2
  3. package/apps/dashboard/dist/assets/index-CqhDXwBX.css +1 -0
  4. package/apps/dashboard/dist/assets/index-DB7dE_Nn.js +493 -0
  5. package/apps/dashboard/dist/index.html +31 -0
  6. package/apps/dashboard/dist-server/serve-dashboard.cjs +99 -0
  7. package/apps/dashboard/package.json +23 -0
  8. package/apps/server/dist/db/database.d.ts +91 -0
  9. package/apps/server/dist/db/database.d.ts.map +1 -0
  10. package/apps/server/dist/db/database.js +902 -0
  11. package/apps/server/dist/db/database.js.map +1 -0
  12. package/apps/server/dist/index.d.ts +2 -0
  13. package/apps/server/dist/index.d.ts.map +1 -0
  14. package/apps/server/dist/index.js +2262 -0
  15. package/apps/server/dist/index.js.map +1 -0
  16. package/apps/server/dist/services/agentWorkspaceService.d.ts +89 -0
  17. package/apps/server/dist/services/agentWorkspaceService.d.ts.map +1 -0
  18. package/apps/server/dist/services/agentWorkspaceService.js +243 -0
  19. package/apps/server/dist/services/agentWorkspaceService.js.map +1 -0
  20. package/apps/server/dist/services/monitorService.d.ts +118 -0
  21. package/apps/server/dist/services/monitorService.d.ts.map +1 -0
  22. package/apps/server/dist/services/monitorService.js +497 -0
  23. package/apps/server/dist/services/monitorService.js.map +1 -0
  24. package/apps/server/dist/services/projectFlowGraph.d.ts +70 -0
  25. package/apps/server/dist/services/projectFlowGraph.d.ts.map +1 -0
  26. package/apps/server/dist/services/projectFlowGraph.js +254 -0
  27. package/apps/server/dist/services/projectFlowGraph.js.map +1 -0
  28. package/apps/server/dist/tech-detector.d.ts +2 -0
  29. package/apps/server/dist/tech-detector.d.ts.map +1 -0
  30. package/apps/server/dist/tech-detector.js +154 -0
  31. package/apps/server/dist/tech-detector.js.map +1 -0
  32. package/apps/server/dist/workspace-tools.d.ts +43 -0
  33. package/apps/server/dist/workspace-tools.d.ts.map +1 -0
  34. package/apps/server/dist/workspace-tools.js +160 -0
  35. package/apps/server/dist/workspace-tools.js.map +1 -0
  36. package/apps/server/package.json +24 -0
  37. package/node_modules/@VibeCodePilot/agent-registry/dist/index.d.ts +21 -0
  38. package/node_modules/@VibeCodePilot/agent-registry/dist/index.d.ts.map +1 -0
  39. package/node_modules/@VibeCodePilot/agent-registry/dist/index.js +194 -0
  40. package/node_modules/@VibeCodePilot/agent-registry/dist/index.js.map +1 -0
  41. package/node_modules/@VibeCodePilot/agent-registry/package.json +18 -0
  42. package/node_modules/@VibeCodePilot/git-worktrees/dist/index.d.ts +48 -0
  43. package/node_modules/@VibeCodePilot/git-worktrees/dist/index.d.ts.map +1 -0
  44. package/node_modules/@VibeCodePilot/git-worktrees/dist/index.js +121 -0
  45. package/node_modules/@VibeCodePilot/git-worktrees/dist/index.js.map +1 -0
  46. package/node_modules/@VibeCodePilot/git-worktrees/package.json +18 -0
  47. package/node_modules/@VibeCodePilot/inference-gateway/dist/index.d.ts +54 -0
  48. package/node_modules/@VibeCodePilot/inference-gateway/dist/index.d.ts.map +1 -0
  49. package/node_modules/@VibeCodePilot/inference-gateway/dist/index.js +157 -0
  50. package/node_modules/@VibeCodePilot/inference-gateway/dist/index.js.map +1 -0
  51. package/node_modules/@VibeCodePilot/inference-gateway/package.json +19 -0
  52. package/node_modules/@VibeCodePilot/integration/dist/index.d.ts +13 -0
  53. package/node_modules/@VibeCodePilot/integration/dist/index.d.ts.map +1 -0
  54. package/node_modules/@VibeCodePilot/integration/dist/index.js +83 -0
  55. package/node_modules/@VibeCodePilot/integration/dist/index.js.map +1 -0
  56. package/node_modules/@VibeCodePilot/integration/package.json +20 -0
  57. package/node_modules/@VibeCodePilot/model-manager/dist/index.d.ts +44 -0
  58. package/node_modules/@VibeCodePilot/model-manager/dist/index.d.ts.map +1 -0
  59. package/node_modules/@VibeCodePilot/model-manager/dist/index.js +192 -0
  60. package/node_modules/@VibeCodePilot/model-manager/dist/index.js.map +1 -0
  61. package/node_modules/@VibeCodePilot/model-manager/package.json +19 -0
  62. package/node_modules/@VibeCodePilot/permissions/dist/engine.d.ts +95 -0
  63. package/node_modules/@VibeCodePilot/permissions/dist/engine.d.ts.map +1 -0
  64. package/node_modules/@VibeCodePilot/permissions/dist/engine.js +294 -0
  65. package/node_modules/@VibeCodePilot/permissions/dist/engine.js.map +1 -0
  66. package/node_modules/@VibeCodePilot/permissions/dist/index.d.ts +4 -0
  67. package/node_modules/@VibeCodePilot/permissions/dist/index.d.ts.map +1 -0
  68. package/node_modules/@VibeCodePilot/permissions/dist/index.js +20 -0
  69. package/node_modules/@VibeCodePilot/permissions/dist/index.js.map +1 -0
  70. package/node_modules/@VibeCodePilot/permissions/dist/security.d.ts +31 -0
  71. package/node_modules/@VibeCodePilot/permissions/dist/security.d.ts.map +1 -0
  72. package/node_modules/@VibeCodePilot/permissions/dist/security.js +129 -0
  73. package/node_modules/@VibeCodePilot/permissions/dist/security.js.map +1 -0
  74. package/node_modules/@VibeCodePilot/permissions/dist/types.d.ts +108 -0
  75. package/node_modules/@VibeCodePilot/permissions/dist/types.d.ts.map +1 -0
  76. package/node_modules/@VibeCodePilot/permissions/dist/types.js +3 -0
  77. package/node_modules/@VibeCodePilot/permissions/dist/types.js.map +1 -0
  78. package/node_modules/@VibeCodePilot/permissions/package.json +20 -0
  79. package/node_modules/@VibeCodePilot/planner/dist/index.d.ts +35 -0
  80. package/node_modules/@VibeCodePilot/planner/dist/index.d.ts.map +1 -0
  81. package/node_modules/@VibeCodePilot/planner/dist/index.js +592 -0
  82. package/node_modules/@VibeCodePilot/planner/dist/index.js.map +1 -0
  83. package/node_modules/@VibeCodePilot/planner/package.json +19 -0
  84. package/node_modules/@VibeCodePilot/promoter/dist/index.d.ts +11 -0
  85. package/node_modules/@VibeCodePilot/promoter/dist/index.d.ts.map +1 -0
  86. package/node_modules/@VibeCodePilot/promoter/dist/index.js +117 -0
  87. package/node_modules/@VibeCodePilot/promoter/dist/index.js.map +1 -0
  88. package/node_modules/@VibeCodePilot/promoter/package.json +19 -0
  89. package/node_modules/@VibeCodePilot/prompter/dist/index.d.ts +17 -0
  90. package/node_modules/@VibeCodePilot/prompter/dist/index.d.ts.map +1 -0
  91. package/node_modules/@VibeCodePilot/prompter/dist/index.js +216 -0
  92. package/node_modules/@VibeCodePilot/prompter/dist/index.js.map +1 -0
  93. package/node_modules/@VibeCodePilot/prompter/package.json +20 -0
  94. package/node_modules/@VibeCodePilot/provider-ollama/dist/index.d.ts +58 -0
  95. package/node_modules/@VibeCodePilot/provider-ollama/dist/index.d.ts.map +1 -0
  96. package/node_modules/@VibeCodePilot/provider-ollama/dist/index.js +384 -0
  97. package/node_modules/@VibeCodePilot/provider-ollama/dist/index.js.map +1 -0
  98. package/node_modules/@VibeCodePilot/provider-ollama/package.json +18 -0
  99. package/node_modules/@VibeCodePilot/shared/dist/index.d.ts +595 -0
  100. package/node_modules/@VibeCodePilot/shared/dist/index.d.ts.map +1 -0
  101. package/node_modules/@VibeCodePilot/shared/dist/index.js +24 -0
  102. package/node_modules/@VibeCodePilot/shared/dist/index.js.map +1 -0
  103. package/node_modules/@VibeCodePilot/shared/dist/version.d.ts +14 -0
  104. package/node_modules/@VibeCodePilot/shared/dist/version.d.ts.map +1 -0
  105. package/node_modules/@VibeCodePilot/shared/dist/version.js +17 -0
  106. package/node_modules/@VibeCodePilot/shared/dist/version.js.map +1 -0
  107. package/node_modules/@VibeCodePilot/shared/package.json +24 -0
  108. package/node_modules/@VibeCodePilot/skill-registry/dist/index.d.ts +15 -0
  109. package/node_modules/@VibeCodePilot/skill-registry/dist/index.d.ts.map +1 -0
  110. package/node_modules/@VibeCodePilot/skill-registry/dist/index.js +126 -0
  111. package/node_modules/@VibeCodePilot/skill-registry/dist/index.js.map +1 -0
  112. package/node_modules/@VibeCodePilot/skill-registry/package.json +18 -0
  113. package/node_modules/@VibeCodePilot/supervisor/dist/index.d.ts +31 -0
  114. package/node_modules/@VibeCodePilot/supervisor/dist/index.d.ts.map +1 -0
  115. package/node_modules/@VibeCodePilot/supervisor/dist/index.js +219 -0
  116. package/node_modules/@VibeCodePilot/supervisor/dist/index.js.map +1 -0
  117. package/node_modules/@VibeCodePilot/supervisor/package.json +19 -0
  118. package/node_modules/@VibeCodePilot/task-scheduler/dist/index.d.ts +29 -0
  119. package/node_modules/@VibeCodePilot/task-scheduler/dist/index.d.ts.map +1 -0
  120. package/node_modules/@VibeCodePilot/task-scheduler/dist/index.js +128 -0
  121. package/node_modules/@VibeCodePilot/task-scheduler/dist/index.js.map +1 -0
  122. package/node_modules/@VibeCodePilot/task-scheduler/package.json +20 -0
  123. package/package.json +114 -4
  124. package/packages/agent-registry/package.json +18 -0
  125. package/packages/cli/bin/vibepilot.js +28 -0
  126. package/packages/cli/dist/config.js +143 -0
  127. package/packages/cli/dist/doctor.js +64 -0
  128. package/packages/cli/dist/index.js +260 -0
  129. package/packages/cli/dist/ollama.js +39 -0
  130. package/packages/cli/dist/pidmanager.js +153 -0
  131. package/packages/cli/dist/runtime.js +97 -0
  132. package/packages/cli/dist/servicemanager.js +227 -0
  133. package/packages/cli/package.json +25 -0
  134. package/packages/git-worktrees/package.json +18 -0
  135. package/packages/inference-gateway/package.json +19 -0
  136. package/packages/integration/package.json +20 -0
  137. package/packages/model-manager/package.json +19 -0
  138. package/packages/permissions/package.json +20 -0
  139. package/packages/planner/package.json +19 -0
  140. package/packages/promoter/package.json +19 -0
  141. package/packages/prompter/package.json +20 -0
  142. package/packages/providers/ollama/package.json +18 -0
  143. package/packages/shared/package.json +24 -0
  144. package/packages/skill-registry/package.json +18 -0
  145. package/packages/supervisor/package.json +19 -0
  146. package/packages/task-scheduler/package.json +20 -0
  147. package/skills/ai-ml/aiml-planning.json +22 -0
  148. package/skills/ai-ml/backend-planning.json +31 -0
  149. package/skills/ai-ml/frontend-planning.json +19 -0
  150. package/skills/ai-ml/ollama-local.json +11 -0
  151. package/skills/ai-ml/prompt-engineering.json +31 -0
  152. package/skills/ai-ml/task-planning.json +30 -0
  153. package/skills/backend/python-fastapi.json +11 -0
  154. package/skills/backend/ruby-rails.json +11 -0
  155. package/skills/backend/typescript-nodejs.json +11 -0
  156. package/skills/frontend/react-typescript.json +11 -0
  157. package/tsconfig.base.json +16 -0
@@ -0,0 +1,384 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OllamaProvider = exports.LEVEL_THINKING_PATTERN = exports.KNOWN_THINKING_PATTERN = void 0;
4
+ exports.KNOWN_THINKING_PATTERN = /deepseek-r1|qwq|qwen3|gemma4|gpt-oss|thinking|reasoning|\br1\b/i;
5
+ exports.LEVEL_THINKING_PATTERN = /gpt-oss/i;
6
+ function inferThinkingSupport(modelName, family, capabilities) {
7
+ const hasCapability = Array.isArray(capabilities)
8
+ ? capabilities.includes('thinking')
9
+ : exports.KNOWN_THINKING_PATTERN.test(modelName) ||
10
+ exports.KNOWN_THINKING_PATTERN.test(family || '');
11
+ if (!hasCapability) {
12
+ return {
13
+ supportsThinking: false,
14
+ thinkingMode: 'none',
15
+ };
16
+ }
17
+ const supportsLevels = exports.LEVEL_THINKING_PATTERN.test(modelName) ||
18
+ exports.LEVEL_THINKING_PATTERN.test(family || '');
19
+ return {
20
+ supportsThinking: true,
21
+ thinkingMode: supportsLevels ? 'levels' : 'boolean',
22
+ };
23
+ }
24
+ class OllamaProvider {
25
+ endpoint;
26
+ thinkingModeCache = new Map();
27
+ constructor(endpoint = 'http://localhost:11434') {
28
+ this.endpoint = endpoint.replace(/\/$/, '');
29
+ }
30
+ setEndpoint(endpoint) {
31
+ this.endpoint = endpoint.replace(/\/$/, '');
32
+ }
33
+ getEndpoint() {
34
+ return this.endpoint;
35
+ }
36
+ async checkHealth() {
37
+ const controller = new AbortController();
38
+ const timeoutId = setTimeout(() => controller.abort(), 2500);
39
+ try {
40
+ const res = await fetch(`${this.endpoint}/api/version`, {
41
+ signal: controller.signal,
42
+ });
43
+ if (!res.ok) {
44
+ return {
45
+ online: false,
46
+ error: `HTTP ${res.status}: ${res.statusText}`,
47
+ };
48
+ }
49
+ const data = (await res.json());
50
+ return {
51
+ online: true,
52
+ version: data.version,
53
+ };
54
+ }
55
+ catch (err) {
56
+ return {
57
+ online: false,
58
+ error: err.message ||
59
+ `Could not connect to Ollama daemon at ${this.endpoint}`,
60
+ };
61
+ }
62
+ finally {
63
+ clearTimeout(timeoutId);
64
+ }
65
+ }
66
+ async showModel(modelName) {
67
+ try {
68
+ const res = await fetch(`${this.endpoint}/api/show`, {
69
+ method: 'POST',
70
+ headers: {
71
+ 'Content-Type': 'application/json',
72
+ },
73
+ body: JSON.stringify({
74
+ model: modelName,
75
+ }),
76
+ signal: AbortSignal.timeout(2000),
77
+ });
78
+ if (!res.ok)
79
+ return null;
80
+ const data = (await res.json());
81
+ return {
82
+ capabilities: Array.isArray(data.capabilities)
83
+ ? data.capabilities
84
+ : undefined,
85
+ family: data.details?.family,
86
+ };
87
+ }
88
+ catch {
89
+ return null;
90
+ }
91
+ }
92
+ async listModels() {
93
+ try {
94
+ const res = await fetch(`${this.endpoint}/api/tags`);
95
+ if (!res.ok) {
96
+ throw new Error(`Failed to list models: ${res.statusText}`);
97
+ }
98
+ const data = (await res.json());
99
+ if (!Array.isArray(data.models))
100
+ return [];
101
+ return await Promise.all(data.models.map(async (model) => {
102
+ const show = await this.showModel(model.name);
103
+ const family = show?.family ?? model.details?.family;
104
+ const capabilities = show?.capabilities;
105
+ const { supportsThinking, thinkingMode, } = inferThinkingSupport(model.name, family, capabilities);
106
+ this.thinkingModeCache.set(model.name, thinkingMode);
107
+ return {
108
+ name: model.name,
109
+ size: model.size,
110
+ digest: model.digest,
111
+ modified_at: model.modified_at,
112
+ family,
113
+ parameter_size: model.details?.parameter_size,
114
+ quantization_level: model.details?.quantization_level,
115
+ capabilities,
116
+ supportsThinking,
117
+ thinkingMode,
118
+ };
119
+ }));
120
+ }
121
+ catch {
122
+ return [];
123
+ }
124
+ }
125
+ resolveThinkPayload(model, think) {
126
+ if (think === undefined)
127
+ return undefined;
128
+ const mode = this.thinkingModeCache.get(model) ??
129
+ inferThinkingSupport(model).thinkingMode;
130
+ if (mode === 'none')
131
+ return undefined;
132
+ if (think === false || think === 'off')
133
+ return false;
134
+ if (think === true)
135
+ return true;
136
+ if (mode === 'levels') {
137
+ return think;
138
+ }
139
+ return true;
140
+ }
141
+ async generate(options) {
142
+ const useStream = options.stream ?? true;
143
+ const payload = {
144
+ model: options.model,
145
+ prompt: options.prompt,
146
+ stream: useStream,
147
+ options: {},
148
+ };
149
+ if (options.system) {
150
+ payload.system = options.system;
151
+ }
152
+ if (options.temperature !== undefined) {
153
+ payload.options.temperature = options.temperature;
154
+ }
155
+ if (options.contextLength !== undefined) {
156
+ payload.options.num_ctx = options.contextLength;
157
+ }
158
+ const resolvedThink = this.resolveThinkPayload(options.model, options.think);
159
+ if (resolvedThink !== undefined) {
160
+ payload.think = resolvedThink;
161
+ }
162
+ const res = await fetch(`${this.endpoint}/api/generate`, {
163
+ method: 'POST',
164
+ headers: {
165
+ 'Content-Type': 'application/json',
166
+ },
167
+ body: JSON.stringify(payload),
168
+ signal: AbortSignal.timeout(600000),
169
+ });
170
+ if (!res.ok) {
171
+ const txt = await res.text();
172
+ throw new Error(`Ollama generation error (${res.status}): ${txt}`);
173
+ }
174
+ if (!useStream) {
175
+ const data = (await res.json());
176
+ const thinking = typeof data.thinking === 'string'
177
+ ? data.thinking
178
+ : undefined;
179
+ let content = data.response || '';
180
+ if (!content && thinking) {
181
+ content = thinking.replace(/<\/?(?:think|thinking)>/g, '').trim();
182
+ }
183
+ return {
184
+ response: content,
185
+ thinking,
186
+ totalDuration: data.total_duration,
187
+ evalCount: data.eval_count,
188
+ promptEvalCount: data.prompt_eval_count,
189
+ };
190
+ }
191
+ return readStreamingResponse(res, (chunk) => chunk.response || '', options.onChunk);
192
+ }
193
+ async chat(options) {
194
+ const useStream = options.stream ?? true;
195
+ const payload = {
196
+ model: options.model,
197
+ messages: options.messages,
198
+ stream: useStream,
199
+ options: {},
200
+ };
201
+ if (options.temperature !== undefined) {
202
+ payload.options.temperature = options.temperature;
203
+ }
204
+ if (options.contextLength !== undefined) {
205
+ payload.options.num_ctx = options.contextLength;
206
+ }
207
+ const resolvedThink = this.resolveThinkPayload(options.model, options.think);
208
+ if (resolvedThink !== undefined) {
209
+ payload.think = resolvedThink;
210
+ }
211
+ const res = await fetch(`${this.endpoint}/api/chat`, {
212
+ method: 'POST',
213
+ headers: {
214
+ 'Content-Type': 'application/json',
215
+ },
216
+ body: JSON.stringify(payload),
217
+ signal: AbortSignal.timeout(600000),
218
+ });
219
+ if (!res.ok) {
220
+ const txt = await res.text();
221
+ throw new Error(`Ollama chat error (${res.status}): ${txt}`);
222
+ }
223
+ if (!useStream) {
224
+ const data = (await res.json());
225
+ const thinking = data.message?.thinking ?? data.thinking;
226
+ let content = data.message?.content || '';
227
+ if (!content && thinking) {
228
+ content = thinking.replace(/<\/?(?:think|thinking)>/g, '').trim();
229
+ }
230
+ return {
231
+ response: content,
232
+ thinking,
233
+ totalDuration: data.total_duration,
234
+ evalCount: data.eval_count,
235
+ promptEvalCount: data.prompt_eval_count,
236
+ };
237
+ }
238
+ return readStreamingResponse(res, (chunk) => chunk.message?.content || '', options.onChunk);
239
+ }
240
+ async deleteModel(modelName) {
241
+ const res = await fetch(`${this.endpoint}/api/delete`, {
242
+ method: 'DELETE',
243
+ headers: {
244
+ 'Content-Type': 'application/json',
245
+ },
246
+ body: JSON.stringify({
247
+ model: modelName,
248
+ }),
249
+ signal: AbortSignal.timeout(30000),
250
+ });
251
+ if (!res.ok) {
252
+ const txt = await res.text().catch(() => '');
253
+ throw new Error(`Failed to delete model ${modelName} (HTTP ${res.status}): ${txt || res.statusText}`);
254
+ }
255
+ this.thinkingModeCache.delete(modelName);
256
+ }
257
+ async pullModel(modelName, onProgress) {
258
+ const res = await fetch(`${this.endpoint}/api/pull`, {
259
+ method: 'POST',
260
+ headers: {
261
+ 'Content-Type': 'application/json',
262
+ },
263
+ body: JSON.stringify({
264
+ name: modelName,
265
+ stream: true,
266
+ }),
267
+ });
268
+ if (!res.ok) {
269
+ const txt = await res.text();
270
+ throw new Error(`Failed to pull model ${modelName}: ${txt}`);
271
+ }
272
+ if (!res.body)
273
+ return;
274
+ const reader = res.body.getReader();
275
+ const decoder = new TextDecoder();
276
+ let buffer = '';
277
+ while (true) {
278
+ const { done, value } = await reader.read();
279
+ if (done)
280
+ break;
281
+ buffer += decoder.decode(value, {
282
+ stream: true,
283
+ });
284
+ const lines = buffer.split('\n');
285
+ buffer = lines.pop() || '';
286
+ for (const line of lines) {
287
+ if (!line.trim())
288
+ continue;
289
+ try {
290
+ const parsed = JSON.parse(line);
291
+ onProgress?.(parsed.status, parsed.completed, parsed.total);
292
+ }
293
+ catch {
294
+ // Ignore malformed chunks.
295
+ }
296
+ }
297
+ }
298
+ buffer += decoder.decode();
299
+ if (buffer.trim()) {
300
+ try {
301
+ const parsed = JSON.parse(buffer);
302
+ onProgress?.(parsed.status, parsed.completed, parsed.total);
303
+ }
304
+ catch {
305
+ // Ignore malformed final chunk.
306
+ }
307
+ }
308
+ }
309
+ }
310
+ exports.OllamaProvider = OllamaProvider;
311
+ async function readStreamingResponse(res, pick, onChunk) {
312
+ if (!res.body) {
313
+ const data = (await res.json());
314
+ return {
315
+ response: pick(data),
316
+ thinking: data.message?.thinking ?? data.thinking,
317
+ totalDuration: data.total_duration,
318
+ evalCount: data.eval_count,
319
+ promptEvalCount: data.prompt_eval_count,
320
+ };
321
+ }
322
+ const reader = res.body.getReader();
323
+ const decoder = new TextDecoder();
324
+ let buffer = '';
325
+ let content = '';
326
+ let thinking = '';
327
+ let totalDuration;
328
+ let evalCount;
329
+ let promptEvalCount;
330
+ const consume = (line) => {
331
+ if (!line.trim())
332
+ return;
333
+ try {
334
+ const chunk = JSON.parse(line);
335
+ const contentChunk = pick(chunk);
336
+ content += contentChunk;
337
+ const thinkingChunk = chunk.message?.thinking ?? chunk.thinking;
338
+ if (typeof thinkingChunk === 'string') {
339
+ thinking += thinkingChunk;
340
+ }
341
+ if (chunk.prompt_eval_count !== undefined) {
342
+ promptEvalCount = chunk.prompt_eval_count;
343
+ }
344
+ if (chunk.total_duration !== undefined) {
345
+ totalDuration = chunk.total_duration;
346
+ }
347
+ if (chunk.eval_count !== undefined) {
348
+ evalCount = chunk.eval_count;
349
+ }
350
+ onChunk?.(chunk);
351
+ }
352
+ catch {
353
+ // Ignore malformed JSON chunks.
354
+ }
355
+ };
356
+ while (true) {
357
+ const { done, value } = await reader.read();
358
+ if (done)
359
+ break;
360
+ buffer += decoder.decode(value, {
361
+ stream: true,
362
+ });
363
+ const lines = buffer.split('\n');
364
+ buffer = lines.pop() || '';
365
+ for (const line of lines) {
366
+ consume(line);
367
+ }
368
+ }
369
+ buffer += decoder.decode();
370
+ if (buffer.trim()) {
371
+ consume(buffer);
372
+ }
373
+ if (!content && thinking) {
374
+ content = thinking.replace(/<\/?(?:think|thinking)>/g, '').trim();
375
+ }
376
+ return {
377
+ response: content,
378
+ thinking: thinking || undefined,
379
+ totalDuration,
380
+ evalCount,
381
+ promptEvalCount,
382
+ };
383
+ }
384
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AA+Ba,QAAA,sBAAsB,GACjC,iEAAiE,CAAC;AAEvD,QAAA,sBAAsB,GAAG,UAAU,CAAC;AAEjD,SAAS,oBAAoB,CAC3B,SAAiB,EACjB,MAAe,EACf,YAAuB;IAKvB,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;QAC/C,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC;QACnC,CAAC,CAAC,8BAAsB,CAAC,IAAI,CAAC,SAAS,CAAC;YACtC,8BAAsB,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;IAE9C,IAAI,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QACT,eAAe;KAChB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "@VibeCodePilot/provider-ollama",
3
+ "version": "1.0.0",
4
+ "main": "./dist/index.js",
5
+ "types": "./dist/index.d.ts",
6
+ "scripts": {
7
+ "build": "tsc"
8
+ },
9
+ "dependencies": {
10
+ "@VibeCodePilot/shared": "*"
11
+ },
12
+ "devDependencies": {
13
+ "typescript": "^5.7.3"
14
+ },
15
+ "files": [
16
+ "dist/"
17
+ ]
18
+ }