@granular-software/sdk 0.4.45 → 0.4.46
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 +7 -3
- package/dist/agent-evals.d.ts +7 -3
- package/dist/agent-evals.js +423 -37
- package/dist/agent-evals.js.map +1 -1
- package/dist/agent-evals.mjs +423 -37
- 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;
|
|
@@ -439,6 +440,7 @@ declare function createAgentEvalHarness(options: AgentEvalHarnessOptions): {
|
|
|
439
440
|
verification?: AgentEvalInspection;
|
|
440
441
|
maxIterations?: number;
|
|
441
442
|
autoAnswerPrompts?: boolean;
|
|
443
|
+
uiContext?: Record<string, unknown>;
|
|
442
444
|
}) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
443
445
|
resumePendingTurn: (pending: AgentEvalPendingTurn, responder: AgentEvalPromptResponder) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
444
446
|
};
|
|
@@ -497,6 +499,7 @@ declare function createAgentTester(options: AgentTesterOptions): {
|
|
|
497
499
|
verification?: AgentEvalInspection;
|
|
498
500
|
maxIterations?: number;
|
|
499
501
|
autoAnswerPrompts?: boolean;
|
|
502
|
+
uiContext?: Record<string, unknown>;
|
|
500
503
|
}) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
501
504
|
continueStep: (pending: AgentEvalPendingTurn, responder: AgentEvalPromptResponder) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
502
505
|
runSuite: (scenarios: AgentEvalScenario[]) => Promise<AgentEvalSuiteResult>;
|
|
@@ -516,6 +519,7 @@ declare function createAgentTester(options: AgentTesterOptions): {
|
|
|
516
519
|
verification?: AgentEvalInspection;
|
|
517
520
|
maxIterations?: number;
|
|
518
521
|
autoAnswerPrompts?: boolean;
|
|
522
|
+
uiContext?: Record<string, unknown>;
|
|
519
523
|
}) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
520
524
|
resumePendingTurn: (pending: AgentEvalPendingTurn, responder: AgentEvalPromptResponder) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
521
525
|
};
|
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;
|
|
@@ -439,6 +440,7 @@ declare function createAgentEvalHarness(options: AgentEvalHarnessOptions): {
|
|
|
439
440
|
verification?: AgentEvalInspection;
|
|
440
441
|
maxIterations?: number;
|
|
441
442
|
autoAnswerPrompts?: boolean;
|
|
443
|
+
uiContext?: Record<string, unknown>;
|
|
442
444
|
}) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
443
445
|
resumePendingTurn: (pending: AgentEvalPendingTurn, responder: AgentEvalPromptResponder) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
444
446
|
};
|
|
@@ -497,6 +499,7 @@ declare function createAgentTester(options: AgentTesterOptions): {
|
|
|
497
499
|
verification?: AgentEvalInspection;
|
|
498
500
|
maxIterations?: number;
|
|
499
501
|
autoAnswerPrompts?: boolean;
|
|
502
|
+
uiContext?: Record<string, unknown>;
|
|
500
503
|
}) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
501
504
|
continueStep: (pending: AgentEvalPendingTurn, responder: AgentEvalPromptResponder) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
502
505
|
runSuite: (scenarios: AgentEvalScenario[]) => Promise<AgentEvalSuiteResult>;
|
|
@@ -516,6 +519,7 @@ declare function createAgentTester(options: AgentTesterOptions): {
|
|
|
516
519
|
verification?: AgentEvalInspection;
|
|
517
520
|
maxIterations?: number;
|
|
518
521
|
autoAnswerPrompts?: boolean;
|
|
522
|
+
uiContext?: Record<string, unknown>;
|
|
519
523
|
}) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
520
524
|
resumePendingTurn: (pending: AgentEvalPendingTurn, responder: AgentEvalPromptResponder) => Promise<AgentEvalCompletedTurn | AgentEvalPendingTurn>;
|
|
521
525
|
};
|