@vercel/factory 0.0.17 → 0.0.18
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/CHANGELOG.md +46 -0
- package/dist/api-contracts.d.mts +665 -715
- package/dist/api-contracts.mjs +91 -4
- package/dist/api-contracts.mjs.map +1 -1
- package/dist/api-task-graph.mjs +14 -5
- package/dist/api-task-graph.mjs.map +1 -1
- package/dist/api.d.mts +58 -11
- package/dist/api.mjs +715 -399
- package/dist/api.mjs.map +1 -1
- package/dist/approval-access.d.mts +1 -1
- package/dist/approval-contracts.d.mts +3 -4
- package/dist/approval-contracts.mjs +1 -2
- package/dist/approval-contracts.mjs.map +1 -1
- package/dist/blob/index.d.mts +1 -1
- package/dist/budget.mjs +20 -3
- package/dist/budget.mjs.map +1 -1
- package/dist/change-verification/brief.d.mts +1 -1
- package/dist/change-verification/dispatch.mjs +8 -1
- package/dist/change-verification/dispatch.mjs.map +1 -1
- package/dist/changes/eve-record-change.mjs +4 -1
- package/dist/changes/eve-record-change.mjs.map +1 -1
- package/dist/client-stream.d.mts +19 -2
- package/dist/client-stream.mjs +115 -53
- package/dist/client-stream.mjs.map +1 -1
- package/dist/client-transcript.d.mts +25 -2
- package/dist/client-transcript.mjs +95 -13
- package/dist/client-transcript.mjs.map +1 -1
- package/dist/client.d.mts +145 -19
- package/dist/client.mjs +89 -16
- package/dist/client.mjs.map +1 -1
- package/dist/code-review/contracts.d.mts +1 -0
- package/dist/code-review/eve-post-review.d.mts +4 -2
- package/dist/code-review/eve-post-review.mjs +8 -0
- package/dist/code-review/eve-post-review.mjs.map +1 -1
- package/dist/code-review/github-reporter.d.mts +6 -2
- package/dist/code-review/github-reporter.mjs +86 -35
- package/dist/code-review/github-reporter.mjs.map +1 -1
- package/dist/code-review/preparation.d.mts +2 -1
- package/dist/code-review/preparation.mjs +2 -1
- package/dist/code-review/preparation.mjs.map +1 -1
- package/dist/code-review/stall.mjs +11 -2
- package/dist/code-review/stall.mjs.map +1 -1
- package/dist/connectors/github.d.mts +1 -1
- package/dist/connectors/index.d.mts +1 -1
- package/dist/connectors/slack.d.mts +1 -1
- package/dist/delivery-metrics/metrics.d.mts +1 -1
- package/dist/dispatch.mjs +3 -3
- package/dist/dispatch.mjs.map +1 -1
- package/dist/eve/index.d.mts +1 -1
- package/dist/eve/index.mjs +8 -1
- package/dist/eve/index.mjs.map +1 -1
- package/dist/eve/task-execution.d.mts +4 -4
- package/dist/eve/transcript.d.mts +3 -1
- package/dist/eve/transcript.mjs.map +1 -1
- package/dist/finding-remediation/admission.d.mts +1 -1
- package/dist/finding-remediation/brief.d.mts +1 -1
- package/dist/github-app.d.mts +1 -1
- package/dist/github-publication.d.mts +1 -1
- package/dist/github.d.mts +9 -1
- package/dist/github.mjs +29 -11
- package/dist/github.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/intake-contracts.d.mts +1 -0
- package/dist/intake-contracts.mjs +2 -1
- package/dist/intake-contracts.mjs.map +1 -1
- package/dist/integrations/github-issues.d.mts +53 -0
- package/dist/integrations/github-issues.mjs +170 -0
- package/dist/integrations/github-issues.mjs.map +1 -0
- package/dist/integrations/github.d.mts +2 -1
- package/dist/integrations/github.mjs +2 -1
- package/dist/multi-repository-changes/coordination.mjs +1 -1
- package/dist/planning/reconcile.mjs +15 -2
- package/dist/planning/reconcile.mjs.map +1 -1
- package/dist/postgres/index.d.mts +2 -1
- package/dist/postgres/index.mjs +11 -5
- package/dist/postgres/index.mjs.map +1 -1
- package/dist/postgres/indexed-codec.mjs +137 -0
- package/dist/postgres/indexed-codec.mjs.map +1 -0
- package/dist/postgres/indexed-schema.mjs +99 -0
- package/dist/postgres/indexed-schema.mjs.map +1 -0
- package/dist/postgres/indexed.d.mts +28 -0
- package/dist/postgres/indexed.mjs +277 -0
- package/dist/postgres/indexed.mjs.map +1 -0
- package/dist/postgres/record-predicates.mjs +23 -0
- package/dist/postgres/record-predicates.mjs.map +1 -0
- package/dist/presets/software-development/deepsec-brief.d.mts +1 -1
- package/dist/presets/software-development/dispatch.mjs +1 -1
- package/dist/presets/software-development/dispatch.mjs.map +1 -1
- package/dist/presets/software-development/recovery.mjs +9 -2
- package/dist/presets/software-development/recovery.mjs.map +1 -1
- package/dist/pull-requests/eve-fetch.d.mts +4 -1
- package/dist/pull-requests/eve-fetch.mjs +9 -0
- package/dist/pull-requests/eve-fetch.mjs.map +1 -1
- package/dist/pull-requests/github-publisher.d.mts +1 -1
- package/dist/pull-requests/github-publisher.mjs +19 -7
- package/dist/pull-requests/github-publisher.mjs.map +1 -1
- package/dist/repositories.mjs +20 -13
- package/dist/repositories.mjs.map +1 -1
- package/dist/sandbox/execution-run-ledger.d.mts +2 -2
- package/dist/sandbox/execution-run-ledger.mjs.map +1 -1
- package/dist/sandbox/execution.d.mts +2 -2
- package/dist/sandbox/execution.mjs.map +1 -1
- package/dist/schema/catalog.mjs +1 -1
- package/dist/schema/change.d.mts +1 -1
- package/dist/schema/communication.d.mts +2 -2
- package/dist/schema/factory-config.d.mts +1 -1
- package/dist/schema/outbox.d.mts +6 -6
- package/dist/schema/session-summary.d.mts +218 -0
- package/dist/schema/session-summary.mjs +68 -0
- package/dist/schema/session-summary.mjs.map +1 -0
- package/dist/schema/session.d.mts +39 -59
- package/dist/schema/session.mjs +6 -6
- package/dist/schema/session.mjs.map +1 -1
- package/dist/schema/task-graph.d.mts +24 -24
- package/dist/schema/transcript.d.mts +141 -3
- package/dist/schema/transcript.mjs +19 -3
- package/dist/schema/transcript.mjs.map +1 -1
- package/dist/schema/transitions.d.mts +1 -1
- package/dist/schema/transitions.mjs +1 -1
- package/dist/schema/transitions.mjs.map +1 -1
- package/dist/signals.d.mts +1 -1
- package/dist/stall.mjs +10 -2
- package/dist/stall.mjs.map +1 -1
- package/dist/storage.d.mts +10 -1
- package/dist/storage.mjs +7 -1
- package/dist/store/approvals.d.mts +14 -0
- package/dist/store/approvals.mjs +78 -0
- package/dist/store/approvals.mjs.map +1 -0
- package/dist/store/conversations.d.mts +59 -0
- package/dist/store/conversations.mjs +549 -0
- package/dist/store/conversations.mjs.map +1 -0
- package/dist/store/driver.d.mts +1 -1
- package/dist/store/driver.mjs.map +1 -1
- package/dist/store/engine.d.mts +38 -16
- package/dist/store/engine.mjs +229 -106
- package/dist/store/engine.mjs.map +1 -1
- package/dist/store/indexed-engine.d.mts +57 -0
- package/dist/store/indexed-engine.mjs +155 -0
- package/dist/store/indexed-engine.mjs.map +1 -0
- package/dist/store/indexed-memory.d.mts +7 -0
- package/dist/store/indexed-memory.mjs +200 -0
- package/dist/store/indexed-memory.mjs.map +1 -0
- package/dist/store/indexed-projections.d.mts +280 -0
- package/dist/store/indexed-projections.mjs +481 -0
- package/dist/store/indexed-projections.mjs.map +1 -0
- package/dist/store/indexed.d.mts +101 -0
- package/dist/store/indexed.mjs +19 -0
- package/dist/store/indexed.mjs.map +1 -0
- package/dist/store/iterate.d.mts +9 -0
- package/dist/store/iterate.mjs +23 -0
- package/dist/store/iterate.mjs.map +1 -0
- package/dist/store/query-scope.mjs +62 -0
- package/dist/store/query-scope.mjs.map +1 -0
- package/dist/store/query.d.mts +32 -0
- package/dist/store/query.mjs +103 -0
- package/dist/store/query.mjs.map +1 -0
- package/dist/store/session-history.mjs +24 -0
- package/dist/store/session-history.mjs.map +1 -0
- package/dist/store/slack-pr-notifications.d.mts +2 -2
- package/dist/store/slack-pr-notifications.mjs.map +1 -1
- package/dist/store/state.d.mts +26 -0
- package/dist/store/state.mjs +95 -0
- package/dist/store/state.mjs.map +1 -0
- package/dist/store/task-effects.d.mts +1 -1
- package/dist/store/task-graphs.d.mts +1 -1
- package/dist/store/task-messages.d.mts +1 -1
- package/dist/store/task-work.d.mts +1 -1
- package/dist/store/task-work.mjs +1 -1
- package/dist/store/transcripts.mjs +308 -0
- package/dist/store/transcripts.mjs.map +1 -0
- package/dist/sweep.d.mts +1 -1
- package/dist/sweep.mjs +12 -7
- package/dist/sweep.mjs.map +1 -1
- package/dist/task-communication.mjs +15 -1
- package/dist/task-communication.mjs.map +1 -1
- package/dist/task-protocols.d.mts +3 -3
- package/dist/tasks.d.mts +1 -1
- package/dist/vercel.d.mts +1 -1
- package/dist/work-triage/find-existing-work.d.mts +1 -1
- package/dist/work-triage/find-existing-work.mjs +12 -2
- package/dist/work-triage/find-existing-work.mjs.map +1 -1
- package/docs/index.md +4 -0
- package/docs/recipes/persistence-recovery.md +15 -9
- package/docs/recipes/postgres-indexed-engine.md +108 -0
- package/docs/recipes/postgres-indexed-storage.md +145 -0
- package/package.json +3 -1
package/dist/client.d.mts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { InboxActivity, InboxActivityItem, inboxActivityItemSchema, inboxActivitySchema } from "./inbox-activity.mjs";
|
|
2
|
-
import { AgentModelConfig, ModelSettings, UpdateModelDefaults, agentModelConfigSchema, modelSettingsSchema, updateModelDefaultsSchema } from "./model-settings.mjs";
|
|
3
|
-
import { SessionPreview, SessionPreviews, sessionPreviewSchema, sessionPreviewsSchema } from "./session-previews.mjs";
|
|
4
|
-
import { SessionReview, SessionReviewCheck, SessionReviewIssue, SessionReviewScreenshot, sessionReviewCheckSchema, sessionReviewIssueSchema, sessionReviewSchema, sessionReviewScreenshotSchema } from "./session-review.mjs";
|
|
5
|
-
import { WorkspaceFileEntry, WorkspaceFiles, WorkspaceFilesRequest, workspaceFileContentSchema, workspaceFileEntrySchema, workspaceFilesRequestSchema, workspaceFilesSchema, workspacePathSchema } from "./workspace-files.mjs";
|
|
6
|
-
import { SignalSource } from "./schema/signal.mjs";
|
|
7
1
|
import { RepositoryId, TaskId } from "./schema/id.mjs";
|
|
8
|
-
import { RepositorySlug } from "./schema/repository.mjs";
|
|
9
2
|
import { Task } from "./schema/task.mjs";
|
|
10
3
|
import { MaybePromise } from "./schema/common.mjs";
|
|
11
4
|
import { ImageAttachment, ImageId, ImageUploadInput, MAX_IMAGES, MAX_IMAGE_BYTES, imageAttachmentSchema, imageAttachmentsSchema, imageIdSchema } from "./image-input.mjs";
|
|
12
5
|
import { AgentSession, AgentSessionId, DirectAgentSession, ExternalAgentSession, TaskAgentSession, agentSessionIdSchema, agentSessionSchema } from "./schema/session.mjs";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
6
|
+
import { InputRequest, ToolCall, TranscriptBlock, TranscriptPage, TranscriptPageQuery, TranscriptSnapshot, inputRequestSchema, toolCallSchema, transcriptBlockSchema, transcriptPageSchema, transcriptSnapshotSchema } from "./schema/transcript.mjs";
|
|
7
|
+
import { RepositorySlug } from "./schema/repository.mjs";
|
|
8
|
+
import { SignalSource } from "./schema/signal.mjs";
|
|
9
|
+
import { SessionTaskSummary, sessionTaskSummarySchema } from "./schema/session-summary.mjs";
|
|
10
|
+
import { InboxActivity, InboxActivityItem, inboxActivityItemSchema, inboxActivitySchema } from "./inbox-activity.mjs";
|
|
11
|
+
import { AgentModelConfig, ModelSettings, UpdateModelDefaults, agentModelConfigSchema, modelSettingsSchema, updateModelDefaultsSchema } from "./model-settings.mjs";
|
|
12
|
+
import { SessionPreview, SessionPreviews, sessionPreviewSchema, sessionPreviewsSchema } from "./session-previews.mjs";
|
|
13
|
+
import { SessionReview, SessionReviewCheck, SessionReviewIssue, SessionReviewScreenshot, sessionReviewCheckSchema, sessionReviewIssueSchema, sessionReviewSchema, sessionReviewScreenshotSchema } from "./session-review.mjs";
|
|
14
|
+
import { WorkspaceFileEntry, WorkspaceFiles, WorkspaceFilesRequest, workspaceFileContentSchema, workspaceFileEntrySchema, workspaceFilesRequestSchema, workspaceFilesSchema, workspacePathSchema } from "./workspace-files.mjs";
|
|
15
15
|
import { ApprovalListOptions, ApprovalPage, ApprovalView } from "./approval-contracts.mjs";
|
|
16
16
|
import { WorkspaceDiff, WorkspaceDiffFile, workspaceDiffFileSchema, workspaceDiffSchema } from "./workspace-diff.mjs";
|
|
17
17
|
import { IntakeView, describeIntake } from "./intake-contracts.mjs";
|
|
18
18
|
import { TaskGraphView } from "./task-graph-view.mjs";
|
|
19
19
|
import { StreamEvent, readEvents, streamEventSchema } from "./client-events.mjs";
|
|
20
|
-
import { Transcript } from "./client-transcript.mjs";
|
|
21
|
-
import { FollowSessionStreamOptions, SessionStreamClient, followSessionStream } from "./client-stream.mjs";
|
|
22
|
-
import { AnswerSessionQuestionRequest, ApiAgent, ControlSessionRequest, CreateSessionRequest, PendingFollowUp, RepositoryDetails, RepositorySummary, SendSessionMessageRequest, SessionInputResponse, SessionPage, SessionView, SubmitSessionInputRequest, answerSessionQuestionRequestSchema, apiAgentSchema, controlSessionRequestSchema, createSessionRequestSchema, pendingFollowUpSchema, repositoryDetailsSchema, repositorySummarySchema, sendSessionMessageRequestSchema, sessionInputResponseSchema, sessionPageSchema, sessionViewSchema, submitSessionInputRequestSchema } from "./api-contracts.mjs";
|
|
20
|
+
import { Transcript, TranscriptHistoryPage } from "./client-transcript.mjs";
|
|
21
|
+
import { FollowSessionStreamOptions, SessionStreamClient, expandTranscriptBlock, followSessionStream, loadPreviousTranscriptPage } from "./client-stream.mjs";
|
|
22
|
+
import { AnswerSessionQuestionRequest, ApiAgent, ControlSessionRequest, CreateSessionRequest, PendingFollowUp, RepositoryDetails, RepositorySummary, SendSessionMessageRequest, SessionInputResponse, SessionPage, SessionPullRequest, SessionSummary, SessionView, SessionWorkGroup, SessionWorkResult, SessionWorkTask, SubmitSessionInputRequest, answerSessionQuestionRequestSchema, apiAgentSchema, controlSessionRequestSchema, createSessionRequestSchema, pendingFollowUpSchema, repositoryDetailsSchema, repositorySummarySchema, sendSessionMessageRequestSchema, sessionInputResponseSchema, sessionPageSchema, sessionPullRequestSchema, sessionPullRequestStateSchema, sessionSummarySchema, sessionViewSchema, sessionWorkGroupSchema, sessionWorkResultSchema, sessionWorkTaskSchema, submitSessionInputRequestSchema } from "./api-contracts.mjs";
|
|
23
23
|
//#region src/client.d.ts
|
|
24
24
|
/** All durable Task states in their schema-defined order. */
|
|
25
25
|
declare const taskStates: readonly ("queued" | "running" | "stalled" | "verifying" | "succeeded" | "failed" | "needs_human" | "cancelled")[];
|
|
@@ -84,6 +84,8 @@ interface SessionPreviewsOptions {
|
|
|
84
84
|
/** Identifies the operator session whose canonical task graph should be read. */
|
|
85
85
|
interface GetSessionGraphOptions {
|
|
86
86
|
readonly id: AgentSessionId;
|
|
87
|
+
/** Selects a Task in the bound graph or work addressed to this conversation. */
|
|
88
|
+
readonly taskId?: TaskId;
|
|
87
89
|
readonly signal?: AbortSignal;
|
|
88
90
|
}
|
|
89
91
|
/** Identifies an exact task execution transcript within an operator session. */
|
|
@@ -111,6 +113,9 @@ interface SessionTranscriptRequest {
|
|
|
111
113
|
readonly executionId: string;
|
|
112
114
|
readonly taskId?: TaskId;
|
|
113
115
|
readonly history?: boolean;
|
|
116
|
+
readonly limit?: number;
|
|
117
|
+
readonly cursor?: string;
|
|
118
|
+
readonly blockId?: string;
|
|
114
119
|
readonly signal: AbortSignal;
|
|
115
120
|
}
|
|
116
121
|
/** Identifies a cursor-addressed event stream used by the stream follower. */
|
|
@@ -173,6 +178,7 @@ declare class FactoryClient {
|
|
|
173
178
|
detail?: string | undefined;
|
|
174
179
|
reason?: string | undefined;
|
|
175
180
|
decidedAt?: string | undefined;
|
|
181
|
+
tasksNextCursor?: string | null | undefined;
|
|
176
182
|
}[];
|
|
177
183
|
nextCursor: string | null;
|
|
178
184
|
}>;
|
|
@@ -203,6 +209,7 @@ declare class FactoryClient {
|
|
|
203
209
|
detail?: string | undefined;
|
|
204
210
|
reason?: string | undefined;
|
|
205
211
|
decidedAt?: string | undefined;
|
|
212
|
+
tasksNextCursor?: string | null | undefined;
|
|
206
213
|
}>;
|
|
207
214
|
/** Lists approval proposals visible to the authenticated operator. */
|
|
208
215
|
listApprovals(options?: ApprovalListOptions): Promise<ApprovalPage>;
|
|
@@ -224,17 +231,78 @@ declare class FactoryClient {
|
|
|
224
231
|
listRepositories(): Promise<readonly RepositorySlug[]>;
|
|
225
232
|
/** Reads repository slugs together with their stable configured identifiers. */
|
|
226
233
|
getRepositoryDetails(): Promise<RepositoryDetails>;
|
|
227
|
-
/**
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
234
|
+
/** Reads one bounded page of open Changes, optionally scoped to a repository. */
|
|
235
|
+
getChangePage(options?: {
|
|
236
|
+
repository?: RepositorySlug;
|
|
237
|
+
limit?: number;
|
|
238
|
+
cursor?: string;
|
|
239
|
+
}): Promise<{
|
|
240
|
+
changes: readonly ({
|
|
241
|
+
state: "verifying" | "ready" | "closed";
|
|
242
|
+
schemaVersion: 1;
|
|
243
|
+
id: `chg_${string}`;
|
|
244
|
+
repositoryId: `repo_${string}`;
|
|
245
|
+
prNumber: number;
|
|
246
|
+
prUrl: string;
|
|
247
|
+
author: string;
|
|
248
|
+
risk: "low" | "medium" | "high";
|
|
249
|
+
confidence: "low" | "medium" | "high";
|
|
250
|
+
evidence: {
|
|
251
|
+
reproVerified: boolean;
|
|
252
|
+
testsAdded: number;
|
|
253
|
+
checksGreen: boolean;
|
|
254
|
+
attackPassed: boolean;
|
|
255
|
+
scopeMatches: boolean;
|
|
256
|
+
previewUrl?: string | undefined;
|
|
257
|
+
};
|
|
258
|
+
createdAt: string;
|
|
259
|
+
updatedAt: string;
|
|
260
|
+
decidedBy?: string | undefined;
|
|
261
|
+
taskId?: `task_${string}` | undefined;
|
|
262
|
+
groupId?: `task_${string}` | undefined;
|
|
263
|
+
mergeSha?: string | undefined;
|
|
264
|
+
} | {
|
|
265
|
+
state: "merged" | "deployed" | "rolled_out" | "rolled_back";
|
|
266
|
+
decidedBy: string;
|
|
267
|
+
schemaVersion: 1;
|
|
268
|
+
id: `chg_${string}`;
|
|
269
|
+
repositoryId: `repo_${string}`;
|
|
270
|
+
prNumber: number;
|
|
271
|
+
prUrl: string;
|
|
272
|
+
author: string;
|
|
273
|
+
risk: "low" | "medium" | "high";
|
|
274
|
+
confidence: "low" | "medium" | "high";
|
|
275
|
+
evidence: {
|
|
276
|
+
reproVerified: boolean;
|
|
277
|
+
testsAdded: number;
|
|
278
|
+
checksGreen: boolean;
|
|
279
|
+
attackPassed: boolean;
|
|
280
|
+
scopeMatches: boolean;
|
|
281
|
+
previewUrl?: string | undefined;
|
|
282
|
+
};
|
|
283
|
+
createdAt: string;
|
|
284
|
+
updatedAt: string;
|
|
285
|
+
taskId?: `task_${string}` | undefined;
|
|
286
|
+
groupId?: `task_${string}` | undefined;
|
|
287
|
+
mergeSha?: string | undefined;
|
|
288
|
+
})[];
|
|
289
|
+
nextCursor: string | null;
|
|
290
|
+
}>;
|
|
291
|
+
/** Reads one bounded page of canonical Tasks authorized for the caller. */
|
|
292
|
+
getTaskPage(options?: {
|
|
293
|
+
limit?: number;
|
|
294
|
+
cursor?: string;
|
|
295
|
+
}): Promise<{
|
|
296
|
+
tasks: readonly Task[];
|
|
297
|
+
nextCursor: string | null;
|
|
298
|
+
}>;
|
|
231
299
|
/**
|
|
232
300
|
* Lists sessions matching the requested operator scope without pagination metadata.
|
|
233
301
|
*
|
|
234
302
|
* @param options - Optional scope and detail projection; both use their server defaults when omitted.
|
|
235
303
|
* @returns The first matching page's sessions. Use {@link getSessionPage} to follow cursors.
|
|
236
304
|
*/
|
|
237
|
-
listSessions(options?: Pick<SessionListOptions, "scope" | "detail">): Promise<readonly
|
|
305
|
+
listSessions(options?: Pick<SessionListOptions, "scope" | "detail">): Promise<readonly SessionSummary[]>;
|
|
238
306
|
/**
|
|
239
307
|
* Reads a filtered, cursor-paginated page of sessions.
|
|
240
308
|
*
|
|
@@ -251,7 +319,59 @@ declare class FactoryClient {
|
|
|
251
319
|
/** Counts sessions that currently require operator attention. */
|
|
252
320
|
getInboxCount(): Promise<number>;
|
|
253
321
|
/** Reads a summary batch for the provided session IDs. */
|
|
254
|
-
getSessionBatch(ids: readonly AgentSessionId[]): Promise<readonly
|
|
322
|
+
getSessionBatch(ids: readonly AgentSessionId[]): Promise<readonly SessionSummary[]>;
|
|
323
|
+
/** Reads one earlier page of authorized provider executions. */
|
|
324
|
+
getSessionHistory(id: AgentSessionId, options?: {
|
|
325
|
+
cursor?: string;
|
|
326
|
+
signal?: AbortSignal;
|
|
327
|
+
}): Promise<{
|
|
328
|
+
items: readonly {
|
|
329
|
+
agent: string;
|
|
330
|
+
message: string;
|
|
331
|
+
execution: {
|
|
332
|
+
provider: string;
|
|
333
|
+
sessionId: string;
|
|
334
|
+
environmentId?: string | undefined;
|
|
335
|
+
harness?: string | undefined;
|
|
336
|
+
traceId?: string | undefined;
|
|
337
|
+
};
|
|
338
|
+
taskId?: `task_${string}` | undefined;
|
|
339
|
+
attachments?: readonly {
|
|
340
|
+
id: `img_${string}`;
|
|
341
|
+
filename: string;
|
|
342
|
+
mediaType: "image/png" | "image/jpeg" | "image/webp";
|
|
343
|
+
size: number;
|
|
344
|
+
}[] | undefined;
|
|
345
|
+
}[];
|
|
346
|
+
nextCursor: string | null;
|
|
347
|
+
}>;
|
|
348
|
+
/** Reads one earlier page of delivered conversation notifications. */
|
|
349
|
+
getSessionNotifications(id: AgentSessionId, options?: {
|
|
350
|
+
cursor?: string;
|
|
351
|
+
signal?: AbortSignal;
|
|
352
|
+
}): Promise<{
|
|
353
|
+
items: readonly {
|
|
354
|
+
eventId: string;
|
|
355
|
+
repositoryIds: readonly [`repo_${string}`, ...`repo_${string}`[]];
|
|
356
|
+
replyTo: {
|
|
357
|
+
channel: string;
|
|
358
|
+
address: string;
|
|
359
|
+
};
|
|
360
|
+
outcome: "message" | "succeeded" | "failed" | "needs_human" | "cancelled" | "accepted" | "rolled_back" | "question" | "started" | "digest" | "budget_warning" | "budget_exhausted";
|
|
361
|
+
data: Record<string, unknown>;
|
|
362
|
+
taskId?: `task_${string}` | undefined;
|
|
363
|
+
changeId?: `chg_${string}` | undefined;
|
|
364
|
+
}[];
|
|
365
|
+
nextCursor: string | null;
|
|
366
|
+
}>;
|
|
367
|
+
/** Reads one bounded page of related Tasks authorized for this conversation. */
|
|
368
|
+
getSessionRelatedTasks(id: AgentSessionId, options?: {
|
|
369
|
+
cursor?: string;
|
|
370
|
+
signal?: AbortSignal;
|
|
371
|
+
}): Promise<{
|
|
372
|
+
items: readonly Task[];
|
|
373
|
+
nextCursor: string | null;
|
|
374
|
+
}>;
|
|
255
375
|
/**
|
|
256
376
|
* Reads one operator session.
|
|
257
377
|
*
|
|
@@ -334,10 +454,16 @@ declare class FactoryClient {
|
|
|
334
454
|
resetSession(id: AgentSessionId, input?: ControlSessionRequest): Promise<void>;
|
|
335
455
|
/** Reads a materialized transcript as a raw HTTP response for incremental following. */
|
|
336
456
|
getSessionTranscriptResponse(input: SessionTranscriptRequest): Promise<Response>;
|
|
457
|
+
/** Reads one bounded page of saved transcript history from Factory storage. */
|
|
458
|
+
getTranscriptPage(input: Omit<SessionTranscriptRequest, "blockId">): Promise<TranscriptPage>;
|
|
459
|
+
/** Expands one large transcript block after authorizing its session and execution. */
|
|
460
|
+
getTranscriptBlock(input: Omit<SessionTranscriptRequest, "limit" | "cursor"> & {
|
|
461
|
+
readonly blockId: string;
|
|
462
|
+
}): Promise<TranscriptBlock>;
|
|
337
463
|
/** Opens a cursor-addressed session event stream as a raw HTTP response. */
|
|
338
464
|
getSessionEventStreamResponse(input: SessionEventStreamRequest): Promise<Response>;
|
|
339
465
|
private controlSession;
|
|
340
466
|
}
|
|
341
467
|
//#endregion
|
|
342
|
-
export { type AgentModelConfig, type AgentSession, type AgentSessionId, type AnswerSessionQuestionRequest, type ApiAgent, ApiError, type ApprovalListOptions, type ApprovalPage, type ApprovalView, type ControlSessionRequest, type CreateSessionRequest, type DirectAgentSession, type ExternalAgentSession, FactoryClient, FactoryClientOptions, type FollowSessionStreamOptions, GetImageOptions, GetSessionGraphOptions, GetSessionOptions, GraphTranscriptOptions, type ImageAttachment, type ImageId, type ImageUploadInput, type InboxActivity, type InboxActivityItem, type InputRequest, type IntakeView, MAX_IMAGES, MAX_IMAGE_BYTES, type ModelSettings, type PendingFollowUp, type RepositoryDetails, type RepositorySummary, type SendSessionMessageRequest, SessionEventStreamRequest, type SessionInputResponse, SessionListOptions, type SessionPage, type SessionPreview, type SessionPreviews, SessionPreviewsOptions, type SessionReview, type SessionReviewCheck, type SessionReviewIssue, SessionReviewOptions, type SessionReviewScreenshot, type SessionStreamClient, SessionTranscriptRequest, type SessionView, type StreamEvent, type SubmitSessionInputRequest, type TaskAgentSession, type TaskGraphView, type ToolCall, Transcript, type TranscriptBlock, type TranscriptSnapshot, type UpdateModelDefaults, type WorkspaceDiff, type WorkspaceDiffFile, WorkspaceDiffOptions, type WorkspaceFileEntry, type WorkspaceFiles, WorkspaceFilesOptions, type WorkspaceFilesRequest, agentModelConfigSchema, agentSessionIdSchema, agentSessionSchema, answerSessionQuestionRequestSchema, apiAgentSchema, controlSessionRequestSchema, createSessionRequestSchema, describeIntake, followSessionStream, imageAttachmentSchema, imageAttachmentsSchema, imageIdSchema, inboxActivityItemSchema, inboxActivitySchema, inputRequestSchema, modelSettingsSchema, pendingFollowUpSchema, readEvents, repositoryDetailsSchema, repositorySummarySchema, sendSessionMessageRequestSchema, sessionInputResponseSchema, sessionPageSchema, sessionPreviewSchema, sessionPreviewsSchema, sessionReviewCheckSchema, sessionReviewIssueSchema, sessionReviewSchema, sessionReviewScreenshotSchema, sessionViewSchema, streamEventSchema, submitSessionInputRequestSchema, taskStates, toolCallSchema, transcriptBlockSchema, transcriptSnapshotSchema, updateModelDefaultsSchema, workspaceDiffFileSchema, workspaceDiffSchema, workspaceFileContentSchema, workspaceFileEntrySchema, workspaceFilesRequestSchema, workspaceFilesSchema, workspacePathSchema };
|
|
468
|
+
export { type AgentModelConfig, type AgentSession, type AgentSessionId, type AnswerSessionQuestionRequest, type ApiAgent, ApiError, type ApprovalListOptions, type ApprovalPage, type ApprovalView, type ControlSessionRequest, type CreateSessionRequest, type DirectAgentSession, type ExternalAgentSession, FactoryClient, FactoryClientOptions, type FollowSessionStreamOptions, GetImageOptions, GetSessionGraphOptions, GetSessionOptions, GraphTranscriptOptions, type ImageAttachment, type ImageId, type ImageUploadInput, type InboxActivity, type InboxActivityItem, type InputRequest, type IntakeView, MAX_IMAGES, MAX_IMAGE_BYTES, type ModelSettings, type PendingFollowUp, type RepositoryDetails, type RepositorySummary, type SendSessionMessageRequest, SessionEventStreamRequest, type SessionInputResponse, SessionListOptions, type SessionPage, type SessionPreview, type SessionPreviews, SessionPreviewsOptions, type SessionPullRequest, type SessionReview, type SessionReviewCheck, type SessionReviewIssue, SessionReviewOptions, type SessionReviewScreenshot, type SessionStreamClient, type SessionSummary, type SessionTaskSummary, SessionTranscriptRequest, type SessionView, type SessionWorkGroup, type SessionWorkResult, type SessionWorkTask, type StreamEvent, type SubmitSessionInputRequest, type TaskAgentSession, type TaskGraphView, type ToolCall, Transcript, type TranscriptBlock, type TranscriptHistoryPage, type TranscriptPage, type TranscriptPageQuery, type TranscriptSnapshot, type UpdateModelDefaults, type WorkspaceDiff, type WorkspaceDiffFile, WorkspaceDiffOptions, type WorkspaceFileEntry, type WorkspaceFiles, WorkspaceFilesOptions, type WorkspaceFilesRequest, agentModelConfigSchema, agentSessionIdSchema, agentSessionSchema, answerSessionQuestionRequestSchema, apiAgentSchema, controlSessionRequestSchema, createSessionRequestSchema, describeIntake, expandTranscriptBlock, followSessionStream, imageAttachmentSchema, imageAttachmentsSchema, imageIdSchema, inboxActivityItemSchema, inboxActivitySchema, inputRequestSchema, loadPreviousTranscriptPage, modelSettingsSchema, pendingFollowUpSchema, readEvents, repositoryDetailsSchema, repositorySummarySchema, sendSessionMessageRequestSchema, sessionInputResponseSchema, sessionPageSchema, sessionPreviewSchema, sessionPreviewsSchema, sessionPullRequestSchema, sessionPullRequestStateSchema, sessionReviewCheckSchema, sessionReviewIssueSchema, sessionReviewSchema, sessionReviewScreenshotSchema, sessionSummarySchema, sessionTaskSummarySchema, sessionViewSchema, sessionWorkGroupSchema, sessionWorkResultSchema, sessionWorkTaskSchema, streamEventSchema, submitSessionInputRequestSchema, taskStates, toolCallSchema, transcriptBlockSchema, transcriptPageSchema, transcriptSnapshotSchema, updateModelDefaultsSchema, workspaceDiffFileSchema, workspaceDiffSchema, workspaceFileContentSchema, workspaceFileEntrySchema, workspaceFilesRequestSchema, workspaceFilesSchema, workspacePathSchema };
|
|
343
469
|
//# sourceMappingURL=client.d.mts.map
|
package/dist/client.mjs
CHANGED
|
@@ -3,21 +3,22 @@ import { repositorySlugSchema } from "./schema/repository.mjs";
|
|
|
3
3
|
import { taskSchema, taskStateSchema } from "./schema/task.mjs";
|
|
4
4
|
import { readEvents, streamEventSchema } from "./client-events.mjs";
|
|
5
5
|
import { MAX_IMAGES, MAX_IMAGE_BYTES, imageAttachmentSchema, imageAttachmentsSchema, imageIdSchema } from "./image-input.mjs";
|
|
6
|
-
import { inputRequestSchema, toolCallSchema, transcriptBlockSchema, transcriptSnapshotSchema } from "./schema/transcript.mjs";
|
|
6
|
+
import { inputRequestSchema, toolCallSchema, transcriptBlockSchema, transcriptPageSchema, transcriptSnapshotSchema } from "./schema/transcript.mjs";
|
|
7
7
|
import { Transcript } from "./client-transcript.mjs";
|
|
8
8
|
import { approvalPageSchema, approvalRequestSchema, approvalViewSchema } from "./approval-contracts.mjs";
|
|
9
|
-
import { agentSessionIdSchema, agentSessionSchema } from "./schema/session.mjs";
|
|
10
9
|
import { changeSchema } from "./schema/change.mjs";
|
|
10
|
+
import { agentSessionIdSchema, agentSessionSchema } from "./schema/session.mjs";
|
|
11
|
+
import { sessionTaskSummarySchema } from "./schema/session-summary.mjs";
|
|
12
|
+
import { answerSessionQuestionRequestSchema, apiAgentSchema, controlSessionRequestSchema, createSessionRequestSchema, pendingFollowUpSchema, repositoryDetailsSchema, repositorySummarySchema, sendSessionMessageRequestSchema, sessionInputResponseSchema, sessionPageSchema, sessionPullRequestSchema, sessionPullRequestStateSchema, sessionSummarySchema, sessionViewSchema, sessionWorkGroupSchema, sessionWorkResultSchema, sessionWorkTaskSchema, submitSessionInputRequestSchema } from "./api-contracts.mjs";
|
|
11
13
|
import { inboxActivityItemSchema, inboxActivitySchema } from "./inbox-activity.mjs";
|
|
12
14
|
import { agentModelConfigSchema, modelSettingsSchema, updateModelDefaultsSchema } from "./model-settings.mjs";
|
|
13
15
|
import { sessionPreviewSchema, sessionPreviewsSchema } from "./session-previews.mjs";
|
|
14
16
|
import { sessionReviewCheckSchema, sessionReviewIssueSchema, sessionReviewSchema, sessionReviewScreenshotSchema } from "./session-review.mjs";
|
|
15
17
|
import { workspaceFileContentSchema, workspaceFileEntrySchema, workspaceFilesRequestSchema, workspaceFilesSchema, workspacePathSchema } from "./workspace-files.mjs";
|
|
16
18
|
import { describeIntake, intakePageSchema, intakeViewSchema, retryIntakeSchema } from "./intake-contracts.mjs";
|
|
17
|
-
import { answerSessionQuestionRequestSchema, apiAgentSchema, controlSessionRequestSchema, createSessionRequestSchema, pendingFollowUpSchema, repositoryDetailsSchema, repositorySummarySchema, sendSessionMessageRequestSchema, sessionInputResponseSchema, sessionPageSchema, sessionViewSchema, submitSessionInputRequestSchema } from "./api-contracts.mjs";
|
|
18
19
|
import { workspaceDiffFileSchema, workspaceDiffSchema } from "./workspace-diff.mjs";
|
|
19
20
|
import { taskGraphViewSchema } from "./task-graph-view.mjs";
|
|
20
|
-
import { followSessionStream } from "./client-stream.mjs";
|
|
21
|
+
import { expandTranscriptBlock, followSessionStream, loadPreviousTranscriptPage } from "./client-stream.mjs";
|
|
21
22
|
import { z } from "zod";
|
|
22
23
|
//#region src/client.ts
|
|
23
24
|
/** All durable Task states in their schema-defined order. */
|
|
@@ -146,13 +147,21 @@ var FactoryClient = class {
|
|
|
146
147
|
async getRepositoryDetails() {
|
|
147
148
|
return repositoryDetailsSchema.parse(await (await this.response("repositories")).json());
|
|
148
149
|
}
|
|
149
|
-
/**
|
|
150
|
-
async
|
|
151
|
-
|
|
150
|
+
/** Reads one bounded page of open Changes, optionally scoped to a repository. */
|
|
151
|
+
async getChangePage(options = {}) {
|
|
152
|
+
const query = new URLSearchParams(Object.entries(options).filter(([, value]) => value !== void 0).map(([key, value]) => [key, String(value)]));
|
|
153
|
+
return z.object({
|
|
154
|
+
changes: z.array(changeSchema).readonly(),
|
|
155
|
+
nextCursor: z.string().nullable()
|
|
156
|
+
}).parse(await (await this.response(`changes?${query}`)).json());
|
|
152
157
|
}
|
|
153
|
-
/**
|
|
154
|
-
async
|
|
155
|
-
|
|
158
|
+
/** Reads one bounded page of canonical Tasks authorized for the caller. */
|
|
159
|
+
async getTaskPage(options = {}) {
|
|
160
|
+
const query = new URLSearchParams(Object.entries(options).filter(([, value]) => value !== void 0).map(([key, value]) => [key, String(value)]));
|
|
161
|
+
return z.object({
|
|
162
|
+
tasks: z.array(taskSchema).readonly(),
|
|
163
|
+
nextCursor: z.string().nullable()
|
|
164
|
+
}).parse(await (await this.response(`tasks?${query}`)).json());
|
|
156
165
|
}
|
|
157
166
|
/**
|
|
158
167
|
* Lists sessions matching the requested operator scope without pagination metadata.
|
|
@@ -188,7 +197,9 @@ var FactoryClient = class {
|
|
|
188
197
|
}
|
|
189
198
|
/** Counts sessions that currently require operator attention. */
|
|
190
199
|
async getInboxCount() {
|
|
191
|
-
|
|
200
|
+
const result = z.object({ totalCount: z.number().int().nonnegative().optional() }).parse(await (await this.response("sessions?scope=all&detail=summary&attention=true&includeTotal=true&limit=1")).json());
|
|
201
|
+
if (result.totalCount === void 0) throw new Error("This factory's access policy does not provide an exact attention count");
|
|
202
|
+
return result.totalCount;
|
|
192
203
|
}
|
|
193
204
|
/** Reads a summary batch for the provided session IDs. */
|
|
194
205
|
async getSessionBatch(ids) {
|
|
@@ -197,7 +208,40 @@ var FactoryClient = class {
|
|
|
197
208
|
ids: ids.join(","),
|
|
198
209
|
detail: "summary"
|
|
199
210
|
});
|
|
200
|
-
return z.object({ sessions: z.array(
|
|
211
|
+
return z.object({ sessions: z.array(sessionSummarySchema).readonly() }).parse(await (await this.response(`sessions?${query}`)).json()).sessions;
|
|
212
|
+
}
|
|
213
|
+
/** Reads one earlier page of authorized provider executions. */
|
|
214
|
+
async getSessionHistory(id, options = {}) {
|
|
215
|
+
const query = new URLSearchParams({
|
|
216
|
+
limit: "20",
|
|
217
|
+
...options.cursor ? { cursor: options.cursor } : {}
|
|
218
|
+
});
|
|
219
|
+
return z.object({
|
|
220
|
+
items: sessionViewSchema.shape.history.unwrap(),
|
|
221
|
+
nextCursor: z.string().nullable()
|
|
222
|
+
}).parse(await (await this.response(`sessions/${encodeURIComponent(id)}/history?${query}`, void 0, options.signal)).json());
|
|
223
|
+
}
|
|
224
|
+
/** Reads one earlier page of delivered conversation notifications. */
|
|
225
|
+
async getSessionNotifications(id, options = {}) {
|
|
226
|
+
const query = new URLSearchParams({
|
|
227
|
+
limit: "30",
|
|
228
|
+
...options.cursor ? { cursor: options.cursor } : {}
|
|
229
|
+
});
|
|
230
|
+
return z.object({
|
|
231
|
+
items: sessionViewSchema.shape.notifications,
|
|
232
|
+
nextCursor: z.string().nullable()
|
|
233
|
+
}).parse(await (await this.response(`sessions/${encodeURIComponent(id)}/notifications?${query}`, void 0, options.signal)).json());
|
|
234
|
+
}
|
|
235
|
+
/** Reads one bounded page of related Tasks authorized for this conversation. */
|
|
236
|
+
async getSessionRelatedTasks(id, options = {}) {
|
|
237
|
+
const query = new URLSearchParams({
|
|
238
|
+
limit: "30",
|
|
239
|
+
...options.cursor ? { cursor: options.cursor } : {}
|
|
240
|
+
});
|
|
241
|
+
return z.object({
|
|
242
|
+
items: sessionViewSchema.shape.relatedTasks.unwrap(),
|
|
243
|
+
nextCursor: z.string().nullable()
|
|
244
|
+
}).parse(await (await this.response(`sessions/${encodeURIComponent(id)}/related-tasks?${query}`, void 0, options.signal)).json());
|
|
201
245
|
}
|
|
202
246
|
/**
|
|
203
247
|
* Reads one operator session.
|
|
@@ -210,7 +254,7 @@ var FactoryClient = class {
|
|
|
210
254
|
}
|
|
211
255
|
/** Reads the canonical task graph projected for one session. */
|
|
212
256
|
async getSessionGraph(options) {
|
|
213
|
-
return taskGraphViewSchema.parse(await (await this.response(`sessions/${encodeURIComponent(options.id)}/graph`, void 0, options.signal)).json());
|
|
257
|
+
return taskGraphViewSchema.parse(await (await this.response(`sessions/${encodeURIComponent(options.id)}/graph${options.taskId ? `?${new URLSearchParams({ taskId: options.taskId })}` : ""}`, void 0, options.signal)).json());
|
|
214
258
|
}
|
|
215
259
|
/** Reads the materialized transcript for one exact graph task execution. */
|
|
216
260
|
async getGraphTranscript(options) {
|
|
@@ -218,7 +262,7 @@ var FactoryClient = class {
|
|
|
218
262
|
taskId: options.taskId,
|
|
219
263
|
executionId: options.executionId
|
|
220
264
|
});
|
|
221
|
-
return
|
|
265
|
+
return transcriptPageSchema.parse(await (await this.response(`sessions/${encodeURIComponent(options.sessionId)}/graph-transcript?${query}`, void 0, options.signal)).json()).snapshot;
|
|
222
266
|
}
|
|
223
267
|
/** Refreshes a session summary and reloads its history when the active execution changes. */
|
|
224
268
|
async refreshSession(previous) {
|
|
@@ -227,9 +271,27 @@ var FactoryClient = class {
|
|
|
227
271
|
detail: "summary"
|
|
228
272
|
});
|
|
229
273
|
if (current.task?.id !== previous.task?.id || current.execution?.sessionId !== previous.execution?.sessionId || current.execution?.provider !== previous.execution?.provider) return this.getSession({ id: previous.session.id });
|
|
274
|
+
if (current.session.latestNotificationId !== previous.session.latestNotificationId || current.task?.updatedAt !== previous.task?.updatedAt || current.statusRevision !== previous.statusRevision) {
|
|
275
|
+
const fresh = await this.getSession({ id: previous.session.id });
|
|
276
|
+
if (fresh.task?.id !== previous.task?.id || fresh.execution?.sessionId !== previous.execution?.sessionId || fresh.execution?.provider !== previous.execution?.provider) return fresh;
|
|
277
|
+
return {
|
|
278
|
+
...fresh,
|
|
279
|
+
history: [...new Map([...previous.history ?? [], ...fresh.history ?? []].map((entry) => [JSON.stringify(entry.execution), entry])).values()],
|
|
280
|
+
historyNextCursor: (previous.history?.length ?? 0) > (fresh.history?.length ?? 0) ? previous.historyNextCursor : fresh.historyNextCursor,
|
|
281
|
+
notifications: [...new Map([...previous.notifications, ...fresh.notifications].map((entry) => [entry.eventId, entry])).values()],
|
|
282
|
+
notificationsNextCursor: previous.notifications.length > fresh.notifications.length ? previous.notificationsNextCursor : fresh.notificationsNextCursor,
|
|
283
|
+
relatedTasks: [...new Map([...fresh.relatedTasks ?? [], ...(previous.relatedTasks ?? []).filter((entry) => !fresh.relatedTasks?.some((current) => current.id === entry.id))].map((entry) => [entry.id, entry])).values()],
|
|
284
|
+
relatedTasksNextCursor: (previous.relatedTasks?.length ?? 0) > (fresh.relatedTasks?.length ?? 0) ? previous.relatedTasksNextCursor : fresh.relatedTasksNextCursor
|
|
285
|
+
};
|
|
286
|
+
}
|
|
230
287
|
return {
|
|
231
288
|
...current,
|
|
232
|
-
history: previous.history
|
|
289
|
+
history: previous.history,
|
|
290
|
+
historyNextCursor: previous.historyNextCursor,
|
|
291
|
+
notifications: previous.notifications,
|
|
292
|
+
notificationsNextCursor: previous.notificationsNextCursor,
|
|
293
|
+
relatedTasks: previous.relatedTasks,
|
|
294
|
+
relatedTasksNextCursor: previous.relatedTasksNextCursor
|
|
233
295
|
};
|
|
234
296
|
}
|
|
235
297
|
/** Reads application-owned previews without starting an agent, deployment, or server. */
|
|
@@ -345,8 +407,19 @@ var FactoryClient = class {
|
|
|
345
407
|
const query = new URLSearchParams({ executionId: input.executionId });
|
|
346
408
|
if (input.history === true) query.set("history", "1");
|
|
347
409
|
if (input.taskId !== void 0) query.set("taskId", input.taskId);
|
|
410
|
+
if (input.limit !== void 0) query.set("limit", String(input.limit));
|
|
411
|
+
if (input.cursor !== void 0) query.set("cursor", input.cursor);
|
|
412
|
+
if (input.blockId !== void 0) query.set("blockId", input.blockId);
|
|
348
413
|
return this.response(`sessions/${encodeURIComponent(input.sessionId)}/${input.taskId ? "graph-transcript" : "transcript"}?${query}`, void 0, input.signal);
|
|
349
414
|
}
|
|
415
|
+
/** Reads one bounded page of saved transcript history from Factory storage. */
|
|
416
|
+
async getTranscriptPage(input) {
|
|
417
|
+
return transcriptPageSchema.parse(await (await this.getSessionTranscriptResponse(input)).json());
|
|
418
|
+
}
|
|
419
|
+
/** Expands one large transcript block after authorizing its session and execution. */
|
|
420
|
+
async getTranscriptBlock(input) {
|
|
421
|
+
return transcriptBlockSchema.parse(await (await this.getSessionTranscriptResponse(input)).json());
|
|
422
|
+
}
|
|
350
423
|
/** Opens a cursor-addressed session event stream as a raw HTTP response. */
|
|
351
424
|
async getSessionEventStreamResponse(input) {
|
|
352
425
|
const query = new URLSearchParams({
|
|
@@ -361,6 +434,6 @@ var FactoryClient = class {
|
|
|
361
434
|
}
|
|
362
435
|
};
|
|
363
436
|
//#endregion
|
|
364
|
-
export { ApiError, FactoryClient, MAX_IMAGES, MAX_IMAGE_BYTES, Transcript, agentModelConfigSchema, agentSessionIdSchema, agentSessionSchema, answerSessionQuestionRequestSchema, apiAgentSchema, controlSessionRequestSchema, createSessionRequestSchema, describeIntake, followSessionStream, imageAttachmentSchema, imageAttachmentsSchema, imageIdSchema, inboxActivityItemSchema, inboxActivitySchema, inputRequestSchema, modelSettingsSchema, pendingFollowUpSchema, readEvents, repositoryDetailsSchema, repositorySummarySchema, sendSessionMessageRequestSchema, sessionInputResponseSchema, sessionPageSchema, sessionPreviewSchema, sessionPreviewsSchema, sessionReviewCheckSchema, sessionReviewIssueSchema, sessionReviewSchema, sessionReviewScreenshotSchema, sessionViewSchema, streamEventSchema, submitSessionInputRequestSchema, taskStates, toolCallSchema, transcriptBlockSchema, transcriptSnapshotSchema, updateModelDefaultsSchema, workspaceDiffFileSchema, workspaceDiffSchema, workspaceFileContentSchema, workspaceFileEntrySchema, workspaceFilesRequestSchema, workspaceFilesSchema, workspacePathSchema };
|
|
437
|
+
export { ApiError, FactoryClient, MAX_IMAGES, MAX_IMAGE_BYTES, Transcript, agentModelConfigSchema, agentSessionIdSchema, agentSessionSchema, answerSessionQuestionRequestSchema, apiAgentSchema, controlSessionRequestSchema, createSessionRequestSchema, describeIntake, expandTranscriptBlock, followSessionStream, imageAttachmentSchema, imageAttachmentsSchema, imageIdSchema, inboxActivityItemSchema, inboxActivitySchema, inputRequestSchema, loadPreviousTranscriptPage, modelSettingsSchema, pendingFollowUpSchema, readEvents, repositoryDetailsSchema, repositorySummarySchema, sendSessionMessageRequestSchema, sessionInputResponseSchema, sessionPageSchema, sessionPreviewSchema, sessionPreviewsSchema, sessionPullRequestSchema, sessionPullRequestStateSchema, sessionReviewCheckSchema, sessionReviewIssueSchema, sessionReviewSchema, sessionReviewScreenshotSchema, sessionSummarySchema, sessionTaskSummarySchema, sessionViewSchema, sessionWorkGroupSchema, sessionWorkResultSchema, sessionWorkTaskSchema, streamEventSchema, submitSessionInputRequestSchema, taskStates, toolCallSchema, transcriptBlockSchema, transcriptPageSchema, transcriptSnapshotSchema, updateModelDefaultsSchema, workspaceDiffFileSchema, workspaceDiffSchema, workspaceFileContentSchema, workspaceFileEntrySchema, workspaceFilesRequestSchema, workspaceFilesSchema, workspacePathSchema };
|
|
365
438
|
|
|
366
439
|
//# sourceMappingURL=client.mjs.map
|