@sixb/server 0.1.3 → 0.1.5

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.
Files changed (52) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +1127 -937
  3. package/dist/index.js.map +17 -15
  4. package/dist/openapi/tags.d.ts +6 -2
  5. package/dist/openapi/tags.d.ts.map +1 -1
  6. package/dist/registerRoutes.d.ts.map +1 -1
  7. package/dist/routes/actions.d.ts +2 -1
  8. package/dist/routes/actions.d.ts.map +1 -1
  9. package/dist/routes/agents.d.ts +15 -0
  10. package/dist/routes/agents.d.ts.map +1 -1
  11. package/dist/routes/links.d.ts +0 -51
  12. package/dist/routes/links.d.ts.map +1 -1
  13. package/dist/routes/logs.d.ts +1 -1
  14. package/dist/routes/models.d.ts +60 -0
  15. package/dist/routes/models.d.ts.map +1 -0
  16. package/dist/routes/objects.d.ts +48 -0
  17. package/dist/routes/objects.d.ts.map +1 -1
  18. package/dist/routes/projections.d.ts +88 -86
  19. package/dist/routes/projections.d.ts.map +1 -1
  20. package/dist/routes/syncs.d.ts +32 -32
  21. package/dist/schemas/actions.d.ts +92 -0
  22. package/dist/schemas/actions.d.ts.map +1 -1
  23. package/dist/schemas/agents.d.ts +127 -0
  24. package/dist/schemas/agents.d.ts.map +1 -1
  25. package/dist/schemas/ai-accounting.d.ts +26 -26
  26. package/dist/schemas/connectors.d.ts +11 -1
  27. package/dist/schemas/connectors.d.ts.map +1 -1
  28. package/dist/schemas/links.d.ts +0 -41
  29. package/dist/schemas/links.d.ts.map +1 -1
  30. package/dist/schemas/logs.d.ts +4 -4
  31. package/dist/schemas/models.d.ts +50 -0
  32. package/dist/schemas/models.d.ts.map +1 -0
  33. package/dist/schemas/objects.d.ts +22 -0
  34. package/dist/schemas/objects.d.ts.map +1 -1
  35. package/dist/schemas/projections.d.ts +542 -513
  36. package/dist/schemas/projections.d.ts.map +1 -1
  37. package/dist/schemas/syncs.d.ts +23 -23
  38. package/package.json +4 -4
  39. package/src/openapi/tags.ts +4 -0
  40. package/src/registerRoutes.ts +2 -0
  41. package/src/routes/actions.ts +18 -3
  42. package/src/routes/agents.ts +21 -3
  43. package/src/routes/links.ts +2 -53
  44. package/src/routes/models.ts +31 -0
  45. package/src/routes/objects.ts +103 -0
  46. package/src/schemas/actions.ts +5 -0
  47. package/src/schemas/agents.ts +15 -0
  48. package/src/schemas/connectors.ts +13 -3
  49. package/src/schemas/links.ts +0 -17
  50. package/src/schemas/models.ts +15 -0
  51. package/src/schemas/objects.ts +104 -0
  52. package/src/schemas/projections.ts +6 -3
@@ -1 +1 @@
1
- {"version":3,"file":"projections.d.ts","sourceRoot":"","sources":["../../src/schemas/projections.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,eAAO,MAAM,oBAAoB,4CAA0C,CAAA;AAC3E,eAAO,MAAM,yBAAyB,sEAMpC,CAAA;AAyDF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAI9B,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;EAKrC,CAAA;A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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI1C,CAAA"}
@@ -284,6 +284,22 @@ export declare const SyncSchema: z.ZodObject<{
284
284
  }, "strip", z.ZodTypeAny, {
285
285
  id: string;
286
286
  mode: "append" | "snapshot" | "merge";
287
+ target: {
288
+ kind: "dataset";
289
+ dataset: {
290
+ id: string;
291
+ schema: {
292
+ columns: {
293
+ name: string;
294
+ type: "string" | "boolean" | "json" | "date" | "int64" | "decimal" | "timestamp" | "fileRef" | "float64";
295
+ nullable?: boolean | undefined;
296
+ }[];
297
+ };
298
+ description?: string | undefined;
299
+ primaryKey?: string | string[] | undefined;
300
+ partitionBy?: string[] | undefined;
301
+ };
302
+ };
287
303
  triggers: {
288
304
  type: "schedule";
289
305
  scheduleId: string;
@@ -307,6 +323,13 @@ export declare const SyncSchema: z.ZodObject<{
307
323
  commitMessage?: string | undefined;
308
324
  rowsRead?: number | undefined;
309
325
  } | null;
326
+ connector: {
327
+ id: string;
328
+ type: string;
329
+ };
330
+ }, {
331
+ id: string;
332
+ mode: "append" | "snapshot" | "merge";
310
333
  target: {
311
334
  kind: "dataset";
312
335
  dataset: {
@@ -323,13 +346,6 @@ export declare const SyncSchema: z.ZodObject<{
323
346
  partitionBy?: string[] | undefined;
324
347
  };
325
348
  };
326
- connector: {
327
- id: string;
328
- type: string;
329
- };
330
- }, {
331
- id: string;
332
- mode: "append" | "snapshot" | "merge";
333
349
  triggers: {
334
350
  type: "schedule";
335
351
  scheduleId: string;
@@ -353,22 +369,6 @@ export declare const SyncSchema: z.ZodObject<{
353
369
  commitMessage?: string | undefined;
354
370
  rowsRead?: number | undefined;
355
371
  } | null;
356
- target: {
357
- kind: "dataset";
358
- dataset: {
359
- id: string;
360
- schema: {
361
- columns: {
362
- name: string;
363
- type: "string" | "boolean" | "json" | "date" | "int64" | "decimal" | "timestamp" | "fileRef" | "float64";
364
- nullable?: boolean | undefined;
365
- }[];
366
- };
367
- description?: string | undefined;
368
- primaryKey?: string | string[] | undefined;
369
- partitionBy?: string[] | undefined;
370
- };
371
- };
372
372
  connector: {
373
373
  id: string;
374
374
  type: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sixb/server",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "HTTP and WebSocket API server for Sixb",
5
5
  "keywords": [
6
6
  "sixb",
@@ -37,13 +37,13 @@
37
37
  "zod-to-json-schema": "^3.24.0"
38
38
  },
39
39
  "peerDependencies": {
40
- "@sixb/core": "0.1.3"
40
+ "@sixb/core": "0.1.4"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@sixb/auth-magic-link": "0.1.2",
44
44
  "@sixb/auth-oidc": "0.1.1",
45
- "@sixb/core": "0.1.3",
46
- "@sixb/sqlite": "0.1.3",
45
+ "@sixb/core": "0.1.4",
46
+ "@sixb/sqlite": "0.1.4",
47
47
  "@types/bun": "latest",
48
48
  "typescript": "^5.7.0"
49
49
  },
@@ -107,6 +107,10 @@ export const OPENAPI_TAGS = {
107
107
  name: "Agents",
108
108
  description: "Agent catalog",
109
109
  },
110
+ models: {
111
+ name: "Models",
112
+ description: "Project model catalog",
113
+ },
110
114
  agentThreads: {
111
115
  name: "Agent Threads",
112
116
  description: "Agent conversation threads and messages",
@@ -16,6 +16,7 @@ import { registerEventRoutes } from "./routes/events"
16
16
  import { registerFileRoutes } from "./routes/files"
17
17
  import { registerLinkRoutes } from "./routes/links"
18
18
  import { registerLogRoutes } from "./routes/logs"
19
+ import { registerModelRoutes } from "./routes/models"
19
20
  import { registerObjectRoutes } from "./routes/objects"
20
21
  import { registerOntologyRoutes } from "./routes/ontology"
21
22
  import { registerPipelineRoutes } from "./routes/pipelines"
@@ -51,6 +52,7 @@ export function registerHttpRoutes(app: Elysia, host: SixbHostView, options: Htt
51
52
  registerFileRoutes(app, host)
52
53
  registerActionRunRoutes(app, host)
53
54
  registerAgentRoutes(app, host)
55
+ registerModelRoutes(app, host)
54
56
  registerLinkRoutes(app, host)
55
57
  registerTelemetryRoutes(app, host)
56
58
  registerEventRoutes(app, host)
@@ -1,10 +1,12 @@
1
1
  import type { ActionDefinition, SixbHostView } from "@sixb/core"
2
+ import { schemaFieldsToJsonSchema } from "@sixb/core/internal/ontology"
2
3
  import type { Elysia } from "elysia"
3
4
  import { bearerSecurityRequirement } from "../auth/access-token-boundary"
4
5
  import { requireRequestSixb } from "../auth/scope"
5
6
  import { OPENAPI_TAGS } from "../openapi/tags"
6
7
  import {
7
8
  ActionCatalogItemSchema,
9
+ ActionDetailSchema,
8
10
  ActionIdParamsSchema,
9
11
  RequestActionBodySchema,
10
12
  RequestActionResponseSchema,
@@ -38,7 +40,20 @@ function serializeAction(
38
40
  })
39
41
  }
40
42
 
41
- export function registerActionRoutes(app: Elysia, _host: SixbHostView) {
43
+ function serializeActionDetail(
44
+ action: ActionDefinition,
45
+ host: SixbHostView
46
+ ): ReturnType<typeof ActionDetailSchema.parse> {
47
+ return ActionDetailSchema.parse({
48
+ ...serializeAction(action),
49
+ inputSchema: schemaFieldsToJsonSchema({
50
+ fields: action.params,
51
+ valueTypesById: host.definitions.ontology.getValueTypesById(),
52
+ }),
53
+ })
54
+ }
55
+
56
+ export function registerActionRoutes(app: Elysia, host: SixbHostView) {
42
57
  return app
43
58
  .get(
44
59
  "/api/actions",
@@ -66,11 +81,11 @@ export function registerActionRoutes(app: Elysia, _host: SixbHostView) {
66
81
  return { error: "Action not found" }
67
82
  }
68
83
 
69
- return serializeAction(action)
84
+ return serializeActionDetail(action, host)
70
85
  },
71
86
  {
72
87
  params: ActionIdParamsSchema,
73
- response: { 200: ActionCatalogItemSchema, 404: ErrorResponseSchema },
88
+ response: { 200: ActionDetailSchema, 404: ErrorResponseSchema },
74
89
  detail: {
75
90
  summary: "Get action metadata",
76
91
  tags: [OPENAPI_TAGS.actions.name],
@@ -8,6 +8,7 @@ import {
8
8
  import { agentRunStreamId } from "@sixb/core/agents/streams"
9
9
  import { publishAgentRunCancel, publishAgentRunFinished } from "@sixb/core/internal/agents"
10
10
  import {
11
+ type AgentContextCheckpointRecord,
11
12
  type AgentMessageRecord,
12
13
  type AgentRunDiagnostic,
13
14
  type AgentRunRecord,
@@ -96,7 +97,8 @@ function serializeThread(thread: AgentThreadRecord): ReturnType<typeof AgentThre
96
97
 
97
98
  function serializeMessage(
98
99
  message: AgentMessageRecord,
99
- annotations: readonly AgentRunDiagnostic[] = []
100
+ annotations: readonly AgentRunDiagnostic[] = [],
101
+ checkpoint?: AgentContextCheckpointRecord
100
102
  ): ReturnType<typeof AgentMessageSchema.parse> {
101
103
  return AgentMessageSchema.parse({
102
104
  id: message.id,
@@ -108,6 +110,13 @@ function serializeMessage(
108
110
  seq: message.seq,
109
111
  parts: message.parts,
110
112
  annotations,
113
+ compaction: checkpoint
114
+ ? {
115
+ checkpointId: checkpoint.id,
116
+ summary: checkpoint.summary,
117
+ createdAt: toIsoString(checkpoint.createdAt),
118
+ }
119
+ : undefined,
111
120
  metadata: message.metadata,
112
121
  contentVersion: message.contentVersion,
113
122
  createdAt: toIsoString(message.createdAt),
@@ -473,18 +482,27 @@ export function registerAgentRoutes(app: Elysia, host: SixbHostView) {
473
482
  const runIds = result.messages.flatMap((message) =>
474
483
  message.runId === null ? [] : [message.runId]
475
484
  )
476
- const runs = await storage.runs.getByIds({ projectId: host.id, ids: runIds })
485
+ const [runs, checkpoints] = await Promise.all([
486
+ storage.runs.getByIds({ projectId: host.id, ids: runIds }),
487
+ storage.checkpoints.getByRunIds({ projectId: host.id, runIds }),
488
+ ])
477
489
  const diagnosticsByRunId = new Map(
478
490
  runs
479
491
  .filter((run) => run.threadId === thread.id)
480
492
  .map((run) => [run.id, run.diagnostics ?? []] as const)
481
493
  )
494
+ const checkpointsByRunId = new Map(
495
+ checkpoints
496
+ .filter((checkpoint) => checkpoint.threadId === thread.id)
497
+ .map((checkpoint) => [checkpoint.createdByRunId, checkpoint] as const)
498
+ )
482
499
 
483
500
  return AgentMessageListResponseSchema.parse({
484
501
  messages: result.messages.map((message) =>
485
502
  serializeMessage(
486
503
  message,
487
- message.runId === null ? [] : (diagnosticsByRunId.get(message.runId) ?? [])
504
+ message.runId === null ? [] : (diagnosticsByRunId.get(message.runId) ?? []),
505
+ message.runId === null ? undefined : checkpointsByRunId.get(message.runId)
488
506
  )
489
507
  ),
490
508
  hasMore: result.hasMore,
@@ -4,62 +4,11 @@ import { bearerSecurityRequirement } from "../auth/access-token-boundary"
4
4
  import { requireRequestSixb } from "../auth/scope"
5
5
  import { OPENAPI_TAGS } from "../openapi/tags"
6
6
  import { ErrorResponseSchema, SuccessResponseSchema } from "../schemas/common"
7
- import {
8
- LinkParamsSchema,
9
- LinkQuerySchema,
10
- LinkSourceParamsSchema,
11
- ObjectLinkSchema,
12
- RemoveLinkQuerySchema,
13
- UpsertLinkBodySchema,
14
- } from "../schemas/links"
15
- import { handleRouteError, toIsoString } from "../utils/http"
7
+ import { LinkParamsSchema, RemoveLinkQuerySchema, UpsertLinkBodySchema } from "../schemas/links"
8
+ import { handleRouteError } from "../utils/http"
16
9
 
17
10
  export function registerLinkRoutes(app: Elysia, _host: SixbHostView) {
18
11
  return app
19
- .get(
20
- "/api/objects/:objectTypeId/:objectId/links",
21
- async (context) => {
22
- const { params, query, set } = context
23
- try {
24
- const sixb = requireRequestSixb(context)
25
- if (!sixb.objects.getTypeById(params.objectTypeId)) {
26
- set.status = 404
27
- return { error: "Object not found" }
28
- }
29
- const parsedQuery = LinkQuerySchema.parse(query)
30
- const links = await sixb.objects.listLinks({
31
- objectTypeId: params.objectTypeId,
32
- objectId: params.objectId,
33
- linkId: parsedQuery.linkId,
34
- direction: parsedQuery.direction,
35
- })
36
-
37
- return links.map((link) => ({
38
- ...link,
39
- createdAt: toIsoString(link.createdAt),
40
- updatedAt: toIsoString(link.updatedAt),
41
- }))
42
- } catch (error) {
43
- set.status = 400
44
- return { error: error instanceof Error ? error.message : String(error) }
45
- }
46
- },
47
- {
48
- params: LinkSourceParamsSchema,
49
- query: LinkQuerySchema,
50
- response: {
51
- 200: ObjectLinkSchema.array(),
52
- 400: ErrorResponseSchema,
53
- 404: ErrorResponseSchema,
54
- },
55
- detail: {
56
- summary: "List object links",
57
- tags: [OPENAPI_TAGS.links.name],
58
- operationId: "listObjectLinks",
59
- security: bearerSecurityRequirement("listObjectLinks"),
60
- },
61
- }
62
- )
63
12
  .put(
64
13
  "/api/objects/:objectTypeId/:objectId/links/:linkId",
65
14
  async (context) => {
@@ -0,0 +1,31 @@
1
+ import type { LanguageModelEntry, SixbHostView } from "@sixb/core"
2
+ import type { Elysia } from "elysia"
3
+ import { OPENAPI_TAGS } from "../openapi/tags"
4
+ import { ModelCatalogSchema } from "../schemas/models"
5
+
6
+ function serializeLanguageModel(entry: LanguageModelEntry, defaultRef: string) {
7
+ return { provider: entry.provider, modelId: entry.modelId, isDefault: entry.ref === defaultRef }
8
+ }
9
+
10
+ export function registerModelRoutes(app: Elysia, host: SixbHostView) {
11
+ return app.get(
12
+ "/api/models",
13
+ () => {
14
+ const language = host.definitions.models?.language
15
+ return ModelCatalogSchema.parse({
16
+ language:
17
+ language === undefined
18
+ ? []
19
+ : language.list().map((entry) => serializeLanguageModel(entry, language.default.ref)),
20
+ })
21
+ },
22
+ {
23
+ response: { 200: ModelCatalogSchema },
24
+ detail: {
25
+ summary: "List the project model catalog",
26
+ tags: [OPENAPI_TAGS.models.name],
27
+ operationId: "listModels",
28
+ },
29
+ }
30
+ )
31
+ }
@@ -31,6 +31,7 @@ import {
31
31
  ObjectQueryCountRequestSchema,
32
32
  ObjectQueryExistsRequestSchema,
33
33
  ObjectQueryFacetsRequestSchema,
34
+ ObjectQueryLinksRequestSchema,
34
35
  ObjectQueryRequestSchema,
35
36
  ObjectSearchQuerySchema,
36
37
  ObjectSearchResponseSchema,
@@ -63,6 +64,32 @@ function serializeObject(row: {
63
64
  }
64
65
  }
65
66
 
67
+ function serializeObjectLink(link: {
68
+ sourceTypeId: string
69
+ sourceId: string
70
+ linkId: string
71
+ targetTypeId: string
72
+ targetId: string
73
+ properties?: Record<string, unknown>
74
+ createdAt: Date
75
+ updatedAt: Date
76
+ }) {
77
+ return {
78
+ source: {
79
+ objectTypeId: link.sourceTypeId,
80
+ primaryId: link.sourceId,
81
+ },
82
+ linkId: link.linkId,
83
+ target: {
84
+ objectTypeId: link.targetTypeId,
85
+ primaryId: link.targetId,
86
+ },
87
+ ...(link.properties === undefined ? {} : { properties: link.properties }),
88
+ createdAt: toIsoString(link.createdAt),
89
+ updatedAt: toIsoString(link.updatedAt),
90
+ }
91
+ }
92
+
66
93
  type SerializedObject = ReturnType<typeof serializeObject>
67
94
  type SerializedLinkValue = SerializedExpandedObject | SerializedExpandedObject[] | null
68
95
  type SerializedExpandedObject = SerializedObject & {
@@ -445,6 +472,82 @@ export function registerObjectRoutes(app: Elysia, host: SixbHostView) {
445
472
  },
446
473
  }
447
474
  )
475
+ .post(
476
+ "/api/objects/query/links",
477
+ async (context) => {
478
+ const { body, set } = context
479
+ try {
480
+ const parsed = ObjectQueryLinksRequestSchema.parse(body) as {
481
+ query: ObjectQuery
482
+ direction: "outgoing" | "incoming" | "both"
483
+ linkId?: string
484
+ includeObjects: boolean
485
+ pageSize: number
486
+ pageToken?: string
487
+ }
488
+ const result = await requireRequestSixb(context).objects.queryLinks(parsed)
489
+
490
+ return {
491
+ objects: result.objects.map(serializeObject),
492
+ links: result.links.map(serializeObjectLink),
493
+ hasMore: result.hasMore,
494
+ ...(result.nextPageToken === undefined ? {} : { nextPageToken: result.nextPageToken }),
495
+ }
496
+ } catch (error) {
497
+ return handleObjectQueryError(error, set)
498
+ }
499
+ },
500
+ {
501
+ detail: {
502
+ summary: "Query object links",
503
+ tags: [OPENAPI_TAGS.links.name],
504
+ operationId: "queryObjectLinks",
505
+ security: bearerSecurityRequirement("queryObjectLinks"),
506
+ requestBody: {
507
+ required: true,
508
+ content: {
509
+ "application/json": {
510
+ schema: { $ref: "#/components/schemas/ObjectQueryLinksRequest" },
511
+ },
512
+ },
513
+ },
514
+ responses: {
515
+ 200: {
516
+ description: "Response for status 200",
517
+ content: {
518
+ "application/json": {
519
+ schema: { $ref: "#/components/schemas/ObjectQueryLinksResponse" },
520
+ },
521
+ },
522
+ },
523
+ 400: {
524
+ description: "Response for status 400",
525
+ content: {
526
+ "application/json": {
527
+ schema: { $ref: "#/components/schemas/ObjectQueryErrorResponse" },
528
+ },
529
+ },
530
+ },
531
+ 403: {
532
+ description: "Response for status 403",
533
+ content: {
534
+ "application/json": {
535
+ schema: { $ref: "#/components/schemas/ErrorResponse" },
536
+ },
537
+ },
538
+ },
539
+ 500: {
540
+ description: "Response for status 500",
541
+ content: {
542
+ "application/json": {
543
+ schema: { $ref: "#/components/schemas/ErrorResponse" },
544
+ },
545
+ },
546
+ },
547
+ },
548
+ },
549
+ }
550
+ )
448
551
  .post(
449
552
  "/api/objects/query/count",
450
553
  async (context) => {
@@ -53,6 +53,11 @@ export const ActionCatalogItemSchema = z.object({
53
53
  }),
54
54
  })
55
55
 
56
+ export const ActionDetailSchema = ActionCatalogItemSchema.extend({
57
+ /** Strict JSON Schema for the params object accepted by an Action request. */
58
+ inputSchema: z.record(z.unknown()),
59
+ })
60
+
56
61
  export const ActionRunStatusSchema = z.enum([
57
62
  "queued",
58
63
  "running",
@@ -79,6 +79,13 @@ export const AgentLoopConfigSchema = z.object({
79
79
  maxSteps: z.number().int().positive().optional(),
80
80
  })
81
81
  .optional(),
82
+ context: z
83
+ .object({
84
+ windowTokens: z.number().int().positive().optional(),
85
+ reserveTokens: z.number().int().positive().optional(),
86
+ keepRecentTokens: z.number().int().positive().optional(),
87
+ })
88
+ .optional(),
82
89
  })
83
90
 
84
91
  export const AgentReasoningLevelSchema = z.enum(AGENT_REASONING_LEVELS)
@@ -195,6 +202,12 @@ export const AgentRunDiagnosticSchema = z.object({
195
202
  message: z.string(),
196
203
  })
197
204
 
205
+ export const AgentMessageCompactionSchema = z.object({
206
+ checkpointId: z.string(),
207
+ summary: z.string(),
208
+ createdAt: z.string(),
209
+ })
210
+
198
211
  export const AgentMessageSchema = z.object({
199
212
  id: z.string(),
200
213
  projectId: z.string(),
@@ -206,6 +219,8 @@ export const AgentMessageSchema = z.object({
206
219
  parts: z.array(AgentMessagePartSchema),
207
220
  /** Platform-authored annotations associated with this message's run. */
208
221
  annotations: z.array(AgentRunDiagnosticSchema),
222
+ /** A durable context summary created before this response's model call. */
223
+ compaction: AgentMessageCompactionSchema.optional(),
209
224
  metadata: JsonValueSchema.optional(),
210
225
  contentVersion: z.number(),
211
226
  createdAt: z.string(),
@@ -168,9 +168,19 @@ export const ConnectorOAuthCallbackQuerySchema = z
168
168
  auth_code: z.string().min(1).optional(),
169
169
  error: z.string().min(1).optional(),
170
170
  })
171
- .refine((query) => [query.code, query.auth_code, query.error].filter(Boolean).length === 1, {
172
- message: "OAuth callback must contain exactly one of code, auth_code, or error.",
173
- })
171
+ .refine(
172
+ (query) => {
173
+ const hasAuthorizationCode = query.code !== undefined || query.auth_code !== undefined
174
+ const hasProviderError = query.error !== undefined
175
+ return hasAuthorizationCode !== hasProviderError
176
+ },
177
+ { message: "OAuth callback must contain exactly one of an authorization code or error." }
178
+ )
179
+ .refine(
180
+ (query) =>
181
+ query.code === undefined || query.auth_code === undefined || query.code === query.auth_code,
182
+ { message: "OAuth callback code and auth_code must match when both are present." }
183
+ )
174
184
  .transform(({ auth_code, ...query }) => ({ ...query, code: query.code ?? auth_code }))
175
185
 
176
186
  function connectorRouteErrorResponseSchema<
@@ -9,11 +9,6 @@ export const LinkParamsSchema = LinkSourceParamsSchema.extend({
9
9
  linkId: z.string().min(1),
10
10
  })
11
11
 
12
- export const LinkQuerySchema = z.object({
13
- linkId: z.string().optional(),
14
- direction: z.enum(["outgoing", "incoming", "both"]).default("outgoing"),
15
- })
16
-
17
12
  export const RemoveLinkQuerySchema = z.object({
18
13
  targetTypeId: z.string().min(1),
19
14
  targetId: z.string().min(1),
@@ -24,15 +19,3 @@ export const UpsertLinkBodySchema = z.object({
24
19
  targetId: z.string().min(1),
25
20
  properties: z.record(z.unknown()).optional(),
26
21
  })
27
-
28
- export const ObjectLinkSchema = z.object({
29
- projectId: z.string(),
30
- sourceTypeId: z.string(),
31
- sourceId: z.string(),
32
- linkId: z.string(),
33
- targetTypeId: z.string(),
34
- targetId: z.string(),
35
- properties: z.record(z.unknown()).optional(),
36
- createdAt: z.string(),
37
- updatedAt: z.string(),
38
- })
@@ -0,0 +1,15 @@
1
+ import { z } from "zod"
2
+
3
+ export const LanguageModelSchema = z.object({
4
+ /**
5
+ * The AI SDK binding and model id the project configured. Together they identify the entry;
6
+ * the runtime's internal reference is not part of this contract.
7
+ */
8
+ provider: z.string(),
9
+ modelId: z.string(),
10
+ isDefault: z.boolean(),
11
+ })
12
+
13
+ export const ModelCatalogSchema = z.object({
14
+ language: z.array(LanguageModelSchema),
15
+ })