@granular-software/sdk 0.4.47 → 0.4.49
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/README.md +36 -12
- package/dist/agent-evals.d.mts +2 -2
- package/dist/agent-evals.d.ts +2 -2
- package/dist/agent-evals.js +498 -208
- package/dist/agent-evals.js.map +1 -1
- package/dist/agent-evals.mjs +498 -208
- package/dist/agent-evals.mjs.map +1 -1
- package/dist/agent-harness.d.mts +1 -1
- package/dist/agent-harness.d.ts +1 -1
- package/dist/agent-harness.js +204 -142
- package/dist/agent-harness.js.map +1 -1
- package/dist/agent-harness.mjs +204 -142
- package/dist/agent-harness.mjs.map +1 -1
- package/dist/cli/index.js +547 -182
- package/dist/{client-C1UqPDwe.d.mts → client-B-MPVvDr.d.mts} +24 -3
- package/dist/{client-ButG6ePW.d.ts → client-zihxkDDs.d.ts} +24 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +452 -194
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +452 -194
- package/dist/index.mjs.map +1 -1
- package/dist/{spend-D2Vy3N1D.d.mts → spend-CStuOBXb.d.mts} +83 -3
- package/dist/{spend-D2Vy3N1D.d.ts → spend-CStuOBXb.d.ts} +83 -3
- package/dist/spend.d.mts +1 -1
- package/dist/spend.d.ts +1 -1
- package/package.json +1 -1
|
@@ -284,7 +284,7 @@ interface ConversationSessionInfo {
|
|
|
284
284
|
environmentId: string;
|
|
285
285
|
versionId?: string | null;
|
|
286
286
|
docId: string;
|
|
287
|
-
status: "active" | "closed" | "expired";
|
|
287
|
+
status: "active" | "closed" | "expired" | "failed" | "timeout";
|
|
288
288
|
createdAt: string;
|
|
289
289
|
lastSeenAt: string;
|
|
290
290
|
summary?: string | null;
|
|
@@ -666,7 +666,7 @@ type InstanceToolHandler = (id: string, input: any, context: EffectHandlerContex
|
|
|
666
666
|
*
|
|
667
667
|
* Both `inputSchema` and `outputSchema` accept JSON Schema objects.
|
|
668
668
|
* The `outputSchema` drives the return type in the auto-generated
|
|
669
|
-
* TypeScript declarations that sandbox code imports from
|
|
669
|
+
* TypeScript declarations that sandbox code imports from Harness v3 runtime modules.
|
|
670
670
|
*/
|
|
671
671
|
interface ToolSchema {
|
|
672
672
|
effectKey?: string;
|
|
@@ -925,6 +925,10 @@ interface ConversationMessageInput {
|
|
|
925
925
|
role: "user" | "assistant";
|
|
926
926
|
content?: string;
|
|
927
927
|
show?: ConversationMessageShowRefs;
|
|
928
|
+
reasoningLines?: string[];
|
|
929
|
+
reasoningDurationMs?: number;
|
|
930
|
+
actions?: Array<Record<string, unknown>>;
|
|
931
|
+
target?: Record<string, unknown>;
|
|
928
932
|
jobId?: string;
|
|
929
933
|
promptId?: string;
|
|
930
934
|
timestamp?: number;
|
|
@@ -941,6 +945,10 @@ interface SessionConversationMessage {
|
|
|
941
945
|
role: "user" | "assistant";
|
|
942
946
|
content?: string;
|
|
943
947
|
show?: ConversationMessageShowRefs;
|
|
948
|
+
reasoningLines?: string[];
|
|
949
|
+
reasoningDurationMs?: number;
|
|
950
|
+
actions?: Array<Record<string, unknown>>;
|
|
951
|
+
target?: Record<string, unknown>;
|
|
944
952
|
jobId?: string;
|
|
945
953
|
promptId?: string;
|
|
946
954
|
ts: number;
|
|
@@ -1106,6 +1114,68 @@ interface SessionCollectionListResult<T = unknown> {
|
|
|
1106
1114
|
nextCursor: string | null;
|
|
1107
1115
|
totalCount: number;
|
|
1108
1116
|
}
|
|
1117
|
+
interface UserEnvironmentPrompt {
|
|
1118
|
+
id: string;
|
|
1119
|
+
jobId?: string | null;
|
|
1120
|
+
sessionId?: string;
|
|
1121
|
+
type: "confirm" | "choice" | "input" | "text" | "form" | "file" | "custom";
|
|
1122
|
+
status: string;
|
|
1123
|
+
title: string;
|
|
1124
|
+
message: string;
|
|
1125
|
+
options?: Prompt["options"];
|
|
1126
|
+
defaultValue?: unknown;
|
|
1127
|
+
placeholder?: string;
|
|
1128
|
+
allowEmpty?: boolean;
|
|
1129
|
+
openedAt?: number | null;
|
|
1130
|
+
answeredAt?: number | null;
|
|
1131
|
+
metadata?: Record<string, unknown>;
|
|
1132
|
+
}
|
|
1133
|
+
interface UserEnvironmentMessagePreview {
|
|
1134
|
+
sessionId: string;
|
|
1135
|
+
messageCount: number;
|
|
1136
|
+
latestMessageAt: number | null;
|
|
1137
|
+
latestAssistantAt: number | null;
|
|
1138
|
+
latestAssistantText: string;
|
|
1139
|
+
}
|
|
1140
|
+
interface UserEnvironmentSessionState {
|
|
1141
|
+
session: ConversationSessionInfo;
|
|
1142
|
+
status: "active" | "closed" | "running" | "awaiting_input" | "unread";
|
|
1143
|
+
unread: boolean;
|
|
1144
|
+
readAt: number | null;
|
|
1145
|
+
messagePreview: UserEnvironmentMessagePreview;
|
|
1146
|
+
prompts: UserEnvironmentPrompt[];
|
|
1147
|
+
runningJobCount: number;
|
|
1148
|
+
latestJobStatus: string | null;
|
|
1149
|
+
}
|
|
1150
|
+
interface UserEnvironmentState {
|
|
1151
|
+
environmentId: string;
|
|
1152
|
+
subjectId?: string;
|
|
1153
|
+
tenantId?: string;
|
|
1154
|
+
sessionScope?: string | null;
|
|
1155
|
+
updatedAt: number;
|
|
1156
|
+
stateSource?: "user_environment_snapshot" | "live_session_aggregate";
|
|
1157
|
+
stale?: boolean;
|
|
1158
|
+
snapshotUpdatedAt?: number | null;
|
|
1159
|
+
sessions: UserEnvironmentSessionState[];
|
|
1160
|
+
attention: {
|
|
1161
|
+
prompts: UserEnvironmentPrompt[];
|
|
1162
|
+
count: number;
|
|
1163
|
+
activePrompt: UserEnvironmentPrompt | null;
|
|
1164
|
+
};
|
|
1165
|
+
unreadCount: number;
|
|
1166
|
+
readAtBySessionId: Record<string, number>;
|
|
1167
|
+
}
|
|
1168
|
+
interface UserEnvironmentStateOptions {
|
|
1169
|
+
sessionScope?: string | null;
|
|
1170
|
+
status?: "active" | "closed" | "expired" | "failed" | "timeout" | "all";
|
|
1171
|
+
limit?: number;
|
|
1172
|
+
offset?: number;
|
|
1173
|
+
}
|
|
1174
|
+
interface MarkUserEnvironmentReadOptions {
|
|
1175
|
+
sessionId?: string;
|
|
1176
|
+
sessionIds?: string[];
|
|
1177
|
+
readAt?: number;
|
|
1178
|
+
}
|
|
1109
1179
|
interface WSDisconnectInfo {
|
|
1110
1180
|
code?: number;
|
|
1111
1181
|
reason?: string;
|
|
@@ -1469,6 +1539,16 @@ interface ManifestEffectMetamodelSpec {
|
|
|
1469
1539
|
dryRun?: boolean | ManifestDryRunSpec;
|
|
1470
1540
|
reverse?: string | ManifestReverseSpec;
|
|
1471
1541
|
approvalRequired?: boolean | ManifestApprovalRequiredSpec;
|
|
1542
|
+
/**
|
|
1543
|
+
* Declarative effect category used by orchestration/validation.
|
|
1544
|
+
*
|
|
1545
|
+
* `read` means the callable observes or explains current state without
|
|
1546
|
+
* changing product state. `write` means it can mutate product state or call an
|
|
1547
|
+
* external side-effect. `ui` is reserved for frontend-only UI effects.
|
|
1548
|
+
*/
|
|
1549
|
+
access?: "read" | "write" | "ui";
|
|
1550
|
+
effectKind?: "read" | "write" | "ui";
|
|
1551
|
+
sideEffect?: "read" | "write" | "ui" | "readonly" | "read_only";
|
|
1472
1552
|
}
|
|
1473
1553
|
/**
|
|
1474
1554
|
* Relationship definition between two classes
|
|
@@ -1699,4 +1779,4 @@ declare function toGranularHttpBase(apiUrl: string): string;
|
|
|
1699
1779
|
declare function buildOpenAISpendEventId(usage: Pick<OpenAIUsageSpendEvent, "requestId">, context?: GranularSpendContext): string | undefined;
|
|
1700
1780
|
declare function recordOpenAIUsageSpend(options: RecordOpenAIUsageSpendOptions): Promise<RecordOpenAIUsageSpendResult>;
|
|
1701
1781
|
|
|
1702
|
-
export { type ConversationSessionInfo as $, type PolicyEvaluationContext as A, type PermissionProfileFile as B, type ConditionIR as C, type DomainState as D, type EndpointMode as E, type PermissionPolicySpec as F, type GranularSpendContext as G, type PermissionActionSpec as H, type InstanceToolHandler as I, type ConditionalPolicySpec as J, type AccessTokenProvider as K, type LimitPolicySpec as L, type ManifestEffectMetamodelSpec as M, type NormalizedOpenAIUsage as N, type OpenAIModelPricing as O, type Prompt as P, type GranularOptions as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type GranularAuth as U, type User as V, type RecordUserOptions as W, type Subject as X, type OpenEnvironmentOptions as Y, type ConnectOptions as Z, type CreateSessionOptions as _, type EffectHandlerContext as a, type SessionFileStatus as a$, type SpendLineItemType as a0, type QuotaScopeType as a1, type QuotaPeriod as a2, type QuotaStatus as a3, type SpendSummary as a4, type QuotaLineItemFilter as a5, type GranularQuotaPolicy as a6, type GranularQuotaProgress as a7, type Sandbox as a8, type CreateSandboxData as a9, type EffectInvocationMetadata as aA, type EffectSchema as aB, type EffectWithHandler as aC, type PublishEffectsResult as aD, type EffectVersionSelector as aE, type ToolInfo as aF, type EffectInfo as aG, type ToolsChangedEvent as aH, type EffectsChangedEvent as aI, type EffectHandler as aJ, type InstanceEffectHandler as aK, type JobStatus as aL, type JobFeedbackSentiment as aM, type JobFeedbackToolCall as aN, type JobFeedbackMetadata as aO, type JobFeedbackInput as aP, type JobFeedbackRecord as aQ, type EnvironmentFeedbackRecord as aR, type JobSubmitResult as aS, type Job as aT, type ConversationMessageShowRefs as aU, type ConversationMessageInput as aV, type ConversationAppendResult as aW, type SessionConversationMessage as aX, type SessionTimelineEvent as aY, type SessionFileSource as aZ, type SessionFileKind as a_, type SandboxListResponse as aa, type PermissionRules as ab, type PermissionProfile as ac, type CreatePermissionProfileData as ad, type PermissionProfileListResponse as ae, type Assignment as af, type AssignmentListResponse as ag, type BuildPolicy as ah, type VersionTracking as ai, type VersionTag as aj, type EnvironmentData as ak, type CreateEnvironmentData as al, type EnvironmentListResponse as am, type Manifest as an, type ManifestListResponse as ao, type BuildStatus as ap, type Build as aq, type Version as ar, type BuildListResponse as as, type SemanticVersionDiffEntry as at, type SemanticVersionDiff as au, type ResolvedEffectPostCondition as av, type ResolvedEffectDryRun as aw, type ResolvedEffectReverse as ax, type ResolvedEffectApprovalRequired as ay, type EffectInvocationMode as az, type SessionHeapList as b, type
|
|
1782
|
+
export { type ConversationSessionInfo as $, type PolicyEvaluationContext as A, type PermissionProfileFile as B, type ConditionIR as C, type DomainState as D, type EndpointMode as E, type PermissionPolicySpec as F, type GranularSpendContext as G, type PermissionActionSpec as H, type InstanceToolHandler as I, type ConditionalPolicySpec as J, type AccessTokenProvider as K, type LimitPolicySpec as L, type ManifestEffectMetamodelSpec as M, type NormalizedOpenAIUsage as N, type OpenAIModelPricing as O, type Prompt as P, type GranularOptions as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type GranularAuth as U, type User as V, type RecordUserOptions as W, type Subject as X, type OpenEnvironmentOptions as Y, type ConnectOptions as Z, type CreateSessionOptions as _, type EffectHandlerContext as a, type SessionFileStatus as a$, type SpendLineItemType as a0, type QuotaScopeType as a1, type QuotaPeriod as a2, type QuotaStatus as a3, type SpendSummary as a4, type QuotaLineItemFilter as a5, type GranularQuotaPolicy as a6, type GranularQuotaProgress as a7, type Sandbox as a8, type CreateSandboxData as a9, type EffectInvocationMetadata as aA, type EffectSchema as aB, type EffectWithHandler as aC, type PublishEffectsResult as aD, type EffectVersionSelector as aE, type ToolInfo as aF, type EffectInfo as aG, type ToolsChangedEvent as aH, type EffectsChangedEvent as aI, type EffectHandler as aJ, type InstanceEffectHandler as aK, type JobStatus as aL, type JobFeedbackSentiment as aM, type JobFeedbackToolCall as aN, type JobFeedbackMetadata as aO, type JobFeedbackInput as aP, type JobFeedbackRecord as aQ, type EnvironmentFeedbackRecord as aR, type JobSubmitResult as aS, type Job as aT, type ConversationMessageShowRefs as aU, type ConversationMessageInput as aV, type ConversationAppendResult as aW, type SessionConversationMessage as aX, type SessionTimelineEvent as aY, type SessionFileSource as aZ, type SessionFileKind as a_, type SandboxListResponse as aa, type PermissionRules as ab, type PermissionProfile as ac, type CreatePermissionProfileData as ad, type PermissionProfileListResponse as ae, type Assignment as af, type AssignmentListResponse as ag, type BuildPolicy as ah, type VersionTracking as ai, type VersionTag as aj, type EnvironmentData as ak, type CreateEnvironmentData as al, type EnvironmentListResponse as am, type Manifest as an, type ManifestListResponse as ao, type BuildStatus as ap, type Build as aq, type Version as ar, type BuildListResponse as as, type SemanticVersionDiffEntry as at, type SemanticVersionDiff as au, type ResolvedEffectPostCondition as av, type ResolvedEffectDryRun as aw, type ResolvedEffectReverse as ax, type ResolvedEffectApprovalRequired as ay, type EffectInvocationMode as az, type SessionHeapList as b, type ManifestEffectDeclaration as b$, type SessionFileRecord as b0, type SessionFileUploadOptions as b1, type SessionJobRecord as b2, type SessionHeapFieldType as b3, type SessionHeapFieldValue as b4, type SessionHeapVariable as b5, type RecordSearchResult as b6, type RecordSearchOptions as b7, type RecordMentionInput as b8, type SessionDocumentResult as b9, type RecordImportOptions as bA, type RecordImportStatus as bB, type RecordImportItemStatus as bC, type RecordImportStats as bD, type RecordImportItem as bE, type RecordImport as bF, type EnvironmentRecordImportSummary as bG, type EnvironmentSetupTriggerReason as bH, type RunEnvironmentImporterOptions as bI, type EnvironmentSetupLifecycleStatus as bJ, type EnvironmentSetupSummary as bK, type EnvironmentImporterImportOptions as bL, type EnvironmentImporter as bM, type ManifestPropertySpec as bN, type ManifestValidationOperator as bO, type ManifestEnumRuleSpec as bP, type ManifestFilterBySpec as bQ, type ManifestValidationRuleSpec as bR, type ManifestStateMachineStateSpec as bS, type ManifestStateMachineTransitionSpec as bT, type ManifestStateMachineSpec as bU, type ManifestPostConditionSpec as bV, type ManifestDryRunSpec as bW, type ManifestReverseSpec as bX, type ManifestApprovalRequiredSpec as bY, type ManifestRelationshipDef as bZ, type ManifestEffectSchema as b_, type SessionCollectionListOptions as ba, type SessionJobListOptions as bb, type SessionCollectionListResult as bc, type UserEnvironmentPrompt as bd, type UserEnvironmentMessagePreview as be, type UserEnvironmentSessionState as bf, type UserEnvironmentState as bg, type UserEnvironmentStateOptions as bh, type MarkUserEnvironmentReadOptions as bi, type WSDisconnectInfo as bj, type WSReconnectErrorInfo as bk, type WSClientOptions as bl, type RPCRequest as bm, type RPCResponse as bn, type SyncMessage as bo, type RPCRequestFromServer as bp, type ToolInvokeParams as bq, type ToolResultParams as br, type ModelRef as bs, type RelationshipInfo as bt, type DefineRelationshipOptions as bu, type RecordObjectOptions as bv, type RecordObjectResult as bw, type RecordObjectsChunkInfo as bx, type RecordObjectsOptions as by, type RecordImportWriteMode as bz, type SessionHeapSnapshot as c, type ManifestEventTypeDef as c0, type ManifestEventStreamDef as c1, type ManifestOperation as c2, type ManifestImport as c3, type ManifestVolume as c4, type ManifestContent as c5, type GraphQLResult as c6, type APIError as c7, type DeleteResponse as c8, type StreamEvent as c9, type StreamSubscription as ca, type StreamStats as cb, 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 PolicyOutcome as q, recordOpenAIUsageSpend as r, type PolicySource as s, toGranularHttpBase as t, type PolicyPredicateSource as u, type PolicyOperator as v, type PolicyOrigin as w, type PolicyRuleIR as x, type MatchedPolicy as y, type PolicyDecision as z };
|
|
@@ -284,7 +284,7 @@ interface ConversationSessionInfo {
|
|
|
284
284
|
environmentId: string;
|
|
285
285
|
versionId?: string | null;
|
|
286
286
|
docId: string;
|
|
287
|
-
status: "active" | "closed" | "expired";
|
|
287
|
+
status: "active" | "closed" | "expired" | "failed" | "timeout";
|
|
288
288
|
createdAt: string;
|
|
289
289
|
lastSeenAt: string;
|
|
290
290
|
summary?: string | null;
|
|
@@ -666,7 +666,7 @@ type InstanceToolHandler = (id: string, input: any, context: EffectHandlerContex
|
|
|
666
666
|
*
|
|
667
667
|
* Both `inputSchema` and `outputSchema` accept JSON Schema objects.
|
|
668
668
|
* The `outputSchema` drives the return type in the auto-generated
|
|
669
|
-
* TypeScript declarations that sandbox code imports from
|
|
669
|
+
* TypeScript declarations that sandbox code imports from Harness v3 runtime modules.
|
|
670
670
|
*/
|
|
671
671
|
interface ToolSchema {
|
|
672
672
|
effectKey?: string;
|
|
@@ -925,6 +925,10 @@ interface ConversationMessageInput {
|
|
|
925
925
|
role: "user" | "assistant";
|
|
926
926
|
content?: string;
|
|
927
927
|
show?: ConversationMessageShowRefs;
|
|
928
|
+
reasoningLines?: string[];
|
|
929
|
+
reasoningDurationMs?: number;
|
|
930
|
+
actions?: Array<Record<string, unknown>>;
|
|
931
|
+
target?: Record<string, unknown>;
|
|
928
932
|
jobId?: string;
|
|
929
933
|
promptId?: string;
|
|
930
934
|
timestamp?: number;
|
|
@@ -941,6 +945,10 @@ interface SessionConversationMessage {
|
|
|
941
945
|
role: "user" | "assistant";
|
|
942
946
|
content?: string;
|
|
943
947
|
show?: ConversationMessageShowRefs;
|
|
948
|
+
reasoningLines?: string[];
|
|
949
|
+
reasoningDurationMs?: number;
|
|
950
|
+
actions?: Array<Record<string, unknown>>;
|
|
951
|
+
target?: Record<string, unknown>;
|
|
944
952
|
jobId?: string;
|
|
945
953
|
promptId?: string;
|
|
946
954
|
ts: number;
|
|
@@ -1106,6 +1114,68 @@ interface SessionCollectionListResult<T = unknown> {
|
|
|
1106
1114
|
nextCursor: string | null;
|
|
1107
1115
|
totalCount: number;
|
|
1108
1116
|
}
|
|
1117
|
+
interface UserEnvironmentPrompt {
|
|
1118
|
+
id: string;
|
|
1119
|
+
jobId?: string | null;
|
|
1120
|
+
sessionId?: string;
|
|
1121
|
+
type: "confirm" | "choice" | "input" | "text" | "form" | "file" | "custom";
|
|
1122
|
+
status: string;
|
|
1123
|
+
title: string;
|
|
1124
|
+
message: string;
|
|
1125
|
+
options?: Prompt["options"];
|
|
1126
|
+
defaultValue?: unknown;
|
|
1127
|
+
placeholder?: string;
|
|
1128
|
+
allowEmpty?: boolean;
|
|
1129
|
+
openedAt?: number | null;
|
|
1130
|
+
answeredAt?: number | null;
|
|
1131
|
+
metadata?: Record<string, unknown>;
|
|
1132
|
+
}
|
|
1133
|
+
interface UserEnvironmentMessagePreview {
|
|
1134
|
+
sessionId: string;
|
|
1135
|
+
messageCount: number;
|
|
1136
|
+
latestMessageAt: number | null;
|
|
1137
|
+
latestAssistantAt: number | null;
|
|
1138
|
+
latestAssistantText: string;
|
|
1139
|
+
}
|
|
1140
|
+
interface UserEnvironmentSessionState {
|
|
1141
|
+
session: ConversationSessionInfo;
|
|
1142
|
+
status: "active" | "closed" | "running" | "awaiting_input" | "unread";
|
|
1143
|
+
unread: boolean;
|
|
1144
|
+
readAt: number | null;
|
|
1145
|
+
messagePreview: UserEnvironmentMessagePreview;
|
|
1146
|
+
prompts: UserEnvironmentPrompt[];
|
|
1147
|
+
runningJobCount: number;
|
|
1148
|
+
latestJobStatus: string | null;
|
|
1149
|
+
}
|
|
1150
|
+
interface UserEnvironmentState {
|
|
1151
|
+
environmentId: string;
|
|
1152
|
+
subjectId?: string;
|
|
1153
|
+
tenantId?: string;
|
|
1154
|
+
sessionScope?: string | null;
|
|
1155
|
+
updatedAt: number;
|
|
1156
|
+
stateSource?: "user_environment_snapshot" | "live_session_aggregate";
|
|
1157
|
+
stale?: boolean;
|
|
1158
|
+
snapshotUpdatedAt?: number | null;
|
|
1159
|
+
sessions: UserEnvironmentSessionState[];
|
|
1160
|
+
attention: {
|
|
1161
|
+
prompts: UserEnvironmentPrompt[];
|
|
1162
|
+
count: number;
|
|
1163
|
+
activePrompt: UserEnvironmentPrompt | null;
|
|
1164
|
+
};
|
|
1165
|
+
unreadCount: number;
|
|
1166
|
+
readAtBySessionId: Record<string, number>;
|
|
1167
|
+
}
|
|
1168
|
+
interface UserEnvironmentStateOptions {
|
|
1169
|
+
sessionScope?: string | null;
|
|
1170
|
+
status?: "active" | "closed" | "expired" | "failed" | "timeout" | "all";
|
|
1171
|
+
limit?: number;
|
|
1172
|
+
offset?: number;
|
|
1173
|
+
}
|
|
1174
|
+
interface MarkUserEnvironmentReadOptions {
|
|
1175
|
+
sessionId?: string;
|
|
1176
|
+
sessionIds?: string[];
|
|
1177
|
+
readAt?: number;
|
|
1178
|
+
}
|
|
1109
1179
|
interface WSDisconnectInfo {
|
|
1110
1180
|
code?: number;
|
|
1111
1181
|
reason?: string;
|
|
@@ -1469,6 +1539,16 @@ interface ManifestEffectMetamodelSpec {
|
|
|
1469
1539
|
dryRun?: boolean | ManifestDryRunSpec;
|
|
1470
1540
|
reverse?: string | ManifestReverseSpec;
|
|
1471
1541
|
approvalRequired?: boolean | ManifestApprovalRequiredSpec;
|
|
1542
|
+
/**
|
|
1543
|
+
* Declarative effect category used by orchestration/validation.
|
|
1544
|
+
*
|
|
1545
|
+
* `read` means the callable observes or explains current state without
|
|
1546
|
+
* changing product state. `write` means it can mutate product state or call an
|
|
1547
|
+
* external side-effect. `ui` is reserved for frontend-only UI effects.
|
|
1548
|
+
*/
|
|
1549
|
+
access?: "read" | "write" | "ui";
|
|
1550
|
+
effectKind?: "read" | "write" | "ui";
|
|
1551
|
+
sideEffect?: "read" | "write" | "ui" | "readonly" | "read_only";
|
|
1472
1552
|
}
|
|
1473
1553
|
/**
|
|
1474
1554
|
* Relationship definition between two classes
|
|
@@ -1699,4 +1779,4 @@ declare function toGranularHttpBase(apiUrl: string): string;
|
|
|
1699
1779
|
declare function buildOpenAISpendEventId(usage: Pick<OpenAIUsageSpendEvent, "requestId">, context?: GranularSpendContext): string | undefined;
|
|
1700
1780
|
declare function recordOpenAIUsageSpend(options: RecordOpenAIUsageSpendOptions): Promise<RecordOpenAIUsageSpendResult>;
|
|
1701
1781
|
|
|
1702
|
-
export { type ConversationSessionInfo as $, type PolicyEvaluationContext as A, type PermissionProfileFile as B, type ConditionIR as C, type DomainState as D, type EndpointMode as E, type PermissionPolicySpec as F, type GranularSpendContext as G, type PermissionActionSpec as H, type InstanceToolHandler as I, type ConditionalPolicySpec as J, type AccessTokenProvider as K, type LimitPolicySpec as L, type ManifestEffectMetamodelSpec as M, type NormalizedOpenAIUsage as N, type OpenAIModelPricing as O, type Prompt as P, type GranularOptions as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type GranularAuth as U, type User as V, type RecordUserOptions as W, type Subject as X, type OpenEnvironmentOptions as Y, type ConnectOptions as Z, type CreateSessionOptions as _, type EffectHandlerContext as a, type SessionFileStatus as a$, type SpendLineItemType as a0, type QuotaScopeType as a1, type QuotaPeriod as a2, type QuotaStatus as a3, type SpendSummary as a4, type QuotaLineItemFilter as a5, type GranularQuotaPolicy as a6, type GranularQuotaProgress as a7, type Sandbox as a8, type CreateSandboxData as a9, type EffectInvocationMetadata as aA, type EffectSchema as aB, type EffectWithHandler as aC, type PublishEffectsResult as aD, type EffectVersionSelector as aE, type ToolInfo as aF, type EffectInfo as aG, type ToolsChangedEvent as aH, type EffectsChangedEvent as aI, type EffectHandler as aJ, type InstanceEffectHandler as aK, type JobStatus as aL, type JobFeedbackSentiment as aM, type JobFeedbackToolCall as aN, type JobFeedbackMetadata as aO, type JobFeedbackInput as aP, type JobFeedbackRecord as aQ, type EnvironmentFeedbackRecord as aR, type JobSubmitResult as aS, type Job as aT, type ConversationMessageShowRefs as aU, type ConversationMessageInput as aV, type ConversationAppendResult as aW, type SessionConversationMessage as aX, type SessionTimelineEvent as aY, type SessionFileSource as aZ, type SessionFileKind as a_, type SandboxListResponse as aa, type PermissionRules as ab, type PermissionProfile as ac, type CreatePermissionProfileData as ad, type PermissionProfileListResponse as ae, type Assignment as af, type AssignmentListResponse as ag, type BuildPolicy as ah, type VersionTracking as ai, type VersionTag as aj, type EnvironmentData as ak, type CreateEnvironmentData as al, type EnvironmentListResponse as am, type Manifest as an, type ManifestListResponse as ao, type BuildStatus as ap, type Build as aq, type Version as ar, type BuildListResponse as as, type SemanticVersionDiffEntry as at, type SemanticVersionDiff as au, type ResolvedEffectPostCondition as av, type ResolvedEffectDryRun as aw, type ResolvedEffectReverse as ax, type ResolvedEffectApprovalRequired as ay, type EffectInvocationMode as az, type SessionHeapList as b, type
|
|
1782
|
+
export { type ConversationSessionInfo as $, type PolicyEvaluationContext as A, type PermissionProfileFile as B, type ConditionIR as C, type DomainState as D, type EndpointMode as E, type PermissionPolicySpec as F, type GranularSpendContext as G, type PermissionActionSpec as H, type InstanceToolHandler as I, type ConditionalPolicySpec as J, type AccessTokenProvider as K, type LimitPolicySpec as L, type ManifestEffectMetamodelSpec as M, type NormalizedOpenAIUsage as N, type OpenAIModelPricing as O, type Prompt as P, type GranularOptions as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type GranularAuth as U, type User as V, type RecordUserOptions as W, type Subject as X, type OpenEnvironmentOptions as Y, type ConnectOptions as Z, type CreateSessionOptions as _, type EffectHandlerContext as a, type SessionFileStatus as a$, type SpendLineItemType as a0, type QuotaScopeType as a1, type QuotaPeriod as a2, type QuotaStatus as a3, type SpendSummary as a4, type QuotaLineItemFilter as a5, type GranularQuotaPolicy as a6, type GranularQuotaProgress as a7, type Sandbox as a8, type CreateSandboxData as a9, type EffectInvocationMetadata as aA, type EffectSchema as aB, type EffectWithHandler as aC, type PublishEffectsResult as aD, type EffectVersionSelector as aE, type ToolInfo as aF, type EffectInfo as aG, type ToolsChangedEvent as aH, type EffectsChangedEvent as aI, type EffectHandler as aJ, type InstanceEffectHandler as aK, type JobStatus as aL, type JobFeedbackSentiment as aM, type JobFeedbackToolCall as aN, type JobFeedbackMetadata as aO, type JobFeedbackInput as aP, type JobFeedbackRecord as aQ, type EnvironmentFeedbackRecord as aR, type JobSubmitResult as aS, type Job as aT, type ConversationMessageShowRefs as aU, type ConversationMessageInput as aV, type ConversationAppendResult as aW, type SessionConversationMessage as aX, type SessionTimelineEvent as aY, type SessionFileSource as aZ, type SessionFileKind as a_, type SandboxListResponse as aa, type PermissionRules as ab, type PermissionProfile as ac, type CreatePermissionProfileData as ad, type PermissionProfileListResponse as ae, type Assignment as af, type AssignmentListResponse as ag, type BuildPolicy as ah, type VersionTracking as ai, type VersionTag as aj, type EnvironmentData as ak, type CreateEnvironmentData as al, type EnvironmentListResponse as am, type Manifest as an, type ManifestListResponse as ao, type BuildStatus as ap, type Build as aq, type Version as ar, type BuildListResponse as as, type SemanticVersionDiffEntry as at, type SemanticVersionDiff as au, type ResolvedEffectPostCondition as av, type ResolvedEffectDryRun as aw, type ResolvedEffectReverse as ax, type ResolvedEffectApprovalRequired as ay, type EffectInvocationMode as az, type SessionHeapList as b, type ManifestEffectDeclaration as b$, type SessionFileRecord as b0, type SessionFileUploadOptions as b1, type SessionJobRecord as b2, type SessionHeapFieldType as b3, type SessionHeapFieldValue as b4, type SessionHeapVariable as b5, type RecordSearchResult as b6, type RecordSearchOptions as b7, type RecordMentionInput as b8, type SessionDocumentResult as b9, type RecordImportOptions as bA, type RecordImportStatus as bB, type RecordImportItemStatus as bC, type RecordImportStats as bD, type RecordImportItem as bE, type RecordImport as bF, type EnvironmentRecordImportSummary as bG, type EnvironmentSetupTriggerReason as bH, type RunEnvironmentImporterOptions as bI, type EnvironmentSetupLifecycleStatus as bJ, type EnvironmentSetupSummary as bK, type EnvironmentImporterImportOptions as bL, type EnvironmentImporter as bM, type ManifestPropertySpec as bN, type ManifestValidationOperator as bO, type ManifestEnumRuleSpec as bP, type ManifestFilterBySpec as bQ, type ManifestValidationRuleSpec as bR, type ManifestStateMachineStateSpec as bS, type ManifestStateMachineTransitionSpec as bT, type ManifestStateMachineSpec as bU, type ManifestPostConditionSpec as bV, type ManifestDryRunSpec as bW, type ManifestReverseSpec as bX, type ManifestApprovalRequiredSpec as bY, type ManifestRelationshipDef as bZ, type ManifestEffectSchema as b_, type SessionCollectionListOptions as ba, type SessionJobListOptions as bb, type SessionCollectionListResult as bc, type UserEnvironmentPrompt as bd, type UserEnvironmentMessagePreview as be, type UserEnvironmentSessionState as bf, type UserEnvironmentState as bg, type UserEnvironmentStateOptions as bh, type MarkUserEnvironmentReadOptions as bi, type WSDisconnectInfo as bj, type WSReconnectErrorInfo as bk, type WSClientOptions as bl, type RPCRequest as bm, type RPCResponse as bn, type SyncMessage as bo, type RPCRequestFromServer as bp, type ToolInvokeParams as bq, type ToolResultParams as br, type ModelRef as bs, type RelationshipInfo as bt, type DefineRelationshipOptions as bu, type RecordObjectOptions as bv, type RecordObjectResult as bw, type RecordObjectsChunkInfo as bx, type RecordObjectsOptions as by, type RecordImportWriteMode as bz, type SessionHeapSnapshot as c, type ManifestEventTypeDef as c0, type ManifestEventStreamDef as c1, type ManifestOperation as c2, type ManifestImport as c3, type ManifestVolume as c4, type ManifestContent as c5, type GraphQLResult as c6, type APIError as c7, type DeleteResponse as c8, type StreamEvent as c9, type StreamSubscription as ca, type StreamStats as cb, 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 PolicyOutcome as q, recordOpenAIUsageSpend as r, type PolicySource as s, toGranularHttpBase as t, type PolicyPredicateSource as u, type PolicyOperator as v, type PolicyOrigin as w, type PolicyRuleIR as x, type MatchedPolicy as y, type PolicyDecision 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-CStuOBXb.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-CStuOBXb.js';
|
package/package.json
CHANGED