@granular-software/sdk 0.4.51 → 0.4.52
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 +2 -2
- package/dist/agent-evals.d.ts +2 -2
- package/dist/agent-evals.js +236 -31
- package/dist/agent-evals.js.map +1 -1
- package/dist/agent-evals.mjs +236 -31
- package/dist/agent-evals.mjs.map +1 -1
- package/dist/cli/index.js +267 -50
- package/dist/{client-djorlOpn.d.mts → client-B2OyGOHE.d.mts} +18 -3
- package/dist/{client-NSH-tpNU.d.ts → client-BMfjRJTs.d.ts} +18 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +236 -31
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +236 -31
- package/dist/index.mjs.map +1 -1
- package/dist/{spend-BA-jZwZ0.d.mts → spend-DpRRCrAr.d.mts} +37 -2
- package/dist/{spend-BA-jZwZ0.d.ts → spend-DpRRCrAr.d.ts} +37 -2
- package/dist/spend.d.mts +1 -1
- package/dist/spend.d.ts +1 -1
- package/package.json +1 -1
|
@@ -224,9 +224,28 @@ interface OpenEnvironmentOptions {
|
|
|
224
224
|
* the newest tag target instead of reusing the outdated one.
|
|
225
225
|
*/
|
|
226
226
|
createFreshIfOutdated?: boolean;
|
|
227
|
+
/**
|
|
228
|
+
* Create a fresh environment on the current tag target. Reusing this key is
|
|
229
|
+
* safe: it returns the environment created by the original operation.
|
|
230
|
+
*/
|
|
231
|
+
resetKey?: string;
|
|
232
|
+
/** Canonical active-environment slot. Defaults to `default`. */
|
|
233
|
+
slot?: string;
|
|
227
234
|
/** Backwards-compatible user object returned from `recordUser()`. */
|
|
228
235
|
user?: User;
|
|
229
236
|
}
|
|
237
|
+
/**
|
|
238
|
+
* One-time administrative migration of a known existing environment into
|
|
239
|
+
* Granular's active-environment map. The environment id must be obtained from
|
|
240
|
+
* a reviewed baseline; this API intentionally has no name-based lookup.
|
|
241
|
+
*/
|
|
242
|
+
interface AdoptEnvironmentOptions {
|
|
243
|
+
sandboxId: string;
|
|
244
|
+
tag: string;
|
|
245
|
+
userId: string;
|
|
246
|
+
environmentId: string;
|
|
247
|
+
slot?: string;
|
|
248
|
+
}
|
|
230
249
|
/**
|
|
231
250
|
* Deprecated compatibility alias for the legacy `connect()` entry point.
|
|
232
251
|
*
|
|
@@ -1768,6 +1787,8 @@ type RecordImportWriteMode = "adaptive" | "batched" | "per_record" | "parallel_5
|
|
|
1768
1787
|
interface RecordImportOptions {
|
|
1769
1788
|
batchSize?: number;
|
|
1770
1789
|
setupRunId?: string;
|
|
1790
|
+
/** Stable key for retrying one logical durable import exactly once. */
|
|
1791
|
+
operationKey?: string;
|
|
1771
1792
|
writeMode?: RecordImportWriteMode;
|
|
1772
1793
|
}
|
|
1773
1794
|
type RecordImportStatus = "queued" | "processing" | "completed" | "failed" | "canceled";
|
|
@@ -1807,6 +1828,7 @@ interface RecordImport {
|
|
|
1807
1828
|
sandboxId: string;
|
|
1808
1829
|
subjectId: string;
|
|
1809
1830
|
setupRunId?: string | null;
|
|
1831
|
+
operationKey?: string | null;
|
|
1810
1832
|
status: RecordImportStatus;
|
|
1811
1833
|
batchSize: number;
|
|
1812
1834
|
errorMessage: string | null;
|
|
@@ -1823,7 +1845,7 @@ interface EnvironmentRecordImportSummary extends RecordImportStats {
|
|
|
1823
1845
|
activeImports: number;
|
|
1824
1846
|
updatedAt: number;
|
|
1825
1847
|
}
|
|
1826
|
-
type EnvironmentSetupTriggerReason = "new_environment" | "fresh_after_version_update";
|
|
1848
|
+
type EnvironmentSetupTriggerReason = "new_environment" | "fresh_after_version_update" | "explicit_reset";
|
|
1827
1849
|
interface RunEnvironmentImporterOptions {
|
|
1828
1850
|
/**
|
|
1829
1851
|
* Ontology name/id used to resolve the registered importer. Defaults to the
|
|
@@ -1834,6 +1856,8 @@ interface RunEnvironmentImporterOptions {
|
|
|
1834
1856
|
* Reason recorded on the setup run. Defaults to `new_environment`.
|
|
1835
1857
|
*/
|
|
1836
1858
|
reason?: EnvironmentSetupTriggerReason;
|
|
1859
|
+
/** Stable caller operation key. Use for explicit reset retries. */
|
|
1860
|
+
operationKey?: string;
|
|
1837
1861
|
}
|
|
1838
1862
|
type EnvironmentSetupLifecycleStatus = "running" | "completed" | "failed";
|
|
1839
1863
|
interface EnvironmentSetupSummary extends RecordImportStats {
|
|
@@ -1842,6 +1866,7 @@ interface EnvironmentSetupSummary extends RecordImportStats {
|
|
|
1842
1866
|
sandboxId: string;
|
|
1843
1867
|
subjectId: string;
|
|
1844
1868
|
triggerReason: EnvironmentSetupTriggerReason;
|
|
1869
|
+
operationKey?: string | null;
|
|
1845
1870
|
lifecycleStatus: EnvironmentSetupLifecycleStatus;
|
|
1846
1871
|
stage: string | null;
|
|
1847
1872
|
totalObjectsToImport: number;
|
|
@@ -1852,6 +1877,14 @@ interface EnvironmentSetupSummary extends RecordImportStats {
|
|
|
1852
1877
|
hookCompletedAt: number | null;
|
|
1853
1878
|
finishedAt: number | null;
|
|
1854
1879
|
updatedAt: number;
|
|
1880
|
+
/** `false` when an idempotent setup operation already exists. */
|
|
1881
|
+
created?: boolean;
|
|
1882
|
+
}
|
|
1883
|
+
/** Result of claiming the importer portion of a durable setup run. */
|
|
1884
|
+
interface EnvironmentSetupImporterClaim {
|
|
1885
|
+
action: "run" | "submitted" | "busy" | "terminal";
|
|
1886
|
+
summary: EnvironmentSetupSummary;
|
|
1887
|
+
retryAfterMs?: number;
|
|
1855
1888
|
}
|
|
1856
1889
|
interface EnvironmentImporterImportOptions {
|
|
1857
1890
|
batchSize?: number;
|
|
@@ -1861,6 +1894,8 @@ interface EnvironmentImporter {
|
|
|
1861
1894
|
environmentId: string;
|
|
1862
1895
|
sandboxId: string;
|
|
1863
1896
|
subjectId: string;
|
|
1897
|
+
/** Application identity originally supplied as `openEnvironment({ userId })`. */
|
|
1898
|
+
externalUserId: string;
|
|
1864
1899
|
reason: EnvironmentSetupTriggerReason;
|
|
1865
1900
|
incrementTotalObjectsToImportCount: (n: number) => Promise<void>;
|
|
1866
1901
|
setStage: (stage: string | null) => Promise<void>;
|
|
@@ -2272,4 +2307,4 @@ declare function toGranularHttpBase(apiUrl: string): string;
|
|
|
2272
2307
|
declare function buildOpenAISpendEventId(usage: Pick<OpenAIUsageSpendEvent, "requestId">, context?: GranularSpendContext): string | undefined;
|
|
2273
2308
|
declare function recordOpenAIUsageSpend(options: RecordOpenAIUsageSpendOptions): Promise<RecordOpenAIUsageSpendResult>;
|
|
2274
2309
|
|
|
2275
|
-
export { type
|
|
2310
|
+
export { type SpendSummary as $, type AccessTokenProvider as A, type RecordUserOptions as B, type ConditionIR as C, type DomainState as D, type EndpointMode as E, type Subject as F, type GranularSpendContext as G, type OpenEnvironmentOptions as H, type InstanceToolHandler as I, type AdoptEnvironmentOptions as J, type ConnectOptions as K, type CreateSessionOptions as L, type ManifestEffectMetamodelSpec as M, type NormalizedOpenAIUsage as N, type OpenAIModelPricing as O, type Prompt as P, type ConversationSessionInfo as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type User as U, type ConversationSessionListStatus as V, type ConversationSessionListOptions as W, type SpendLineItemType as X, type QuotaScopeType as Y, type QuotaPeriod as Z, type QuotaStatus as _, type EffectHandlerContext as a, type SessionTimelineEvent as a$, type QuotaLineItemFilter as a0, type GranularQuotaPolicy as a1, type GranularQuotaProgress as a2, type Sandbox as a3, type CreateSandboxData as a4, type SandboxListResponse as a5, type PermissionRules as a6, type PermissionProfile as a7, type CreatePermissionProfileData as a8, type PermissionProfileListResponse as a9, type ToolInfo as aA, type EffectInfo as aB, type ToolsChangedEvent as aC, type EffectsChangedEvent as aD, type EffectHandler as aE, type InstanceEffectHandler as aF, type JobStatus as aG, type JobFeedbackSentiment as aH, type JobFeedbackToolCall as aI, type JobFeedbackMetadata as aJ, type JobFeedbackInput as aK, type JobFeedbackRecord as aL, type EnvironmentFeedbackRecord as aM, type JobSubmitResult as aN, type Job as aO, type ConversationMessageShowRefs as aP, type ConversationTableCell as aQ, type ConversationTableColumn as aR, type ConversationTableRowReference as aS, type ConversationTableRow as aT, type ConversationTableProjection as aU, type ConversationActionSuggestion as aV, type ConversationMessageAction as aW, type ConversationMessagePart as aX, type ConversationMessageInput as aY, type ConversationAppendResult as aZ, type SessionConversationMessage as a_, type Assignment as aa, type AssignmentListResponse as ab, type BuildPolicy as ac, type VersionTracking as ad, type VersionTag as ae, type EnvironmentData as af, type CreateEnvironmentData as ag, type EnvironmentListResponse as ah, type Manifest as ai, type ManifestListResponse as aj, type BuildStatus as ak, type Build as al, type Version as am, type BuildListResponse as an, type SemanticVersionDiffEntry as ao, type SemanticVersionDiff as ap, type ResolvedEffectPostCondition as aq, type ResolvedEffectDryRun as ar, type ResolvedEffectReverse as as, type ResolvedEffectApprovalRequired as at, type EffectInvocationMode as au, type EffectInvocationMetadata as av, type EffectSchema as aw, type EffectWithHandler as ax, type PublishEffectsResult as ay, type EffectVersionSelector as az, type SessionHeapList as b, type EnvironmentStateMachineProxy as b$, type SessionFileSource as b0, type SessionFileKind as b1, type SessionFileStatus as b2, type SessionFileRecord as b3, type SessionArtifactStatus as b4, type SessionArtifactKind as b5, type SessionArtifactAutonomyPolicy as b6, type SessionArtifactRecord as b7, type SessionArtifactListOptions as b8, type SessionArtifactValidationResult as b9, type SessionDocumentResult as bA, type SessionCollectionListOptions as bB, type SessionJobListOptions as bC, type SessionCollectionListResult as bD, type UserEnvironmentPrompt as bE, type UserEnvironmentMessagePreview as bF, type UserEnvironmentSessionState as bG, type UserEnvironmentState as bH, type UserEnvironmentStateOptions as bI, type MarkUserEnvironmentReadOptions as bJ, type WSDisconnectInfo as bK, type WSReconnectErrorInfo as bL, type WSClientOptions as bM, type RPCRequest as bN, type RPCResponse as bO, type SyncMessage as bP, type RPCRequestFromServer as bQ, type ToolInvokeParams as bR, type ToolResultParams as bS, type ModelRef as bT, type RelationshipInfo as bU, type DefineRelationshipOptions as bV, type RecordObjectOptions as bW, type RecordObjectStateValue as bX, type EnvironmentStateTarget as bY, type EnvironmentStateObservationInput as bZ, type EnvironmentStateUpdateInput as b_, type SessionArtifactExecutionResult as ba, type SessionArtifactExecutionOptions as bb, type SessionArtifactApprovalOptions as bc, type ArtifactApprovalTaskStatus as bd, type ArtifactApprovalTask as be, type ArtifactApprovalTaskListOptions as bf, type ArtifactApprovalDecisionInput as bg, type ArtifactApprovalDecisionResult as bh, type ManualActionStatus as bi, type ManualActionSource as bj, type ManualActionTarget as bk, type ManualActionRelatedRecord as bl, type RecordManualActionInput as bm, type ManualActionOccurrence as bn, type ManualActionRecordResult as bo, type ManualActionListOptions as bp, type ManualActionSuggestion as bq, type ManualActionSuggestionOptions as br, type SessionFileUploadOptions as bs, type SessionJobRecord as bt, type SessionHeapFieldType as bu, type SessionHeapFieldValue as bv, type SessionHeapVariable as bw, type RecordSearchResult as bx, type RecordSearchOptions as by, type RecordMentionInput as bz, type SessionHeapSnapshot as c, type EnvironmentStateProxy as c0, type RecordObjectResult as c1, type RecordObjectsChunkInfo as c2, type RecordObjectsOptions as c3, type RecordImportWriteMode as c4, type RecordImportOptions as c5, type RecordImportStatus as c6, type RecordImportItemStatus as c7, type RecordImportStats as c8, type RecordImportItem as c9, type ManifestReverseSpec as cA, type ManifestApprovalRequiredSpec as cB, type ManifestCreatesSpec as cC, type ManifestRelationshipDef as cD, type ManifestEffectSchema as cE, type ManifestEffectDeclaration as cF, type ManifestEventTypeDef as cG, type ManifestEventStreamDef as cH, type ManifestOperation as cI, type ManifestImport as cJ, type ManifestVolume as cK, type ManifestContent as cL, type GraphQLResult as cM, type APIError as cN, type DeleteResponse as cO, type StreamEvent as cP, type StreamSubscription as cQ, type StreamStats as cR, type RecordImport as ca, type EnvironmentRecordImportSummary as cb, type EnvironmentSetupTriggerReason as cc, type RunEnvironmentImporterOptions as cd, type EnvironmentSetupLifecycleStatus as ce, type EnvironmentSetupSummary as cf, type EnvironmentSetupImporterClaim as cg, type EnvironmentImporterImportOptions as ch, type EnvironmentImporter as ci, type ManifestPropertySpec as cj, type ManifestValidationOperator as ck, type ManifestEnumRuleSpec as cl, type ManifestFilterBySpec as cm, type ManifestValidationRuleSpec as cn, type ManifestStateMachineStateSpec as co, type ManifestStateTransitionInputBinding as cp, type ManifestStateTransitionActionSpec as cq, type ManifestStateTransitionAssigneeSpec as cr, type ManifestStateTransitionRelatedStateRequirementSpec as cs, type ManifestStateTransitionRequirementsSpec as ct, type ManifestStateTransitionPermissionSpec as cu, type ManifestStateTransitionExpectedOutcomeSpec as cv, type ManifestStateMachineTransitionSpec as cw, type ManifestStateMachineSpec as cx, type ManifestPostConditionSpec as cy, type ManifestDryRunSpec as cz, 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 PolicySource as q, recordOpenAIUsageSpend as r, type PolicyPredicateSource as s, toGranularHttpBase as t, type PolicyOperator as u, type PolicyOrigin as v, type PolicyRuleIR as w, type MatchedPolicy as x, type GranularOptions as y, type GranularAuth as z };
|
|
@@ -224,9 +224,28 @@ interface OpenEnvironmentOptions {
|
|
|
224
224
|
* the newest tag target instead of reusing the outdated one.
|
|
225
225
|
*/
|
|
226
226
|
createFreshIfOutdated?: boolean;
|
|
227
|
+
/**
|
|
228
|
+
* Create a fresh environment on the current tag target. Reusing this key is
|
|
229
|
+
* safe: it returns the environment created by the original operation.
|
|
230
|
+
*/
|
|
231
|
+
resetKey?: string;
|
|
232
|
+
/** Canonical active-environment slot. Defaults to `default`. */
|
|
233
|
+
slot?: string;
|
|
227
234
|
/** Backwards-compatible user object returned from `recordUser()`. */
|
|
228
235
|
user?: User;
|
|
229
236
|
}
|
|
237
|
+
/**
|
|
238
|
+
* One-time administrative migration of a known existing environment into
|
|
239
|
+
* Granular's active-environment map. The environment id must be obtained from
|
|
240
|
+
* a reviewed baseline; this API intentionally has no name-based lookup.
|
|
241
|
+
*/
|
|
242
|
+
interface AdoptEnvironmentOptions {
|
|
243
|
+
sandboxId: string;
|
|
244
|
+
tag: string;
|
|
245
|
+
userId: string;
|
|
246
|
+
environmentId: string;
|
|
247
|
+
slot?: string;
|
|
248
|
+
}
|
|
230
249
|
/**
|
|
231
250
|
* Deprecated compatibility alias for the legacy `connect()` entry point.
|
|
232
251
|
*
|
|
@@ -1768,6 +1787,8 @@ type RecordImportWriteMode = "adaptive" | "batched" | "per_record" | "parallel_5
|
|
|
1768
1787
|
interface RecordImportOptions {
|
|
1769
1788
|
batchSize?: number;
|
|
1770
1789
|
setupRunId?: string;
|
|
1790
|
+
/** Stable key for retrying one logical durable import exactly once. */
|
|
1791
|
+
operationKey?: string;
|
|
1771
1792
|
writeMode?: RecordImportWriteMode;
|
|
1772
1793
|
}
|
|
1773
1794
|
type RecordImportStatus = "queued" | "processing" | "completed" | "failed" | "canceled";
|
|
@@ -1807,6 +1828,7 @@ interface RecordImport {
|
|
|
1807
1828
|
sandboxId: string;
|
|
1808
1829
|
subjectId: string;
|
|
1809
1830
|
setupRunId?: string | null;
|
|
1831
|
+
operationKey?: string | null;
|
|
1810
1832
|
status: RecordImportStatus;
|
|
1811
1833
|
batchSize: number;
|
|
1812
1834
|
errorMessage: string | null;
|
|
@@ -1823,7 +1845,7 @@ interface EnvironmentRecordImportSummary extends RecordImportStats {
|
|
|
1823
1845
|
activeImports: number;
|
|
1824
1846
|
updatedAt: number;
|
|
1825
1847
|
}
|
|
1826
|
-
type EnvironmentSetupTriggerReason = "new_environment" | "fresh_after_version_update";
|
|
1848
|
+
type EnvironmentSetupTriggerReason = "new_environment" | "fresh_after_version_update" | "explicit_reset";
|
|
1827
1849
|
interface RunEnvironmentImporterOptions {
|
|
1828
1850
|
/**
|
|
1829
1851
|
* Ontology name/id used to resolve the registered importer. Defaults to the
|
|
@@ -1834,6 +1856,8 @@ interface RunEnvironmentImporterOptions {
|
|
|
1834
1856
|
* Reason recorded on the setup run. Defaults to `new_environment`.
|
|
1835
1857
|
*/
|
|
1836
1858
|
reason?: EnvironmentSetupTriggerReason;
|
|
1859
|
+
/** Stable caller operation key. Use for explicit reset retries. */
|
|
1860
|
+
operationKey?: string;
|
|
1837
1861
|
}
|
|
1838
1862
|
type EnvironmentSetupLifecycleStatus = "running" | "completed" | "failed";
|
|
1839
1863
|
interface EnvironmentSetupSummary extends RecordImportStats {
|
|
@@ -1842,6 +1866,7 @@ interface EnvironmentSetupSummary extends RecordImportStats {
|
|
|
1842
1866
|
sandboxId: string;
|
|
1843
1867
|
subjectId: string;
|
|
1844
1868
|
triggerReason: EnvironmentSetupTriggerReason;
|
|
1869
|
+
operationKey?: string | null;
|
|
1845
1870
|
lifecycleStatus: EnvironmentSetupLifecycleStatus;
|
|
1846
1871
|
stage: string | null;
|
|
1847
1872
|
totalObjectsToImport: number;
|
|
@@ -1852,6 +1877,14 @@ interface EnvironmentSetupSummary extends RecordImportStats {
|
|
|
1852
1877
|
hookCompletedAt: number | null;
|
|
1853
1878
|
finishedAt: number | null;
|
|
1854
1879
|
updatedAt: number;
|
|
1880
|
+
/** `false` when an idempotent setup operation already exists. */
|
|
1881
|
+
created?: boolean;
|
|
1882
|
+
}
|
|
1883
|
+
/** Result of claiming the importer portion of a durable setup run. */
|
|
1884
|
+
interface EnvironmentSetupImporterClaim {
|
|
1885
|
+
action: "run" | "submitted" | "busy" | "terminal";
|
|
1886
|
+
summary: EnvironmentSetupSummary;
|
|
1887
|
+
retryAfterMs?: number;
|
|
1855
1888
|
}
|
|
1856
1889
|
interface EnvironmentImporterImportOptions {
|
|
1857
1890
|
batchSize?: number;
|
|
@@ -1861,6 +1894,8 @@ interface EnvironmentImporter {
|
|
|
1861
1894
|
environmentId: string;
|
|
1862
1895
|
sandboxId: string;
|
|
1863
1896
|
subjectId: string;
|
|
1897
|
+
/** Application identity originally supplied as `openEnvironment({ userId })`. */
|
|
1898
|
+
externalUserId: string;
|
|
1864
1899
|
reason: EnvironmentSetupTriggerReason;
|
|
1865
1900
|
incrementTotalObjectsToImportCount: (n: number) => Promise<void>;
|
|
1866
1901
|
setStage: (stage: string | null) => Promise<void>;
|
|
@@ -2272,4 +2307,4 @@ declare function toGranularHttpBase(apiUrl: string): string;
|
|
|
2272
2307
|
declare function buildOpenAISpendEventId(usage: Pick<OpenAIUsageSpendEvent, "requestId">, context?: GranularSpendContext): string | undefined;
|
|
2273
2308
|
declare function recordOpenAIUsageSpend(options: RecordOpenAIUsageSpendOptions): Promise<RecordOpenAIUsageSpendResult>;
|
|
2274
2309
|
|
|
2275
|
-
export { type
|
|
2310
|
+
export { type SpendSummary as $, type AccessTokenProvider as A, type RecordUserOptions as B, type ConditionIR as C, type DomainState as D, type EndpointMode as E, type Subject as F, type GranularSpendContext as G, type OpenEnvironmentOptions as H, type InstanceToolHandler as I, type AdoptEnvironmentOptions as J, type ConnectOptions as K, type CreateSessionOptions as L, type ManifestEffectMetamodelSpec as M, type NormalizedOpenAIUsage as N, type OpenAIModelPricing as O, type Prompt as P, type ConversationSessionInfo as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type User as U, type ConversationSessionListStatus as V, type ConversationSessionListOptions as W, type SpendLineItemType as X, type QuotaScopeType as Y, type QuotaPeriod as Z, type QuotaStatus as _, type EffectHandlerContext as a, type SessionTimelineEvent as a$, type QuotaLineItemFilter as a0, type GranularQuotaPolicy as a1, type GranularQuotaProgress as a2, type Sandbox as a3, type CreateSandboxData as a4, type SandboxListResponse as a5, type PermissionRules as a6, type PermissionProfile as a7, type CreatePermissionProfileData as a8, type PermissionProfileListResponse as a9, type ToolInfo as aA, type EffectInfo as aB, type ToolsChangedEvent as aC, type EffectsChangedEvent as aD, type EffectHandler as aE, type InstanceEffectHandler as aF, type JobStatus as aG, type JobFeedbackSentiment as aH, type JobFeedbackToolCall as aI, type JobFeedbackMetadata as aJ, type JobFeedbackInput as aK, type JobFeedbackRecord as aL, type EnvironmentFeedbackRecord as aM, type JobSubmitResult as aN, type Job as aO, type ConversationMessageShowRefs as aP, type ConversationTableCell as aQ, type ConversationTableColumn as aR, type ConversationTableRowReference as aS, type ConversationTableRow as aT, type ConversationTableProjection as aU, type ConversationActionSuggestion as aV, type ConversationMessageAction as aW, type ConversationMessagePart as aX, type ConversationMessageInput as aY, type ConversationAppendResult as aZ, type SessionConversationMessage as a_, type Assignment as aa, type AssignmentListResponse as ab, type BuildPolicy as ac, type VersionTracking as ad, type VersionTag as ae, type EnvironmentData as af, type CreateEnvironmentData as ag, type EnvironmentListResponse as ah, type Manifest as ai, type ManifestListResponse as aj, type BuildStatus as ak, type Build as al, type Version as am, type BuildListResponse as an, type SemanticVersionDiffEntry as ao, type SemanticVersionDiff as ap, type ResolvedEffectPostCondition as aq, type ResolvedEffectDryRun as ar, type ResolvedEffectReverse as as, type ResolvedEffectApprovalRequired as at, type EffectInvocationMode as au, type EffectInvocationMetadata as av, type EffectSchema as aw, type EffectWithHandler as ax, type PublishEffectsResult as ay, type EffectVersionSelector as az, type SessionHeapList as b, type EnvironmentStateMachineProxy as b$, type SessionFileSource as b0, type SessionFileKind as b1, type SessionFileStatus as b2, type SessionFileRecord as b3, type SessionArtifactStatus as b4, type SessionArtifactKind as b5, type SessionArtifactAutonomyPolicy as b6, type SessionArtifactRecord as b7, type SessionArtifactListOptions as b8, type SessionArtifactValidationResult as b9, type SessionDocumentResult as bA, type SessionCollectionListOptions as bB, type SessionJobListOptions as bC, type SessionCollectionListResult as bD, type UserEnvironmentPrompt as bE, type UserEnvironmentMessagePreview as bF, type UserEnvironmentSessionState as bG, type UserEnvironmentState as bH, type UserEnvironmentStateOptions as bI, type MarkUserEnvironmentReadOptions as bJ, type WSDisconnectInfo as bK, type WSReconnectErrorInfo as bL, type WSClientOptions as bM, type RPCRequest as bN, type RPCResponse as bO, type SyncMessage as bP, type RPCRequestFromServer as bQ, type ToolInvokeParams as bR, type ToolResultParams as bS, type ModelRef as bT, type RelationshipInfo as bU, type DefineRelationshipOptions as bV, type RecordObjectOptions as bW, type RecordObjectStateValue as bX, type EnvironmentStateTarget as bY, type EnvironmentStateObservationInput as bZ, type EnvironmentStateUpdateInput as b_, type SessionArtifactExecutionResult as ba, type SessionArtifactExecutionOptions as bb, type SessionArtifactApprovalOptions as bc, type ArtifactApprovalTaskStatus as bd, type ArtifactApprovalTask as be, type ArtifactApprovalTaskListOptions as bf, type ArtifactApprovalDecisionInput as bg, type ArtifactApprovalDecisionResult as bh, type ManualActionStatus as bi, type ManualActionSource as bj, type ManualActionTarget as bk, type ManualActionRelatedRecord as bl, type RecordManualActionInput as bm, type ManualActionOccurrence as bn, type ManualActionRecordResult as bo, type ManualActionListOptions as bp, type ManualActionSuggestion as bq, type ManualActionSuggestionOptions as br, type SessionFileUploadOptions as bs, type SessionJobRecord as bt, type SessionHeapFieldType as bu, type SessionHeapFieldValue as bv, type SessionHeapVariable as bw, type RecordSearchResult as bx, type RecordSearchOptions as by, type RecordMentionInput as bz, type SessionHeapSnapshot as c, type EnvironmentStateProxy as c0, type RecordObjectResult as c1, type RecordObjectsChunkInfo as c2, type RecordObjectsOptions as c3, type RecordImportWriteMode as c4, type RecordImportOptions as c5, type RecordImportStatus as c6, type RecordImportItemStatus as c7, type RecordImportStats as c8, type RecordImportItem as c9, type ManifestReverseSpec as cA, type ManifestApprovalRequiredSpec as cB, type ManifestCreatesSpec as cC, type ManifestRelationshipDef as cD, type ManifestEffectSchema as cE, type ManifestEffectDeclaration as cF, type ManifestEventTypeDef as cG, type ManifestEventStreamDef as cH, type ManifestOperation as cI, type ManifestImport as cJ, type ManifestVolume as cK, type ManifestContent as cL, type GraphQLResult as cM, type APIError as cN, type DeleteResponse as cO, type StreamEvent as cP, type StreamSubscription as cQ, type StreamStats as cR, type RecordImport as ca, type EnvironmentRecordImportSummary as cb, type EnvironmentSetupTriggerReason as cc, type RunEnvironmentImporterOptions as cd, type EnvironmentSetupLifecycleStatus as ce, type EnvironmentSetupSummary as cf, type EnvironmentSetupImporterClaim as cg, type EnvironmentImporterImportOptions as ch, type EnvironmentImporter as ci, type ManifestPropertySpec as cj, type ManifestValidationOperator as ck, type ManifestEnumRuleSpec as cl, type ManifestFilterBySpec as cm, type ManifestValidationRuleSpec as cn, type ManifestStateMachineStateSpec as co, type ManifestStateTransitionInputBinding as cp, type ManifestStateTransitionActionSpec as cq, type ManifestStateTransitionAssigneeSpec as cr, type ManifestStateTransitionRelatedStateRequirementSpec as cs, type ManifestStateTransitionRequirementsSpec as ct, type ManifestStateTransitionPermissionSpec as cu, type ManifestStateTransitionExpectedOutcomeSpec as cv, type ManifestStateMachineTransitionSpec as cw, type ManifestStateMachineSpec as cx, type ManifestPostConditionSpec as cy, type ManifestDryRunSpec as cz, 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 PolicySource as q, recordOpenAIUsageSpend as r, type PolicyPredicateSource as s, toGranularHttpBase as t, type PolicyOperator as u, type PolicyOrigin as v, type PolicyRuleIR as w, type MatchedPolicy as x, type GranularOptions as y, type GranularAuth as z };
|
package/dist/spend.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
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-DpRRCrAr.mjs';
|
package/dist/spend.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
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-DpRRCrAr.js';
|
package/package.json
CHANGED