@vm0/cli 9.206.0 → 9.206.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.
@@ -80408,7 +80408,7 @@ if (DSN) {
80408
80408
  init2({
80409
80409
  dsn: DSN,
80410
80410
  environment: process.env.SENTRY_ENVIRONMENT ?? "production",
80411
- release: "9.206.0",
80411
+ release: "9.206.1",
80412
80412
  sendDefaultPii: false,
80413
80413
  tracesSampleRate: 0,
80414
80414
  shutdownTimeout: 500,
@@ -80427,7 +80427,7 @@ if (DSN) {
80427
80427
  }
80428
80428
  });
80429
80429
  setContext("cli", {
80430
- version: "9.206.0",
80430
+ version: "9.206.1",
80431
80431
  command: process.argv.slice(2).join(" ")
80432
80432
  });
80433
80433
  setContext("runtime", {
@@ -91342,8 +91342,172 @@ var runsQueueContract = c16.router({
91342
91342
  }
91343
91343
  });
91344
91344
 
91345
- // ../../packages/api-contracts/src/contracts/chat-threads.ts
91345
+ // ../../packages/api-contracts/src/contracts/zero-goals.ts
91346
+ init_esm_shims();
91346
91347
  var c17 = initContract();
91348
+ var zeroGoalStatusSchema = external_exports.enum([
91349
+ "active",
91350
+ "paused",
91351
+ "blocked",
91352
+ "complete"
91353
+ ]);
91354
+ var zeroGoalEventSchema = external_exports.union([
91355
+ external_exports.object({
91356
+ type: external_exports.literal("state"),
91357
+ status: external_exports.literal("active"),
91358
+ objectiveBrief: external_exports.string().min(1)
91359
+ }),
91360
+ external_exports.object({
91361
+ type: external_exports.literal("state"),
91362
+ status: external_exports.enum(["paused", "blocked", "complete"])
91363
+ }),
91364
+ external_exports.object({ type: external_exports.literal("cleared") })
91365
+ ]);
91366
+ var zeroGoalCreateRequestSchema = external_exports.object({
91367
+ objective: external_exports.string().min(1).max(2e4)
91368
+ });
91369
+ var zeroGoalEditRequestSchema = external_exports.object({
91370
+ objective: external_exports.string().min(1).max(2e4)
91371
+ });
91372
+ var zeroGoalResponseSchema = external_exports.object({
91373
+ objective: external_exports.string(),
91374
+ objectiveBrief: external_exports.string(),
91375
+ status: zeroGoalStatusSchema
91376
+ });
91377
+ var chatThreadGoalParamsSchema = external_exports.object({
91378
+ threadId: external_exports.string().min(1)
91379
+ });
91380
+ var zeroGoalsContract = c17.router({
91381
+ create: {
91382
+ method: "POST",
91383
+ path: "/api/zero/goal",
91384
+ headers: authHeadersSchema,
91385
+ body: zeroGoalCreateRequestSchema,
91386
+ responses: {
91387
+ 201: zeroGoalResponseSchema,
91388
+ 400: apiErrorSchema,
91389
+ 401: apiErrorSchema,
91390
+ 403: apiErrorSchema,
91391
+ 409: apiErrorSchema
91392
+ },
91393
+ summary: "Create a persistent goal for the current thread"
91394
+ },
91395
+ edit: {
91396
+ method: "PATCH",
91397
+ path: "/api/zero/goal",
91398
+ headers: authHeadersSchema,
91399
+ body: zeroGoalEditRequestSchema,
91400
+ responses: {
91401
+ 200: zeroGoalResponseSchema,
91402
+ 400: apiErrorSchema,
91403
+ 401: apiErrorSchema,
91404
+ 403: apiErrorSchema,
91405
+ 404: apiErrorSchema,
91406
+ 409: apiErrorSchema
91407
+ },
91408
+ summary: "Edit the current thread goal objective"
91409
+ },
91410
+ get: {
91411
+ method: "GET",
91412
+ path: "/api/zero/goal",
91413
+ headers: authHeadersSchema,
91414
+ responses: {
91415
+ 200: zeroGoalResponseSchema,
91416
+ 401: apiErrorSchema,
91417
+ 403: apiErrorSchema,
91418
+ 404: apiErrorSchema,
91419
+ 409: apiErrorSchema
91420
+ },
91421
+ summary: "Get the current thread goal"
91422
+ },
91423
+ complete: {
91424
+ method: "POST",
91425
+ path: "/api/zero/goal/complete",
91426
+ headers: authHeadersSchema,
91427
+ body: c17.noBody(),
91428
+ responses: {
91429
+ 200: zeroGoalResponseSchema,
91430
+ 401: apiErrorSchema,
91431
+ 403: apiErrorSchema,
91432
+ 404: apiErrorSchema,
91433
+ 409: apiErrorSchema
91434
+ },
91435
+ summary: "Mark the current thread goal complete"
91436
+ },
91437
+ block: {
91438
+ method: "POST",
91439
+ path: "/api/zero/goal/block",
91440
+ headers: authHeadersSchema,
91441
+ body: c17.noBody(),
91442
+ responses: {
91443
+ 200: zeroGoalResponseSchema,
91444
+ 401: apiErrorSchema,
91445
+ 403: apiErrorSchema,
91446
+ 404: apiErrorSchema,
91447
+ 409: apiErrorSchema
91448
+ },
91449
+ summary: "Mark the current thread goal blocked"
91450
+ },
91451
+ pause: {
91452
+ method: "POST",
91453
+ path: "/api/zero/goal/pause",
91454
+ headers: authHeadersSchema,
91455
+ body: c17.noBody(),
91456
+ responses: {
91457
+ 200: zeroGoalResponseSchema,
91458
+ 401: apiErrorSchema,
91459
+ 403: apiErrorSchema,
91460
+ 404: apiErrorSchema,
91461
+ 409: apiErrorSchema
91462
+ },
91463
+ summary: "Pause the current thread goal"
91464
+ },
91465
+ pauseForChatThread: {
91466
+ method: "POST",
91467
+ path: "/api/zero/chat-threads/:threadId/goal/pause",
91468
+ headers: authHeadersSchema,
91469
+ pathParams: chatThreadGoalParamsSchema,
91470
+ body: c17.noBody(),
91471
+ responses: {
91472
+ 200: zeroGoalResponseSchema,
91473
+ 401: apiErrorSchema,
91474
+ 403: apiErrorSchema,
91475
+ 404: apiErrorSchema,
91476
+ 409: apiErrorSchema
91477
+ },
91478
+ summary: "Pause a chat thread goal"
91479
+ },
91480
+ resume: {
91481
+ method: "POST",
91482
+ path: "/api/zero/goal/resume",
91483
+ headers: authHeadersSchema,
91484
+ body: c17.noBody(),
91485
+ responses: {
91486
+ 200: zeroGoalResponseSchema,
91487
+ 401: apiErrorSchema,
91488
+ 403: apiErrorSchema,
91489
+ 404: apiErrorSchema,
91490
+ 409: apiErrorSchema
91491
+ },
91492
+ summary: "Resume continuation for the current thread goal"
91493
+ },
91494
+ clear: {
91495
+ method: "DELETE",
91496
+ path: "/api/zero/goal",
91497
+ headers: authHeadersSchema,
91498
+ body: c17.noBody(),
91499
+ responses: {
91500
+ 200: external_exports.object({ cleared: external_exports.literal(true) }),
91501
+ 401: apiErrorSchema,
91502
+ 403: apiErrorSchema,
91503
+ 404: apiErrorSchema
91504
+ },
91505
+ summary: "Clear the current thread goal"
91506
+ }
91507
+ });
91508
+
91509
+ // ../../packages/api-contracts/src/contracts/chat-threads.ts
91510
+ var c18 = initContract();
91347
91511
  var MODEL_FIRST_SELECTION_PROVIDER_ID = "00000000-0000-4000-8000-000000000000";
91348
91512
  var attachFileSchema = external_exports.object({
91349
91513
  id: external_exports.string(),
@@ -91501,6 +91665,7 @@ var pagedChatMessageBaseSchema = external_exports.object({
91501
91665
  runId: external_exports.string().optional(),
91502
91666
  runGroupId: external_exports.string().optional(),
91503
91667
  runEventId: external_exports.string().optional(),
91668
+ goalEvent: zeroGoalEventSchema.optional(),
91504
91669
  usage: chatMessageUsagePayloadSchema.optional(),
91505
91670
  revokesMessageId: external_exports.string().optional(),
91506
91671
  interruptsRunId: external_exports.string().optional(),
@@ -91598,7 +91763,7 @@ var modelSelectionRequestSchema = external_exports.object({
91598
91763
  });
91599
91764
  }
91600
91765
  });
91601
- var chatThreadsContract = c17.router({
91766
+ var chatThreadsContract = c18.router({
91602
91767
  create: {
91603
91768
  method: "POST",
91604
91769
  path: "/api/zero/chat-threads",
@@ -91701,7 +91866,7 @@ var chatThreadIdPathParamsSchema = external_exports.object({ id: external_export
91701
91866
  var chatThreadThreadIdPathParamsSchema = external_exports.object({
91702
91867
  threadId: external_exports.string().uuid()
91703
91868
  });
91704
- var chatThreadByIdContract = c17.router({
91869
+ var chatThreadByIdContract = c18.router({
91705
91870
  get: {
91706
91871
  method: "GET",
91707
91872
  path: "/api/zero/chat-threads/:id",
@@ -91725,7 +91890,7 @@ var chatThreadByIdContract = c17.router({
91725
91890
  draftAttachments: external_exports.array(persistedAttachmentSchema).nullable().optional()
91726
91891
  }),
91727
91892
  responses: {
91728
- 204: c17.noBody(),
91893
+ 204: c18.noBody(),
91729
91894
  400: apiErrorSchema,
91730
91895
  401: apiErrorSchema,
91731
91896
  404: apiErrorSchema
@@ -91738,22 +91903,22 @@ var chatThreadByIdContract = c17.router({
91738
91903
  headers: authHeadersSchema,
91739
91904
  pathParams: chatThreadIdPathParamsSchema,
91740
91905
  responses: {
91741
- 204: c17.noBody(),
91906
+ 204: c18.noBody(),
91742
91907
  400: apiErrorSchema,
91743
91908
  401: apiErrorSchema,
91744
91909
  404: apiErrorSchema
91745
91910
  },
91746
91911
  summary: "Delete a chat thread",
91747
- body: c17.noBody()
91912
+ body: c18.noBody()
91748
91913
  }
91749
91914
  });
91750
- var chatThreadMarkReadContract = c17.router({
91915
+ var chatThreadMarkReadContract = c18.router({
91751
91916
  markRead: {
91752
91917
  method: "POST",
91753
91918
  path: "/api/zero/chat-threads/:id/mark-read",
91754
91919
  headers: authHeadersSchema,
91755
91920
  pathParams: chatThreadIdPathParamsSchema,
91756
- body: c17.noBody(),
91921
+ body: c18.noBody(),
91757
91922
  responses: {
91758
91923
  200: external_exports.object({
91759
91924
  lastReadMessageId: external_exports.string().nullable(),
@@ -91771,15 +91936,15 @@ var chatThreadMarkReadContract = c17.router({
91771
91936
  summary: "Mark a chat thread as read up to the latest message and return the agent's unread snapshot"
91772
91937
  }
91773
91938
  });
91774
- var chatThreadPinContract = c17.router({
91939
+ var chatThreadPinContract = c18.router({
91775
91940
  pin: {
91776
91941
  method: "POST",
91777
91942
  path: "/api/zero/chat-threads/:id/pin",
91778
91943
  headers: authHeadersSchema,
91779
91944
  pathParams: chatThreadIdPathParamsSchema,
91780
- body: c17.noBody(),
91945
+ body: c18.noBody(),
91781
91946
  responses: {
91782
- 204: c17.noBody(),
91947
+ 204: c18.noBody(),
91783
91948
  400: apiErrorSchema,
91784
91949
  401: apiErrorSchema,
91785
91950
  404: apiErrorSchema
@@ -91787,15 +91952,15 @@ var chatThreadPinContract = c17.router({
91787
91952
  summary: "Pin a chat thread to the top of the sidebar"
91788
91953
  }
91789
91954
  });
91790
- var chatThreadUnpinContract = c17.router({
91955
+ var chatThreadUnpinContract = c18.router({
91791
91956
  unpin: {
91792
91957
  method: "POST",
91793
91958
  path: "/api/zero/chat-threads/:id/unpin",
91794
91959
  headers: authHeadersSchema,
91795
91960
  pathParams: chatThreadIdPathParamsSchema,
91796
- body: c17.noBody(),
91961
+ body: c18.noBody(),
91797
91962
  responses: {
91798
- 204: c17.noBody(),
91963
+ 204: c18.noBody(),
91799
91964
  400: apiErrorSchema,
91800
91965
  401: apiErrorSchema,
91801
91966
  404: apiErrorSchema
@@ -91803,7 +91968,7 @@ var chatThreadUnpinContract = c17.router({
91803
91968
  summary: "Remove the pin from a chat thread"
91804
91969
  }
91805
91970
  });
91806
- var chatThreadRenameContract = c17.router({
91971
+ var chatThreadRenameContract = c18.router({
91807
91972
  rename: {
91808
91973
  method: "POST",
91809
91974
  path: "/api/zero/chat-threads/:id/rename",
@@ -91811,7 +91976,7 @@ var chatThreadRenameContract = c17.router({
91811
91976
  pathParams: chatThreadIdPathParamsSchema,
91812
91977
  body: external_exports.object({ title: external_exports.string().min(1) }),
91813
91978
  responses: {
91814
- 204: c17.noBody(),
91979
+ 204: c18.noBody(),
91815
91980
  400: apiErrorSchema,
91816
91981
  401: apiErrorSchema,
91817
91982
  404: apiErrorSchema
@@ -91819,7 +91984,7 @@ var chatThreadRenameContract = c17.router({
91819
91984
  summary: "Rename a chat thread (suppresses automated title generation)"
91820
91985
  }
91821
91986
  });
91822
- var chatThreadModelSelectionContract = c17.router({
91987
+ var chatThreadModelSelectionContract = c18.router({
91823
91988
  update: {
91824
91989
  method: "POST",
91825
91990
  path: "/api/zero/chat-threads/:id/model-selection",
@@ -91829,7 +91994,7 @@ var chatThreadModelSelectionContract = c17.router({
91829
91994
  modelSelection: modelSelectionRequestSchema.nullable()
91830
91995
  }),
91831
91996
  responses: {
91832
- 204: c17.noBody(),
91997
+ 204: c18.noBody(),
91833
91998
  400: apiErrorSchema,
91834
91999
  401: apiErrorSchema,
91835
92000
  404: apiErrorSchema
@@ -91837,7 +92002,7 @@ var chatThreadModelSelectionContract = c17.router({
91837
92002
  summary: "Update a chat thread model selection"
91838
92003
  }
91839
92004
  });
91840
- var chatThreadComputerUseHostContract = c17.router({
92005
+ var chatThreadComputerUseHostContract = c18.router({
91841
92006
  update: {
91842
92007
  method: "POST",
91843
92008
  path: "/api/zero/chat-threads/:id/computer-use-host",
@@ -91847,7 +92012,7 @@ var chatThreadComputerUseHostContract = c17.router({
91847
92012
  computerUseHostId: external_exports.string().uuid().nullable()
91848
92013
  }),
91849
92014
  responses: {
91850
- 204: c17.noBody(),
92015
+ 204: c18.noBody(),
91851
92016
  400: apiErrorSchema,
91852
92017
  401: apiErrorSchema,
91853
92018
  403: apiErrorSchema,
@@ -91856,7 +92021,7 @@ var chatThreadComputerUseHostContract = c17.router({
91856
92021
  summary: "Update a chat thread Computer Use host binding"
91857
92022
  }
91858
92023
  });
91859
- var chatMessagesContract = c17.router({
92024
+ var chatMessagesContract = c18.router({
91860
92025
  send: {
91861
92026
  method: "POST",
91862
92027
  path: "/api/zero/chat/messages",
@@ -91968,7 +92133,7 @@ var chatSearchResponseSchema = external_exports.object({
91968
92133
  results: external_exports.array(chatSearchResultSchema),
91969
92134
  hasMore: external_exports.boolean()
91970
92135
  });
91971
- var chatSearchContract = c17.router({
92136
+ var chatSearchContract = c18.router({
91972
92137
  search: {
91973
92138
  method: "GET",
91974
92139
  path: "/api/zero/chat/search",
@@ -91990,7 +92155,7 @@ var chatSearchContract = c17.router({
91990
92155
  summary: "Search chat messages within caller's org (zero proxy)"
91991
92156
  }
91992
92157
  });
91993
- var chatThreadMessagesContract = c17.router({
92158
+ var chatThreadMessagesContract = c18.router({
91994
92159
  list: {
91995
92160
  method: "GET",
91996
92161
  path: "/api/zero/chat-threads/:threadId/messages",
@@ -92013,7 +92178,7 @@ var chatThreadMessagesContract = c17.router({
92013
92178
  summary: "Get paginated chat messages for a thread"
92014
92179
  }
92015
92180
  });
92016
- var chatThreadArtifactsContract = c17.router({
92181
+ var chatThreadArtifactsContract = c18.router({
92017
92182
  list: {
92018
92183
  method: "GET",
92019
92184
  path: "/api/zero/chat-threads/:threadId/artifacts",
@@ -92054,7 +92219,7 @@ var chatThreadArtifactsContract = c17.router({
92054
92219
  summary: "Sync a chat artifact file to the user's connected Google Drive"
92055
92220
  }
92056
92221
  });
92057
- var chatThreadGithubPrsContract = c17.router({
92222
+ var chatThreadGithubPrsContract = c18.router({
92058
92223
  list: {
92059
92224
  method: "GET",
92060
92225
  path: "/api/zero/chat-threads/:threadId/github-prs",
@@ -92074,7 +92239,7 @@ var chatThreadGithubPrsContract = c17.router({
92074
92239
  });
92075
92240
 
92076
92241
  // ../../packages/api-contracts/src/contracts/zero-agents.ts
92077
- var c18 = initContract();
92242
+ var c19 = initContract();
92078
92243
  var zeroAgentVisibilitySchema = external_exports.enum(["public", "private"]);
92079
92244
  var zeroAgentResponseSchema = external_exports.object({
92080
92245
  agentId: external_exports.string(),
@@ -92117,7 +92282,7 @@ var zeroAgentDraftRequestSchema = external_exports.object({
92117
92282
  draftContent: external_exports.string().nullable().optional(),
92118
92283
  draftAttachments: external_exports.array(persistedAttachmentSchema).nullable().optional()
92119
92284
  });
92120
- var zeroAgentsMainContract = c18.router({
92285
+ var zeroAgentsMainContract = c19.router({
92121
92286
  create: {
92122
92287
  method: "POST",
92123
92288
  path: "/api/zero/agents",
@@ -92145,7 +92310,7 @@ var zeroAgentsMainContract = c18.router({
92145
92310
  summary: "List zero agents"
92146
92311
  }
92147
92312
  });
92148
- var zeroAgentsByIdContract = c18.router({
92313
+ var zeroAgentsByIdContract = c19.router({
92149
92314
  get: {
92150
92315
  method: "GET",
92151
92316
  path: "/api/zero/agents/:id",
@@ -92198,9 +92363,9 @@ var zeroAgentsByIdContract = c18.router({
92198
92363
  path: "/api/zero/agents/:id",
92199
92364
  headers: authHeadersSchema,
92200
92365
  pathParams: external_exports.object({ id: external_exports.string().uuid() }),
92201
- body: c18.noBody(),
92366
+ body: c19.noBody(),
92202
92367
  responses: {
92203
- 204: c18.noBody(),
92368
+ 204: c19.noBody(),
92204
92369
  400: apiErrorSchema,
92205
92370
  401: apiErrorSchema,
92206
92371
  403: apiErrorSchema,
@@ -92210,7 +92375,7 @@ var zeroAgentsByIdContract = c18.router({
92210
92375
  summary: "Delete zero agent by id"
92211
92376
  }
92212
92377
  });
92213
- var zeroAgentInstructionsContract = c18.router({
92378
+ var zeroAgentInstructionsContract = c19.router({
92214
92379
  get: {
92215
92380
  method: "GET",
92216
92381
  path: "/api/zero/agents/:id/instructions",
@@ -92242,7 +92407,7 @@ var zeroAgentInstructionsContract = c18.router({
92242
92407
  summary: "Update zero agent instructions"
92243
92408
  }
92244
92409
  });
92245
- var zeroAgentDraftContract = c18.router({
92410
+ var zeroAgentDraftContract = c19.router({
92246
92411
  get: {
92247
92412
  method: "GET",
92248
92413
  path: "/api/zero/agents/:id/draft",
@@ -92264,7 +92429,7 @@ var zeroAgentDraftContract = c18.router({
92264
92429
  pathParams: external_exports.object({ id: external_exports.string().uuid() }),
92265
92430
  body: zeroAgentDraftRequestSchema,
92266
92431
  responses: {
92267
- 204: c18.noBody(),
92432
+ 204: c19.noBody(),
92268
92433
  400: apiErrorSchema,
92269
92434
  401: apiErrorSchema,
92270
92435
  403: apiErrorSchema,
@@ -92276,7 +92441,7 @@ var zeroAgentDraftContract = c18.router({
92276
92441
 
92277
92442
  // ../../packages/api-contracts/src/contracts/zero-user-permission-grants.ts
92278
92443
  init_esm_shims();
92279
- var c19 = initContract();
92444
+ var c20 = initContract();
92280
92445
  var agentIdSchema = external_exports.string().uuid();
92281
92446
  var connectorRefSchema = external_exports.string().min(1).max(64);
92282
92447
  var permissionSchema = external_exports.string().min(1).max(128);
@@ -92319,7 +92484,7 @@ var applyUserPermissionGrantsRequestSchema = external_exports.object({
92319
92484
  mode: userPermissionGrantApplyModeSchema,
92320
92485
  grants: external_exports.array(applyUserPermissionGrantSchema)
92321
92486
  });
92322
- var zeroUserPermissionGrantsContract = c19.router({
92487
+ var zeroUserPermissionGrantsContract = c20.router({
92323
92488
  list: {
92324
92489
  method: "GET",
92325
92490
  path: "/api/zero/user-permission-grants",
@@ -92352,11 +92517,11 @@ var zeroUserPermissionGrantsContract = c19.router({
92352
92517
 
92353
92518
  // ../../packages/api-contracts/src/contracts/user-connectors.ts
92354
92519
  init_esm_shims();
92355
- var c20 = initContract();
92520
+ var c21 = initContract();
92356
92521
  var userConnectorEnabledTypesSchema = external_exports.object({
92357
92522
  enabledTypes: external_exports.array(external_exports.string())
92358
92523
  });
92359
- var zeroUserConnectorsContract = c20.router({
92524
+ var zeroUserConnectorsContract = c21.router({
92360
92525
  get: {
92361
92526
  method: "GET",
92362
92527
  path: "/api/zero/agents/:id/user-connectors",
@@ -92389,11 +92554,11 @@ var zeroUserConnectorsContract = c20.router({
92389
92554
 
92390
92555
  // ../../packages/api-contracts/src/contracts/zero-agent-custom-connectors.ts
92391
92556
  init_esm_shims();
92392
- var c21 = initContract();
92557
+ var c22 = initContract();
92393
92558
  var agentCustomConnectorEnabledIdsSchema = external_exports.object({
92394
92559
  enabledIds: external_exports.array(external_exports.string().uuid())
92395
92560
  });
92396
- var zeroAgentCustomConnectorsContract = c21.router({
92561
+ var zeroAgentCustomConnectorsContract = c22.router({
92397
92562
  get: {
92398
92563
  method: "GET",
92399
92564
  path: "/api/zero/agents/:id/custom-connectors",
@@ -92510,135 +92675,6 @@ async function updateZeroAgentInstructions(id, content) {
92510
92675
 
92511
92676
  // src/lib/api/domains/zero-goals.ts
92512
92677
  init_esm_shims();
92513
-
92514
- // ../../packages/api-contracts/src/contracts/zero-goals.ts
92515
- init_esm_shims();
92516
- var c22 = initContract();
92517
- var zeroGoalStatusSchema = external_exports.enum(["active", "blocked", "complete"]);
92518
- var zeroGoalStopReasonSchema = external_exports.enum(["paused", "blocked", "failed"]);
92519
- var zeroGoalPreferenceSchema = external_exports.object({
92520
- version: external_exports.literal(1),
92521
- objective: external_exports.string().min(1),
92522
- objectiveBrief: external_exports.string().min(1).optional(),
92523
- tokenBudget: external_exports.number().int().positive().optional(),
92524
- stopReason: zeroGoalStopReasonSchema.optional()
92525
- });
92526
- var zeroGoalCreateRequestSchema = external_exports.object({
92527
- objective: external_exports.string().min(1).max(2e4),
92528
- tokenBudget: external_exports.number().int().positive().optional()
92529
- });
92530
- var zeroGoalEditRequestSchema = external_exports.object({
92531
- objective: external_exports.string().min(1).max(2e4).optional(),
92532
- tokenBudget: external_exports.number().int().positive().optional()
92533
- });
92534
- var zeroGoalResponseSchema = external_exports.object({
92535
- active: external_exports.boolean(),
92536
- objective: external_exports.string(),
92537
- status: zeroGoalStatusSchema,
92538
- tokenBudget: external_exports.number().int().positive().optional(),
92539
- stopReason: zeroGoalStopReasonSchema.optional()
92540
- });
92541
- var chatThreadGoalParamsSchema = external_exports.object({
92542
- threadId: external_exports.string().min(1)
92543
- });
92544
- var zeroGoalsContract = c22.router({
92545
- create: {
92546
- method: "POST",
92547
- path: "/api/zero/goal",
92548
- headers: authHeadersSchema,
92549
- body: zeroGoalCreateRequestSchema,
92550
- responses: {
92551
- 201: zeroGoalResponseSchema,
92552
- 400: apiErrorSchema,
92553
- 401: apiErrorSchema,
92554
- 403: apiErrorSchema,
92555
- 409: apiErrorSchema
92556
- },
92557
- summary: "Create a persistent goal for the current thread"
92558
- },
92559
- edit: {
92560
- method: "PATCH",
92561
- path: "/api/zero/goal",
92562
- headers: authHeadersSchema,
92563
- body: zeroGoalEditRequestSchema,
92564
- responses: {
92565
- 200: zeroGoalResponseSchema,
92566
- 400: apiErrorSchema,
92567
- 401: apiErrorSchema,
92568
- 403: apiErrorSchema,
92569
- 404: apiErrorSchema
92570
- },
92571
- summary: "Edit the current thread goal's objective or token budget"
92572
- },
92573
- get: {
92574
- method: "GET",
92575
- path: "/api/zero/goal",
92576
- headers: authHeadersSchema,
92577
- responses: {
92578
- 200: zeroGoalResponseSchema,
92579
- 401: apiErrorSchema,
92580
- 403: apiErrorSchema,
92581
- 404: apiErrorSchema
92582
- },
92583
- summary: "Get the current thread goal"
92584
- },
92585
- complete: {
92586
- method: "POST",
92587
- path: "/api/zero/goal/complete",
92588
- headers: authHeadersSchema,
92589
- body: c22.noBody(),
92590
- responses: {
92591
- 200: zeroGoalResponseSchema,
92592
- 401: apiErrorSchema,
92593
- 403: apiErrorSchema,
92594
- 404: apiErrorSchema
92595
- },
92596
- summary: "Mark the current thread goal complete"
92597
- },
92598
- block: {
92599
- method: "POST",
92600
- path: "/api/zero/goal/block",
92601
- headers: authHeadersSchema,
92602
- body: c22.noBody(),
92603
- responses: {
92604
- 200: zeroGoalResponseSchema,
92605
- 401: apiErrorSchema,
92606
- 403: apiErrorSchema,
92607
- 404: apiErrorSchema
92608
- },
92609
- summary: "Pause continuation for the current thread goal"
92610
- },
92611
- blockForChatThread: {
92612
- method: "POST",
92613
- path: "/api/zero/chat-threads/:threadId/goal/block",
92614
- headers: authHeadersSchema,
92615
- pathParams: chatThreadGoalParamsSchema,
92616
- body: c22.noBody(),
92617
- responses: {
92618
- 200: zeroGoalResponseSchema,
92619
- 401: apiErrorSchema,
92620
- 403: apiErrorSchema,
92621
- 404: apiErrorSchema
92622
- },
92623
- summary: "Pause continuation for a chat thread goal"
92624
- },
92625
- resume: {
92626
- method: "POST",
92627
- path: "/api/zero/goal/resume",
92628
- headers: authHeadersSchema,
92629
- body: c22.noBody(),
92630
- responses: {
92631
- 200: zeroGoalResponseSchema,
92632
- 401: apiErrorSchema,
92633
- 403: apiErrorSchema,
92634
- 404: apiErrorSchema,
92635
- 409: apiErrorSchema
92636
- },
92637
- summary: "Resume continuation for the current thread goal"
92638
- }
92639
- });
92640
-
92641
- // src/lib/api/domains/zero-goals.ts
92642
92678
  async function createGoal(body) {
92643
92679
  const config3 = await getClientConfig();
92644
92680
  const client = initClient(zeroGoalsContract, config3);
@@ -92674,6 +92710,13 @@ async function blockGoal() {
92674
92710
  if (result.status === 200) return result.body;
92675
92711
  handleError(result, "Failed to block goal");
92676
92712
  }
92713
+ async function pauseGoal() {
92714
+ const config3 = await getClientConfig();
92715
+ const client = initClient(zeroGoalsContract, config3);
92716
+ const result = await client.pause({});
92717
+ if (result.status === 200) return result.body;
92718
+ handleError(result, "Failed to pause goal");
92719
+ }
92677
92720
  async function resumeGoal() {
92678
92721
  const config3 = await getClientConfig();
92679
92722
  const client = initClient(zeroGoalsContract, config3);
@@ -92681,6 +92724,13 @@ async function resumeGoal() {
92681
92724
  if (result.status === 200) return result.body;
92682
92725
  handleError(result, "Failed to resume goal");
92683
92726
  }
92727
+ async function clearGoal() {
92728
+ const config3 = await getClientConfig();
92729
+ const client = initClient(zeroGoalsContract, config3);
92730
+ const result = await client.clear({});
92731
+ if (result.status === 200) return result.body;
92732
+ handleError(result, "Failed to clear goal");
92733
+ }
92684
92734
 
92685
92735
  // src/lib/api/domains/zero-connectors.ts
92686
92736
  init_esm_shims();
@@ -95627,44 +95677,29 @@ var workflowFileMetadataSchema = external_exports.object({
95627
95677
  var workflowInstructionSchema = external_exports.string().max(WORKFLOW_FILES_MAX_BYTES);
95628
95678
  var zeroWorkflowScheduleTypeSchema = external_exports.enum(["cron", "loop", "once"]);
95629
95679
  var zeroWorkflowTriggerKindSchema = external_exports.enum(["schedule", "event"]);
95630
- var zeroWorkflowEventTypeSchema = external_exports.enum([
95631
- "thread-idle",
95632
- "gmail-new-message"
95633
- ]);
95680
+ var zeroWorkflowEventTypeSchema = external_exports.enum(["gmail-new-message"]);
95634
95681
  var gmailTextMatchSchema = external_exports.object({
95635
95682
  contains: external_exports.string().min(1).optional(),
95636
95683
  containsAny: external_exports.array(external_exports.string().min(1)).min(1).optional(),
95637
95684
  doesNotContain: external_exports.string().min(1).optional(),
95638
95685
  doesNotContainAny: external_exports.array(external_exports.string().min(1)).min(1).optional()
95639
- }).refine(
95686
+ }).strict().refine(
95640
95687
  (value) => {
95641
95688
  return value.contains !== void 0 || value.containsAny !== void 0 || value.doesNotContain !== void 0 || value.doesNotContainAny !== void 0;
95642
95689
  },
95643
95690
  { message: "At least one text matcher is required" }
95644
95691
  );
95645
- var gmailLabelMatchSchema = external_exports.object({
95646
- includeAny: external_exports.array(external_exports.string().min(1)).min(1).optional(),
95647
- excludeAny: external_exports.array(external_exports.string().min(1)).min(1).optional()
95648
- }).refine(
95649
- (value) => {
95650
- return value.includeAny !== void 0 || value.excludeAny !== void 0;
95651
- },
95652
- { message: "At least one label matcher is required" }
95653
- );
95654
95692
  var gmailNewMessageEventConfigSchema = external_exports.object({
95655
95693
  provider: external_exports.literal("gmail"),
95656
95694
  event: external_exports.literal("new_message"),
95657
95695
  match: external_exports.object({
95658
95696
  from: gmailTextMatchSchema.optional(),
95659
95697
  subject: gmailTextMatchSchema.optional(),
95660
- snippet: gmailTextMatchSchema.optional(),
95661
95698
  body: gmailTextMatchSchema.optional(),
95662
95699
  to: gmailTextMatchSchema.optional(),
95663
- cc: gmailTextMatchSchema.optional(),
95664
- labels: gmailLabelMatchSchema.optional(),
95665
- hasAttachment: external_exports.boolean().optional()
95666
- }).optional()
95667
- });
95700
+ cc: gmailTextMatchSchema.optional()
95701
+ }).strict().optional()
95702
+ }).strict();
95668
95703
  var zeroWorkflowScheduleSchema = external_exports.discriminatedUnion("type", [
95669
95704
  external_exports.object({
95670
95705
  type: external_exports.literal("cron"),
@@ -113121,7 +113156,9 @@ export {
113121
113156
  getGoal,
113122
113157
  completeGoal,
113123
113158
  blockGoal,
113159
+ pauseGoal,
113124
113160
  resumeGoal,
113161
+ clearGoal,
113125
113162
  customConnectorProposalSchema,
113126
113163
  listZeroConnectors,
113127
113164
  searchZeroConnectors,
@@ -113243,4 +113280,4 @@ undici/lib/web/fetch/body.js:
113243
113280
  undici/lib/web/websocket/frame.js:
113244
113281
  (*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
113245
113282
  */
113246
- //# sourceMappingURL=chunk-QMWTDWXH.js.map
113283
+ //# sourceMappingURL=chunk-BX6IGPXR.js.map