@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.
@@ -1,9 +1,8 @@
1
- import { a as EnvironmentSession, G as Granular } from './client-CBQFvuKf.mjs';
2
- import { G as GranularSpendContext, h as OpenAITokenSpend, P as Prompt, ba as RecordObjectOptions, bM as ManifestContent, c as SessionHeapSnapshot, T as ToolWithHandler, C as ConnectOptions, a6 as CreateEnvironmentData, q as GranularOptions } from './spend-tAz2a16I.mjs';
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
  };
@@ -1,9 +1,8 @@
1
- import { a as EnvironmentSession, G as Granular } from './client-BZ8NuQ_e.js';
2
- import { G as GranularSpendContext, h as OpenAITokenSpend, P as Prompt, ba as RecordObjectOptions, bM as ManifestContent, c as SessionHeapSnapshot, T as ToolWithHandler, C as ConnectOptions, a6 as CreateEnvironmentData, q as GranularOptions } from './spend-tAz2a16I.js';
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
  };