llmist 2.6.0 → 3.1.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.
- package/README.md +10 -1
- package/dist/{chunk-364PEMVT.js → chunk-JCFPJMRQ.js} +754 -218
- package/dist/chunk-JCFPJMRQ.js.map +1 -0
- package/dist/{chunk-4IHLIYW5.js → chunk-LFI4WQVV.js} +6 -6
- package/dist/chunk-LFI4WQVV.js.map +1 -0
- package/dist/cli.cjs +1458 -279
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +702 -58
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +763 -226
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +139 -54
- package/dist/index.d.ts +139 -54
- package/dist/index.js +20 -18
- package/dist/{mock-stream-Jgg5u6Uf.d.cts → mock-stream-CTLm00_q.d.cts} +344 -56
- package/dist/{mock-stream-Jgg5u6Uf.d.ts → mock-stream-CTLm00_q.d.ts} +344 -56
- package/dist/testing/index.cjs +745 -210
- package/dist/testing/index.cjs.map +1 -1
- package/dist/testing/index.d.cts +6 -6
- package/dist/testing/index.d.ts +6 -6
- package/dist/testing/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-364PEMVT.js.map +0 -1
- package/dist/chunk-4IHLIYW5.js.map +0 -1
package/dist/testing/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PassThrough, Readable, Writable } from 'node:stream';
|
|
2
|
-
import { L as LLMMessage,
|
|
3
|
-
export { j as MockAudioData, d as MockBuilder, k as MockImageData, f as MockManager, l as MockMatcher, n as MockMatcherContext, o as MockOptions, M as MockProviderAdapter, p as MockRegistration, q as MockResponse, r as MockStats, c as createMockAdapter, e as createMockClient, h as createMockStream, i as createTextMockStream, g as getMockManager, m as mockLLM } from '../mock-stream-
|
|
2
|
+
import { L as LLMMessage, A as AbstractGadget, I as IConversationManager, a as LLMStream, b as LLMStreamChunk } from '../mock-stream-CTLm00_q.cjs';
|
|
3
|
+
export { j as MockAudioData, d as MockBuilder, k as MockImageData, f as MockManager, l as MockMatcher, n as MockMatcherContext, o as MockOptions, M as MockProviderAdapter, p as MockRegistration, q as MockResponse, r as MockStats, c as createMockAdapter, e as createMockClient, h as createMockStream, i as createTextMockStream, g as getMockManager, m as mockLLM } from '../mock-stream-CTLm00_q.cjs';
|
|
4
4
|
import { ZodType } from 'zod';
|
|
5
5
|
import 'tslog';
|
|
6
6
|
|
|
@@ -324,7 +324,7 @@ interface TestGadgetOptions {
|
|
|
324
324
|
* expect(skipped.validatedParams).toEqual({ a: 5 }); // No defaults applied
|
|
325
325
|
* ```
|
|
326
326
|
*/
|
|
327
|
-
declare function testGadget(gadget:
|
|
327
|
+
declare function testGadget(gadget: AbstractGadget, params: Record<string, unknown>, options?: TestGadgetOptions): Promise<TestGadgetResult>;
|
|
328
328
|
/**
|
|
329
329
|
* Test multiple parameter sets against a gadget.
|
|
330
330
|
*
|
|
@@ -348,7 +348,7 @@ declare function testGadget(gadget: BaseGadget, params: Record<string, unknown>,
|
|
|
348
348
|
* expect(results[2].error).toBeDefined();
|
|
349
349
|
* ```
|
|
350
350
|
*/
|
|
351
|
-
declare function testGadgetBatch(gadget:
|
|
351
|
+
declare function testGadgetBatch(gadget: AbstractGadget, paramSets: Record<string, unknown>[], options?: TestGadgetOptions): Promise<TestGadgetResult[]>;
|
|
352
352
|
|
|
353
353
|
/**
|
|
354
354
|
* Mock ConversationManager for testing compaction and agent components.
|
|
@@ -383,7 +383,7 @@ declare class MockConversationManager implements IConversationManager {
|
|
|
383
383
|
constructor(history?: LLMMessage[], baseMessages?: LLMMessage[]);
|
|
384
384
|
addUserMessage(content: string): void;
|
|
385
385
|
addAssistantMessage(content: string): void;
|
|
386
|
-
|
|
386
|
+
addGadgetCallResult(gadgetName: string, parameters: Record<string, unknown>, result: string): void;
|
|
387
387
|
getMessages(): LLMMessage[];
|
|
388
388
|
getHistoryMessages(): LLMMessage[];
|
|
389
389
|
getBaseMessages(): LLMMessage[];
|
|
@@ -457,7 +457,7 @@ interface RecordedCall {
|
|
|
457
457
|
/**
|
|
458
458
|
* Mock gadget with call tracking capabilities.
|
|
459
459
|
*/
|
|
460
|
-
interface MockGadget extends
|
|
460
|
+
interface MockGadget extends AbstractGadget {
|
|
461
461
|
/** Get all recorded calls */
|
|
462
462
|
getCalls(): RecordedCall[];
|
|
463
463
|
/** Get number of times the gadget was executed */
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PassThrough, Readable, Writable } from 'node:stream';
|
|
2
|
-
import { L as LLMMessage,
|
|
3
|
-
export { j as MockAudioData, d as MockBuilder, k as MockImageData, f as MockManager, l as MockMatcher, n as MockMatcherContext, o as MockOptions, M as MockProviderAdapter, p as MockRegistration, q as MockResponse, r as MockStats, c as createMockAdapter, e as createMockClient, h as createMockStream, i as createTextMockStream, g as getMockManager, m as mockLLM } from '../mock-stream-
|
|
2
|
+
import { L as LLMMessage, A as AbstractGadget, I as IConversationManager, a as LLMStream, b as LLMStreamChunk } from '../mock-stream-CTLm00_q.js';
|
|
3
|
+
export { j as MockAudioData, d as MockBuilder, k as MockImageData, f as MockManager, l as MockMatcher, n as MockMatcherContext, o as MockOptions, M as MockProviderAdapter, p as MockRegistration, q as MockResponse, r as MockStats, c as createMockAdapter, e as createMockClient, h as createMockStream, i as createTextMockStream, g as getMockManager, m as mockLLM } from '../mock-stream-CTLm00_q.js';
|
|
4
4
|
import { ZodType } from 'zod';
|
|
5
5
|
import 'tslog';
|
|
6
6
|
|
|
@@ -324,7 +324,7 @@ interface TestGadgetOptions {
|
|
|
324
324
|
* expect(skipped.validatedParams).toEqual({ a: 5 }); // No defaults applied
|
|
325
325
|
* ```
|
|
326
326
|
*/
|
|
327
|
-
declare function testGadget(gadget:
|
|
327
|
+
declare function testGadget(gadget: AbstractGadget, params: Record<string, unknown>, options?: TestGadgetOptions): Promise<TestGadgetResult>;
|
|
328
328
|
/**
|
|
329
329
|
* Test multiple parameter sets against a gadget.
|
|
330
330
|
*
|
|
@@ -348,7 +348,7 @@ declare function testGadget(gadget: BaseGadget, params: Record<string, unknown>,
|
|
|
348
348
|
* expect(results[2].error).toBeDefined();
|
|
349
349
|
* ```
|
|
350
350
|
*/
|
|
351
|
-
declare function testGadgetBatch(gadget:
|
|
351
|
+
declare function testGadgetBatch(gadget: AbstractGadget, paramSets: Record<string, unknown>[], options?: TestGadgetOptions): Promise<TestGadgetResult[]>;
|
|
352
352
|
|
|
353
353
|
/**
|
|
354
354
|
* Mock ConversationManager for testing compaction and agent components.
|
|
@@ -383,7 +383,7 @@ declare class MockConversationManager implements IConversationManager {
|
|
|
383
383
|
constructor(history?: LLMMessage[], baseMessages?: LLMMessage[]);
|
|
384
384
|
addUserMessage(content: string): void;
|
|
385
385
|
addAssistantMessage(content: string): void;
|
|
386
|
-
|
|
386
|
+
addGadgetCallResult(gadgetName: string, parameters: Record<string, unknown>, result: string): void;
|
|
387
387
|
getMessages(): LLMMessage[];
|
|
388
388
|
getHistoryMessages(): LLMMessage[];
|
|
389
389
|
getBaseMessages(): LLMMessage[];
|
|
@@ -457,7 +457,7 @@ interface RecordedCall {
|
|
|
457
457
|
/**
|
|
458
458
|
* Mock gadget with call tracking capabilities.
|
|
459
459
|
*/
|
|
460
|
-
interface MockGadget extends
|
|
460
|
+
interface MockGadget extends AbstractGadget {
|
|
461
461
|
/** Get all recorded calls */
|
|
462
462
|
getCalls(): RecordedCall[];
|
|
463
463
|
/** Get number of times the gadget was executed */
|
package/dist/testing/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "llmist",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "TypeScript LLM client with streaming tool execution. Tools fire mid-stream. Built-in function calling works with any model—no structured outputs or native tool support required.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|