@arbidocs/sdk 0.4.75 → 0.4.76

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.
@@ -1436,6 +1436,37 @@ declare function listConversations(arbi: ArbiClient): Promise<{
1436
1436
  ui?: {
1437
1437
  [x: string]: unknown;
1438
1438
  } | null | undefined;
1439
+ signals?: {
1440
+ name: string;
1441
+ when?: {
1442
+ field?: string | null | undefined;
1443
+ equals?: string | number | boolean | null | undefined;
1444
+ contains?: string | null | undefined;
1445
+ matches?: string | null | undefined;
1446
+ approved?: boolean | null | undefined;
1447
+ } | null | undefined;
1448
+ }[] | undefined;
1449
+ assignee?: {
1450
+ user?: string | null | undefined;
1451
+ run_owner?: true | null | undefined;
1452
+ input?: string | null | undefined;
1453
+ project_lead?: true | null | undefined;
1454
+ } | null | undefined;
1455
+ remind_after_hours?: number | null | undefined;
1456
+ fields?: {
1457
+ [x: string]: unknown;
1458
+ name: string;
1459
+ type: "text" | "longtext" | "boolean" | "select" | "number" | "date" | "scope" | "documents" | "person";
1460
+ label?: string | null | undefined;
1461
+ required: boolean;
1462
+ options?: {
1463
+ [x: string]: unknown;
1464
+ value: string;
1465
+ label?: string | null | undefined;
1466
+ }[] | null | undefined;
1467
+ min?: number | null | undefined;
1468
+ max?: number | null | undefined;
1469
+ }[] | null | undefined;
1439
1470
  }[];
1440
1471
  } | null | undefined;
1441
1472
  goal_state?: {
@@ -1626,6 +1657,10 @@ declare function getConversationThreads(arbi: ArbiClient, conversationId: string
1626
1657
  run_id: string;
1627
1658
  status: "running" | "done" | "failed";
1628
1659
  };
1660
+ } | {
1661
+ name: "workflow_step";
1662
+ description: string;
1663
+ workflow_step: string;
1629
1664
  };
1630
1665
  } | undefined;
1631
1666
  config_ext_id?: string | null | undefined;
@@ -1811,6 +1846,10 @@ declare function getMessage$1(arbi: ArbiClient, messageId: string): Promise<{
1811
1846
  run_id: string;
1812
1847
  status: "running" | "done" | "failed";
1813
1848
  };
1849
+ } | {
1850
+ name: "workflow_step";
1851
+ description: string;
1852
+ workflow_step: string;
1814
1853
  };
1815
1854
  } | undefined;
1816
1855
  config_ext_id?: string | null | undefined;
@@ -2003,6 +2042,10 @@ declare function postConversationMessage(arbi: ArbiClient, body: PostMessageRequ
2003
2042
  run_id: string;
2004
2043
  status: "running" | "done" | "failed";
2005
2044
  };
2045
+ } | {
2046
+ name: "workflow_step";
2047
+ description: string;
2048
+ workflow_step: string;
2006
2049
  };
2007
2050
  } | undefined;
2008
2051
  config_ext_id?: string | null | undefined;
@@ -3244,6 +3287,135 @@ declare namespace profile {
3244
3287
  export { type profile_UpdateProfileRequest as UpdateProfileRequest, profile_updateProfile as updateProfile };
3245
3288
  }
3246
3289
 
3290
+ /**
3291
+ * Stepped workflows: a run is a work conversation whose plan has named steps (`TaskPlan.steps`).
3292
+ * Form, upload and review steps wait for a person (`work.actOnStep`); an agent step is a turn the
3293
+ * assistant takes in the thread. Where a run is lives in the conversation's activity log: each
3294
+ * step's `step_started` / `step_done` / `step_skipped` / `step_failed` event, the latest winning.
3295
+ *
3296
+ * Pure functions over the API's own types (`TaskPlanStep`, `ActivityResponse`), for any client: the
3297
+ * CLI's `arbi run steps`, scripts and agents. They mirror the server (`src/core/workflow_steps.py`).
3298
+ *
3299
+ * NOTE: `@arbidocs/blocks` has the same model over its UI step type (`agents/workflows/run.ts`:
3300
+ * `stepDependencies`, `stepStatesFromActivity`, `stepPhase`, `validateWorkflowGraph`). Blocks is
3301
+ * deliberately SDK-free (it depends on `@arbidocs/client` only), so it cannot import this module;
3302
+ * the few lines both need are duplicated. Change them together.
3303
+ */
3304
+
3305
+ type TaskPlanStep = components['schemas']['TaskPlanStep'];
3306
+ type StepKind = TaskPlanStep['kind'];
3307
+ /** What the activity log says about a step: nothing yet (`pending`), or its latest event. */
3308
+ type StepStatus = 'pending' | 'running' | 'done' | 'skipped' | 'failed';
3309
+ /**
3310
+ * Where a step stands in a run: `pending` while something it waits for is unfinished, `ready`
3311
+ * once everything it waits for is done or skipped, then its own status.
3312
+ */
3313
+ type StepPhase = 'pending' | 'ready' | 'running' | 'done' | 'skipped' | 'failed';
3314
+ interface StepState {
3315
+ status: StepStatus;
3316
+ /** The step's answer in the thread (an agent step: a message id), or what a branch delivered. */
3317
+ responseId: string | null;
3318
+ error: string | null;
3319
+ }
3320
+ /** One entry of a conversation's activity log, as far as steps are concerned. */
3321
+ interface StepActivityEvent {
3322
+ kind: string;
3323
+ detail?: Record<string, unknown> | null;
3324
+ }
3325
+ declare const STEP_KINDS: readonly StepKind[];
3326
+ declare const PERSON_STEP_KINDS: readonly StepKind[];
3327
+ /** The server's step id rule. */
3328
+ declare const STEP_ID_PATTERN: RegExp;
3329
+ declare const isPersonStep: (step: Pick<TaskPlanStep, "kind">) => boolean;
3330
+ /** What a step waits for: its `after`, else the step before it in the list (a sequence). */
3331
+ declare function stepDependencies(steps: Pick<TaskPlanStep, 'id' | 'after'>[], id: string): string[];
3332
+ /** Each step's state from the activity log (oldest first): its latest step event wins. */
3333
+ declare function stepStatesFromActivity(events: StepActivityEvent[]): Record<string, StepState>;
3334
+ /** Where one step stands: its own status once it has one, else `ready` or `pending`. */
3335
+ declare function stepPhase(steps: Pick<TaskPlanStep, 'id' | 'after'>[], states: Record<string, StepState>, id: string): StepPhase;
3336
+ interface RunStep {
3337
+ id: string;
3338
+ title: string;
3339
+ kind: StepKind;
3340
+ phase: StepPhase;
3341
+ /** What it waits for (its `after`, or the step before it). */
3342
+ after: string[];
3343
+ /** A done agent step's answer: the assistant message id in the thread. */
3344
+ responseId: string | null;
3345
+ error: string | null;
3346
+ }
3347
+ /** A run's steps with where each stands, in plan order. */
3348
+ declare function runSteps(steps: TaskPlanStep[], events: StepActivityEvent[]): RunStep[];
3349
+ /**
3350
+ * What a run waits for now:
3351
+ * - `agent`: a step is running, or an agent step is ready (the server starts it next);
3352
+ * - `person`: a form, upload or review is ready for someone to complete or skip;
3353
+ * - `finished`: every step is done or skipped;
3354
+ * - `stuck`: nothing can move (a failed step that others wait for): skip it to go on.
3355
+ */
3356
+ type RunWaitingOn = 'agent' | 'person' | 'finished' | 'stuck';
3357
+ declare function runWaitingOn(run: RunStep[]): RunWaitingOn;
3358
+ /** A form field as a step's `ui.fields` carries it (what the app's form renders). */
3359
+ interface StepField {
3360
+ name: string;
3361
+ type: string;
3362
+ label: string;
3363
+ required?: boolean;
3364
+ [key: string]: unknown;
3365
+ }
3366
+ /** A form step's fields (`ui.fields`); none for other steps. */
3367
+ declare function stepFields(step: Pick<TaskPlanStep, 'kind' | 'ui'>): StepField[];
3368
+ /** The required fields of a form step still blank in `inputs` (the run's plus the new ones). */
3369
+ declare function missingRequiredFields(step: Pick<TaskPlanStep, 'kind' | 'ui'>, inputs: Record<string, unknown>): string[];
3370
+ /**
3371
+ * `name=value` pairs (as typed on a command line) to inputs. A value is text unless the step's
3372
+ * field says otherwise: `number` fields become numbers, `boolean` fields `true` / `false`.
3373
+ */
3374
+ declare function parseInputPairs(pairs: string[], fields?: Pick<StepField, 'name' | 'type'>[]): Record<string, unknown>;
3375
+ /** A list of what is wrong with a steps definition, each naming where (`steps[1].kind`). */
3376
+ declare class PlanStepsError extends Error {
3377
+ readonly problems: string[];
3378
+ constructor(problems: string[]);
3379
+ }
3380
+ /**
3381
+ * Check a steps definition and return it as the API's `TaskPlanStep[]`. Accepts a list of steps,
3382
+ * or an object with `steps` (e.g. a whole plan). Throws `PlanStepsError` listing every problem:
3383
+ * shape, ids, kinds, an agent step without a prompt or skill, and the graph (a duplicate id, an
3384
+ * `after` naming no step, a cycle, a step listed before one it waits for).
3385
+ */
3386
+ declare function parsePlanSteps(value: unknown): TaskPlanStep[];
3387
+ /** A plan holding only steps (what `createWork` and workflows take as `plan`). */
3388
+ declare function stepsPlan(steps: TaskPlanStep[]): components['schemas']['TaskPlan'];
3389
+
3390
+ declare const workflowSteps_PERSON_STEP_KINDS: typeof PERSON_STEP_KINDS;
3391
+ type workflowSteps_PlanStepsError = PlanStepsError;
3392
+ declare const workflowSteps_PlanStepsError: typeof PlanStepsError;
3393
+ type workflowSteps_RunStep = RunStep;
3394
+ type workflowSteps_RunWaitingOn = RunWaitingOn;
3395
+ declare const workflowSteps_STEP_ID_PATTERN: typeof STEP_ID_PATTERN;
3396
+ declare const workflowSteps_STEP_KINDS: typeof STEP_KINDS;
3397
+ type workflowSteps_StepActivityEvent = StepActivityEvent;
3398
+ type workflowSteps_StepField = StepField;
3399
+ type workflowSteps_StepKind = StepKind;
3400
+ type workflowSteps_StepPhase = StepPhase;
3401
+ type workflowSteps_StepState = StepState;
3402
+ type workflowSteps_StepStatus = StepStatus;
3403
+ type workflowSteps_TaskPlanStep = TaskPlanStep;
3404
+ declare const workflowSteps_isPersonStep: typeof isPersonStep;
3405
+ declare const workflowSteps_missingRequiredFields: typeof missingRequiredFields;
3406
+ declare const workflowSteps_parseInputPairs: typeof parseInputPairs;
3407
+ declare const workflowSteps_parsePlanSteps: typeof parsePlanSteps;
3408
+ declare const workflowSteps_runSteps: typeof runSteps;
3409
+ declare const workflowSteps_runWaitingOn: typeof runWaitingOn;
3410
+ declare const workflowSteps_stepDependencies: typeof stepDependencies;
3411
+ declare const workflowSteps_stepFields: typeof stepFields;
3412
+ declare const workflowSteps_stepPhase: typeof stepPhase;
3413
+ declare const workflowSteps_stepStatesFromActivity: typeof stepStatesFromActivity;
3414
+ declare const workflowSteps_stepsPlan: typeof stepsPlan;
3415
+ declare namespace workflowSteps {
3416
+ export { workflowSteps_PERSON_STEP_KINDS as PERSON_STEP_KINDS, workflowSteps_PlanStepsError as PlanStepsError, type workflowSteps_RunStep as RunStep, type workflowSteps_RunWaitingOn as RunWaitingOn, workflowSteps_STEP_ID_PATTERN as STEP_ID_PATTERN, workflowSteps_STEP_KINDS as STEP_KINDS, type workflowSteps_StepActivityEvent as StepActivityEvent, type workflowSteps_StepField as StepField, type workflowSteps_StepKind as StepKind, type workflowSteps_StepPhase as StepPhase, type workflowSteps_StepState as StepState, type workflowSteps_StepStatus as StepStatus, type workflowSteps_TaskPlanStep as TaskPlanStep, workflowSteps_isPersonStep as isPersonStep, workflowSteps_missingRequiredFields as missingRequiredFields, workflowSteps_parseInputPairs as parseInputPairs, workflowSteps_parsePlanSteps as parsePlanSteps, workflowSteps_runSteps as runSteps, workflowSteps_runWaitingOn as runWaitingOn, workflowSteps_stepDependencies as stepDependencies, workflowSteps_stepFields as stepFields, workflowSteps_stepPhase as stepPhase, workflowSteps_stepStatesFromActivity as stepStatesFromActivity, workflowSteps_stepsPlan as stepsPlan };
3417
+ }
3418
+
3247
3419
  /**
3248
3420
  * Work: a conversation with a `status` is a task. Create one, run it, mark it done, or plan it. Backend: `/v1/conversation/...` (docs/design/work-model.md).
3249
3421
  */
@@ -3286,6 +3458,25 @@ declare function notifyConversation(arbi: ArbiClient, conversationId: string, us
3286
3458
  declare function getActivity(arbi: ArbiClient, conversationId: string): Promise<ActivityResponse[]>;
3287
3459
  /** Draft an editable plan (goal and acceptance checklist) from a plain objective. */
3288
3460
  declare function planWork(arbi: ArbiClient, body: PlanWorkRequest): Promise<TaskPlan>;
3461
+ /** A stepped run as it stands: its conversation, each step's phase, and what it waits for now. */
3462
+ interface RunProgress {
3463
+ conversation: ConversationResponse;
3464
+ steps: RunStep[];
3465
+ waitingOn: RunWaitingOn;
3466
+ }
3467
+ /** One conversation by id (from the caller's list: there is no single-conversation GET). */
3468
+ declare function getConversation(arbi: ArbiClient, conversationId: string): Promise<ConversationResponse>;
3469
+ /**
3470
+ * Where a stepped workflow run is: its plan's steps, each with its phase (`pending`, `ready`,
3471
+ * `running`, `done`, `skipped`, `failed`) from the activity log. Throws when the conversation is
3472
+ * not a stepped run.
3473
+ */
3474
+ declare function getRunProgress(arbi: ArbiClient, conversationId: string): Promise<RunProgress>;
3475
+ /**
3476
+ * The text of the given assistant messages (agent steps' answers, by `responseId`) from the run's
3477
+ * thread. Ids not found are left out.
3478
+ */
3479
+ declare function getStepAnswers(arbi: ArbiClient, conversationId: string, responseIds: string[]): Promise<Record<string, string>>;
3289
3480
 
3290
3481
  type work_ActivityKind = ActivityKind;
3291
3482
  type work_ActivityResponse = ActivityResponse;
@@ -3294,6 +3485,7 @@ type work_ConversationResponse = ConversationResponse;
3294
3485
  type work_CreateWorkRequest = CreateWorkRequest;
3295
3486
  type work_PendingAuthResponse = PendingAuthResponse;
3296
3487
  type work_PlanWorkRequest = PlanWorkRequest;
3488
+ type work_RunProgress = RunProgress;
3297
3489
  type work_StepActionRequest = StepActionRequest;
3298
3490
  type work_TaskPlan = TaskPlan;
3299
3491
  type work_UpdateConversationRequest = UpdateConversationRequest;
@@ -3301,13 +3493,16 @@ type work_WorkStatus = WorkStatus;
3301
3493
  declare const work_actOnStep: typeof actOnStep;
3302
3494
  declare const work_createWork: typeof createWork;
3303
3495
  declare const work_getActivity: typeof getActivity;
3496
+ declare const work_getConversation: typeof getConversation;
3304
3497
  declare const work_getPendingAuth: typeof getPendingAuth;
3498
+ declare const work_getRunProgress: typeof getRunProgress;
3499
+ declare const work_getStepAnswers: typeof getStepAnswers;
3305
3500
  declare const work_notifyConversation: typeof notifyConversation;
3306
3501
  declare const work_planWork: typeof planWork;
3307
3502
  declare const work_runConversation: typeof runConversation;
3308
3503
  declare const work_updateConversation: typeof updateConversation;
3309
3504
  declare namespace work {
3310
- export { type work_ActivityKind as ActivityKind, type work_ActivityResponse as ActivityResponse, type work_AuthMode as AuthMode, type work_ConversationResponse as ConversationResponse, type work_CreateWorkRequest as CreateWorkRequest, type work_PendingAuthResponse as PendingAuthResponse, type work_PlanWorkRequest as PlanWorkRequest, type work_StepActionRequest as StepActionRequest, type work_TaskPlan as TaskPlan, type work_UpdateConversationRequest as UpdateConversationRequest, type work_WorkStatus as WorkStatus, work_actOnStep as actOnStep, work_createWork as createWork, work_getActivity as getActivity, work_getPendingAuth as getPendingAuth, work_notifyConversation as notifyConversation, work_planWork as planWork, work_runConversation as runConversation, work_updateConversation as updateConversation };
3505
+ export { type work_ActivityKind as ActivityKind, type work_ActivityResponse as ActivityResponse, type work_AuthMode as AuthMode, type work_ConversationResponse as ConversationResponse, type work_CreateWorkRequest as CreateWorkRequest, type work_PendingAuthResponse as PendingAuthResponse, type work_PlanWorkRequest as PlanWorkRequest, type work_RunProgress as RunProgress, type work_StepActionRequest as StepActionRequest, type work_TaskPlan as TaskPlan, type work_UpdateConversationRequest as UpdateConversationRequest, type work_WorkStatus as WorkStatus, work_actOnStep as actOnStep, work_createWork as createWork, work_getActivity as getActivity, work_getConversation as getConversation, work_getPendingAuth as getPendingAuth, work_getRunProgress as getRunProgress, work_getStepAnswers as getStepAnswers, work_notifyConversation as notifyConversation, work_planWork as planWork, work_runConversation as runConversation, work_updateConversation as updateConversation };
3311
3506
  }
3312
3507
 
3313
3508
  /**
@@ -3613,6 +3808,24 @@ declare class Arbi {
3613
3808
  budget_reset_at?: number | null | undefined;
3614
3809
  };
3615
3810
  daily_cap_per_user?: number | null | undefined;
3811
+ budget?: {
3812
+ amount: number;
3813
+ currency: string;
3814
+ } | null | undefined;
3815
+ client?: string | null | undefined;
3816
+ client_ref?: string | null | undefined;
3817
+ stage?: string | null | undefined;
3818
+ stage_changed_at?: string | null | undefined;
3819
+ lead_user?: string | null | undefined;
3820
+ fields?: {
3821
+ [x: string]: unknown;
3822
+ } | undefined;
3823
+ field_schema?: {
3824
+ key: string;
3825
+ label?: string | null | undefined;
3826
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person";
3827
+ options?: string[] | null | undefined;
3828
+ }[] | null | undefined;
3616
3829
  plan_interval?: ("month" | "year") | null | undefined;
3617
3830
  packs: number;
3618
3831
  plan_change?: {
@@ -3707,6 +3920,24 @@ declare class Arbi {
3707
3920
  budget_reset_at?: number | null | undefined;
3708
3921
  };
3709
3922
  daily_cap_per_user?: number | null | undefined;
3923
+ budget?: {
3924
+ amount: number;
3925
+ currency: string;
3926
+ } | null | undefined;
3927
+ client?: string | null | undefined;
3928
+ client_ref?: string | null | undefined;
3929
+ stage?: string | null | undefined;
3930
+ stage_changed_at?: string | null | undefined;
3931
+ lead_user?: string | null | undefined;
3932
+ fields?: {
3933
+ [x: string]: unknown;
3934
+ } | undefined;
3935
+ field_schema?: {
3936
+ key: string;
3937
+ label?: string | null | undefined;
3938
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person";
3939
+ options?: string[] | null | undefined;
3940
+ }[] | null | undefined;
3710
3941
  plan_interval?: ("month" | "year") | null | undefined;
3711
3942
  packs: number;
3712
3943
  plan_change?: {
@@ -3801,6 +4032,24 @@ declare class Arbi {
3801
4032
  budget_reset_at?: number | null | undefined;
3802
4033
  };
3803
4034
  daily_cap_per_user?: number | null | undefined;
4035
+ budget?: {
4036
+ amount: number;
4037
+ currency: string;
4038
+ } | null | undefined;
4039
+ client?: string | null | undefined;
4040
+ client_ref?: string | null | undefined;
4041
+ stage?: string | null | undefined;
4042
+ stage_changed_at?: string | null | undefined;
4043
+ lead_user?: string | null | undefined;
4044
+ fields?: {
4045
+ [x: string]: unknown;
4046
+ } | undefined;
4047
+ field_schema?: {
4048
+ key: string;
4049
+ label?: string | null | undefined;
4050
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person";
4051
+ options?: string[] | null | undefined;
4052
+ }[] | null | undefined;
3804
4053
  plan_interval?: ("month" | "year") | null | undefined;
3805
4054
  packs: number;
3806
4055
  plan_change?: {
@@ -4768,6 +5017,37 @@ declare class Arbi {
4768
5017
  ui?: {
4769
5018
  [x: string]: unknown;
4770
5019
  } | null | undefined;
5020
+ signals?: {
5021
+ name: string;
5022
+ when?: {
5023
+ field?: string | null | undefined;
5024
+ equals?: string | number | boolean | null | undefined;
5025
+ contains?: string | null | undefined;
5026
+ matches?: string | null | undefined;
5027
+ approved?: boolean | null | undefined;
5028
+ } | null | undefined;
5029
+ }[] | undefined;
5030
+ assignee?: {
5031
+ user?: string | null | undefined;
5032
+ run_owner?: true | null | undefined;
5033
+ input?: string | null | undefined;
5034
+ project_lead?: true | null | undefined;
5035
+ } | null | undefined;
5036
+ remind_after_hours?: number | null | undefined;
5037
+ fields?: {
5038
+ [x: string]: unknown;
5039
+ name: string;
5040
+ type: "text" | "longtext" | "boolean" | "select" | "number" | "date" | "scope" | "documents" | "person";
5041
+ label?: string | null | undefined;
5042
+ required: boolean;
5043
+ options?: {
5044
+ [x: string]: unknown;
5045
+ value: string;
5046
+ label?: string | null | undefined;
5047
+ }[] | null | undefined;
5048
+ min?: number | null | undefined;
5049
+ max?: number | null | undefined;
5050
+ }[] | null | undefined;
4771
5051
  }[];
4772
5052
  } | null | undefined;
4773
5053
  goal_state?: {
@@ -4948,6 +5228,10 @@ declare class Arbi {
4948
5228
  run_id: string;
4949
5229
  status: "running" | "done" | "failed";
4950
5230
  };
5231
+ } | {
5232
+ name: "workflow_step";
5233
+ description: string;
5234
+ workflow_step: string;
4951
5235
  };
4952
5236
  } | undefined;
4953
5237
  config_ext_id?: string | null | undefined;
@@ -5383,6 +5667,10 @@ declare class Arbi {
5383
5667
  run_id: string;
5384
5668
  status: "running" | "done" | "failed";
5385
5669
  };
5670
+ } | {
5671
+ name: "workflow_step";
5672
+ description: string;
5673
+ workflow_step: string;
5386
5674
  };
5387
5675
  } | undefined;
5388
5676
  config_ext_id?: string | null | undefined;
@@ -5566,6 +5854,10 @@ declare class Arbi {
5566
5854
  run_id: string;
5567
5855
  status: "running" | "done" | "failed";
5568
5856
  };
5857
+ } | {
5858
+ name: "workflow_step";
5859
+ description: string;
5860
+ workflow_step: string;
5569
5861
  };
5570
5862
  } | undefined;
5571
5863
  config_ext_id?: string | null | undefined;
@@ -5715,6 +6007,16 @@ declare class Arbi {
5715
6007
  parent_ext_id?: string | null | undefined;
5716
6008
  doctag_count: number;
5717
6009
  facttag_count: number;
6010
+ fields?: {
6011
+ id: string;
6012
+ name: string;
6013
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person";
6014
+ options?: string[] | null | undefined;
6015
+ tag_ext_id: string;
6016
+ }[] | undefined;
6017
+ field_values?: {
6018
+ [x: string]: unknown;
6019
+ } | undefined;
5718
6020
  created_by_ext_id: string;
5719
6021
  updated_by_ext_id?: string | null | undefined;
5720
6022
  created_at: string;
@@ -5739,6 +6041,16 @@ declare class Arbi {
5739
6041
  parent_ext_id?: string | null | undefined;
5740
6042
  doctag_count: number;
5741
6043
  facttag_count: number;
6044
+ fields?: {
6045
+ id: string;
6046
+ name: string;
6047
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person";
6048
+ options?: string[] | null | undefined;
6049
+ tag_ext_id: string;
6050
+ }[] | undefined;
6051
+ field_values?: {
6052
+ [x: string]: unknown;
6053
+ } | undefined;
5742
6054
  created_by_ext_id: string;
5743
6055
  updated_by_ext_id?: string | null | undefined;
5744
6056
  created_at: string;
@@ -5760,6 +6072,16 @@ declare class Arbi {
5760
6072
  parent_ext_id?: string | null | undefined;
5761
6073
  doctag_count: number;
5762
6074
  facttag_count: number;
6075
+ fields?: {
6076
+ id: string;
6077
+ name: string;
6078
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person";
6079
+ options?: string[] | null | undefined;
6080
+ tag_ext_id: string;
6081
+ }[] | undefined;
6082
+ field_values?: {
6083
+ [x: string]: unknown;
6084
+ } | undefined;
5763
6085
  created_by_ext_id: string;
5764
6086
  updated_by_ext_id?: string | null | undefined;
5765
6087
  created_at: string;
@@ -7340,6 +7662,16 @@ declare function listTags(arbi: ArbiClient): Promise<{
7340
7662
  parent_ext_id?: string | null | undefined;
7341
7663
  doctag_count: number;
7342
7664
  facttag_count: number;
7665
+ fields?: {
7666
+ id: string;
7667
+ name: string;
7668
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person";
7669
+ options?: string[] | null | undefined;
7670
+ tag_ext_id: string;
7671
+ }[] | undefined;
7672
+ field_values?: {
7673
+ [x: string]: unknown;
7674
+ } | undefined;
7343
7675
  created_by_ext_id: string;
7344
7676
  updated_by_ext_id?: string | null | undefined;
7345
7677
  created_at: string;
@@ -7364,6 +7696,16 @@ declare function createTag(arbi: ArbiClient, options: {
7364
7696
  parent_ext_id?: string | null | undefined;
7365
7697
  doctag_count: number;
7366
7698
  facttag_count: number;
7699
+ fields?: {
7700
+ id: string;
7701
+ name: string;
7702
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person";
7703
+ options?: string[] | null | undefined;
7704
+ tag_ext_id: string;
7705
+ }[] | undefined;
7706
+ field_values?: {
7707
+ [x: string]: unknown;
7708
+ } | undefined;
7367
7709
  created_by_ext_id: string;
7368
7710
  updated_by_ext_id?: string | null | undefined;
7369
7711
  created_at: string;
@@ -7385,6 +7727,16 @@ declare function updateTag(arbi: ArbiClient, tagId: string, body: UpdateTagReque
7385
7727
  parent_ext_id?: string | null | undefined;
7386
7728
  doctag_count: number;
7387
7729
  facttag_count: number;
7730
+ fields?: {
7731
+ id: string;
7732
+ name: string;
7733
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person";
7734
+ options?: string[] | null | undefined;
7735
+ tag_ext_id: string;
7736
+ }[] | undefined;
7737
+ field_values?: {
7738
+ [x: string]: unknown;
7739
+ } | undefined;
7388
7740
  created_by_ext_id: string;
7389
7741
  updated_by_ext_id?: string | null | undefined;
7390
7742
  created_at: string;
@@ -8087,6 +8439,24 @@ declare function listProjects(arbi: ArbiClient): Promise<{
8087
8439
  budget_reset_at?: number | null | undefined;
8088
8440
  };
8089
8441
  daily_cap_per_user?: number | null | undefined;
8442
+ budget?: {
8443
+ amount: number;
8444
+ currency: string;
8445
+ } | null | undefined;
8446
+ client?: string | null | undefined;
8447
+ client_ref?: string | null | undefined;
8448
+ stage?: string | null | undefined;
8449
+ stage_changed_at?: string | null | undefined;
8450
+ lead_user?: string | null | undefined;
8451
+ fields?: {
8452
+ [x: string]: unknown;
8453
+ } | undefined;
8454
+ field_schema?: {
8455
+ key: string;
8456
+ label?: string | null | undefined;
8457
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person";
8458
+ options?: string[] | null | undefined;
8459
+ }[] | null | undefined;
8090
8460
  plan_interval?: ("month" | "year") | null | undefined;
8091
8461
  packs: number;
8092
8462
  plan_change?: {
@@ -8185,6 +8555,24 @@ declare function createProject(arbi: ArbiClient, name: string, plan?: 'free' | '
8185
8555
  budget_reset_at?: number | null | undefined;
8186
8556
  };
8187
8557
  daily_cap_per_user?: number | null | undefined;
8558
+ budget?: {
8559
+ amount: number;
8560
+ currency: string;
8561
+ } | null | undefined;
8562
+ client?: string | null | undefined;
8563
+ client_ref?: string | null | undefined;
8564
+ stage?: string | null | undefined;
8565
+ stage_changed_at?: string | null | undefined;
8566
+ lead_user?: string | null | undefined;
8567
+ fields?: {
8568
+ [x: string]: unknown;
8569
+ } | undefined;
8570
+ field_schema?: {
8571
+ key: string;
8572
+ label?: string | null | undefined;
8573
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person";
8574
+ options?: string[] | null | undefined;
8575
+ }[] | null | undefined;
8188
8576
  plan_interval?: ("month" | "year") | null | undefined;
8189
8577
  packs: number;
8190
8578
  plan_change?: {
@@ -8280,6 +8668,24 @@ declare function updateProject(arbi: ArbiClient, projectExtId: string, body: Pro
8280
8668
  budget_reset_at?: number | null | undefined;
8281
8669
  };
8282
8670
  daily_cap_per_user?: number | null | undefined;
8671
+ budget?: {
8672
+ amount: number;
8673
+ currency: string;
8674
+ } | null | undefined;
8675
+ client?: string | null | undefined;
8676
+ client_ref?: string | null | undefined;
8677
+ stage?: string | null | undefined;
8678
+ stage_changed_at?: string | null | undefined;
8679
+ lead_user?: string | null | undefined;
8680
+ fields?: {
8681
+ [x: string]: unknown;
8682
+ } | undefined;
8683
+ field_schema?: {
8684
+ key: string;
8685
+ label?: string | null | undefined;
8686
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person";
8687
+ options?: string[] | null | undefined;
8688
+ }[] | null | undefined;
8283
8689
  plan_interval?: ("month" | "year") | null | undefined;
8284
8690
  packs: number;
8285
8691
  plan_change?: {
@@ -8375,6 +8781,24 @@ declare function renameProject(arbi: ArbiClient, projectExtId: string, name: str
8375
8781
  budget_reset_at?: number | null | undefined;
8376
8782
  };
8377
8783
  daily_cap_per_user?: number | null | undefined;
8784
+ budget?: {
8785
+ amount: number;
8786
+ currency: string;
8787
+ } | null | undefined;
8788
+ client?: string | null | undefined;
8789
+ client_ref?: string | null | undefined;
8790
+ stage?: string | null | undefined;
8791
+ stage_changed_at?: string | null | undefined;
8792
+ lead_user?: string | null | undefined;
8793
+ fields?: {
8794
+ [x: string]: unknown;
8795
+ } | undefined;
8796
+ field_schema?: {
8797
+ key: string;
8798
+ label?: string | null | undefined;
8799
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person";
8800
+ options?: string[] | null | undefined;
8801
+ }[] | null | undefined;
8378
8802
  plan_interval?: ("month" | "year") | null | undefined;
8379
8803
  packs: number;
8380
8804
  plan_change?: {
@@ -8470,6 +8894,24 @@ declare function refreshProject(arbi: ArbiClient, projectExtId: string): Promise
8470
8894
  budget_reset_at?: number | null | undefined;
8471
8895
  };
8472
8896
  daily_cap_per_user?: number | null | undefined;
8897
+ budget?: {
8898
+ amount: number;
8899
+ currency: string;
8900
+ } | null | undefined;
8901
+ client?: string | null | undefined;
8902
+ client_ref?: string | null | undefined;
8903
+ stage?: string | null | undefined;
8904
+ stage_changed_at?: string | null | undefined;
8905
+ lead_user?: string | null | undefined;
8906
+ fields?: {
8907
+ [x: string]: unknown;
8908
+ } | undefined;
8909
+ field_schema?: {
8910
+ key: string;
8911
+ label?: string | null | undefined;
8912
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person";
8913
+ options?: string[] | null | undefined;
8914
+ }[] | null | undefined;
8473
8915
  plan_interval?: ("month" | "year") | null | undefined;
8474
8916
  packs: number;
8475
8917
  plan_change?: {
@@ -8675,4 +9117,4 @@ declare namespace identity {
8675
9117
  export { type identity_IdentityErrorCode as IdentityErrorCode, type identity_IdentityPurchase as IdentityPurchase, type identity_IdentityState as IdentityState, type identity_IdentityStatus as IdentityStatus, identity_acceptName as acceptName, identity_getStatus as getStatus, identity_identityErrorCode as identityErrorCode, identity_purchase as purchase, identity_refresh as refresh, identity_remove as remove, identity_startSession as startSession };
8676
9118
  }
8677
9119
 
8678
- export { type MessageLevel as $, type ActivityKind as A, type DecryptedDmNotification as B, type ChatSession as C, DOC_TERMINAL_STATUSES as D, type DeferredInterjectionEvent as E, type DmAttachmentFile as F, type DmAttachmentInput as G, type DmCryptoContext as H, type DocNameMap as I, type DocumentAutomationAction as J, type DocumentListFields as K, type DocumentListOrder as L, type DocumentSelector as M, type DocumentWaiter as N, type DocumentWaiterOptions as O, type FactResponse as P, type FactSearchRequest as Q, type FactSearchResponse as R, type FormattedWsMessage as S, type IdentityErrorCode as T, type IdentityPurchase as U, type IdentityState as V, type IdentityStatus as W, type ListAllOptions as X, type ListFactsOptions as Y, type ListPaginatedOptions as Z, type MailAttachment as _, type ActivityResponse as a, buildRetrievalTocTool as a$, type MessageMetadataPayload$1 as a0, type MessageQueuedEvent as a1, type OutputTokensDetails as a2, type ParsedSlashCommand as a3, type PendingAuthResponse as a4, type PlanWorkRequest as a5, type ProbeAnswerEvent as a6, type ProjectInvoicesResponse as a7, type ProjectUsageResponse as a8, type QueryOptions as a9, type UpdateWorkflowRequest as aA, type UploadBatchResult as aB, type UploadDirectOptions as aC, type UploadDirectResult as aD, type UploadOptions as aE, type UploadResult as aF, type UserDailyUsageResponse as aG, type UserInfo as aH, type UserInputRequestEvent as aI, type UserMessageEvent as aJ, WebSocketAuthError as aK, type WorkStatus as aL, type WorkflowAuthMode as aM, type WorkflowResponse as aN, type WorkflowRunHistoryResponse as aO, type WorkflowRunResponse as aP, type WorkspaceContext as aQ, type WsConnection as aR, account as aS, agentconfig as aT, agents as aU, assistant as aV, authenticatedFetch as aW, buildDocNameMap as aX, buildFactsContextTool as aY, buildRetrievalChunkTool as aZ, buildRetrievalFullContextTool as a_, type ReconnectOptions as aa, type ReconnectableWsConnection as ab, type ResolvedCitation as ac, type ResolvedRecipient as ad, type ResponseCompletedEvent as ae, type ResponseContentPartAddedEvent as af, type ResponseCreatedEvent as ag, type ResponseFailedEvent as ah, type ResponseOutputItemAddedEvent as ai, type ResponseOutputItemDoneEvent as aj, type ResponseOutputTextDeltaEvent as ak, type ResponseOutputTextDoneEvent as al, type ResponseUsage as am, type SSEEvent as an, type SSEStreamCallbacks as ao, type SSEStreamResult as ap, type SSEStreamStartData as aq, SUPPORTED_EXTENSIONS as ar, type SkillSummary as as, type SkippedFile as at, type StepActionRequest as au, type SubmitBackgroundQueryOptions as av, type TaskPlan as aw, type TokenBudgetContext as ax, type UpdateConversationRequest as ay, type UpdateFactRequest as az, type AgentControlStateEvent as b, connectWebSocket as b0, connectWithReconnect as b1, consumeSSEStream as b2, contacts as b3, conversations as b4, countCitations as b5, createAuthenticatedClient as b6, createDocumentWaiter as b7, dm as b8, doctags as b9, profile as bA, projects as bB, requireData as bC, requireOk as bD, resolveAuth as bE, resolveCitations as bF, resolveWorkspace as bG, responses as bH, selectWorkspace as bI, selectWorkspaceById as bJ, sessions as bK, settings as bL, streamSSE as bM, stripCitationMarkdown as bN, summarizeCitations as bO, tags as bP, work as bQ, workflows as bR, workspaces as bS, documents as ba, facts as bb, files as bc, filterSkills as bd, formatAgentStepLabel as be, formatFileSize as bf, formatItemLabel as bg, formatStreamSummary as bh, formatUserName as bi, formatWorkspaceChoices as bj, formatWsMessage as bk, generateEncryptedWorkspaceKey as bl, generateNewWorkspaceKey as bm, getErrorCode as bn, getErrorMessage as bo, getRawWorkspaceKey as bp, health as bq, identity as br, identityErrorCode as bs, mail as bt, parseSSEEvents as bu, parseSlashCommand as bv, parseSlashTokenInProgress as bw, performPasswordLogin as bx, performSigningKeyLogin as by, performSsoDeviceFlowLogin as bz, type AgentStepDeltaEvent as c, type AgentStepEvent as d, Arbi as e, ArbiApiError as f, ArbiError as g, type ArbiErrorEvent as h, type ArbiOptions as i, ArbiSessionExpiredError as j, type ArtifactEvent as k, type AuthContext as l, type AuthHeaders as m, type AuthMode as n, type AuthenticatedClient as o, type CitationSummary as p, type CliConfig as q, type CliCredentials as r, type CommandDescriptor as s, type ConfigStore as t, type ConnectOptions as u, type ConversationResponse as v, type CreateFactRequest as w, type CreateFactsRequest as x, type CreateWorkRequest as y, type CreateWorkflowRequest as z };
9120
+ export { type MessageLevel as $, type ActivityKind as A, type DecryptedDmNotification as B, type ChatSession as C, DOC_TERMINAL_STATUSES as D, type DeferredInterjectionEvent as E, type DmAttachmentFile as F, type DmAttachmentInput as G, type DmCryptoContext as H, type DocNameMap as I, type DocumentAutomationAction as J, type DocumentListFields as K, type DocumentListOrder as L, type DocumentSelector as M, type DocumentWaiter as N, type DocumentWaiterOptions as O, type FactResponse as P, type FactSearchRequest as Q, type FactSearchResponse as R, type FormattedWsMessage as S, type IdentityErrorCode as T, type IdentityPurchase as U, type IdentityState as V, type IdentityStatus as W, type ListAllOptions as X, type ListFactsOptions as Y, type ListPaginatedOptions as Z, type MailAttachment as _, type ActivityResponse as a, type WorkspaceContext as a$, type MessageMetadataPayload$1 as a0, type MessageQueuedEvent as a1, type OutputTokensDetails as a2, type ParsedSlashCommand as a3, type PendingAuthResponse as a4, PlanStepsError as a5, type PlanWorkRequest as a6, type ProbeAnswerEvent as a7, type ProjectInvoicesResponse as a8, type ProjectUsageResponse as a9, type StepField as aA, type StepKind as aB, type StepPhase as aC, type StepState as aD, type StepStatus as aE, type SubmitBackgroundQueryOptions as aF, type TaskPlan as aG, type TaskPlanStep as aH, type TokenBudgetContext as aI, type UpdateConversationRequest as aJ, type UpdateFactRequest as aK, type UpdateWorkflowRequest as aL, type UploadBatchResult as aM, type UploadDirectOptions as aN, type UploadDirectResult as aO, type UploadOptions as aP, type UploadResult as aQ, type UserDailyUsageResponse as aR, type UserInfo as aS, type UserInputRequestEvent as aT, type UserMessageEvent as aU, WebSocketAuthError as aV, type WorkStatus as aW, type WorkflowAuthMode as aX, type WorkflowResponse as aY, type WorkflowRunHistoryResponse as aZ, type WorkflowRunResponse as a_, type QueryOptions as aa, type ReconnectOptions as ab, type ReconnectableWsConnection as ac, type ResolvedCitation as ad, type ResolvedRecipient as ae, type ResponseCompletedEvent as af, type ResponseContentPartAddedEvent as ag, type ResponseCreatedEvent as ah, type ResponseFailedEvent as ai, type ResponseOutputItemAddedEvent as aj, type ResponseOutputItemDoneEvent as ak, type ResponseOutputTextDeltaEvent as al, type ResponseOutputTextDoneEvent as am, type ResponseUsage as an, type RunProgress as ao, type RunStep as ap, type RunWaitingOn as aq, type SSEEvent as ar, type SSEStreamCallbacks as as, type SSEStreamResult as at, type SSEStreamStartData as au, SUPPORTED_EXTENSIONS as av, type SkillSummary as aw, type SkippedFile as ax, type StepActionRequest as ay, type StepActivityEvent as az, type AgentControlStateEvent as b, work as b$, type WsConnection as b0, account as b1, agentconfig as b2, agents as b3, assistant as b4, authenticatedFetch as b5, buildDocNameMap as b6, buildFactsContextTool as b7, buildRetrievalChunkTool as b8, buildRetrievalFullContextTool as b9, getRawWorkspaceKey as bA, health as bB, identity as bC, identityErrorCode as bD, mail as bE, parseSSEEvents as bF, parseSlashCommand as bG, parseSlashTokenInProgress as bH, performPasswordLogin as bI, performSigningKeyLogin as bJ, performSsoDeviceFlowLogin as bK, profile as bL, projects as bM, requireData as bN, requireOk as bO, resolveAuth as bP, resolveCitations as bQ, resolveWorkspace as bR, responses as bS, selectWorkspace as bT, selectWorkspaceById as bU, sessions as bV, settings as bW, streamSSE as bX, stripCitationMarkdown as bY, summarizeCitations as bZ, tags as b_, buildRetrievalTocTool as ba, connectWebSocket as bb, connectWithReconnect as bc, consumeSSEStream as bd, contacts as be, conversations as bf, countCitations as bg, createAuthenticatedClient as bh, createDocumentWaiter as bi, dm as bj, doctags as bk, documents as bl, facts as bm, files as bn, filterSkills as bo, formatAgentStepLabel as bp, formatFileSize as bq, formatItemLabel as br, formatStreamSummary as bs, formatUserName as bt, formatWorkspaceChoices as bu, formatWsMessage as bv, generateEncryptedWorkspaceKey as bw, generateNewWorkspaceKey as bx, getErrorCode as by, getErrorMessage as bz, type AgentStepDeltaEvent as c, workflowSteps as c0, workflows as c1, workspaces as c2, type AgentStepEvent as d, Arbi as e, ArbiApiError as f, ArbiError as g, type ArbiErrorEvent as h, type ArbiOptions as i, ArbiSessionExpiredError as j, type ArtifactEvent as k, type AuthContext as l, type AuthHeaders as m, type AuthMode as n, type AuthenticatedClient as o, type CitationSummary as p, type CliConfig as q, type CliCredentials as r, type CommandDescriptor as s, type ConfigStore as t, type ConnectOptions as u, type ConversationResponse as v, type CreateFactRequest as w, type CreateFactsRequest as x, type CreateWorkRequest as y, type CreateWorkflowRequest as z };