@acryldev/workspace 0.2.2 → 0.2.3
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 +7 -0
- package/lib/client.js +21 -6
- package/lib/client.js.map +1 -1
- package/lib/index.js +11 -7
- package/lib/index.js.map +1 -1
- package/lib/types/agents/known-agents.d.ts +4 -0
- package/lib/types/client/models/ModelConnect.d.ts +3 -1
- package/lib/ui.js +5 -4
- package/lib/ui.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -12,6 +12,13 @@ Electron platforms reserve space), and adding a project (`projects/projects-cont
|
|
|
12
12
|
picker on Windows, otherwise the upstream Add workspace flow, which browses the server's folders on Web).
|
|
13
13
|
Nothing here may import Electron or a Desktop-only service.
|
|
14
14
|
|
|
15
|
+
**Hosted apps (WebBoxes.ai).** The Host half serves only where every request is held to the own-page rule: a loopback
|
|
16
|
+
Web server, or a Web server that listens beyond loopback (a hosted app's does, so its front can reach it) **and** whose
|
|
17
|
+
app has a trusted front, `ACRYL_PUBLIC_ORIGIN` plus `ACRYL_TRUSTED_PROXY`. Then every route and the terminal's socket
|
|
18
|
+
answer the front's public address and loopback, and nothing else: the peer must be the front's exact address, the `Host`
|
|
19
|
+
the public host, and the `Origin` that same public origin. A server beyond loopback with no front is refused at
|
|
20
|
+
activation. The front itself must only pass on a signed-in owner (a terminal is a shell as the person).
|
|
21
|
+
|
|
15
22
|
## Code layout
|
|
16
23
|
|
|
17
24
|
Folders are named after the domain concept they own, not after a technical layer (see the engineering
|
package/lib/client.js
CHANGED
|
@@ -267,13 +267,14 @@ window.__ModuleLoader__.load({
|
|
|
267
267
|
}
|
|
268
268
|
//#endregion
|
|
269
269
|
//#region src/agents/known-agents.ts
|
|
270
|
-
const agent = (id, label, command, homepageUrl, color, yoloArgs = [], yoloEnv) => ({
|
|
270
|
+
const agent = (id, label, command, homepageUrl, color, yoloArgs = [], yoloEnv, installCommand) => ({
|
|
271
271
|
id,
|
|
272
272
|
label,
|
|
273
273
|
command,
|
|
274
274
|
homepageUrl,
|
|
275
275
|
yoloArgs,
|
|
276
276
|
...yoloEnv === void 0 ? {} : { yoloEnv },
|
|
277
|
+
...installCommand === void 0 ? {} : { installCommand },
|
|
277
278
|
badge: {
|
|
278
279
|
letter: [...label][0]?.toUpperCase() ?? "?",
|
|
279
280
|
color
|
|
@@ -282,15 +283,15 @@ window.__ModuleLoader__.load({
|
|
|
282
283
|
/** In the order the lists show them. Ids of agents that shipped earlier keep their spelling. */
|
|
283
284
|
const KNOWN_AGENTS = [
|
|
284
285
|
{
|
|
285
|
-
...agent("claude", "Claude", "claude", "https://code.claude.com/docs", "#d97757", ["--dangerously-skip-permissions"]),
|
|
286
|
+
...agent("claude", "Claude", "claude", "https://code.claude.com/docs", "#d97757", ["--dangerously-skip-permissions"], void 0, "npm i -g @anthropic-ai/claude-code"),
|
|
286
287
|
statusHooks: "claude"
|
|
287
288
|
},
|
|
288
|
-
agent("codex", "Codex", "codex", "https://github.com/openai/codex", "#10a37f", ["--dangerously-bypass-approvals-and-sandbox"]),
|
|
289
|
+
agent("codex", "Codex", "codex", "https://github.com/openai/codex", "#10a37f", ["--dangerously-bypass-approvals-and-sandbox"], void 0, "npm i -g @openai/codex"),
|
|
289
290
|
agent("grok", "Grok", "grok", "https://x.ai/cli", "#94a3b8", ["--permission-mode", "bypassPermissions"]),
|
|
290
291
|
agent("copilot", "GitHub Copilot", "copilot", "https://docs.github.com/en/copilot/how-tos/set-up/install-copilot-cli", "#a78bfa", ["--yolo"]),
|
|
291
292
|
agent("opencode", "OpenCode", "opencode", "https://opencode.ai/docs/cli/", "#94a3b8"),
|
|
292
293
|
agent("ante", "Ante", "ante", "https://github.com/AntigmaLabs/ante-preview", "#fb923c", ["--yolo"]),
|
|
293
|
-
agent("pi", "Pi", "pi", "https://pi.dev", "#a78bfa"),
|
|
294
|
+
agent("pi", "Pi", "pi", "https://pi.dev", "#a78bfa", [], void 0, "npm i -g @earendil-works/pi-coding-agent"),
|
|
294
295
|
agent("omp", "OMP", "omp", "https://omp.sh", "#a78bfa"),
|
|
295
296
|
agent("gemini", "Gemini", "gemini", "https://github.com/google-gemini/gemini-cli", "#4285f4", ["--yolo"]),
|
|
296
297
|
agent("antigravity", "Antigravity", "agy", "https://antigravity.google/docs/cli-overview", "#4285f4", ["--dangerously-skip-permissions"]),
|
|
@@ -88284,14 +88285,28 @@ body [data-sidebar-right-guide] { flex: 1 1 auto; min-height: 0; overflow-y: aut
|
|
|
88284
88285
|
* The first-run card inside the chat surface: paste an API key, stored by DeepSeek Harness itself. Non-modal, in
|
|
88285
88286
|
* ACRYL's design, and dismissible; the Models settings page stays the place for every other provider.
|
|
88286
88287
|
*/
|
|
88288
|
+
/** Set on the page by the sign-in plugin's first-run dialog while it is open (plugins/sign-in, ConnectChoice.tsx); that dialog asks for the key itself. */
|
|
88289
|
+
const CONNECT_DIALOG_ATTRIBUTE = "data-acryl-connect-dialog";
|
|
88290
|
+
function watchConnectDialog(onChange) {
|
|
88291
|
+
const observer = new MutationObserver(onChange);
|
|
88292
|
+
observer.observe(document.documentElement, {
|
|
88293
|
+
attributes: true,
|
|
88294
|
+
attributeFilter: [CONNECT_DIALOG_ATTRIBUTE]
|
|
88295
|
+
});
|
|
88296
|
+
return () => {
|
|
88297
|
+
observer.disconnect();
|
|
88298
|
+
};
|
|
88299
|
+
}
|
|
88300
|
+
const connectDialogOpen = () => document.documentElement.hasAttribute(CONNECT_DIALOG_ATTRIBUTE);
|
|
88287
88301
|
/**
|
|
88288
88302
|
* @param props.control - the workspace's model-connection controller.
|
|
88289
|
-
* @returns the card while no model can serve a request, and nothing otherwise.
|
|
88303
|
+
* @returns the card while no model can serve a request and the first-run dialog is not open, and nothing otherwise.
|
|
88290
88304
|
*/
|
|
88291
88305
|
function ModelConnect({ control }) {
|
|
88292
88306
|
const state = (0, react.useSyncExternalStore)(control.subscribe, control.getSnapshot);
|
|
88307
|
+
const dialogOpen = (0, react.useSyncExternalStore)(watchConnectDialog, connectDialogOpen, () => false);
|
|
88293
88308
|
const [key, setKey] = (0, react.useState)("");
|
|
88294
|
-
if (state.status !== "needs-key") return null;
|
|
88309
|
+
if (state.status !== "needs-key" || dialogOpen) return null;
|
|
88295
88310
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
88296
88311
|
className: "dshWorkspaceConnect",
|
|
88297
88312
|
"aria-label": "Connect a model",
|