@hachej/boring-workspace 0.1.53 → 0.1.55

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/shared.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- export { C as CommandResult, U as UiBridge, a as UiCommand, b as UiState } from './ui-bridge-LeBuZqfA.js';
1
+ export { C as CommandResult, a as UiCommand, b as UiState, W as WorkspaceBridge } from './ui-bridge-BbuUZ5iC.js';
2
+ export { f as BridgeActorAttribution, g as BridgeActorKind, B as BridgeAuthContext, d as BridgeCallerClass, e as BridgeIdempotencyPolicy, h as BridgeRedactedActorRef, i as WorkspaceBridgeCallFailure, a as WorkspaceBridgeCallRequest, b as WorkspaceBridgeCallResponse, j as WorkspaceBridgeCallSuccess, c as WorkspaceBridgeError, k as WorkspaceBridgeErrorCode, l as WorkspaceBridgeFileAssetPointer, m as WorkspaceBridgeJsonValue, W as WorkspaceBridgeOperationDefinition, n as createWorkspaceBridgeError } from './workspace-bridge-rpc-A98RA5o6.js';
2
3
  export { C as CommandConfig, P as PaneProps, a as PanelConfig, b as PanelRegistration, S as SurfaceOpenRequest, c as SurfacePanelResolution, d as SurfaceResolverConfig, e as SurfaceResolverRegistration, W as WORKSPACE_OPEN_PATH_SURFACE_KIND, f as definePanel } from './surface-DmIalUmP.js';
3
4
  export { A as AgentTool, J as JSONSchema, T as ToolExecContext, a as ToolResult } from './agent-tool-CB0RQyx9.js';
4
5
  import 'react';
package/dist/shared.js CHANGED
@@ -1,3 +1,31 @@
1
+ // src/shared/workspace-bridge-rpc.ts
2
+ var WorkspaceBridgeErrorCode = /* @__PURE__ */ ((WorkspaceBridgeErrorCode2) => {
3
+ WorkspaceBridgeErrorCode2["OpNotFound"] = "BRIDGE_OP_NOT_FOUND";
4
+ WorkspaceBridgeErrorCode2["DuplicateOp"] = "BRIDGE_DUPLICATE_OP";
5
+ WorkspaceBridgeErrorCode2["CallerNotAllowed"] = "BRIDGE_CALLER_NOT_ALLOWED";
6
+ WorkspaceBridgeErrorCode2["AuthRequired"] = "BRIDGE_AUTH_REQUIRED";
7
+ WorkspaceBridgeErrorCode2["CapabilityDenied"] = "BRIDGE_CAPABILITY_DENIED";
8
+ WorkspaceBridgeErrorCode2["ResourceScopeDenied"] = "BRIDGE_RESOURCE_SCOPE_DENIED";
9
+ WorkspaceBridgeErrorCode2["SchemaInvalid"] = "BRIDGE_SCHEMA_INVALID";
10
+ WorkspaceBridgeErrorCode2["OutputSchemaInvalid"] = "BRIDGE_OUTPUT_SCHEMA_INVALID";
11
+ WorkspaceBridgeErrorCode2["InputTooLarge"] = "BRIDGE_INPUT_TOO_LARGE";
12
+ WorkspaceBridgeErrorCode2["OutputTooLarge"] = "BRIDGE_OUTPUT_TOO_LARGE";
13
+ WorkspaceBridgeErrorCode2["Timeout"] = "BRIDGE_TIMEOUT";
14
+ WorkspaceBridgeErrorCode2["HandlerFailed"] = "BRIDGE_HANDLER_FAILED";
15
+ WorkspaceBridgeErrorCode2["IdempotencyRequired"] = "BRIDGE_IDEMPOTENCY_REQUIRED";
16
+ WorkspaceBridgeErrorCode2["IdempotencyConflict"] = "BRIDGE_IDEMPOTENCY_CONFLICT";
17
+ WorkspaceBridgeErrorCode2["ReplayRejected"] = "BRIDGE_REPLAY_REJECTED";
18
+ WorkspaceBridgeErrorCode2["RateLimited"] = "BRIDGE_RATE_LIMITED";
19
+ WorkspaceBridgeErrorCode2["InvalidToken"] = "BRIDGE_INVALID_TOKEN";
20
+ WorkspaceBridgeErrorCode2["ExpiredToken"] = "BRIDGE_EXPIRED_TOKEN";
21
+ WorkspaceBridgeErrorCode2["InvalidRequest"] = "BRIDGE_INVALID_REQUEST";
22
+ WorkspaceBridgeErrorCode2["UnsupportedRuntime"] = "BRIDGE_UNSUPPORTED_RUNTIME";
23
+ return WorkspaceBridgeErrorCode2;
24
+ })(WorkspaceBridgeErrorCode || {});
25
+ function createWorkspaceBridgeError(code, message, details) {
26
+ return details === void 0 ? { code, message } : { code, message, details };
27
+ }
28
+
1
29
  // src/shared/types/surface.ts
2
30
  var WORKSPACE_OPEN_PATH_SURFACE_KIND = "workspace.open.path";
3
31
 
@@ -20,6 +48,8 @@ function safeCapture(telemetry, event) {
20
48
  }
21
49
  export {
22
50
  WORKSPACE_OPEN_PATH_SURFACE_KIND,
51
+ WorkspaceBridgeErrorCode,
52
+ createWorkspaceBridgeError,
23
53
  definePanel,
24
54
  noopTelemetry,
25
55
  safeCapture
package/dist/testing.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as Ba } from "react/jsx-runtime";
2
2
  import * as Pa from "react";
3
3
  import { createElement as is, useMemo as wn, useLayoutEffect as us, isValidElement as ss, cloneElement as ds, useSyncExternalStore as Gi } from "react";
4
- import { i as cs, r as fs, q as ps } from "./WorkspaceProvider-CrOT4ab7.js";
4
+ import { i as cs, w as fs, v as ps } from "./WorkspaceProvider-DF90RUdU.js";
5
5
  import { d as ms } from "./panel-DnvDNQac.js";
6
6
  import * as bs from "react-dom/test-utils";
7
7
  import ka from "react-dom";
@@ -1,6 +1,7 @@
1
1
  interface UiBridge {
2
2
  getState(): Promise<UiState | null>;
3
3
  setState(state: UiState): Promise<void>;
4
+ /** Canonical UI command dispatch method. */
4
5
  postCommand(cmd: UiCommand): Promise<CommandResult>;
5
6
  subscribeCommands(handler: (cmd: UiCommand & {
6
7
  seq: number;
@@ -9,6 +10,10 @@ interface UiBridge {
9
10
  seq: number;
10
11
  }>>;
11
12
  }
13
+ type WorkspaceBridge = UiBridge & {
14
+ /** @deprecated Use postCommand. Kept as a compatibility alias for WorkspaceBridge RPC callers. */
15
+ emitUiEffect(cmd: UiCommand): Promise<CommandResult>;
16
+ };
12
17
  type UiState = Record<string, unknown>;
13
18
  type UiCommand = {
14
19
  kind: 'openFile';
@@ -68,4 +73,4 @@ interface CommandResult {
68
73
  };
69
74
  }
70
75
 
71
- export type { CommandResult as C, UiBridge as U, UiCommand as a, UiState as b };
76
+ export type { CommandResult as C, UiBridge as U, WorkspaceBridge as W, UiCommand as a, UiState as b };
@@ -0,0 +1,124 @@
1
+ /**
2
+ * Platform-neutral WorkspaceBridge RPC contracts.
3
+ *
4
+ * This file is imported by both browser and server bundles. Keep it free of
5
+ * Node-only types/imports and keep stable bridge error codes centralized here.
6
+ */
7
+ /**
8
+ * Canonical WorkspaceBridge runtime env var names. Defined in this browser- and
9
+ * server-safe module so the producer (server runtimeEnv injection) and the
10
+ * consumer (bridge-client SDK) share one source of truth and cannot drift on
11
+ * string equality.
12
+ */
13
+ declare const WORKSPACE_BRIDGE_URL_ENV = "BORING_WORKSPACE_BRIDGE_URL";
14
+ declare const WORKSPACE_BRIDGE_TOKEN_ENV = "BORING_WORKSPACE_BRIDGE_TOKEN";
15
+ declare const WORKSPACE_BRIDGE_TOKEN_URL_ENV = "BORING_WORKSPACE_BRIDGE_TOKEN_URL";
16
+ declare const WORKSPACE_BRIDGE_REFRESH_TOKEN_ENV = "BORING_WORKSPACE_BRIDGE_REFRESH_TOKEN";
17
+ declare const WORKSPACE_BRIDGE_DISABLED_ENV = "BORING_WORKSPACE_BRIDGE_DISABLED";
18
+ type BridgeCallerClass = "browser" | "runtime" | "server";
19
+ type BridgeActorKind = "human" | "agent" | "system" | "service";
20
+ interface BridgeRedactedActorRef {
21
+ /** Redacted, stable-enough label for logs/audit. Never a bearer token. */
22
+ label: string;
23
+ /** Optional non-secret stable id when the auth adapter has one. */
24
+ id?: string;
25
+ }
26
+ interface BridgeActorAttribution {
27
+ actorKind: BridgeActorKind;
28
+ performedBy?: BridgeRedactedActorRef;
29
+ onBehalfOf?: BridgeRedactedActorRef;
30
+ }
31
+ interface BridgeAuthContext {
32
+ callerClass: BridgeCallerClass;
33
+ workspaceId: string;
34
+ sessionId?: string;
35
+ pluginId?: string;
36
+ capabilities: readonly string[];
37
+ actor: BridgeActorAttribution;
38
+ tokenId?: string;
39
+ expiresAt?: string;
40
+ }
41
+ type BridgeIdempotencyPolicy = "none" | "required" | "request-id";
42
+ interface WorkspaceBridgeOperationDefinition<TInput = unknown, TOutput = unknown> {
43
+ op: string;
44
+ version: number;
45
+ owner: string;
46
+ callerClassesAllowed: readonly BridgeCallerClass[];
47
+ requiredCapabilities: readonly string[];
48
+ /**
49
+ * Allow a caller authenticated for one workspace to invoke this operation on
50
+ * a registry owned by another workspace. Keep false/omitted for normal
51
+ * tenant-scoped operations; cross-workspace ops must perform their own
52
+ * explicit resource authorization.
53
+ */
54
+ allowCrossWorkspace?: boolean;
55
+ inputSchema: unknown;
56
+ outputSchema?: unknown;
57
+ timeoutMs: number;
58
+ maxInputBytes: number;
59
+ maxOutputBytes: number;
60
+ idempotencyPolicy: BridgeIdempotencyPolicy;
61
+ /** Type anchors only; no runtime value should be supplied. */
62
+ readonly __inputType?: TInput;
63
+ readonly __outputType?: TOutput;
64
+ }
65
+ interface WorkspaceBridgeCallRequest<TInput = unknown> {
66
+ op: string;
67
+ input: TInput;
68
+ requestId?: string;
69
+ idempotencyKey?: string;
70
+ }
71
+ interface WorkspaceBridgeCallSuccess<TOutput = unknown> {
72
+ ok: true;
73
+ op: string;
74
+ requestId: string;
75
+ output: TOutput;
76
+ }
77
+ interface WorkspaceBridgeCallFailure {
78
+ ok: false;
79
+ op: string;
80
+ requestId?: string;
81
+ error: WorkspaceBridgeError;
82
+ }
83
+ type WorkspaceBridgeCallResponse<TOutput = unknown> = WorkspaceBridgeCallSuccess<TOutput> | WorkspaceBridgeCallFailure;
84
+ declare enum WorkspaceBridgeErrorCode {
85
+ OpNotFound = "BRIDGE_OP_NOT_FOUND",
86
+ DuplicateOp = "BRIDGE_DUPLICATE_OP",
87
+ CallerNotAllowed = "BRIDGE_CALLER_NOT_ALLOWED",
88
+ AuthRequired = "BRIDGE_AUTH_REQUIRED",
89
+ CapabilityDenied = "BRIDGE_CAPABILITY_DENIED",
90
+ ResourceScopeDenied = "BRIDGE_RESOURCE_SCOPE_DENIED",
91
+ SchemaInvalid = "BRIDGE_SCHEMA_INVALID",
92
+ OutputSchemaInvalid = "BRIDGE_OUTPUT_SCHEMA_INVALID",
93
+ InputTooLarge = "BRIDGE_INPUT_TOO_LARGE",
94
+ OutputTooLarge = "BRIDGE_OUTPUT_TOO_LARGE",
95
+ Timeout = "BRIDGE_TIMEOUT",
96
+ HandlerFailed = "BRIDGE_HANDLER_FAILED",
97
+ IdempotencyRequired = "BRIDGE_IDEMPOTENCY_REQUIRED",
98
+ IdempotencyConflict = "BRIDGE_IDEMPOTENCY_CONFLICT",
99
+ ReplayRejected = "BRIDGE_REPLAY_REJECTED",
100
+ RateLimited = "BRIDGE_RATE_LIMITED",
101
+ InvalidToken = "BRIDGE_INVALID_TOKEN",
102
+ ExpiredToken = "BRIDGE_EXPIRED_TOKEN",
103
+ InvalidRequest = "BRIDGE_INVALID_REQUEST",
104
+ UnsupportedRuntime = "BRIDGE_UNSUPPORTED_RUNTIME"
105
+ }
106
+ interface WorkspaceBridgeError {
107
+ code: WorkspaceBridgeErrorCode;
108
+ message: string;
109
+ details?: Record<string, unknown>;
110
+ }
111
+ declare function createWorkspaceBridgeError(code: WorkspaceBridgeErrorCode, message: string, details?: Record<string, unknown>): WorkspaceBridgeError;
112
+ interface WorkspaceBridgeFileAssetPointer {
113
+ kind: "file-asset";
114
+ /** Workspace-relative path validated by the Workspace adapter/file route. */
115
+ path: string;
116
+ contentType: string;
117
+ byteLength?: number;
118
+ rawUrl?: string;
119
+ }
120
+ type WorkspaceBridgeJsonValue = null | boolean | number | string | WorkspaceBridgeJsonValue[] | {
121
+ [key: string]: WorkspaceBridgeJsonValue;
122
+ };
123
+
124
+ export { type BridgeAuthContext as B, type WorkspaceBridgeOperationDefinition as W, type WorkspaceBridgeCallRequest as a, type WorkspaceBridgeCallResponse as b, type WorkspaceBridgeError as c, type BridgeCallerClass as d, type BridgeIdempotencyPolicy as e, type BridgeActorAttribution as f, type BridgeActorKind as g, type BridgeRedactedActorRef as h, type WorkspaceBridgeCallFailure as i, type WorkspaceBridgeCallSuccess as j, WorkspaceBridgeErrorCode as k, type WorkspaceBridgeFileAssetPointer as l, type WorkspaceBridgeJsonValue as m, createWorkspaceBridgeError as n, WORKSPACE_BRIDGE_DISABLED_ENV as o, WORKSPACE_BRIDGE_REFRESH_TOKEN_ENV as p, WORKSPACE_BRIDGE_TOKEN_ENV as q, WORKSPACE_BRIDGE_TOKEN_URL_ENV as r, WORKSPACE_BRIDGE_URL_ENV as s };
@@ -1239,6 +1239,9 @@
1239
1239
  :root, :host {
1240
1240
  --font-sans: var(--boring-font-sans);
1241
1241
  --font-mono: var(--boring-font-mono);
1242
+ --color-amber-300: oklch(87.9% 0.169 91.605);
1243
+ --color-amber-500: oklch(76.9% 0.188 70.08);
1244
+ --color-amber-700: oklch(55.5% 0.163 48.998);
1242
1245
  --color-black: #000;
1243
1246
  --color-white: #fff;
1244
1247
  --spacing: 0.25rem;
@@ -1817,6 +1820,9 @@
1817
1820
  .min-w-0 {
1818
1821
  min-width: calc(var(--spacing) * 0);
1819
1822
  }
1823
+ .min-w-4 {
1824
+ min-width: calc(var(--spacing) * 4);
1825
+ }
1820
1826
  .min-w-32 {
1821
1827
  min-width: calc(var(--spacing) * 32);
1822
1828
  }
@@ -2095,6 +2101,12 @@
2095
2101
  .bg-\[color\:var\(--accent\)\] {
2096
2102
  background-color: var(--accent);
2097
2103
  }
2104
+ .bg-\[color\:var\(--accent\)\]\/12 {
2105
+ background-color: var(--accent);
2106
+ @supports (color: color-mix(in lab, red, red)) {
2107
+ background-color: color-mix(in oklab, var(--accent) 12%, transparent);
2108
+ }
2109
+ }
2098
2110
  .bg-\[color\:var\(--accent-soft\)\] {
2099
2111
  background-color: var(--accent-soft);
2100
2112
  }
@@ -2104,6 +2116,15 @@
2104
2116
  .bg-accent {
2105
2117
  background-color: var(--boring-accent);
2106
2118
  }
2119
+ .bg-amber-500 {
2120
+ background-color: var(--color-amber-500);
2121
+ }
2122
+ .bg-amber-500\/12 {
2123
+ background-color: color-mix(in srgb, oklch(76.9% 0.188 70.08) 12%, transparent);
2124
+ @supports (color: color-mix(in lab, red, red)) {
2125
+ background-color: color-mix(in oklab, var(--color-amber-500) 12%, transparent);
2126
+ }
2127
+ }
2107
2128
  .bg-background {
2108
2129
  background-color: var(--boring-background);
2109
2130
  }
@@ -2185,6 +2206,9 @@
2185
2206
  .bg-muted {
2186
2207
  background-color: var(--boring-muted);
2187
2208
  }
2209
+ .bg-muted-foreground {
2210
+ background-color: var(--boring-muted-foreground);
2211
+ }
2188
2212
  .bg-muted\/30 {
2189
2213
  background-color: var(--boring-muted);
2190
2214
  @supports (color: color-mix(in lab, red, red)) {
@@ -2371,6 +2395,9 @@
2371
2395
  font-size: var(--text-xs);
2372
2396
  line-height: var(--tw-leading, var(--text-xs--line-height));
2373
2397
  }
2398
+ .text-\[9\.5px\] {
2399
+ font-size: 9.5px;
2400
+ }
2374
2401
  .text-\[10\.5px\] {
2375
2402
  font-size: 10.5px;
2376
2403
  }
@@ -2466,6 +2493,9 @@
2466
2493
  .text-accent-foreground {
2467
2494
  color: var(--boring-accent-foreground);
2468
2495
  }
2496
+ .text-amber-700 {
2497
+ color: var(--color-amber-700);
2498
+ }
2469
2499
  .text-background {
2470
2500
  color: var(--boring-background);
2471
2501
  }
@@ -3197,6 +3227,11 @@
3197
3227
  background-color: transparent;
3198
3228
  }
3199
3229
  }
3230
+ .dark\:text-amber-300 {
3231
+ &:is(.dark *) {
3232
+ color: var(--color-amber-300);
3233
+ }
3234
+ }
3200
3235
  .\[\&_\[role\=treeitem\]\]\:\!indent-0 {
3201
3236
  & [role=treeitem] {
3202
3237
  text-indent: calc(var(--spacing) * 0) !important;
@@ -575,6 +575,8 @@ export declare interface DispatchContext {
575
575
  * silently dropped.
576
576
  */
577
577
  enqueue?: (run: (surface: SurfaceShellApi) => void) => void;
578
+ /** Optional host policy hook for surface requests that are only relevant in a visible/open context. */
579
+ shouldOpenSurface?: (request: SurfaceOpenRequest) => boolean;
578
580
  }
579
581
 
580
582
  export declare function DockviewShell({ layout, persistedLayout, onReady, onLayoutChange, allowedPanels, className, prefixHeaderActions, rightHeaderActions, watermarkComponent, }: DockviewShellProps): JSX.Element;
@@ -634,6 +636,10 @@ export declare function emitAgentData(part: unknown): void;
634
636
 
635
637
  export declare function emitFilesystemAgentFileChange(part: unknown): void;
636
638
 
639
+ export declare function emitWorkspaceAttentionAction(detail: WorkspaceAttentionActionDetail): void;
640
+
641
+ export declare function emitWorkspaceComposerStop(detail: WorkspaceComposerStopDetail): void;
642
+
637
643
  export declare function EmptyPane({ className, onOpenFile }: EmptyPaneProps): JSX.Element;
638
644
 
639
645
  export declare interface EmptyPaneProps {
@@ -1000,6 +1006,10 @@ export declare interface IdeLayoutProps {
1000
1006
  className?: string;
1001
1007
  }
1002
1008
 
1009
+ export declare function isWorkspaceComposerStopDetail(value: unknown): value is WorkspaceComposerStopDetail;
1010
+
1011
+ export declare function isWorkspaceComposerStopReason(value: unknown): value is WorkspaceComposerStopReason;
1012
+
1003
1013
  export declare type JSONSchema = Record<string, unknown>;
1004
1014
 
1005
1015
  export declare interface LayoutConfig {
@@ -1341,6 +1351,8 @@ export declare interface PluginProviderProps {
1341
1351
  authHeaders?: Record<string, string>;
1342
1352
  onAuthError?: (statusCode: number) => void;
1343
1353
  apiTimeout?: number;
1354
+ activeSessionId?: string | null;
1355
+ openSessionIds?: readonly string[];
1344
1356
  children: ReactNode;
1345
1357
  }
1346
1358
 
@@ -1904,6 +1916,15 @@ export declare type WorkbenchLeftTabId = string;
1904
1916
 
1905
1917
  declare const WORKSPACE_AGENT_DATA_EVENT = "workspace:agent.data";
1906
1918
 
1919
+ export declare const WORKSPACE_ATTENTION_ACTION_EVENT: "boring-workspace:attention-action";
1920
+
1921
+ export declare const WORKSPACE_COMPOSER_STOP_EVENT: "boring:workspace-composer-stop";
1922
+
1923
+ export declare const WORKSPACE_COMPOSER_STOP_REASONS: {
1924
+ readonly sessionSwitch: "session-switch";
1925
+ readonly userStop: "user-stop";
1926
+ };
1927
+
1907
1928
  declare const WORKSPACE_EDITOR_SAVE_END_EVENT = "workspace:editor.save.end";
1908
1929
 
1909
1930
  declare const WORKSPACE_EDITOR_SAVE_START_EVENT = "workspace:editor.save.start";
@@ -1914,6 +1935,8 @@ declare const WORKSPACE_PANEL_CLOSE_EVENT = "workspace:panel.close";
1914
1935
 
1915
1936
  declare const WORKSPACE_PANEL_UPDATE_EVENT = "workspace:panel.update";
1916
1937
 
1938
+ export declare const WORKSPACE_SURFACE_OPEN_SKIPPED_EVENT = "boring-workspace:surface-open-skipped";
1939
+
1917
1940
  declare const WORKSPACE_UI_COMMAND_EVENT = "workspace:ui.command";
1918
1941
 
1919
1942
  export declare interface WorkspaceActions {
@@ -1934,17 +1957,27 @@ export declare interface WorkspaceActions {
1934
1957
  resetLayout: () => void;
1935
1958
  }
1936
1959
 
1960
+ export declare type WorkspaceAttentionActionDetail = {
1961
+ blockerId: string;
1962
+ actionId: string;
1963
+ blocker: WorkspaceAttentionBlocker;
1964
+ sessionId?: string;
1965
+ };
1966
+
1937
1967
  export declare type WorkspaceAttentionBlocker = {
1938
1968
  id: string;
1969
+ /** Plugin/domain-specific reason, e.g. "ask-user.question" or "pr-review.review". */
1939
1970
  reason: string;
1940
1971
  surfaceKind?: string;
1941
1972
  target?: string;
1942
1973
  label?: string;
1943
1974
  sessionId?: string;
1975
+ /** Optional generic session-row badge contributed by the plugin that owns this attention. */
1976
+ sessionBadge?: WorkspaceAttentionSessionBadge;
1944
1977
  actions?: WorkspaceAttentionBlockerAction[];
1945
1978
  };
1946
1979
 
1947
- declare type WorkspaceAttentionBlockerAction = {
1980
+ export declare type WorkspaceAttentionBlockerAction = {
1948
1981
  id: string;
1949
1982
  label: string;
1950
1983
  };
@@ -1955,6 +1988,19 @@ export declare interface WorkspaceAttentionContextValue {
1955
1988
  removeBlocker: (id: string) => void;
1956
1989
  }
1957
1990
 
1991
+ export declare type WorkspaceAttentionSessionBadge = {
1992
+ /** Stable badge kind for data attributes and plugin-specific styling hooks. */
1993
+ kind: string;
1994
+ /** Short text rendered on the session row, e.g. "question", "review", "approval". */
1995
+ label: string;
1996
+ /** Visual tone only; semantics are owned by the plugin-specific kind/reason. */
1997
+ tone?: "attention" | "danger" | "neutral" | "warning";
1998
+ /** Higher priority wins when several plugins mark the same session. */
1999
+ priority?: number;
2000
+ };
2001
+
2002
+ export declare function workspaceAttentionSessionBadgeForBlocker(blocker: Pick<WorkspaceAttentionBlocker, "reason" | "sessionBadge">): WorkspaceAttentionSessionBadge | null;
2003
+
1958
2004
  export declare interface WorkspaceBridge {
1959
2005
  getOpenPanels(): PanelState[];
1960
2006
  getActiveFile(): string | null;
@@ -1997,6 +2043,22 @@ export declare interface WorkspaceChatPanelProps extends PiChatPanelProps<Worksp
1997
2043
  closeWorkbench?: () => void;
1998
2044
  }
1999
2045
 
2046
+ export declare function workspaceComposerStopAppliesToSession(detail: unknown, sessionId: string, options?: WorkspaceComposerStopMatchOptions): boolean;
2047
+
2048
+ export declare type WorkspaceComposerStopDetail = {
2049
+ sessionId?: string;
2050
+ reason: WorkspaceComposerStopReason;
2051
+ };
2052
+
2053
+ export declare type WorkspaceComposerStopMatchOptions = {
2054
+ fallbackSessionId?: string | null;
2055
+ ignoredReasons?: readonly WorkspaceComposerStopReason[];
2056
+ };
2057
+
2058
+ export declare type WorkspaceComposerStopReason = typeof WORKSPACE_COMPOSER_STOP_REASONS[keyof typeof WORKSPACE_COMPOSER_STOP_REASONS];
2059
+
2060
+ export declare function workspaceComposerStopTargetSessionId(detail: unknown, fallbackSessionId?: string | null): string | undefined;
2061
+
2000
2062
  export declare interface WorkspaceContextValue {
2001
2063
  chatPanel: WorkspaceChatPanelComponent | null;
2002
2064
  registeredPlugins: RegisteredPluginMeta[];
@@ -2134,7 +2196,7 @@ export declare interface WorkspacePluginEventMap {
2134
2196
  };
2135
2197
  }
2136
2198
 
2137
- export declare function WorkspaceProvider({ children, chatPanel, plugins, excludeDefaults, panels, commands, catalogs, capabilities, apiBaseUrl, authHeaders, apiTimeout, defaultTheme, onThemeChange, workspaceId, workspaceLabel, appTitle, storageKey, persistenceEnabled, manageDocumentTitle, bridgeEndpoint, onAuthError, onOpenFile, debug, frontPluginHotReload, fullPageBasePath, }: WorkspaceProviderProps): JSX.Element;
2199
+ export declare function WorkspaceProvider({ children, chatPanel, plugins, excludeDefaults, panels, commands, catalogs, capabilities, apiBaseUrl, authHeaders, apiTimeout, activeSessionId, openSessionIds, defaultTheme, onThemeChange, workspaceId, workspaceLabel, appTitle, storageKey, persistenceEnabled, manageDocumentTitle, bridgeEndpoint, onAuthError, onOpenFile, debug, frontPluginHotReload, fullPageBasePath, }: WorkspaceProviderProps): JSX.Element;
2138
2200
 
2139
2201
  export declare interface WorkspaceProviderProps {
2140
2202
  children: ReactNode;
@@ -2153,6 +2215,10 @@ export declare interface WorkspaceProviderProps {
2153
2215
  authHeaders?: Record<string, string>;
2154
2216
  /** Per-request timeout for the data layer's FetchClient, in ms. */
2155
2217
  apiTimeout?: number;
2218
+ /** Active chat/session scope shared with plugin providers that need session-scoped data. */
2219
+ activeSessionId?: string | null;
2220
+ /** Session ids that are currently open in chat panes, for plugins that must avoid opening closed-session UI. */
2221
+ openSessionIds?: readonly string[];
2156
2222
  defaultTheme?: "light" | "dark" | undefined;
2157
2223
  onThemeChange?: (theme: "light" | "dark") => void;
2158
2224
  workspaceId?: string;