windmill-client 1.850.0 → 1.851.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.
@@ -6919,6 +6919,10 @@ export type GitRepositorySettings = {
6919
6919
  auto_pull?: AutoPullSettings;
6920
6920
  promotion_open_prs?: boolean;
6921
6921
  fork_open_prs?: boolean;
6922
+ /**
6923
+ * review every pull request against the tracked branch with the workspace's AI
6924
+ */
6925
+ ai_review_prs?: boolean;
6922
6926
  /**
6923
6927
  * server-owned, last failure opening a PR for a deploy branch of this repo
6924
6928
  */
@@ -7221,6 +7225,10 @@ export type RoleCapabilities = {
7221
7225
  apps: AuthorLevel;
7222
7226
  manage_schedules: boolean;
7223
7227
  manage_triggers: boolean;
7228
+ /**
7229
+ * Fork the workspace.
7230
+ */
7231
+ fork: boolean;
7224
7232
  visibility: RoleVisibility;
7225
7233
  };
7226
7234
  /**
@@ -7232,6 +7240,7 @@ export type RoleCapabilitiesPatch = {
7232
7240
  apps?: AuthorLevel;
7233
7241
  manage_schedules?: boolean;
7234
7242
  manage_triggers?: boolean;
7243
+ fork?: boolean;
7235
7244
  visibility?: {
7236
7245
  [key: string]: (boolean);
7237
7246
  };
@@ -7639,6 +7648,13 @@ export type ProtectionRuleset = {
7639
7648
  rules: ProtectionRules;
7640
7649
  bypass_groups: RuleBypasserGroups;
7641
7650
  bypass_users: RuleBypasserUsers;
7651
+ fork_role_mapping?: ForkRoleMapping;
7652
+ };
7653
+ /**
7654
+ * Role a member of this workspace gets in a fork of it, keyed by the role it holds here. Unmapped roles carry over unchanged; where two rulesets map the same role, the first by name wins. On update, omitting it leaves the stored mapping unchanged.
7655
+ */
7656
+ export type ForkRoleMapping = {
7657
+ [key: string]: (string);
7642
7658
  };
7643
7659
  /**
7644
7660
  * Configuration of protection restrictions
@@ -10382,6 +10398,7 @@ export type CreateProtectionRuleData = {
10382
10398
  rules: ProtectionRules;
10383
10399
  bypass_groups: RuleBypasserGroups;
10384
10400
  bypass_users: RuleBypasserUsers;
10401
+ fork_role_mapping?: ForkRoleMapping;
10385
10402
  };
10386
10403
  workspace: string;
10387
10404
  };
@@ -10398,6 +10415,7 @@ export type UpdateProtectionRuleData = {
10398
10415
  rules: ProtectionRules;
10399
10416
  bypass_groups: RuleBypasserGroups;
10400
10417
  bypass_users: RuleBypasserUsers;
10418
+ fork_role_mapping?: ForkRoleMapping;
10401
10419
  };
10402
10420
  /**
10403
10421
  * Name of the protection rule to update
@@ -16320,6 +16338,201 @@ export type UnshareAgentFromSlackChannelData = {
16320
16338
  workspace: string;
16321
16339
  };
16322
16340
  export type UnshareAgentFromSlackChannelResponse = string;
16341
+ export type CompleteAiData = {
16342
+ requestBody: {
16343
+ system: string;
16344
+ user: string;
16345
+ /**
16346
+ * defaults to the AI config's default model
16347
+ */
16348
+ model?: AIProviderModel;
16349
+ max_tokens?: number;
16350
+ };
16351
+ workspace: string;
16352
+ };
16353
+ export type CompleteAiResponse = {
16354
+ text: string;
16355
+ model: AIProviderModel;
16356
+ };
16357
+ export type RecordAiUsageData = {
16358
+ requestBody: {
16359
+ events: Array<AITokenUsageEvent>;
16360
+ };
16361
+ workspace: string;
16362
+ };
16363
+ export type RecordAiUsageResponse = void;
16364
+ export type ListAiUsageData = {
16365
+ days?: number;
16366
+ groupBy?: 'day' | 'user' | 'model';
16367
+ /**
16368
+ * workspace-wide usage (admin only) or the calling user's own
16369
+ */
16370
+ scope?: 'workspace' | 'self';
16371
+ workspace: string;
16372
+ };
16373
+ export type ListAiUsageResponse = {
16374
+ buckets: Array<AITokenUsageBucket>;
16375
+ /**
16376
+ * more buckets matched than were returned, so summing them under-reports
16377
+ */
16378
+ truncated: boolean;
16379
+ };
16380
+ export type ListAiSessionBackupsData = {
16381
+ workspace: string;
16382
+ };
16383
+ export type ListAiSessionBackupsResponse = {
16384
+ enabled: boolean;
16385
+ /**
16386
+ * names the storage answered from; sync state recorded against another one is void
16387
+ */
16388
+ storage_id?: string;
16389
+ /**
16390
+ * bumped by every workspace key rotation; sync state recorded under another one is void
16391
+ */
16392
+ backup_generation?: number;
16393
+ /**
16394
+ * the storage answered from is the instance object store, standing in for a workspace without storage of its own; a removal owed to it is retired by any answer from the workspace's own storage
16395
+ */
16396
+ fallback?: boolean;
16397
+ /**
16398
+ * the newest 500 at most
16399
+ */
16400
+ sessions: Array<AISessionBackupListing>;
16401
+ /**
16402
+ * the user has more sessions than the answer names
16403
+ */
16404
+ truncated?: boolean;
16405
+ };
16406
+ export type PullAiSessionBackupsData = {
16407
+ requestBody: {
16408
+ ids: Array<(string)>;
16409
+ resume?: AISessionBackupCursor;
16410
+ };
16411
+ workspace: string;
16412
+ };
16413
+ export type PullAiSessionBackupsResponse = {
16414
+ enabled: boolean;
16415
+ storage_id?: string;
16416
+ backup_generation?: number;
16417
+ fallback?: boolean;
16418
+ sessions: Array<AISessionBackup>;
16419
+ deferred: Array<(string)>;
16420
+ };
16421
+ export type PushAiSessionBackupsData = {
16422
+ requestBody: {
16423
+ /**
16424
+ * the email the push was prepared for; refused with a 409 when it is not the caller's
16425
+ */
16426
+ owner: string;
16427
+ sessions?: Array<AISessionBackupPush>;
16428
+ removed?: Array<(string)>;
16429
+ };
16430
+ workspace: string;
16431
+ };
16432
+ export type PushAiSessionBackupsResponse = {
16433
+ enabled: boolean;
16434
+ storage_id?: string;
16435
+ backup_generation?: number;
16436
+ fallback?: boolean;
16437
+ results: Array<{
16438
+ id: string;
16439
+ error?: string;
16440
+ /**
16441
+ * nothing was written and the session must be pushed whole again; an incremental part found no listed session to ride on (the backup was removed, or a push split over parts is in progress or was abandoned), or a later part of a push split over parts found another push had superseded it
16442
+ */
16443
+ needs_whole?: boolean;
16444
+ }>;
16445
+ };
16446
+ export type ShareAiArtifactData = {
16447
+ requestBody: {
16448
+ /**
16449
+ * the artifact's id in the author's session
16450
+ */
16451
+ artifact_id: string;
16452
+ name: string;
16453
+ kind: 'md' | 'html';
16454
+ version: number;
16455
+ content: string;
16456
+ };
16457
+ workspace: string;
16458
+ };
16459
+ export type ShareAiArtifactResponse = SharedAiArtifactInfo;
16460
+ export type GetAiArtifactShareStatusData = {
16461
+ artifactId: string;
16462
+ workspace: string;
16463
+ };
16464
+ export type GetAiArtifactShareStatusResponse = {
16465
+ retention_secs: number;
16466
+ share?: SharedAiArtifactInfo;
16467
+ };
16468
+ export type GetSharedAiArtifactData = {
16469
+ id: string;
16470
+ workspace: string;
16471
+ };
16472
+ export type GetSharedAiArtifactResponse = SharedAiArtifactInfo & {
16473
+ content: string;
16474
+ /**
16475
+ * whether the caller authored the share or is a workspace admin
16476
+ */
16477
+ can_unshare: boolean;
16478
+ };
16479
+ export type UnshareAiArtifactData = {
16480
+ id: string;
16481
+ workspace: string;
16482
+ };
16483
+ export type UnshareAiArtifactResponse = string;
16484
+ export type ShareAiSessionData = {
16485
+ requestBody: {
16486
+ /**
16487
+ * the session's id in the author's browser
16488
+ */
16489
+ session_id: string;
16490
+ name: string;
16491
+ /**
16492
+ * left as it is on an existing share when absent; a new share starts private
16493
+ */
16494
+ is_public?: boolean;
16495
+ message_count: number;
16496
+ snapshot: {
16497
+ [key: string]: unknown;
16498
+ };
16499
+ };
16500
+ workspace: string;
16501
+ };
16502
+ export type ShareAiSessionResponse = SharedAiSessionInfo;
16503
+ export type GetAiSessionShareStatusData = {
16504
+ sessionId: string;
16505
+ workspace: string;
16506
+ };
16507
+ export type GetAiSessionShareStatusResponse = {
16508
+ share?: SharedAiSessionInfo;
16509
+ };
16510
+ export type SetAiSessionSharePublicData = {
16511
+ id: string;
16512
+ requestBody: {
16513
+ is_public: boolean;
16514
+ };
16515
+ workspace: string;
16516
+ };
16517
+ export type SetAiSessionSharePublicResponse = SharedAiSessionInfo;
16518
+ export type GetSharedAiSessionData = {
16519
+ id: string;
16520
+ workspace: string;
16521
+ };
16522
+ export type GetSharedAiSessionResponse = SharedAiSessionInfo & {
16523
+ snapshot: {
16524
+ [key: string]: unknown;
16525
+ };
16526
+ /**
16527
+ * whether the caller authored the share or is a workspace admin
16528
+ */
16529
+ can_unshare: boolean;
16530
+ };
16531
+ export type UnshareAiSessionData = {
16532
+ id: string;
16533
+ workspace: string;
16534
+ };
16535
+ export type UnshareAiSessionResponse = string;
16323
16536
  export type ListEvalDatasetsData = {
16324
16537
  workspace: string;
16325
16538
  };
@@ -16564,232 +16777,53 @@ export type ListRawAppsData = {
16564
16777
  workspace: string;
16565
16778
  };
16566
16779
  export type ListRawAppsResponse = Array<ListableRawApp>;
16567
- export type RecordAiUsageData = {
16568
- requestBody: {
16569
- events: Array<AITokenUsageEvent>;
16780
+ export type ResumeSuspendedTriggerJobsData = {
16781
+ /**
16782
+ * Optional list of job IDs to reassign
16783
+ */
16784
+ requestBody?: {
16785
+ /**
16786
+ * Optional list of specific job UUIDs to reassign. If not provided, all suspended jobs for the trigger will be reassigned.
16787
+ */
16788
+ job_ids?: Array<(string)>;
16570
16789
  };
16571
- workspace: string;
16572
- };
16573
- export type RecordAiUsageResponse = void;
16574
- export type ListAiUsageData = {
16575
- days?: number;
16576
- groupBy?: 'day' | 'user' | 'model';
16577
16790
  /**
16578
- * workspace-wide usage (admin only) or the calling user's own
16791
+ * The kind of trigger
16579
16792
  */
16580
- scope?: 'workspace' | 'self';
16581
- workspace: string;
16582
- };
16583
- export type ListAiUsageResponse = {
16584
- buckets: Array<AITokenUsageBucket>;
16793
+ triggerKind: JobTriggerKind;
16585
16794
  /**
16586
- * more buckets matched than were returned, so summing them under-reports
16795
+ * The path of the trigger (can contain forward slashes)
16587
16796
  */
16588
- truncated: boolean;
16589
- };
16590
- export type ListAiSessionBackupsData = {
16797
+ triggerPath: string;
16591
16798
  workspace: string;
16592
16799
  };
16593
- export type ListAiSessionBackupsResponse = {
16594
- enabled: boolean;
16800
+ export type ResumeSuspendedTriggerJobsResponse = string;
16801
+ export type CancelSuspendedTriggerJobsData = {
16595
16802
  /**
16596
- * names the storage answered from; sync state recorded against another one is void
16803
+ * Optional list of job IDs to cancel
16597
16804
  */
16598
- storage_id?: string;
16805
+ requestBody?: {
16806
+ /**
16807
+ * Optional list of specific job UUIDs to cancel. If not provided, all suspended jobs for the trigger will be canceled.
16808
+ */
16809
+ job_ids?: Array<(string)>;
16810
+ };
16599
16811
  /**
16600
- * bumped by every workspace key rotation; sync state recorded under another one is void
16812
+ * The kind of trigger
16601
16813
  */
16602
- backup_generation?: number;
16814
+ triggerKind: JobTriggerKind;
16603
16815
  /**
16604
- * the storage answered from is the instance object store, standing in for a workspace without storage of its own; a removal owed to it is retired by any answer from the workspace's own storage
16816
+ * The path of the trigger (can contain forward slashes)
16605
16817
  */
16606
- fallback?: boolean;
16818
+ triggerPath: string;
16819
+ workspace: string;
16820
+ };
16821
+ export type CancelSuspendedTriggerJobsResponse = string;
16822
+ export type ListTriggerHistoryData = {
16607
16823
  /**
16608
- * the newest 500 at most
16824
+ * which page to return (start at 1, default 1)
16609
16825
  */
16610
- sessions: Array<AISessionBackupListing>;
16611
- /**
16612
- * the user has more sessions than the answer names
16613
- */
16614
- truncated?: boolean;
16615
- };
16616
- export type PullAiSessionBackupsData = {
16617
- requestBody: {
16618
- ids: Array<(string)>;
16619
- resume?: AISessionBackupCursor;
16620
- };
16621
- workspace: string;
16622
- };
16623
- export type PullAiSessionBackupsResponse = {
16624
- enabled: boolean;
16625
- storage_id?: string;
16626
- backup_generation?: number;
16627
- fallback?: boolean;
16628
- sessions: Array<AISessionBackup>;
16629
- deferred: Array<(string)>;
16630
- };
16631
- export type PushAiSessionBackupsData = {
16632
- requestBody: {
16633
- /**
16634
- * the email the push was prepared for; refused with a 409 when it is not the caller's
16635
- */
16636
- owner: string;
16637
- sessions?: Array<AISessionBackupPush>;
16638
- removed?: Array<(string)>;
16639
- };
16640
- workspace: string;
16641
- };
16642
- export type PushAiSessionBackupsResponse = {
16643
- enabled: boolean;
16644
- storage_id?: string;
16645
- backup_generation?: number;
16646
- fallback?: boolean;
16647
- results: Array<{
16648
- id: string;
16649
- error?: string;
16650
- /**
16651
- * nothing was written and the session must be pushed whole again; an incremental part found no listed session to ride on (the backup was removed, or a push split over parts is in progress or was abandoned), or a later part of a push split over parts found another push had superseded it
16652
- */
16653
- needs_whole?: boolean;
16654
- }>;
16655
- };
16656
- export type ShareAiArtifactData = {
16657
- requestBody: {
16658
- /**
16659
- * the artifact's id in the author's session
16660
- */
16661
- artifact_id: string;
16662
- name: string;
16663
- kind: 'md' | 'html';
16664
- version: number;
16665
- content: string;
16666
- };
16667
- workspace: string;
16668
- };
16669
- export type ShareAiArtifactResponse = SharedAiArtifactInfo;
16670
- export type GetAiArtifactShareStatusData = {
16671
- artifactId: string;
16672
- workspace: string;
16673
- };
16674
- export type GetAiArtifactShareStatusResponse = {
16675
- retention_secs: number;
16676
- share?: SharedAiArtifactInfo;
16677
- };
16678
- export type GetSharedAiArtifactData = {
16679
- id: string;
16680
- workspace: string;
16681
- };
16682
- export type GetSharedAiArtifactResponse = SharedAiArtifactInfo & {
16683
- content: string;
16684
- /**
16685
- * whether the caller authored the share or is a workspace admin
16686
- */
16687
- can_unshare: boolean;
16688
- };
16689
- export type UnshareAiArtifactData = {
16690
- id: string;
16691
- workspace: string;
16692
- };
16693
- export type UnshareAiArtifactResponse = string;
16694
- export type ShareAiSessionData = {
16695
- requestBody: {
16696
- /**
16697
- * the session's id in the author's browser
16698
- */
16699
- session_id: string;
16700
- name: string;
16701
- /**
16702
- * left as it is on an existing share when absent; a new share starts private
16703
- */
16704
- is_public?: boolean;
16705
- message_count: number;
16706
- snapshot: {
16707
- [key: string]: unknown;
16708
- };
16709
- };
16710
- workspace: string;
16711
- };
16712
- export type ShareAiSessionResponse = SharedAiSessionInfo;
16713
- export type GetAiSessionShareStatusData = {
16714
- sessionId: string;
16715
- workspace: string;
16716
- };
16717
- export type GetAiSessionShareStatusResponse = {
16718
- share?: SharedAiSessionInfo;
16719
- };
16720
- export type SetAiSessionSharePublicData = {
16721
- id: string;
16722
- requestBody: {
16723
- is_public: boolean;
16724
- };
16725
- workspace: string;
16726
- };
16727
- export type SetAiSessionSharePublicResponse = SharedAiSessionInfo;
16728
- export type GetSharedAiSessionData = {
16729
- id: string;
16730
- workspace: string;
16731
- };
16732
- export type GetSharedAiSessionResponse = SharedAiSessionInfo & {
16733
- snapshot: {
16734
- [key: string]: unknown;
16735
- };
16736
- /**
16737
- * whether the caller authored the share or is a workspace admin
16738
- */
16739
- can_unshare: boolean;
16740
- };
16741
- export type UnshareAiSessionData = {
16742
- id: string;
16743
- workspace: string;
16744
- };
16745
- export type UnshareAiSessionResponse = string;
16746
- export type ResumeSuspendedTriggerJobsData = {
16747
- /**
16748
- * Optional list of job IDs to reassign
16749
- */
16750
- requestBody?: {
16751
- /**
16752
- * Optional list of specific job UUIDs to reassign. If not provided, all suspended jobs for the trigger will be reassigned.
16753
- */
16754
- job_ids?: Array<(string)>;
16755
- };
16756
- /**
16757
- * The kind of trigger
16758
- */
16759
- triggerKind: JobTriggerKind;
16760
- /**
16761
- * The path of the trigger (can contain forward slashes)
16762
- */
16763
- triggerPath: string;
16764
- workspace: string;
16765
- };
16766
- export type ResumeSuspendedTriggerJobsResponse = string;
16767
- export type CancelSuspendedTriggerJobsData = {
16768
- /**
16769
- * Optional list of job IDs to cancel
16770
- */
16771
- requestBody?: {
16772
- /**
16773
- * Optional list of specific job UUIDs to cancel. If not provided, all suspended jobs for the trigger will be canceled.
16774
- */
16775
- job_ids?: Array<(string)>;
16776
- };
16777
- /**
16778
- * The kind of trigger
16779
- */
16780
- triggerKind: JobTriggerKind;
16781
- /**
16782
- * The path of the trigger (can contain forward slashes)
16783
- */
16784
- triggerPath: string;
16785
- workspace: string;
16786
- };
16787
- export type CancelSuspendedTriggerJobsResponse = string;
16788
- export type ListTriggerHistoryData = {
16789
- /**
16790
- * which page to return (start at 1, default 1)
16791
- */
16792
- page?: number;
16826
+ page?: number;
16793
16827
  /**
16794
16828
  * only return the history of the trigger at this path
16795
16829
  */
@@ -24208,6 +24242,7 @@ export type $OpenApiTs = {
24208
24242
  rules: ProtectionRules;
24209
24243
  bypass_groups: RuleBypasserGroups;
24210
24244
  bypass_users: RuleBypasserUsers;
24245
+ fork_role_mapping?: ForkRoleMapping;
24211
24246
  };
24212
24247
  workspace: string;
24213
24248
  };
@@ -24237,6 +24272,7 @@ export type $OpenApiTs = {
24237
24272
  rules: ProtectionRules;
24238
24273
  bypass_groups: RuleBypasserGroups;
24239
24274
  bypass_users: RuleBypasserUsers;
24275
+ fork_role_mapping?: ForkRoleMapping;
24240
24276
  };
24241
24277
  /**
24242
24278
  * Name of the protection rule to update
@@ -33738,695 +33774,720 @@ export type $OpenApiTs = {
33738
33774
  };
33739
33775
  };
33740
33776
  };
33741
- '/w/{workspace}/ai_evals/datasets/list': {
33742
- get: {
33777
+ '/w/{workspace}/ai/complete': {
33778
+ post: {
33743
33779
  req: {
33780
+ requestBody: {
33781
+ system: string;
33782
+ user: string;
33783
+ /**
33784
+ * defaults to the AI config's default model
33785
+ */
33786
+ model?: AIProviderModel;
33787
+ max_tokens?: number;
33788
+ };
33744
33789
  workspace: string;
33745
33790
  };
33746
33791
  res: {
33747
33792
  /**
33748
- * eval datasets list
33793
+ * the answer, and the model that wrote it
33749
33794
  */
33750
- 200: Array<EvalDataset>;
33795
+ 200: {
33796
+ text: string;
33797
+ model: AIProviderModel;
33798
+ };
33751
33799
  };
33752
33800
  };
33753
33801
  };
33754
- '/w/{workspace}/ai_evals/datasets/create': {
33802
+ '/w/{workspace}/ai/usage': {
33755
33803
  post: {
33756
33804
  req: {
33757
- /**
33758
- * new eval dataset
33759
- */
33760
33805
  requestBody: {
33761
- path: string;
33762
- summary?: string;
33763
- scorers?: Array<Scorer>;
33764
- /**
33765
- * The cases to create the dataset holding, so one can be assembled in a single act rather than created empty and filled in afterwards.
33766
- */
33767
- cases?: Array<NewEvalCase>;
33806
+ events: Array<AITokenUsageEvent>;
33768
33807
  };
33769
33808
  workspace: string;
33770
33809
  };
33771
33810
  res: {
33772
33811
  /**
33773
- * eval dataset created
33812
+ * usage recorded
33774
33813
  */
33775
- 200: string;
33814
+ 204: void;
33776
33815
  };
33777
33816
  };
33778
- };
33779
- '/w/{workspace}/ai_evals/datasets/get/{path}': {
33780
33817
  get: {
33781
33818
  req: {
33782
- path: string;
33819
+ days?: number;
33820
+ groupBy?: 'day' | 'user' | 'model';
33821
+ /**
33822
+ * workspace-wide usage (admin only) or the calling user's own
33823
+ */
33824
+ scope?: 'workspace' | 'self';
33783
33825
  workspace: string;
33784
33826
  };
33785
33827
  res: {
33786
33828
  /**
33787
- * eval dataset
33829
+ * usage buckets
33788
33830
  */
33789
- 200: EvalDataset;
33831
+ 200: {
33832
+ buckets: Array<AITokenUsageBucket>;
33833
+ /**
33834
+ * more buckets matched than were returned, so summing them under-reports
33835
+ */
33836
+ truncated: boolean;
33837
+ };
33790
33838
  };
33791
33839
  };
33792
33840
  };
33793
- '/w/{workspace}/ai_evals/datasets/update/{path}': {
33794
- post: {
33841
+ '/w/{workspace}/ai/sessions/list': {
33842
+ get: {
33795
33843
  req: {
33796
- path: string;
33844
+ workspace: string;
33845
+ };
33846
+ res: {
33797
33847
  /**
33798
- * updated eval dataset
33848
+ * backups, newest first; `enabled` is false when the workspace has no storage for them
33799
33849
  */
33800
- requestBody: {
33850
+ 200: {
33851
+ enabled: boolean;
33801
33852
  /**
33802
- * Renames the dataset. Its cases and experiments follow through the foreign keys, so a rename keeps the history it already has.
33803
- *
33853
+ * names the storage answered from; sync state recorded against another one is void
33804
33854
  */
33805
- path?: string;
33855
+ storage_id?: string;
33806
33856
  /**
33807
- * Left out to keep the stored summary; sent as "" to clear it.
33857
+ * bumped by every workspace key rotation; sync state recorded under another one is void
33808
33858
  */
33809
- summary?: string;
33859
+ backup_generation?: number;
33810
33860
  /**
33811
- * Left out to keep the dataset's columns as they are; sent to replace them wholesale.
33812
- *
33861
+ * the storage answered from is the instance object store, standing in for a workspace without storage of its own; a removal owed to it is retired by any answer from the workspace's own storage
33813
33862
  */
33814
- scorers?: Array<Scorer>;
33863
+ fallback?: boolean;
33815
33864
  /**
33816
- * The cases as they should stand afterwards: all of them, each carrying its id if the dataset already has it. Sent with the rest of an edit so that a rename the dataset refuses refuses the case edits with it.
33817
- *
33865
+ * the newest 500 at most
33818
33866
  */
33819
- cases?: Array<SaveEvalCase>;
33867
+ sessions: Array<AISessionBackupListing>;
33868
+ /**
33869
+ * the user has more sessions than the answer names
33870
+ */
33871
+ truncated?: boolean;
33820
33872
  };
33821
- workspace: string;
33822
- };
33823
- res: {
33824
- /**
33825
- * eval dataset updated
33826
- */
33827
- 200: string;
33828
33873
  };
33829
33874
  };
33830
33875
  };
33831
- '/w/{workspace}/ai_evals/datasets/delete/{path}': {
33876
+ '/w/{workspace}/ai/sessions/pull': {
33832
33877
  post: {
33833
33878
  req: {
33834
- path: string;
33879
+ requestBody: {
33880
+ ids: Array<(string)>;
33881
+ resume?: AISessionBackupCursor;
33882
+ };
33835
33883
  workspace: string;
33836
33884
  };
33837
33885
  res: {
33838
33886
  /**
33839
- * eval dataset deleted
33887
+ * the backups found; `deferred` lists ids that did not fit the response budget
33840
33888
  */
33841
- 200: string;
33889
+ 200: {
33890
+ enabled: boolean;
33891
+ storage_id?: string;
33892
+ backup_generation?: number;
33893
+ fallback?: boolean;
33894
+ sessions: Array<AISessionBackup>;
33895
+ deferred: Array<(string)>;
33896
+ };
33842
33897
  };
33843
33898
  };
33844
33899
  };
33845
- '/w/{workspace}/ai_evals/cases/list/{path}': {
33846
- get: {
33900
+ '/w/{workspace}/ai/sessions/push': {
33901
+ post: {
33847
33902
  req: {
33848
- /**
33849
- * which page to return (start at 1, default 1)
33850
- */
33851
- page?: number;
33852
- path: string;
33853
- /**
33854
- * number of items to return for a given page (default 30, max 100)
33855
- */
33856
- perPage?: number;
33903
+ requestBody: {
33904
+ /**
33905
+ * the email the push was prepared for; refused with a 409 when it is not the caller's
33906
+ */
33907
+ owner: string;
33908
+ sessions?: Array<AISessionBackupPush>;
33909
+ removed?: Array<(string)>;
33910
+ };
33857
33911
  workspace: string;
33858
33912
  };
33859
33913
  res: {
33860
33914
  /**
33861
- * eval cases
33915
+ * one result per session written or removed, in request order
33862
33916
  */
33863
33917
  200: {
33864
- cases: Array<EvalCase>;
33918
+ enabled: boolean;
33919
+ storage_id?: string;
33920
+ backup_generation?: number;
33921
+ fallback?: boolean;
33922
+ results: Array<{
33923
+ id: string;
33924
+ error?: string;
33925
+ /**
33926
+ * nothing was written and the session must be pushed whole again; an incremental part found no listed session to ride on (the backup was removed, or a push split over parts is in progress or was abandoned), or a later part of a push split over parts found another push had superseded it
33927
+ */
33928
+ needs_whole?: boolean;
33929
+ }>;
33865
33930
  };
33866
33931
  };
33867
33932
  };
33868
33933
  };
33869
- '/w/{workspace}/ai_evals/subject_state': {
33870
- get: {
33934
+ '/w/{workspace}/ai/shared_artifacts/share': {
33935
+ post: {
33871
33936
  req: {
33872
- path: string;
33937
+ requestBody: {
33938
+ /**
33939
+ * the artifact's id in the author's session
33940
+ */
33941
+ artifact_id: string;
33942
+ name: string;
33943
+ kind: 'md' | 'html';
33944
+ version: number;
33945
+ content: string;
33946
+ };
33873
33947
  workspace: string;
33874
33948
  };
33875
33949
  res: {
33876
33950
  /**
33877
- * the subject as it is now
33951
+ * the shared copy
33878
33952
  */
33879
- 200: {
33880
- version?: number;
33881
- };
33953
+ 200: SharedAiArtifactInfo;
33882
33954
  };
33883
33955
  };
33884
33956
  };
33885
- '/w/{workspace}/ai_evals/run_payload': {
33957
+ '/w/{workspace}/ai/shared_artifacts/status': {
33886
33958
  get: {
33887
33959
  req: {
33888
- /**
33889
- * The flow job that answered the case.
33890
- */
33891
- jobId: string;
33960
+ artifactId: string;
33892
33961
  workspace: string;
33893
33962
  };
33894
33963
  res: {
33895
33964
  /**
33896
- * the run and its rendering
33965
+ * the live share, if any, and how long shares last
33897
33966
  */
33898
33967
  200: {
33899
- /**
33900
- * The case, the answer, and every tool call the agent made.
33901
- */
33902
- run: {
33903
- [key: string]: unknown;
33904
- };
33905
- /**
33906
- * The same run as a judge agent is shown it.
33907
- */
33908
- rendered: string;
33968
+ retention_secs: number;
33969
+ share?: SharedAiArtifactInfo;
33909
33970
  };
33910
33971
  };
33911
33972
  };
33912
33973
  };
33913
- '/w/{workspace}/ai_evals/scorer_defaults': {
33974
+ '/w/{workspace}/ai/shared_artifacts/get/{id}': {
33914
33975
  get: {
33915
33976
  req: {
33977
+ id: string;
33916
33978
  workspace: string;
33917
33979
  };
33918
33980
  res: {
33919
33981
  /**
33920
- * scorer defaults
33982
+ * the shared artifact
33921
33983
  */
33922
- 200: {
33984
+ 200: SharedAiArtifactInfo & {
33985
+ content: string;
33923
33986
  /**
33924
- * The system prompt a judge agent is created with.
33987
+ * whether the caller authored the share or is a workspace admin
33925
33988
  */
33926
- judge_prompt: string;
33927
- script_template: string;
33989
+ can_unshare: boolean;
33928
33990
  };
33929
33991
  };
33930
33992
  };
33931
33993
  };
33932
- '/w/{workspace}/ai_evals/scorers/recent': {
33933
- get: {
33994
+ '/w/{workspace}/ai/shared_artifacts/delete/{id}': {
33995
+ delete: {
33934
33996
  req: {
33935
- /**
33936
- * only scorers of this kind
33937
- */
33938
- kind?: 'script' | 'agent';
33997
+ id: string;
33939
33998
  workspace: string;
33940
33999
  };
33941
34000
  res: {
33942
34001
  /**
33943
- * recently used scorers
34002
+ * share deleted
33944
34003
  */
33945
- 200: Array<(Scorer & {
33946
- /**
33947
- * The dataset it is a column of.
33948
- */
33949
- dataset: string;
33950
- })>;
34004
+ 200: string;
33951
34005
  };
33952
34006
  };
33953
34007
  };
33954
- '/w/{workspace}/ai_evals/experiments/run': {
34008
+ '/w/{workspace}/ai/shared_sessions/share': {
33955
34009
  post: {
33956
34010
  req: {
33957
- /**
33958
- * what to run
33959
- */
33960
34011
  requestBody: {
33961
- dataset: string;
33962
- subject: EvalSubject;
34012
+ /**
34013
+ * the session's id in the author's browser
34014
+ */
34015
+ session_id: string;
34016
+ name: string;
34017
+ /**
34018
+ * left as it is on an existing share when absent; a new share starts private
34019
+ */
34020
+ is_public?: boolean;
34021
+ message_count: number;
34022
+ snapshot: {
34023
+ [key: string]: unknown;
34024
+ };
33963
34025
  };
33964
34026
  workspace: string;
33965
34027
  };
33966
34028
  res: {
33967
34029
  /**
33968
- * id of the created experiment
34030
+ * the shared snapshot
33969
34031
  */
33970
- 200: string;
34032
+ 200: SharedAiSessionInfo;
33971
34033
  };
33972
34034
  };
33973
34035
  };
33974
- '/w/{workspace}/ai_evals/experiments/collect': {
33975
- post: {
34036
+ '/w/{workspace}/ai/shared_sessions/status': {
34037
+ get: {
33976
34038
  req: {
33977
- id: string;
34039
+ sessionId: string;
33978
34040
  workspace: string;
33979
34041
  };
33980
34042
  res: {
33981
34043
  /**
33982
- * how many of the run's cases are recorded
34044
+ * the share, if any
33983
34045
  */
33984
- 200: number;
34046
+ 200: {
34047
+ share?: SharedAiSessionInfo;
34048
+ };
33985
34049
  };
33986
34050
  };
33987
34051
  };
33988
- '/w/{workspace}/ai_evals/experiments/list_all': {
33989
- get: {
34052
+ '/w/{workspace}/ai/shared_sessions/set_public/{id}': {
34053
+ post: {
33990
34054
  req: {
33991
- /**
33992
- * Restrict to one agent's runs, which is what makes the list a history rather than a log. Runs of what is deployed, of a past version, and of the edits waiting on top are all that agent's, so this does not discriminate by kind.
33993
- *
33994
- */
33995
- subjectPath?: string;
34055
+ id: string;
34056
+ requestBody: {
34057
+ is_public: boolean;
34058
+ };
33996
34059
  workspace: string;
33997
34060
  };
33998
34061
  res: {
33999
34062
  /**
34000
- * The 100 newest experiments, each naming the dataset it is of. Restricted to datasets the caller can read.
34001
- *
34063
+ * the updated share
34002
34064
  */
34003
- 200: Array<EvalExperiment>;
34065
+ 200: SharedAiSessionInfo;
34004
34066
  };
34005
34067
  };
34006
34068
  };
34007
- '/w/{workspace}/ai_evals/experiments/results/{path}': {
34069
+ '/w/{workspace}/ai_u/shared_sessions/get/{id}': {
34008
34070
  get: {
34009
34071
  req: {
34010
- /**
34011
- * The experiment every column is compared against. A delta is only computed between two scores of the same scorer id, and a column the baseline was never scored with reports it rather than showing a difference.
34012
- *
34013
- */
34014
- baseline?: string;
34015
- /**
34016
- * the experiment to read
34017
- */
34018
34072
  id: string;
34019
- path: string;
34020
34073
  workspace: string;
34021
34074
  };
34022
34075
  res: {
34023
34076
  /**
34024
- * experiment results
34077
+ * the shared session
34025
34078
  */
34026
- 200: {
34027
- experiment: EvalExperiment;
34028
- baseline?: EvalExperiment;
34029
- /**
34030
- * The columns, which belong to the dataset rather than the experiment.
34031
- */
34032
- scorers: Array<Scorer>;
34033
- rows: Array<ExperimentRow>;
34034
- means: Array<ScorerMean>;
34035
- /**
34036
- * Cells scoring lower than the baseline, across every column.
34037
- */
34038
- regressed: number;
34039
- /**
34040
- * The version the subject is on now. A row that ran against an earlier one describes an agent that no longer exists.
34041
- *
34042
- */
34043
- subject_current_version?: number;
34079
+ 200: SharedAiSessionInfo & {
34080
+ snapshot: {
34081
+ [key: string]: unknown;
34082
+ };
34044
34083
  /**
34045
- * What the agent hashes to as deployed. A run of unsaved edits carrying this hash ran exactly what is deployed now — the edits were saved — so it is a run of that version rather than of edits.
34046
- *
34084
+ * whether the caller authored the share or is a workspace admin
34047
34085
  */
34048
- subject_deployed_hash?: string;
34086
+ can_unshare: boolean;
34049
34087
  };
34050
34088
  };
34051
34089
  };
34052
34090
  };
34053
- '/w/{workspace}/path_autocomplete/list_paths': {
34054
- get: {
34091
+ '/w/{workspace}/ai/shared_sessions/delete/{id}': {
34092
+ delete: {
34055
34093
  req: {
34056
- /**
34057
- * bypass the server-side cache and re-query the DB, refreshing the
34058
- * cache. Used right after a deploy so the new path appears immediately.
34059
- *
34060
- */
34061
- force?: boolean;
34094
+ id: string;
34062
34095
  workspace: string;
34063
34096
  };
34064
34097
  res: {
34065
34098
  /**
34066
- * deduplicated path list, sorted lexicographically
34099
+ * share deleted
34067
34100
  */
34068
- 200: {
34069
- paths: Array<(string)>;
34070
- };
34101
+ 200: string;
34071
34102
  };
34072
34103
  };
34073
34104
  };
34074
- '/w/{workspace}/raw_apps/list': {
34105
+ '/w/{workspace}/ai_evals/datasets/list': {
34075
34106
  get: {
34076
34107
  req: {
34077
- /**
34078
- * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob')
34079
- */
34080
- createdBy?: string;
34081
- /**
34082
- * When true, append per-user draft rows whose path has no
34083
- * deployed counterpart. Synthesized rows carry `draft_only: true`
34084
- * so the home page can render a "Draft" badge. Gated to
34085
- * non-operators + page 0 + no narrowing filters on the backend so
34086
- * picker callers stay deployed-only and pagination stays clean.
34087
- *
34088
- */
34089
- includeDraftOnly?: boolean;
34090
- /**
34091
- * Filter by label
34092
- */
34093
- label?: string;
34094
- /**
34095
- * order by desc order (default true)
34096
- */
34097
- orderDesc?: boolean;
34098
- /**
34099
- * which page to return (start at 1, default 1)
34100
- */
34101
- page?: number;
34102
- /**
34103
- * mask to filter exact matching path
34104
- */
34105
- pathExact?: string;
34106
- /**
34107
- * mask to filter matching starting path
34108
- */
34109
- pathStart?: string;
34110
- /**
34111
- * number of items to return for a given page (default 30, max 100)
34112
- */
34113
- perPage?: number;
34114
- /**
34115
- * (default false)
34116
- * show only the starred items
34117
- *
34118
- */
34119
- starredOnly?: boolean;
34120
34108
  workspace: string;
34121
34109
  };
34122
34110
  res: {
34123
34111
  /**
34124
- * All raw apps
34112
+ * eval datasets list
34125
34113
  */
34126
- 200: Array<ListableRawApp>;
34114
+ 200: Array<EvalDataset>;
34127
34115
  };
34128
34116
  };
34129
34117
  };
34130
- '/w/{workspace}/ai/usage': {
34118
+ '/w/{workspace}/ai_evals/datasets/create': {
34131
34119
  post: {
34132
34120
  req: {
34121
+ /**
34122
+ * new eval dataset
34123
+ */
34133
34124
  requestBody: {
34134
- events: Array<AITokenUsageEvent>;
34125
+ path: string;
34126
+ summary?: string;
34127
+ scorers?: Array<Scorer>;
34128
+ /**
34129
+ * The cases to create the dataset holding, so one can be assembled in a single act rather than created empty and filled in afterwards.
34130
+ */
34131
+ cases?: Array<NewEvalCase>;
34135
34132
  };
34136
34133
  workspace: string;
34137
34134
  };
34138
34135
  res: {
34139
34136
  /**
34140
- * usage recorded
34137
+ * eval dataset created
34141
34138
  */
34142
- 204: void;
34139
+ 200: string;
34143
34140
  };
34144
34141
  };
34142
+ };
34143
+ '/w/{workspace}/ai_evals/datasets/get/{path}': {
34145
34144
  get: {
34146
34145
  req: {
34147
- days?: number;
34148
- groupBy?: 'day' | 'user' | 'model';
34149
- /**
34150
- * workspace-wide usage (admin only) or the calling user's own
34151
- */
34152
- scope?: 'workspace' | 'self';
34146
+ path: string;
34153
34147
  workspace: string;
34154
34148
  };
34155
34149
  res: {
34156
34150
  /**
34157
- * usage buckets
34151
+ * eval dataset
34158
34152
  */
34159
- 200: {
34160
- buckets: Array<AITokenUsageBucket>;
34161
- /**
34162
- * more buckets matched than were returned, so summing them under-reports
34163
- */
34164
- truncated: boolean;
34165
- };
34153
+ 200: EvalDataset;
34166
34154
  };
34167
34155
  };
34168
34156
  };
34169
- '/w/{workspace}/ai/sessions/list': {
34170
- get: {
34157
+ '/w/{workspace}/ai_evals/datasets/update/{path}': {
34158
+ post: {
34171
34159
  req: {
34172
- workspace: string;
34173
- };
34174
- res: {
34160
+ path: string;
34175
34161
  /**
34176
- * backups, newest first; `enabled` is false when the workspace has no storage for them
34162
+ * updated eval dataset
34177
34163
  */
34178
- 200: {
34179
- enabled: boolean;
34180
- /**
34181
- * names the storage answered from; sync state recorded against another one is void
34182
- */
34183
- storage_id?: string;
34164
+ requestBody: {
34184
34165
  /**
34185
- * bumped by every workspace key rotation; sync state recorded under another one is void
34166
+ * Renames the dataset. Its cases and experiments follow through the foreign keys, so a rename keeps the history it already has.
34167
+ *
34186
34168
  */
34187
- backup_generation?: number;
34169
+ path?: string;
34188
34170
  /**
34189
- * the storage answered from is the instance object store, standing in for a workspace without storage of its own; a removal owed to it is retired by any answer from the workspace's own storage
34171
+ * Left out to keep the stored summary; sent as "" to clear it.
34190
34172
  */
34191
- fallback?: boolean;
34173
+ summary?: string;
34192
34174
  /**
34193
- * the newest 500 at most
34175
+ * Left out to keep the dataset's columns as they are; sent to replace them wholesale.
34176
+ *
34194
34177
  */
34195
- sessions: Array<AISessionBackupListing>;
34178
+ scorers?: Array<Scorer>;
34196
34179
  /**
34197
- * the user has more sessions than the answer names
34180
+ * The cases as they should stand afterwards: all of them, each carrying its id if the dataset already has it. Sent with the rest of an edit so that a rename the dataset refuses refuses the case edits with it.
34181
+ *
34198
34182
  */
34199
- truncated?: boolean;
34183
+ cases?: Array<SaveEvalCase>;
34200
34184
  };
34185
+ workspace: string;
34186
+ };
34187
+ res: {
34188
+ /**
34189
+ * eval dataset updated
34190
+ */
34191
+ 200: string;
34201
34192
  };
34202
34193
  };
34203
34194
  };
34204
- '/w/{workspace}/ai/sessions/pull': {
34195
+ '/w/{workspace}/ai_evals/datasets/delete/{path}': {
34205
34196
  post: {
34206
34197
  req: {
34207
- requestBody: {
34208
- ids: Array<(string)>;
34209
- resume?: AISessionBackupCursor;
34210
- };
34198
+ path: string;
34211
34199
  workspace: string;
34212
34200
  };
34213
34201
  res: {
34214
34202
  /**
34215
- * the backups found; `deferred` lists ids that did not fit the response budget
34203
+ * eval dataset deleted
34216
34204
  */
34217
- 200: {
34218
- enabled: boolean;
34219
- storage_id?: string;
34220
- backup_generation?: number;
34221
- fallback?: boolean;
34222
- sessions: Array<AISessionBackup>;
34223
- deferred: Array<(string)>;
34224
- };
34205
+ 200: string;
34225
34206
  };
34226
34207
  };
34227
34208
  };
34228
- '/w/{workspace}/ai/sessions/push': {
34229
- post: {
34209
+ '/w/{workspace}/ai_evals/cases/list/{path}': {
34210
+ get: {
34230
34211
  req: {
34231
- requestBody: {
34232
- /**
34233
- * the email the push was prepared for; refused with a 409 when it is not the caller's
34234
- */
34235
- owner: string;
34236
- sessions?: Array<AISessionBackupPush>;
34237
- removed?: Array<(string)>;
34238
- };
34212
+ /**
34213
+ * which page to return (start at 1, default 1)
34214
+ */
34215
+ page?: number;
34216
+ path: string;
34217
+ /**
34218
+ * number of items to return for a given page (default 30, max 100)
34219
+ */
34220
+ perPage?: number;
34239
34221
  workspace: string;
34240
34222
  };
34241
34223
  res: {
34242
34224
  /**
34243
- * one result per session written or removed, in request order
34225
+ * eval cases
34244
34226
  */
34245
34227
  200: {
34246
- enabled: boolean;
34247
- storage_id?: string;
34248
- backup_generation?: number;
34249
- fallback?: boolean;
34250
- results: Array<{
34251
- id: string;
34252
- error?: string;
34253
- /**
34254
- * nothing was written and the session must be pushed whole again; an incremental part found no listed session to ride on (the backup was removed, or a push split over parts is in progress or was abandoned), or a later part of a push split over parts found another push had superseded it
34255
- */
34256
- needs_whole?: boolean;
34257
- }>;
34228
+ cases: Array<EvalCase>;
34258
34229
  };
34259
34230
  };
34260
34231
  };
34261
34232
  };
34262
- '/w/{workspace}/ai/shared_artifacts/share': {
34263
- post: {
34233
+ '/w/{workspace}/ai_evals/subject_state': {
34234
+ get: {
34264
34235
  req: {
34265
- requestBody: {
34266
- /**
34267
- * the artifact's id in the author's session
34268
- */
34269
- artifact_id: string;
34270
- name: string;
34271
- kind: 'md' | 'html';
34272
- version: number;
34273
- content: string;
34274
- };
34236
+ path: string;
34275
34237
  workspace: string;
34276
34238
  };
34277
34239
  res: {
34278
34240
  /**
34279
- * the shared copy
34241
+ * the subject as it is now
34280
34242
  */
34281
- 200: SharedAiArtifactInfo;
34243
+ 200: {
34244
+ version?: number;
34245
+ };
34282
34246
  };
34283
34247
  };
34284
34248
  };
34285
- '/w/{workspace}/ai/shared_artifacts/status': {
34249
+ '/w/{workspace}/ai_evals/run_payload': {
34286
34250
  get: {
34287
34251
  req: {
34288
- artifactId: string;
34252
+ /**
34253
+ * The flow job that answered the case.
34254
+ */
34255
+ jobId: string;
34289
34256
  workspace: string;
34290
34257
  };
34291
34258
  res: {
34292
34259
  /**
34293
- * the live share, if any, and how long shares last
34260
+ * the run and its rendering
34294
34261
  */
34295
34262
  200: {
34296
- retention_secs: number;
34297
- share?: SharedAiArtifactInfo;
34263
+ /**
34264
+ * The case, the answer, and every tool call the agent made.
34265
+ */
34266
+ run: {
34267
+ [key: string]: unknown;
34268
+ };
34269
+ /**
34270
+ * The same run as a judge agent is shown it.
34271
+ */
34272
+ rendered: string;
34298
34273
  };
34299
34274
  };
34300
34275
  };
34301
34276
  };
34302
- '/w/{workspace}/ai/shared_artifacts/get/{id}': {
34277
+ '/w/{workspace}/ai_evals/scorer_defaults': {
34303
34278
  get: {
34304
34279
  req: {
34305
- id: string;
34306
34280
  workspace: string;
34307
34281
  };
34308
34282
  res: {
34309
34283
  /**
34310
- * the shared artifact
34284
+ * scorer defaults
34311
34285
  */
34312
- 200: SharedAiArtifactInfo & {
34313
- content: string;
34286
+ 200: {
34314
34287
  /**
34315
- * whether the caller authored the share or is a workspace admin
34288
+ * The system prompt a judge agent is created with.
34316
34289
  */
34317
- can_unshare: boolean;
34290
+ judge_prompt: string;
34291
+ script_template: string;
34318
34292
  };
34319
34293
  };
34320
34294
  };
34321
34295
  };
34322
- '/w/{workspace}/ai/shared_artifacts/delete/{id}': {
34323
- delete: {
34296
+ '/w/{workspace}/ai_evals/scorers/recent': {
34297
+ get: {
34324
34298
  req: {
34325
- id: string;
34299
+ /**
34300
+ * only scorers of this kind
34301
+ */
34302
+ kind?: 'script' | 'agent';
34326
34303
  workspace: string;
34327
34304
  };
34328
34305
  res: {
34329
34306
  /**
34330
- * share deleted
34307
+ * recently used scorers
34331
34308
  */
34332
- 200: string;
34309
+ 200: Array<(Scorer & {
34310
+ /**
34311
+ * The dataset it is a column of.
34312
+ */
34313
+ dataset: string;
34314
+ })>;
34333
34315
  };
34334
34316
  };
34335
34317
  };
34336
- '/w/{workspace}/ai/shared_sessions/share': {
34318
+ '/w/{workspace}/ai_evals/experiments/run': {
34337
34319
  post: {
34338
34320
  req: {
34321
+ /**
34322
+ * what to run
34323
+ */
34339
34324
  requestBody: {
34340
- /**
34341
- * the session's id in the author's browser
34342
- */
34343
- session_id: string;
34344
- name: string;
34345
- /**
34346
- * left as it is on an existing share when absent; a new share starts private
34347
- */
34348
- is_public?: boolean;
34349
- message_count: number;
34350
- snapshot: {
34351
- [key: string]: unknown;
34352
- };
34325
+ dataset: string;
34326
+ subject: EvalSubject;
34353
34327
  };
34354
34328
  workspace: string;
34355
34329
  };
34356
34330
  res: {
34357
34331
  /**
34358
- * the shared snapshot
34332
+ * id of the created experiment
34359
34333
  */
34360
- 200: SharedAiSessionInfo;
34334
+ 200: string;
34361
34335
  };
34362
34336
  };
34363
34337
  };
34364
- '/w/{workspace}/ai/shared_sessions/status': {
34365
- get: {
34338
+ '/w/{workspace}/ai_evals/experiments/collect': {
34339
+ post: {
34366
34340
  req: {
34367
- sessionId: string;
34341
+ id: string;
34368
34342
  workspace: string;
34369
34343
  };
34370
34344
  res: {
34371
34345
  /**
34372
- * the share, if any
34346
+ * how many of the run's cases are recorded
34373
34347
  */
34374
- 200: {
34375
- share?: SharedAiSessionInfo;
34376
- };
34348
+ 200: number;
34377
34349
  };
34378
34350
  };
34379
34351
  };
34380
- '/w/{workspace}/ai/shared_sessions/set_public/{id}': {
34381
- post: {
34352
+ '/w/{workspace}/ai_evals/experiments/list_all': {
34353
+ get: {
34382
34354
  req: {
34383
- id: string;
34384
- requestBody: {
34385
- is_public: boolean;
34386
- };
34355
+ /**
34356
+ * Restrict to one agent's runs, which is what makes the list a history rather than a log. Runs of what is deployed, of a past version, and of the edits waiting on top are all that agent's, so this does not discriminate by kind.
34357
+ *
34358
+ */
34359
+ subjectPath?: string;
34387
34360
  workspace: string;
34388
34361
  };
34389
34362
  res: {
34390
34363
  /**
34391
- * the updated share
34364
+ * The 100 newest experiments, each naming the dataset it is of. Restricted to datasets the caller can read.
34365
+ *
34392
34366
  */
34393
- 200: SharedAiSessionInfo;
34367
+ 200: Array<EvalExperiment>;
34394
34368
  };
34395
34369
  };
34396
34370
  };
34397
- '/w/{workspace}/ai_u/shared_sessions/get/{id}': {
34371
+ '/w/{workspace}/ai_evals/experiments/results/{path}': {
34398
34372
  get: {
34399
34373
  req: {
34374
+ /**
34375
+ * The experiment every column is compared against. A delta is only computed between two scores of the same scorer id, and a column the baseline was never scored with reports it rather than showing a difference.
34376
+ *
34377
+ */
34378
+ baseline?: string;
34379
+ /**
34380
+ * the experiment to read
34381
+ */
34400
34382
  id: string;
34383
+ path: string;
34401
34384
  workspace: string;
34402
34385
  };
34403
34386
  res: {
34404
34387
  /**
34405
- * the shared session
34388
+ * experiment results
34406
34389
  */
34407
- 200: SharedAiSessionInfo & {
34408
- snapshot: {
34409
- [key: string]: unknown;
34410
- };
34390
+ 200: {
34391
+ experiment: EvalExperiment;
34392
+ baseline?: EvalExperiment;
34411
34393
  /**
34412
- * whether the caller authored the share or is a workspace admin
34394
+ * The columns, which belong to the dataset rather than the experiment.
34413
34395
  */
34414
- can_unshare: boolean;
34396
+ scorers: Array<Scorer>;
34397
+ rows: Array<ExperimentRow>;
34398
+ means: Array<ScorerMean>;
34399
+ /**
34400
+ * Cells scoring lower than the baseline, across every column.
34401
+ */
34402
+ regressed: number;
34403
+ /**
34404
+ * The version the subject is on now. A row that ran against an earlier one describes an agent that no longer exists.
34405
+ *
34406
+ */
34407
+ subject_current_version?: number;
34408
+ /**
34409
+ * What the agent hashes to as deployed. A run of unsaved edits carrying this hash ran exactly what is deployed now — the edits were saved — so it is a run of that version rather than of edits.
34410
+ *
34411
+ */
34412
+ subject_deployed_hash?: string;
34415
34413
  };
34416
34414
  };
34417
34415
  };
34418
34416
  };
34419
- '/w/{workspace}/ai/shared_sessions/delete/{id}': {
34420
- delete: {
34417
+ '/w/{workspace}/path_autocomplete/list_paths': {
34418
+ get: {
34421
34419
  req: {
34422
- id: string;
34420
+ /**
34421
+ * bypass the server-side cache and re-query the DB, refreshing the
34422
+ * cache. Used right after a deploy so the new path appears immediately.
34423
+ *
34424
+ */
34425
+ force?: boolean;
34423
34426
  workspace: string;
34424
34427
  };
34425
34428
  res: {
34426
34429
  /**
34427
- * share deleted
34430
+ * deduplicated path list, sorted lexicographically
34428
34431
  */
34429
- 200: string;
34432
+ 200: {
34433
+ paths: Array<(string)>;
34434
+ };
34435
+ };
34436
+ };
34437
+ };
34438
+ '/w/{workspace}/raw_apps/list': {
34439
+ get: {
34440
+ req: {
34441
+ /**
34442
+ * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob')
34443
+ */
34444
+ createdBy?: string;
34445
+ /**
34446
+ * When true, append per-user draft rows whose path has no
34447
+ * deployed counterpart. Synthesized rows carry `draft_only: true`
34448
+ * so the home page can render a "Draft" badge. Gated to
34449
+ * non-operators + page 0 + no narrowing filters on the backend so
34450
+ * picker callers stay deployed-only and pagination stays clean.
34451
+ *
34452
+ */
34453
+ includeDraftOnly?: boolean;
34454
+ /**
34455
+ * Filter by label
34456
+ */
34457
+ label?: string;
34458
+ /**
34459
+ * order by desc order (default true)
34460
+ */
34461
+ orderDesc?: boolean;
34462
+ /**
34463
+ * which page to return (start at 1, default 1)
34464
+ */
34465
+ page?: number;
34466
+ /**
34467
+ * mask to filter exact matching path
34468
+ */
34469
+ pathExact?: string;
34470
+ /**
34471
+ * mask to filter matching starting path
34472
+ */
34473
+ pathStart?: string;
34474
+ /**
34475
+ * number of items to return for a given page (default 30, max 100)
34476
+ */
34477
+ perPage?: number;
34478
+ /**
34479
+ * (default false)
34480
+ * show only the starred items
34481
+ *
34482
+ */
34483
+ starredOnly?: boolean;
34484
+ workspace: string;
34485
+ };
34486
+ res: {
34487
+ /**
34488
+ * All raw apps
34489
+ */
34490
+ 200: Array<ListableRawApp>;
34430
34491
  };
34431
34492
  };
34432
34493
  };