@parall/sdk 1.51.0 → 1.52.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.ts +46 -7
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +63 -6
- package/dist/constants.d.ts +3 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +5 -0
- package/dist/types.d.ts +126 -7
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +102 -7
- package/src/constants.ts +7 -0
- package/src/types.ts +132 -7
package/src/types.ts
CHANGED
|
@@ -924,6 +924,13 @@ export interface DispatchSourceRef {
|
|
|
924
924
|
*/
|
|
925
925
|
export interface CompleteDispatchSourcesRequest {
|
|
926
926
|
sources: DispatchSourceRef[];
|
|
927
|
+
/**
|
|
928
|
+
* Optional session attribution for the swept no_action rows (message ↔
|
|
929
|
+
* session linking; effect-covered rows inherit their covering reply's
|
|
930
|
+
* session). Validated against (org, agent); a mismatch drops the
|
|
931
|
+
* attribution.
|
|
932
|
+
*/
|
|
933
|
+
session_id?: string;
|
|
927
934
|
}
|
|
928
935
|
|
|
929
936
|
export interface CompleteDispatchSourcesResult {
|
|
@@ -3178,6 +3185,8 @@ export type DispatchEventType =
|
|
|
3178
3185
|
| 'channel_message';
|
|
3179
3186
|
export type DispatchStatus = 'pending' | 'received' | 'acked';
|
|
3180
3187
|
export type DispatchDeliveryReason = 'mention' | 'watcher' | 'assignee' | 'creator';
|
|
3188
|
+
export type DispatchCoverageMode = 'implicit' | 'explicit';
|
|
3189
|
+
export type DispatchInputState = 'offered' | 'started' | 'completed' | 'failed';
|
|
3181
3190
|
|
|
3182
3191
|
export interface DispatchEvent {
|
|
3183
3192
|
id: string;
|
|
@@ -3212,6 +3221,7 @@ export interface DispatchEvent {
|
|
|
3212
3221
|
*/
|
|
3213
3222
|
dedupe_key?: string | null;
|
|
3214
3223
|
lease_owner?: string | null;
|
|
3224
|
+
input_state?: DispatchInputState | null;
|
|
3215
3225
|
target_uri?: string | null;
|
|
3216
3226
|
thread_root_id?: string | null;
|
|
3217
3227
|
resolution_kind?:
|
|
@@ -3229,6 +3239,14 @@ export interface DispatchEvent {
|
|
|
3229
3239
|
* redrive_exhausted. Absent on pre-budget servers.
|
|
3230
3240
|
*/
|
|
3231
3241
|
redrive_count?: number;
|
|
3242
|
+
/**
|
|
3243
|
+
* Agent session that ultimately handled this WorkItem, stamped at resolve
|
|
3244
|
+
* time where deterministically known (reply commits + broad cover /
|
|
3245
|
+
* by-source contagion; complete endpoints' validated self-report).
|
|
3246
|
+
* NULL = unattributed: live rows, cancelled, legacy acks, typed effects
|
|
3247
|
+
* until their runtimes report it.
|
|
3248
|
+
*/
|
|
3249
|
+
session_id?: string | null;
|
|
3232
3250
|
/**
|
|
3233
3251
|
* Reply-message provenance ("prll://msg_x") of the resolving Effect.
|
|
3234
3252
|
* Populated only by GET /dispatch/by-messages (Effect join) on
|
|
@@ -3254,6 +3272,12 @@ export interface ClaimDispatchRequest {
|
|
|
3254
3272
|
source_type?: string;
|
|
3255
3273
|
source_id?: string;
|
|
3256
3274
|
limit?: number;
|
|
3275
|
+
/**
|
|
3276
|
+
* Explicit requires the runtime to report exact per-WorkItem input
|
|
3277
|
+
* lifecycle before reply/no-action coverage. Omit for legacy implicit
|
|
3278
|
+
* fold-means-consumed behavior.
|
|
3279
|
+
*/
|
|
3280
|
+
coverage_mode?: DispatchCoverageMode;
|
|
3257
3281
|
}
|
|
3258
3282
|
|
|
3259
3283
|
export interface ClaimDispatchResponse {
|
|
@@ -3267,6 +3291,7 @@ export interface ClaimDispatchResponse {
|
|
|
3267
3291
|
reason?: 'held' | 'empty' | '';
|
|
3268
3292
|
lane?: string;
|
|
3269
3293
|
lease_until?: string;
|
|
3294
|
+
coverage_mode?: DispatchCoverageMode;
|
|
3270
3295
|
events?: DispatchEvent[];
|
|
3271
3296
|
}
|
|
3272
3297
|
|
|
@@ -3285,6 +3310,22 @@ export interface SteerDispatchResponse {
|
|
|
3285
3310
|
dispatch_event_id: string;
|
|
3286
3311
|
}
|
|
3287
3312
|
|
|
3313
|
+
/** POST /dispatch/input-state — advance exact explicit-lane input members. */
|
|
3314
|
+
export interface UpdateDispatchInputStateRequest {
|
|
3315
|
+
lane: string;
|
|
3316
|
+
target_uri: string;
|
|
3317
|
+
thread_root_id?: string;
|
|
3318
|
+
dispatch_event_ids: string[];
|
|
3319
|
+
state: Exclude<DispatchInputState, 'offered'>;
|
|
3320
|
+
}
|
|
3321
|
+
|
|
3322
|
+
export interface UpdateDispatchInputStateResponse {
|
|
3323
|
+
/** Exact IDs accepted, including idempotent same-state retries. */
|
|
3324
|
+
recognized: number;
|
|
3325
|
+
released: number;
|
|
3326
|
+
redriven: boolean;
|
|
3327
|
+
}
|
|
3328
|
+
|
|
3288
3329
|
/**
|
|
3289
3330
|
* POST /dispatch/complete — end a turn. Two mutually exclusive reference
|
|
3290
3331
|
* forms (dispatch-convergence-design.md §3), each with its own result shape
|
|
@@ -3301,13 +3342,31 @@ export interface CompleteDispatchLaneRequest {
|
|
|
3301
3342
|
target_uri: string;
|
|
3302
3343
|
thread_root_id?: string;
|
|
3303
3344
|
/**
|
|
3304
|
-
* "ok" (default) or "
|
|
3305
|
-
* pending on the redrive budget instead of being
|
|
3306
|
-
* work is retried rather than silently
|
|
3345
|
+
* "ok" (default), "error", or "deferred". An error turn's members are
|
|
3346
|
+
* released back to pending on the redrive budget instead of being
|
|
3347
|
+
* no_action-swept, so failed work is retried rather than silently
|
|
3348
|
+
* resolved. A deferred turn (self-healing LLM usage limit,
|
|
3349
|
+
* agent-turn-outcome-design.md §6) releases its members to pending with
|
|
3350
|
+
* next_redrive_at = retry_at WITHOUT burning redrive budget — the renotify
|
|
3351
|
+
* slow loop re-delivers them at reset time. Servers predating "deferred"
|
|
3352
|
+
* answer 400; the bridge falls back to "error".
|
|
3307
3353
|
*/
|
|
3308
|
-
turn_outcome?: 'ok' | 'error';
|
|
3354
|
+
turn_outcome?: 'ok' | 'error' | 'deferred';
|
|
3355
|
+
/** Normalized failure class for the deferred form (observability only). */
|
|
3356
|
+
outcome_class?: 'usage_limit';
|
|
3357
|
+
/**
|
|
3358
|
+
* ISO 8601 re-delivery time for turn_outcome=deferred. The server clamps
|
|
3359
|
+
* it into [now+1min, now+6h] and defaults a missing value to now+30min.
|
|
3360
|
+
*/
|
|
3361
|
+
retry_at?: string;
|
|
3309
3362
|
sources?: never;
|
|
3310
3363
|
dispatch_event_id?: never;
|
|
3364
|
+
/**
|
|
3365
|
+
* Optional session attribution for the swept no_action rows (message ↔
|
|
3366
|
+
* session linking). Validated against (org, agent); a mismatch drops the
|
|
3367
|
+
* attribution, never the sweep.
|
|
3368
|
+
*/
|
|
3369
|
+
session_id?: string;
|
|
3311
3370
|
}
|
|
3312
3371
|
|
|
3313
3372
|
/**
|
|
@@ -3319,6 +3378,12 @@ export interface CompleteDispatchLaneRequest {
|
|
|
3319
3378
|
export interface CompleteDispatchSourceFormRequest {
|
|
3320
3379
|
sources: DispatchSourceRef[];
|
|
3321
3380
|
turn_outcome?: 'ok' | 'error';
|
|
3381
|
+
/**
|
|
3382
|
+
* Optional session attribution for the turn's no_action rows
|
|
3383
|
+
* (effect-covered rows inherit their covering reply's session instead).
|
|
3384
|
+
* Validated against (org, agent); informational.
|
|
3385
|
+
*/
|
|
3386
|
+
session_id?: string;
|
|
3322
3387
|
lane?: never;
|
|
3323
3388
|
target_uri?: never;
|
|
3324
3389
|
thread_root_id?: never;
|
|
@@ -3346,6 +3411,8 @@ export interface CompleteDispatchByIDRequest {
|
|
|
3346
3411
|
/** Lane-form result. */
|
|
3347
3412
|
export interface CompleteDispatchResult {
|
|
3348
3413
|
swept_no_action: number;
|
|
3414
|
+
/** Members not eligible for no-action coverage and released for retry. */
|
|
3415
|
+
released?: number;
|
|
3349
3416
|
redriven: boolean;
|
|
3350
3417
|
}
|
|
3351
3418
|
|
|
@@ -3386,9 +3453,11 @@ export interface DispatchReceivedData {
|
|
|
3386
3453
|
/**
|
|
3387
3454
|
* Terminal counterpart of DispatchReceivedData: published on org:{orgId} when
|
|
3388
3455
|
* a message WorkItem reaches a terminal resolution, so the message-level
|
|
3389
|
-
* Activity
|
|
3390
|
-
* `redrive_exhausted
|
|
3391
|
-
*
|
|
3456
|
+
* Activity state flips active→done — or, per indicator v2.1, active→failed
|
|
3457
|
+
* for `redrive_exhausted`. Failed history remains available through Activity;
|
|
3458
|
+
* only a live event produces the transient inline failure indicator. Only
|
|
3459
|
+
* `cancelled` clears the activity — without inferring completion from agent
|
|
3460
|
+
* session state. Message WorkItems only.
|
|
3392
3461
|
*/
|
|
3393
3462
|
export interface DispatchResolvedData {
|
|
3394
3463
|
agent_id: string;
|
|
@@ -3404,6 +3473,12 @@ export interface DispatchResolvedData {
|
|
|
3404
3473
|
* message. Absent for no_action / legacy_ack.
|
|
3405
3474
|
*/
|
|
3406
3475
|
result_uri?: string | null;
|
|
3476
|
+
/**
|
|
3477
|
+
* Session attribution mirrored from the resolved rows — lets the
|
|
3478
|
+
* indicator's click-through open the exact session without a refetch.
|
|
3479
|
+
* Absent when the resolution is unattributed.
|
|
3480
|
+
*/
|
|
3481
|
+
session_id?: string | null;
|
|
3407
3482
|
}
|
|
3408
3483
|
|
|
3409
3484
|
export type InboxNewData = InboxItem;
|
|
@@ -4675,6 +4750,56 @@ export interface ClipConnection {
|
|
|
4675
4750
|
updated_at: string;
|
|
4676
4751
|
}
|
|
4677
4752
|
|
|
4753
|
+
/** v1 MCP clip auth modes. Server-side OAuth is a designed follow-up. */
|
|
4754
|
+
export type MCPAuthType = 'none' | 'bearer' | 'api_key';
|
|
4755
|
+
|
|
4756
|
+
/**
|
|
4757
|
+
* One tool from the cached tools/list snapshot. The full remote tool object is
|
|
4758
|
+
* snapshotted verbatim (inputSchema etc. ride along in the index signature).
|
|
4759
|
+
* Name/description are REMOTE-CONTROLLED UNTRUSTED TEXT — render as plain text
|
|
4760
|
+
* only, never as markdown/HTML and never into a privileged prompt.
|
|
4761
|
+
*/
|
|
4762
|
+
export interface MCPToolInfo {
|
|
4763
|
+
name: string;
|
|
4764
|
+
description?: string;
|
|
4765
|
+
[key: string]: unknown;
|
|
4766
|
+
}
|
|
4767
|
+
|
|
4768
|
+
/**
|
|
4769
|
+
* Redacted MCP server config of an MCP clip
|
|
4770
|
+
* (`GET /orgs/{orgId}/clip-registry/{clipId}/mcp-config`). The whole
|
|
4771
|
+
* mcp-config family is publisher-org only: cross-org installs get
|
|
4772
|
+
* `403 MCP_CROSS_ORG_DISABLED`, reads included. The stored credential NEVER
|
|
4773
|
+
* appears in any response — `credential_set` is the only credential fact.
|
|
4774
|
+
*/
|
|
4775
|
+
export interface MCPConfigResponse {
|
|
4776
|
+
server_url: string;
|
|
4777
|
+
auth_type: MCPAuthType;
|
|
4778
|
+
/** Whether a credential is stored (write-only; the value is never returned). */
|
|
4779
|
+
credential_set: boolean;
|
|
4780
|
+
/** Cached tools/list snapshot; untrusted remote metadata (see MCPToolInfo). */
|
|
4781
|
+
tools?: MCPToolInfo[];
|
|
4782
|
+
tools_refreshed_at?: string;
|
|
4783
|
+
/**
|
|
4784
|
+
* Opaque CAS token for If-Match on PUT/DELETE (lost-update protection).
|
|
4785
|
+
* Version mismatch answers `409 MCP_CONFIG_STALE`.
|
|
4786
|
+
*/
|
|
4787
|
+
version: string;
|
|
4788
|
+
}
|
|
4789
|
+
|
|
4790
|
+
/**
|
|
4791
|
+
* PUT body for the MCP config. Credential semantics (server-enforced):
|
|
4792
|
+
* omitted keeps the stored one ONLY while auth_type is unchanged; switching
|
|
4793
|
+
* credentialed types requires a new credential; auth_type "none" clears it.
|
|
4794
|
+
* Saving probes the server (initialize + tools/list) first — a failed probe
|
|
4795
|
+
* persists nothing.
|
|
4796
|
+
*/
|
|
4797
|
+
export interface MCPConfigPutRequest {
|
|
4798
|
+
server_url: string;
|
|
4799
|
+
auth_type: MCPAuthType;
|
|
4800
|
+
credential?: string;
|
|
4801
|
+
}
|
|
4802
|
+
|
|
4678
4803
|
/**
|
|
4679
4804
|
* A clip in the api-server org registry (`crg_…`, table `clip_registry`) — the
|
|
4680
4805
|
* v3 registry that install and clip connections operate on. Distinct from
|