@fgv/ts-extras-ollama 5.1.0-34

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 (65) hide show
  1. package/.rush/temp/b70e5f6b6ada97ea70c5583027ea2b58b27bef46.tar.log +54 -0
  2. package/.rush/temp/chunked-rush-logs/ts-extras-ollama.build.chunks.jsonl +9 -0
  3. package/.rush/temp/operation/build/all.log +9 -0
  4. package/.rush/temp/operation/build/log-chunks.jsonl +9 -0
  5. package/.rush/temp/operation/build/state.json +3 -0
  6. package/.rush/temp/shrinkwrap-deps.json +681 -0
  7. package/CHANGELOG.json +4 -0
  8. package/README.md +105 -0
  9. package/config/api-extractor.json +38 -0
  10. package/config/jest.config.json +13 -0
  11. package/config/rig.json +6 -0
  12. package/dist/index.js +388 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/test/unit/chatStructured.test.js +287 -0
  15. package/dist/test/unit/chatStructured.test.js.map +1 -0
  16. package/dist/test/unit/fixtures/wireFixtures.js +90 -0
  17. package/dist/test/unit/fixtures/wireFixtures.js.map +1 -0
  18. package/dist/test/unit/modelManagement.test.js +118 -0
  19. package/dist/test/unit/modelManagement.test.js.map +1 -0
  20. package/dist/test/unit/ollamaClient.test.js +38 -0
  21. package/dist/test/unit/ollamaClient.test.js.map +1 -0
  22. package/dist/test/unit/pullModel.test.js +202 -0
  23. package/dist/test/unit/pullModel.test.js.map +1 -0
  24. package/dist/ts-extras-ollama.d.ts +365 -0
  25. package/dist/tsdoc-metadata.json +11 -0
  26. package/eslint.config.js +15 -0
  27. package/etc/ts-extras-ollama.api.md +139 -0
  28. package/lib/index.d.ts +341 -0
  29. package/lib/index.d.ts.map +1 -0
  30. package/lib/index.js +397 -0
  31. package/lib/index.js.map +1 -0
  32. package/lib/test/unit/chatStructured.test.d.ts +2 -0
  33. package/lib/test/unit/chatStructured.test.d.ts.map +1 -0
  34. package/lib/test/unit/chatStructured.test.js +289 -0
  35. package/lib/test/unit/chatStructured.test.js.map +1 -0
  36. package/lib/test/unit/fixtures/wireFixtures.d.ts +19 -0
  37. package/lib/test/unit/fixtures/wireFixtures.d.ts.map +1 -0
  38. package/lib/test/unit/fixtures/wireFixtures.js +93 -0
  39. package/lib/test/unit/fixtures/wireFixtures.js.map +1 -0
  40. package/lib/test/unit/modelManagement.test.d.ts +2 -0
  41. package/lib/test/unit/modelManagement.test.d.ts.map +1 -0
  42. package/lib/test/unit/modelManagement.test.js +120 -0
  43. package/lib/test/unit/modelManagement.test.js.map +1 -0
  44. package/lib/test/unit/ollamaClient.test.d.ts +2 -0
  45. package/lib/test/unit/ollamaClient.test.d.ts.map +1 -0
  46. package/lib/test/unit/ollamaClient.test.js +40 -0
  47. package/lib/test/unit/ollamaClient.test.js.map +1 -0
  48. package/lib/test/unit/pullModel.test.d.ts +2 -0
  49. package/lib/test/unit/pullModel.test.d.ts.map +1 -0
  50. package/lib/test/unit/pullModel.test.js +204 -0
  51. package/lib/test/unit/pullModel.test.js.map +1 -0
  52. package/package.json +83 -0
  53. package/rush-logs/ts-extras-ollama.build.cache.log +3 -0
  54. package/rush-logs/ts-extras-ollama.build.log +9 -0
  55. package/src/index.ts +655 -0
  56. package/src/test/unit/chatStructured.test.ts +330 -0
  57. package/src/test/unit/fixtures/wireFixtures.ts +95 -0
  58. package/src/test/unit/modelManagement.test.ts +128 -0
  59. package/src/test/unit/ollamaClient.test.ts +44 -0
  60. package/src/test/unit/pullModel.test.ts +220 -0
  61. package/temp/build/lint/_eslint-5eVG3S6w.json +30 -0
  62. package/temp/build/typescript/ts_8nwakTlr.json +1 -0
  63. package/temp/ts-extras-ollama.api.json +2528 -0
  64. package/temp/ts-extras-ollama.api.md +139 -0
  65. package/tsconfig.json +8 -0
@@ -0,0 +1,2528 @@
1
+ {
2
+ "metadata": {
3
+ "toolPackage": "@microsoft/api-extractor",
4
+ "toolVersion": "7.58.7",
5
+ "schemaVersion": 1011,
6
+ "oldestForwardsCompatibleVersion": 1001,
7
+ "tsdocConfig": {
8
+ "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
9
+ "noStandardTags": true,
10
+ "tagDefinitions": [
11
+ {
12
+ "tagName": "@alpha",
13
+ "syntaxKind": "modifier"
14
+ },
15
+ {
16
+ "tagName": "@beta",
17
+ "syntaxKind": "modifier"
18
+ },
19
+ {
20
+ "tagName": "@defaultValue",
21
+ "syntaxKind": "block"
22
+ },
23
+ {
24
+ "tagName": "@decorator",
25
+ "syntaxKind": "block",
26
+ "allowMultiple": true
27
+ },
28
+ {
29
+ "tagName": "@deprecated",
30
+ "syntaxKind": "block"
31
+ },
32
+ {
33
+ "tagName": "@eventProperty",
34
+ "syntaxKind": "modifier"
35
+ },
36
+ {
37
+ "tagName": "@example",
38
+ "syntaxKind": "block",
39
+ "allowMultiple": true
40
+ },
41
+ {
42
+ "tagName": "@experimental",
43
+ "syntaxKind": "modifier"
44
+ },
45
+ {
46
+ "tagName": "@inheritDoc",
47
+ "syntaxKind": "inline"
48
+ },
49
+ {
50
+ "tagName": "@internal",
51
+ "syntaxKind": "modifier"
52
+ },
53
+ {
54
+ "tagName": "@label",
55
+ "syntaxKind": "inline"
56
+ },
57
+ {
58
+ "tagName": "@link",
59
+ "syntaxKind": "inline",
60
+ "allowMultiple": true
61
+ },
62
+ {
63
+ "tagName": "@override",
64
+ "syntaxKind": "modifier"
65
+ },
66
+ {
67
+ "tagName": "@packageDocumentation",
68
+ "syntaxKind": "modifier"
69
+ },
70
+ {
71
+ "tagName": "@param",
72
+ "syntaxKind": "block",
73
+ "allowMultiple": true
74
+ },
75
+ {
76
+ "tagName": "@privateRemarks",
77
+ "syntaxKind": "block"
78
+ },
79
+ {
80
+ "tagName": "@public",
81
+ "syntaxKind": "modifier"
82
+ },
83
+ {
84
+ "tagName": "@readonly",
85
+ "syntaxKind": "modifier"
86
+ },
87
+ {
88
+ "tagName": "@remarks",
89
+ "syntaxKind": "block"
90
+ },
91
+ {
92
+ "tagName": "@returns",
93
+ "syntaxKind": "block"
94
+ },
95
+ {
96
+ "tagName": "@sealed",
97
+ "syntaxKind": "modifier"
98
+ },
99
+ {
100
+ "tagName": "@see",
101
+ "syntaxKind": "block"
102
+ },
103
+ {
104
+ "tagName": "@throws",
105
+ "syntaxKind": "block",
106
+ "allowMultiple": true
107
+ },
108
+ {
109
+ "tagName": "@typeParam",
110
+ "syntaxKind": "block",
111
+ "allowMultiple": true
112
+ },
113
+ {
114
+ "tagName": "@virtual",
115
+ "syntaxKind": "modifier"
116
+ },
117
+ {
118
+ "tagName": "@jsx",
119
+ "syntaxKind": "block"
120
+ },
121
+ {
122
+ "tagName": "@jsxRuntime",
123
+ "syntaxKind": "block"
124
+ },
125
+ {
126
+ "tagName": "@jsxFrag",
127
+ "syntaxKind": "block"
128
+ },
129
+ {
130
+ "tagName": "@jsxImportSource",
131
+ "syntaxKind": "block"
132
+ },
133
+ {
134
+ "tagName": "@betaDocumentation",
135
+ "syntaxKind": "modifier"
136
+ },
137
+ {
138
+ "tagName": "@internalRemarks",
139
+ "syntaxKind": "block"
140
+ },
141
+ {
142
+ "tagName": "@preapproved",
143
+ "syntaxKind": "modifier"
144
+ }
145
+ ],
146
+ "supportForTags": {
147
+ "@alpha": true,
148
+ "@beta": true,
149
+ "@defaultValue": true,
150
+ "@decorator": true,
151
+ "@deprecated": true,
152
+ "@eventProperty": true,
153
+ "@example": true,
154
+ "@experimental": true,
155
+ "@inheritDoc": true,
156
+ "@internal": true,
157
+ "@label": true,
158
+ "@link": true,
159
+ "@override": true,
160
+ "@packageDocumentation": true,
161
+ "@param": true,
162
+ "@privateRemarks": true,
163
+ "@public": true,
164
+ "@readonly": true,
165
+ "@remarks": true,
166
+ "@returns": true,
167
+ "@sealed": true,
168
+ "@see": true,
169
+ "@throws": true,
170
+ "@typeParam": true,
171
+ "@virtual": true,
172
+ "@betaDocumentation": true,
173
+ "@internalRemarks": true,
174
+ "@preapproved": true
175
+ },
176
+ "reportUnsupportedHtmlElements": false
177
+ }
178
+ },
179
+ "kind": "Package",
180
+ "canonicalReference": "@fgv/ts-extras-ollama!",
181
+ "docComment": "/**\n * `@fgv/ts-extras-ollama` — Result-integration boundary over the official `ollama` JS library (Node-side).\n *\n * A thin facade that wraps the `ollama` client's native-API calls in `Result<T>` from `@fgv/ts-utils`, mirroring the discipline established by `@fgv/ts-extras-webauthn` and `@fgv/ts-extras-transformers`: one-line `captureResult` / `captureAsyncResult` wrappers around upstream primitives with **no opinionated orchestration** above the boundary.\n *\n * This package owns **exactly and only** the native-Ollama surface that the OpenAI-compatible `/v1` endpoint cannot express: model management (`/api/tags`, `/api/show`, `/api/ps`, `/api/delete`), streamed model pulls (`/api/pull`), and grammar-constrained structured output (`/api/chat` with a full-JSON-schema `format`). The text-completion / streaming / tool-use path is **not** duplicated here — `@fgv/ts-extras/ai-assist` owns it via the `/v1` compat layer (point a provider descriptor's `endpoint` at `http://localhost:11434/v1`).\n *\n * **Explicitly NOT in scope:** - Text completion / free-text chat / streaming chat (ai-assist owns it via `/v1`). - Browser / CORS path (Node-only at v0.1; a future `@fgv/ts-web-extras-ollama` is its home). - Model authoring / publishing (`push`, `create`, `copy`) — use the `ollama` lib directly. - `keep_alive` / model-lifecycle policy — pass-through only, no policy applied. - Pull-progress UI / rendering — `onProgress` hands raw chunks to the consumer. - Multi-host orchestration / connection pooling / retries / backoff — one client = one host.\n *\n * For any of the above, use the `ollama` library directly (with `captureAsyncResult` for your own Result wrapping); the opaque client handle returned by {@link createOllamaClient} is the upstream instance, so nothing this boundary omits is hidden from you.\n *\n * @packageDocumentation\n */\n",
182
+ "name": "@fgv/ts-extras-ollama",
183
+ "preserveMemberOrder": false,
184
+ "members": [
185
+ {
186
+ "kind": "EntryPoint",
187
+ "canonicalReference": "@fgv/ts-extras-ollama!",
188
+ "name": "",
189
+ "preserveMemberOrder": false,
190
+ "members": [
191
+ {
192
+ "kind": "Function",
193
+ "canonicalReference": "@fgv/ts-extras-ollama!chatStructured:function(1)",
194
+ "docComment": "/**\n * Single-turn grammar-constrained structured chat (`POST /api/chat` with `format` = full JSON schema). The fidelity win over ai-assist's prompt-and-parse path is **grammar-constrained sampling**: Ollama restricts the token sampler to the supplied schema, so the response is structurally guaranteed to match.\n *\n * The schema is the single source of truth: `schema.toJson()` (draft-07-sanitized) is sent as the wire `format`, and the same `schema.validate()` checks the reply — they cannot drift. `T` flows end-to-end from `JsonSchema.Static<typeof schema>`; no caller-supplied `T`, no cast.\n *\n * Runs over the streaming chat path internally, assembling the full document from the stream chunks and validating it whole — partial JSON has no validation value. (The design §4 sketch said `stream: false`, but the locked OQ-3 amendment requires an `AbortSignal`, and the `ollama` lib only threads a signal on the streaming path — its non-streaming request has no signal plumbing. The streaming `AbortableAsyncIterator.abort()` is \"the mechanism that already exists for `pullModel`\".) Any upstream error, abort, parse failure, or validation failure surfaces as a single `Failure` with context.\n *\n * @param client - A client from {@link createOllamaClient}.\n *\n * @param params - {@link IChatStructuredParams} — model, messages, the `JsonSchema` schema, and optional `options` / `keepAlive` / `signal`.\n *\n * @returns `Promise<Result<IOllamaChatStructuredResult<T>>>`.\n *\n * @public\n */\n",
195
+ "excerptTokens": [
196
+ {
197
+ "kind": "Content",
198
+ "text": "export declare function chatStructured<T>(client: "
199
+ },
200
+ {
201
+ "kind": "Reference",
202
+ "text": "IOllamaClient",
203
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaClient:type"
204
+ },
205
+ {
206
+ "kind": "Content",
207
+ "text": ", params: "
208
+ },
209
+ {
210
+ "kind": "Reference",
211
+ "text": "IChatStructuredParams",
212
+ "canonicalReference": "@fgv/ts-extras-ollama!IChatStructuredParams:interface"
213
+ },
214
+ {
215
+ "kind": "Content",
216
+ "text": "<T>"
217
+ },
218
+ {
219
+ "kind": "Content",
220
+ "text": "): "
221
+ },
222
+ {
223
+ "kind": "Reference",
224
+ "text": "Promise",
225
+ "canonicalReference": "!Promise:interface"
226
+ },
227
+ {
228
+ "kind": "Content",
229
+ "text": "<"
230
+ },
231
+ {
232
+ "kind": "Reference",
233
+ "text": "Result",
234
+ "canonicalReference": "@fgv/ts-utils!Result:type"
235
+ },
236
+ {
237
+ "kind": "Content",
238
+ "text": "<"
239
+ },
240
+ {
241
+ "kind": "Reference",
242
+ "text": "IOllamaChatStructuredResult",
243
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaChatStructuredResult:interface"
244
+ },
245
+ {
246
+ "kind": "Content",
247
+ "text": "<T>>>"
248
+ },
249
+ {
250
+ "kind": "Content",
251
+ "text": ";"
252
+ }
253
+ ],
254
+ "fileUrlPath": "src/index.ts",
255
+ "returnTypeTokenRange": {
256
+ "startIndex": 6,
257
+ "endIndex": 12
258
+ },
259
+ "releaseTag": "Public",
260
+ "overloadIndex": 1,
261
+ "parameters": [
262
+ {
263
+ "parameterName": "client",
264
+ "parameterTypeTokenRange": {
265
+ "startIndex": 1,
266
+ "endIndex": 2
267
+ },
268
+ "isOptional": false
269
+ },
270
+ {
271
+ "parameterName": "params",
272
+ "parameterTypeTokenRange": {
273
+ "startIndex": 3,
274
+ "endIndex": 5
275
+ },
276
+ "isOptional": false
277
+ }
278
+ ],
279
+ "typeParameters": [
280
+ {
281
+ "typeParameterName": "T",
282
+ "constraintTokenRange": {
283
+ "startIndex": 0,
284
+ "endIndex": 0
285
+ },
286
+ "defaultTypeTokenRange": {
287
+ "startIndex": 0,
288
+ "endIndex": 0
289
+ }
290
+ }
291
+ ],
292
+ "name": "chatStructured"
293
+ },
294
+ {
295
+ "kind": "Function",
296
+ "canonicalReference": "@fgv/ts-extras-ollama!createOllamaClient:function(1)",
297
+ "docComment": "/**\n * Constructs an Ollama client. Synchronous (the constructor performs no I/O), so returns `Result<IOllamaClient>` rather than a promise. A malformed `host` (which the upstream constructor rejects) surfaces as `Result.fail`.\n *\n * @param params - Optional {@link ICreateOllamaClientParams}. Omitted fields fall back to the `ollama` library defaults.\n *\n * @returns `Result<IOllamaClient>` wrapping the upstream `Ollama` instance.\n *\n * @public\n */\n",
298
+ "excerptTokens": [
299
+ {
300
+ "kind": "Content",
301
+ "text": "export declare function createOllamaClient(params?: "
302
+ },
303
+ {
304
+ "kind": "Reference",
305
+ "text": "ICreateOllamaClientParams",
306
+ "canonicalReference": "@fgv/ts-extras-ollama!ICreateOllamaClientParams:interface"
307
+ },
308
+ {
309
+ "kind": "Content",
310
+ "text": "): "
311
+ },
312
+ {
313
+ "kind": "Reference",
314
+ "text": "Result",
315
+ "canonicalReference": "@fgv/ts-utils!Result:type"
316
+ },
317
+ {
318
+ "kind": "Content",
319
+ "text": "<"
320
+ },
321
+ {
322
+ "kind": "Reference",
323
+ "text": "IOllamaClient",
324
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaClient:type"
325
+ },
326
+ {
327
+ "kind": "Content",
328
+ "text": ">"
329
+ },
330
+ {
331
+ "kind": "Content",
332
+ "text": ";"
333
+ }
334
+ ],
335
+ "fileUrlPath": "src/index.ts",
336
+ "returnTypeTokenRange": {
337
+ "startIndex": 3,
338
+ "endIndex": 7
339
+ },
340
+ "releaseTag": "Public",
341
+ "overloadIndex": 1,
342
+ "parameters": [
343
+ {
344
+ "parameterName": "params",
345
+ "parameterTypeTokenRange": {
346
+ "startIndex": 1,
347
+ "endIndex": 2
348
+ },
349
+ "isOptional": true
350
+ }
351
+ ],
352
+ "name": "createOllamaClient"
353
+ },
354
+ {
355
+ "kind": "Function",
356
+ "canonicalReference": "@fgv/ts-extras-ollama!deleteModel:function(1)",
357
+ "docComment": "/**\n * Deletes a model from the local store (`DELETE /api/delete`). Returns a meaningful {@link IOllamaDeleteResult} rather than `Result<void>`.\n *\n * @param client - A client from {@link createOllamaClient}.\n *\n * @param model - The model name to delete.\n *\n * @returns `Promise<Result<IOllamaDeleteResult>>`; a missing model or transport error surfaces as `Failure`.\n *\n * @public\n */\n",
358
+ "excerptTokens": [
359
+ {
360
+ "kind": "Content",
361
+ "text": "export declare function deleteModel(client: "
362
+ },
363
+ {
364
+ "kind": "Reference",
365
+ "text": "IOllamaClient",
366
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaClient:type"
367
+ },
368
+ {
369
+ "kind": "Content",
370
+ "text": ", model: "
371
+ },
372
+ {
373
+ "kind": "Content",
374
+ "text": "string"
375
+ },
376
+ {
377
+ "kind": "Content",
378
+ "text": "): "
379
+ },
380
+ {
381
+ "kind": "Reference",
382
+ "text": "Promise",
383
+ "canonicalReference": "!Promise:interface"
384
+ },
385
+ {
386
+ "kind": "Content",
387
+ "text": "<"
388
+ },
389
+ {
390
+ "kind": "Reference",
391
+ "text": "Result",
392
+ "canonicalReference": "@fgv/ts-utils!Result:type"
393
+ },
394
+ {
395
+ "kind": "Content",
396
+ "text": "<"
397
+ },
398
+ {
399
+ "kind": "Reference",
400
+ "text": "IOllamaDeleteResult",
401
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaDeleteResult:interface"
402
+ },
403
+ {
404
+ "kind": "Content",
405
+ "text": ">>"
406
+ },
407
+ {
408
+ "kind": "Content",
409
+ "text": ";"
410
+ }
411
+ ],
412
+ "fileUrlPath": "src/index.ts",
413
+ "returnTypeTokenRange": {
414
+ "startIndex": 5,
415
+ "endIndex": 11
416
+ },
417
+ "releaseTag": "Public",
418
+ "overloadIndex": 1,
419
+ "parameters": [
420
+ {
421
+ "parameterName": "client",
422
+ "parameterTypeTokenRange": {
423
+ "startIndex": 1,
424
+ "endIndex": 2
425
+ },
426
+ "isOptional": false
427
+ },
428
+ {
429
+ "parameterName": "model",
430
+ "parameterTypeTokenRange": {
431
+ "startIndex": 3,
432
+ "endIndex": 4
433
+ },
434
+ "isOptional": false
435
+ }
436
+ ],
437
+ "name": "deleteModel"
438
+ },
439
+ {
440
+ "kind": "Interface",
441
+ "canonicalReference": "@fgv/ts-extras-ollama!IChatStructuredParams:interface",
442
+ "docComment": "/**\n * Parameters for {@link chatStructured}.\n *\n * @public\n */\n",
443
+ "excerptTokens": [
444
+ {
445
+ "kind": "Content",
446
+ "text": "export interface IChatStructuredParams<T> "
447
+ }
448
+ ],
449
+ "fileUrlPath": "src/index.ts",
450
+ "releaseTag": "Public",
451
+ "typeParameters": [
452
+ {
453
+ "typeParameterName": "T",
454
+ "constraintTokenRange": {
455
+ "startIndex": 0,
456
+ "endIndex": 0
457
+ },
458
+ "defaultTypeTokenRange": {
459
+ "startIndex": 0,
460
+ "endIndex": 0
461
+ }
462
+ }
463
+ ],
464
+ "name": "IChatStructuredParams",
465
+ "preserveMemberOrder": false,
466
+ "members": [
467
+ {
468
+ "kind": "PropertySignature",
469
+ "canonicalReference": "@fgv/ts-extras-ollama!IChatStructuredParams#keepAlive:member",
470
+ "docComment": "/**\n * Native `keep_alive` (duration string or seconds). Passed verbatim — no policy applied.\n */\n",
471
+ "excerptTokens": [
472
+ {
473
+ "kind": "Content",
474
+ "text": "readonly keepAlive?: "
475
+ },
476
+ {
477
+ "kind": "Content",
478
+ "text": "string | number"
479
+ },
480
+ {
481
+ "kind": "Content",
482
+ "text": ";"
483
+ }
484
+ ],
485
+ "isReadonly": true,
486
+ "isOptional": true,
487
+ "releaseTag": "Public",
488
+ "name": "keepAlive",
489
+ "propertyTypeTokenRange": {
490
+ "startIndex": 1,
491
+ "endIndex": 2
492
+ }
493
+ },
494
+ {
495
+ "kind": "PropertySignature",
496
+ "canonicalReference": "@fgv/ts-extras-ollama!IChatStructuredParams#messages:member",
497
+ "docComment": "/**\n * The conversation so far.\n */\n",
498
+ "excerptTokens": [
499
+ {
500
+ "kind": "Content",
501
+ "text": "readonly messages: "
502
+ },
503
+ {
504
+ "kind": "Reference",
505
+ "text": "ReadonlyArray",
506
+ "canonicalReference": "!ReadonlyArray:interface"
507
+ },
508
+ {
509
+ "kind": "Content",
510
+ "text": "<"
511
+ },
512
+ {
513
+ "kind": "Reference",
514
+ "text": "IOllamaChatMessage",
515
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaChatMessage:interface"
516
+ },
517
+ {
518
+ "kind": "Content",
519
+ "text": ">"
520
+ },
521
+ {
522
+ "kind": "Content",
523
+ "text": ";"
524
+ }
525
+ ],
526
+ "isReadonly": true,
527
+ "isOptional": false,
528
+ "releaseTag": "Public",
529
+ "name": "messages",
530
+ "propertyTypeTokenRange": {
531
+ "startIndex": 1,
532
+ "endIndex": 5
533
+ }
534
+ },
535
+ {
536
+ "kind": "PropertySignature",
537
+ "canonicalReference": "@fgv/ts-extras-ollama!IChatStructuredParams#model:member",
538
+ "docComment": "/**\n * The model to chat with, e.g. `'llama3.1:8b'`.\n */\n",
539
+ "excerptTokens": [
540
+ {
541
+ "kind": "Content",
542
+ "text": "readonly model: "
543
+ },
544
+ {
545
+ "kind": "Content",
546
+ "text": "string"
547
+ },
548
+ {
549
+ "kind": "Content",
550
+ "text": ";"
551
+ }
552
+ ],
553
+ "isReadonly": true,
554
+ "isOptional": false,
555
+ "releaseTag": "Public",
556
+ "name": "model",
557
+ "propertyTypeTokenRange": {
558
+ "startIndex": 1,
559
+ "endIndex": 2
560
+ }
561
+ },
562
+ {
563
+ "kind": "PropertySignature",
564
+ "canonicalReference": "@fgv/ts-extras-ollama!IChatStructuredParams#options:member",
565
+ "docComment": "/**\n * Native Ollama `options` (temperature, num_ctx, seed, …). Passed verbatim.\n */\n",
566
+ "excerptTokens": [
567
+ {
568
+ "kind": "Content",
569
+ "text": "readonly options?: "
570
+ },
571
+ {
572
+ "kind": "Reference",
573
+ "text": "Readonly",
574
+ "canonicalReference": "!Readonly:type"
575
+ },
576
+ {
577
+ "kind": "Content",
578
+ "text": "<"
579
+ },
580
+ {
581
+ "kind": "Reference",
582
+ "text": "Record",
583
+ "canonicalReference": "!Record:type"
584
+ },
585
+ {
586
+ "kind": "Content",
587
+ "text": "<string, "
588
+ },
589
+ {
590
+ "kind": "Reference",
591
+ "text": "JsonValue",
592
+ "canonicalReference": "@fgv/ts-json-base!JsonValue:type"
593
+ },
594
+ {
595
+ "kind": "Content",
596
+ "text": ">>"
597
+ },
598
+ {
599
+ "kind": "Content",
600
+ "text": ";"
601
+ }
602
+ ],
603
+ "isReadonly": true,
604
+ "isOptional": true,
605
+ "releaseTag": "Public",
606
+ "name": "options",
607
+ "propertyTypeTokenRange": {
608
+ "startIndex": 1,
609
+ "endIndex": 7
610
+ }
611
+ },
612
+ {
613
+ "kind": "PropertySignature",
614
+ "canonicalReference": "@fgv/ts-extras-ollama!IChatStructuredParams#schema:member",
615
+ "docComment": "/**\n * The single source of truth for both the wire schema (`schema.toJson()`, sent as the native `format` field) and the result validator (`schema.validate()`). Author with `JsonSchema.object(...)` from `@fgv/ts-json-base`; `T` is derived via `JsonSchema.Static<typeof schema>`. A runtime-discovered (MCP) schema parsed via `JsonSchema.fromJson(raw)` also works — its `T` is `JsonValue`.\n */\n",
616
+ "excerptTokens": [
617
+ {
618
+ "kind": "Content",
619
+ "text": "readonly schema: "
620
+ },
621
+ {
622
+ "kind": "Reference",
623
+ "text": "JsonSchema.ISchemaValidator",
624
+ "canonicalReference": "@fgv/ts-json-base!ISchemaValidator:interface"
625
+ },
626
+ {
627
+ "kind": "Content",
628
+ "text": "<T>"
629
+ },
630
+ {
631
+ "kind": "Content",
632
+ "text": ";"
633
+ }
634
+ ],
635
+ "isReadonly": true,
636
+ "isOptional": false,
637
+ "releaseTag": "Public",
638
+ "name": "schema",
639
+ "propertyTypeTokenRange": {
640
+ "startIndex": 1,
641
+ "endIndex": 3
642
+ }
643
+ },
644
+ {
645
+ "kind": "PropertySignature",
646
+ "canonicalReference": "@fgv/ts-extras-ollama!IChatStructuredParams#signal:member",
647
+ "docComment": "/**\n * Abort signal. Cancels the in-flight generation; the upstream stream throws an `AbortError`, which surfaces as `Result.fail`. An already-aborted signal cancels immediately.\n */\n",
648
+ "excerptTokens": [
649
+ {
650
+ "kind": "Content",
651
+ "text": "readonly signal?: "
652
+ },
653
+ {
654
+ "kind": "Reference",
655
+ "text": "AbortSignal",
656
+ "canonicalReference": "!AbortSignal:interface"
657
+ },
658
+ {
659
+ "kind": "Content",
660
+ "text": ";"
661
+ }
662
+ ],
663
+ "isReadonly": true,
664
+ "isOptional": true,
665
+ "releaseTag": "Public",
666
+ "name": "signal",
667
+ "propertyTypeTokenRange": {
668
+ "startIndex": 1,
669
+ "endIndex": 2
670
+ }
671
+ }
672
+ ],
673
+ "extendsTokenRanges": []
674
+ },
675
+ {
676
+ "kind": "Interface",
677
+ "canonicalReference": "@fgv/ts-extras-ollama!ICreateOllamaClientParams:interface",
678
+ "docComment": "/**\n * Construction parameters for an Ollama client. All optional; defaults match the `ollama` JS library (host `http://127.0.0.1:11434`).\n *\n * @public\n */\n",
679
+ "excerptTokens": [
680
+ {
681
+ "kind": "Content",
682
+ "text": "export interface ICreateOllamaClientParams "
683
+ }
684
+ ],
685
+ "fileUrlPath": "src/index.ts",
686
+ "releaseTag": "Public",
687
+ "name": "ICreateOllamaClientParams",
688
+ "preserveMemberOrder": false,
689
+ "members": [
690
+ {
691
+ "kind": "PropertySignature",
692
+ "canonicalReference": "@fgv/ts-extras-ollama!ICreateOllamaClientParams#fetch:member",
693
+ "docComment": "/**\n * Custom `fetch` implementation. Injecting a fetch is the primary unit-test seam and the hook for a future proxy / browser path.\n */\n",
694
+ "excerptTokens": [
695
+ {
696
+ "kind": "Content",
697
+ "text": "readonly fetch?: "
698
+ },
699
+ {
700
+ "kind": "Content",
701
+ "text": "typeof "
702
+ },
703
+ {
704
+ "kind": "Reference",
705
+ "text": "fetch",
706
+ "canonicalReference": "!fetch:function"
707
+ },
708
+ {
709
+ "kind": "Content",
710
+ "text": ";"
711
+ }
712
+ ],
713
+ "isReadonly": true,
714
+ "isOptional": true,
715
+ "releaseTag": "Public",
716
+ "name": "fetch",
717
+ "propertyTypeTokenRange": {
718
+ "startIndex": 1,
719
+ "endIndex": 3
720
+ }
721
+ },
722
+ {
723
+ "kind": "PropertySignature",
724
+ "canonicalReference": "@fgv/ts-extras-ollama!ICreateOllamaClientParams#headers:member",
725
+ "docComment": "/**\n * Custom headers included on every request (e.g. an auth token for a guarded sidecar).\n */\n",
726
+ "excerptTokens": [
727
+ {
728
+ "kind": "Content",
729
+ "text": "readonly headers?: "
730
+ },
731
+ {
732
+ "kind": "Reference",
733
+ "text": "Record",
734
+ "canonicalReference": "!Record:type"
735
+ },
736
+ {
737
+ "kind": "Content",
738
+ "text": "<string, string>"
739
+ },
740
+ {
741
+ "kind": "Content",
742
+ "text": ";"
743
+ }
744
+ ],
745
+ "isReadonly": true,
746
+ "isOptional": true,
747
+ "releaseTag": "Public",
748
+ "name": "headers",
749
+ "propertyTypeTokenRange": {
750
+ "startIndex": 1,
751
+ "endIndex": 3
752
+ }
753
+ },
754
+ {
755
+ "kind": "PropertySignature",
756
+ "canonicalReference": "@fgv/ts-extras-ollama!ICreateOllamaClientParams#host:member",
757
+ "docComment": "/**\n * Server address. Defaults to `http://127.0.0.1:11434`.\n */\n",
758
+ "excerptTokens": [
759
+ {
760
+ "kind": "Content",
761
+ "text": "readonly host?: "
762
+ },
763
+ {
764
+ "kind": "Content",
765
+ "text": "string"
766
+ },
767
+ {
768
+ "kind": "Content",
769
+ "text": ";"
770
+ }
771
+ ],
772
+ "isReadonly": true,
773
+ "isOptional": true,
774
+ "releaseTag": "Public",
775
+ "name": "host",
776
+ "propertyTypeTokenRange": {
777
+ "startIndex": 1,
778
+ "endIndex": 2
779
+ }
780
+ }
781
+ ],
782
+ "extendsTokenRanges": []
783
+ },
784
+ {
785
+ "kind": "Interface",
786
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaChatMessage:interface",
787
+ "docComment": "/**\n * A chat message in Ollama native shape.\n *\n * @public\n */\n",
788
+ "excerptTokens": [
789
+ {
790
+ "kind": "Content",
791
+ "text": "export interface IOllamaChatMessage "
792
+ }
793
+ ],
794
+ "fileUrlPath": "src/index.ts",
795
+ "releaseTag": "Public",
796
+ "name": "IOllamaChatMessage",
797
+ "preserveMemberOrder": false,
798
+ "members": [
799
+ {
800
+ "kind": "PropertySignature",
801
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaChatMessage#content:member",
802
+ "docComment": "/**\n * The message text.\n */\n",
803
+ "excerptTokens": [
804
+ {
805
+ "kind": "Content",
806
+ "text": "readonly content: "
807
+ },
808
+ {
809
+ "kind": "Content",
810
+ "text": "string"
811
+ },
812
+ {
813
+ "kind": "Content",
814
+ "text": ";"
815
+ }
816
+ ],
817
+ "isReadonly": true,
818
+ "isOptional": false,
819
+ "releaseTag": "Public",
820
+ "name": "content",
821
+ "propertyTypeTokenRange": {
822
+ "startIndex": 1,
823
+ "endIndex": 2
824
+ }
825
+ },
826
+ {
827
+ "kind": "PropertySignature",
828
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaChatMessage#images:member",
829
+ "docComment": "/**\n * Base64 image data for vision models (no `data:` prefix).\n */\n",
830
+ "excerptTokens": [
831
+ {
832
+ "kind": "Content",
833
+ "text": "readonly images?: "
834
+ },
835
+ {
836
+ "kind": "Reference",
837
+ "text": "ReadonlyArray",
838
+ "canonicalReference": "!ReadonlyArray:interface"
839
+ },
840
+ {
841
+ "kind": "Content",
842
+ "text": "<string>"
843
+ },
844
+ {
845
+ "kind": "Content",
846
+ "text": ";"
847
+ }
848
+ ],
849
+ "isReadonly": true,
850
+ "isOptional": true,
851
+ "releaseTag": "Public",
852
+ "name": "images",
853
+ "propertyTypeTokenRange": {
854
+ "startIndex": 1,
855
+ "endIndex": 3
856
+ }
857
+ },
858
+ {
859
+ "kind": "PropertySignature",
860
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaChatMessage#role:member",
861
+ "docComment": "/**\n * The message role.\n */\n",
862
+ "excerptTokens": [
863
+ {
864
+ "kind": "Content",
865
+ "text": "readonly role: "
866
+ },
867
+ {
868
+ "kind": "Content",
869
+ "text": "'system' | 'user' | 'assistant' | 'tool'"
870
+ },
871
+ {
872
+ "kind": "Content",
873
+ "text": ";"
874
+ }
875
+ ],
876
+ "isReadonly": true,
877
+ "isOptional": false,
878
+ "releaseTag": "Public",
879
+ "name": "role",
880
+ "propertyTypeTokenRange": {
881
+ "startIndex": 1,
882
+ "endIndex": 2
883
+ }
884
+ }
885
+ ],
886
+ "extendsTokenRanges": []
887
+ },
888
+ {
889
+ "kind": "Interface",
890
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaChatStructuredResult:interface",
891
+ "docComment": "/**\n * Result of a grammar-constrained structured chat. Carries both the validated typed value and the raw JSON text the model emitted, for diagnostics.\n *\n * @public\n */\n",
892
+ "excerptTokens": [
893
+ {
894
+ "kind": "Content",
895
+ "text": "export interface IOllamaChatStructuredResult<T> "
896
+ }
897
+ ],
898
+ "fileUrlPath": "src/index.ts",
899
+ "releaseTag": "Public",
900
+ "typeParameters": [
901
+ {
902
+ "typeParameterName": "T",
903
+ "constraintTokenRange": {
904
+ "startIndex": 0,
905
+ "endIndex": 0
906
+ },
907
+ "defaultTypeTokenRange": {
908
+ "startIndex": 0,
909
+ "endIndex": 0
910
+ }
911
+ }
912
+ ],
913
+ "name": "IOllamaChatStructuredResult",
914
+ "preserveMemberOrder": false,
915
+ "members": [
916
+ {
917
+ "kind": "PropertySignature",
918
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaChatStructuredResult#doneReason:member",
919
+ "docComment": "/**\n * Provider-reported finish reason, when present.\n */\n",
920
+ "excerptTokens": [
921
+ {
922
+ "kind": "Content",
923
+ "text": "readonly doneReason?: "
924
+ },
925
+ {
926
+ "kind": "Content",
927
+ "text": "string"
928
+ },
929
+ {
930
+ "kind": "Content",
931
+ "text": ";"
932
+ }
933
+ ],
934
+ "isReadonly": true,
935
+ "isOptional": true,
936
+ "releaseTag": "Public",
937
+ "name": "doneReason",
938
+ "propertyTypeTokenRange": {
939
+ "startIndex": 1,
940
+ "endIndex": 2
941
+ }
942
+ },
943
+ {
944
+ "kind": "PropertySignature",
945
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaChatStructuredResult#model:member",
946
+ "docComment": "/**\n * The model that produced the response.\n */\n",
947
+ "excerptTokens": [
948
+ {
949
+ "kind": "Content",
950
+ "text": "readonly model: "
951
+ },
952
+ {
953
+ "kind": "Content",
954
+ "text": "string"
955
+ },
956
+ {
957
+ "kind": "Content",
958
+ "text": ";"
959
+ }
960
+ ],
961
+ "isReadonly": true,
962
+ "isOptional": false,
963
+ "releaseTag": "Public",
964
+ "name": "model",
965
+ "propertyTypeTokenRange": {
966
+ "startIndex": 1,
967
+ "endIndex": 2
968
+ }
969
+ },
970
+ {
971
+ "kind": "PropertySignature",
972
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaChatStructuredResult#raw:member",
973
+ "docComment": "/**\n * The raw `message.content` JSON string the model emitted (assembled across stream chunks).\n */\n",
974
+ "excerptTokens": [
975
+ {
976
+ "kind": "Content",
977
+ "text": "readonly raw: "
978
+ },
979
+ {
980
+ "kind": "Content",
981
+ "text": "string"
982
+ },
983
+ {
984
+ "kind": "Content",
985
+ "text": ";"
986
+ }
987
+ ],
988
+ "isReadonly": true,
989
+ "isOptional": false,
990
+ "releaseTag": "Public",
991
+ "name": "raw",
992
+ "propertyTypeTokenRange": {
993
+ "startIndex": 1,
994
+ "endIndex": 2
995
+ }
996
+ },
997
+ {
998
+ "kind": "PropertySignature",
999
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaChatStructuredResult#value:member",
1000
+ "docComment": "/**\n * The parsed-and-validated value (validated by the same schema sent on the wire).\n */\n",
1001
+ "excerptTokens": [
1002
+ {
1003
+ "kind": "Content",
1004
+ "text": "readonly value: "
1005
+ },
1006
+ {
1007
+ "kind": "Content",
1008
+ "text": "T"
1009
+ },
1010
+ {
1011
+ "kind": "Content",
1012
+ "text": ";"
1013
+ }
1014
+ ],
1015
+ "isReadonly": true,
1016
+ "isOptional": false,
1017
+ "releaseTag": "Public",
1018
+ "name": "value",
1019
+ "propertyTypeTokenRange": {
1020
+ "startIndex": 1,
1021
+ "endIndex": 2
1022
+ }
1023
+ }
1024
+ ],
1025
+ "extendsTokenRanges": []
1026
+ },
1027
+ {
1028
+ "kind": "TypeAlias",
1029
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaClient:type",
1030
+ "docComment": "/**\n * Opaque client handle. Re-export of the upstream `ollama` `Ollama` instance type — consumers retain full access to the upstream API for anything this boundary does not wrap.\n *\n * @public\n */\n",
1031
+ "excerptTokens": [
1032
+ {
1033
+ "kind": "Content",
1034
+ "text": "export type IOllamaClient = "
1035
+ },
1036
+ {
1037
+ "kind": "Reference",
1038
+ "text": "Ollama",
1039
+ "canonicalReference": "ollama!Ollama:class"
1040
+ },
1041
+ {
1042
+ "kind": "Content",
1043
+ "text": ";"
1044
+ }
1045
+ ],
1046
+ "fileUrlPath": "src/index.ts",
1047
+ "releaseTag": "Public",
1048
+ "name": "IOllamaClient",
1049
+ "typeTokenRange": {
1050
+ "startIndex": 1,
1051
+ "endIndex": 2
1052
+ }
1053
+ },
1054
+ {
1055
+ "kind": "Interface",
1056
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaDeleteResult:interface",
1057
+ "docComment": "/**\n * Result of a delete. Returns a meaningful value rather than `Result<void>` (per repo standards — `Result<void>` is an anti-pattern).\n *\n * @public\n */\n",
1058
+ "excerptTokens": [
1059
+ {
1060
+ "kind": "Content",
1061
+ "text": "export interface IOllamaDeleteResult "
1062
+ }
1063
+ ],
1064
+ "fileUrlPath": "src/index.ts",
1065
+ "releaseTag": "Public",
1066
+ "name": "IOllamaDeleteResult",
1067
+ "preserveMemberOrder": false,
1068
+ "members": [
1069
+ {
1070
+ "kind": "PropertySignature",
1071
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaDeleteResult#deleted:member",
1072
+ "docComment": "/**\n * Always `true` — a failed delete surfaces as `Result.fail`, never `deleted: false`.\n */\n",
1073
+ "excerptTokens": [
1074
+ {
1075
+ "kind": "Content",
1076
+ "text": "readonly deleted: "
1077
+ },
1078
+ {
1079
+ "kind": "Content",
1080
+ "text": "true"
1081
+ },
1082
+ {
1083
+ "kind": "Content",
1084
+ "text": ";"
1085
+ }
1086
+ ],
1087
+ "isReadonly": true,
1088
+ "isOptional": false,
1089
+ "releaseTag": "Public",
1090
+ "name": "deleted",
1091
+ "propertyTypeTokenRange": {
1092
+ "startIndex": 1,
1093
+ "endIndex": 2
1094
+ }
1095
+ },
1096
+ {
1097
+ "kind": "PropertySignature",
1098
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaDeleteResult#model:member",
1099
+ "docComment": "/**\n * The model that was deleted.\n */\n",
1100
+ "excerptTokens": [
1101
+ {
1102
+ "kind": "Content",
1103
+ "text": "readonly model: "
1104
+ },
1105
+ {
1106
+ "kind": "Content",
1107
+ "text": "string"
1108
+ },
1109
+ {
1110
+ "kind": "Content",
1111
+ "text": ";"
1112
+ }
1113
+ ],
1114
+ "isReadonly": true,
1115
+ "isOptional": false,
1116
+ "releaseTag": "Public",
1117
+ "name": "model",
1118
+ "propertyTypeTokenRange": {
1119
+ "startIndex": 1,
1120
+ "endIndex": 2
1121
+ }
1122
+ }
1123
+ ],
1124
+ "extendsTokenRanges": []
1125
+ },
1126
+ {
1127
+ "kind": "Interface",
1128
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModel:interface",
1129
+ "docComment": "/**\n * A model present in the local store (`/api/tags`).\n *\n * @public\n */\n",
1130
+ "excerptTokens": [
1131
+ {
1132
+ "kind": "Content",
1133
+ "text": "export interface IOllamaModel extends "
1134
+ },
1135
+ {
1136
+ "kind": "Reference",
1137
+ "text": "IOllamaModelBase",
1138
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelBase:interface"
1139
+ },
1140
+ {
1141
+ "kind": "Content",
1142
+ "text": " "
1143
+ }
1144
+ ],
1145
+ "fileUrlPath": "src/index.ts",
1146
+ "releaseTag": "Public",
1147
+ "name": "IOllamaModel",
1148
+ "preserveMemberOrder": false,
1149
+ "members": [
1150
+ {
1151
+ "kind": "PropertySignature",
1152
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModel#modifiedAt:member",
1153
+ "docComment": "/**\n * Last-modified timestamp, parsed from the RFC3339 wire value.\n */\n",
1154
+ "excerptTokens": [
1155
+ {
1156
+ "kind": "Content",
1157
+ "text": "readonly modifiedAt: "
1158
+ },
1159
+ {
1160
+ "kind": "Reference",
1161
+ "text": "Date",
1162
+ "canonicalReference": "!Date:interface"
1163
+ },
1164
+ {
1165
+ "kind": "Content",
1166
+ "text": ";"
1167
+ }
1168
+ ],
1169
+ "isReadonly": true,
1170
+ "isOptional": false,
1171
+ "releaseTag": "Public",
1172
+ "name": "modifiedAt",
1173
+ "propertyTypeTokenRange": {
1174
+ "startIndex": 1,
1175
+ "endIndex": 2
1176
+ }
1177
+ }
1178
+ ],
1179
+ "extendsTokenRanges": [
1180
+ {
1181
+ "startIndex": 1,
1182
+ "endIndex": 2
1183
+ }
1184
+ ]
1185
+ },
1186
+ {
1187
+ "kind": "Interface",
1188
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelBase:interface",
1189
+ "docComment": "/**\n * Fields common to a locally-stored model and a running model.\n *\n * @public\n */\n",
1190
+ "excerptTokens": [
1191
+ {
1192
+ "kind": "Content",
1193
+ "text": "export interface IOllamaModelBase "
1194
+ }
1195
+ ],
1196
+ "fileUrlPath": "src/index.ts",
1197
+ "releaseTag": "Public",
1198
+ "name": "IOllamaModelBase",
1199
+ "preserveMemberOrder": false,
1200
+ "members": [
1201
+ {
1202
+ "kind": "PropertySignature",
1203
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelBase#details:member",
1204
+ "docComment": "/**\n * GGUF / architecture detail.\n */\n",
1205
+ "excerptTokens": [
1206
+ {
1207
+ "kind": "Content",
1208
+ "text": "readonly details: "
1209
+ },
1210
+ {
1211
+ "kind": "Reference",
1212
+ "text": "IOllamaModelDetail",
1213
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelDetail:interface"
1214
+ },
1215
+ {
1216
+ "kind": "Content",
1217
+ "text": ";"
1218
+ }
1219
+ ],
1220
+ "isReadonly": true,
1221
+ "isOptional": false,
1222
+ "releaseTag": "Public",
1223
+ "name": "details",
1224
+ "propertyTypeTokenRange": {
1225
+ "startIndex": 1,
1226
+ "endIndex": 2
1227
+ }
1228
+ },
1229
+ {
1230
+ "kind": "PropertySignature",
1231
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelBase#digest:member",
1232
+ "docComment": "/**\n * SHA-256 manifest digest.\n */\n",
1233
+ "excerptTokens": [
1234
+ {
1235
+ "kind": "Content",
1236
+ "text": "readonly digest: "
1237
+ },
1238
+ {
1239
+ "kind": "Content",
1240
+ "text": "string"
1241
+ },
1242
+ {
1243
+ "kind": "Content",
1244
+ "text": ";"
1245
+ }
1246
+ ],
1247
+ "isReadonly": true,
1248
+ "isOptional": false,
1249
+ "releaseTag": "Public",
1250
+ "name": "digest",
1251
+ "propertyTypeTokenRange": {
1252
+ "startIndex": 1,
1253
+ "endIndex": 2
1254
+ }
1255
+ },
1256
+ {
1257
+ "kind": "PropertySignature",
1258
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelBase#model:member",
1259
+ "docComment": "/**\n * Underlying model id (often equal to `name`).\n */\n",
1260
+ "excerptTokens": [
1261
+ {
1262
+ "kind": "Content",
1263
+ "text": "readonly model: "
1264
+ },
1265
+ {
1266
+ "kind": "Content",
1267
+ "text": "string"
1268
+ },
1269
+ {
1270
+ "kind": "Content",
1271
+ "text": ";"
1272
+ }
1273
+ ],
1274
+ "isReadonly": true,
1275
+ "isOptional": false,
1276
+ "releaseTag": "Public",
1277
+ "name": "model",
1278
+ "propertyTypeTokenRange": {
1279
+ "startIndex": 1,
1280
+ "endIndex": 2
1281
+ }
1282
+ },
1283
+ {
1284
+ "kind": "PropertySignature",
1285
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelBase#name:member",
1286
+ "docComment": "/**\n * Tagged name, e.g. `'llama3.1:8b'`.\n */\n",
1287
+ "excerptTokens": [
1288
+ {
1289
+ "kind": "Content",
1290
+ "text": "readonly name: "
1291
+ },
1292
+ {
1293
+ "kind": "Content",
1294
+ "text": "string"
1295
+ },
1296
+ {
1297
+ "kind": "Content",
1298
+ "text": ";"
1299
+ }
1300
+ ],
1301
+ "isReadonly": true,
1302
+ "isOptional": false,
1303
+ "releaseTag": "Public",
1304
+ "name": "name",
1305
+ "propertyTypeTokenRange": {
1306
+ "startIndex": 1,
1307
+ "endIndex": 2
1308
+ }
1309
+ },
1310
+ {
1311
+ "kind": "PropertySignature",
1312
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelBase#size:member",
1313
+ "docComment": "/**\n * On-disk size in bytes.\n */\n",
1314
+ "excerptTokens": [
1315
+ {
1316
+ "kind": "Content",
1317
+ "text": "readonly size: "
1318
+ },
1319
+ {
1320
+ "kind": "Content",
1321
+ "text": "number"
1322
+ },
1323
+ {
1324
+ "kind": "Content",
1325
+ "text": ";"
1326
+ }
1327
+ ],
1328
+ "isReadonly": true,
1329
+ "isOptional": false,
1330
+ "releaseTag": "Public",
1331
+ "name": "size",
1332
+ "propertyTypeTokenRange": {
1333
+ "startIndex": 1,
1334
+ "endIndex": 2
1335
+ }
1336
+ }
1337
+ ],
1338
+ "extendsTokenRanges": []
1339
+ },
1340
+ {
1341
+ "kind": "Interface",
1342
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelDetail:interface",
1343
+ "docComment": "/**\n * GGUF / model detail block, common to `/api/tags`, `/api/ps`, and `/api/show`. All fields optional — Ollama omits any it cannot determine.\n *\n * @public\n */\n",
1344
+ "excerptTokens": [
1345
+ {
1346
+ "kind": "Content",
1347
+ "text": "export interface IOllamaModelDetail "
1348
+ }
1349
+ ],
1350
+ "fileUrlPath": "src/index.ts",
1351
+ "releaseTag": "Public",
1352
+ "name": "IOllamaModelDetail",
1353
+ "preserveMemberOrder": false,
1354
+ "members": [
1355
+ {
1356
+ "kind": "PropertySignature",
1357
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelDetail#families:member",
1358
+ "docComment": "/**\n * All architecture families this model belongs to.\n */\n",
1359
+ "excerptTokens": [
1360
+ {
1361
+ "kind": "Content",
1362
+ "text": "readonly families?: "
1363
+ },
1364
+ {
1365
+ "kind": "Reference",
1366
+ "text": "ReadonlyArray",
1367
+ "canonicalReference": "!ReadonlyArray:interface"
1368
+ },
1369
+ {
1370
+ "kind": "Content",
1371
+ "text": "<string>"
1372
+ },
1373
+ {
1374
+ "kind": "Content",
1375
+ "text": ";"
1376
+ }
1377
+ ],
1378
+ "isReadonly": true,
1379
+ "isOptional": true,
1380
+ "releaseTag": "Public",
1381
+ "name": "families",
1382
+ "propertyTypeTokenRange": {
1383
+ "startIndex": 1,
1384
+ "endIndex": 3
1385
+ }
1386
+ },
1387
+ {
1388
+ "kind": "PropertySignature",
1389
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelDetail#family:member",
1390
+ "docComment": "/**\n * Primary architecture family, e.g. `'llama'`.\n */\n",
1391
+ "excerptTokens": [
1392
+ {
1393
+ "kind": "Content",
1394
+ "text": "readonly family?: "
1395
+ },
1396
+ {
1397
+ "kind": "Content",
1398
+ "text": "string"
1399
+ },
1400
+ {
1401
+ "kind": "Content",
1402
+ "text": ";"
1403
+ }
1404
+ ],
1405
+ "isReadonly": true,
1406
+ "isOptional": true,
1407
+ "releaseTag": "Public",
1408
+ "name": "family",
1409
+ "propertyTypeTokenRange": {
1410
+ "startIndex": 1,
1411
+ "endIndex": 2
1412
+ }
1413
+ },
1414
+ {
1415
+ "kind": "PropertySignature",
1416
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelDetail#format:member",
1417
+ "docComment": "/**\n * Storage format, e.g. `'gguf'`.\n */\n",
1418
+ "excerptTokens": [
1419
+ {
1420
+ "kind": "Content",
1421
+ "text": "readonly format?: "
1422
+ },
1423
+ {
1424
+ "kind": "Content",
1425
+ "text": "string"
1426
+ },
1427
+ {
1428
+ "kind": "Content",
1429
+ "text": ";"
1430
+ }
1431
+ ],
1432
+ "isReadonly": true,
1433
+ "isOptional": true,
1434
+ "releaseTag": "Public",
1435
+ "name": "format",
1436
+ "propertyTypeTokenRange": {
1437
+ "startIndex": 1,
1438
+ "endIndex": 2
1439
+ }
1440
+ },
1441
+ {
1442
+ "kind": "PropertySignature",
1443
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelDetail#parameterSize:member",
1444
+ "docComment": "/**\n * Human-readable parameter count, e.g. `'8.0B'`.\n */\n",
1445
+ "excerptTokens": [
1446
+ {
1447
+ "kind": "Content",
1448
+ "text": "readonly parameterSize?: "
1449
+ },
1450
+ {
1451
+ "kind": "Content",
1452
+ "text": "string"
1453
+ },
1454
+ {
1455
+ "kind": "Content",
1456
+ "text": ";"
1457
+ }
1458
+ ],
1459
+ "isReadonly": true,
1460
+ "isOptional": true,
1461
+ "releaseTag": "Public",
1462
+ "name": "parameterSize",
1463
+ "propertyTypeTokenRange": {
1464
+ "startIndex": 1,
1465
+ "endIndex": 2
1466
+ }
1467
+ },
1468
+ {
1469
+ "kind": "PropertySignature",
1470
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelDetail#parentModel:member",
1471
+ "docComment": "/**\n * Parent model for fine-tunes / derived models.\n */\n",
1472
+ "excerptTokens": [
1473
+ {
1474
+ "kind": "Content",
1475
+ "text": "readonly parentModel?: "
1476
+ },
1477
+ {
1478
+ "kind": "Content",
1479
+ "text": "string"
1480
+ },
1481
+ {
1482
+ "kind": "Content",
1483
+ "text": ";"
1484
+ }
1485
+ ],
1486
+ "isReadonly": true,
1487
+ "isOptional": true,
1488
+ "releaseTag": "Public",
1489
+ "name": "parentModel",
1490
+ "propertyTypeTokenRange": {
1491
+ "startIndex": 1,
1492
+ "endIndex": 2
1493
+ }
1494
+ },
1495
+ {
1496
+ "kind": "PropertySignature",
1497
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelDetail#quantizationLevel:member",
1498
+ "docComment": "/**\n * Quantization level, e.g. `'Q4_0'`.\n */\n",
1499
+ "excerptTokens": [
1500
+ {
1501
+ "kind": "Content",
1502
+ "text": "readonly quantizationLevel?: "
1503
+ },
1504
+ {
1505
+ "kind": "Content",
1506
+ "text": "string"
1507
+ },
1508
+ {
1509
+ "kind": "Content",
1510
+ "text": ";"
1511
+ }
1512
+ ],
1513
+ "isReadonly": true,
1514
+ "isOptional": true,
1515
+ "releaseTag": "Public",
1516
+ "name": "quantizationLevel",
1517
+ "propertyTypeTokenRange": {
1518
+ "startIndex": 1,
1519
+ "endIndex": 2
1520
+ }
1521
+ }
1522
+ ],
1523
+ "extendsTokenRanges": []
1524
+ },
1525
+ {
1526
+ "kind": "Interface",
1527
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelInfo:interface",
1528
+ "docComment": "/**\n * Full model detail, capabilities, parameters, and template (`POST /api/show`).\n *\n * @public\n */\n",
1529
+ "excerptTokens": [
1530
+ {
1531
+ "kind": "Content",
1532
+ "text": "export interface IOllamaModelInfo "
1533
+ }
1534
+ ],
1535
+ "fileUrlPath": "src/index.ts",
1536
+ "releaseTag": "Public",
1537
+ "name": "IOllamaModelInfo",
1538
+ "preserveMemberOrder": false,
1539
+ "members": [
1540
+ {
1541
+ "kind": "PropertySignature",
1542
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelInfo#capabilities:member",
1543
+ "docComment": "/**\n * Declared capabilities, e.g. `['completion', 'tools', 'vision', 'thinking']`.\n */\n",
1544
+ "excerptTokens": [
1545
+ {
1546
+ "kind": "Content",
1547
+ "text": "readonly capabilities?: "
1548
+ },
1549
+ {
1550
+ "kind": "Reference",
1551
+ "text": "ReadonlyArray",
1552
+ "canonicalReference": "!ReadonlyArray:interface"
1553
+ },
1554
+ {
1555
+ "kind": "Content",
1556
+ "text": "<string>"
1557
+ },
1558
+ {
1559
+ "kind": "Content",
1560
+ "text": ";"
1561
+ }
1562
+ ],
1563
+ "isReadonly": true,
1564
+ "isOptional": true,
1565
+ "releaseTag": "Public",
1566
+ "name": "capabilities",
1567
+ "propertyTypeTokenRange": {
1568
+ "startIndex": 1,
1569
+ "endIndex": 3
1570
+ }
1571
+ },
1572
+ {
1573
+ "kind": "PropertySignature",
1574
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelInfo#details:member",
1575
+ "docComment": "/**\n * GGUF / architecture detail.\n */\n",
1576
+ "excerptTokens": [
1577
+ {
1578
+ "kind": "Content",
1579
+ "text": "readonly details: "
1580
+ },
1581
+ {
1582
+ "kind": "Reference",
1583
+ "text": "IOllamaModelDetail",
1584
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelDetail:interface"
1585
+ },
1586
+ {
1587
+ "kind": "Content",
1588
+ "text": ";"
1589
+ }
1590
+ ],
1591
+ "isReadonly": true,
1592
+ "isOptional": false,
1593
+ "releaseTag": "Public",
1594
+ "name": "details",
1595
+ "propertyTypeTokenRange": {
1596
+ "startIndex": 1,
1597
+ "endIndex": 2
1598
+ }
1599
+ },
1600
+ {
1601
+ "kind": "PropertySignature",
1602
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelInfo#modelfile:member",
1603
+ "docComment": "/**\n * The Modelfile source, when returned.\n */\n",
1604
+ "excerptTokens": [
1605
+ {
1606
+ "kind": "Content",
1607
+ "text": "readonly modelfile?: "
1608
+ },
1609
+ {
1610
+ "kind": "Content",
1611
+ "text": "string"
1612
+ },
1613
+ {
1614
+ "kind": "Content",
1615
+ "text": ";"
1616
+ }
1617
+ ],
1618
+ "isReadonly": true,
1619
+ "isOptional": true,
1620
+ "releaseTag": "Public",
1621
+ "name": "modelfile",
1622
+ "propertyTypeTokenRange": {
1623
+ "startIndex": 1,
1624
+ "endIndex": 2
1625
+ }
1626
+ },
1627
+ {
1628
+ "kind": "PropertySignature",
1629
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelInfo#modelInfo:member",
1630
+ "docComment": "/**\n * Low-level model metadata key-value map (`model_info`).\n */\n",
1631
+ "excerptTokens": [
1632
+ {
1633
+ "kind": "Content",
1634
+ "text": "readonly modelInfo?: "
1635
+ },
1636
+ {
1637
+ "kind": "Reference",
1638
+ "text": "Readonly",
1639
+ "canonicalReference": "!Readonly:type"
1640
+ },
1641
+ {
1642
+ "kind": "Content",
1643
+ "text": "<"
1644
+ },
1645
+ {
1646
+ "kind": "Reference",
1647
+ "text": "Record",
1648
+ "canonicalReference": "!Record:type"
1649
+ },
1650
+ {
1651
+ "kind": "Content",
1652
+ "text": "<string, "
1653
+ },
1654
+ {
1655
+ "kind": "Reference",
1656
+ "text": "JsonValue",
1657
+ "canonicalReference": "@fgv/ts-json-base!JsonValue:type"
1658
+ },
1659
+ {
1660
+ "kind": "Content",
1661
+ "text": ">>"
1662
+ },
1663
+ {
1664
+ "kind": "Content",
1665
+ "text": ";"
1666
+ }
1667
+ ],
1668
+ "isReadonly": true,
1669
+ "isOptional": true,
1670
+ "releaseTag": "Public",
1671
+ "name": "modelInfo",
1672
+ "propertyTypeTokenRange": {
1673
+ "startIndex": 1,
1674
+ "endIndex": 7
1675
+ }
1676
+ },
1677
+ {
1678
+ "kind": "PropertySignature",
1679
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelInfo#parameters:member",
1680
+ "docComment": "/**\n * Default parameters string.\n */\n",
1681
+ "excerptTokens": [
1682
+ {
1683
+ "kind": "Content",
1684
+ "text": "readonly parameters?: "
1685
+ },
1686
+ {
1687
+ "kind": "Content",
1688
+ "text": "string"
1689
+ },
1690
+ {
1691
+ "kind": "Content",
1692
+ "text": ";"
1693
+ }
1694
+ ],
1695
+ "isReadonly": true,
1696
+ "isOptional": true,
1697
+ "releaseTag": "Public",
1698
+ "name": "parameters",
1699
+ "propertyTypeTokenRange": {
1700
+ "startIndex": 1,
1701
+ "endIndex": 2
1702
+ }
1703
+ },
1704
+ {
1705
+ "kind": "PropertySignature",
1706
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelInfo#template:member",
1707
+ "docComment": "/**\n * The prompt template.\n */\n",
1708
+ "excerptTokens": [
1709
+ {
1710
+ "kind": "Content",
1711
+ "text": "readonly template?: "
1712
+ },
1713
+ {
1714
+ "kind": "Content",
1715
+ "text": "string"
1716
+ },
1717
+ {
1718
+ "kind": "Content",
1719
+ "text": ";"
1720
+ }
1721
+ ],
1722
+ "isReadonly": true,
1723
+ "isOptional": true,
1724
+ "releaseTag": "Public",
1725
+ "name": "template",
1726
+ "propertyTypeTokenRange": {
1727
+ "startIndex": 1,
1728
+ "endIndex": 2
1729
+ }
1730
+ }
1731
+ ],
1732
+ "extendsTokenRanges": []
1733
+ },
1734
+ {
1735
+ "kind": "Interface",
1736
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaPullProgress:interface",
1737
+ "docComment": "/**\n * A single progress chunk from a streamed pull (`/api/pull`). Ollama emits a JSON-lines stream; each line is one of these. Fields map 1:1 from the upstream `ProgressResponse`; the layer fields (`digest`/`total`/`completed`) are `undefined` on the manifest / verify / write phases.\n *\n * @public\n */\n",
1738
+ "excerptTokens": [
1739
+ {
1740
+ "kind": "Content",
1741
+ "text": "export interface IOllamaPullProgress "
1742
+ }
1743
+ ],
1744
+ "fileUrlPath": "src/index.ts",
1745
+ "releaseTag": "Public",
1746
+ "name": "IOllamaPullProgress",
1747
+ "preserveMemberOrder": false,
1748
+ "members": [
1749
+ {
1750
+ "kind": "PropertySignature",
1751
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaPullProgress#completed:member",
1752
+ "docComment": "/**\n * Bytes transferred so far for the current layer, when known.\n */\n",
1753
+ "excerptTokens": [
1754
+ {
1755
+ "kind": "Content",
1756
+ "text": "readonly completed?: "
1757
+ },
1758
+ {
1759
+ "kind": "Content",
1760
+ "text": "number"
1761
+ },
1762
+ {
1763
+ "kind": "Content",
1764
+ "text": ";"
1765
+ }
1766
+ ],
1767
+ "isReadonly": true,
1768
+ "isOptional": true,
1769
+ "releaseTag": "Public",
1770
+ "name": "completed",
1771
+ "propertyTypeTokenRange": {
1772
+ "startIndex": 1,
1773
+ "endIndex": 2
1774
+ }
1775
+ },
1776
+ {
1777
+ "kind": "PropertySignature",
1778
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaPullProgress#digest:member",
1779
+ "docComment": "/**\n * Layer digest being transferred (present during `'pulling <digest>'` phases).\n */\n",
1780
+ "excerptTokens": [
1781
+ {
1782
+ "kind": "Content",
1783
+ "text": "readonly digest?: "
1784
+ },
1785
+ {
1786
+ "kind": "Content",
1787
+ "text": "string"
1788
+ },
1789
+ {
1790
+ "kind": "Content",
1791
+ "text": ";"
1792
+ }
1793
+ ],
1794
+ "isReadonly": true,
1795
+ "isOptional": true,
1796
+ "releaseTag": "Public",
1797
+ "name": "digest",
1798
+ "propertyTypeTokenRange": {
1799
+ "startIndex": 1,
1800
+ "endIndex": 2
1801
+ }
1802
+ },
1803
+ {
1804
+ "kind": "PropertySignature",
1805
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaPullProgress#status:member",
1806
+ "docComment": "/**\n * Phase string, e.g. `'pulling manifest'`, `'pulling <digest>'`, `'verifying sha256 digest'`, `'writing manifest'`, `'success'`.\n */\n",
1807
+ "excerptTokens": [
1808
+ {
1809
+ "kind": "Content",
1810
+ "text": "readonly status: "
1811
+ },
1812
+ {
1813
+ "kind": "Content",
1814
+ "text": "string"
1815
+ },
1816
+ {
1817
+ "kind": "Content",
1818
+ "text": ";"
1819
+ }
1820
+ ],
1821
+ "isReadonly": true,
1822
+ "isOptional": false,
1823
+ "releaseTag": "Public",
1824
+ "name": "status",
1825
+ "propertyTypeTokenRange": {
1826
+ "startIndex": 1,
1827
+ "endIndex": 2
1828
+ }
1829
+ },
1830
+ {
1831
+ "kind": "PropertySignature",
1832
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaPullProgress#total:member",
1833
+ "docComment": "/**\n * Total bytes for the current layer, when known.\n */\n",
1834
+ "excerptTokens": [
1835
+ {
1836
+ "kind": "Content",
1837
+ "text": "readonly total?: "
1838
+ },
1839
+ {
1840
+ "kind": "Content",
1841
+ "text": "number"
1842
+ },
1843
+ {
1844
+ "kind": "Content",
1845
+ "text": ";"
1846
+ }
1847
+ ],
1848
+ "isReadonly": true,
1849
+ "isOptional": true,
1850
+ "releaseTag": "Public",
1851
+ "name": "total",
1852
+ "propertyTypeTokenRange": {
1853
+ "startIndex": 1,
1854
+ "endIndex": 2
1855
+ }
1856
+ }
1857
+ ],
1858
+ "extendsTokenRanges": []
1859
+ },
1860
+ {
1861
+ "kind": "Interface",
1862
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaPullResult:interface",
1863
+ "docComment": "/**\n * Terminal result of a completed pull. Returns a meaningful value (not `Result<void>`): the final status plus a count of progress chunks observed.\n *\n * @public\n */\n",
1864
+ "excerptTokens": [
1865
+ {
1866
+ "kind": "Content",
1867
+ "text": "export interface IOllamaPullResult "
1868
+ }
1869
+ ],
1870
+ "fileUrlPath": "src/index.ts",
1871
+ "releaseTag": "Public",
1872
+ "name": "IOllamaPullResult",
1873
+ "preserveMemberOrder": false,
1874
+ "members": [
1875
+ {
1876
+ "kind": "PropertySignature",
1877
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaPullResult#chunkCount:member",
1878
+ "docComment": "/**\n * Number of progress chunks observed (useful for tests and diagnostics).\n */\n",
1879
+ "excerptTokens": [
1880
+ {
1881
+ "kind": "Content",
1882
+ "text": "readonly chunkCount: "
1883
+ },
1884
+ {
1885
+ "kind": "Content",
1886
+ "text": "number"
1887
+ },
1888
+ {
1889
+ "kind": "Content",
1890
+ "text": ";"
1891
+ }
1892
+ ],
1893
+ "isReadonly": true,
1894
+ "isOptional": false,
1895
+ "releaseTag": "Public",
1896
+ "name": "chunkCount",
1897
+ "propertyTypeTokenRange": {
1898
+ "startIndex": 1,
1899
+ "endIndex": 2
1900
+ }
1901
+ },
1902
+ {
1903
+ "kind": "PropertySignature",
1904
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaPullResult#finalStatus:member",
1905
+ "docComment": "/**\n * The `status` of the final chunk, normally `'success'`.\n */\n",
1906
+ "excerptTokens": [
1907
+ {
1908
+ "kind": "Content",
1909
+ "text": "readonly finalStatus: "
1910
+ },
1911
+ {
1912
+ "kind": "Content",
1913
+ "text": "string"
1914
+ },
1915
+ {
1916
+ "kind": "Content",
1917
+ "text": ";"
1918
+ }
1919
+ ],
1920
+ "isReadonly": true,
1921
+ "isOptional": false,
1922
+ "releaseTag": "Public",
1923
+ "name": "finalStatus",
1924
+ "propertyTypeTokenRange": {
1925
+ "startIndex": 1,
1926
+ "endIndex": 2
1927
+ }
1928
+ },
1929
+ {
1930
+ "kind": "PropertySignature",
1931
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaPullResult#model:member",
1932
+ "docComment": "/**\n * The model that was pulled.\n */\n",
1933
+ "excerptTokens": [
1934
+ {
1935
+ "kind": "Content",
1936
+ "text": "readonly model: "
1937
+ },
1938
+ {
1939
+ "kind": "Content",
1940
+ "text": "string"
1941
+ },
1942
+ {
1943
+ "kind": "Content",
1944
+ "text": ";"
1945
+ }
1946
+ ],
1947
+ "isReadonly": true,
1948
+ "isOptional": false,
1949
+ "releaseTag": "Public",
1950
+ "name": "model",
1951
+ "propertyTypeTokenRange": {
1952
+ "startIndex": 1,
1953
+ "endIndex": 2
1954
+ }
1955
+ }
1956
+ ],
1957
+ "extendsTokenRanges": []
1958
+ },
1959
+ {
1960
+ "kind": "Interface",
1961
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaRunningModel:interface",
1962
+ "docComment": "/**\n * A model currently loaded into memory (`/api/ps`). Note `/api/ps` does NOT return `modified_at`, so this does not extend {@link IOllamaModel}.\n *\n * @public\n */\n",
1963
+ "excerptTokens": [
1964
+ {
1965
+ "kind": "Content",
1966
+ "text": "export interface IOllamaRunningModel extends "
1967
+ },
1968
+ {
1969
+ "kind": "Reference",
1970
+ "text": "IOllamaModelBase",
1971
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelBase:interface"
1972
+ },
1973
+ {
1974
+ "kind": "Content",
1975
+ "text": " "
1976
+ }
1977
+ ],
1978
+ "fileUrlPath": "src/index.ts",
1979
+ "releaseTag": "Public",
1980
+ "name": "IOllamaRunningModel",
1981
+ "preserveMemberOrder": false,
1982
+ "members": [
1983
+ {
1984
+ "kind": "PropertySignature",
1985
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaRunningModel#expiresAt:member",
1986
+ "docComment": "/**\n * When the model will be unloaded, parsed from the RFC3339 wire value.\n */\n",
1987
+ "excerptTokens": [
1988
+ {
1989
+ "kind": "Content",
1990
+ "text": "readonly expiresAt: "
1991
+ },
1992
+ {
1993
+ "kind": "Reference",
1994
+ "text": "Date",
1995
+ "canonicalReference": "!Date:interface"
1996
+ },
1997
+ {
1998
+ "kind": "Content",
1999
+ "text": ";"
2000
+ }
2001
+ ],
2002
+ "isReadonly": true,
2003
+ "isOptional": false,
2004
+ "releaseTag": "Public",
2005
+ "name": "expiresAt",
2006
+ "propertyTypeTokenRange": {
2007
+ "startIndex": 1,
2008
+ "endIndex": 2
2009
+ }
2010
+ },
2011
+ {
2012
+ "kind": "PropertySignature",
2013
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaRunningModel#sizeVram:member",
2014
+ "docComment": "/**\n * Bytes resident in VRAM (0 when fully on CPU).\n */\n",
2015
+ "excerptTokens": [
2016
+ {
2017
+ "kind": "Content",
2018
+ "text": "readonly sizeVram: "
2019
+ },
2020
+ {
2021
+ "kind": "Content",
2022
+ "text": "number"
2023
+ },
2024
+ {
2025
+ "kind": "Content",
2026
+ "text": ";"
2027
+ }
2028
+ ],
2029
+ "isReadonly": true,
2030
+ "isOptional": false,
2031
+ "releaseTag": "Public",
2032
+ "name": "sizeVram",
2033
+ "propertyTypeTokenRange": {
2034
+ "startIndex": 1,
2035
+ "endIndex": 2
2036
+ }
2037
+ }
2038
+ ],
2039
+ "extendsTokenRanges": [
2040
+ {
2041
+ "startIndex": 1,
2042
+ "endIndex": 2
2043
+ }
2044
+ ]
2045
+ },
2046
+ {
2047
+ "kind": "Interface",
2048
+ "canonicalReference": "@fgv/ts-extras-ollama!IPullModelParams:interface",
2049
+ "docComment": "/**\n * Parameters for {@link pullModel}.\n *\n * @public\n */\n",
2050
+ "excerptTokens": [
2051
+ {
2052
+ "kind": "Content",
2053
+ "text": "export interface IPullModelParams "
2054
+ }
2055
+ ],
2056
+ "fileUrlPath": "src/index.ts",
2057
+ "releaseTag": "Public",
2058
+ "name": "IPullModelParams",
2059
+ "preserveMemberOrder": false,
2060
+ "members": [
2061
+ {
2062
+ "kind": "PropertySignature",
2063
+ "canonicalReference": "@fgv/ts-extras-ollama!IPullModelParams#insecure:member",
2064
+ "docComment": "/**\n * Allow pulling from insecure (non-TLS) registries.\n */\n",
2065
+ "excerptTokens": [
2066
+ {
2067
+ "kind": "Content",
2068
+ "text": "readonly insecure?: "
2069
+ },
2070
+ {
2071
+ "kind": "Content",
2072
+ "text": "boolean"
2073
+ },
2074
+ {
2075
+ "kind": "Content",
2076
+ "text": ";"
2077
+ }
2078
+ ],
2079
+ "isReadonly": true,
2080
+ "isOptional": true,
2081
+ "releaseTag": "Public",
2082
+ "name": "insecure",
2083
+ "propertyTypeTokenRange": {
2084
+ "startIndex": 1,
2085
+ "endIndex": 2
2086
+ }
2087
+ },
2088
+ {
2089
+ "kind": "PropertySignature",
2090
+ "canonicalReference": "@fgv/ts-extras-ollama!IPullModelParams#model:member",
2091
+ "docComment": "/**\n * Model to pull, e.g. `'llama3.1:8b'`.\n */\n",
2092
+ "excerptTokens": [
2093
+ {
2094
+ "kind": "Content",
2095
+ "text": "readonly model: "
2096
+ },
2097
+ {
2098
+ "kind": "Content",
2099
+ "text": "string"
2100
+ },
2101
+ {
2102
+ "kind": "Content",
2103
+ "text": ";"
2104
+ }
2105
+ ],
2106
+ "isReadonly": true,
2107
+ "isOptional": false,
2108
+ "releaseTag": "Public",
2109
+ "name": "model",
2110
+ "propertyTypeTokenRange": {
2111
+ "startIndex": 1,
2112
+ "endIndex": 2
2113
+ }
2114
+ },
2115
+ {
2116
+ "kind": "PropertySignature",
2117
+ "canonicalReference": "@fgv/ts-extras-ollama!IPullModelParams#onProgress:member",
2118
+ "docComment": "/**\n * Progress callback, invoked once per JSON-lines chunk as it arrives. The `Result` returned by {@link pullModel} resolves only after the stream terminates; progress is surfaced here in the interim. A throw from this callback fails the whole pull (it runs inside the captured loop).\n */\n",
2119
+ "excerptTokens": [
2120
+ {
2121
+ "kind": "Content",
2122
+ "text": "readonly onProgress?: "
2123
+ },
2124
+ {
2125
+ "kind": "Content",
2126
+ "text": "(progress: "
2127
+ },
2128
+ {
2129
+ "kind": "Reference",
2130
+ "text": "IOllamaPullProgress",
2131
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaPullProgress:interface"
2132
+ },
2133
+ {
2134
+ "kind": "Content",
2135
+ "text": ") => void"
2136
+ },
2137
+ {
2138
+ "kind": "Content",
2139
+ "text": ";"
2140
+ }
2141
+ ],
2142
+ "isReadonly": true,
2143
+ "isOptional": true,
2144
+ "releaseTag": "Public",
2145
+ "name": "onProgress",
2146
+ "propertyTypeTokenRange": {
2147
+ "startIndex": 1,
2148
+ "endIndex": 4
2149
+ }
2150
+ },
2151
+ {
2152
+ "kind": "PropertySignature",
2153
+ "canonicalReference": "@fgv/ts-extras-ollama!IPullModelParams#signal:member",
2154
+ "docComment": "/**\n * Abort signal. Cancels the in-flight pull; the upstream stream throws an `AbortError`, which surfaces as `Result.fail`. An already-aborted signal cancels immediately.\n */\n",
2155
+ "excerptTokens": [
2156
+ {
2157
+ "kind": "Content",
2158
+ "text": "readonly signal?: "
2159
+ },
2160
+ {
2161
+ "kind": "Reference",
2162
+ "text": "AbortSignal",
2163
+ "canonicalReference": "!AbortSignal:interface"
2164
+ },
2165
+ {
2166
+ "kind": "Content",
2167
+ "text": ";"
2168
+ }
2169
+ ],
2170
+ "isReadonly": true,
2171
+ "isOptional": true,
2172
+ "releaseTag": "Public",
2173
+ "name": "signal",
2174
+ "propertyTypeTokenRange": {
2175
+ "startIndex": 1,
2176
+ "endIndex": 2
2177
+ }
2178
+ }
2179
+ ],
2180
+ "extendsTokenRanges": []
2181
+ },
2182
+ {
2183
+ "kind": "Function",
2184
+ "canonicalReference": "@fgv/ts-extras-ollama!listModels:function(1)",
2185
+ "docComment": "/**\n * Lists models in the local store (`GET /api/tags`). Each entry is normalized to {@link IOllamaModel} (camelCase, `modifiedAt` as a `Date`).\n *\n * @param client - A client from {@link createOllamaClient}.\n *\n * @returns `Promise<Result<ReadonlyArray<IOllamaModel>>>`; upstream / transport errors are captured as `Failure`.\n *\n * @public\n */\n",
2186
+ "excerptTokens": [
2187
+ {
2188
+ "kind": "Content",
2189
+ "text": "export declare function listModels(client: "
2190
+ },
2191
+ {
2192
+ "kind": "Reference",
2193
+ "text": "IOllamaClient",
2194
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaClient:type"
2195
+ },
2196
+ {
2197
+ "kind": "Content",
2198
+ "text": "): "
2199
+ },
2200
+ {
2201
+ "kind": "Reference",
2202
+ "text": "Promise",
2203
+ "canonicalReference": "!Promise:interface"
2204
+ },
2205
+ {
2206
+ "kind": "Content",
2207
+ "text": "<"
2208
+ },
2209
+ {
2210
+ "kind": "Reference",
2211
+ "text": "Result",
2212
+ "canonicalReference": "@fgv/ts-utils!Result:type"
2213
+ },
2214
+ {
2215
+ "kind": "Content",
2216
+ "text": "<"
2217
+ },
2218
+ {
2219
+ "kind": "Reference",
2220
+ "text": "ReadonlyArray",
2221
+ "canonicalReference": "!ReadonlyArray:interface"
2222
+ },
2223
+ {
2224
+ "kind": "Content",
2225
+ "text": "<"
2226
+ },
2227
+ {
2228
+ "kind": "Reference",
2229
+ "text": "IOllamaModel",
2230
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModel:interface"
2231
+ },
2232
+ {
2233
+ "kind": "Content",
2234
+ "text": ">>>"
2235
+ },
2236
+ {
2237
+ "kind": "Content",
2238
+ "text": ";"
2239
+ }
2240
+ ],
2241
+ "fileUrlPath": "src/index.ts",
2242
+ "returnTypeTokenRange": {
2243
+ "startIndex": 3,
2244
+ "endIndex": 11
2245
+ },
2246
+ "releaseTag": "Public",
2247
+ "overloadIndex": 1,
2248
+ "parameters": [
2249
+ {
2250
+ "parameterName": "client",
2251
+ "parameterTypeTokenRange": {
2252
+ "startIndex": 1,
2253
+ "endIndex": 2
2254
+ },
2255
+ "isOptional": false
2256
+ }
2257
+ ],
2258
+ "name": "listModels"
2259
+ },
2260
+ {
2261
+ "kind": "Function",
2262
+ "canonicalReference": "@fgv/ts-extras-ollama!listRunning:function(1)",
2263
+ "docComment": "/**\n * Lists models currently loaded into memory (`GET /api/ps`). Each entry is normalized to {@link IOllamaRunningModel} (camelCase, `expiresAt` as a `Date`, `sizeVram` in bytes).\n *\n * @param client - A client from {@link createOllamaClient}.\n *\n * @returns `Promise<Result<ReadonlyArray<IOllamaRunningModel>>>`; upstream / transport errors are captured as `Failure`.\n *\n * @public\n */\n",
2264
+ "excerptTokens": [
2265
+ {
2266
+ "kind": "Content",
2267
+ "text": "export declare function listRunning(client: "
2268
+ },
2269
+ {
2270
+ "kind": "Reference",
2271
+ "text": "IOllamaClient",
2272
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaClient:type"
2273
+ },
2274
+ {
2275
+ "kind": "Content",
2276
+ "text": "): "
2277
+ },
2278
+ {
2279
+ "kind": "Reference",
2280
+ "text": "Promise",
2281
+ "canonicalReference": "!Promise:interface"
2282
+ },
2283
+ {
2284
+ "kind": "Content",
2285
+ "text": "<"
2286
+ },
2287
+ {
2288
+ "kind": "Reference",
2289
+ "text": "Result",
2290
+ "canonicalReference": "@fgv/ts-utils!Result:type"
2291
+ },
2292
+ {
2293
+ "kind": "Content",
2294
+ "text": "<"
2295
+ },
2296
+ {
2297
+ "kind": "Reference",
2298
+ "text": "ReadonlyArray",
2299
+ "canonicalReference": "!ReadonlyArray:interface"
2300
+ },
2301
+ {
2302
+ "kind": "Content",
2303
+ "text": "<"
2304
+ },
2305
+ {
2306
+ "kind": "Reference",
2307
+ "text": "IOllamaRunningModel",
2308
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaRunningModel:interface"
2309
+ },
2310
+ {
2311
+ "kind": "Content",
2312
+ "text": ">>>"
2313
+ },
2314
+ {
2315
+ "kind": "Content",
2316
+ "text": ";"
2317
+ }
2318
+ ],
2319
+ "fileUrlPath": "src/index.ts",
2320
+ "returnTypeTokenRange": {
2321
+ "startIndex": 3,
2322
+ "endIndex": 11
2323
+ },
2324
+ "releaseTag": "Public",
2325
+ "overloadIndex": 1,
2326
+ "parameters": [
2327
+ {
2328
+ "parameterName": "client",
2329
+ "parameterTypeTokenRange": {
2330
+ "startIndex": 1,
2331
+ "endIndex": 2
2332
+ },
2333
+ "isOptional": false
2334
+ }
2335
+ ],
2336
+ "name": "listRunning"
2337
+ },
2338
+ {
2339
+ "kind": "Function",
2340
+ "canonicalReference": "@fgv/ts-extras-ollama!pullModel:function(1)",
2341
+ "docComment": "/**\n * Pulls a model with streamed progress (`POST /api/pull`). Drives the upstream JSON-lines stream internally, invoking `params.onProgress` once per chunk, and resolves the `Result` once the stream terminates. Any upstream error — connection drop, registry 404, abort, or a throwing `onProgress` — becomes a single `Failure`; success returns a meaningful {@link IOllamaPullResult} rather than `Result<void>`.\n *\n * @param client - A client from {@link createOllamaClient}.\n *\n * @param params - {@link IPullModelParams} — the model, optional `insecure` flag, optional `onProgress` callback, and optional `AbortSignal`.\n *\n * @returns `Promise<Result<IOllamaPullResult>>`.\n *\n * @public\n */\n",
2342
+ "excerptTokens": [
2343
+ {
2344
+ "kind": "Content",
2345
+ "text": "export declare function pullModel(client: "
2346
+ },
2347
+ {
2348
+ "kind": "Reference",
2349
+ "text": "IOllamaClient",
2350
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaClient:type"
2351
+ },
2352
+ {
2353
+ "kind": "Content",
2354
+ "text": ", params: "
2355
+ },
2356
+ {
2357
+ "kind": "Reference",
2358
+ "text": "IPullModelParams",
2359
+ "canonicalReference": "@fgv/ts-extras-ollama!IPullModelParams:interface"
2360
+ },
2361
+ {
2362
+ "kind": "Content",
2363
+ "text": "): "
2364
+ },
2365
+ {
2366
+ "kind": "Reference",
2367
+ "text": "Promise",
2368
+ "canonicalReference": "!Promise:interface"
2369
+ },
2370
+ {
2371
+ "kind": "Content",
2372
+ "text": "<"
2373
+ },
2374
+ {
2375
+ "kind": "Reference",
2376
+ "text": "Result",
2377
+ "canonicalReference": "@fgv/ts-utils!Result:type"
2378
+ },
2379
+ {
2380
+ "kind": "Content",
2381
+ "text": "<"
2382
+ },
2383
+ {
2384
+ "kind": "Reference",
2385
+ "text": "IOllamaPullResult",
2386
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaPullResult:interface"
2387
+ },
2388
+ {
2389
+ "kind": "Content",
2390
+ "text": ">>"
2391
+ },
2392
+ {
2393
+ "kind": "Content",
2394
+ "text": ";"
2395
+ }
2396
+ ],
2397
+ "fileUrlPath": "src/index.ts",
2398
+ "returnTypeTokenRange": {
2399
+ "startIndex": 5,
2400
+ "endIndex": 11
2401
+ },
2402
+ "releaseTag": "Public",
2403
+ "overloadIndex": 1,
2404
+ "parameters": [
2405
+ {
2406
+ "parameterName": "client",
2407
+ "parameterTypeTokenRange": {
2408
+ "startIndex": 1,
2409
+ "endIndex": 2
2410
+ },
2411
+ "isOptional": false
2412
+ },
2413
+ {
2414
+ "parameterName": "params",
2415
+ "parameterTypeTokenRange": {
2416
+ "startIndex": 3,
2417
+ "endIndex": 4
2418
+ },
2419
+ "isOptional": false
2420
+ }
2421
+ ],
2422
+ "name": "pullModel"
2423
+ },
2424
+ {
2425
+ "kind": "Function",
2426
+ "canonicalReference": "@fgv/ts-extras-ollama!showModel:function(1)",
2427
+ "docComment": "/**\n * Full model detail, capabilities, parameters, and template (`POST /api/show`), normalized to {@link IOllamaModelInfo}.\n *\n * @param client - A client from {@link createOllamaClient}.\n *\n * @param model - The model name to inspect, e.g. `'llama3.1:8b'`.\n *\n * @param options - Optional flags. `verbose: true` requests the full low-level `model_info` block.\n *\n * @returns `Promise<Result<IOllamaModelInfo>>`; upstream / transport errors (e.g. unknown model) are captured as `Failure`.\n *\n * @public\n */\n",
2428
+ "excerptTokens": [
2429
+ {
2430
+ "kind": "Content",
2431
+ "text": "export declare function showModel(client: "
2432
+ },
2433
+ {
2434
+ "kind": "Reference",
2435
+ "text": "IOllamaClient",
2436
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaClient:type"
2437
+ },
2438
+ {
2439
+ "kind": "Content",
2440
+ "text": ", model: "
2441
+ },
2442
+ {
2443
+ "kind": "Content",
2444
+ "text": "string"
2445
+ },
2446
+ {
2447
+ "kind": "Content",
2448
+ "text": ", options?: "
2449
+ },
2450
+ {
2451
+ "kind": "Content",
2452
+ "text": "{\n readonly verbose?: boolean;\n}"
2453
+ },
2454
+ {
2455
+ "kind": "Content",
2456
+ "text": "): "
2457
+ },
2458
+ {
2459
+ "kind": "Reference",
2460
+ "text": "Promise",
2461
+ "canonicalReference": "!Promise:interface"
2462
+ },
2463
+ {
2464
+ "kind": "Content",
2465
+ "text": "<"
2466
+ },
2467
+ {
2468
+ "kind": "Reference",
2469
+ "text": "Result",
2470
+ "canonicalReference": "@fgv/ts-utils!Result:type"
2471
+ },
2472
+ {
2473
+ "kind": "Content",
2474
+ "text": "<"
2475
+ },
2476
+ {
2477
+ "kind": "Reference",
2478
+ "text": "IOllamaModelInfo",
2479
+ "canonicalReference": "@fgv/ts-extras-ollama!IOllamaModelInfo:interface"
2480
+ },
2481
+ {
2482
+ "kind": "Content",
2483
+ "text": ">>"
2484
+ },
2485
+ {
2486
+ "kind": "Content",
2487
+ "text": ";"
2488
+ }
2489
+ ],
2490
+ "fileUrlPath": "src/index.ts",
2491
+ "returnTypeTokenRange": {
2492
+ "startIndex": 7,
2493
+ "endIndex": 13
2494
+ },
2495
+ "releaseTag": "Public",
2496
+ "overloadIndex": 1,
2497
+ "parameters": [
2498
+ {
2499
+ "parameterName": "client",
2500
+ "parameterTypeTokenRange": {
2501
+ "startIndex": 1,
2502
+ "endIndex": 2
2503
+ },
2504
+ "isOptional": false
2505
+ },
2506
+ {
2507
+ "parameterName": "model",
2508
+ "parameterTypeTokenRange": {
2509
+ "startIndex": 3,
2510
+ "endIndex": 4
2511
+ },
2512
+ "isOptional": false
2513
+ },
2514
+ {
2515
+ "parameterName": "options",
2516
+ "parameterTypeTokenRange": {
2517
+ "startIndex": 5,
2518
+ "endIndex": 6
2519
+ },
2520
+ "isOptional": true
2521
+ }
2522
+ ],
2523
+ "name": "showModel"
2524
+ }
2525
+ ]
2526
+ }
2527
+ ]
2528
+ }