@av-pi-studio/workbench 0.0.123 → 0.0.124
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/README.md +16 -4
- package/dist/chunks/{BinaryFallbackViewer-EznEIpRC.js → BinaryFallbackViewer-ua5VmtNP.js} +1 -1
- package/dist/chunks/{ChatPanel-DgJlK-yP.js → ChatPanel-9mV7jLOD.js} +3 -3
- package/dist/chunks/{CodeView-klpk8qD0.js → CodeView--Yo9YYpl.js} +2 -2
- package/dist/chunks/{FilePanel-Beg5Fs8X.js → FilePanel-CBNc1csX.js} +2 -2
- package/dist/chunks/HtmlViewer-BjvrS29T.js +539 -0
- package/dist/chunks/{ImageViewer-BLrsKWwI.js → ImageViewer-DQFVe58O.js} +1 -1
- package/dist/chunks/{MarkdownFileViewer-DxJJlrsv.js → MarkdownFileViewer-BEaGxGyd.js} +4 -4
- package/dist/chunks/{ModelProvidersPanel-C3TXoq1L.js → ModelProvidersPanel-CUdM6FMu.js} +2 -2
- package/dist/chunks/{MoleculeViewerPanel-BAWs5F2j.js → MoleculeViewerPanel-DhkadYBP.js} +3 -3
- package/dist/chunks/{PdfViewer-B_kiY-Tw.js → PdfViewer-PKAEVwco.js} +2 -2
- package/dist/chunks/{SaveFileButton-Bsz3wG4a.js → SaveFileButton-qwf_ewMX.js} +1 -1
- package/dist/chunks/SettingsDialog-ChDFOPih.js +454 -0
- package/dist/chunks/{SkillsPanel-BB5_yrcx.js → SkillsPanel-DP72YesV.js} +1 -1
- package/dist/chunks/{TerminalPanel-DgH4re05.js → TerminalPanel-BKnfLGNl.js} +1 -1
- package/dist/chunks/{TextViewer-BiwFYLLc.js → TextViewer-ZT99BjEP.js} +2 -2
- package/dist/chunks/{VideoViewer-BSGjTTQR.js → VideoViewer-C_gj8A0b.js} +1 -1
- package/dist/chunks/{ViewersPanel-BYHmKfOh.js → ViewersPanel-CTRov7NQ.js} +1 -1
- package/dist/chunks/external-link-BsgjS-QP.js +24 -0
- package/dist/chunks/{href-resolution-AtzN0oCd.js → href-resolution-AG-Co7Sm.js} +1 -1
- package/dist/chunks/index-CitLJdIo.js +7415 -0
- package/dist/chunks/{markdown-CypQ7TkY.js → markdown-CVWWeRbe.js} +97 -90
- package/dist/chunks/{use-file-download-zheHRdGQ.js → use-file-download-DbQCEsRG.js} +1 -1
- package/dist/chunks/{use-file-watch-CyVeSj2A.js → use-file-watch-CrgiCMCF.js} +1 -1
- package/dist/chunks/{use-provider-auth-list-jNjjSAD_.js → use-provider-auth-list-Bcdz9-zE.js} +1 -1
- package/dist/features/connection/ConnectionBar.d.ts +4 -0
- package/dist/features/connection/DaemonSwitcher.d.ts +16 -0
- package/dist/features/connection/daemon-switcher-presentation.d.ts +69 -0
- package/dist/features/connection/outdated-daemon.d.ts +17 -0
- package/dist/features/connection/use-outdated-daemon-notice.d.ts +26 -0
- package/dist/features/daemons/DaemonForm.d.ts +18 -0
- package/dist/features/daemons/DaemonsScreen.d.ts +17 -0
- package/dist/features/daemons/connect-current.d.ts +19 -0
- package/dist/features/daemons/daemon-form-actions.d.ts +27 -0
- package/dist/features/daemons/daemon-form.d.ts +103 -0
- package/dist/features/daemons/daemon-lifecycle.d.ts +58 -0
- package/dist/features/daemons/daemon-presentation.d.ts +46 -0
- package/dist/features/daemons/daemons-screen-actions.d.ts +37 -0
- package/dist/features/daemons/daemons-screen-view.d.ts +62 -0
- package/dist/features/daemons/daemons-store.d.ts +30 -0
- package/dist/features/daemons/use-daemon-lifecycle.d.ts +3 -0
- package/dist/features/daemons/use-daemons.d.ts +8 -0
- package/dist/features/files/preview-mounts.d.ts +25 -0
- package/dist/features/sessions/RenameSessionDialog.d.ts +8 -0
- package/dist/features/sessions/rename-title.d.ts +6 -0
- package/dist/features/sessions/session-actions.d.ts +6 -5
- package/dist/hooks/use-connection.d.ts +17 -5
- package/dist/host/browser-files.d.ts +2 -2
- package/dist/host/browser-host.d.ts +6 -1
- package/dist/host/types.d.ts +149 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/connection/connect-failure.d.ts +14 -0
- package/dist/lib/connection/connection-store.d.ts +7 -1
- package/dist/stores/session-rename-store.d.ts +13 -0
- package/dist/styles.css +1 -1
- package/dist/timeline/FileLink.d.ts +4 -2
- package/dist/timeline/external-href.d.ts +9 -0
- package/package.json +4 -4
- package/dist/chunks/HtmlViewer-KGQcSEm3.js +0 -490
- package/dist/chunks/SettingsDialog-AHnoT7nN.js +0 -471
- package/dist/chunks/index-QzeFcHmH.js +0 -6261
package/dist/host/types.d.ts
CHANGED
|
@@ -9,14 +9,126 @@ export interface AppIdentity {
|
|
|
9
9
|
* Tauri app). Omit in a plain browser. Informational: nothing branches on it.
|
|
10
10
|
*/
|
|
11
11
|
platform?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The oldest daemon version this app expects. A connected daemon below it (or reporting none)
|
|
14
|
+
* gets a one-time notice. Set by the desktop host; a browser host omits it.
|
|
15
|
+
*/
|
|
16
|
+
minDaemonVersion?: string;
|
|
17
|
+
}
|
|
18
|
+
/** A registry entry without its secrets (`password`, `pairingLink`). */
|
|
19
|
+
export interface DaemonEntryView {
|
|
20
|
+
id: string;
|
|
21
|
+
kind: "local" | "direct" | "relay";
|
|
22
|
+
name: string;
|
|
23
|
+
/** `direct` entries only, as typed. */
|
|
24
|
+
address?: string;
|
|
25
|
+
hasPassword: boolean;
|
|
26
|
+
}
|
|
27
|
+
/** The local daemon's state, as the host last probed or drove it. */
|
|
28
|
+
export type LocalDaemonState =
|
|
29
|
+
/** Until the first probe after launch has finished. */
|
|
30
|
+
{
|
|
31
|
+
state: "checking";
|
|
32
|
+
}
|
|
33
|
+
/** Windows: no local daemon. */
|
|
34
|
+
| {
|
|
35
|
+
state: "unsupported";
|
|
36
|
+
}
|
|
37
|
+
/** No CLI found. Carries the configured path when one was set and is not an executable file. */
|
|
38
|
+
| {
|
|
39
|
+
state: "cli_missing";
|
|
40
|
+
path?: string;
|
|
41
|
+
}
|
|
42
|
+
/** A CLI too old for `--json daemon start`. */
|
|
43
|
+
| {
|
|
44
|
+
state: "cli_outdated";
|
|
45
|
+
version: string;
|
|
46
|
+
} | {
|
|
47
|
+
state: "stopped";
|
|
48
|
+
} | {
|
|
49
|
+
state: "starting";
|
|
50
|
+
} | {
|
|
51
|
+
state: "stopping";
|
|
52
|
+
} | {
|
|
53
|
+
state: "running";
|
|
54
|
+
host: string;
|
|
55
|
+
port: number;
|
|
56
|
+
} | {
|
|
57
|
+
state: "failed";
|
|
58
|
+
reason: "not_healthy" | "timeout" | "bad_output" | "spawn_failed";
|
|
59
|
+
};
|
|
60
|
+
export type NewDaemon = {
|
|
61
|
+
kind: "direct";
|
|
62
|
+
name: string;
|
|
63
|
+
address: string;
|
|
64
|
+
password?: string;
|
|
65
|
+
} | {
|
|
66
|
+
kind: "relay";
|
|
67
|
+
name: string;
|
|
68
|
+
pairingLink: string;
|
|
69
|
+
};
|
|
70
|
+
/** Fields to change; an absent field is unchanged. `password: null` clears it. */
|
|
71
|
+
export interface DaemonPatch {
|
|
72
|
+
name?: string;
|
|
73
|
+
address?: string;
|
|
74
|
+
password?: string | null;
|
|
75
|
+
pairingLink?: string;
|
|
76
|
+
}
|
|
77
|
+
export type DaemonErrorCode = "invalid_name" | "name_taken" | "invalid_address" | "invalid_link" | "too_many" | "not_found" | "wrong_kind" | "local_not_removable" | "unsupported" | "cli_missing" | "cli_outdated" | "busy" | "no_current" | "local_stopped" | "not_healthy" | "timeout" | "bad_output" | "spawn_failed";
|
|
78
|
+
/**
|
|
79
|
+
* What a `HostDaemons` call rejects with: an `Error` whose `code` says why and whose message is the
|
|
80
|
+
* code. An interface, so the package exports no runtime value for it; narrow with `"code" in e`.
|
|
81
|
+
*/
|
|
82
|
+
export interface DaemonError extends Error {
|
|
83
|
+
readonly code: DaemonErrorCode;
|
|
84
|
+
}
|
|
85
|
+
export interface DaemonSettings {
|
|
86
|
+
/** Opening the local entry starts its daemon when it is stopped. */
|
|
87
|
+
autoStartLocalDaemon: boolean;
|
|
88
|
+
/** An explicit path of the `pi-studio` executable; `null` means "find it". */
|
|
89
|
+
cliPath: string | null;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Optional. The daemon registry of a host that owns one (the desktop app). Absent: the workbench
|
|
93
|
+
* keeps its address and password fields.
|
|
94
|
+
*/
|
|
95
|
+
export interface HostDaemons {
|
|
96
|
+
/** Synchronous: the host keeps it in memory. Never contains a password or a pairing link. */
|
|
97
|
+
snapshot(): {
|
|
98
|
+
currentId: string | null;
|
|
99
|
+
entries: DaemonEntryView[];
|
|
100
|
+
local: LocalDaemonState;
|
|
101
|
+
settings: DaemonSettings;
|
|
102
|
+
};
|
|
103
|
+
/** Fires after any change to the registry, the settings or the local daemon's state. */
|
|
104
|
+
subscribe(listener: () => void): () => void;
|
|
105
|
+
/**
|
|
106
|
+
* What to dial for the current entry; starts the local daemon when it is stopped and
|
|
107
|
+
* `autoStartLocalDaemon` is on. Rejects with a `DaemonError`.
|
|
108
|
+
*/
|
|
109
|
+
resolveCurrent(): Promise<ConnectIntent>;
|
|
110
|
+
add(input: NewDaemon): Promise<DaemonEntryView>;
|
|
111
|
+
update(id: string, patch: DaemonPatch): Promise<DaemonEntryView>;
|
|
112
|
+
/** Rejects `local_not_removable` for the local entry. */
|
|
113
|
+
remove(id: string): Promise<void>;
|
|
114
|
+
/** Opens another entry. The page is reloaded; the promise does not resolve on success. */
|
|
115
|
+
switchTo(id: string): Promise<void>;
|
|
116
|
+
setSettings(patch: Partial<DaemonSettings>): Promise<void>;
|
|
117
|
+
/** Each resolves once the action is accepted; the outcome arrives as a state change. */
|
|
118
|
+
local: {
|
|
119
|
+
start(): Promise<void>;
|
|
120
|
+
stop(): Promise<void>;
|
|
121
|
+
restart(): Promise<void>;
|
|
122
|
+
refresh(): Promise<void>;
|
|
123
|
+
};
|
|
124
|
+
/** Fires when the native menu asks for the Daemons screen. Returns the unsubscribe. */
|
|
125
|
+
onManageRequest(listener: () => void): () => void;
|
|
12
126
|
}
|
|
13
127
|
/** Blocking questions to the user. Each resolves when the user answers. */
|
|
14
128
|
export interface HostDialogs {
|
|
15
129
|
/** Resolves `false` on dismissal. */
|
|
16
130
|
confirm(message: string): Promise<boolean>;
|
|
17
131
|
alert(message: string): Promise<void>;
|
|
18
|
-
/** Resolves `null` on dismissal. */
|
|
19
|
-
prompt(message: string, initial?: string): Promise<string | null>;
|
|
20
132
|
}
|
|
21
133
|
export interface HostClipboard {
|
|
22
134
|
/** Rejects on failure; callers report the failure to the user. */
|
|
@@ -115,6 +227,16 @@ export interface UploadOptions {
|
|
|
115
227
|
*/
|
|
116
228
|
onProgress?(sent: number, total?: number): void;
|
|
117
229
|
}
|
|
230
|
+
/**
|
|
231
|
+
* Where a saved daemon file goes when the shell supplies the destination. The workbench calls
|
|
232
|
+
* `write` for each chunk in file order and awaits it, then `finish` once; on any failure it calls
|
|
233
|
+
* `discard` once instead (never `finish`) and rejects with the original error.
|
|
234
|
+
*/
|
|
235
|
+
export interface SaveTarget {
|
|
236
|
+
write(chunk: Uint8Array): Promise<void>;
|
|
237
|
+
finish(): Promise<void>;
|
|
238
|
+
discard(): Promise<void>;
|
|
239
|
+
}
|
|
118
240
|
export interface HostFiles {
|
|
119
241
|
/**
|
|
120
242
|
* Upload `source` to `<dir>/<source.name>` on the daemon. Resolves only once the daemon has
|
|
@@ -140,6 +262,22 @@ export interface HostPdf {
|
|
|
140
262
|
* the document; a trailing slash is optional. */
|
|
141
263
|
assetBaseUrl: string;
|
|
142
264
|
}
|
|
265
|
+
/**
|
|
266
|
+
* Where the HTML viewer's document is loaded from. `origin`: the viewer hands the assembled
|
|
267
|
+
* document to `mount` and loads the frame from the returned `url` (same sandbox tokens) instead
|
|
268
|
+
* of `srcdoc`; it calls `release` once a newer document replaces it and when the viewer unmounts.
|
|
269
|
+
* A `mount` that rejects shows the viewer's error state. `inert`: scripts cannot run on this
|
|
270
|
+
* host; the viewer keeps `srcdoc` and says so.
|
|
271
|
+
*/
|
|
272
|
+
export type HostPreview = {
|
|
273
|
+
kind: "origin";
|
|
274
|
+
mount(html: string): Promise<{
|
|
275
|
+
url: string;
|
|
276
|
+
release(): void;
|
|
277
|
+
}>;
|
|
278
|
+
} | {
|
|
279
|
+
kind: "inert";
|
|
280
|
+
};
|
|
143
281
|
/**
|
|
144
282
|
* The one object an embedding shell supplies to the workbench for everything browser-bound
|
|
145
283
|
* (`swe/architecture/workbench-host-adapter.md`). `web-client` passes `createBrowserHost(...)`; a
|
|
@@ -164,5 +302,14 @@ export interface WorkbenchHost {
|
|
|
164
302
|
* its Download action.
|
|
165
303
|
*/
|
|
166
304
|
pdf?: HostPdf;
|
|
305
|
+
/**
|
|
306
|
+
* Optional. Where the HTML viewer loads its document from. Absent: the `srcdoc` frame, unchanged.
|
|
307
|
+
*/
|
|
308
|
+
preview?: HostPreview;
|
|
309
|
+
/**
|
|
310
|
+
* Optional. The daemon registry. Absent: the connection bar's address and password fields,
|
|
311
|
+
* unchanged. Consumed from sprint-110.
|
|
312
|
+
*/
|
|
313
|
+
daemons?: HostDaemons;
|
|
167
314
|
}
|
|
168
315
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ export { ConnectionBar, OpenWorkspaceDialog, PaneArea, RightSidebar, SessionList
|
|
|
10
10
|
export { type SidebarLayout, useConnection, useSettingsDialog, useShellLayout, type WorkbenchConnection, } from "./shell/hooks.js";
|
|
11
11
|
export { type ConnectOptions } from "./lib/connection/connection-store.js";
|
|
12
12
|
export { createBrowserHost, type BrowserHostOptions } from "./host/browser-host.js";
|
|
13
|
-
export type { AgentDeepLinkSource, AppIdentity, ConnectIntent, ConnectTarget, HostClipboard, HostConnection, HostDialogs, HostFiles, HostLaunch, HostLinks, HostPdf, HostTimers, UploadSource, ViewableFile, WorkbenchHost, } from "./host/types.js";
|
|
13
|
+
export type { AgentDeepLinkSource, AppIdentity, ConnectIntent, ConnectTarget, DaemonEntryView, DaemonError, DaemonErrorCode, DaemonPatch, DaemonSettings, HostClipboard, HostConnection, HostDaemons, HostDialogs, HostFiles, HostLaunch, HostLinks, HostPdf, HostPreview, HostTimers, LocalDaemonState, NewDaemon, SaveTarget, UploadSource, ViewableFile, WorkbenchHost, } from "./host/types.js";
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a0 as e, a1 as o, a2 as r, a3 as t, a4 as n, a5 as i, a6 as c, a7 as l, a8 as S, a9 as g, aa as h, ab as b, ac as k, ad as u, ae as W } from "./chunks/index-
|
|
1
|
+
import { a0 as e, a1 as o, a2 as r, a3 as t, a4 as n, a5 as i, a6 as c, a7 as l, a8 as S, a9 as g, aa as h, ab as b, ac as k, ad as u, ae as W } from "./chunks/index-CitLJdIo.js";
|
|
2
2
|
export {
|
|
3
3
|
e as ConnectionBar,
|
|
4
4
|
o as OpenWorkspaceDialog,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the connection store keeps of a failed connection: the message to show, and the SDK's
|
|
3
|
+
* machine-readable reason when the failure came from the relay transport. The reason lets a caller
|
|
4
|
+
* react to a cause (a relay entry's `wrong_key` means its pairing link no longer matches) without
|
|
5
|
+
* parsing the message, which stays the one the SDK wrote.
|
|
6
|
+
*/
|
|
7
|
+
import { type RelayConnectReason } from "@av-pi-studio/client";
|
|
8
|
+
export interface ConnectFailure {
|
|
9
|
+
error: string;
|
|
10
|
+
/** Set only for a `RelayConnectError`; `null` for every other failure. */
|
|
11
|
+
errorReason: RelayConnectReason | null;
|
|
12
|
+
}
|
|
13
|
+
export declare function connectFailure(error: unknown): ConnectFailure;
|
|
14
|
+
//# sourceMappingURL=connect-failure.d.ts.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* (POC_TO_APP_PLAN_UI.md §4.1). The socket itself comes from the host
|
|
5
5
|
* (`host.connection.createTransport`); no workbench code outside the browser host builds one.
|
|
6
6
|
*/
|
|
7
|
-
import { DaemonClient, PiStudioClient, ReconnectionManager, type ConnectionState } from "@av-pi-studio/client";
|
|
7
|
+
import { DaemonClient, PiStudioClient, ReconnectionManager, type ConnectionState, type RelayConnectReason } from "@av-pi-studio/client";
|
|
8
8
|
import type { ServerInfoPayload } from "@av-pi-studio/protocol";
|
|
9
9
|
export interface ConnectOptions {
|
|
10
10
|
/**
|
|
@@ -24,6 +24,12 @@ interface ConnectionStoreState {
|
|
|
24
24
|
status: ConnectionState;
|
|
25
25
|
serverInfo: ServerInfoPayload | null;
|
|
26
26
|
error: string | null;
|
|
27
|
+
/**
|
|
28
|
+
* The SDK's reason code beside `error`, when the failure is a `RelayConnectError` (e.g.
|
|
29
|
+
* `wrong_key`: the pairing link does not match the daemon). `null` for every other failure and
|
|
30
|
+
* whenever `error` is `null`.
|
|
31
|
+
*/
|
|
32
|
+
errorReason: RelayConnectReason | null;
|
|
27
33
|
/** Non-null once `connect()` has ever succeeded — the live SDK handles. */
|
|
28
34
|
daemon: DaemonClient | null;
|
|
29
35
|
client: PiStudioClient | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which session the rename dialog is open for, if any. One global dialog instance
|
|
3
|
+
* (`features/sessions/RenameSessionDialog.tsx`); the session menu opens it, the dialog closes it.
|
|
4
|
+
*/
|
|
5
|
+
interface SessionRenameState {
|
|
6
|
+
/** The session being renamed, or `null` while the dialog is closed. */
|
|
7
|
+
sessionId: string | null;
|
|
8
|
+
open(sessionId: string): void;
|
|
9
|
+
close(): void;
|
|
10
|
+
}
|
|
11
|
+
export declare const useSessionRenameStore: import("zustand").UseBoundStore<import("zustand").StoreApi<SessionRenameState>>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=session-rename-store.d.ts.map
|