@sixb/client 0.1.24 → 0.2.0

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 (59) hide show
  1. package/README.md +1 -1
  2. package/dist/agent-streams.d.ts +9 -2
  3. package/dist/agent-streams.d.ts.map +1 -1
  4. package/dist/browser.js +2 -2
  5. package/dist/{chunk-1zthvcby.js → chunk-1wdszw1c.js} +12 -7
  6. package/dist/{chunk-1zthvcby.js.map → chunk-1wdszw1c.js.map} +3 -3
  7. package/dist/{chunk-14c2tg81.js → chunk-2qsekqcn.js} +52 -40
  8. package/dist/chunk-2qsekqcn.js.map +19 -0
  9. package/dist/{chunk-fzpxv5j5.js → chunk-fnd56xxz.js} +2 -2
  10. package/dist/{chunk-z28fxqd0.js → chunk-mk0w4zr1.js} +1 -1
  11. package/dist/{chunk-4xavy5bx.js → chunk-s2pagg09.js} +52 -4
  12. package/dist/chunk-s2pagg09.js.map +11 -0
  13. package/dist/{chunk-2ezmcce2.js → chunk-sh0f609h.js} +1 -1
  14. package/dist/connectors/queries.d.ts.map +1 -1
  15. package/dist/generated/@tanstack/react-query.gen.d.ts +2661 -432
  16. package/dist/generated/@tanstack/react-query.gen.d.ts.map +1 -1
  17. package/dist/generated/index.d.ts +2 -2
  18. package/dist/generated/index.d.ts.map +1 -1
  19. package/dist/generated/sdk.gen.d.ts +41 -15
  20. package/dist/generated/sdk.gen.d.ts.map +1 -1
  21. package/dist/generated/types.gen.d.ts +1003 -169
  22. package/dist/generated/types.gen.d.ts.map +1 -1
  23. package/dist/hooks.d.ts +2 -0
  24. package/dist/hooks.d.ts.map +1 -1
  25. package/dist/hooks.js +319 -77
  26. package/dist/hooks.js.map +8 -6
  27. package/dist/index.js +21 -15
  28. package/dist/index.js.map +1 -1
  29. package/dist/logs.js +3 -3
  30. package/dist/models.js +17 -11
  31. package/dist/models.js.map +1 -1
  32. package/dist/object-query-live-updates.d.ts +34 -0
  33. package/dist/object-query-live-updates.d.ts.map +1 -0
  34. package/dist/object-query-reads.d.ts +8 -0
  35. package/dist/object-query-reads.d.ts.map +1 -0
  36. package/dist/query.d.ts.map +1 -1
  37. package/dist/query.js +3 -3
  38. package/dist/useAgentActivityStream.d.ts +4 -1
  39. package/dist/useAgentActivityStream.d.ts.map +1 -1
  40. package/dist/useDesktop.d.ts +22 -0
  41. package/dist/useDesktop.d.ts.map +1 -0
  42. package/dist/users-hooks.d.ts.map +1 -1
  43. package/package.json +2 -2
  44. package/src/agent-streams.ts +16 -2
  45. package/src/generated/@tanstack/react-query.gen.ts +207 -105
  46. package/src/generated/index.ts +41 -24
  47. package/src/generated/sdk.gen.ts +149 -73
  48. package/src/generated/types.gen.ts +1187 -182
  49. package/src/hooks.ts +5 -0
  50. package/src/object-query-live-updates.ts +276 -0
  51. package/src/object-query-reads.ts +72 -0
  52. package/src/query.ts +5 -0
  53. package/src/useAgentActivityStream.ts +11 -0
  54. package/src/useDesktop.ts +50 -0
  55. package/dist/chunk-14c2tg81.js.map +0 -19
  56. package/dist/chunk-4xavy5bx.js.map +0 -10
  57. /package/dist/{chunk-fzpxv5j5.js.map → chunk-fnd56xxz.js.map} +0 -0
  58. /package/dist/{chunk-z28fxqd0.js.map → chunk-mk0w4zr1.js.map} +0 -0
  59. /package/dist/{chunk-2ezmcce2.js.map → chunk-sh0f609h.js.map} +0 -0
@@ -17,9 +17,6 @@ import type {
17
17
  AddConnectorConnectionData,
18
18
  AddConnectorConnectionErrors,
19
19
  AddConnectorConnectionResponses,
20
- AppendTelemetryData,
21
- AppendTelemetryErrors,
22
- AppendTelemetryResponses,
23
20
  CancelAgentRunByIdData,
24
21
  CancelAgentRunByIdErrors,
25
22
  CancelAgentRunByIdResponses,
@@ -157,6 +154,9 @@ import type {
157
154
  GetAgentRunData,
158
155
  GetAgentRunErrors,
159
156
  GetAgentRunResponses,
157
+ GetAgentThreadContextData,
158
+ GetAgentThreadContextErrors,
159
+ GetAgentThreadContextResponses,
160
160
  GetAgentThreadData,
161
161
  GetAgentThreadErrors,
162
162
  GetAgentThreadResponses,
@@ -218,6 +218,9 @@ import type {
218
218
  GetDatasetResponses,
219
219
  GetDatasetVersionData,
220
220
  GetDatasetVersionErrors,
221
+ GetDatasetVersionLineageData,
222
+ GetDatasetVersionLineageErrors,
223
+ GetDatasetVersionLineageResponses,
221
224
  GetDatasetVersionResponses,
222
225
  GetLatestTelemetryData,
223
226
  GetLatestTelemetryErrors,
@@ -230,6 +233,12 @@ import type {
230
233
  GetObjectFileContentData,
231
234
  GetObjectFileContentErrors,
232
235
  GetObjectFileContentResponses,
236
+ GetObjectLineageData,
237
+ GetObjectLineageErrors,
238
+ GetObjectLineageResponses,
239
+ GetObjectLinkLineageData,
240
+ GetObjectLinkLineageErrors,
241
+ GetObjectLinkLineageResponses,
233
242
  GetObjectResponses,
234
243
  GetObjectTypeData,
235
244
  GetObjectTypeErrors,
@@ -316,6 +325,9 @@ import type {
316
325
  HeadWorkflowRunFileContentData,
317
326
  HeadWorkflowRunFileContentErrors,
318
327
  HeadWorkflowRunFileContentResponses,
328
+ HoldAgentComputerSessionData,
329
+ HoldAgentComputerSessionErrors,
330
+ HoldAgentComputerSessionResponses,
319
331
  IssueSharedAccessGrantData,
320
332
  IssueSharedAccessGrantErrors,
321
333
  IssueSharedAccessGrantResponses,
@@ -460,6 +472,9 @@ import type {
460
472
  ListWorkflowRunsResponses,
461
473
  ListWorkflowsData,
462
474
  ListWorkflowsResponses,
475
+ MoveAgentThreadToCloudData,
476
+ MoveAgentThreadToCloudErrors,
477
+ MoveAgentThreadToCloudResponses,
463
478
  MoveAgentThreadToComputerData,
464
479
  MoveAgentThreadToComputerErrors,
465
480
  MoveAgentThreadToComputerResponses,
@@ -487,12 +502,12 @@ import type {
487
502
  RefreshAuthSessionData,
488
503
  RefreshAuthSessionErrors,
489
504
  RefreshAuthSessionResponses,
505
+ ReleaseAgentComputerSessionData,
506
+ ReleaseAgentComputerSessionErrors,
507
+ ReleaseAgentComputerSessionResponses,
490
508
  RemoveAgentThreadParticipantData,
491
509
  RemoveAgentThreadParticipantErrors,
492
510
  RemoveAgentThreadParticipantResponses,
493
- RemoveObjectLinkData,
494
- RemoveObjectLinkErrors,
495
- RemoveObjectLinkResponses,
496
511
  RequestActionData,
497
512
  RequestActionErrors,
498
513
  RequestActionResponses,
@@ -583,12 +598,6 @@ import type {
583
598
  UploadFileRawData,
584
599
  UploadFileRawErrors,
585
600
  UploadFileRawResponses,
586
- UpsertObjectData,
587
- UpsertObjectErrors,
588
- UpsertObjectLinkData,
589
- UpsertObjectLinkErrors,
590
- UpsertObjectLinkResponses,
591
- UpsertObjectResponses,
592
601
  } from "./types.gen"
593
602
 
594
603
  export type Options<
@@ -1745,6 +1754,27 @@ export const getDatasetVersion = <ThrowOnError extends boolean = false>(
1745
1754
  }
1746
1755
  )
1747
1756
 
1757
+ /**
1758
+ * Get the versions a dataset version is computed from
1759
+ *
1760
+ * Walks the version's inputs upstream, `depth` steps (1 to 20, default 5). A version whose dataset the caller cannot view is left out with everything upstream of it, and counted in `restricted`.
1761
+ */
1762
+ export const getDatasetVersionLineage = <ThrowOnError extends boolean = false>(
1763
+ options: Options<GetDatasetVersionLineageData, ThrowOnError>
1764
+ ) =>
1765
+ (options.client ?? client).get<
1766
+ GetDatasetVersionLineageResponses,
1767
+ GetDatasetVersionLineageErrors,
1768
+ ThrowOnError
1769
+ >({
1770
+ security: [
1771
+ { scheme: "bearer", type: "http" },
1772
+ { scheme: "bearer", type: "http" },
1773
+ ],
1774
+ url: "/api/datasets/{datasetId}/versions/{versionId}/lineage",
1775
+ ...options,
1776
+ })
1777
+
1748
1778
  /**
1749
1779
  * Preview dataset rows
1750
1780
  */
@@ -2556,23 +2586,20 @@ export const getObject = <ThrowOnError extends boolean = false>(
2556
2586
  })
2557
2587
 
2558
2588
  /**
2559
- * Create or update object
2589
+ * Get where an object's values come from
2590
+ *
2591
+ * What makes the object exist and what decided each property it holds, for the current state. Steps the caller cannot view are left out and counted in `restricted`.
2560
2592
  */
2561
- export const upsertObject = <ThrowOnError extends boolean = false>(
2562
- options: Options<UpsertObjectData, ThrowOnError>
2593
+ export const getObjectLineage = <ThrowOnError extends boolean = false>(
2594
+ options: Options<GetObjectLineageData, ThrowOnError>
2563
2595
  ) =>
2564
- (options.client ?? client).put<UpsertObjectResponses, UpsertObjectErrors, ThrowOnError>({
2596
+ (options.client ?? client).get<GetObjectLineageResponses, GetObjectLineageErrors, ThrowOnError>({
2565
2597
  security: [
2566
- { name: "x-sixb-csrf", type: "apiKey" },
2567
2598
  { scheme: "bearer", type: "http" },
2568
2599
  { scheme: "bearer", type: "http" },
2569
2600
  ],
2570
- url: "/api/objects/{objectTypeId}/{objectId}",
2601
+ url: "/api/objects/{objectTypeId}/{objectId}/lineage",
2571
2602
  ...options,
2572
- headers: {
2573
- "Content-Type": "application/json",
2574
- ...options.headers,
2575
- },
2576
2603
  })
2577
2604
 
2578
2605
  /**
@@ -2999,7 +3026,10 @@ export const listAgentThreadMessages = <ThrowOnError extends boolean = false>(
2999
3026
  ListAgentThreadMessagesErrors,
3000
3027
  ThrowOnError
3001
3028
  >({
3002
- security: [{ scheme: "bearer", type: "http" }],
3029
+ security: [
3030
+ { scheme: "bearer", type: "http" },
3031
+ { scheme: "bearer", type: "http" },
3032
+ ],
3003
3033
  url: "/api/agent-threads/{threadId}/messages",
3004
3034
  ...options,
3005
3035
  })
@@ -3103,6 +3133,24 @@ export const retryAgentRun = <ThrowOnError extends boolean = false>(
3103
3133
  ...options,
3104
3134
  })
3105
3135
 
3136
+ /**
3137
+ * Measure an agent thread's context against a model's limits
3138
+ *
3139
+ * What the conversation's next request starts from, the model's limit, and the latest compaction. Read by the context meter after each turn.
3140
+ */
3141
+ export const getAgentThreadContext = <ThrowOnError extends boolean = false>(
3142
+ options: Options<GetAgentThreadContextData, ThrowOnError>
3143
+ ) =>
3144
+ (options.client ?? client).get<
3145
+ GetAgentThreadContextResponses,
3146
+ GetAgentThreadContextErrors,
3147
+ ThrowOnError
3148
+ >({
3149
+ security: [{ scheme: "bearer", type: "http" }],
3150
+ url: "/api/agent-threads/{threadId}/context",
3151
+ ...options,
3152
+ })
3153
+
3106
3154
  /**
3107
3155
  * List an agent thread's runs
3108
3156
  */
@@ -3213,9 +3261,30 @@ export const headAgentChildFileContent = <ThrowOnError extends boolean = false>(
3213
3261
  })
3214
3262
 
3215
3263
  /**
3216
- * Move a thread to another of your computers
3264
+ * Move a thread from your computer to the cloud
3217
3265
  *
3218
- * A thread that runs on its owner's computer runs there alone: its turns are claimed by that computer only. Its owner moves it to another.
3266
+ * Its turns run in the cloud from now on, starting with the one waiting for the computer, if any. The files it worked on stay on the computer. Refused while a turn runs there or waits on approvals.
3267
+ */
3268
+ export const moveAgentThreadToCloud = <ThrowOnError extends boolean = false>(
3269
+ options: Options<MoveAgentThreadToCloudData, ThrowOnError>
3270
+ ) =>
3271
+ (options.client ?? client).delete<
3272
+ MoveAgentThreadToCloudResponses,
3273
+ MoveAgentThreadToCloudErrors,
3274
+ ThrowOnError
3275
+ >({
3276
+ security: [
3277
+ { name: "x-sixb-csrf", type: "apiKey" },
3278
+ { scheme: "bearer", type: "http" },
3279
+ ],
3280
+ url: "/api/agent-threads/{threadId}/computer",
3281
+ ...options,
3282
+ })
3283
+
3284
+ /**
3285
+ * Move a thread to one of your computers, in a folder there
3286
+ *
3287
+ * A thread that runs on its owner's computer runs there alone, in one folder: only `sixb` open in that folder claims its turns. Its owner moves it to another folder or computer. Refused while a turn runs or waits on approvals.
3219
3288
  */
3220
3289
  export const moveAgentThreadToComputer = <ThrowOnError extends boolean = false>(
3221
3290
  options: Options<MoveAgentThreadToComputerData, ThrowOnError>
@@ -3237,6 +3306,52 @@ export const moveAgentThreadToComputer = <ThrowOnError extends boolean = false>(
3237
3306
  },
3238
3307
  })
3239
3308
 
3309
+ /**
3310
+ * Close a computer session
3311
+ *
3312
+ * `sixb` closes its session when it quits.
3313
+ */
3314
+ export const releaseAgentComputerSession = <ThrowOnError extends boolean = false>(
3315
+ options: Options<ReleaseAgentComputerSessionData, ThrowOnError>
3316
+ ) =>
3317
+ (options.client ?? client).delete<
3318
+ ReleaseAgentComputerSessionResponses,
3319
+ ReleaseAgentComputerSessionErrors,
3320
+ ThrowOnError
3321
+ >({
3322
+ security: [
3323
+ { name: "x-sixb-csrf", type: "apiKey" },
3324
+ { scheme: "bearer", type: "http" },
3325
+ ],
3326
+ url: "/api/agent-computers/sessions/{sessionId}",
3327
+ ...options,
3328
+ })
3329
+
3330
+ /**
3331
+ * Open or renew a computer session
3332
+ *
3333
+ * `sixb` holds one while it is open: your threads on this computer, in this folder, read as online, and you can continue them from anywhere. It lapses a minute after its last renewal. The answer lists the turns waiting for it.
3334
+ */
3335
+ export const holdAgentComputerSession = <ThrowOnError extends boolean = false>(
3336
+ options: Options<HoldAgentComputerSessionData, ThrowOnError>
3337
+ ) =>
3338
+ (options.client ?? client).put<
3339
+ HoldAgentComputerSessionResponses,
3340
+ HoldAgentComputerSessionErrors,
3341
+ ThrowOnError
3342
+ >({
3343
+ security: [
3344
+ { name: "x-sixb-csrf", type: "apiKey" },
3345
+ { scheme: "bearer", type: "http" },
3346
+ ],
3347
+ url: "/api/agent-computers/sessions/{sessionId}",
3348
+ ...options,
3349
+ headers: {
3350
+ "Content-Type": "application/json",
3351
+ ...options.headers,
3352
+ },
3353
+ })
3354
+
3240
3355
  /**
3241
3356
  * Get your Agent preferences
3242
3357
  */
@@ -3847,65 +3962,26 @@ export const listModels = <ThrowOnError extends boolean = false>(
3847
3962
  })
3848
3963
 
3849
3964
  /**
3850
- * Remove object link
3965
+ * Get where an object link comes from
3966
+ *
3967
+ * What makes the link exist, for the current state. Steps the caller cannot view are left out and counted in `restricted`.
3851
3968
  */
3852
- export const removeObjectLink = <ThrowOnError extends boolean = false>(
3853
- options: Options<RemoveObjectLinkData, ThrowOnError>
3969
+ export const getObjectLinkLineage = <ThrowOnError extends boolean = false>(
3970
+ options: Options<GetObjectLinkLineageData, ThrowOnError>
3854
3971
  ) =>
3855
- (options.client ?? client).delete<
3856
- RemoveObjectLinkResponses,
3857
- RemoveObjectLinkErrors,
3972
+ (options.client ?? client).get<
3973
+ GetObjectLinkLineageResponses,
3974
+ GetObjectLinkLineageErrors,
3858
3975
  ThrowOnError
3859
3976
  >({
3860
3977
  security: [
3861
- { name: "x-sixb-csrf", type: "apiKey" },
3862
3978
  { scheme: "bearer", type: "http" },
3863
3979
  { scheme: "bearer", type: "http" },
3864
3980
  ],
3865
- url: "/api/objects/{objectTypeId}/{objectId}/links/{linkId}",
3981
+ url: "/api/objects/{objectTypeId}/{objectId}/links/{linkId}/lineage",
3866
3982
  ...options,
3867
3983
  })
3868
3984
 
3869
- /**
3870
- * Create or update object link
3871
- */
3872
- export const upsertObjectLink = <ThrowOnError extends boolean = false>(
3873
- options: Options<UpsertObjectLinkData, ThrowOnError>
3874
- ) =>
3875
- (options.client ?? client).put<UpsertObjectLinkResponses, UpsertObjectLinkErrors, ThrowOnError>({
3876
- security: [
3877
- { name: "x-sixb-csrf", type: "apiKey" },
3878
- { scheme: "bearer", type: "http" },
3879
- { scheme: "bearer", type: "http" },
3880
- ],
3881
- url: "/api/objects/{objectTypeId}/{objectId}/links/{linkId}",
3882
- ...options,
3883
- headers: {
3884
- "Content-Type": "application/json",
3885
- ...options.headers,
3886
- },
3887
- })
3888
-
3889
- /**
3890
- * Append telemetry point
3891
- */
3892
- export const appendTelemetry = <ThrowOnError extends boolean = false>(
3893
- options: Options<AppendTelemetryData, ThrowOnError>
3894
- ) =>
3895
- (options.client ?? client).post<AppendTelemetryResponses, AppendTelemetryErrors, ThrowOnError>({
3896
- security: [
3897
- { name: "x-sixb-csrf", type: "apiKey" },
3898
- { scheme: "bearer", type: "http" },
3899
- { scheme: "bearer", type: "http" },
3900
- ],
3901
- url: "/api/objects/{objectTypeId}/{objectId}/telemetry/{propertyId}",
3902
- ...options,
3903
- headers: {
3904
- "Content-Type": "application/json",
3905
- ...options.headers,
3906
- },
3907
- })
3908
-
3909
3985
  /**
3910
3986
  * Get bulk telemetry history
3911
3987
  */