@agent-factory-platform/client 0.6.0 → 0.7.1
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 +9 -0
- package/dist/gen/agentfactory/agent/v1/agent_pb.d.ts +848 -0
- package/dist/gen/agentfactory/agent/v1/agent_pb.d.ts.map +1 -1
- package/dist/gen/agentfactory/agent/v1/agent_pb.js +216 -86
- package/dist/gen/agentfactory/agent/v1/agent_pb.js.map +1 -1
- package/dist/gen/agentfactory/docs/v1/docs_pb.d.ts +1192 -52
- package/dist/gen/agentfactory/docs/v1/docs_pb.d.ts.map +1 -1
- package/dist/gen/agentfactory/docs/v1/docs_pb.js +258 -57
- package/dist/gen/agentfactory/docs/v1/docs_pb.js.map +1 -1
- package/dist/gen/agentfactory/workflow/v1/workflow_pb.d.ts +1059 -0
- package/dist/gen/agentfactory/workflow/v1/workflow_pb.d.ts.map +1 -0
- package/dist/gen/agentfactory/workflow/v1/workflow_pb.js +240 -0
- package/dist/gen/agentfactory/workflow/v1/workflow_pb.js.map +1 -0
- package/dist/index.d.ts +285 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/migration.d.ts +45 -0
- package/dist/migration.d.ts.map +1 -0
- package/dist/migration.js +57 -0
- package/dist/migration.js.map +1 -0
- package/dist/session-model.d.ts +12 -5
- package/dist/session-model.d.ts.map +1 -1
- package/dist/session-model.js +31 -16
- package/dist/session-model.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { type Interceptor } from "@connectrpc/connect";
|
|
2
|
+
export { Code, ConnectError } from "@connectrpc/connect";
|
|
2
3
|
import { AgentCapabilityService, AgentCollaborationService, AgentHealthService, AgentInteractionService, AgentMemoryService, AgentProfileService, AgentSessionService } from "./gen/agentfactory/agent/v1/agent_pb.js";
|
|
3
4
|
import { DocsService } from "./gen/agentfactory/docs/v1/docs_pb.js";
|
|
4
5
|
import { NotifyService } from "./gen/agentfactory/notify/v1/notify_pb.js";
|
|
6
|
+
import { WorkflowService } from "./gen/agentfactory/workflow/v1/workflow_pb.js";
|
|
7
|
+
export * as workflowV1 from "./gen/agentfactory/workflow/v1/workflow_pb.js";
|
|
8
|
+
export { WorkflowService };
|
|
5
9
|
export * as agentV1 from "./gen/agentfactory/agent/v1/agent_pb.js";
|
|
6
10
|
export * as docsV1 from "./gen/agentfactory/docs/v1/docs_pb.js";
|
|
7
11
|
export * as notifyV1 from "./gen/agentfactory/notify/v1/notify_pb.js";
|
|
8
12
|
export { AgentCapabilityService, AgentCollaborationService, AgentHealthService, AgentInteractionService, AgentMemoryService, AgentProfileService, AgentSessionService, DocsService, NotifyService, };
|
|
9
13
|
export * from "./session-model.js";
|
|
10
14
|
export * from "./document-assistant-model.js";
|
|
15
|
+
export * from "./migration.js";
|
|
11
16
|
export interface AgentFactoryClientOptions {
|
|
12
17
|
baseUrl: string;
|
|
13
18
|
headers?: () => HeadersInit | Promise<HeadersInit>;
|
|
@@ -38,6 +43,11 @@ export declare function createAgentFactoryClients(options: AgentFactoryClientOpt
|
|
|
38
43
|
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").GetSessionRequestSchema;
|
|
39
44
|
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").SessionSchema;
|
|
40
45
|
};
|
|
46
|
+
updateSession: {
|
|
47
|
+
methodKind: "unary";
|
|
48
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").UpdateSessionRequestSchema;
|
|
49
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").SessionSchema;
|
|
50
|
+
};
|
|
41
51
|
deleteSession: {
|
|
42
52
|
methodKind: "unary";
|
|
43
53
|
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").DeleteSessionRequestSchema;
|
|
@@ -48,11 +58,36 @@ export declare function createAgentFactoryClients(options: AgentFactoryClientOpt
|
|
|
48
58
|
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ForkSessionRequestSchema;
|
|
49
59
|
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").SessionSchema;
|
|
50
60
|
};
|
|
61
|
+
createSessionSnapshot: {
|
|
62
|
+
methodKind: "unary";
|
|
63
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").CreateSessionSnapshotRequestSchema;
|
|
64
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").SessionSnapshotSchema;
|
|
65
|
+
};
|
|
66
|
+
readSessionSnapshot: {
|
|
67
|
+
methodKind: "unary";
|
|
68
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").SessionSnapshotRequestSchema;
|
|
69
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").SessionSnapshotSchema;
|
|
70
|
+
};
|
|
71
|
+
revokeSessionSnapshot: {
|
|
72
|
+
methodKind: "unary";
|
|
73
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").SessionSnapshotRequestSchema;
|
|
74
|
+
output: typeof import("@bufbuild/protobuf/wkt").EmptySchema;
|
|
75
|
+
};
|
|
51
76
|
submitInput: {
|
|
52
77
|
methodKind: "unary";
|
|
53
78
|
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").SubmitInputRequestSchema;
|
|
54
79
|
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").InputReceiptSchema;
|
|
55
80
|
};
|
|
81
|
+
compactSession: {
|
|
82
|
+
methodKind: "unary";
|
|
83
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").CompactSessionRequestSchema;
|
|
84
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").InputReceiptSchema;
|
|
85
|
+
};
|
|
86
|
+
correctMetering: {
|
|
87
|
+
methodKind: "unary";
|
|
88
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").CorrectMeteringRequestSchema;
|
|
89
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").MeteringCorrectionReceiptSchema;
|
|
90
|
+
};
|
|
56
91
|
cancelRun: {
|
|
57
92
|
methodKind: "unary";
|
|
58
93
|
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").CancelRunRequestSchema;
|
|
@@ -63,6 +98,11 @@ export declare function createAgentFactoryClients(options: AgentFactoryClientOpt
|
|
|
63
98
|
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").GetRunRequestSchema;
|
|
64
99
|
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").RunSchema;
|
|
65
100
|
};
|
|
101
|
+
readSessionEvents: {
|
|
102
|
+
methodKind: "unary";
|
|
103
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ReadSessionEventsRequestSchema;
|
|
104
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ReadSessionEventsResponseSchema;
|
|
105
|
+
};
|
|
66
106
|
followEvents: {
|
|
67
107
|
methodKind: "server_streaming";
|
|
68
108
|
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").FollowEventsRequestSchema;
|
|
@@ -70,6 +110,31 @@ export declare function createAgentFactoryClients(options: AgentFactoryClientOpt
|
|
|
70
110
|
};
|
|
71
111
|
}>>;
|
|
72
112
|
profiles: import("@connectrpc/connect").Client<import("@bufbuild/protobuf/codegenv1").GenService<{
|
|
113
|
+
exportProfile: {
|
|
114
|
+
methodKind: "unary";
|
|
115
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ExportProfileRequestSchema;
|
|
116
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ExportProfileResponseSchema;
|
|
117
|
+
};
|
|
118
|
+
importProfile: {
|
|
119
|
+
methodKind: "unary";
|
|
120
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ImportProfileRequestSchema;
|
|
121
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ProfileDraftSchema;
|
|
122
|
+
};
|
|
123
|
+
proposeProfile: {
|
|
124
|
+
methodKind: "unary";
|
|
125
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ProposeProfileRequestSchema;
|
|
126
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ProfileDraftSchema;
|
|
127
|
+
};
|
|
128
|
+
getProfileDraft: {
|
|
129
|
+
methodKind: "unary";
|
|
130
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").GetProfileDraftRequestSchema;
|
|
131
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ProfileDraftSchema;
|
|
132
|
+
};
|
|
133
|
+
decideProfileDraft: {
|
|
134
|
+
methodKind: "unary";
|
|
135
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").DecideProfileDraftRequestSchema;
|
|
136
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ProfileDraftSchema;
|
|
137
|
+
};
|
|
73
138
|
createProfile: {
|
|
74
139
|
methodKind: "unary";
|
|
75
140
|
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").CreateProfileRequestSchema;
|
|
@@ -144,6 +209,11 @@ export declare function createAgentFactoryClients(options: AgentFactoryClientOpt
|
|
|
144
209
|
};
|
|
145
210
|
}>>;
|
|
146
211
|
memories: import("@connectrpc/connect").Client<import("@bufbuild/protobuf/codegenv1").GenService<{
|
|
212
|
+
editMemory: {
|
|
213
|
+
methodKind: "unary";
|
|
214
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").EditMemoryRequestSchema;
|
|
215
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").MemorySchema;
|
|
216
|
+
};
|
|
147
217
|
getMemorySettings: {
|
|
148
218
|
methodKind: "unary";
|
|
149
219
|
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").GetMemorySettingsRequestSchema;
|
|
@@ -164,6 +234,11 @@ export declare function createAgentFactoryClients(options: AgentFactoryClientOpt
|
|
|
164
234
|
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ConfirmMemoryRequestSchema;
|
|
165
235
|
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").MemorySchema;
|
|
166
236
|
};
|
|
237
|
+
clearMemories: {
|
|
238
|
+
methodKind: "unary";
|
|
239
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ClearMemoriesRequestSchema;
|
|
240
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ClearMemoriesResponseSchema;
|
|
241
|
+
};
|
|
167
242
|
deleteMemory: {
|
|
168
243
|
methodKind: "unary";
|
|
169
244
|
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").DeleteMemoryRequestSchema;
|
|
@@ -267,6 +342,49 @@ export declare function createAgentFactoryClients(options: AgentFactoryClientOpt
|
|
|
267
342
|
deliveryMode?: string | undefined;
|
|
268
343
|
explicitSkillSlug?: string | undefined;
|
|
269
344
|
idempotencyKey?: string | undefined;
|
|
345
|
+
runOptions?: (import("./gen/agentfactory/agent/v1/agent_pb.js").RunOptions | {
|
|
346
|
+
readonly $typeName?: undefined;
|
|
347
|
+
profileRevisionId?: string | undefined;
|
|
348
|
+
model?: string | undefined;
|
|
349
|
+
reasoning?: string | undefined;
|
|
350
|
+
timezone?: string | undefined;
|
|
351
|
+
webSearch?: boolean | undefined;
|
|
352
|
+
collaboration?: string | undefined;
|
|
353
|
+
pageContext?: (import("@bufbuild/protobuf/wkt").Value | {
|
|
354
|
+
readonly $typeName?: undefined;
|
|
355
|
+
kind?: {
|
|
356
|
+
value: import("@bufbuild/protobuf/wkt").NullValue;
|
|
357
|
+
case: "nullValue";
|
|
358
|
+
} | {
|
|
359
|
+
value: number;
|
|
360
|
+
case: "numberValue";
|
|
361
|
+
} | {
|
|
362
|
+
value: string;
|
|
363
|
+
case: "stringValue";
|
|
364
|
+
} | {
|
|
365
|
+
value: boolean;
|
|
366
|
+
case: "boolValue";
|
|
367
|
+
} | {
|
|
368
|
+
case: undefined;
|
|
369
|
+
value?: undefined;
|
|
370
|
+
} | {
|
|
371
|
+
case: "structValue";
|
|
372
|
+
value: import("@bufbuild/protobuf/wkt").Struct | {
|
|
373
|
+
readonly $typeName?: undefined;
|
|
374
|
+
fields?: {
|
|
375
|
+
[key: string]: import("@bufbuild/protobuf/wkt").Value | /*elided*/ any;
|
|
376
|
+
[key: number]: import("@bufbuild/protobuf/wkt").Value | /*elided*/ any;
|
|
377
|
+
} | undefined;
|
|
378
|
+
};
|
|
379
|
+
} | {
|
|
380
|
+
case: "listValue";
|
|
381
|
+
value: import("@bufbuild/protobuf/wkt").ListValue | {
|
|
382
|
+
readonly $typeName?: undefined;
|
|
383
|
+
values?: (import("@bufbuild/protobuf/wkt").Value | /*elided*/ any)[] | undefined;
|
|
384
|
+
};
|
|
385
|
+
} | undefined;
|
|
386
|
+
}) | undefined;
|
|
387
|
+
}) | undefined;
|
|
270
388
|
}, options?: import("@connectrpc/connect").CallOptions) => Promise<import("./gen/agentfactory/agent/v1/agent_pb.js").InputReceipt>;
|
|
271
389
|
followEvents: (request: import("./gen/agentfactory/agent/v1/agent_pb.js").FollowEventsRequest | {
|
|
272
390
|
readonly $typeName?: undefined;
|
|
@@ -346,6 +464,83 @@ export declare function createAgentFactoryClients(options: AgentFactoryClientOpt
|
|
|
346
464
|
};
|
|
347
465
|
}>>;
|
|
348
466
|
};
|
|
467
|
+
workflow: import("@connectrpc/connect").Client<import("@bufbuild/protobuf/codegenv1").GenService<{
|
|
468
|
+
getCatalog: {
|
|
469
|
+
methodKind: "unary";
|
|
470
|
+
input: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").CatalogRequestSchema;
|
|
471
|
+
output: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").CatalogResponseSchema;
|
|
472
|
+
};
|
|
473
|
+
validateWorkflow: {
|
|
474
|
+
methodKind: "unary";
|
|
475
|
+
input: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").ValidateWorkflowRequestSchema;
|
|
476
|
+
output: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").ValidateWorkflowResponseSchema;
|
|
477
|
+
};
|
|
478
|
+
proposeDraft: {
|
|
479
|
+
methodKind: "unary";
|
|
480
|
+
input: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").ProposeDraftRequestSchema;
|
|
481
|
+
output: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").WorkflowDraftSchema;
|
|
482
|
+
};
|
|
483
|
+
getDraft: {
|
|
484
|
+
methodKind: "unary";
|
|
485
|
+
input: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").GetDraftRequestSchema;
|
|
486
|
+
output: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").WorkflowDraftSchema;
|
|
487
|
+
};
|
|
488
|
+
decideDraft: {
|
|
489
|
+
methodKind: "unary";
|
|
490
|
+
input: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").DecideDraftRequestSchema;
|
|
491
|
+
output: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").WorkflowDraftSchema;
|
|
492
|
+
};
|
|
493
|
+
updateMetadata: {
|
|
494
|
+
methodKind: "unary";
|
|
495
|
+
input: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").UpdateMetadataRequestSchema;
|
|
496
|
+
output: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").MetadataSchema;
|
|
497
|
+
};
|
|
498
|
+
listDefinitions: {
|
|
499
|
+
methodKind: "unary";
|
|
500
|
+
input: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").ListDefinitionsRequestSchema;
|
|
501
|
+
output: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").ListDefinitionsResponseSchema;
|
|
502
|
+
};
|
|
503
|
+
listInstances: {
|
|
504
|
+
methodKind: "unary";
|
|
505
|
+
input: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").ListInstancesRequestSchema;
|
|
506
|
+
output: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").ListInstancesResponseSchema;
|
|
507
|
+
};
|
|
508
|
+
listRevisions: {
|
|
509
|
+
methodKind: "unary";
|
|
510
|
+
input: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").ListRevisionsRequestSchema;
|
|
511
|
+
output: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").ListRevisionsResponseSchema;
|
|
512
|
+
};
|
|
513
|
+
listRuns: {
|
|
514
|
+
methodKind: "unary";
|
|
515
|
+
input: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").ListRunsRequestSchema;
|
|
516
|
+
output: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").ListRunsResponseSchema;
|
|
517
|
+
};
|
|
518
|
+
listSteps: {
|
|
519
|
+
methodKind: "unary";
|
|
520
|
+
input: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").ListStepsRequestSchema;
|
|
521
|
+
output: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").ListStepsResponseSchema;
|
|
522
|
+
};
|
|
523
|
+
listActionFacts: {
|
|
524
|
+
methodKind: "unary";
|
|
525
|
+
input: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").ListActionFactsRequestSchema;
|
|
526
|
+
output: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").ListActionFactsResponseSchema;
|
|
527
|
+
};
|
|
528
|
+
inspectInstance: {
|
|
529
|
+
methodKind: "unary";
|
|
530
|
+
input: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").InspectInstanceRequestSchema;
|
|
531
|
+
output: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").InspectInstanceResponseSchema;
|
|
532
|
+
};
|
|
533
|
+
explainInstance: {
|
|
534
|
+
methodKind: "unary";
|
|
535
|
+
input: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").ExplainInstanceRequestSchema;
|
|
536
|
+
output: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").ExplainInstanceResponseSchema;
|
|
537
|
+
};
|
|
538
|
+
controlInstance: {
|
|
539
|
+
methodKind: "unary";
|
|
540
|
+
input: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").ControlInstanceRequestSchema;
|
|
541
|
+
output: typeof import("./gen/agentfactory/workflow/v1/workflow_pb.js").ControlInstanceResponseSchema;
|
|
542
|
+
};
|
|
543
|
+
}>>;
|
|
349
544
|
docs: import("@connectrpc/connect").Client<import("@bufbuild/protobuf/codegenv1").GenService<{
|
|
350
545
|
health: {
|
|
351
546
|
methodKind: "unary";
|
|
@@ -362,6 +557,21 @@ export declare function createAgentFactoryClients(options: AgentFactoryClientOpt
|
|
|
362
557
|
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ListSpacesRequestSchema;
|
|
363
558
|
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ListSpacesResponseSchema;
|
|
364
559
|
};
|
|
560
|
+
updateSpace: {
|
|
561
|
+
methodKind: "unary";
|
|
562
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").UpdateSpaceRequestSchema;
|
|
563
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").SpaceSchema;
|
|
564
|
+
};
|
|
565
|
+
archiveSpace: {
|
|
566
|
+
methodKind: "unary";
|
|
567
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ArchiveSpaceRequestSchema;
|
|
568
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").SpaceSchema;
|
|
569
|
+
};
|
|
570
|
+
leaveSpace: {
|
|
571
|
+
methodKind: "unary";
|
|
572
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").LeaveSpaceRequestSchema;
|
|
573
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").LeaveSpaceResponseSchema;
|
|
574
|
+
};
|
|
365
575
|
upsertNode: {
|
|
366
576
|
methodKind: "unary";
|
|
367
577
|
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").UpsertNodeRequestSchema;
|
|
@@ -407,11 +617,21 @@ export declare function createAgentFactoryClients(options: AgentFactoryClientOpt
|
|
|
407
617
|
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").RestoreNodeRequestSchema;
|
|
408
618
|
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").NodeSchema;
|
|
409
619
|
};
|
|
620
|
+
listTrash: {
|
|
621
|
+
methodKind: "unary";
|
|
622
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ListTrashRequestSchema;
|
|
623
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ListTrashResponseSchema;
|
|
624
|
+
};
|
|
410
625
|
saveRevision: {
|
|
411
626
|
methodKind: "unary";
|
|
412
627
|
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").SaveRevisionRequestSchema;
|
|
413
628
|
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").RevisionSchema;
|
|
414
629
|
};
|
|
630
|
+
restoreRevision: {
|
|
631
|
+
methodKind: "unary";
|
|
632
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").RestoreRevisionRequestSchema;
|
|
633
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").RevisionSchema;
|
|
634
|
+
};
|
|
415
635
|
listRevisions: {
|
|
416
636
|
methodKind: "unary";
|
|
417
637
|
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ListRevisionsRequestSchema;
|
|
@@ -497,6 +717,41 @@ export declare function createAgentFactoryClients(options: AgentFactoryClientOpt
|
|
|
497
717
|
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").GetReleaseRequestSchema;
|
|
498
718
|
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ReleaseSchema;
|
|
499
719
|
};
|
|
720
|
+
getPublishedRelease: {
|
|
721
|
+
methodKind: "unary";
|
|
722
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").GetPublishedReleaseRequestSchema;
|
|
723
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").PublishedReleaseSchema;
|
|
724
|
+
};
|
|
725
|
+
getLatestPublishedRelease: {
|
|
726
|
+
methodKind: "unary";
|
|
727
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").GetLatestPublishedReleaseRequestSchema;
|
|
728
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").PublishedReleaseSchema;
|
|
729
|
+
};
|
|
730
|
+
listPublishedReleases: {
|
|
731
|
+
methodKind: "unary";
|
|
732
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ListPublishedReleasesRequestSchema;
|
|
733
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ListPublishedReleasesResponseSchema;
|
|
734
|
+
};
|
|
735
|
+
requestTranslation: {
|
|
736
|
+
methodKind: "unary";
|
|
737
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").RequestTranslationRequestSchema;
|
|
738
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").LocaleVariantSchema;
|
|
739
|
+
};
|
|
740
|
+
getLocaleVariant: {
|
|
741
|
+
methodKind: "unary";
|
|
742
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").GetLocaleVariantRequestSchema;
|
|
743
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").LocaleVariantSchema;
|
|
744
|
+
};
|
|
745
|
+
completeTranslation: {
|
|
746
|
+
methodKind: "unary";
|
|
747
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").CompleteTranslationRequestSchema;
|
|
748
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").LocaleVariantSchema;
|
|
749
|
+
};
|
|
750
|
+
publishReleaseBundle: {
|
|
751
|
+
methodKind: "unary";
|
|
752
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").PublishReleaseBundleRequestSchema;
|
|
753
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").PublishReleaseBundleResponseSchema;
|
|
754
|
+
};
|
|
500
755
|
search: {
|
|
501
756
|
methodKind: "unary";
|
|
502
757
|
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").SearchRequestSchema;
|
|
@@ -507,6 +762,36 @@ export declare function createAgentFactoryClients(options: AgentFactoryClientOpt
|
|
|
507
762
|
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ListAuditEventsRequestSchema;
|
|
508
763
|
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ListAuditEventsResponseSchema;
|
|
509
764
|
};
|
|
765
|
+
openCollaboration: {
|
|
766
|
+
methodKind: "unary";
|
|
767
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").CollaborationOpenSchema;
|
|
768
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").CollaborationReadySchema;
|
|
769
|
+
};
|
|
770
|
+
pushCollaboration: {
|
|
771
|
+
methodKind: "unary";
|
|
772
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").CollaborationPushSchema;
|
|
773
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").CollaborationUpdateSchema;
|
|
774
|
+
};
|
|
775
|
+
updateCollaborationPresence: {
|
|
776
|
+
methodKind: "unary";
|
|
777
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").CollaborationPresenceInputSchema;
|
|
778
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").CollaborationPresenceSchema;
|
|
779
|
+
};
|
|
780
|
+
syncCollaboration: {
|
|
781
|
+
methodKind: "unary";
|
|
782
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").CollaborationSyncRequestSchema;
|
|
783
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").CollaborationReadySchema;
|
|
784
|
+
};
|
|
785
|
+
closeCollaboration: {
|
|
786
|
+
methodKind: "unary";
|
|
787
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").CollaborationCloseSchema;
|
|
788
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").CollaborationDisconnectedSchema;
|
|
789
|
+
};
|
|
790
|
+
followCollaboration: {
|
|
791
|
+
methodKind: "server_streaming";
|
|
792
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").CollaborationFollowSchema;
|
|
793
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").CollaborationEventSchema;
|
|
794
|
+
};
|
|
510
795
|
}>>;
|
|
511
796
|
notify: import("@connectrpc/connect").Client<import("@bufbuild/protobuf/codegenv1").GenService<{
|
|
512
797
|
enqueue: {
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAE1E,OAAO,EAAE,eAAe,EAAE,MAAM,+CAA+C,CAAC;AAChF,OAAO,KAAK,UAAU,MAAM,+CAA+C,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,OAAO,KAAK,OAAO,MAAM,yCAAyC,CAAC;AACnE,OAAO,KAAK,MAAM,MAAM,uCAAuC,CAAC;AAChE,OAAO,KAAK,QAAQ,MAAM,2CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6B3E"}
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { createClient } from "@connectrpc/connect";
|
|
2
|
+
export { Code, ConnectError } from "@connectrpc/connect";
|
|
2
3
|
import { createGrpcWebTransport } from "@connectrpc/connect-web";
|
|
3
4
|
import { AgentCapabilityService, AgentCollaborationService, AgentHealthService, AgentInteractionService, AgentMemoryService, AgentProfileService, AgentSessionService, } from "./gen/agentfactory/agent/v1/agent_pb.js";
|
|
4
5
|
import { DocsService } from "./gen/agentfactory/docs/v1/docs_pb.js";
|
|
5
6
|
import { NotifyService } from "./gen/agentfactory/notify/v1/notify_pb.js";
|
|
7
|
+
import { WorkflowService } from "./gen/agentfactory/workflow/v1/workflow_pb.js";
|
|
8
|
+
export * as workflowV1 from "./gen/agentfactory/workflow/v1/workflow_pb.js";
|
|
9
|
+
export { WorkflowService };
|
|
6
10
|
export * as agentV1 from "./gen/agentfactory/agent/v1/agent_pb.js";
|
|
7
11
|
export * as docsV1 from "./gen/agentfactory/docs/v1/docs_pb.js";
|
|
8
12
|
export * as notifyV1 from "./gen/agentfactory/notify/v1/notify_pb.js";
|
|
9
13
|
export { AgentCapabilityService, AgentCollaborationService, AgentHealthService, AgentInteractionService, AgentMemoryService, AgentProfileService, AgentSessionService, DocsService, NotifyService, };
|
|
10
14
|
export * from "./session-model.js";
|
|
11
15
|
export * from "./document-assistant-model.js";
|
|
16
|
+
export * from "./migration.js";
|
|
12
17
|
export function createAgentFactoryClients(options) {
|
|
13
18
|
const transport = createGrpcWebTransport({
|
|
14
19
|
baseUrl: options.baseUrl.replace(/\/$/, ""),
|
|
@@ -34,6 +39,7 @@ export function createAgentFactoryClients(options) {
|
|
|
34
39
|
},
|
|
35
40
|
collaborations: createClient(AgentCollaborationService, transport),
|
|
36
41
|
},
|
|
42
|
+
workflow: createClient(WorkflowService, transport),
|
|
37
43
|
docs: createClient(DocsService, transport),
|
|
38
44
|
notify: createClient(NotifyService, transport),
|
|
39
45
|
};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAoB,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAE1E,OAAO,KAAK,OAAO,MAAM,yCAAyC,CAAC;AACnE,OAAO,KAAK,MAAM,MAAM,uCAAuC,CAAC;AAChE,OAAO,KAAK,QAAQ,MAAM,2CAA2C,CAAC;AACtE,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,WAAW,EACX,aAAa,GACd,CAAC;AACF,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAoB,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACj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AC;IACvB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** Role required by the Factory controlled-import entrypoint. */
|
|
2
|
+
export declare const MIGRATION_ADMIN_ROLE: "factory-migration-admin";
|
|
3
|
+
/** Current normalized import JSON version. */
|
|
4
|
+
export declare const MIGRATION_FORMAT_VERSION: 1;
|
|
5
|
+
/** Maximum records accepted in one import batch. */
|
|
6
|
+
export declare const MAX_MIGRATION_BATCH_RECORDS: 100;
|
|
7
|
+
export type MigrationDomain = "agent" | "workflow" | "docs";
|
|
8
|
+
export type MigrationRecordKind = "agent_profile" | "agent_session" | "agent_message" | "agent_attachment" | "agent_memory" | "agent_collaboration" | "agent_terminal_run" | "workflow_definition" | "workflow_revision" | "workflow_instance" | "workflow_branch_cursor" | "workflow_terminal_run" | "workflow_action_receipt" | "docs_space" | "docs_node" | "docs_revision" | "docs_acl" | "docs_invite" | "docs_trash" | "docs_locale_variant" | "docs_release" | "docs_asset" | "docs_agent_binding";
|
|
9
|
+
/** Wire-compatible JSON record consumed by the Rust migration contract. */
|
|
10
|
+
export interface MigrationRecord {
|
|
11
|
+
source_id: string;
|
|
12
|
+
source_version: typeof MIGRATION_FORMAT_VERSION;
|
|
13
|
+
kind: MigrationRecordKind;
|
|
14
|
+
depends_on?: string[];
|
|
15
|
+
payload: Record<string, unknown>;
|
|
16
|
+
content_sha256: string;
|
|
17
|
+
}
|
|
18
|
+
export interface MigrationBatch {
|
|
19
|
+
migration_id: string;
|
|
20
|
+
format_version: typeof MIGRATION_FORMAT_VERSION;
|
|
21
|
+
batch_index: number;
|
|
22
|
+
final_batch: boolean;
|
|
23
|
+
records: MigrationRecord[];
|
|
24
|
+
expected_digest?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface MigrationCommand {
|
|
27
|
+
batch: MigrationBatch;
|
|
28
|
+
idempotency_key: string;
|
|
29
|
+
dry_run: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface MigrationReceipt {
|
|
32
|
+
migration_id: string;
|
|
33
|
+
batch_index: number;
|
|
34
|
+
next_batch_index: number;
|
|
35
|
+
final_batch: boolean;
|
|
36
|
+
digest: string;
|
|
37
|
+
counts: Partial<Record<MigrationDomain, number>>;
|
|
38
|
+
dry_run: boolean;
|
|
39
|
+
replayed: boolean;
|
|
40
|
+
}
|
|
41
|
+
/** Digest a record payload exactly as Factory's Rust importer does. */
|
|
42
|
+
export declare function migrationPayloadDigest(payload: Record<string, unknown>): Promise<string>;
|
|
43
|
+
/** Digest a batch exactly as Factory's Rust importer does, excluding expected_digest. */
|
|
44
|
+
export declare function migrationBatchDigest(batch: MigrationBatch): Promise<string>;
|
|
45
|
+
//# sourceMappingURL=migration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration.d.ts","sourceRoot":"","sources":["../src/migration.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,eAAO,MAAM,oBAAoB,EAAG,yBAAkC,CAAC;AACvE,8CAA8C;AAC9C,eAAO,MAAM,wBAAwB,EAAG,CAAU,CAAC;AACnD,oDAAoD;AACpD,eAAO,MAAM,2BAA2B,EAAG,GAAY,CAAC;AAExD,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;AAE5D,MAAM,MAAM,mBAAmB,GAC3B,eAAe,GACf,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,cAAc,GACd,qBAAqB,GACrB,oBAAoB,GACpB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,wBAAwB,GACxB,uBAAuB,GACvB,yBAAyB,GACzB,YAAY,GACZ,WAAW,GACX,eAAe,GACf,UAAU,GACV,aAAa,GACb,YAAY,GACZ,qBAAqB,GACrB,cAAc,GACd,YAAY,GACZ,oBAAoB,CAAC;AAEzB,2EAA2E;AAC3E,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,OAAO,wBAAwB,CAAC;IAChD,IAAI,EAAE,mBAAmB,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,OAAO,wBAAwB,CAAC;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,cAAc,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;IACjD,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAiCD,uEAAuE;AACvE,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAE9F;AAED,yFAAyF;AACzF,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAgBjF"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/** Role required by the Factory controlled-import entrypoint. */
|
|
2
|
+
export const MIGRATION_ADMIN_ROLE = "factory-migration-admin";
|
|
3
|
+
/** Current normalized import JSON version. */
|
|
4
|
+
export const MIGRATION_FORMAT_VERSION = 1;
|
|
5
|
+
/** Maximum records accepted in one import batch. */
|
|
6
|
+
export const MAX_MIGRATION_BATCH_RECORDS = 100;
|
|
7
|
+
function canonicalValue(value) {
|
|
8
|
+
if (typeof value === "number" && !Number.isSafeInteger(value)) {
|
|
9
|
+
throw new TypeError("migration JSON numbers must be safe integers");
|
|
10
|
+
}
|
|
11
|
+
if (Array.isArray(value))
|
|
12
|
+
return value.map(canonicalValue);
|
|
13
|
+
if (value !== null && typeof value === "object") {
|
|
14
|
+
return Object.fromEntries(Object.entries(value)
|
|
15
|
+
.sort(([left], [right]) => compareUtf8(left, right))
|
|
16
|
+
.map(([key, item]) => [key, canonicalValue(item)]));
|
|
17
|
+
}
|
|
18
|
+
return value;
|
|
19
|
+
}
|
|
20
|
+
function compareUtf8(left, right) {
|
|
21
|
+
const leftBytes = new TextEncoder().encode(left);
|
|
22
|
+
const rightBytes = new TextEncoder().encode(right);
|
|
23
|
+
const length = Math.min(leftBytes.length, rightBytes.length);
|
|
24
|
+
for (let index = 0; index < length; index += 1) {
|
|
25
|
+
const difference = leftBytes[index] - rightBytes[index];
|
|
26
|
+
if (difference !== 0)
|
|
27
|
+
return difference;
|
|
28
|
+
}
|
|
29
|
+
return leftBytes.length - rightBytes.length;
|
|
30
|
+
}
|
|
31
|
+
async function sha256(value) {
|
|
32
|
+
const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(value));
|
|
33
|
+
return [...new Uint8Array(digest)].map((byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
34
|
+
}
|
|
35
|
+
/** Digest a record payload exactly as Factory's Rust importer does. */
|
|
36
|
+
export async function migrationPayloadDigest(payload) {
|
|
37
|
+
return sha256(JSON.stringify(canonicalValue(payload)));
|
|
38
|
+
}
|
|
39
|
+
/** Digest a batch exactly as Factory's Rust importer does, excluding expected_digest. */
|
|
40
|
+
export async function migrationBatchDigest(batch) {
|
|
41
|
+
const canonical = {
|
|
42
|
+
migration_id: batch.migration_id,
|
|
43
|
+
format_version: batch.format_version,
|
|
44
|
+
batch_index: batch.batch_index,
|
|
45
|
+
final_batch: batch.final_batch,
|
|
46
|
+
records: batch.records.map((record) => ({
|
|
47
|
+
source_id: record.source_id,
|
|
48
|
+
source_version: record.source_version,
|
|
49
|
+
kind: record.kind,
|
|
50
|
+
depends_on: [...(record.depends_on ?? [])].sort(compareUtf8),
|
|
51
|
+
payload: canonicalValue(record.payload),
|
|
52
|
+
content_sha256: record.content_sha256,
|
|
53
|
+
})),
|
|
54
|
+
};
|
|
55
|
+
return `sha256:${await sha256(JSON.stringify(canonical))}`;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=migration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration.js","sourceRoot":"","sources":["../src/migration.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,CAAC,MAAM,oBAAoB,GAAG,yBAAkC,CAAC;AACvE,8CAA8C;AAC9C,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAU,CAAC;AACnD,oDAAoD;AACpD,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAY,CAAC;AAiExD,SAAS,cAAc,CAAC,KAAc;IACpC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9D,MAAM,IAAI,SAAS,CAAC,8CAA8C,CAAC,CAAC;IACtE,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC3D,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAChD,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,KAAgC,CAAC;aAC7C,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK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CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChG,CAAC;AAED,uEAAuE;AACvE,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,OAAgC;IAC3E,OAAO,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACzD,CAAC;AAED,yFAAyF;AACzF,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,KAAqB;IAC9D,MAAM,SAAS,GAAG;QAChB,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YACtC,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,cAAc,EAAE,MAAM,CAAC,cAAc;YACrC,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,UAAU,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;YAC5D,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC;YACvC,cAAc,EAAE,MAAM,CAAC,cAAc;SACtC,CAAC,CAAC;KACJ,CAAC;IACF,OAAO,UAAU,MAAM,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;AAC7D,CAAC"}
|
package/dist/session-model.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type JsonValue } from "@bufbuild/protobuf";
|
|
2
|
-
import { type ContentBlock, type InputReceipt, type Interaction, type Run, type Session, type SessionEvent } from "./gen/agentfactory/agent/v1/agent_pb.js";
|
|
1
|
+
import { type JsonValue, type MessageInitShape } from "@bufbuild/protobuf";
|
|
2
|
+
import { RunOptionsSchema, type RunOptions, type ContentBlock, type InputReceipt, type Interaction, type Run, type Session, type SessionMetadata, type UsageEvent, type ToolEvent, type MeteringCorrectionEvent, type SessionEvent } from "./gen/agentfactory/agent/v1/agent_pb.js";
|
|
3
3
|
export interface AgentSessionTransport {
|
|
4
4
|
getSession(request: {
|
|
5
5
|
sessionId: string;
|
|
@@ -43,6 +43,7 @@ export type AgentDataProjection<Slots extends AgentDataSlots = AgentDataSlots> =
|
|
|
43
43
|
};
|
|
44
44
|
}[keyof Slots & string];
|
|
45
45
|
export type AgentToolProjection = AgentProjectionPosition & {
|
|
46
|
+
preparation?: ToolEvent;
|
|
46
47
|
slot: "tool-card";
|
|
47
48
|
phase: string;
|
|
48
49
|
callId: string;
|
|
@@ -65,6 +66,8 @@ export type AgentTraceProjection = AgentProjectionPosition & {
|
|
|
65
66
|
kind: string;
|
|
66
67
|
status: string;
|
|
67
68
|
detail?: string;
|
|
69
|
+
usage?: UsageEvent;
|
|
70
|
+
correction?: MeteringCorrectionEvent;
|
|
68
71
|
category: "lifecycle" | "model" | "usage" | "context" | "compaction" | "extension";
|
|
69
72
|
};
|
|
70
73
|
export type AgentProjectionItem<Slots extends AgentDataSlots = AgentDataSlots> = (AgentProjectionPosition & {
|
|
@@ -81,16 +84,19 @@ export type AgentProjectionItem<Slots extends AgentDataSlots = AgentDataSlots> =
|
|
|
81
84
|
excerpt?: string;
|
|
82
85
|
}) | AgentDataProjection<Slots> | AgentTraceProjection;
|
|
83
86
|
export interface AgentSessionProjection<Slots extends AgentDataSlots = AgentDataSlots> {
|
|
87
|
+
metadata?: SessionMetadata;
|
|
84
88
|
lastSeq: bigint;
|
|
85
89
|
items: AgentProjectionItem<Slots>[];
|
|
86
90
|
text: string;
|
|
87
91
|
}
|
|
88
92
|
export type AgentRunStatus = "queued" | "running" | "waiting_for_input" | "completed" | "failed" | "cancelled" | "max_steps_reached";
|
|
93
|
+
export type AgentRunOptions = MessageInitShape<typeof RunOptionsSchema>;
|
|
89
94
|
export type AgentSubmitDraft = {
|
|
90
95
|
text: string;
|
|
91
96
|
content?: ContentBlock[];
|
|
92
97
|
explicitSkillSlug: string;
|
|
93
98
|
idempotencyKey: string;
|
|
99
|
+
runOptions?: RunOptions;
|
|
94
100
|
};
|
|
95
101
|
export type AgentSessionState<Slots extends AgentDataSlots = AgentDataSlots> = {
|
|
96
102
|
status: "idle" | "submitting" | AgentRunStatus | "disconnected";
|
|
@@ -116,8 +122,8 @@ export declare class AgentSessionModel<Slots extends AgentDataSlots = AgentDataS
|
|
|
116
122
|
constructor(transport: AgentSessionTransport, sessionId: string, reconnect?: AgentReconnectPolicy);
|
|
117
123
|
getSnapshot: () => AgentSessionState<Slots>;
|
|
118
124
|
subscribe: (listener: () => void) => () => boolean;
|
|
119
|
-
submitText(text: string, explicitSkillSlug?: string): Promise<Run>;
|
|
120
|
-
submitContent(content: readonly ContentBlock[], explicitSkillSlug?: string): Promise<Run>;
|
|
125
|
+
submitText(text: string, explicitSkillSlug?: string, runOptions?: AgentRunOptions): Promise<Run>;
|
|
126
|
+
submitContent(content: readonly ContentBlock[], explicitSkillSlug?: string, runOptions?: AgentRunOptions): Promise<Run>;
|
|
121
127
|
retry(): Promise<Run>;
|
|
122
128
|
steerText(text: string): Promise<InputReceipt>;
|
|
123
129
|
injectText(text: string): Promise<InputReceipt>;
|
|
@@ -127,8 +133,9 @@ export declare class AgentSessionModel<Slots extends AgentDataSlots = AgentDataS
|
|
|
127
133
|
resume(): Promise<Run>;
|
|
128
134
|
cancel(): Promise<void>;
|
|
129
135
|
}
|
|
130
|
-
declare function submitRequest(sessionId: string, content: ContentBlock[], deliveryMode: "followup" | "steer" | "inject", explicitSkillSlug: string, idempotencyKey: string): import("./gen/agentfactory/agent/v1/agent_pb.js").SubmitInputRequest;
|
|
136
|
+
declare function submitRequest(sessionId: string, content: ContentBlock[], deliveryMode: "followup" | "steer" | "inject", explicitSkillSlug: string, idempotencyKey: string, runOptions?: RunOptions): import("./gen/agentfactory/agent/v1/agent_pb.js").SubmitInputRequest;
|
|
131
137
|
declare function interactionRequest(interactionId: string, resolution: "confirmed" | "rejected" | "answered", payload?: JsonValue): import("./gen/agentfactory/agent/v1/agent_pb.js").ResolveInteractionRequest;
|
|
132
138
|
export declare function project<Slots extends AgentDataSlots = AgentDataSlots>(events: readonly SessionEvent[]): AgentSessionProjection<Slots>;
|
|
139
|
+
export declare function isRetryableRpcError(error: unknown): boolean;
|
|
133
140
|
export {};
|
|
134
141
|
//# sourceMappingURL=session-model.d.ts.map
|