@parall/sdk 1.50.1 → 1.52.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.
package/dist/types.d.ts CHANGED
@@ -319,6 +319,8 @@ export interface Organization {
319
319
  /** Agent ID for strategy='agent'. NULL when strategy is 'llm' or unset. */
320
320
  smart_routing_agent_id: string | null;
321
321
  onboarding_agent_id: string | null;
322
+ /** Org-level IANA timezone (e.g. "America/New_York"). Defaults to "UTC". */
323
+ timezone: string;
322
324
  created_at: string;
323
325
  /** Per-member flag: true when the user has dismissed the onboarding popup for this org. */
324
326
  onboarding_dismissed: boolean;
@@ -587,6 +589,45 @@ export interface DeployTemplateRequest {
587
589
  template_id: string;
588
590
  template_revision: string;
589
591
  parameter_values?: Record<string, TemplateParameterValue>;
592
+ /** Hire-time per-agent adjustments (onboarding wizard S2). Keys are the
593
+ * template's agent keys; omitted agents keep template defaults. */
594
+ agent_overrides?: Record<string, DeployAgentOverride>;
595
+ }
596
+ /** Per-agent hire-time override. Substitutes values within the platform-legal
597
+ * surface; never adds capability. Dependencies may only disable (false)
598
+ * declared optional deps — required deps and undeclared refs are rejected. */
599
+ export interface DeployAgentOverride {
600
+ runtime_type?: string;
601
+ /** Model catalog id. Empty string clears the template's pin (platform default). */
602
+ model?: string;
603
+ compute?: {
604
+ machine_type: 'cloud';
605
+ machine_label?: string;
606
+ };
607
+ dependencies?: Record<string, boolean>;
608
+ }
609
+ /** Pre-deploy dependency connection state (wizard S3 poll target). Same
610
+ * checker as the deployment report, so the two surfaces cannot disagree. */
611
+ export interface DependencyCheckResult {
612
+ ref: string;
613
+ connected: boolean;
614
+ name?: string;
615
+ }
616
+ /** Onboarding wizard progress (self-scoped). A member who never started
617
+ * reads step='s1', state={}, version=0 (missing-row semantics). */
618
+ export interface OnboardingProgress {
619
+ step: string;
620
+ state: Record<string, unknown>;
621
+ completed_at?: string;
622
+ version: number;
623
+ }
624
+ export interface UpdateOnboardingProgressRequest {
625
+ step: string;
626
+ state: Record<string, unknown>;
627
+ /** Stamps completed_at server-side (idempotent, never un-completes). */
628
+ completed?: boolean;
629
+ /** 0 = first write (no row yet). */
630
+ expected_version: number;
590
631
  }
591
632
  export type TemplateDeploymentAgentState = 'up' | 'provisioning' | 'error';
592
633
  export interface TemplateDeploymentReport {
@@ -713,6 +754,13 @@ export interface DispatchSourceRef {
713
754
  */
714
755
  export interface CompleteDispatchSourcesRequest {
715
756
  sources: DispatchSourceRef[];
757
+ /**
758
+ * Optional session attribution for the swept no_action rows (message ↔
759
+ * session linking; effect-covered rows inherit their covering reply's
760
+ * session). Validated against (org, agent); a mismatch drops the
761
+ * attribution.
762
+ */
763
+ session_id?: string;
716
764
  }
717
765
  export interface CompleteDispatchSourcesResult {
718
766
  resolved_effect: number;
@@ -2547,6 +2595,8 @@ export interface SlackStatusInput {
2547
2595
  export type DispatchEventType = 'message' | 'task_assign' | 'task_update' | 'task_comment' | 'wiki_comment' | 'schedule.fire' | 'external_trigger' | 'approval_decided' | 'channel_message';
2548
2596
  export type DispatchStatus = 'pending' | 'received' | 'acked';
2549
2597
  export type DispatchDeliveryReason = 'mention' | 'watcher' | 'assignee' | 'creator';
2598
+ export type DispatchCoverageMode = 'implicit' | 'explicit';
2599
+ export type DispatchInputState = 'offered' | 'started' | 'completed' | 'failed';
2550
2600
  export interface DispatchEvent {
2551
2601
  id: string;
2552
2602
  org_id: string;
@@ -2580,6 +2630,7 @@ export interface DispatchEvent {
2580
2630
  */
2581
2631
  dedupe_key?: string | null;
2582
2632
  lease_owner?: string | null;
2633
+ input_state?: DispatchInputState | null;
2583
2634
  target_uri?: string | null;
2584
2635
  thread_root_id?: string | null;
2585
2636
  resolution_kind?: 'effect' | 'no_action' | 'cancelled' | 'legacy_ack' | 'redrive_exhausted' | null;
@@ -2591,6 +2642,14 @@ export interface DispatchEvent {
2591
2642
  * redrive_exhausted. Absent on pre-budget servers.
2592
2643
  */
2593
2644
  redrive_count?: number;
2645
+ /**
2646
+ * Agent session that ultimately handled this WorkItem, stamped at resolve
2647
+ * time where deterministically known (reply commits + broad cover /
2648
+ * by-source contagion; complete endpoints' validated self-report).
2649
+ * NULL = unattributed: live rows, cancelled, legacy acks, typed effects
2650
+ * until their runtimes report it.
2651
+ */
2652
+ session_id?: string | null;
2594
2653
  /**
2595
2654
  * Reply-message provenance ("prll://msg_x") of the resolving Effect.
2596
2655
  * Populated only by GET /dispatch/by-messages (Effect join) on
@@ -2615,6 +2674,12 @@ export interface ClaimDispatchRequest {
2615
2674
  source_type?: string;
2616
2675
  source_id?: string;
2617
2676
  limit?: number;
2677
+ /**
2678
+ * Explicit requires the runtime to report exact per-WorkItem input
2679
+ * lifecycle before reply/no-action coverage. Omit for legacy implicit
2680
+ * fold-means-consumed behavior.
2681
+ */
2682
+ coverage_mode?: DispatchCoverageMode;
2618
2683
  }
2619
2684
  export interface ClaimDispatchResponse {
2620
2685
  claimed: boolean;
@@ -2627,6 +2692,7 @@ export interface ClaimDispatchResponse {
2627
2692
  reason?: 'held' | 'empty' | '';
2628
2693
  lane?: string;
2629
2694
  lease_until?: string;
2695
+ coverage_mode?: DispatchCoverageMode;
2630
2696
  events?: DispatchEvent[];
2631
2697
  }
2632
2698
  /** POST /dispatch/steer — fold a pending same-target WorkItem into a live lane. */
@@ -2642,6 +2708,20 @@ export interface SteerDispatchRequest {
2642
2708
  export interface SteerDispatchResponse {
2643
2709
  dispatch_event_id: string;
2644
2710
  }
2711
+ /** POST /dispatch/input-state — advance exact explicit-lane input members. */
2712
+ export interface UpdateDispatchInputStateRequest {
2713
+ lane: string;
2714
+ target_uri: string;
2715
+ thread_root_id?: string;
2716
+ dispatch_event_ids: string[];
2717
+ state: Exclude<DispatchInputState, 'offered'>;
2718
+ }
2719
+ export interface UpdateDispatchInputStateResponse {
2720
+ /** Exact IDs accepted, including idempotent same-state retries. */
2721
+ recognized: number;
2722
+ released: number;
2723
+ redriven: boolean;
2724
+ }
2645
2725
  /**
2646
2726
  * POST /dispatch/complete — end a turn. Two mutually exclusive reference
2647
2727
  * forms (dispatch-convergence-design.md §3), each with its own result shape
@@ -2654,13 +2734,31 @@ export interface CompleteDispatchLaneRequest {
2654
2734
  target_uri: string;
2655
2735
  thread_root_id?: string;
2656
2736
  /**
2657
- * "ok" (default) or "error". An error turn's members are released back to
2658
- * pending on the redrive budget instead of being no_action-swept, so failed
2659
- * work is retried rather than silently resolved. Ignored by older servers.
2737
+ * "ok" (default), "error", or "deferred". An error turn's members are
2738
+ * released back to pending on the redrive budget instead of being
2739
+ * no_action-swept, so failed work is retried rather than silently
2740
+ * resolved. A deferred turn (self-healing LLM usage limit,
2741
+ * agent-turn-outcome-design.md §6) releases its members to pending with
2742
+ * next_redrive_at = retry_at WITHOUT burning redrive budget — the renotify
2743
+ * slow loop re-delivers them at reset time. Servers predating "deferred"
2744
+ * answer 400; the bridge falls back to "error".
2660
2745
  */
2661
- turn_outcome?: 'ok' | 'error';
2746
+ turn_outcome?: 'ok' | 'error' | 'deferred';
2747
+ /** Normalized failure class for the deferred form (observability only). */
2748
+ outcome_class?: 'usage_limit';
2749
+ /**
2750
+ * ISO 8601 re-delivery time for turn_outcome=deferred. The server clamps
2751
+ * it into [now+1min, now+6h] and defaults a missing value to now+30min.
2752
+ */
2753
+ retry_at?: string;
2662
2754
  sources?: never;
2663
2755
  dispatch_event_id?: never;
2756
+ /**
2757
+ * Optional session attribution for the swept no_action rows (message ↔
2758
+ * session linking). Validated against (org, agent); a mismatch drops the
2759
+ * attribution, never the sweep.
2760
+ */
2761
+ session_id?: string;
2664
2762
  }
2665
2763
  /**
2666
2764
  * Source form: the lane-less close for runtimes without a resident process —
@@ -2671,6 +2769,12 @@ export interface CompleteDispatchLaneRequest {
2671
2769
  export interface CompleteDispatchSourceFormRequest {
2672
2770
  sources: DispatchSourceRef[];
2673
2771
  turn_outcome?: 'ok' | 'error';
2772
+ /**
2773
+ * Optional session attribution for the turn's no_action rows
2774
+ * (effect-covered rows inherit their covering reply's session instead).
2775
+ * Validated against (org, agent); informational.
2776
+ */
2777
+ session_id?: string;
2674
2778
  lane?: never;
2675
2779
  target_uri?: never;
2676
2780
  thread_root_id?: never;
@@ -2696,6 +2800,8 @@ export interface CompleteDispatchByIDRequest {
2696
2800
  /** Lane-form result. */
2697
2801
  export interface CompleteDispatchResult {
2698
2802
  swept_no_action: number;
2803
+ /** Members not eligible for no-action coverage and released for retry. */
2804
+ released?: number;
2699
2805
  redriven: boolean;
2700
2806
  }
2701
2807
  /** Source-form result (mirrors CompleteDispatchSourcesResult). */
@@ -2730,9 +2836,10 @@ export interface DispatchReceivedData {
2730
2836
  /**
2731
2837
  * Terminal counterpart of DispatchReceivedData: published on org:{orgId} when
2732
2838
  * a message WorkItem reaches a terminal resolution, so the message-level
2733
- * Activity indicator flips active→done (or clears, for `cancelled` /
2734
- * `redrive_exhausted`) without inferring completion from agent session state.
2735
- * Message WorkItems only.
2839
+ * Activity indicator flips active→done or, per indicator v2.1, active→failed
2840
+ * for `redrive_exhausted` (persistent dead-letter row); only `cancelled`
2841
+ * clears the indicator — without inferring completion from agent session
2842
+ * state. Message WorkItems only.
2736
2843
  */
2737
2844
  export interface DispatchResolvedData {
2738
2845
  agent_id: string;
@@ -2748,6 +2855,12 @@ export interface DispatchResolvedData {
2748
2855
  * message. Absent for no_action / legacy_ack.
2749
2856
  */
2750
2857
  result_uri?: string | null;
2858
+ /**
2859
+ * Session attribution mirrored from the resolved rows — lets the
2860
+ * indicator's click-through open the exact session without a refetch.
2861
+ * Absent when the resolution is unattributed.
2862
+ */
2863
+ session_id?: string | null;
2751
2864
  }
2752
2865
  export type InboxNewData = InboxItem;
2753
2866
  export interface InboxUpdateData {
@@ -3409,14 +3522,30 @@ export type BrowserProfileStatus = 'pending' | 'running' | 'stopped' | 'error' |
3409
3522
  /**
3410
3523
  * Routing/identity discriminant: `byoc` runs on a user machine (machine_id
3411
3524
  * required), `hosted` runs on the platform pool (machine_id null).
3525
+ *
3526
+ * NOTE: `hosted` is RETIRED — its compute plane was removed, so creating a profile
3527
+ * with it is rejected (400 `HOSTED_PLACEMENT_RETIRED`) and existing hosted rows are
3528
+ * read-only (readable, proxy-editable, deletable; never startable). The value stays
3529
+ * in the union because those preserved rows still report it. For a platform-run
3530
+ * browser use a v3 Cloud Profile (`POST /orgs/{org}/edge`).
3412
3531
  */
3413
3532
  export type BrowserPlacement = 'byoc' | 'hosted';
3414
- /** Deployment-wide hosted browser runtime availability (the controller startup
3415
- * gate). Drives whether the create UI offers the platform-hosted placement; it
3416
- * is org-scoped only for auth the value itself is the same for every org.
3417
- * Fail-closed: the server reports `available: false` if it cannot verify. */
3533
+ /** Platform-hosted browser runtime availability.
3534
+ *
3535
+ * This now always reports `available: false`: the v2 hosted compute plane is
3536
+ * retired, so the answer is a constant rather than a probe of a controller that no
3537
+ * longer exists. Clients that already treat `available: false` as "offer BYOC
3538
+ * instead" degrade correctly with no change.
3539
+ *
3540
+ * `code` distinguishes PERMANENT retirement (`HOSTED_PLACEMENT_RETIRED`) from the
3541
+ * transient outage the old flag could also mean — do not retry on it. It is
3542
+ * optional so older servers, which sent only `{available, reason}`, still typecheck. */
3418
3543
  export interface BrowserRuntimeStatus {
3419
3544
  available: boolean;
3545
+ /** Present when `available` is false for a structural reason. Currently only
3546
+ * `HOSTED_PLACEMENT_RETIRED`; typed as string so a new server code is not a
3547
+ * breaking SDK change. */
3548
+ code?: string;
3420
3549
  reason?: string;
3421
3550
  }
3422
3551
  export interface BrowserProfile {
@@ -3825,6 +3954,52 @@ export interface ClipConnection {
3825
3954
  created_at: string;
3826
3955
  updated_at: string;
3827
3956
  }
3957
+ /** v1 MCP clip auth modes. Server-side OAuth is a designed follow-up. */
3958
+ export type MCPAuthType = 'none' | 'bearer' | 'api_key';
3959
+ /**
3960
+ * One tool from the cached tools/list snapshot. The full remote tool object is
3961
+ * snapshotted verbatim (inputSchema etc. ride along in the index signature).
3962
+ * Name/description are REMOTE-CONTROLLED UNTRUSTED TEXT — render as plain text
3963
+ * only, never as markdown/HTML and never into a privileged prompt.
3964
+ */
3965
+ export interface MCPToolInfo {
3966
+ name: string;
3967
+ description?: string;
3968
+ [key: string]: unknown;
3969
+ }
3970
+ /**
3971
+ * Redacted MCP server config of an MCP clip
3972
+ * (`GET /orgs/{orgId}/clip-registry/{clipId}/mcp-config`). The whole
3973
+ * mcp-config family is publisher-org only: cross-org installs get
3974
+ * `403 MCP_CROSS_ORG_DISABLED`, reads included. The stored credential NEVER
3975
+ * appears in any response — `credential_set` is the only credential fact.
3976
+ */
3977
+ export interface MCPConfigResponse {
3978
+ server_url: string;
3979
+ auth_type: MCPAuthType;
3980
+ /** Whether a credential is stored (write-only; the value is never returned). */
3981
+ credential_set: boolean;
3982
+ /** Cached tools/list snapshot; untrusted remote metadata (see MCPToolInfo). */
3983
+ tools?: MCPToolInfo[];
3984
+ tools_refreshed_at?: string;
3985
+ /**
3986
+ * Opaque CAS token for If-Match on PUT/DELETE (lost-update protection).
3987
+ * Version mismatch answers `409 MCP_CONFIG_STALE`.
3988
+ */
3989
+ version: string;
3990
+ }
3991
+ /**
3992
+ * PUT body for the MCP config. Credential semantics (server-enforced):
3993
+ * omitted keeps the stored one ONLY while auth_type is unchanged; switching
3994
+ * credentialed types requires a new credential; auth_type "none" clears it.
3995
+ * Saving probes the server (initialize + tools/list) first — a failed probe
3996
+ * persists nothing.
3997
+ */
3998
+ export interface MCPConfigPutRequest {
3999
+ server_url: string;
4000
+ auth_type: MCPAuthType;
4001
+ credential?: string;
4002
+ }
3828
4003
  /**
3829
4004
  * A clip in the api-server org registry (`crg_…`, table `clip_registry`) — the
3830
4005
  * v3 registry that install and clip connections operate on. Distinct from