@sixb/client 0.1.17 → 0.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/browser.d.ts.map +1 -1
  2. package/dist/browser.js +9 -4
  3. package/dist/browser.js.map +3 -3
  4. package/dist/{chunk-bvasdctr.js → chunk-12s8gbwj.js} +2 -2
  5. package/dist/{chunk-aqpr0h1n.js → chunk-3aa3m9z6.js} +2 -2
  6. package/dist/{chunk-mjvdcaw4.js → chunk-95bnb04n.js} +1 -1
  7. package/dist/{chunk-p1j3d7t0.js → chunk-awbb496e.js} +1 -1
  8. package/dist/{chunk-bcyvstee.js → chunk-pvmd5f18.js} +3 -3
  9. package/dist/{chunk-bcyvstee.js.map → chunk-pvmd5f18.js.map} +1 -1
  10. package/dist/{chunk-hdgztpzs.js → chunk-tkjkrcdt.js} +1 -3
  11. package/dist/{chunk-hdgztpzs.js.map → chunk-tkjkrcdt.js.map} +3 -3
  12. package/dist/connectors/queries.d.ts.map +1 -1
  13. package/dist/events-builder.d.ts +2 -2
  14. package/dist/events-builder.d.ts.map +1 -1
  15. package/dist/generated/@tanstack/react-query.gen.d.ts +332 -87
  16. package/dist/generated/@tanstack/react-query.gen.d.ts.map +1 -1
  17. package/dist/generated/index.d.ts +1 -1
  18. package/dist/generated/index.d.ts.map +1 -1
  19. package/dist/generated/sdk.gen.d.ts +1 -1
  20. package/dist/generated/sdk.gen.d.ts.map +1 -1
  21. package/dist/generated/types.gen.d.ts +84 -19
  22. package/dist/generated/types.gen.d.ts.map +1 -1
  23. package/dist/hooks.js +5 -5
  24. package/dist/hooks.js.map +1 -1
  25. package/dist/index.js +5 -5
  26. package/dist/logs.js +3 -3
  27. package/dist/models.js +1 -1
  28. package/dist/query.js +3 -3
  29. package/package.json +2 -2
  30. package/src/browser.ts +9 -0
  31. package/src/events-builder.ts +2 -2
  32. package/src/generated/@tanstack/react-query.gen.ts +1 -1
  33. package/src/generated/index.ts +1 -0
  34. package/src/generated/sdk.gen.ts +1 -3
  35. package/src/generated/types.gen.ts +95 -8
  36. /package/dist/{chunk-bvasdctr.js.map → chunk-12s8gbwj.js.map} +0 -0
  37. /package/dist/{chunk-aqpr0h1n.js.map → chunk-3aa3m9z6.js.map} +0 -0
  38. /package/dist/{chunk-mjvdcaw4.js.map → chunk-95bnb04n.js.map} +0 -0
  39. /package/dist/{chunk-p1j3d7t0.js.map → chunk-awbb496e.js.map} +0 -0
package/dist/index.js CHANGED
@@ -148,7 +148,7 @@ import {
148
148
  listProjectionRuns2,
149
149
  getProjectionRun2,
150
150
  listWebhookRuns2
151
- } from "./chunk-hdgztpzs.js";
151
+ } from "./chunk-tkjkrcdt.js";
152
152
  import {
153
153
  createSixbAgentsWebSocketUrl2,
154
154
  createAgentRunSocket2,
@@ -173,7 +173,7 @@ import {
173
173
  objectFileContentUrl2,
174
174
  SixbFileUploadError2,
175
175
  uploadFile2
176
- } from "./chunk-bcyvstee.js";
176
+ } from "./chunk-pvmd5f18.js";
177
177
  import {
178
178
  SIXB_CSRF_HEADER_NAME2,
179
179
  SIXB_CSRF_TOKEN_RESPONSE_HEADER_NAME2,
@@ -183,7 +183,7 @@ import {
183
183
  createSixbClient2,
184
184
  configureSixbClient2,
185
185
  createSixbClientConfig2
186
- } from "./chunk-p1j3d7t0.js";
186
+ } from "./chunk-awbb496e.js";
187
187
  import {
188
188
  encodeObjectId2,
189
189
  decodeObjectId2,
@@ -199,8 +199,8 @@ import {
199
199
  logs2,
200
200
  isStoredLogLine2,
201
201
  isStoredLogLine3
202
- } from "./chunk-bvasdctr.js";
203
- import"./chunk-mjvdcaw4.js";
202
+ } from "./chunk-12s8gbwj.js";
203
+ import"./chunk-95bnb04n.js";
204
204
  import"./chunk-0ka9ykez.js";
205
205
  export {
206
206
  ActionRunFailedError2 as ActionRunFailedError,
package/dist/logs.js CHANGED
@@ -6,11 +6,11 @@ import {
6
6
  logs2,
7
7
  isStoredLogLine2,
8
8
  isStoredLogLine3
9
- } from "./chunk-bvasdctr.js";
10
- import"./chunk-mjvdcaw4.js";
9
+ } from "./chunk-12s8gbwj.js";
10
+ import"./chunk-95bnb04n.js";
11
11
  import"./chunk-0ka9ykez.js";
12
12
  import"./chunk-j9t5h44d.js";
13
- import"./chunk-hdgztpzs.js";
13
+ import"./chunk-tkjkrcdt.js";
14
14
  export {
15
15
  createLogSocket2 as createLogSocket,
16
16
  createSixbLogsWebSocketUrl2 as createSixbLogsWebSocketUrl,
package/dist/models.js CHANGED
@@ -150,7 +150,7 @@ import {
150
150
  listProjectionRuns2,
151
151
  getProjectionRun2,
152
152
  listWebhookRuns2
153
- } from "./chunk-hdgztpzs.js";
153
+ } from "./chunk-tkjkrcdt.js";
154
154
  export {
155
155
  abortFileUpload2 as abortFileUpload,
156
156
  addConnectorConnection2 as addConnectorConnection,
package/dist/query.js CHANGED
@@ -3,10 +3,10 @@ import {
3
3
  SixbQueryError2,
4
4
  objects2,
5
5
  createHttpQueryExecutor2
6
- } from "./chunk-aqpr0h1n.js";
7
- import"./chunk-p1j3d7t0.js";
6
+ } from "./chunk-3aa3m9z6.js";
7
+ import"./chunk-awbb496e.js";
8
8
  import"./chunk-j9t5h44d.js";
9
- import"./chunk-hdgztpzs.js";
9
+ import"./chunk-tkjkrcdt.js";
10
10
  export {
11
11
  SixbQueryError2 as SixbQueryError,
12
12
  createHttpQueryExecutor2 as createHttpQueryExecutor,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sixb/client",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "Type-safe SDK for Sixb API with TanStack Query hooks",
5
5
  "keywords": [
6
6
  "sixb",
@@ -67,7 +67,7 @@
67
67
  "prepack": "bun run build"
68
68
  },
69
69
  "dependencies": {
70
- "@sixb/core": "^0.1.17"
70
+ "@sixb/core": "^0.1.18"
71
71
  },
72
72
  "peerDependencies": {
73
73
  "@tanstack/react-query": "^5.0.0",
package/src/browser.ts CHANGED
@@ -75,6 +75,8 @@ export interface SixbSharedBrowserClientController extends SixbBrowserClientCont
75
75
  }
76
76
 
77
77
  let activeBrowserController: SixbBrowserClientController | null = null
78
+ // Controllers whose API reported that it runs without auth: a 401 there is not a sign-in prompt.
79
+ const authDisabledControllers = new WeakSet<SixbBrowserClientController>()
78
80
 
79
81
  declare global {
80
82
  interface Window {
@@ -134,6 +136,7 @@ export function configureSixbBrowserClient(
134
136
 
135
137
  if (
136
138
  !config.auth.enabled ||
139
+ authDisabledControllers.has(controller) ||
137
140
  response.status !== 401 ||
138
141
  isAuthRedirectExcludedRequest(config, request) ||
139
142
  request.headers.has("authorization")
@@ -462,6 +465,12 @@ export async function requireSixbBrowserAuthSession(
462
465
  }
463
466
 
464
467
  controller.setCsrfToken(null)
468
+ // The shell cannot know whether the project uses auth; the API can. Without it, there is
469
+ // nobody to sign in as and every request is allowed.
470
+ if (data.authEnabled === false) {
471
+ authDisabledControllers.add(controller)
472
+ return data
473
+ }
465
474
  const returnTo = options.returnTo ?? window.location.href
466
475
  const redirect = options.redirect ?? ((url: string) => window.location.assign(url))
467
476
  redirect(createSixbSignInUrl(config, returnTo))
@@ -14,7 +14,7 @@
14
14
  import type {
15
15
  ActionDefinition,
16
16
  DatasetDefinition,
17
- InferObjectProperties,
17
+ InferObjectReadProperties,
18
18
  InferPropertyValue,
19
19
  PipelineDefinition,
20
20
  RuleDefinition,
@@ -116,7 +116,7 @@ type ObjectPropertiesEventOf<
116
116
  > = Override<
117
117
  TEvent,
118
118
  {
119
- payload: Override<TEvent["payload"], { properties: InferObjectProperties<TObjectType> }>
119
+ payload: Override<TEvent["payload"], { properties: InferObjectReadProperties<TObjectType> }>
120
120
  }
121
121
  >
122
122
 
@@ -4301,7 +4301,7 @@ export const cancelAgentRunMutation = (
4301
4301
  }
4302
4302
 
4303
4303
  /**
4304
- * Retry a failed agent run
4304
+ * Retry a failed or interrupted agent run
4305
4305
  */
4306
4306
  export const retryAgentRunMutation = (
4307
4307
  options?: Partial<Options<RetryAgentRunData>>
@@ -700,6 +700,7 @@ export type {
700
700
  RecreateAgentThreadSandboxErrors,
701
701
  RecreateAgentThreadSandboxResponse,
702
702
  RecreateAgentThreadSandboxResponses,
703
+ Redactions,
703
704
  RefreshAuthSessionData,
704
705
  RefreshAuthSessionError,
705
706
  RefreshAuthSessionErrors,
@@ -612,7 +612,6 @@ export const createAuthPersonalAccessToken = <ThrowOnError extends boolean = fal
612
612
  security: [
613
613
  { name: "x-sixb-csrf", type: "apiKey" },
614
614
  { scheme: "bearer", type: "http" },
615
- { scheme: "bearer", type: "http" },
616
615
  ],
617
616
  url: "/api/auth/access-tokens",
618
617
  ...options,
@@ -738,7 +737,6 @@ export const createAuthServiceAccountAccessToken = <ThrowOnError extends boolean
738
737
  security: [
739
738
  { name: "x-sixb-csrf", type: "apiKey" },
740
739
  { scheme: "bearer", type: "http" },
741
- { scheme: "bearer", type: "http" },
742
740
  ],
743
741
  url: "/api/auth/service-accounts/{serviceAccountId}/access-tokens",
744
742
  ...options,
@@ -2616,7 +2614,7 @@ export const cancelAgentRun = <ThrowOnError extends boolean = false>(
2616
2614
  })
2617
2615
 
2618
2616
  /**
2619
- * Retry a failed agent run
2617
+ * Retry a failed or interrupted agent run
2620
2618
  */
2621
2619
  export const retryAgentRun = <ThrowOnError extends boolean = false>(
2622
2620
  options: Options<RetryAgentRunData, ThrowOnError>
@@ -8,6 +8,12 @@ export type ErrorResponse = {
8
8
  error: string
9
9
  }
10
10
 
11
+ export type Redactions = {
12
+ [key: string]: {
13
+ reason: "missing_clearance"
14
+ }
15
+ }
16
+
11
17
  export type ObjectQueryObject = {
12
18
  score?: number
13
19
  primaryId: string
@@ -15,6 +21,7 @@ export type ObjectQueryObject = {
15
21
  properties: {
16
22
  [key: string]: unknown
17
23
  }
24
+ redactions?: Redactions
18
25
  createdAt: string
19
26
  updatedAt: string
20
27
  links?: {
@@ -418,6 +425,7 @@ export type GetAuthSessionResponses = {
418
425
  200:
419
426
  | {
420
427
  authenticated: false
428
+ authEnabled: boolean
421
429
  }
422
430
  | {
423
431
  authenticated: true
@@ -3155,6 +3163,8 @@ export type GetProjectInfoResponses = {
3155
3163
  */
3156
3164
  200: {
3157
3165
  id: string
3166
+ locale: string
3167
+ timeZone: string
3158
3168
  }
3159
3169
  }
3160
3170
 
@@ -4872,7 +4882,7 @@ export type ListDatasetRowsData = {
4872
4882
  }
4873
4883
  query?: {
4874
4884
  versionId?: string
4875
- columns?: string
4885
+ columns?: Array<string>
4876
4886
  limit?: string
4877
4887
  offset?: string
4878
4888
  }
@@ -4942,6 +4952,11 @@ export type ListDatasetRowsResponses = {
4942
4952
  sizeBytes?: number
4943
4953
  }
4944
4954
  columns: Array<string>
4955
+ redactions?: {
4956
+ [key: string]: {
4957
+ reason: "missing_clearance"
4958
+ }
4959
+ }
4945
4960
  rows: Array<{
4946
4961
  [key: string]: unknown
4947
4962
  }>
@@ -6973,6 +6988,9 @@ export type GetWorkflowAgentNodeExecutionResponses = {
6973
6988
  }
6974
6989
  | null
6975
6990
  }
6991
+ | {
6992
+ type: "continuation"
6993
+ }
6976
6994
  | {
6977
6995
  type: "reasoning"
6978
6996
  text: string
@@ -7039,6 +7057,10 @@ export type GetWorkflowAgentNodeExecutionResponses = {
7039
7057
  objectTypeId: string
7040
7058
  primaryId: string
7041
7059
  }
7060
+ /**
7061
+ * Shown in the chat instead of the object's title. Never sent to the model.
7062
+ */
7063
+ label?: string
7042
7064
  }
7043
7065
  | {
7044
7066
  kind: "app-state"
@@ -8710,6 +8732,11 @@ export type ListObjectsResponses = {
8710
8732
  properties: {
8711
8733
  [key: string]: unknown
8712
8734
  }
8735
+ redactions?: {
8736
+ [key: string]: {
8737
+ reason: "missing_clearance"
8738
+ }
8739
+ }
8713
8740
  createdAt: string
8714
8741
  updatedAt: string
8715
8742
  }>
@@ -9039,6 +9066,11 @@ export type GetObjectResponses = {
9039
9066
  properties: {
9040
9067
  [key: string]: unknown
9041
9068
  }
9069
+ redactions?: {
9070
+ [key: string]: {
9071
+ reason: "missing_clearance"
9072
+ }
9073
+ }
9042
9074
  createdAt: string
9043
9075
  updatedAt: string
9044
9076
  }
@@ -9094,6 +9126,11 @@ export type UpsertObjectResponses = {
9094
9126
  properties: {
9095
9127
  [key: string]: unknown
9096
9128
  }
9129
+ redactions?: {
9130
+ [key: string]: {
9131
+ reason: "missing_clearance"
9132
+ }
9133
+ }
9097
9134
  createdAt: string
9098
9135
  updatedAt: string
9099
9136
  }
@@ -10383,6 +10420,9 @@ export type ListAgentThreadMessagesResponses = {
10383
10420
  }
10384
10421
  | null
10385
10422
  }
10423
+ | {
10424
+ type: "continuation"
10425
+ }
10386
10426
  | {
10387
10427
  type: "reasoning"
10388
10428
  text: string
@@ -10449,6 +10489,10 @@ export type ListAgentThreadMessagesResponses = {
10449
10489
  objectTypeId: string
10450
10490
  primaryId: string
10451
10491
  }
10492
+ /**
10493
+ * Shown in the chat instead of the object's title. Never sent to the model.
10494
+ */
10495
+ label?: string
10452
10496
  }
10453
10497
  | {
10454
10498
  kind: "app-state"
@@ -10557,8 +10601,9 @@ export type ListAgentThreadMessagesResponses = {
10557
10601
  | "output_collection_failed"
10558
10602
  | "output_file_changed"
10559
10603
  | "output_storage_failed"
10604
+ | "step_limit_reached"
10560
10605
  severity: "warning" | "error"
10561
- scope: "output"
10606
+ scope: "output" | "run"
10562
10607
  path?: string
10563
10608
  message: string
10564
10609
  }>
@@ -10593,7 +10638,8 @@ export type ListAgentThreadMessagesResponse =
10593
10638
 
10594
10639
  export type PostAgentThreadMessageData = {
10595
10640
  body: {
10596
- text: string
10641
+ text?: string
10642
+ continue?: true
10597
10643
  model?: {
10598
10644
  provider: string
10599
10645
  modelId: string
@@ -10610,6 +10656,8 @@ export type PostAgentThreadMessageData = {
10610
10656
  | {
10611
10657
  budgetTokens: number
10612
10658
  }
10659
+ timeZone?: string
10660
+ locale?: string
10613
10661
  attachments?: Array<{
10614
10662
  blobId: string
10615
10663
  digest: string
@@ -10626,6 +10674,10 @@ export type PostAgentThreadMessageData = {
10626
10674
  objectTypeId: string
10627
10675
  primaryId: string
10628
10676
  }
10677
+ /**
10678
+ * Shown in the chat instead of the object's title. Never sent to the model.
10679
+ */
10680
+ label?: string
10629
10681
  }
10630
10682
  | {
10631
10683
  kind: "app-state"
@@ -10662,6 +10714,7 @@ export type PostAgentThreadMessageErrors = {
10662
10714
  */
10663
10715
  400: {
10664
10716
  error: string
10717
+ code?: string
10665
10718
  }
10666
10719
  /**
10667
10720
  * Response for status 403
@@ -10752,6 +10805,7 @@ export type PostAgentThreadMessageResponses = {
10752
10805
  | "content-filter"
10753
10806
  | "tool-calls"
10754
10807
  | "timeout"
10808
+ | "interrupted"
10755
10809
  | "error"
10756
10810
  | "other"
10757
10811
  | "unknown"
@@ -10787,8 +10841,9 @@ export type PostAgentThreadMessageResponses = {
10787
10841
  | "output_collection_failed"
10788
10842
  | "output_file_changed"
10789
10843
  | "output_storage_failed"
10844
+ | "step_limit_reached"
10790
10845
  severity: "warning" | "error"
10791
- scope: "output"
10846
+ scope: "output" | "run"
10792
10847
  path?: string
10793
10848
  message: string
10794
10849
  }>
@@ -11019,6 +11074,7 @@ export type CancelAgentRunResponses = {
11019
11074
  | "content-filter"
11020
11075
  | "tool-calls"
11021
11076
  | "timeout"
11077
+ | "interrupted"
11022
11078
  | "error"
11023
11079
  | "other"
11024
11080
  | "unknown"
@@ -11054,8 +11110,9 @@ export type CancelAgentRunResponses = {
11054
11110
  | "output_collection_failed"
11055
11111
  | "output_file_changed"
11056
11112
  | "output_storage_failed"
11113
+ | "step_limit_reached"
11057
11114
  severity: "warning" | "error"
11058
- scope: "output"
11115
+ scope: "output" | "run"
11059
11116
  path?: string
11060
11117
  message: string
11061
11118
  }>
@@ -11195,6 +11252,7 @@ export type RetryAgentRunResponses = {
11195
11252
  | "content-filter"
11196
11253
  | "tool-calls"
11197
11254
  | "timeout"
11255
+ | "interrupted"
11198
11256
  | "error"
11199
11257
  | "other"
11200
11258
  | "unknown"
@@ -11230,8 +11288,9 @@ export type RetryAgentRunResponses = {
11230
11288
  | "output_collection_failed"
11231
11289
  | "output_file_changed"
11232
11290
  | "output_storage_failed"
11291
+ | "step_limit_reached"
11233
11292
  severity: "warning" | "error"
11234
- scope: "output"
11293
+ scope: "output" | "run"
11235
11294
  path?: string
11236
11295
  message: string
11237
11296
  }>
@@ -11347,6 +11406,7 @@ export type ListAgentThreadRunsResponses = {
11347
11406
  | "content-filter"
11348
11407
  | "tool-calls"
11349
11408
  | "timeout"
11409
+ | "interrupted"
11350
11410
  | "error"
11351
11411
  | "other"
11352
11412
  | "unknown"
@@ -11382,8 +11442,9 @@ export type ListAgentThreadRunsResponses = {
11382
11442
  | "output_collection_failed"
11383
11443
  | "output_file_changed"
11384
11444
  | "output_storage_failed"
11445
+ | "step_limit_reached"
11385
11446
  severity: "warning" | "error"
11386
- scope: "output"
11447
+ scope: "output" | "run"
11387
11448
  path?: string
11388
11449
  message: string
11389
11450
  }>
@@ -11496,6 +11557,7 @@ export type GetAgentRunResponses = {
11496
11557
  | "content-filter"
11497
11558
  | "tool-calls"
11498
11559
  | "timeout"
11560
+ | "interrupted"
11499
11561
  | "error"
11500
11562
  | "other"
11501
11563
  | "unknown"
@@ -11531,8 +11593,9 @@ export type GetAgentRunResponses = {
11531
11593
  | "output_collection_failed"
11532
11594
  | "output_file_changed"
11533
11595
  | "output_storage_failed"
11596
+ | "step_limit_reached"
11534
11597
  severity: "warning" | "error"
11535
- scope: "output"
11598
+ scope: "output" | "run"
11536
11599
  path?: string
11537
11600
  message: string
11538
11601
  }>
@@ -11607,6 +11670,15 @@ export type ListModelsResponses = {
11607
11670
  reasoningLevels: Array<
11608
11671
  "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max"
11609
11672
  >
11673
+ defaultReasoning?:
11674
+ | "provider-default"
11675
+ | "none"
11676
+ | "minimal"
11677
+ | "low"
11678
+ | "medium"
11679
+ | "high"
11680
+ | "xhigh"
11681
+ | "max"
11610
11682
  }>
11611
11683
  }
11612
11684
  }
@@ -12155,6 +12227,11 @@ export type ListEventsResponses = {
12155
12227
  after: null
12156
12228
  }
12157
12229
  }
12230
+ redactions?: {
12231
+ [key: string]: {
12232
+ reason: "missing_clearance"
12233
+ }
12234
+ }
12158
12235
  }
12159
12236
  }
12160
12237
  | {
@@ -12317,6 +12394,11 @@ export type ListEventsResponses = {
12317
12394
  after: null
12318
12395
  }
12319
12396
  }
12397
+ redactions?: {
12398
+ [key: string]: {
12399
+ reason: "missing_clearance"
12400
+ }
12401
+ }
12320
12402
  }
12321
12403
  }
12322
12404
  | {
@@ -12468,6 +12550,11 @@ export type ListEventsResponses = {
12468
12550
  after: null
12469
12551
  }
12470
12552
  }
12553
+ redactions?: {
12554
+ [key: string]: {
12555
+ reason: "missing_clearance"
12556
+ }
12557
+ }
12471
12558
  }
12472
12559
  }
12473
12560
  | {