@qwen-code/web-shell 0.25.0 → 0.25.1-nightly.20261012.18f80f5666

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/README.md +6 -7
  2. package/dist/agents-route-DlEzBEU4.js +1546 -0
  3. package/dist/daemon-react-sdk.js +1 -1
  4. package/dist/{index-tVJkU24-.js → index-NuS7ToOq.js} +53556 -48611
  5. package/dist/index.js +22 -22
  6. package/dist/sw.js +1 -1
  7. package/dist/transcript.js +9991 -9580
  8. package/dist/types/adapters/messageTypes.d.ts +8 -1
  9. package/dist/types/adapters/transcriptAdapter.d.ts +2 -1
  10. package/dist/types/browser-turn-notifications.d.ts +2 -1
  11. package/dist/types/components/ChatContextHeader.d.ts +3 -1
  12. package/dist/types/components/ChatEditor.d.ts +4 -7
  13. package/dist/types/components/QueuedPromptDisplay.d.ts +4 -1
  14. package/dist/types/components/WorkspaceSelector.d.ts +9 -1
  15. package/dist/types/components/agents/AgentCreatePage.d.ts +7 -1
  16. package/dist/types/components/agents/AgentsManagerPage.d.ts +4 -5
  17. package/dist/types/components/artifacts/ArtifactPanel.d.ts +1 -8
  18. package/dist/types/components/artifacts/TrajectoryFilters.d.ts +15 -0
  19. package/dist/types/components/artifacts/TrajectoryInspector.d.ts +3 -1
  20. package/dist/types/components/artifacts/artifactUtils.d.ts +9 -0
  21. package/dist/types/components/managed/ManagedSessionCwdControl.d.ts +9 -0
  22. package/dist/types/components/managed/ManagedTaskPanel.d.ts +15 -0
  23. package/dist/types/components/managed/ManagedToolResultPanel.d.ts +6 -1
  24. package/dist/types/components/managed/generated/managed-agent-api.d.ts +273 -25
  25. package/dist/types/components/managed/java-managed-agent-client.d.ts +41 -1
  26. package/dist/types/components/managed/managed-agent-provider.d.ts +50 -1
  27. package/dist/types/components/managed/managed-request-error.d.ts +6 -0
  28. package/dist/types/components/managed/managed-task-messages.d.ts +9 -0
  29. package/dist/types/components/managed/managed-task-messages.transcript-stub.d.ts +7 -0
  30. package/dist/types/components/managed/managed-task.test-fixtures.d.ts +4 -0
  31. package/dist/types/components/managed/use-managed-actions.d.ts +6 -5
  32. package/dist/types/components/managed/use-managed-cwd-change.d.ts +21 -0
  33. package/dist/types/components/managed/use-managed-session.d.ts +15 -1
  34. package/dist/types/components/managed/use-managed-task-cancel.d.ts +12 -0
  35. package/dist/types/components/managed/use-managed-tasks.d.ts +49 -0
  36. package/dist/types/components/messages/AssistantMessage.d.ts +3 -1
  37. package/dist/types/components/messages/BrowserNotificationControl.d.ts +1 -0
  38. package/dist/types/components/messages/SelectionCopyMenu.d.ts +8 -0
  39. package/dist/types/components/messages/SelectionCopyMenu.transcript-stub.d.ts +2 -0
  40. package/dist/types/components/messages/ToolApproval.d.ts +2 -1
  41. package/dist/types/components/messages/UserMessage.d.ts +3 -1
  42. package/dist/types/components/messages/agent-message-details.d.ts +36 -0
  43. package/dist/types/components/messages/squad-tag.d.ts +16 -0
  44. package/dist/types/components/messages/toolFormatting.d.ts +3 -3
  45. package/dist/types/components/sidebar/WebShellSidebar.d.ts +8 -4
  46. package/dist/types/components/sidebar/WorkspaceSection.d.ts +9 -2
  47. package/dist/types/components/workspace-agents/ThreadsPage.d.ts +31 -55
  48. package/dist/types/components/workspace-agents/add-runtime-dialog.d.ts +34 -5
  49. package/dist/types/components/workspace-agents/agent-events.d.ts +4 -34
  50. package/dist/types/components/workspace-agents/agents-route.d.ts +19 -0
  51. package/dist/types/components/workspace-agents/agents-view-logic.d.ts +14 -163
  52. package/dist/types/components/workspace-agents/lazy-agents-route.d.ts +7 -0
  53. package/dist/types/components/workspace-agents/messages.d.ts +2 -2
  54. package/dist/types/components/workspace-agents/session-agent-live-runs.d.ts +96 -0
  55. package/dist/types/components/workspace-agents/session-agents-api.d.ts +39 -0
  56. package/dist/types/components/workspace-agents/squads-section.d.ts +28 -0
  57. package/dist/types/components/workspace-agents/threads-api.d.ts +25 -36
  58. package/dist/types/components/workspace-agents/use-session-agent-runs.d.ts +66 -0
  59. package/dist/types/components/workspace-agents/useAgentChatEntry.d.ts +74 -10
  60. package/dist/types/components/workspaces/HostLabel.d.ts +8 -0
  61. package/dist/types/components/workspaces/WorkspaceHostProjects.d.ts +18 -0
  62. package/dist/types/components/workspaces/WorkspaceLocation.d.ts +10 -0
  63. package/dist/types/config/daemon-target.d.ts +76 -0
  64. package/dist/types/config/daemon.d.ts +16 -0
  65. package/dist/types/config/host-fanout.d.ts +53 -0
  66. package/dist/types/config/remote-connections.d.ts +3 -0
  67. package/dist/types/config/workspace-hosts.d.ts +18 -0
  68. package/dist/types/constants/toolNames.d.ts +1 -0
  69. package/dist/types/daemon/session/turn-notification-context.d.ts +2 -1
  70. package/dist/types/daemon/session/types.d.ts +28 -4
  71. package/dist/types/hooks/useQueuedPrompts.d.ts +2 -0
  72. package/dist/types/trajectory/filter-messages.d.ts +9 -0
  73. package/dist/types/trajectory/filter-messages.transcript-stub.d.ts +7 -0
  74. package/dist/types/trajectory/filterTrajectory.d.ts +22 -0
  75. package/dist/types/trajectory/types.d.ts +1 -0
  76. package/dist/types/trajectory/useTrajectoryWindow.d.ts +21 -36
  77. package/dist/types/trajectory/window-messages.d.ts +9 -0
  78. package/dist/types/trajectory/window-messages.transcript-stub.d.ts +7 -0
  79. package/dist/types/utils/askUserPermission.d.ts +1 -1
  80. package/dist/types/utils/cancelledTurn.d.ts +17 -0
  81. package/dist/types/utils/selectionClipboard.d.ts +5 -0
  82. package/dist/types/utils/workspace.d.ts +10 -0
  83. package/dist/types/voice/messages.d.ts +9 -0
  84. package/dist/types/voice/messages.transcript-stub.d.ts +7 -0
  85. package/dist/types/voice/voice-error.d.ts +7 -0
  86. package/dist/{toolNames-CAeFJ9L9.js → useDaemonMidTurnInjected-snTFfPQ9.js} +4953 -4614
  87. package/package.json +4 -1
  88. package/dist/ThreadsRoute-CtecWS_K.js +0 -2358
  89. package/dist/types/components/workspace-agents/LazyThreadsRoute.d.ts +0 -7
  90. package/dist/types/components/workspace-agents/ThreadChat.d.ts +0 -35
  91. package/dist/types/components/workspace-agents/ThreadView.d.ts +0 -72
  92. package/dist/types/components/workspace-agents/ThreadsRoute.d.ts +0 -23
  93. package/dist/types/components/workspace-agents/useProjectConversations.d.ts +0 -10
@@ -57,7 +57,7 @@ export interface paths {
57
57
  };
58
58
  get?: never;
59
59
  put?: never;
60
- /** @description POST SSE consumed through fetch response.body. An afterSequence below the replay floor ends the stream with one agent.session.resync_required frame instead of a 409; reload the transcript and resume after its lastSequence. */
60
+ /** @description POST SSE consumed through fetch response.body. An afterSequence below the replay floor ends the stream with one agent.session.resync_required frame instead of a 409 only while the Snapshot backs the floor (replay_floor_sequence <= snapshot_through_sequence); a stream reconciliation discards the Snapshot without lowering the floor, and during that rebuild such a cursor is served from the retained events. On the resync frame, reload the transcript and resume after its lastSequence. */
61
61
  post: operations["webShellStreamEvents"];
62
62
  delete?: never;
63
63
  options?: never;
@@ -74,7 +74,7 @@ export interface paths {
74
74
  };
75
75
  get?: never;
76
76
  put?: never;
77
- /** @description Maps workspaceId/cwdRelative to public Workspace selection without using environmentId or absolute cwd. Shares G0's opt-in initial file-tool Turn admission and fixed server-owned profile with public Session creation. The Session creator may submit later Turns and cancel its running Turns under the same opt-in, and may rename the Session, while the creator currently holds Workspace read and create grants on a registry row whose state is ACTIVE and the Session is an active, undeleted qwen-code Session on the frozen execution profile; Workspace close follows its separate close capability and lifecycle admission; archive, delete and unarchive follow their separate retention capabilities after reliable Workspace close; cwd operations remain gated. The per-caller workspaceTurns capability on this surface advertises the same rule. Freeze selection with the original idempotency key; admission does not prove physical directory readiness. */
77
+ /** @description Maps workspaceId/cwdRelative to public Workspace selection without using environmentId or absolute cwd. Shares G0's opt-in initial file-tool Turn admission with public Session creation: the server-selected profile for the built-in qwen-code agent, and the profile selected by a stored definition's single allowlisted hosted_profile tools entry for a definition-pinned Session. Newly bound qwen-code Sessions, including empty creation, persist hosted-workspace-shell/1 with mandatory default/auto-edit approval when the Shell deployment opt-in is enabled; otherwise they persist hosted-workspace-files/1 with the configured file approval mode. The switch does not override a stored AgentDefinition's compiled profile or approval mode. Public callers cannot select the built-in profile. Any caller holding the OPERATOR role may submit later Turns and rename the Session under the same opt-in, while the Workspace registry row stays ACTIVE and still backs the binding, the actor recorded by the Workspace create command keeps OPERATOR or above, and the Session is active and undeleted and is either a qwen-code Session on the frozen execution profile or pinned to a stored definition; Workspace close follows its separate close capability and lifecycle admission; the same caller may cancel a running Turn (its delivery re-checks no grant it needs survives the cancellation), and the Session's own liveness keeps OPERATOR access even when its Workspace's background-exit observation closes some other bound Session; cancel is always allowed for its own running Turn even outside the Workspace files opt-in. A definition-pinned Session keeps its pinned revision's tool profile, model and instructions for its whole life, and a replay of the create command reuses the original pin; a WebShell Session inherits its Workspace's default Workspace selection when the request omits one. Shell Sessions additionally require the Shell opt-in and valid persisted approval for fresh Turns; disabling only Shell admission preserves original-key replay and accepted approvals and cancellation while Workspace files remain enabled and persisted approval remains valid. The public Shell tool list does not include the child agent tool. Invalid approval or files-off can refuse attachment. Public Shell close, archive, unarchive and delete stay unavailable, including protocol-0. Fresh Shell sending also requires foregroundShell=true; workspaceTurns advertises submit/rename permission and is not sufficient Shell Turn admission. */
78
78
  post: operations["webShellCreateSession"];
79
79
  delete?: never;
80
80
  options?: never;
@@ -131,6 +131,23 @@ export interface paths {
131
131
  patch?: never;
132
132
  trace?: never;
133
133
  };
134
+ "/api/agent/web-shell/v1/sessions/cwd/change": {
135
+ parameters: {
136
+ query?: never;
137
+ header?: never;
138
+ path?: never;
139
+ cookie?: never;
140
+ };
141
+ get?: never;
142
+ put?: never;
143
+ /** @description W2, implemented: the camelCase twin of the public changeSessionCwd with the matched refusal order: 400 invalid_request for a missing or malformed field; 401 actor_required without a trusted actor; 400 invalid_idempotency_key for a malformed idempotencyKey — with two documented divergences: a key over 128 characters is refused during request validation with 400 invalid_request before the service's check, and a blank idempotencyKey is refused there too, while the public header answers 400 invalid_idempotency_key for both shapes; 400 invalid_cwd for a lexical violation and 400 invalid_request for an expectedContextRevision below 1; 404 session_not_found for an unknown Session id; 400 unsupported_feature for an unbound Session; 404 session_not_found for an unreadable Session; 409 idempotency_conflict when one key carries different content, and a completed change under the same key always replays instead, before the role refusal; 403 session_operation_forbidden when a readable actor's Workspace role is below OPERATOR; 409 workspace_unavailable when execution is disabled; 404 session_not_found for a deleted Session; then 409 session_state_conflict, 409 workspace_unavailable from moved Registry facts (the recorded create-command actor's grant included, and the settlement re-checks the V56-persisted initiator the same way, so demoting either actor fails the operation, exactly like the public surface), 409 context_revision_conflict and 409 session_context_busy. Poll the operation or await session.context.changed; do not treat 202 as activation. */
144
+ post: operations["webShellChangeCwd"];
145
+ delete?: never;
146
+ options?: never;
147
+ head?: never;
148
+ patch?: never;
149
+ trace?: never;
150
+ };
134
151
  "/api/agent/web-shell/v1/operations/query": {
135
152
  parameters: {
136
153
  query?: never;
@@ -156,7 +173,7 @@ export interface paths {
156
173
  };
157
174
  get?: never;
158
175
  put?: never;
159
- /** @description D6 serves Hosted permission Actions. Question Actions and vote_recorded remain planned. Reads follow Session authorization; only the Session creator may respond (a Session with no recorded creator and no recorded create command answers to any caller in its tenant). Responses are durable operations, reconciled against the original journal decision. */
176
+ /** @description D6 serves Hosted permission Actions. Question Actions and vote_recorded remain planned. Reads follow Session authorization; the Session's recorded owner or any caller holding OPERATOR on the bound Workspace may respond; a Shell Session's Actions may be answered only by its recorded owner (an unbound Session with no recorded creator and no recorded create command answers to any caller in its tenant, matching its read ACL; a bound Session without an owner record answers through the create-command actor recorded for it, or through the Workspace role arm). Responses are durable operations, reconciled against the original journal decision. */
160
177
  post: operations["queryWebShellActions"];
161
178
  delete?: never;
162
179
  options?: never;
@@ -173,7 +190,7 @@ export interface paths {
173
190
  };
174
191
  get?: never;
175
192
  put?: never;
176
- /** @description D6 serves Hosted permission Actions. Question Actions and vote_recorded remain planned. Reads follow Session authorization; only the Session creator may respond (a Session with no recorded creator and no recorded create command answers to any caller in its tenant). Responses are durable operations, reconciled against the original journal decision. */
193
+ /** @description D6 serves Hosted permission Actions. Question Actions and vote_recorded remain planned. Reads follow Session authorization; the Session's recorded owner or any caller holding OPERATOR on the bound Workspace may respond; a Shell Session's Actions may be answered only by its recorded owner (an unbound Session with no recorded creator and no recorded create command answers to any caller in its tenant, matching its read ACL; a bound Session without an owner record answers through the create-command actor recorded for it, or through the Workspace role arm). Responses are durable operations, reconciled against the original journal decision. */
177
194
  post: operations["getWebShellAction"];
178
195
  delete?: never;
179
196
  options?: never;
@@ -190,7 +207,7 @@ export interface paths {
190
207
  };
191
208
  get?: never;
192
209
  put?: never;
193
- /** @description D6 serves Hosted permission Actions. Question Actions and vote_recorded remain planned. Reads follow Session authorization; only the Session creator may respond (a Session with no recorded creator and no recorded create command answers to any caller in its tenant). Responses are durable operations, reconciled against the original journal decision. */
210
+ /** @description D6 serves Hosted permission Actions. Question Actions and vote_recorded remain planned. Reads follow Session authorization; the Session's recorded owner or any caller holding OPERATOR on the bound Workspace may respond; a Shell Session's Actions may be answered only by its recorded owner (an unbound Session with no recorded creator and no recorded create command answers to any caller in its tenant, matching its read ACL; a bound Session without an owner record answers through the create-command actor recorded for it, or through the Workspace role arm). Responses are durable operations, reconciled against the original journal decision. */
194
211
  post: operations["respondWebShellAction"];
195
212
  delete?: never;
196
213
  options?: never;
@@ -207,7 +224,7 @@ export interface paths {
207
224
  };
208
225
  get?: never;
209
226
  put?: never;
210
- /** @description Uses the same close admission, creator authorization and durable cleanup semantics as the public close route. sessionClose describes deployment support; it does not grant actor authorization. */
227
+ /** @description Uses the same close admission, owner authorization and durable cleanup semantics as the public close route. sessionClose describes deployment support; it does not grant actor authorization. New L3 Workspace close operations run SessionEnd only, retain data, and finish after durable effects verification and original Runtime stop. SessionDelete is reserved for ACTIVE delete. Missing protocol support rejects new admission; previously admitted operations retain their saved protocol. Unknown outcomes remain recovery_blocked. */
211
228
  post: operations["closeWebShellSession"];
212
229
  delete?: never;
213
230
  options?: never;
@@ -224,7 +241,7 @@ export interface paths {
224
241
  };
225
242
  get?: never;
226
243
  put?: never;
227
- /** @description Workspace-bound archive requires a closed Session with completed reliable-close evidence and the creator with current read access. It completes atomically during admission, preserves data and the permanent close fence, and calls neither Harness nor Runtime. A readable non-creator returns 403; missing close evidence returns 409 workspace_unavailable. */
244
+ /** @description Workspace-bound archive requires a closed Session with completed reliable-close evidence and the Session's recorded owner with current read access. It completes atomically during admission, preserves data and the permanent close fence, and calls neither Harness nor Runtime. A readable non-owner returns 403; missing close evidence returns 409 workspace_unavailable. */
228
245
  post: operations["archiveWebShellSession"];
229
246
  delete?: never;
230
247
  options?: never;
@@ -241,7 +258,7 @@ export interface paths {
241
258
  };
242
259
  get?: never;
243
260
  put?: never;
244
- /** @description Workspace-bound delete accepts only closed or archived Sessions with completed reliable-close evidence and the creator with current read access. Active deletion returns 409 session_state_conflict. Completion atomically retires private recovery/publication access with the tombstone, operation receipt and terminal event; it calls neither Harness nor Runtime and erases no shared Workspace files or backup bytes. Operations remain readable under current read grants; the same authorized actor/key can replay after deletion. A readable non-creator returns 403; missing close evidence returns 409 workspace_unavailable. */
261
+ /** @description Workspace-bound ACTIVE deletion supports idle hosted-workspace-files/1 Sessions when L3 lifecycle protocol and reliable Runtime stop are available. Only the Session's recorded owner (owner_actor_key, with the pre-V40 creator fallback) with current read access may admit it; accepted, running, cancelling or approval-waiting Turns return 409 turn_active. Admission persists a lifecycle-only execution fence and a versioned actor-scoped operation. SessionEnd settles before SessionDelete; committed Hook results are verified in Session Store and saved before permanent draining, attachment cleanup and original worker stop. Unknown outcomes or missing original stop evidence remain recovery_blocked and are never replayed on a replacement worker. CLOSED/ARCHIVED deletion retains L2: completed reliable-close evidence is required and no Harness or Hook is invoked. Completion atomically commits retirement, tombstone, receipt and terminal event, retaining shared Workspace files and neighboring holders. Authorized same-actor/key replays return the original operation, including after deletion; a readable non-owner returns 403. Missing lifecycle capability or close evidence returns 409 workspace_unavailable. */
245
262
  post: operations["deleteWebShellSession"];
246
263
  delete?: never;
247
264
  options?: never;
@@ -298,6 +315,38 @@ export interface paths {
298
315
  patch?: never;
299
316
  trace?: never;
300
317
  };
318
+ "/api/agent/web-shell/v1/tasks/events/query": {
319
+ parameters: {
320
+ query?: never;
321
+ header?: never;
322
+ path?: never;
323
+ cookie?: never;
324
+ };
325
+ get?: never;
326
+ put?: never;
327
+ post: operations["queryWebShellTaskEvents"];
328
+ delete?: never;
329
+ options?: never;
330
+ head?: never;
331
+ patch?: never;
332
+ trace?: never;
333
+ };
334
+ "/api/agent/web-shell/v1/tasks/cancel": {
335
+ parameters: {
336
+ query?: never;
337
+ header?: never;
338
+ path?: never;
339
+ cookie?: never;
340
+ };
341
+ get?: never;
342
+ put?: never;
343
+ post: operations["cancelWebShellTask"];
344
+ delete?: never;
345
+ options?: never;
346
+ head?: never;
347
+ patch?: never;
348
+ trace?: never;
349
+ };
301
350
  "/api/agent/web-shell/v1/tool-results/get": {
302
351
  parameters: {
303
352
  query?: never;
@@ -355,7 +404,7 @@ export interface paths {
355
404
  };
356
405
  get?: never;
357
406
  put?: never;
358
- /** @description Synchronously restores an archived Session to closed. Workspace-bound Sessions require completed reliable-close evidence and the creator with current read access (404 unreadable, 403 readable non-creator). Bound keys are tenant/Session/actor scoped. Replay returns the current visible Session without repeating the mutation; a deleted Session returns 404. The permanent close fence is preserved and no Harness or Runtime call is made. */
407
+ /** @description Synchronously restores an archived Session to closed. Workspace-bound Sessions require completed reliable-close evidence and the Session's recorded owner with current read access (404 unreadable, 403 readable non-owner). Bound keys are tenant/Session/actor scoped. Replay returns the current visible Session without repeating the mutation; a deleted Session returns 404. The permanent close fence is preserved and no Harness or Runtime call is made. */
359
408
  post: operations["unarchiveWebShellSession"];
360
409
  delete?: never;
361
410
  options?: never;
@@ -426,6 +475,7 @@ export interface components {
426
475
  /** @description Planned; phase one rejects non-blank values. */
427
476
  environmentId?: string | null;
428
477
  title?: string | null;
478
+ /** @description Each block adds to a 4,000,000-character aggregate admission budget per command (per-block 1,000,000-character cap applies). Admission ceiling only: a command whose serialized prompt or durable Session-store record exceeds the Hosted Harness's 64 KiB durable-record limit is accepted and then fails the Turn with hosted_harness_rejected. */
429
479
  input?: components["schemas"]["InputBlock"][];
430
480
  metadata?: components["schemas"]["WebShellMetadata"];
431
481
  workspace?: components["schemas"]["WebShellWorkspaceSelection"];
@@ -436,6 +486,7 @@ export interface components {
436
486
  idempotencyKey: string;
437
487
  /** Format: uuid */
438
488
  sessionId: string;
489
+ /** @description Each block adds to a 4,000,000-character aggregate admission budget per command (per-block 1,000,000-character cap applies). Admission ceiling only: a command whose serialized prompt or durable Session-store record exceeds the Hosted Harness's 64 KiB durable-record limit is accepted and then fails the Turn with hosted_harness_rejected. */
439
490
  input?: components["schemas"]["InputBlock"][];
440
491
  metadata?: components["schemas"]["WebShellMetadata"];
441
492
  };
@@ -447,8 +498,9 @@ export interface components {
447
498
  sessionId: string;
448
499
  turnId: string;
449
500
  };
501
+ /** @description Arbitrary caller metadata, as a JSON object (or null). Accepted and ignored in Phase 1: nothing from it is persisted. On WebShellCreateRequest the Session title travels in that request's own `title` field; WebShellSubmitRequest has no title surface. Any keys are valid. */
450
502
  WebShellMetadata: {
451
- clientId?: string;
503
+ [key: string]: unknown;
452
504
  } | null;
453
505
  /** @description With durable_operations enabled, all three target fields are returned. accepted means Java durable delivery responsibility, not model execution. Missing fields retain the deployed legacy response semantics. */
454
506
  WebShellAdmission: {
@@ -468,9 +520,6 @@ export interface components {
468
520
  /** Format: int64 */
469
521
  completedAt?: number | null;
470
522
  errorCode?: string | null;
471
- usage?: {
472
- [key: string]: unknown;
473
- } | null;
474
523
  };
475
524
  WebShellSession: {
476
525
  /** Format: uuid */
@@ -492,17 +541,22 @@ export interface components {
492
541
  capabilities: components["schemas"]["WebShellSessionCapabilities"];
493
542
  };
494
543
  WebShellSessionCapabilities: {
544
+ /**
545
+ * @description True when Workspace files are enabled, the bound Session is active and undeleted, the caller holds OPERATOR or above on the Workspace and the exact ACTIVE Registry generation/storage and create-command-actor OPERATOR/OWNER grant still hold, matching cwd admission. This does not promise an idle Session and is independent of workspaceTurns execution-profile gates. Missing means false. Existing operations remain queryable under read authorization even when this capability is false.
546
+ * @default false
547
+ */
548
+ cwdChange?: boolean;
495
549
  /** @default false */
496
550
  actions: boolean;
497
551
  /**
498
- * @description True when the caller may submit later Turns of this Workspace-bound Session, cancel its running Turns and rename it: the deployment enables Workspace files, the caller created the Session and currently holds Workspace read and create grants on a registry row whose state is ACTIVE, and the Session is an active qwen-code Session on the frozen execution profile. False for every other caller and for unbound Sessions, which do not use it.
552
+ * @description True when the caller may submit later Turns of this Workspace-bound Session or rename it: the deployment enables Workspace files, the caller holds the OPERATOR role on a Workspace registry row whose state is ACTIVE and still backs the Session's binding, the actor recorded by the Workspace create command keeps OPERATOR or above, and the Session is active and undeleted and is either a qwen-code Session or a Session pinned to a stored definition (both on the Workspace's frozen execution profile). Cancelling only aborts work already running, so an OPERATOR caller may cancel a running Turn even when this is false; the capability does not gate cancellation. False for every other caller and for unbound Sessions, which do not use it. Shell Sessions also require foregroundShell=true for fresh sending; workspaceTurns may remain true with Shell admission disabled and is not sufficient Shell Turn admission.
499
553
  * @default false
500
554
  */
501
- workspaceTurns?: boolean;
555
+ workspaceTurns: boolean;
502
556
  tasks: boolean;
503
557
  artifacts: boolean;
504
558
  /**
505
- * @description Deployment support for close independently of archive/delete. Admission also requires creator ownership and current read access for a bound Session.
559
+ * @description Deployment support for close independently of archive/delete. Admission also requires Session ownership and current read access for a bound Session.
506
560
  * @default false
507
561
  */
508
562
  sessionClose?: boolean;
@@ -517,10 +571,12 @@ export interface components {
517
571
  */
518
572
  sessionUnarchive?: boolean;
519
573
  /**
520
- * @description Optional support for this retention operation. For a Workspace-bound Session requires completed reliable-close evidence; authorization and source-state validation still apply.
574
+ * @description Optional support capability. ACTIVE Workspace files Sessions require L3 lifecycle protocol and reliable original Runtime stop; CLOSED/ARCHIVED Sessions use independent L2 close evidence. Current creator/read authorization and idle/source-state admission checks still apply. The aggregate session lifecycle capability is unchanged.
521
575
  * @default false
522
576
  */
523
577
  sessionDelete?: boolean;
578
+ /** @description Present only for persisted Shell Sessions, with no schema default; files and unbound Sessions omit it. True when Workspace files, Shell deployment admission and persisted default/auto-edit approval are valid. False prevents fresh sending. Disabling only the Shell flag preserves accepted cancellation and approval while Workspace files remain enabled and persisted approval remains valid; files-off or invalid approval can refuse attachment. This capability does not override authorization or recovery refusals. */
579
+ foregroundShell?: boolean;
524
580
  };
525
581
  WebShellSessionPage: {
526
582
  data: components["schemas"]["WebShellSession"][];
@@ -607,10 +663,14 @@ export interface components {
607
663
  code: string;
608
664
  message: string;
609
665
  request_id: string;
666
+ /** @description Present on Runtime Broker refusals; true permits retry, false is a definite refusal. Other errors may omit this field. */
667
+ retryable?: boolean;
610
668
  /** Format: int64 */
611
669
  replay_floor_sequence?: number | null;
612
670
  /** Format: int64 */
613
671
  snapshot_through_sequence?: number | null;
672
+ /** @description Names the definition field that cannot take effect on 409 agent_definition_unsupported; other errors may omit this field. */
673
+ field?: string;
614
674
  };
615
675
  };
616
676
  /**
@@ -619,6 +679,8 @@ export interface components {
619
679
  * @example services/api
620
680
  */
621
681
  WorkspaceRelativePath: string;
682
+ /** @enum {string} */
683
+ CwdOperationStatus: "pending" | "installing" | "completed" | "failed";
622
684
  WebShellWorkspaceSelection: {
623
685
  workspaceId: string;
624
686
  /** @default . */
@@ -650,7 +712,7 @@ export interface components {
650
712
  * @default false
651
713
  */
652
714
  workspaceContext: boolean;
653
- /** @description Supports authorized Workspace discovery, Session creation, and saved binding read-back. This capability does not advertise execution readiness. Deployments may separately opt in to an initial Workspace Read/Write/Edit Turn at creation; the Session creator may submit and cancel later Turns under the same opt-in, while close follows its separate capability and lifecycle admission; archive, delete and unarchive follow their separate retention capabilities after reliable Workspace close. */
715
+ /** @description Supports authorized Workspace discovery, Session creation, and saved binding read-back. This capability does not advertise execution readiness. Deployments may separately opt in to an initial Workspace Turn at creation: Read/Write/Edit under hosted-workspace-files/1, or file tools plus mandatory-approval foreground Shell under hosted-workspace-shell/1 when the Shell opt-in is enabled. The public Shell tool list does not include the child agent tool. Callers holding the OPERATOR role may submit later Turns or rename under the same opt-in while the registry row stays ACTIVE and still backs the Session's binding and the actor recorded by the Workspace create command keeps OPERATOR or above, and may cancel a running Turn (its delivery re-checks no grants). Shell fresh sending also requires foregroundShell=true. Public Shell close, archive, unarchive and delete stay unavailable, including protocol-0, while close of other profiles follows its separate capability and lifecycle admission; archive, delete and unarchive follow their separate retention capabilities after reliable Workspace close. */
654
716
  workspaceBinding: boolean;
655
717
  };
656
718
  /** @description Same authorized explicit default as default_workspace, including when outside this page; null if absent or not creatable. A non-null default is active and has canCreateSession=true. */
@@ -661,11 +723,36 @@ export interface components {
661
723
  canCreateSession?: true;
662
724
  }) | null;
663
725
  };
726
+ WebShellChangeCwdRequest: {
727
+ /** Format: uuid */
728
+ sessionId: string;
729
+ idempotencyKey: string;
730
+ cwdRelative: components["schemas"]["WorkspaceRelativePath"];
731
+ /** Format: int64 */
732
+ expectedContextRevision: number;
733
+ requestId?: string | null;
734
+ };
664
735
  WebShellOperationRequest: {
665
736
  /** Format: uuid */
666
737
  sessionId: string;
667
738
  operationId: string;
668
739
  };
740
+ /** @description A completed operation returns the committed target revision. A replay returns the same operation identity and latest durable status, with replayed=true; polling itself is not replay. */
741
+ WebShellCwdOperation: {
742
+ operationId: string;
743
+ /** Format: uuid */
744
+ sessionId: string;
745
+ /** @constant */
746
+ type: "cwd_change";
747
+ status: components["schemas"]["CwdOperationStatus"];
748
+ /** Format: int64 */
749
+ expectedContextRevision: number;
750
+ targetCwdRelative: components["schemas"]["WorkspaceRelativePath"];
751
+ /** Format: int64 */
752
+ resultContextRevision?: number | null;
753
+ failureCode?: string | null;
754
+ replayed: boolean;
755
+ } & (unknown & unknown);
669
756
  WebShellAction: components["schemas"]["WebShellPermissionAction"] | components["schemas"]["WebShellQuestionAction"];
670
757
  WebShellActionResolution: {
671
758
  actionId: string;
@@ -697,6 +784,8 @@ export interface components {
697
784
  sessionId: string;
698
785
  /** @enum {unknown} */
699
786
  type: "create_session" | "submit_input" | "cancel" | "action_response" | "close" | "archive" | "delete" | "task_cancel";
787
+ /** @description Task that a task_cancel operation targets. */
788
+ taskId?: string;
700
789
  /** @enum {unknown} */
701
790
  status: "pending" | "running" | "completed" | "failed" | "cancelled" | "recovery_blocked";
702
791
  /** @enum {unknown} */
@@ -705,10 +794,10 @@ export interface components {
705
794
  deliveryState: "pending" | "leased" | "confirmed" | "blocked";
706
795
  receiptId?: string;
707
796
  actionResolution?: components["schemas"]["WebShellActionResolution"];
708
- /** @description Reason a durable response or task cancellation failed. Action response failures come from the original committed Action, or a definitive invalid response. Workspace close recovery_blocked reports original resource identity or unsettled execution; the Session remains closing. */
797
+ /** @description Reason a durable response or task cancellation failed. Action response failures come from the original committed Action, or a definitive invalid response. Task cancel failures are task_already_settled (the run ended before the stop request was recorded), task_action_unavailable and task_not_found; a recovery_blocked task cancel reports task_cancel_unconfirmed. Workspace close recovery_blocked reports original resource identity or unsettled execution; the Session remains closing. */
709
798
  failureCode?: string;
710
799
  replayed: boolean;
711
- } & (unknown & unknown & unknown & unknown);
800
+ } & (unknown & unknown & unknown & unknown & unknown);
712
801
  WebShellQuestionAction: {
713
802
  actionId: string;
714
803
  /** Format: uuid */
@@ -728,7 +817,7 @@ export interface components {
728
817
  decisionReceiptId?: string;
729
818
  questions: components["schemas"]["WebShellActionQuestion"][];
730
819
  } & unknown;
731
- /** @description At most one requested Hosted approval per Turn. allow and deny are stable option IDs. Tool arguments are read from Items by function_call_id (functionCallId in WebShell). Public timestamps are milliseconds, as recorded by the Harness. Decision receipts are opaque product IDs. */
820
+ /** @description At most one requested Hosted approval per Turn. allow and deny are stable option IDs. A requested native-tool Action may carry a bounded input preview when the producer supplies an input reference. Version 1 Actions and unavailable inputs omit it. Public timestamps are milliseconds, as recorded by the Harness. Decision receipts are opaque product IDs. */
732
821
  WebShellPermissionAction: {
733
822
  actionId: string;
734
823
  /** Format: uuid */
@@ -750,6 +839,7 @@ export interface components {
750
839
  turnId?: string;
751
840
  functionCallId: string;
752
841
  toolName: string;
842
+ inputPreview?: components["schemas"]["WebShellActionInputPreview"];
753
843
  } & unknown;
754
844
  WebShellPermissionResponse: {
755
845
  /** @constant */
@@ -784,7 +874,7 @@ export interface components {
784
874
  policyRevision: string;
785
875
  answers: components["schemas"]["WebShellQuestionAnswer"][];
786
876
  };
787
- WebShellOperation: components["schemas"]["WebShellCommandOperation"];
877
+ WebShellOperation: components["schemas"]["WebShellCwdOperation"] | components["schemas"]["WebShellCommandOperation"];
788
878
  WebShellActionQueryRequest: {
789
879
  /** Format: uuid */
790
880
  sessionId: string;
@@ -831,7 +921,7 @@ export interface components {
831
921
  */
832
922
  TaskRuntimeState: "unbound" | "provisioning" | "ready" | "draining" | "lost";
833
923
  /**
834
- * @description Actions the task supports now, the same for every caller. cancel: the cancel route accepts a new command for this task; whether a caller may use it is an authorization check (403 on the cancel route). send_input: reserved for a later capability route. read_output: the task events route returns output events for this task to any caller that can read it. read_output does not change during the task's life, and a task without it produces no output events: its output goes only to Artifacts, so the events route never filters out events that exist.
924
+ * @description Actions the task supports now, the same for every caller. cancel: the cancel route accepts a new command for this task (since 1.40, child_agent tasks in pending, running, waiting or degraded, in an active Session); whether a caller may use it is an authorization check (403 on the cancel route). send_input: reserved for a later capability route. read_output: the task events route returns output events for this task to any caller that can read it. read_output does not change during the task's life, and a task without it produces no output events: its output goes only to Artifacts, so the events route never filters out events that exist.
835
925
  * @enum {string}
836
926
  */
837
927
  TaskActionCapability: "cancel" | "send_input" | "read_output";
@@ -863,6 +953,8 @@ export interface components {
863
953
  * @description Unix epoch milliseconds.
864
954
  */
865
955
  settledAt?: number;
956
+ /** @description Stable task event cursor after the committed tail at view read time. No event can later appear at or before it. Pass it as after to follow only new events; recovery must instead keep its saved event page cursor so it does not skip intervening output. Normal retention may expire it. */
957
+ outputCursor?: string;
866
958
  /** @description The newest Artifacts that hold durable task output, at most 100, oldest first. Entries must not rotate out until older Artifacts can be enumerated and attributed to the task: an evicted Artifact stays readable by id through the Session artifact routes but is no longer discoverable from the task. */
867
959
  artifactRefs: string[];
868
960
  actionCapabilities: components["schemas"]["TaskActionCapability"][];
@@ -872,6 +964,31 @@ export interface components {
872
964
  hasMore: boolean;
873
965
  nextCursor?: string | null;
874
966
  } & unknown;
967
+ /** @description One task event: a logical state change, a bounded output chunk, or an Artifact reference. High-volume output goes to Artifacts or bounded chunks in this paged stream, never one Session event per raw line. The closed schema validates the server's own version; clients ignore unknown optional fields and unknown types and checkpoint their cursors. Strict response validation against an older minor version is not supported. Event identity, position, payload and accepted schema/projection versions are immutable across restart, projection rebuild and archival. */
968
+ WebShellTaskEvent: {
969
+ schemaVersion: number;
970
+ projectionVersion: number;
971
+ taskId: string;
972
+ /** Format: uuid */
973
+ sessionId: string;
974
+ type: components["schemas"]["TaskEventType"];
975
+ /** @description Stable opaque position after this event and its identity. Atomically apply the event and save this cursor to avoid duplicate application after a crash. It is never reassigned; normal retention can expire it. */
976
+ cursor: string;
977
+ /** Format: int64 */
978
+ createdAt: number;
979
+ state?: components["schemas"]["TaskState"];
980
+ runtimeState?: components["schemas"]["TaskRuntimeState"];
981
+ text?: string;
982
+ /** @description True when the chunk was cut to the event limit; its full output is already durably readable and discoverable in the task Artifacts when the event is published. */
983
+ truncated?: boolean;
984
+ artifactId?: string;
985
+ } & (unknown & unknown & unknown);
986
+ WebShellTaskEventPage: {
987
+ data: components["schemas"]["WebShellTaskEvent"][];
988
+ hasMore: boolean;
989
+ /** @description The last returned event cursor, never passing an event held back by limit. On an empty page, the requested position, or the durable retention floor if after was omitted. Required and never null, including when no events remain. No event may later become visible at or before this position. */
990
+ nextCursor: string;
991
+ };
875
992
  WebShellTaskQueryRequest: {
876
993
  /** Format: uuid */
877
994
  sessionId: string;
@@ -884,6 +1001,25 @@ export interface components {
884
1001
  sessionId: string;
885
1002
  taskId: string;
886
1003
  };
1004
+ WebShellTaskEventQueryRequest: {
1005
+ /** Format: uuid */
1006
+ sessionId: string;
1007
+ taskId: string;
1008
+ /** @description Opaque task event cursor: an event cursor, a page nextCursor or a task outputCursor. Omit it to read from the durable retention floor. Strictly below the floor is 409 cursor_expired; equality is valid, including with no retained events. */
1009
+ after?: string;
1010
+ /** @default 20 */
1011
+ limit?: number;
1012
+ };
1013
+ WebShellTaskCancelRequest: {
1014
+ /** @description Trace correlation only; excluded from the request digest, so a retry with another requestId still replays. A header-safe value (1 to 128 visible ASCII characters) is echoed as X-Request-Id; any other value is replaced by a server-chosen id. */
1015
+ requestId?: string | null;
1016
+ /** Format: uuid */
1017
+ sessionId: string;
1018
+ taskId: string;
1019
+ idempotencyKey: string;
1020
+ };
1021
+ /** @description state_changed, output or artifact. The set is open: a later minor version may add types and optional fields. Clients ignore unknown optional fields and unknown types, while still checkpointing event cursors; strict validation against an older minor response schema is not supported. Existing fields forbidden for a known type cannot be repurposed on that type. */
1022
+ TaskEventType: string;
887
1023
  ToolResultPreview: {
888
1024
  text: string;
889
1025
  truncated: boolean;
@@ -948,6 +1084,18 @@ export interface components {
948
1084
  /** @default 20 */
949
1085
  limit?: number;
950
1086
  };
1087
+ /** @description Optional preview for requested native read_file, write_file, edit or run_shell_command approvals. Missing or invalid input, and internal MCP inputs, omit the preview. No general secret redaction is performed; visibility follows Session read permissions. Deploy the version 2 Java reader before a Harness producer starts writing version 2 options. */
1088
+ WebShellActionInputPreview: {
1089
+ /** @description Exact prefix of the stored payloadJson ({toolName,input}), at most 8192 UTF-8 bytes ending at a complete code point. Truncated text may not be valid JSON. */
1090
+ text: string;
1091
+ /** @description True when text is shorter than the complete UTF-8 input. */
1092
+ truncated: boolean;
1093
+ /**
1094
+ * Format: int64
1095
+ * @description Byte length of the complete payloadJson in UTF-8, before truncation.
1096
+ */
1097
+ byteLength: number;
1098
+ };
951
1099
  };
952
1100
  responses: {
953
1101
  /** @description The authenticated actor belongs to another tenant than X-Qwen-Tenant-Id or has an invalid ID (actor_scope_mismatch, which the tenant filter answers on every /v1/agents/ and WebShell route), or the resource is readable but the actor lacks this operation or the original Action responder permission. Artifact content reads may also return artifact_content_forbidden when the actor cannot read the original bytes. */
@@ -986,7 +1134,7 @@ export interface components {
986
1134
  "application/json": components["schemas"]["ErrorEnvelope"];
987
1135
  };
988
1136
  };
989
- /** @description State, idempotency, or recovery conflict. */
1137
+ /** @description State, idempotency, or recovery conflict. New Workspace-scoped admissions return workspace_unavailable with retryable=false while an offline Workspace migration holds the storage fence; authorized durable replays retain their existing behavior. */
990
1138
  Conflict: {
991
1139
  headers: {
992
1140
  [name: string]: unknown;
@@ -1004,6 +1152,15 @@ export interface components {
1004
1152
  "application/json": components["schemas"]["ErrorEnvelope"];
1005
1153
  };
1006
1154
  };
1155
+ /** @description Task event cursor is strictly below the task's durable retention floor, which survives an empty retained set; equality is valid. The envelope's replay_floor_sequence and snapshot_through_sequence stay absent because task cursors are opaque. */
1156
+ TaskCursorExpired: {
1157
+ headers: {
1158
+ [name: string]: unknown;
1159
+ };
1160
+ content: {
1161
+ "application/json": components["schemas"]["ErrorEnvelope"];
1162
+ };
1163
+ };
1007
1164
  /** @description A dependency such as the Hosted Harness is unavailable; retry later. */
1008
1165
  Unavailable: {
1009
1166
  headers: {
@@ -1264,6 +1421,36 @@ export interface operations {
1264
1421
  413: components["responses"]["PayloadTooLarge"];
1265
1422
  };
1266
1423
  };
1424
+ webShellChangeCwd: {
1425
+ parameters: {
1426
+ query?: never;
1427
+ header?: never;
1428
+ path?: never;
1429
+ cookie?: never;
1430
+ };
1431
+ requestBody: {
1432
+ content: {
1433
+ "application/json": components["schemas"]["WebShellChangeCwdRequest"];
1434
+ };
1435
+ };
1436
+ responses: {
1437
+ /** @description Durable cwd operation; acceptance does not mean the new cwd is active. */
1438
+ 202: {
1439
+ headers: {
1440
+ [name: string]: unknown;
1441
+ };
1442
+ content: {
1443
+ "application/json": components["schemas"]["WebShellCwdOperation"];
1444
+ };
1445
+ };
1446
+ 400: components["responses"]["BadRequest"];
1447
+ 401: components["responses"]["Unauthorized"];
1448
+ 403: components["responses"]["Forbidden"];
1449
+ 404: components["responses"]["NotFound"];
1450
+ 409: components["responses"]["Conflict"];
1451
+ 413: components["responses"]["PayloadTooLarge"];
1452
+ };
1453
+ };
1267
1454
  webShellQueryCwdOperation: {
1268
1455
  parameters: {
1269
1456
  query?: never;
@@ -1380,7 +1567,7 @@ export interface operations {
1380
1567
  };
1381
1568
  400: components["responses"]["BadRequest"];
1382
1569
  401: components["responses"]["Unauthorized"];
1383
- /** @description Responding requires the Session creator (action_forbidden). A Session with no recorded creator and no recorded create command (anonymous open-mode creation, or a Session created before the V40 migration that also has no Workspace creation record) answers to any caller in its tenant, matching its read ACL. The tenant filter's 403 actor_scope_mismatch also applies on this route. */
1570
+ /** @description Responding requires the Session's recorded owner or a Workspace OPERATOR (action_forbidden); a Shell Session's Actions may be answered only by its recorded owner. An unbound Session with no recorded creator and no recorded create command (anonymous open-mode creation, or an unbound Session created before the V40 migration that also has no Workspace creation record) answers to any caller in its tenant, matching its read ACL; a bound Session with no recorded owner answers through the create-command actor recorded for it, or through the Workspace role arm. The tenant filter's 403 actor_scope_mismatch also applies on this route. */
1384
1571
  403: components["responses"]["Forbidden"];
1385
1572
  /** @description Unknown or unreadable Session (session_not_found), or unknown Action (action_not_found). */
1386
1573
  404: components["responses"]["NotFound"];
@@ -1566,6 +1753,67 @@ export interface operations {
1566
1753
  413: components["responses"]["PayloadTooLarge"];
1567
1754
  };
1568
1755
  };
1756
+ queryWebShellTaskEvents: {
1757
+ parameters: {
1758
+ query?: never;
1759
+ header?: never;
1760
+ path?: never;
1761
+ cookie?: never;
1762
+ };
1763
+ requestBody: {
1764
+ content: {
1765
+ "application/json": components["schemas"]["WebShellTaskEventQueryRequest"];
1766
+ };
1767
+ };
1768
+ responses: {
1769
+ /** @description Same authorized task semantics as the public task events route, including the durable retention floor, committed-prefix publication, Artifact recovery order and client tolerance of unknown optional fields and event types. */
1770
+ 200: {
1771
+ headers: {
1772
+ [name: string]: unknown;
1773
+ };
1774
+ content: {
1775
+ "application/json": components["schemas"]["WebShellTaskEventPage"];
1776
+ };
1777
+ };
1778
+ 400: components["responses"]["BadRequest"];
1779
+ 401: components["responses"]["Unauthorized"];
1780
+ 403: components["responses"]["Forbidden"];
1781
+ 404: components["responses"]["NotFound"];
1782
+ 409: components["responses"]["TaskCursorExpired"];
1783
+ 413: components["responses"]["PayloadTooLarge"];
1784
+ };
1785
+ };
1786
+ cancelWebShellTask: {
1787
+ parameters: {
1788
+ query?: never;
1789
+ header?: never;
1790
+ path?: never;
1791
+ cookie?: never;
1792
+ };
1793
+ requestBody: {
1794
+ content: {
1795
+ "application/json": components["schemas"]["WebShellTaskCancelRequest"];
1796
+ };
1797
+ };
1798
+ responses: {
1799
+ /** @description Same authorized task cancellation semantics as the public API: key validation, current access, idempotent replay, then new-request capability, Session, task and storage-migration checks (409 workspace_unavailable under a migration fence). Replay returns the same operation and latest durable state. 202 is durable admission, completed is authority acceptance, and neither proves physical stop. Admission requires no other open operation on the Session (409 session_operation_active), as on the lifecycle routes. A requestId in the body becomes the response's X-Request-Id and stays out of the request digest. */
1800
+ 202: {
1801
+ headers: {
1802
+ "X-Request-Id": components["headers"]["RequestId"];
1803
+ [name: string]: unknown;
1804
+ };
1805
+ content: {
1806
+ "application/json": components["schemas"]["WebShellCommandOperation"];
1807
+ };
1808
+ };
1809
+ 400: components["responses"]["BadRequest"];
1810
+ 401: components["responses"]["Unauthorized"];
1811
+ 403: components["responses"]["Forbidden"];
1812
+ 404: components["responses"]["NotFound"];
1813
+ 409: components["responses"]["Conflict"];
1814
+ 413: components["responses"]["PayloadTooLarge"];
1815
+ };
1816
+ };
1569
1817
  getWebShellToolResult: {
1570
1818
  parameters: {
1571
1819
  query?: never;