@granular-software/sdk 0.4.38 → 0.4.39
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 +4 -3
- package/dist/agent-evals.d.ts +4 -3
- package/dist/agent-evals.js +726 -48
- package/dist/agent-evals.js.map +1 -1
- package/dist/agent-evals.mjs +726 -49
- package/dist/agent-evals.mjs.map +1 -1
- package/dist/agent-harness.d.mts +9 -2
- package/dist/agent-harness.d.ts +9 -2
- package/dist/agent-harness.js +273 -5
- package/dist/agent-harness.js.map +1 -1
- package/dist/agent-harness.mjs +271 -6
- package/dist/agent-harness.mjs.map +1 -1
- package/dist/cli/index.js +164 -31
- package/dist/{client-BNbWA9jQ.d.ts → client-BZ8NuQ_e.d.ts} +17 -1
- package/dist/{client-HDJgcJC5.d.mts → client-CBQFvuKf.d.mts} +17 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +437 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +435 -37
- package/dist/index.mjs.map +1 -1
- package/dist/{spend-rzS1rlFr.d.mts → spend-tAz2a16I.d.mts} +35 -1
- package/dist/{spend-rzS1rlFr.d.ts → spend-tAz2a16I.d.ts} +35 -1
- package/dist/spend.d.mts +1 -1
- package/dist/spend.d.ts +1 -1
- package/package.json +1 -1
|
@@ -812,6 +812,7 @@ interface ConversationMessageShowRefs {
|
|
|
812
812
|
entryPaths?: string[];
|
|
813
813
|
listNames?: string[];
|
|
814
814
|
variableNames?: string[];
|
|
815
|
+
fileIds?: string[];
|
|
815
816
|
}
|
|
816
817
|
interface ConversationMessageInput {
|
|
817
818
|
role: "user" | "assistant";
|
|
@@ -853,6 +854,39 @@ interface SessionTimelineEvent {
|
|
|
853
854
|
createdAt?: number;
|
|
854
855
|
[key: string]: unknown;
|
|
855
856
|
}
|
|
857
|
+
type SessionFileSource = "dock" | "sdk" | "agent" | "runtime" | "processor" | "library" | "imported";
|
|
858
|
+
type SessionFileKind = "csv" | "spreadsheet" | "pdf" | "image" | "text" | "document" | "binary";
|
|
859
|
+
type SessionFileStatus = "queued" | "ready" | "processing" | "processed" | "failed" | "deleted";
|
|
860
|
+
interface SessionFileRecord {
|
|
861
|
+
fileId: string;
|
|
862
|
+
sessionId: string;
|
|
863
|
+
tenantId: string | null;
|
|
864
|
+
subjectId: string | null;
|
|
865
|
+
sandboxId: string | null;
|
|
866
|
+
environmentId: string | null;
|
|
867
|
+
filename: string;
|
|
868
|
+
safeFilename: string;
|
|
869
|
+
contentType: string;
|
|
870
|
+
byteLength: number;
|
|
871
|
+
sha256: string;
|
|
872
|
+
r2Key: string;
|
|
873
|
+
kind: SessionFileKind;
|
|
874
|
+
source: SessionFileSource;
|
|
875
|
+
status: SessionFileStatus;
|
|
876
|
+
createdAt: number;
|
|
877
|
+
updatedAt: number;
|
|
878
|
+
jobId?: string;
|
|
879
|
+
parentFileIds?: string[];
|
|
880
|
+
outputPath?: string;
|
|
881
|
+
metadata?: Record<string, unknown>;
|
|
882
|
+
}
|
|
883
|
+
interface SessionFileUploadOptions {
|
|
884
|
+
filename?: string;
|
|
885
|
+
contentType?: string;
|
|
886
|
+
source?: "dock" | "sdk" | "imported";
|
|
887
|
+
parentFileIds?: string[];
|
|
888
|
+
metadata?: Record<string, unknown>;
|
|
889
|
+
}
|
|
856
890
|
interface SessionJobRecord {
|
|
857
891
|
jobId: string;
|
|
858
892
|
status: string;
|
|
@@ -1556,4 +1590,4 @@ declare function toGranularHttpBase(apiUrl: string): string;
|
|
|
1556
1590
|
declare function buildOpenAISpendEventId(usage: Pick<OpenAIUsageSpendEvent, "requestId">, context?: GranularSpendContext): string | undefined;
|
|
1557
1591
|
declare function recordOpenAIUsageSpend(options: RecordOpenAIUsageSpendOptions): Promise<RecordOpenAIUsageSpendResult>;
|
|
1558
1592
|
|
|
1559
|
-
export { type PermissionProfileListResponse as $, type AccessTokenProvider as A, type QuotaPeriod as B, type ConnectOptions as C, type DomainState as D, type EndpointMode as E, type QuotaStatus as F, type GranularSpendContext as G, type SpendSummary as H, type InstanceToolHandler as I, type QuotaLineItemFilter as J, type GranularQuotaPolicy as K, type GranularQuotaProgress as L, type ManifestEffectMetamodelSpec as M, type NormalizedOpenAIUsage as N, type OpenAIModelPricing as O, type Prompt as P, type QuotaScopeType as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type User as U, type Sandbox as V, type CreateSandboxData as W, type SandboxListResponse as X, type PermissionRules as Y, type PermissionProfile as Z, type CreatePermissionProfileData as _, type EffectHandlerContext as a, type
|
|
1593
|
+
export { type PermissionProfileListResponse as $, type AccessTokenProvider as A, type QuotaPeriod as B, type ConnectOptions as C, type DomainState as D, type EndpointMode as E, type QuotaStatus as F, type GranularSpendContext as G, type SpendSummary as H, type InstanceToolHandler as I, type QuotaLineItemFilter as J, type GranularQuotaPolicy as K, type GranularQuotaProgress as L, type ManifestEffectMetamodelSpec as M, type NormalizedOpenAIUsage as N, type OpenAIModelPricing as O, type Prompt as P, type QuotaScopeType as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type User as U, type Sandbox as V, type CreateSandboxData as W, type SandboxListResponse as X, type PermissionRules as Y, type PermissionProfile as Z, type CreatePermissionProfileData as _, type EffectHandlerContext as a, type WSReconnectErrorInfo as a$, type Assignment as a0, type AssignmentListResponse as a1, type BuildPolicy as a2, type VersionTracking as a3, type VersionTag as a4, type EnvironmentData as a5, type CreateEnvironmentData as a6, type EnvironmentListResponse as a7, type Manifest as a8, type ManifestListResponse as a9, type JobFeedbackInput as aA, type JobFeedbackRecord as aB, type EnvironmentFeedbackRecord as aC, type JobSubmitResult as aD, type Job as aE, type ConversationMessageShowRefs as aF, type ConversationMessageInput as aG, type ConversationAppendResult as aH, type SessionConversationMessage as aI, type SessionTimelineEvent as aJ, type SessionFileSource as aK, type SessionFileKind as aL, type SessionFileStatus as aM, type SessionFileRecord as aN, type SessionFileUploadOptions as aO, type SessionJobRecord as aP, type SessionHeapFieldType as aQ, type SessionHeapFieldValue as aR, type SessionHeapVariable as aS, type RecordSearchResult as aT, type RecordSearchOptions as aU, type RecordMentionInput as aV, type SessionDocumentResult as aW, type SessionCollectionListOptions as aX, type SessionJobListOptions as aY, type SessionCollectionListResult as aZ, type WSDisconnectInfo as a_, type BuildStatus as aa, type Build as ab, type Version as ac, type BuildListResponse as ad, type SemanticVersionDiffEntry as ae, type SemanticVersionDiff as af, type ResolvedEffectPostCondition as ag, type ResolvedEffectDryRun as ah, type ResolvedEffectReverse as ai, type ResolvedEffectApprovalRequired as aj, type EffectInvocationMode as ak, type EffectInvocationMetadata as al, type EffectSchema as am, type EffectWithHandler as an, type PublishEffectsResult as ao, type EffectVersionSelector as ap, type ToolInfo as aq, type EffectInfo as ar, type ToolsChangedEvent as as, type EffectsChangedEvent as at, type EffectHandler as au, type InstanceEffectHandler as av, type JobStatus as aw, type JobFeedbackSentiment as ax, type JobFeedbackToolCall as ay, type JobFeedbackMetadata as az, type SessionHeapList as b, type WSClientOptions as b0, type RPCRequest as b1, type RPCResponse as b2, type SyncMessage as b3, type RPCRequestFromServer as b4, type ToolInvokeParams as b5, type ToolResultParams as b6, type ModelRef as b7, type RelationshipInfo as b8, type DefineRelationshipOptions as b9, type ManifestPostConditionSpec as bA, type ManifestDryRunSpec as bB, type ManifestReverseSpec as bC, type ManifestApprovalRequiredSpec as bD, type ManifestRelationshipDef as bE, type ManifestEffectSchema as bF, type ManifestEffectDeclaration as bG, type ManifestEventTypeDef as bH, type ManifestEventStreamDef as bI, type ManifestOperation as bJ, type ManifestImport as bK, type ManifestVolume as bL, type ManifestContent as bM, type GraphQLResult as bN, type APIError as bO, type DeleteResponse as bP, type StreamEvent as bQ, type StreamSubscription as bR, type StreamStats as bS, type RecordObjectOptions as ba, type RecordObjectResult as bb, type RecordObjectsChunkInfo as bc, type RecordObjectsOptions as bd, type RecordImportWriteMode as be, type RecordImportOptions as bf, type RecordImportStatus as bg, type RecordImportItemStatus as bh, type RecordImportStats as bi, type RecordImportItem as bj, type RecordImport as bk, type EnvironmentRecordImportSummary as bl, type EnvironmentSetupTriggerReason as bm, type RunEnvironmentImporterOptions as bn, type EnvironmentSetupLifecycleStatus as bo, type EnvironmentSetupSummary as bp, type EnvironmentImporterImportOptions as bq, type EnvironmentImporter as br, type ManifestPropertySpec as bs, type ManifestValidationOperator as bt, type ManifestEnumRuleSpec as bu, type ManifestFilterBySpec as bv, type ManifestValidationRuleSpec as bw, type ManifestStateMachineStateSpec as bx, type ManifestStateMachineTransitionSpec as by, type ManifestStateMachineSpec as bz, type SessionHeapSnapshot as c, type SessionTranscriptEntry as d, type ToolSchema as e, type PublishToolsResult as f, type ToolHandler as g, type OpenAITokenSpend as h, OPENAI_MODEL_PRICING_USD_PER_MILLION as i, getOpenAIModelPricing as j, calculateOpenAITokenSpend as k, type OpenAIUsageSpendEvent as l, type RecordOpenAIUsageSpendOptions as m, normalizeOpenAIUsage as n, type RecordOpenAIUsageSpendResult as o, buildOpenAISpendEventId as p, type GranularOptions as q, recordOpenAIUsageSpend as r, type GranularAuth as s, toGranularHttpBase as t, type RecordUserOptions as u, type Subject as v, type OpenEnvironmentOptions as w, type CreateSessionOptions as x, type ConversationSessionInfo as y, type SpendLineItemType as z };
|
|
@@ -812,6 +812,7 @@ interface ConversationMessageShowRefs {
|
|
|
812
812
|
entryPaths?: string[];
|
|
813
813
|
listNames?: string[];
|
|
814
814
|
variableNames?: string[];
|
|
815
|
+
fileIds?: string[];
|
|
815
816
|
}
|
|
816
817
|
interface ConversationMessageInput {
|
|
817
818
|
role: "user" | "assistant";
|
|
@@ -853,6 +854,39 @@ interface SessionTimelineEvent {
|
|
|
853
854
|
createdAt?: number;
|
|
854
855
|
[key: string]: unknown;
|
|
855
856
|
}
|
|
857
|
+
type SessionFileSource = "dock" | "sdk" | "agent" | "runtime" | "processor" | "library" | "imported";
|
|
858
|
+
type SessionFileKind = "csv" | "spreadsheet" | "pdf" | "image" | "text" | "document" | "binary";
|
|
859
|
+
type SessionFileStatus = "queued" | "ready" | "processing" | "processed" | "failed" | "deleted";
|
|
860
|
+
interface SessionFileRecord {
|
|
861
|
+
fileId: string;
|
|
862
|
+
sessionId: string;
|
|
863
|
+
tenantId: string | null;
|
|
864
|
+
subjectId: string | null;
|
|
865
|
+
sandboxId: string | null;
|
|
866
|
+
environmentId: string | null;
|
|
867
|
+
filename: string;
|
|
868
|
+
safeFilename: string;
|
|
869
|
+
contentType: string;
|
|
870
|
+
byteLength: number;
|
|
871
|
+
sha256: string;
|
|
872
|
+
r2Key: string;
|
|
873
|
+
kind: SessionFileKind;
|
|
874
|
+
source: SessionFileSource;
|
|
875
|
+
status: SessionFileStatus;
|
|
876
|
+
createdAt: number;
|
|
877
|
+
updatedAt: number;
|
|
878
|
+
jobId?: string;
|
|
879
|
+
parentFileIds?: string[];
|
|
880
|
+
outputPath?: string;
|
|
881
|
+
metadata?: Record<string, unknown>;
|
|
882
|
+
}
|
|
883
|
+
interface SessionFileUploadOptions {
|
|
884
|
+
filename?: string;
|
|
885
|
+
contentType?: string;
|
|
886
|
+
source?: "dock" | "sdk" | "imported";
|
|
887
|
+
parentFileIds?: string[];
|
|
888
|
+
metadata?: Record<string, unknown>;
|
|
889
|
+
}
|
|
856
890
|
interface SessionJobRecord {
|
|
857
891
|
jobId: string;
|
|
858
892
|
status: string;
|
|
@@ -1556,4 +1590,4 @@ declare function toGranularHttpBase(apiUrl: string): string;
|
|
|
1556
1590
|
declare function buildOpenAISpendEventId(usage: Pick<OpenAIUsageSpendEvent, "requestId">, context?: GranularSpendContext): string | undefined;
|
|
1557
1591
|
declare function recordOpenAIUsageSpend(options: RecordOpenAIUsageSpendOptions): Promise<RecordOpenAIUsageSpendResult>;
|
|
1558
1592
|
|
|
1559
|
-
export { type PermissionProfileListResponse as $, type AccessTokenProvider as A, type QuotaPeriod as B, type ConnectOptions as C, type DomainState as D, type EndpointMode as E, type QuotaStatus as F, type GranularSpendContext as G, type SpendSummary as H, type InstanceToolHandler as I, type QuotaLineItemFilter as J, type GranularQuotaPolicy as K, type GranularQuotaProgress as L, type ManifestEffectMetamodelSpec as M, type NormalizedOpenAIUsage as N, type OpenAIModelPricing as O, type Prompt as P, type QuotaScopeType as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type User as U, type Sandbox as V, type CreateSandboxData as W, type SandboxListResponse as X, type PermissionRules as Y, type PermissionProfile as Z, type CreatePermissionProfileData as _, type EffectHandlerContext as a, type
|
|
1593
|
+
export { type PermissionProfileListResponse as $, type AccessTokenProvider as A, type QuotaPeriod as B, type ConnectOptions as C, type DomainState as D, type EndpointMode as E, type QuotaStatus as F, type GranularSpendContext as G, type SpendSummary as H, type InstanceToolHandler as I, type QuotaLineItemFilter as J, type GranularQuotaPolicy as K, type GranularQuotaProgress as L, type ManifestEffectMetamodelSpec as M, type NormalizedOpenAIUsage as N, type OpenAIModelPricing as O, type Prompt as P, type QuotaScopeType as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type User as U, type Sandbox as V, type CreateSandboxData as W, type SandboxListResponse as X, type PermissionRules as Y, type PermissionProfile as Z, type CreatePermissionProfileData as _, type EffectHandlerContext as a, type WSReconnectErrorInfo as a$, type Assignment as a0, type AssignmentListResponse as a1, type BuildPolicy as a2, type VersionTracking as a3, type VersionTag as a4, type EnvironmentData as a5, type CreateEnvironmentData as a6, type EnvironmentListResponse as a7, type Manifest as a8, type ManifestListResponse as a9, type JobFeedbackInput as aA, type JobFeedbackRecord as aB, type EnvironmentFeedbackRecord as aC, type JobSubmitResult as aD, type Job as aE, type ConversationMessageShowRefs as aF, type ConversationMessageInput as aG, type ConversationAppendResult as aH, type SessionConversationMessage as aI, type SessionTimelineEvent as aJ, type SessionFileSource as aK, type SessionFileKind as aL, type SessionFileStatus as aM, type SessionFileRecord as aN, type SessionFileUploadOptions as aO, type SessionJobRecord as aP, type SessionHeapFieldType as aQ, type SessionHeapFieldValue as aR, type SessionHeapVariable as aS, type RecordSearchResult as aT, type RecordSearchOptions as aU, type RecordMentionInput as aV, type SessionDocumentResult as aW, type SessionCollectionListOptions as aX, type SessionJobListOptions as aY, type SessionCollectionListResult as aZ, type WSDisconnectInfo as a_, type BuildStatus as aa, type Build as ab, type Version as ac, type BuildListResponse as ad, type SemanticVersionDiffEntry as ae, type SemanticVersionDiff as af, type ResolvedEffectPostCondition as ag, type ResolvedEffectDryRun as ah, type ResolvedEffectReverse as ai, type ResolvedEffectApprovalRequired as aj, type EffectInvocationMode as ak, type EffectInvocationMetadata as al, type EffectSchema as am, type EffectWithHandler as an, type PublishEffectsResult as ao, type EffectVersionSelector as ap, type ToolInfo as aq, type EffectInfo as ar, type ToolsChangedEvent as as, type EffectsChangedEvent as at, type EffectHandler as au, type InstanceEffectHandler as av, type JobStatus as aw, type JobFeedbackSentiment as ax, type JobFeedbackToolCall as ay, type JobFeedbackMetadata as az, type SessionHeapList as b, type WSClientOptions as b0, type RPCRequest as b1, type RPCResponse as b2, type SyncMessage as b3, type RPCRequestFromServer as b4, type ToolInvokeParams as b5, type ToolResultParams as b6, type ModelRef as b7, type RelationshipInfo as b8, type DefineRelationshipOptions as b9, type ManifestPostConditionSpec as bA, type ManifestDryRunSpec as bB, type ManifestReverseSpec as bC, type ManifestApprovalRequiredSpec as bD, type ManifestRelationshipDef as bE, type ManifestEffectSchema as bF, type ManifestEffectDeclaration as bG, type ManifestEventTypeDef as bH, type ManifestEventStreamDef as bI, type ManifestOperation as bJ, type ManifestImport as bK, type ManifestVolume as bL, type ManifestContent as bM, type GraphQLResult as bN, type APIError as bO, type DeleteResponse as bP, type StreamEvent as bQ, type StreamSubscription as bR, type StreamStats as bS, type RecordObjectOptions as ba, type RecordObjectResult as bb, type RecordObjectsChunkInfo as bc, type RecordObjectsOptions as bd, type RecordImportWriteMode as be, type RecordImportOptions as bf, type RecordImportStatus as bg, type RecordImportItemStatus as bh, type RecordImportStats as bi, type RecordImportItem as bj, type RecordImport as bk, type EnvironmentRecordImportSummary as bl, type EnvironmentSetupTriggerReason as bm, type RunEnvironmentImporterOptions as bn, type EnvironmentSetupLifecycleStatus as bo, type EnvironmentSetupSummary as bp, type EnvironmentImporterImportOptions as bq, type EnvironmentImporter as br, type ManifestPropertySpec as bs, type ManifestValidationOperator as bt, type ManifestEnumRuleSpec as bu, type ManifestFilterBySpec as bv, type ManifestValidationRuleSpec as bw, type ManifestStateMachineStateSpec as bx, type ManifestStateMachineTransitionSpec as by, type ManifestStateMachineSpec as bz, type SessionHeapSnapshot as c, type SessionTranscriptEntry as d, type ToolSchema as e, type PublishToolsResult as f, type ToolHandler as g, type OpenAITokenSpend as h, OPENAI_MODEL_PRICING_USD_PER_MILLION as i, getOpenAIModelPricing as j, calculateOpenAITokenSpend as k, type OpenAIUsageSpendEvent as l, type RecordOpenAIUsageSpendOptions as m, normalizeOpenAIUsage as n, type RecordOpenAIUsageSpendResult as o, buildOpenAISpendEventId as p, type GranularOptions as q, recordOpenAIUsageSpend as r, type GranularAuth as s, toGranularHttpBase as t, type RecordUserOptions as u, type Subject as v, type OpenEnvironmentOptions as w, type CreateSessionOptions as x, type ConversationSessionInfo as y, type SpendLineItemType as z };
|
package/dist/spend.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { G as GranularSpendContext, l as OpenAIUsageSpendEvent, m as RecordOpenAIUsageSpendOptions, o as RecordOpenAIUsageSpendResult, p as buildOpenAISpendEventId, r as recordOpenAIUsageSpend, t as toGranularHttpBase } from './spend-
|
|
1
|
+
export { G as GranularSpendContext, l as OpenAIUsageSpendEvent, m as RecordOpenAIUsageSpendOptions, o as RecordOpenAIUsageSpendResult, p as buildOpenAISpendEventId, r as recordOpenAIUsageSpend, t as toGranularHttpBase } from './spend-tAz2a16I.mjs';
|
|
2
2
|
import '@granular-software/policy-engine';
|
package/dist/spend.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { G as GranularSpendContext, l as OpenAIUsageSpendEvent, m as RecordOpenAIUsageSpendOptions, o as RecordOpenAIUsageSpendResult, p as buildOpenAISpendEventId, r as recordOpenAIUsageSpend, t as toGranularHttpBase } from './spend-
|
|
1
|
+
export { G as GranularSpendContext, l as OpenAIUsageSpendEvent, m as RecordOpenAIUsageSpendOptions, o as RecordOpenAIUsageSpendResult, p as buildOpenAISpendEventId, r as recordOpenAIUsageSpend, t as toGranularHttpBase } from './spend-tAz2a16I.js';
|
|
2
2
|
import '@granular-software/policy-engine';
|
package/package.json
CHANGED