@granular-software/sdk 0.4.45 → 0.4.47
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/dist/agent-evals.d.mts +10 -3
- package/dist/agent-evals.d.ts +10 -3
- package/dist/agent-evals.js +1067 -408
- package/dist/agent-evals.js.map +1 -1
- package/dist/agent-evals.mjs +1067 -408
- package/dist/agent-evals.mjs.map +1 -1
- package/dist/agent-harness.d.mts +1 -0
- package/dist/agent-harness.d.ts +1 -0
- package/dist/agent-harness.js +87 -11
- package/dist/agent-harness.js.map +1 -1
- package/dist/agent-harness.mjs +87 -11
- package/dist/agent-harness.mjs.map +1 -1
- package/dist/cli/index.js +114 -18
- package/dist/{client-BZ8NuQ_e.d.ts → client-ButG6ePW.d.ts} +7 -1
- package/dist/{client-CBQFvuKf.d.mts → client-C1UqPDwe.d.mts} +7 -1
- package/dist/index.d.mts +3 -4
- package/dist/index.d.ts +3 -4
- package/dist/index.js +201 -29
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +201 -29
- package/dist/index.mjs.map +1 -1
- package/dist/{spend-tAz2a16I.d.mts → spend-D2Vy3N1D.d.mts} +113 -4
- package/dist/{spend-tAz2a16I.d.ts → spend-D2Vy3N1D.d.ts} +113 -4
- package/dist/spend.d.mts +1 -2
- package/dist/spend.d.ts +1 -2
- package/package.json +2 -2
package/dist/agent-evals.d.mts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { a as EnvironmentSession, G as Granular } from './client-
|
|
2
|
-
import { G as GranularSpendContext, h as OpenAITokenSpend, P as Prompt,
|
|
1
|
+
import { a as EnvironmentSession, G as Granular } from './client-C1UqPDwe.mjs';
|
|
2
|
+
import { G as GranularSpendContext, h as OpenAITokenSpend, P as Prompt, bp as RecordObjectOptions, b$ as ManifestContent, c as SessionHeapSnapshot, T as ToolWithHandler, Z as ConnectOptions, al as CreateEnvironmentData, Q as GranularOptions } from './spend-D2Vy3N1D.mjs';
|
|
3
3
|
import { GranularAgentToolInfo, GeneratedJobCodeIssue, BuildGranularAgentSystemPromptInput, HarnessRenderedPrompt, HarnessRenderedContinuation, HarnessControllerBudgets } from './agent-harness.mjs';
|
|
4
4
|
import '@automerge/automerge';
|
|
5
5
|
import '@automerge/automerge/slim';
|
|
6
|
-
import '@granular-software/policy-engine';
|
|
7
6
|
|
|
8
7
|
type EvalMatcher = string | RegExp;
|
|
9
8
|
interface AgentEvalPromptInteraction {
|
|
@@ -24,6 +23,8 @@ interface AgentEvalGenerationInput {
|
|
|
24
23
|
tools?: GranularAgentToolInfo[];
|
|
25
24
|
repairIssues?: GeneratedJobCodeIssue[];
|
|
26
25
|
onTextDelta?: (delta: string) => void | Promise<void>;
|
|
26
|
+
onReplyDelta?: (delta: string) => void | Promise<void>;
|
|
27
|
+
onCodeDelta?: (delta: string) => void | Promise<void>;
|
|
27
28
|
usageContext?: GranularSpendContext;
|
|
28
29
|
}
|
|
29
30
|
type AgentEvalPromptRenderer = (input: BuildGranularAgentSystemPromptInput) => HarnessRenderedPrompt;
|
|
@@ -293,6 +294,8 @@ interface AgentEvalHarnessOptions {
|
|
|
293
294
|
chatTimeoutMs?: number;
|
|
294
295
|
jobTimeoutMs?: number;
|
|
295
296
|
pollIntervalMs?: number;
|
|
297
|
+
local?: boolean;
|
|
298
|
+
localTurnReportBaseDir?: string;
|
|
296
299
|
harnessTemplateId?: string;
|
|
297
300
|
promptRenderer?: AgentEvalPromptRenderer;
|
|
298
301
|
continuationRenderer?: AgentEvalContinuationRenderer;
|
|
@@ -327,6 +330,7 @@ interface AgentEvalSessionLogIteration {
|
|
|
327
330
|
iteration: number;
|
|
328
331
|
request: string;
|
|
329
332
|
systemPrompt: string;
|
|
333
|
+
generationDurationMs?: number;
|
|
330
334
|
templateId?: string;
|
|
331
335
|
templateVersion?: string;
|
|
332
336
|
templateHash?: string;
|
|
@@ -439,6 +443,7 @@ declare function createAgentEvalHarness(options: AgentEvalHarnessOptions): {
|
|
|
439
443
|
verification?: AgentEvalInspection;
|
|
440
444
|
maxIterations?: number;
|
|
441
445
|
autoAnswerPrompts?: boolean;
|
|
446
|
+
uiContext?: Record<string, unknown>;
|
|
442
447
|
}) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
443
448
|
resumePendingTurn: (pending: AgentEvalPendingTurn, responder: AgentEvalPromptResponder) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
444
449
|
};
|
|
@@ -497,6 +502,7 @@ declare function createAgentTester(options: AgentTesterOptions): {
|
|
|
497
502
|
verification?: AgentEvalInspection;
|
|
498
503
|
maxIterations?: number;
|
|
499
504
|
autoAnswerPrompts?: boolean;
|
|
505
|
+
uiContext?: Record<string, unknown>;
|
|
500
506
|
}) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
501
507
|
continueStep: (pending: AgentEvalPendingTurn, responder: AgentEvalPromptResponder) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
502
508
|
runSuite: (scenarios: AgentEvalScenario[]) => Promise<AgentEvalSuiteResult>;
|
|
@@ -516,6 +522,7 @@ declare function createAgentTester(options: AgentTesterOptions): {
|
|
|
516
522
|
verification?: AgentEvalInspection;
|
|
517
523
|
maxIterations?: number;
|
|
518
524
|
autoAnswerPrompts?: boolean;
|
|
525
|
+
uiContext?: Record<string, unknown>;
|
|
519
526
|
}) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
520
527
|
resumePendingTurn: (pending: AgentEvalPendingTurn, responder: AgentEvalPromptResponder) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
521
528
|
};
|
package/dist/agent-evals.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { a as EnvironmentSession, G as Granular } from './client-
|
|
2
|
-
import { G as GranularSpendContext, h as OpenAITokenSpend, P as Prompt,
|
|
1
|
+
import { a as EnvironmentSession, G as Granular } from './client-ButG6ePW.js';
|
|
2
|
+
import { G as GranularSpendContext, h as OpenAITokenSpend, P as Prompt, bp as RecordObjectOptions, b$ as ManifestContent, c as SessionHeapSnapshot, T as ToolWithHandler, Z as ConnectOptions, al as CreateEnvironmentData, Q as GranularOptions } from './spend-D2Vy3N1D.js';
|
|
3
3
|
import { GranularAgentToolInfo, GeneratedJobCodeIssue, BuildGranularAgentSystemPromptInput, HarnessRenderedPrompt, HarnessRenderedContinuation, HarnessControllerBudgets } from './agent-harness.js';
|
|
4
4
|
import '@automerge/automerge';
|
|
5
5
|
import '@automerge/automerge/slim';
|
|
6
|
-
import '@granular-software/policy-engine';
|
|
7
6
|
|
|
8
7
|
type EvalMatcher = string | RegExp;
|
|
9
8
|
interface AgentEvalPromptInteraction {
|
|
@@ -24,6 +23,8 @@ interface AgentEvalGenerationInput {
|
|
|
24
23
|
tools?: GranularAgentToolInfo[];
|
|
25
24
|
repairIssues?: GeneratedJobCodeIssue[];
|
|
26
25
|
onTextDelta?: (delta: string) => void | Promise<void>;
|
|
26
|
+
onReplyDelta?: (delta: string) => void | Promise<void>;
|
|
27
|
+
onCodeDelta?: (delta: string) => void | Promise<void>;
|
|
27
28
|
usageContext?: GranularSpendContext;
|
|
28
29
|
}
|
|
29
30
|
type AgentEvalPromptRenderer = (input: BuildGranularAgentSystemPromptInput) => HarnessRenderedPrompt;
|
|
@@ -293,6 +294,8 @@ interface AgentEvalHarnessOptions {
|
|
|
293
294
|
chatTimeoutMs?: number;
|
|
294
295
|
jobTimeoutMs?: number;
|
|
295
296
|
pollIntervalMs?: number;
|
|
297
|
+
local?: boolean;
|
|
298
|
+
localTurnReportBaseDir?: string;
|
|
296
299
|
harnessTemplateId?: string;
|
|
297
300
|
promptRenderer?: AgentEvalPromptRenderer;
|
|
298
301
|
continuationRenderer?: AgentEvalContinuationRenderer;
|
|
@@ -327,6 +330,7 @@ interface AgentEvalSessionLogIteration {
|
|
|
327
330
|
iteration: number;
|
|
328
331
|
request: string;
|
|
329
332
|
systemPrompt: string;
|
|
333
|
+
generationDurationMs?: number;
|
|
330
334
|
templateId?: string;
|
|
331
335
|
templateVersion?: string;
|
|
332
336
|
templateHash?: string;
|
|
@@ -439,6 +443,7 @@ declare function createAgentEvalHarness(options: AgentEvalHarnessOptions): {
|
|
|
439
443
|
verification?: AgentEvalInspection;
|
|
440
444
|
maxIterations?: number;
|
|
441
445
|
autoAnswerPrompts?: boolean;
|
|
446
|
+
uiContext?: Record<string, unknown>;
|
|
442
447
|
}) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
443
448
|
resumePendingTurn: (pending: AgentEvalPendingTurn, responder: AgentEvalPromptResponder) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
444
449
|
};
|
|
@@ -497,6 +502,7 @@ declare function createAgentTester(options: AgentTesterOptions): {
|
|
|
497
502
|
verification?: AgentEvalInspection;
|
|
498
503
|
maxIterations?: number;
|
|
499
504
|
autoAnswerPrompts?: boolean;
|
|
505
|
+
uiContext?: Record<string, unknown>;
|
|
500
506
|
}) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
501
507
|
continueStep: (pending: AgentEvalPendingTurn, responder: AgentEvalPromptResponder) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
502
508
|
runSuite: (scenarios: AgentEvalScenario[]) => Promise<AgentEvalSuiteResult>;
|
|
@@ -516,6 +522,7 @@ declare function createAgentTester(options: AgentTesterOptions): {
|
|
|
516
522
|
verification?: AgentEvalInspection;
|
|
517
523
|
maxIterations?: number;
|
|
518
524
|
autoAnswerPrompts?: boolean;
|
|
525
|
+
uiContext?: Record<string, unknown>;
|
|
519
526
|
}) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
520
527
|
resumePendingTurn: (pending: AgentEvalPendingTurn, responder: AgentEvalPromptResponder) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
521
528
|
};
|