@sixb/client 0.1.24 → 0.2.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.
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-0p42gyb5.js} +12 -7
  6. package/dist/{chunk-1zthvcby.js.map → chunk-0p42gyb5.js.map} +3 -3
  7. package/dist/{chunk-z28fxqd0.js → chunk-3kfn00we.js} +1 -1
  8. package/dist/{chunk-2ezmcce2.js → chunk-hkn0keqj.js} +1 -1
  9. package/dist/{chunk-14c2tg81.js → chunk-k2na62sa.js} +64 -40
  10. package/dist/chunk-k2na62sa.js.map +19 -0
  11. package/dist/{chunk-fzpxv5j5.js → chunk-r50kxqa5.js} +2 -2
  12. package/dist/{chunk-4xavy5bx.js → chunk-rrexv1gk.js} +52 -4
  13. package/dist/chunk-rrexv1gk.js.map +11 -0
  14. package/dist/connectors/queries.d.ts.map +1 -1
  15. package/dist/generated/@tanstack/react-query.gen.d.ts +2905 -476
  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 +47 -15
  20. package/dist/generated/sdk.gen.d.ts.map +1 -1
  21. package/dist/generated/types.gen.d.ts +1250 -243
  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 +334 -77
  26. package/dist/hooks.js.map +8 -6
  27. package/dist/index.js +23 -15
  28. package/dist/index.js.map +1 -1
  29. package/dist/logs.js +3 -3
  30. package/dist/models.js +19 -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 +47 -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 +240 -105
  46. package/src/generated/index.ts +47 -24
  47. package/src/generated/sdk.gen.ts +177 -73
  48. package/src/generated/types.gen.ts +1359 -169
  49. package/src/hooks.ts +11 -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 +77 -0
  55. package/dist/chunk-14c2tg81.js.map +0 -19
  56. package/dist/chunk-4xavy5bx.js.map +0 -10
  57. /package/dist/{chunk-z28fxqd0.js.map → chunk-3kfn00we.js.map} +0 -0
  58. /package/dist/{chunk-2ezmcce2.js.map → chunk-hkn0keqj.js.map} +0 -0
  59. /package/dist/{chunk-fzpxv5j5.js.map → chunk-r50kxqa5.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,
@@ -556,6 +571,9 @@ import type {
556
571
  StartConnectorConnectionRunData,
557
572
  StartConnectorConnectionRunErrors,
558
573
  StartConnectorConnectionRunResponses,
574
+ StopAgentBackgroundCommandData,
575
+ StopAgentBackgroundCommandErrors,
576
+ StopAgentBackgroundCommandResponses,
559
577
  SubmitWorkflowInterventionData,
560
578
  SubmitWorkflowInterventionErrors,
561
579
  SubmitWorkflowInterventionResponses,
@@ -583,12 +601,6 @@ import type {
583
601
  UploadFileRawData,
584
602
  UploadFileRawErrors,
585
603
  UploadFileRawResponses,
586
- UpsertObjectData,
587
- UpsertObjectErrors,
588
- UpsertObjectLinkData,
589
- UpsertObjectLinkErrors,
590
- UpsertObjectLinkResponses,
591
- UpsertObjectResponses,
592
604
  } from "./types.gen"
593
605
 
594
606
  export type Options<
@@ -1745,6 +1757,27 @@ export const getDatasetVersion = <ThrowOnError extends boolean = false>(
1745
1757
  }
1746
1758
  )
1747
1759
 
1760
+ /**
1761
+ * Get the versions a dataset version is computed from
1762
+ *
1763
+ * 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`.
1764
+ */
1765
+ export const getDatasetVersionLineage = <ThrowOnError extends boolean = false>(
1766
+ options: Options<GetDatasetVersionLineageData, ThrowOnError>
1767
+ ) =>
1768
+ (options.client ?? client).get<
1769
+ GetDatasetVersionLineageResponses,
1770
+ GetDatasetVersionLineageErrors,
1771
+ ThrowOnError
1772
+ >({
1773
+ security: [
1774
+ { scheme: "bearer", type: "http" },
1775
+ { scheme: "bearer", type: "http" },
1776
+ ],
1777
+ url: "/api/datasets/{datasetId}/versions/{versionId}/lineage",
1778
+ ...options,
1779
+ })
1780
+
1748
1781
  /**
1749
1782
  * Preview dataset rows
1750
1783
  */
@@ -2556,23 +2589,20 @@ export const getObject = <ThrowOnError extends boolean = false>(
2556
2589
  })
2557
2590
 
2558
2591
  /**
2559
- * Create or update object
2592
+ * Get where an object's values come from
2593
+ *
2594
+ * 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
2595
  */
2561
- export const upsertObject = <ThrowOnError extends boolean = false>(
2562
- options: Options<UpsertObjectData, ThrowOnError>
2596
+ export const getObjectLineage = <ThrowOnError extends boolean = false>(
2597
+ options: Options<GetObjectLineageData, ThrowOnError>
2563
2598
  ) =>
2564
- (options.client ?? client).put<UpsertObjectResponses, UpsertObjectErrors, ThrowOnError>({
2599
+ (options.client ?? client).get<GetObjectLineageResponses, GetObjectLineageErrors, ThrowOnError>({
2565
2600
  security: [
2566
- { name: "x-sixb-csrf", type: "apiKey" },
2567
2601
  { scheme: "bearer", type: "http" },
2568
2602
  { scheme: "bearer", type: "http" },
2569
2603
  ],
2570
- url: "/api/objects/{objectTypeId}/{objectId}",
2604
+ url: "/api/objects/{objectTypeId}/{objectId}/lineage",
2571
2605
  ...options,
2572
- headers: {
2573
- "Content-Type": "application/json",
2574
- ...options.headers,
2575
- },
2576
2606
  })
2577
2607
 
2578
2608
  /**
@@ -2999,7 +3029,10 @@ export const listAgentThreadMessages = <ThrowOnError extends boolean = false>(
2999
3029
  ListAgentThreadMessagesErrors,
3000
3030
  ThrowOnError
3001
3031
  >({
3002
- security: [{ scheme: "bearer", type: "http" }],
3032
+ security: [
3033
+ { scheme: "bearer", type: "http" },
3034
+ { scheme: "bearer", type: "http" },
3035
+ ],
3003
3036
  url: "/api/agent-threads/{threadId}/messages",
3004
3037
  ...options,
3005
3038
  })
@@ -3103,6 +3136,24 @@ export const retryAgentRun = <ThrowOnError extends boolean = false>(
3103
3136
  ...options,
3104
3137
  })
3105
3138
 
3139
+ /**
3140
+ * Measure an agent thread's context against a model's limits
3141
+ *
3142
+ * What the conversation's next request starts from, the model's limit, and the latest compaction. Read by the context meter after each turn.
3143
+ */
3144
+ export const getAgentThreadContext = <ThrowOnError extends boolean = false>(
3145
+ options: Options<GetAgentThreadContextData, ThrowOnError>
3146
+ ) =>
3147
+ (options.client ?? client).get<
3148
+ GetAgentThreadContextResponses,
3149
+ GetAgentThreadContextErrors,
3150
+ ThrowOnError
3151
+ >({
3152
+ security: [{ scheme: "bearer", type: "http" }],
3153
+ url: "/api/agent-threads/{threadId}/context",
3154
+ ...options,
3155
+ })
3156
+
3106
3157
  /**
3107
3158
  * List an agent thread's runs
3108
3159
  */
@@ -3213,9 +3264,30 @@ export const headAgentChildFileContent = <ThrowOnError extends boolean = false>(
3213
3264
  })
3214
3265
 
3215
3266
  /**
3216
- * Move a thread to another of your computers
3267
+ * Move a thread from your computer to the cloud
3268
+ *
3269
+ * 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.
3270
+ */
3271
+ export const moveAgentThreadToCloud = <ThrowOnError extends boolean = false>(
3272
+ options: Options<MoveAgentThreadToCloudData, ThrowOnError>
3273
+ ) =>
3274
+ (options.client ?? client).delete<
3275
+ MoveAgentThreadToCloudResponses,
3276
+ MoveAgentThreadToCloudErrors,
3277
+ ThrowOnError
3278
+ >({
3279
+ security: [
3280
+ { name: "x-sixb-csrf", type: "apiKey" },
3281
+ { scheme: "bearer", type: "http" },
3282
+ ],
3283
+ url: "/api/agent-threads/{threadId}/computer",
3284
+ ...options,
3285
+ })
3286
+
3287
+ /**
3288
+ * Move a thread to one of your computers, in a folder there
3217
3289
  *
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.
3290
+ * 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
3291
  */
3220
3292
  export const moveAgentThreadToComputer = <ThrowOnError extends boolean = false>(
3221
3293
  options: Options<MoveAgentThreadToComputerData, ThrowOnError>
@@ -3237,6 +3309,77 @@ export const moveAgentThreadToComputer = <ThrowOnError extends boolean = false>(
3237
3309
  },
3238
3310
  })
3239
3311
 
3312
+ /**
3313
+ * Close a computer session
3314
+ *
3315
+ * `sixb` closes its session when it quits.
3316
+ */
3317
+ export const releaseAgentComputerSession = <ThrowOnError extends boolean = false>(
3318
+ options: Options<ReleaseAgentComputerSessionData, ThrowOnError>
3319
+ ) =>
3320
+ (options.client ?? client).delete<
3321
+ ReleaseAgentComputerSessionResponses,
3322
+ ReleaseAgentComputerSessionErrors,
3323
+ ThrowOnError
3324
+ >({
3325
+ security: [
3326
+ { name: "x-sixb-csrf", type: "apiKey" },
3327
+ { scheme: "bearer", type: "http" },
3328
+ ],
3329
+ url: "/api/agent-computers/sessions/{sessionId}",
3330
+ ...options,
3331
+ })
3332
+
3333
+ /**
3334
+ * Open or renew a computer session
3335
+ *
3336
+ * `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. It reports the background commands it runs for your threads; the answer lists the turns waiting for it, and the commands someone asked to stop.
3337
+ */
3338
+ export const holdAgentComputerSession = <ThrowOnError extends boolean = false>(
3339
+ options: Options<HoldAgentComputerSessionData, ThrowOnError>
3340
+ ) =>
3341
+ (options.client ?? client).put<
3342
+ HoldAgentComputerSessionResponses,
3343
+ HoldAgentComputerSessionErrors,
3344
+ ThrowOnError
3345
+ >({
3346
+ security: [
3347
+ { name: "x-sixb-csrf", type: "apiKey" },
3348
+ { scheme: "bearer", type: "http" },
3349
+ ],
3350
+ url: "/api/agent-computers/sessions/{sessionId}",
3351
+ ...options,
3352
+ headers: {
3353
+ "Content-Type": "application/json",
3354
+ ...options.headers,
3355
+ },
3356
+ })
3357
+
3358
+ /**
3359
+ * Stop a background command on your computer
3360
+ *
3361
+ * A command the agent ran in the background on your computer keeps running after its turn. `sixb` there stops it, and everything it started, at its next renewal, which this asks for at once. The thread's owner alone stops it.
3362
+ */
3363
+ export const stopAgentBackgroundCommand = <ThrowOnError extends boolean = false>(
3364
+ options: Options<StopAgentBackgroundCommandData, ThrowOnError>
3365
+ ) =>
3366
+ (options.client ?? client).post<
3367
+ StopAgentBackgroundCommandResponses,
3368
+ StopAgentBackgroundCommandErrors,
3369
+ ThrowOnError
3370
+ >({
3371
+ security: [
3372
+ { name: "x-sixb-csrf", type: "apiKey" },
3373
+ { scheme: "bearer", type: "http" },
3374
+ ],
3375
+ url: "/api/agent-threads/{threadId}/background-commands/{commandId}/stop",
3376
+ ...options,
3377
+ headers: {
3378
+ "Content-Type": "application/json",
3379
+ ...options.headers,
3380
+ },
3381
+ })
3382
+
3240
3383
  /**
3241
3384
  * Get your Agent preferences
3242
3385
  */
@@ -3847,63 +3990,24 @@ export const listModels = <ThrowOnError extends boolean = false>(
3847
3990
  })
3848
3991
 
3849
3992
  /**
3850
- * Remove object link
3993
+ * Get where an object link comes from
3994
+ *
3995
+ * What makes the link exist, for the current state. Steps the caller cannot view are left out and counted in `restricted`.
3851
3996
  */
3852
- export const removeObjectLink = <ThrowOnError extends boolean = false>(
3853
- options: Options<RemoveObjectLinkData, ThrowOnError>
3997
+ export const getObjectLinkLineage = <ThrowOnError extends boolean = false>(
3998
+ options: Options<GetObjectLinkLineageData, ThrowOnError>
3854
3999
  ) =>
3855
- (options.client ?? client).delete<
3856
- RemoveObjectLinkResponses,
3857
- RemoveObjectLinkErrors,
4000
+ (options.client ?? client).get<
4001
+ GetObjectLinkLineageResponses,
4002
+ GetObjectLinkLineageErrors,
3858
4003
  ThrowOnError
3859
4004
  >({
3860
4005
  security: [
3861
- { name: "x-sixb-csrf", type: "apiKey" },
3862
- { scheme: "bearer", type: "http" },
3863
- { scheme: "bearer", type: "http" },
3864
- ],
3865
- url: "/api/objects/{objectTypeId}/{objectId}/links/{linkId}",
3866
- ...options,
3867
- })
3868
-
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
4006
  { scheme: "bearer", type: "http" },
3899
4007
  { scheme: "bearer", type: "http" },
3900
4008
  ],
3901
- url: "/api/objects/{objectTypeId}/{objectId}/telemetry/{propertyId}",
4009
+ url: "/api/objects/{objectTypeId}/{objectId}/links/{linkId}/lineage",
3902
4010
  ...options,
3903
- headers: {
3904
- "Content-Type": "application/json",
3905
- ...options.headers,
3906
- },
3907
4011
  })
3908
4012
 
3909
4013
  /**