@acryldev/workspace 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +61 -2
- package/cordis.patch.yml +3 -0
- package/lib/agents/argument-text.d.ts +9 -0
- package/lib/agents/catalog.d.ts +32 -0
- package/lib/agents/contract.d.ts +50 -0
- package/lib/agents/definition.d.ts +38 -0
- package/lib/agents/file-store.d.ts +7 -0
- package/lib/agents/known-agents.d.ts +52 -0
- package/lib/agents/launch.d.ts +26 -0
- package/lib/agents/preferences.d.ts +40 -0
- package/lib/agents/route.d.ts +10 -0
- package/lib/agents/settings.d.ts +28 -0
- package/lib/agents/status/agent-status.d.ts +38 -0
- package/lib/agents/status/claude-hooks.d.ts +18 -0
- package/lib/agents/status/route.d.ts +10 -0
- package/lib/capabilities/contract.d.ts +17 -0
- package/lib/capabilities/route.d.ts +8 -0
- package/lib/client.js +91109 -0
- package/lib/client.js.map +1 -0
- package/lib/files/contract.d.ts +74 -0
- package/lib/files/route.d.ts +9 -0
- package/lib/files/service.d.ts +48 -0
- package/lib/folder-picker/contract.d.ts +9 -0
- package/lib/folder-picker/picker.d.ts +23 -0
- package/lib/folder-picker/route.d.ts +5 -0
- package/lib/git/changes.d.ts +29 -0
- package/lib/git/checks.d.ts +8 -0
- package/lib/git/commits.d.ts +14 -0
- package/lib/git/contract.d.ts +136 -0
- package/lib/git/errors.d.ts +9 -0
- package/lib/git/guards.d.ts +9 -0
- package/lib/git/ignored.d.ts +9 -0
- package/lib/git/parsing.d.ts +13 -0
- package/lib/git/route.d.ts +9 -0
- package/lib/git/runner.d.ts +29 -0
- package/lib/git/search.d.ts +14 -0
- package/lib/git/service.d.ts +52 -0
- package/lib/git/worktrees.d.ts +26 -0
- package/lib/index.d.ts +39 -0
- package/lib/index.js +3799 -0
- package/lib/index.js.map +1 -0
- package/lib/private-route.d.ts +15 -0
- package/lib/projects/contract.d.ts +82 -0
- package/lib/projects/registry.d.ts +73 -0
- package/lib/projects/route.d.ts +16 -0
- package/lib/projects/tools.d.ts +24 -0
- package/lib/pty/contract.d.ts +52 -0
- package/lib/pty/node-pty-spawn.d.ts +3 -0
- package/lib/pty/route.d.ts +9 -0
- package/lib/pty/screen-model.d.ts +25 -0
- package/lib/pty/scrollback.d.ts +26 -0
- package/lib/pty/service.d.ts +156 -0
- package/lib/pty/stream.d.ts +19 -0
- package/lib/shared-context/chat.d.ts +34 -0
- package/lib/shared-context/launch.d.ts +24 -0
- package/lib/shared-context/render.d.ts +29 -0
- package/lib/shared-context/route.d.ts +13 -0
- package/lib/shared-context/service.d.ts +65 -0
- package/lib/shared-context/tool.d.ts +20 -0
- package/lib/types/agents/argument-text.d.ts +9 -0
- package/lib/types/agents/contract.d.ts +50 -0
- package/lib/types/agents/definition.d.ts +38 -0
- package/lib/types/agents/known-agents.d.ts +52 -0
- package/lib/types/agents/launch.d.ts +26 -0
- package/lib/types/agents/preferences.d.ts +40 -0
- package/lib/types/agents/status/agent-status.d.ts +38 -0
- package/lib/types/capabilities/contract.d.ts +17 -0
- package/lib/types/client/agents/AddAgentForm.d.ts +10 -0
- package/lib/types/client/agents/AgentRow.d.ts +11 -0
- package/lib/types/client/agents/AgentsSection.d.ts +14 -0
- package/lib/types/client/agents/acryl-logo-data.d.ts +3 -0
- package/lib/types/client/agents/agent-draft.d.ts +24 -0
- package/lib/types/client/agents/agents-api.d.ts +18 -0
- package/lib/types/client/agents/agents-section-model.d.ts +45 -0
- package/lib/types/client/agents/agents-settings-plugin.d.ts +8 -0
- package/lib/types/client/agents/agents-state.d.ts +26 -0
- package/lib/types/client/agents/controls.d.ts +40 -0
- package/lib/types/client/board/NoteColumn.d.ts +17 -0
- package/lib/types/client/board/SessionBoardPane.d.ts +16 -0
- package/lib/types/client/board/board-model.d.ts +36 -0
- package/lib/types/client/browser/BrowserPane.d.ts +28 -0
- package/lib/types/client/canvas/SplitDivider.d.ts +9 -0
- package/lib/types/client/canvas/WorkspaceCanvas.d.ts +78 -0
- package/lib/types/client/canvas/groups.d.ts +47 -0
- package/lib/types/client/canvas/persist.d.ts +17 -0
- package/lib/types/client/canvas/persistence.d.ts +78 -0
- package/lib/types/client/canvas/shell-requests.d.ts +16 -0
- package/lib/types/client/canvas/split-ratio.d.ts +12 -0
- package/lib/types/client/canvas/state.d.ts +181 -0
- package/lib/types/client/canvas/tab-title.d.ts +7 -0
- package/lib/types/client/capabilities/capabilities-api.d.ts +8 -0
- package/lib/types/client/changes/ChangesBody.d.ts +14 -0
- package/lib/types/client/changes/changes-tab.d.ts +20 -0
- package/lib/types/client/chat/chat-selection.d.ts +70 -0
- package/lib/types/client/chat/composer-focus.d.ts +16 -0
- package/lib/types/client/checks/ChecksBody.d.ts +9 -0
- package/lib/types/client/checks/checks-tab.d.ts +12 -0
- package/lib/types/client/chrome/StatusLine.d.ts +11 -0
- package/lib/types/client/chrome/panel-icons.d.ts +16 -0
- package/lib/types/client/chrome/status-line.d.ts +19 -0
- package/lib/types/client/chrome/worktree-agents.d.ts +13 -0
- package/lib/types/client/comments/CommentsBody.d.ts +24 -0
- package/lib/types/client/comments/comment-store.d.ts +38 -0
- package/lib/types/client/comments/comments-tab.d.ts +14 -0
- package/lib/types/client/comments/editor-comments.d.ts +6 -0
- package/lib/types/client/comments/terminal-targets.d.ts +35 -0
- package/lib/types/client/comments/use-comments.d.ts +27 -0
- package/lib/types/client/connection/session-banner.d.ts +51 -0
- package/lib/types/client/diff/GitDiffPane.d.ts +27 -0
- package/lib/types/client/diff/TextDiffPane.d.ts +6 -0
- package/lib/types/client/diff/comment-message.d.ts +29 -0
- package/lib/types/client/diff/diff-layout.d.ts +4 -0
- package/lib/types/client/diff/line-diff.d.ts +14 -0
- package/lib/types/client/diff/unified-diff.d.ts +31 -0
- package/lib/types/client/dock/DockButtons.d.ts +19 -0
- package/lib/types/client/dock/DockColumns.d.ts +21 -0
- package/lib/types/client/dock/DockDivider.d.ts +13 -0
- package/lib/types/client/dock/TerminalDockPanel.d.ts +13 -0
- package/lib/types/client/dock/dock-controller.d.ts +55 -0
- package/lib/types/client/dock/dock-hooks.d.ts +6 -0
- package/lib/types/client/dock/dock-host.d.ts +14 -0
- package/lib/types/client/dock/dock-icons.d.ts +10 -0
- package/lib/types/client/dock/dock-model.d.ts +35 -0
- package/lib/types/client/dock/dock-tabs.d.ts +72 -0
- package/lib/types/client/dock/terminal-stack.d.ts +19 -0
- package/lib/types/client/docs/DocFilePane.d.ts +12 -0
- package/lib/types/client/docs/DocPane.d.ts +6 -0
- package/lib/types/client/docs/DocView.d.ts +5 -0
- package/lib/types/client/docs/doc-format.d.ts +46 -0
- package/lib/types/client/dom/find-by-name.d.ts +18 -0
- package/lib/types/client/files/CodeEditor.d.ts +19 -0
- package/lib/types/client/files/FileBreadcrumbs.d.ts +15 -0
- package/lib/types/client/files/FileEditorPane.d.ts +12 -0
- package/lib/types/client/files/FileTree.d.ts +25 -0
- package/lib/types/client/files/FilesBody.d.ts +14 -0
- package/lib/types/client/files/ScratchFilePane.d.ts +6 -0
- package/lib/types/client/files/breadcrumbs.d.ts +18 -0
- package/lib/types/client/files/file-edit.d.ts +20 -0
- package/lib/types/client/files/file-icons.d.ts +17 -0
- package/lib/types/client/files/files-api.d.ts +26 -0
- package/lib/types/client/files/files-tab.d.ts +25 -0
- package/lib/types/client/files/line-comment.d.ts +26 -0
- package/lib/types/client/files/line-comments.d.ts +48 -0
- package/lib/types/client/files/tree-model.d.ts +60 -0
- package/lib/types/client/git/git-api.d.ts +35 -0
- package/lib/types/client/index.d.ts +28 -0
- package/lib/types/client/models/ModelConnect.d.ts +13 -0
- package/lib/types/client/models/model-connect.d.ts +145 -0
- package/lib/types/client/notifications/Toasts.d.ts +6 -0
- package/lib/types/client/notifications/system-notice.d.ts +19 -0
- package/lib/types/client/notifications/toast-state.d.ts +29 -0
- package/lib/types/client/palette/CommandPalette.d.ts +9 -0
- package/lib/types/client/palette/PalettePanel.d.ts +10 -0
- package/lib/types/client/palette/file-search.d.ts +9 -0
- package/lib/types/client/palette/fuzzy.d.ts +15 -0
- package/lib/types/client/palette/palette-commands.d.ts +64 -0
- package/lib/types/client/palette/palette-config.d.ts +21 -0
- package/lib/types/client/palette/palette-items.d.ts +40 -0
- package/lib/types/client/palette/palette-settings-plugin.d.ts +8 -0
- package/lib/types/client/palette/palette-shortcut.d.ts +10 -0
- package/lib/types/client/palette/palette-state.d.ts +68 -0
- package/lib/types/client/palette/use-workspace-palette.d.ts +39 -0
- package/lib/types/client/projects/NewWorkspaceDialog.d.ts +21 -0
- package/lib/types/client/projects/ProjectsSidebar.d.ts +39 -0
- package/lib/types/client/projects/RepoSection.d.ts +29 -0
- package/lib/types/client/projects/WorkspaceStrip.d.ts +14 -0
- package/lib/types/client/projects/projects-control.d.ts +119 -0
- package/lib/types/client/projects/registry-api.d.ts +22 -0
- package/lib/types/client/projects/registry-state.d.ts +67 -0
- package/lib/types/client/projects/shown-workspace.d.ts +19 -0
- package/lib/types/client/projects/sidebar-model.d.ts +113 -0
- package/lib/types/client/projects/upstream-panels.d.ts +54 -0
- package/lib/types/client/projects/web-folder-picker.d.ts +13 -0
- package/lib/types/client/review/ReviewBody.d.ts +9 -0
- package/lib/types/client/review/review-store.d.ts +46 -0
- package/lib/types/client/review/review-tab.d.ts +15 -0
- package/lib/types/client/sessions/agent-bridge.d.ts +20 -0
- package/lib/types/client/sessions/main-session.d.ts +24 -0
- package/lib/types/client/sessions/running-agents.d.ts +9 -0
- package/lib/types/client/sessions/session-client.d.ts +22 -0
- package/lib/types/client/sessions/session-navigation.d.ts +63 -0
- package/lib/types/client/sessions/session-pick.d.ts +15 -0
- package/lib/types/client/settings/locales.d.ts +5 -0
- package/lib/types/client/settings/open-settings.d.ts +37 -0
- package/lib/types/client/settings/section-plugin.d.ts +39 -0
- package/lib/types/client/settings/styles.d.ts +3 -0
- package/lib/types/client/shared-context/BriefTab.d.ts +21 -0
- package/lib/types/client/shared-context/brief-api.d.ts +9 -0
- package/lib/types/client/status/agent-status-api.d.ts +10 -0
- package/lib/types/client/status/agent-status-state.d.ts +27 -0
- package/lib/types/client/status/attention-model.d.ts +20 -0
- package/lib/types/client/styles.d.ts +2 -0
- package/lib/types/client/tabs/AgentIcon.d.ts +12 -0
- package/lib/types/client/tabs/NewTabMenu.d.ts +42 -0
- package/lib/types/client/tabs/TabActivity.d.ts +7 -0
- package/lib/types/client/tabs/TabStrip.d.ts +53 -0
- package/lib/types/client/tabs/TabsPanel.d.ts +14 -0
- package/lib/types/client/tabs/agent-marks.d.ts +9 -0
- package/lib/types/client/tabs/agent-visibility.d.ts +11 -0
- package/lib/types/client/tabs/last-tab.d.ts +15 -0
- package/lib/types/client/tabs/registry/CustomTabPane.d.ts +13 -0
- package/lib/types/client/tabs/registry/provide.d.ts +11 -0
- package/lib/types/client/tabs/registry/tab-registry.d.ts +52 -0
- package/lib/types/client/tabs/tab-close.d.ts +4 -0
- package/lib/types/client/tabs/tab-scroll.d.ts +19 -0
- package/lib/types/client/tabs/tab-types-state.d.ts +24 -0
- package/lib/types/client/tabs/tabs-settings-plugin.d.ts +9 -0
- package/lib/types/client/terminal/PtyPane.d.ts +8 -0
- package/lib/types/client/terminal/TerminalSearchBar.d.ts +7 -0
- package/lib/types/client/terminal/agent-commands.d.ts +15 -0
- package/lib/types/client/terminal/gpu-renderer.d.ts +10 -0
- package/lib/types/client/terminal/pty-api.d.ts +21 -0
- package/lib/types/client/terminal/pty-stream.d.ts +46 -0
- package/lib/types/client/terminal/terminal-links.d.ts +9 -0
- package/lib/types/client/terminal/terminal-search.d.ts +18 -0
- package/lib/types/client/terminal/terminal-session.d.ts +105 -0
- package/lib/types/client/terminal/terminal-size.d.ts +7 -0
- package/lib/types/client/ui.d.ts +18 -0
- package/lib/types/client/worktrees/shell-polling.d.ts +10 -0
- package/lib/types/client/worktrees/shell-state.d.ts +200 -0
- package/lib/types/files/contract.d.ts +74 -0
- package/lib/types/folder-picker/contract.d.ts +9 -0
- package/lib/types/git/contract.d.ts +136 -0
- package/lib/types/projects/contract.d.ts +82 -0
- package/lib/types/pty/contract.d.ts +52 -0
- package/lib/ui.js +12735 -0
- package/lib/ui.js.map +1 -0
- package/package.json +147 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 WebBoxes s.r.o.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,62 @@
|
|
|
1
|
-
#
|
|
1
|
+
# acryl-workspace
|
|
2
|
+
|
|
3
|
+
ACRYL's first-party workspace shell (spec `040-agentic-multiplexer-ade`): a Projects and Chats left pane, a
|
|
4
|
+
tabbed canvas per git worktree with an optional split, and a right panel (Changes, Review, Checks, Files).
|
|
5
|
+
|
|
6
|
+
**One implementation for Web and Desktop.** The shell (frame, layout, slots) and the workspace live here and are
|
|
7
|
+
composed for both surfaces from one declaration in `acryl-harness-runtime`'s `coding-capabilities.ts`
|
|
8
|
+
(`workspace` and `advanced-shell`, `surfaces: ['desktop', 'web']`). Web always runs the ACRYL shell; Desktop
|
|
9
|
+
lets the user pick it or the stock frame. What differs is behind small seams: the platform (`shell/environment.ts`:
|
|
10
|
+
Electron marks the page URL, a plain page is `web`), native window chrome metrics (`shell/chrome-metrics.ts`, only
|
|
11
|
+
Electron platforms reserve space), and adding a project (`projects/projects-control.ts`: Desktop's window folder
|
|
12
|
+
picker on Windows, otherwise the upstream Add workspace flow, which browses the server's folders on Web).
|
|
13
|
+
Nothing here may import Electron or a Desktop-only service.
|
|
14
|
+
|
|
15
|
+
## Code layout
|
|
16
|
+
|
|
17
|
+
Folders are named after the domain concept they own, not after a technical layer (see the engineering
|
|
18
|
+
standards in the repository `CLAUDE.md`). Each folder holds its model, its UI and its tests' vocabulary.
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
src/ Host half (Node)
|
|
22
|
+
index.ts builds the services, mounts their routes on the router (one prefix, /api/acryl-workspace), owns their disposal
|
|
23
|
+
private-route.ts what every route shares: the own-page guard, private headers, body limit, the composed app (privateApi)
|
|
24
|
+
git/ read-only git and one worktree-creating route: service, route, contract, checks
|
|
25
|
+
files/ confined browse, read and atomic save of files inside a worktree: service, route, contract
|
|
26
|
+
pty/ terminal processes: service, route, contract
|
|
27
|
+
client/ Client half (browser)
|
|
28
|
+
index.ts composition root: wires the panes and tab plugins into the advanced shell
|
|
29
|
+
styles.ts all CSS of the package
|
|
30
|
+
shell/ the ACRYL frame shared by Web and Desktop: slots, layout state and service, theme, environment
|
|
31
|
+
board/ the Kanban tile: chats by phase (Ready, Running, Done) from the live session list, plus local notes
|
|
32
|
+
docs/ markdown parser and renderer; the read-only, live-updating Doc tab for a real file
|
|
33
|
+
canvas/ the tab canvas: tiles, per-worktree groups, split, persistence
|
|
34
|
+
worktrees/ the shared worktree shell state (selection, status, polling)
|
|
35
|
+
projects/ the Projects left pane and its control
|
|
36
|
+
sessions/ chat sessions: picking, navigating, sending a message to the agent
|
|
37
|
+
terminal/ terminal client and agent launch commands
|
|
38
|
+
git/ typed client for the git routes
|
|
39
|
+
changes/ right-panel Changes tab
|
|
40
|
+
diff/ unified diff view, line comments, diff parsing
|
|
41
|
+
review/ right-panel Review tab and the comment bookkeeping
|
|
42
|
+
checks/ right-panel Checks tab
|
|
43
|
+
files/ right-panel Files tab and the CodeMirror editor tab (drafts, save, conflict handling)
|
|
44
|
+
tests/ mirrors src/ by domain
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Rules of thumb: a new feature gets its own domain folder; the Host contract for a feature sits in the same
|
|
48
|
+
domain folder as its service and is imported by the Client (one shape, validated at the boundary); nothing
|
|
49
|
+
here depends on `apps/`.
|
|
50
|
+
|
|
51
|
+
## Editor
|
|
52
|
+
|
|
53
|
+
The editor tab is CodeMirror 6 (MIT). Syntax highlighting for the file's language loads on demand from
|
|
54
|
+
`@codemirror/language-data`, which covers the major languages. The Module Loader evaluates a single
|
|
55
|
+
`client.js`, so the build inlines those on-demand packs (`inlineDynamicImports` in `tsdown.config.ts`); that
|
|
56
|
+
makes `client.js` about 3.3 MB. If size ever matters, replace `language-data` with a curated list of language
|
|
57
|
+
packages.
|
|
58
|
+
|
|
59
|
+
Saving is the only place this package writes user files. The Host confines every path to a git worktree root
|
|
60
|
+
(relative, no `..` or `.git` segments, real path inside the worktree), refuses files over 2 MB, writes through a
|
|
61
|
+
temp file and rename, and answers 409 when the file changed on disk since it was read.
|
|
2
62
|
|
|
3
|
-
This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Arguments as a person types them on one line, and back. `--model "big one" -v` is three arguments.
|
|
3
|
+
* Pure text handling shared by the page (the field) and its tests; nothing here runs a shell, and the
|
|
4
|
+
* Host still receives an argument array.
|
|
5
|
+
*/
|
|
6
|
+
/** @throws Error when a quote is left open. */
|
|
7
|
+
export declare function splitArguments(text: string): string[];
|
|
8
|
+
/** The inverse of {@link splitArguments}: quotes only the arguments that need it. */
|
|
9
|
+
export declare function joinArguments(args: readonly string[]): string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The user's custom agents: the use cases (list, add, remove, resolve) over a store.
|
|
3
|
+
*
|
|
4
|
+
* The store and the check that a command really exists are ports, so these rules run with no disk and no
|
|
5
|
+
* process table. The catalog is the only source of custom agents; a worktree can never contribute one.
|
|
6
|
+
*/
|
|
7
|
+
import type { AgentLaunch } from './launch.ts';
|
|
8
|
+
import { type CustomAgent } from './definition.ts';
|
|
9
|
+
/** Where the definitions are kept (a file in the user's own ACRYL home). */
|
|
10
|
+
export interface CatalogStore {
|
|
11
|
+
/** @returns the stored JSON text, or null when nothing was stored yet. */
|
|
12
|
+
read(): Promise<string | null>;
|
|
13
|
+
write(text: string): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
/** Answers whether a command names a real executable on this machine (it may wait for the login shell's search path). */
|
|
16
|
+
export type CommandExists = (command: string) => Promise<boolean>;
|
|
17
|
+
export declare class AgentCatalog {
|
|
18
|
+
private readonly store;
|
|
19
|
+
private readonly commandExists;
|
|
20
|
+
private agents;
|
|
21
|
+
private loaded;
|
|
22
|
+
constructor(store: CatalogStore, commandExists: CommandExists);
|
|
23
|
+
/** Read the stored definitions; a damaged file is ignored (built-in agents keep working). */
|
|
24
|
+
load(): Promise<void>;
|
|
25
|
+
list(): readonly CustomAgent[];
|
|
26
|
+
/** @returns what to launch for a custom agent id, or undefined when the id is not one. */
|
|
27
|
+
resolve(id: string): AgentLaunch | undefined;
|
|
28
|
+
/** @throws AgentDefinitionError for an invalid, duplicate, or unrunnable definition. */
|
|
29
|
+
add(raw: unknown): Promise<CustomAgent>;
|
|
30
|
+
/** Idempotent. */
|
|
31
|
+
remove(id: string): Promise<void>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/** Loopback routes and JSON shapes for the custom agent catalog. */
|
|
2
|
+
import { type CustomAgent } from './definition.ts';
|
|
3
|
+
/** GET the catalog; POST `{ agent }` to add one. */
|
|
4
|
+
export declare const WORKSPACE_AGENTS_PATH = "/api/acryl-workspace/agents";
|
|
5
|
+
/** POST `{ id }` to remove one. */
|
|
6
|
+
export declare const WORKSPACE_AGENTS_REMOVE_PATH = "/api/acryl-workspace/agents/remove";
|
|
7
|
+
export interface AgentsView {
|
|
8
|
+
readonly agents: readonly CustomAgent[];
|
|
9
|
+
}
|
|
10
|
+
/** @param value - unknown JSON from the agents routes. */
|
|
11
|
+
export declare function parseAgentsView(value: unknown): AgentsView;
|
|
12
|
+
/** GET the settings view; POST a {@link PreferencesPatch} to change one thing. Both answer with the whole view. */
|
|
13
|
+
export declare const WORKSPACE_AGENT_SETTINGS_PATH = "/api/acryl-workspace/agents/settings";
|
|
14
|
+
/** One row of Settings > Agents. */
|
|
15
|
+
export interface AgentSettingsEntry {
|
|
16
|
+
readonly id: string;
|
|
17
|
+
readonly label: string;
|
|
18
|
+
readonly kind: 'known' | 'custom';
|
|
19
|
+
/** The agent's install page (known agents only). */
|
|
20
|
+
readonly homepageUrl: string | null;
|
|
21
|
+
/** The executable the agent ships with. */
|
|
22
|
+
readonly defaultCommand: string;
|
|
23
|
+
/** What runs: the user's replacement when set, otherwise {@link defaultCommand}. */
|
|
24
|
+
readonly command: string;
|
|
25
|
+
/** The user's extra arguments (known agents), or the definition's own arguments (custom agents). */
|
|
26
|
+
readonly args: readonly string[];
|
|
27
|
+
/** What the permission mode adds right now. */
|
|
28
|
+
readonly permissionArgs: readonly string[];
|
|
29
|
+
readonly permissionEnv: Readonly<Record<string, string>>;
|
|
30
|
+
readonly enabled: boolean;
|
|
31
|
+
/** The executable was found on this machine. */
|
|
32
|
+
readonly installed: boolean;
|
|
33
|
+
/** The exact command line a new tab runs. */
|
|
34
|
+
readonly preview: string;
|
|
35
|
+
/** Custom agents only: the badge chosen when it was added. */
|
|
36
|
+
readonly badge: {
|
|
37
|
+
readonly letter: string;
|
|
38
|
+
readonly color: string;
|
|
39
|
+
} | null;
|
|
40
|
+
}
|
|
41
|
+
export interface AgentSettingsView {
|
|
42
|
+
readonly permissions: 'yolo' | 'manual';
|
|
43
|
+
/** `auto`, `none`, or the id of an existing agent. */
|
|
44
|
+
readonly defaultAgent: string;
|
|
45
|
+
/** Agents that support hooks report working, waiting and done (the attention queue). */
|
|
46
|
+
readonly statusHooks: boolean;
|
|
47
|
+
readonly agents: readonly AgentSettingsEntry[];
|
|
48
|
+
}
|
|
49
|
+
/** @param value - unknown JSON from the settings route. */
|
|
50
|
+
export declare function parseAgentSettingsView(value: unknown): AgentSettingsView;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A custom coding agent: something the user added to the "+" menu. Pure rules, shared by the Host (which
|
|
3
|
+
* enforces them) and the page (which uses the same rules to explain a refusal before asking).
|
|
4
|
+
*
|
|
5
|
+
* The Host starts an agent only by its id from the catalog, so what a definition may contain is the whole
|
|
6
|
+
* safety story: a bare executable name or absolute path, an argument list that never goes through a shell,
|
|
7
|
+
* and nothing else. See `specs/040-agentic-multiplexer-ade/design-phase-9.md`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const MAX_CUSTOM_AGENTS = 32;
|
|
10
|
+
export declare const MAX_AGENT_ARGS = 16;
|
|
11
|
+
export declare const MAX_AGENT_ARG_LENGTH = 200;
|
|
12
|
+
export declare const MAX_AGENT_LABEL = 40;
|
|
13
|
+
/** The colours a badge may use, so a definition can never carry arbitrary CSS. */
|
|
14
|
+
export declare const BADGE_COLORS: readonly ["#94a3b8", "#d97757", "#10a37f", "#4285f4", "#a78bfa", "#34d399", "#f59e0b", "#ef4444", "#38bdf8", "#fb923c"];
|
|
15
|
+
export interface AgentBadge {
|
|
16
|
+
readonly letter: string;
|
|
17
|
+
readonly color: (typeof BADGE_COLORS)[number];
|
|
18
|
+
}
|
|
19
|
+
export interface CustomAgent {
|
|
20
|
+
readonly id: string;
|
|
21
|
+
readonly label: string;
|
|
22
|
+
/** An absolute path, or a bare executable name found on the Host's PATH. */
|
|
23
|
+
readonly command: string;
|
|
24
|
+
/** Passed as an argument array to the process; never interpreted by a shell. */
|
|
25
|
+
readonly args: readonly string[];
|
|
26
|
+
readonly badge: AgentBadge;
|
|
27
|
+
}
|
|
28
|
+
/** Thrown for a definition that breaks a rule; the message is fit to show the user. */
|
|
29
|
+
export declare class AgentDefinitionError extends Error {
|
|
30
|
+
constructor(message: string);
|
|
31
|
+
}
|
|
32
|
+
export declare function isBuiltinAgentId(id: string): boolean;
|
|
33
|
+
/** @param value - untrusted JSON. @returns a command that is an absolute path or a bare program name. @throws AgentDefinitionError. */
|
|
34
|
+
export declare function parseAgentCommand(value: unknown): string;
|
|
35
|
+
/** @param value - untrusted JSON; absent means no arguments. @throws AgentDefinitionError. */
|
|
36
|
+
export declare function parseAgentArgs(value: unknown): readonly string[];
|
|
37
|
+
/** @param value - untrusted JSON. @throws AgentDefinitionError with a user-facing message. */
|
|
38
|
+
export declare function parseCustomAgent(value: unknown): CustomAgent;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** The catalog's file in the user's ACRYL home, written atomically. */
|
|
2
|
+
import type { CatalogStore } from './catalog.ts';
|
|
3
|
+
/** The catalog file in the app's ACRYL home (from the `appInstance` service: this package never looks up a home itself). */
|
|
4
|
+
export declare function agentsFile(appHome: string): string;
|
|
5
|
+
/** The preferences file, next to the catalog. */
|
|
6
|
+
export declare function agentSettingsFile(appHome: string): string;
|
|
7
|
+
export declare function createFileCatalogStore(path: string): CatalogStore;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The coding agents ACRYL knows by name: what to run, which flags mean "do not ask me", and where to install
|
|
3
|
+
* them. This is the single source for the "+" menu, the launcher and Settings > Agents; the closed list of
|
|
4
|
+
* ids is also the Host's allowlist of what a terminal tab may start.
|
|
5
|
+
*
|
|
6
|
+
* The launch commands, permission flags and install pages follow the public documentation of each agent
|
|
7
|
+
* (the shape of the list is inspired by Orca's agent catalog, MIT licensed).
|
|
8
|
+
*/
|
|
9
|
+
/** The permission mode a launch uses. `yolo` adds the agent's own "skip approvals" flags; `manual` adds none. */
|
|
10
|
+
export type PermissionMode = 'yolo' | 'manual';
|
|
11
|
+
export interface KnownAgent {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly label: string;
|
|
14
|
+
/** The executable looked up on PATH. */
|
|
15
|
+
readonly command: string;
|
|
16
|
+
/** Added to a launch in `yolo` mode, one argument per entry. */
|
|
17
|
+
readonly yoloArgs: readonly string[];
|
|
18
|
+
/** Environment added to a launch in `yolo` mode. */
|
|
19
|
+
readonly yoloEnv?: Readonly<Record<string, string>>;
|
|
20
|
+
/** Where the agent's install instructions live. */
|
|
21
|
+
readonly homepageUrl: string;
|
|
22
|
+
/** How this agent reports what it is doing, when it can (hooks): its own launch settings carry the reporting. */
|
|
23
|
+
readonly statusHooks?: 'claude';
|
|
24
|
+
/** The letter and colour of its tab icon when no drawn mark exists. */
|
|
25
|
+
readonly badge: {
|
|
26
|
+
readonly letter: string;
|
|
27
|
+
readonly color: string;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/** In the order the lists show them. Ids of agents that shipped earlier keep their spelling. */
|
|
31
|
+
export declare const KNOWN_AGENTS: readonly [{
|
|
32
|
+
readonly statusHooks: "claude";
|
|
33
|
+
readonly id: string;
|
|
34
|
+
readonly label: string;
|
|
35
|
+
/** The executable looked up on PATH. */
|
|
36
|
+
readonly command: string;
|
|
37
|
+
/** Added to a launch in `yolo` mode, one argument per entry. */
|
|
38
|
+
readonly yoloArgs: readonly string[];
|
|
39
|
+
/** Environment added to a launch in `yolo` mode. */
|
|
40
|
+
readonly yoloEnv?: Readonly<Record<string, string>>;
|
|
41
|
+
/** Where the agent's install instructions live. */
|
|
42
|
+
readonly homepageUrl: string;
|
|
43
|
+
/** The letter and colour of its tab icon when no drawn mark exists. */
|
|
44
|
+
readonly badge: {
|
|
45
|
+
readonly letter: string;
|
|
46
|
+
readonly color: string;
|
|
47
|
+
};
|
|
48
|
+
}, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent, KnownAgent];
|
|
49
|
+
export type KnownAgentId = (typeof KNOWN_AGENTS)[number]['id'];
|
|
50
|
+
export declare const KNOWN_AGENT_IDS: readonly KnownAgentId[];
|
|
51
|
+
/** @returns the known agent with this id, or undefined (a custom agent, the terminal, or nothing). */
|
|
52
|
+
export declare function knownAgent(id: string): KnownAgent | undefined;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a terminal tab actually runs for an agent: the command, the arguments and the environment, from the
|
|
3
|
+
* agent's own definition, the user's overrides and the permission mode. Pure: no disk, no process table.
|
|
4
|
+
*/
|
|
5
|
+
import type { KnownAgent, PermissionMode } from './known-agents.ts';
|
|
6
|
+
/** What the user changed for one agent in Settings. */
|
|
7
|
+
export interface AgentOverride {
|
|
8
|
+
/** Listed in the "+" menu. Off hides it; it can still be opened from an existing tab. */
|
|
9
|
+
readonly enabled: boolean;
|
|
10
|
+
/** Replaces the agent's own executable (an absolute path or a bare name). */
|
|
11
|
+
readonly command?: string;
|
|
12
|
+
/** Added after the permission flags, one argument per entry. */
|
|
13
|
+
readonly args: readonly string[];
|
|
14
|
+
}
|
|
15
|
+
export declare const DEFAULT_OVERRIDE: AgentOverride;
|
|
16
|
+
export interface AgentLaunch {
|
|
17
|
+
readonly command: string;
|
|
18
|
+
readonly args: readonly string[];
|
|
19
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
20
|
+
/** This launch reports its state through hooks of this kind; the Host adds the reporting at start. */
|
|
21
|
+
readonly statusHooks?: 'claude';
|
|
22
|
+
}
|
|
23
|
+
/** @returns the launch for a known agent: `yolo` adds the agent's own skip-approvals flags first. */
|
|
24
|
+
export declare function planKnownLaunch(agent: KnownAgent, override: AgentOverride, mode: PermissionMode, statusHooks?: boolean): AgentLaunch;
|
|
25
|
+
/** The command line for a person to read, with any environment first (`GOOSE_MODE=auto goose`). */
|
|
26
|
+
export declare function describeLaunch(launch: AgentLaunch): string;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The user's agent preferences: the permission mode, the default agent, and per-agent overrides. Pure rules for
|
|
3
|
+
* reading the stored file and for applying one change at a time; the file itself is a port (`file-store.ts`).
|
|
4
|
+
*/
|
|
5
|
+
import { type AgentOverride } from './launch.ts';
|
|
6
|
+
import type { PermissionMode } from './known-agents.ts';
|
|
7
|
+
/** `auto`: follow what was opened last. `none`: a blank terminal. Otherwise an agent id. */
|
|
8
|
+
export type DefaultAgent = string;
|
|
9
|
+
export interface AgentPreferences {
|
|
10
|
+
readonly permissions: PermissionMode;
|
|
11
|
+
readonly defaultAgent: DefaultAgent;
|
|
12
|
+
readonly overrides: Readonly<Record<string, AgentOverride>>;
|
|
13
|
+
/** Agents that support hooks report working, waiting and done to ACRYL (the attention queue). */
|
|
14
|
+
readonly statusHooks: boolean;
|
|
15
|
+
}
|
|
16
|
+
/** Manual is the default: an agent that skips approvals is something the user turns on. */
|
|
17
|
+
export declare const DEFAULT_PREFERENCES: AgentPreferences;
|
|
18
|
+
/** @param value - the parsed stored JSON. A damaged file gives the defaults; one bad override is dropped. */
|
|
19
|
+
export declare function parseStoredPreferences(value: unknown): AgentPreferences;
|
|
20
|
+
/** One change from Settings. `command: null` clears the override. */
|
|
21
|
+
export interface PreferencesPatch {
|
|
22
|
+
readonly permissions?: PermissionMode;
|
|
23
|
+
readonly defaultAgent?: DefaultAgent;
|
|
24
|
+
readonly statusHooks?: boolean;
|
|
25
|
+
readonly agent?: {
|
|
26
|
+
readonly id: string;
|
|
27
|
+
readonly enabled?: boolean;
|
|
28
|
+
readonly command?: string | null;
|
|
29
|
+
readonly args?: readonly string[];
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/** @param value - untrusted JSON from the route. @throws AgentDefinitionError with a message fit to show. */
|
|
33
|
+
export declare function parsePreferencesPatch(value: unknown): PreferencesPatch;
|
|
34
|
+
/**
|
|
35
|
+
* @param current - the preferences now.
|
|
36
|
+
* @param patch - one validated change.
|
|
37
|
+
* @param isAgent - whether an id names an agent the Host knows (built in or custom).
|
|
38
|
+
* @throws AgentDefinitionError for an unknown agent.
|
|
39
|
+
*/
|
|
40
|
+
export declare function applyPreferencesPatch(current: AgentPreferences, patch: PreferencesPatch, isAgent: (id: string) => boolean): AgentPreferences;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** The custom agent catalog and the agent settings, for the app's own page only. */
|
|
2
|
+
import { Acryl } from 'acrylblends';
|
|
3
|
+
import { type ReportError } from '../private-route.ts';
|
|
4
|
+
import type { AgentCatalog } from './catalog.ts';
|
|
5
|
+
import type { AgentSettings } from './settings.ts';
|
|
6
|
+
/**
|
|
7
|
+
* GET `agents` (the catalog) and POST `agents` `{ agent }` to add one, a refusal being a 400 whose message says what to fix; POST `agents/remove`
|
|
8
|
+
* `{ id }` (idempotent); GET `agents/settings` (with a fresh check of which programs are installed) and POST one change, answered with the whole view.
|
|
9
|
+
*/
|
|
10
|
+
export declare function agentRoutes(catalog: AgentCatalog, settings: AgentSettings, reportError: ReportError): Acryl;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent settings: the preferences file plus everything a launch and Settings > Agents need from it.
|
|
3
|
+
*
|
|
4
|
+
* It answers three questions: what does this id run (`resolve`), what does Settings show (`view`), and what
|
|
5
|
+
* changed (`apply`). The file and the "is this program installed" check are ports, so all of it runs in a test
|
|
6
|
+
* with no disk and no process table. A custom agent is still defined only in the catalog; settings never adds one.
|
|
7
|
+
*/
|
|
8
|
+
import type { AgentCatalog, CatalogStore, CommandExists } from './catalog.ts';
|
|
9
|
+
import type { AgentSettingsView } from './contract.ts';
|
|
10
|
+
import { type AgentLaunch } from './launch.ts';
|
|
11
|
+
import { type PreferencesPatch } from './preferences.ts';
|
|
12
|
+
export declare class AgentSettings {
|
|
13
|
+
private readonly store;
|
|
14
|
+
private readonly catalog;
|
|
15
|
+
private readonly commandExists;
|
|
16
|
+
private preferences;
|
|
17
|
+
private loaded;
|
|
18
|
+
constructor(store: CatalogStore, catalog: Pick<AgentCatalog, 'list' | 'resolve'>, commandExists: CommandExists);
|
|
19
|
+
/** Read the stored preferences; a damaged file gives the defaults. */
|
|
20
|
+
load(): Promise<void>;
|
|
21
|
+
/** @returns what to run for an agent id (a known agent with the user's settings, or a custom agent), or undefined. */
|
|
22
|
+
resolve(id: string): AgentLaunch | undefined;
|
|
23
|
+
/** @throws AgentDefinitionError for an unknown agent or an invalid value. */
|
|
24
|
+
apply(patch: PreferencesPatch): Promise<AgentSettingsView>;
|
|
25
|
+
/** The list Settings shows: known agents first, then the user's own. Detection is fresh on every call. */
|
|
26
|
+
view(): Promise<AgentSettingsView>;
|
|
27
|
+
private isAgent;
|
|
28
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a terminal agent is doing right now, as the agent itself reports it (spec 040 T127).
|
|
3
|
+
*
|
|
4
|
+
* Reading this off the screen would be guessing, so the agents that support hooks tell ACRYL instead: Claude Code
|
|
5
|
+
* runs a small command on "prompt submitted", "tool finished", "needs you" and "turn finished", and that command
|
|
6
|
+
* posts the state here. The store keeps the latest state per terminal and only ever answers for terminals the Host
|
|
7
|
+
* still has.
|
|
8
|
+
*/
|
|
9
|
+
/** GET from the page: every live terminal's status. POST from an agent's hook: one report. */
|
|
10
|
+
export declare const WORKSPACE_AGENT_STATUS_PATH = "/api/acryl-workspace/agent-status";
|
|
11
|
+
export declare const AGENT_STATES: readonly ["working", "waiting", "done"];
|
|
12
|
+
/** `working`: busy. `waiting`: it needs you (a permission, a question). `done`: it finished its turn. */
|
|
13
|
+
export type AgentState = (typeof AGENT_STATES)[number];
|
|
14
|
+
export interface AgentStatus {
|
|
15
|
+
readonly terminalId: string;
|
|
16
|
+
readonly state: AgentState;
|
|
17
|
+
/** Milliseconds since the epoch when it was reported. */
|
|
18
|
+
readonly at: number;
|
|
19
|
+
}
|
|
20
|
+
export declare class AgentStatusError extends Error {
|
|
21
|
+
constructor(message: string);
|
|
22
|
+
}
|
|
23
|
+
/** @param body - untrusted JSON from a hook. @throws AgentStatusError. */
|
|
24
|
+
export declare function parseStatusReport(body: unknown): {
|
|
25
|
+
readonly terminal: string;
|
|
26
|
+
readonly state: AgentState;
|
|
27
|
+
};
|
|
28
|
+
export declare class AgentStatusStore {
|
|
29
|
+
private readonly isLive;
|
|
30
|
+
private readonly now;
|
|
31
|
+
private readonly statuses;
|
|
32
|
+
/** @param isLive - whether the Host still has a terminal with this id. @param now - the clock. */
|
|
33
|
+
constructor(isLive: (terminalId: string) => boolean, now?: () => number);
|
|
34
|
+
/** @returns false when no such terminal exists (a stale or forged report is ignored). */
|
|
35
|
+
report(terminalId: string, state: AgentState): boolean;
|
|
36
|
+
/** The latest status of every terminal that still exists; the others are forgotten here. */
|
|
37
|
+
list(): readonly AgentStatus[];
|
|
38
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The hook settings ACRYL adds to a Claude Code launch so Claude reports what it is doing.
|
|
3
|
+
*
|
|
4
|
+
* They travel as `--settings <json>`, which Claude merges with the user's own settings; nothing is written to the
|
|
5
|
+
* user's files. Each hook runs one `curl` to ACRYL's loopback status route. The secret and the terminal id are read
|
|
6
|
+
* from the environment ACRYL gives that terminal, never written into the JSON. A failing or slow hook is silent
|
|
7
|
+
* and can never block Claude (`-m 2`, `|| true`).
|
|
8
|
+
*/
|
|
9
|
+
/** The environment a status-reporting terminal is started with. */
|
|
10
|
+
export declare const STATUS_ENV: {
|
|
11
|
+
readonly terminal: "ACRYL_TERMINAL_ID";
|
|
12
|
+
readonly url: "ACRYL_STATUS_URL";
|
|
13
|
+
readonly token: "ACRYL_STATUS_TOKEN";
|
|
14
|
+
};
|
|
15
|
+
/** @returns the JSON text for `claude --settings`. */
|
|
16
|
+
export declare function claudeStatusSettings(): string;
|
|
17
|
+
/** The extra launch arguments for an agent that reports through hooks. */
|
|
18
|
+
export declare function statusHookArgs(kind: 'claude'): readonly string[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** The status route: agents POST what they are doing (bearer token, loopback only); the page GETs the list. */
|
|
2
|
+
import { Acryl } from 'acrylblends';
|
|
3
|
+
import { type ReportError } from '../../private-route.ts';
|
|
4
|
+
import { type AgentStatusStore } from './agent-status.ts';
|
|
5
|
+
/**
|
|
6
|
+
* GET (from the app's own page): every live terminal's latest status.
|
|
7
|
+
* POST (from an agent's hook, a program and not a page): `{ terminal, state }` with `Authorization: Bearer <token>`. The token is known only to
|
|
8
|
+
* terminals ACRYL started for agents, and the request must come from this machine to the app's own loopback address.
|
|
9
|
+
*/
|
|
10
|
+
export declare function agentStatusRoutes(token: string, store: AgentStatusStore, reportError: ReportError): Acryl;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** What the Host composition can do for the page, so the page offers only what will work. */
|
|
2
|
+
export declare const WORKSPACE_CAPABILITIES_PATH = "/api/acryl-workspace/capabilities";
|
|
3
|
+
export interface WorkspaceCapabilities {
|
|
4
|
+
/** The DeepSeek Harness chat (its agent) is running, so "AcrylDSH Chat" tabs can be opened and sent from. */
|
|
5
|
+
readonly chat: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Where the Host serves this app's own page, as a path on the frame's origin (`/app` in the ACRYL frame). Present only when the Host hosts an
|
|
8
|
+
* app: the frame then opens that page in a browser tile on first run, instead of an empty canvas.
|
|
9
|
+
*/
|
|
10
|
+
readonly appPage?: string;
|
|
11
|
+
/** The app's folder: the worktree the frame opens on first run, so the app and its chats share one tab set. */
|
|
12
|
+
readonly appRoot?: string;
|
|
13
|
+
/** The app's name, used as the tile's title (`my-app`), instead of the address's host. */
|
|
14
|
+
readonly appName?: string;
|
|
15
|
+
}
|
|
16
|
+
/** @throws when the body is not exactly the capabilities this page understands. */
|
|
17
|
+
export declare function parseWorkspaceCapabilities(value: unknown): WorkspaceCapabilities;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** What the running composition offers, for the app's own page only. */
|
|
2
|
+
import { Acryl } from 'acrylblends';
|
|
3
|
+
import { type WorkspaceCapabilities } from './contract.ts';
|
|
4
|
+
/**
|
|
5
|
+
* GET the capabilities. `read` is asked on every request, so a chat that was switched on or off in the Loader since the page loaded is
|
|
6
|
+
* reported as it is now: the truth is the composition, not a flag copied from a Blueprint.
|
|
7
|
+
*/
|
|
8
|
+
export declare function capabilityRoutes(read: () => WorkspaceCapabilities): Acryl;
|