acryl-development-canvas 0.1.0
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 +58 -0
- package/cordis.patch.yml +3 -0
- package/docs/PLAN.md +40 -0
- package/lib/canvas-pty-contract.d.ts +17 -0
- package/lib/canvas-pty-route.d.ts +19 -0
- package/lib/canvas-pty.d.ts +82 -0
- package/lib/client.js +8071 -0
- package/lib/client.js.map +1 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.js +473 -0
- package/lib/index.js.map +1 -0
- package/lib/types/canvas-pty-contract.d.ts +17 -0
- package/lib/types/client/development-canvas/DevelopmentCanvas.d.ts +15 -0
- package/lib/types/client/development-canvas/agent-commands.d.ts +14 -0
- package/lib/types/client/development-canvas/pty-api.d.ts +13 -0
- package/lib/types/client/development-canvas/session-client.d.ts +22 -0
- package/lib/types/client/development-canvas/session-navigation.d.ts +12 -0
- package/lib/types/client/development-canvas/state.d.ts +65 -0
- package/lib/types/client/index.d.ts +23 -0
- package/lib/types/client/styles.d.ts +2 -0
- package/package.json +120 -0
- package/provenance.json +9 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/** In-memory Development Canvas tabs. Host PTY sessions bind through tab.sessionId. */
|
|
2
|
+
import type { CanvasPtyCommandId } from '../../canvas-pty-contract.ts';
|
|
3
|
+
export type CanvasTileKind = 'chat' | 'pty' | 'file' | 'browser';
|
|
4
|
+
export interface CanvasTile {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly kind: CanvasTileKind;
|
|
7
|
+
readonly title: string;
|
|
8
|
+
readonly commandId?: CanvasPtyCommandId;
|
|
9
|
+
readonly sessionId?: string;
|
|
10
|
+
readonly path?: string;
|
|
11
|
+
readonly content?: string;
|
|
12
|
+
readonly url?: string;
|
|
13
|
+
readonly error?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface DevelopmentCanvasSnapshot {
|
|
16
|
+
readonly tiles: readonly CanvasTile[];
|
|
17
|
+
readonly activeId: string | undefined;
|
|
18
|
+
readonly menuOpen: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface DevelopmentCanvasStateOptions {
|
|
21
|
+
readonly createId?: () => string;
|
|
22
|
+
}
|
|
23
|
+
export interface AddTileOptions {
|
|
24
|
+
readonly commandId?: CanvasPtyCommandId;
|
|
25
|
+
readonly title?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Observable tab workspace for one advanced-shell lifetime.
|
|
29
|
+
* One tab fills the main content area; "+" appends another tab.
|
|
30
|
+
*/
|
|
31
|
+
export declare class DevelopmentCanvasState {
|
|
32
|
+
private snapshot;
|
|
33
|
+
private readonly listeners;
|
|
34
|
+
private readonly createId;
|
|
35
|
+
constructor(options?: DevelopmentCanvasStateOptions);
|
|
36
|
+
/** @returns the immutable current canvas. */
|
|
37
|
+
getSnapshot(): DevelopmentCanvasSnapshot;
|
|
38
|
+
/** @param listener - notified after a snapshot replacement. @returns disposer. */
|
|
39
|
+
subscribe(listener: () => void): () => void;
|
|
40
|
+
/** Open or close the "+" menu. */
|
|
41
|
+
setMenuOpen(menuOpen: boolean): void;
|
|
42
|
+
/** Focus one existing tab. */
|
|
43
|
+
selectTile(id: string): void;
|
|
44
|
+
/**
|
|
45
|
+
* Append one tab and focus it. A second Chat tab is ignored.
|
|
46
|
+
* @param kind - tab kind from the "+" menu.
|
|
47
|
+
* @param options - PTY command / title overrides.
|
|
48
|
+
*/
|
|
49
|
+
addTile(kind: CanvasTileKind, options?: AddTileOptions): CanvasTile | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Remove one tab. Caller disposes a Host PTY when `sessionId` was set.
|
|
52
|
+
* @param id - tab id.
|
|
53
|
+
*/
|
|
54
|
+
closeTile(id: string): CanvasTile | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Merge kind-specific fields onto one tab.
|
|
57
|
+
* @param id - tab id.
|
|
58
|
+
* @param patch - fields to replace.
|
|
59
|
+
*/
|
|
60
|
+
updateTile(id: string, patch: Partial<Omit<CanvasTile, 'id' | 'kind'>>): void;
|
|
61
|
+
private createTile;
|
|
62
|
+
private replace;
|
|
63
|
+
}
|
|
64
|
+
/** @param url - address-bar text. */
|
|
65
|
+
export declare function normalizeBrowserUrl(url: string): string | undefined;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Context as ClientContext } from '@deepseek-ai/cordis';
|
|
2
|
+
import '@deepseek-ai/dsh-client-ui-renderer/client';
|
|
3
|
+
import '@deepseek-ai/dsh-client-ui-session/client';
|
|
4
|
+
import type { ReactNode } from 'react';
|
|
5
|
+
interface DesktopMainOwnerProps {
|
|
6
|
+
renderConversation(): ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
9
|
+
interface SlotMap {
|
|
10
|
+
'desktop.main': {
|
|
11
|
+
kind: 'single';
|
|
12
|
+
scope: 'root';
|
|
13
|
+
owner: DesktopMainOwnerProps;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export declare const name = "development-canvas-client";
|
|
18
|
+
export declare const inject: string[];
|
|
19
|
+
/** Contribute Canvas only while the Desktop main slot declaration is live. */
|
|
20
|
+
export declare function apply(ctx: ClientContext): void;
|
|
21
|
+
export { DevelopmentCanvas } from './development-canvas/DevelopmentCanvas.tsx';
|
|
22
|
+
export { CanvasPtyClient } from './development-canvas/session-client.ts';
|
|
23
|
+
export { DevelopmentCanvasState, normalizeBrowserUrl } from './development-canvas/state.ts';
|
package/package.json
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "acryl-development-canvas",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Standalone Cordis Development Canvas plugin for ACRYL",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/acryldev/acryl-development-canvas.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/acryldev/acryl-development-canvas#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/acryldev/acryl-development-canvas/issues"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"main": "lib/index.js",
|
|
16
|
+
"types": "lib/types/index.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./lib/types/index.d.ts",
|
|
20
|
+
"default": "./lib/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./client": {
|
|
23
|
+
"types": "./lib/types/client/index.d.ts",
|
|
24
|
+
"default": "./lib/client.js"
|
|
25
|
+
},
|
|
26
|
+
"./package.json": "./package.json"
|
|
27
|
+
},
|
|
28
|
+
"dsh": {
|
|
29
|
+
"bundle": {
|
|
30
|
+
"patch": "./cordis.patch.yml"
|
|
31
|
+
},
|
|
32
|
+
"client": {
|
|
33
|
+
"inject": [],
|
|
34
|
+
"platform": "web"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"cordis.patch.yml",
|
|
39
|
+
"lib/**",
|
|
40
|
+
"README.md",
|
|
41
|
+
"LICENSE",
|
|
42
|
+
"docs/",
|
|
43
|
+
"provenance.json"
|
|
44
|
+
],
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": "^22.19.0 || >=24.0.0"
|
|
47
|
+
},
|
|
48
|
+
"keywords": [
|
|
49
|
+
"acryl-package",
|
|
50
|
+
"cordis-plugin",
|
|
51
|
+
"dsh-plugin",
|
|
52
|
+
"development-canvas",
|
|
53
|
+
"pty",
|
|
54
|
+
"agent-workspace"
|
|
55
|
+
],
|
|
56
|
+
"scripts": {
|
|
57
|
+
"build": "node scripts/clean.mjs && tsdown && tsc -p tsconfig.json --emitDeclarationOnly && tsc -p tsconfig.client.json --emitDeclarationOnly",
|
|
58
|
+
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit && tsc -p tsconfig.tests.json --noEmit",
|
|
59
|
+
"test": "vitest run",
|
|
60
|
+
"check": "pnpm run build && pnpm run typecheck && pnpm run test",
|
|
61
|
+
"prepack": "pnpm run check"
|
|
62
|
+
},
|
|
63
|
+
"dependencies": {
|
|
64
|
+
"@xterm/addon-fit": "0.10.0",
|
|
65
|
+
"@xterm/xterm": "5.5.0",
|
|
66
|
+
"node-pty": "1.2.0-beta.15"
|
|
67
|
+
},
|
|
68
|
+
"peerDependencies": {
|
|
69
|
+
"@deepseek-ai/cordis": "4.0.1",
|
|
70
|
+
"@deepseek-ai/dsh-api-session-controller": "0.1.5-alpha.1",
|
|
71
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.1.5-alpha.1",
|
|
72
|
+
"@deepseek-ai/dsh-client-ui-session": "0.1.5-alpha.1",
|
|
73
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.5-alpha.1",
|
|
74
|
+
"@deepseek-ai/dsh-client-store": "0.1.5-alpha.1",
|
|
75
|
+
"@deepseek-ai/dsh-host-webserver": "0.1.5-alpha.1",
|
|
76
|
+
"@deepseek-ai/dsh-session": "0.1.5-alpha.1",
|
|
77
|
+
"react": "18.3.1"
|
|
78
|
+
},
|
|
79
|
+
"devDependencies": {
|
|
80
|
+
"@deepseek-ai/cordis": "4.0.1",
|
|
81
|
+
"@deepseek-ai/dsh-api-session-controller": "0.1.5-alpha.1",
|
|
82
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.1.5-alpha.1",
|
|
83
|
+
"@deepseek-ai/dsh-client-ui-session": "0.1.5-alpha.1",
|
|
84
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.5-alpha.1",
|
|
85
|
+
"@deepseek-ai/dsh-client-store": "0.1.5-alpha.1",
|
|
86
|
+
"@deepseek-ai/dsh-host-webserver": "0.1.5-alpha.1",
|
|
87
|
+
"@deepseek-ai/dsh-session": "0.1.5-alpha.1",
|
|
88
|
+
"@types/node": "^22.20.0",
|
|
89
|
+
"@types/react": "^18",
|
|
90
|
+
"react": "18.3.1",
|
|
91
|
+
"tsdown": "0.22.2",
|
|
92
|
+
"typescript": "6.0.3",
|
|
93
|
+
"vitest": "4.1.8"
|
|
94
|
+
},
|
|
95
|
+
"acryl": {
|
|
96
|
+
"schemaVersion": 1,
|
|
97
|
+
"artifacts": {
|
|
98
|
+
"plugins": [
|
|
99
|
+
"./lib/index.js",
|
|
100
|
+
"./lib/client.js"
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
"runtime": "cordis",
|
|
104
|
+
"compatibility": {
|
|
105
|
+
"acryl": ">=0.1.0 <1.0.0",
|
|
106
|
+
"node": "^22.19.0 || >=24.0.0",
|
|
107
|
+
"hosts": {
|
|
108
|
+
"@deepseek-ai/cordis": "4.0.1"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"capabilities": [
|
|
112
|
+
"development-canvas",
|
|
113
|
+
"pty-workspace",
|
|
114
|
+
"desktop-slot"
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
"publishConfig": {
|
|
118
|
+
"access": "public"
|
|
119
|
+
}
|
|
120
|
+
}
|
package/provenance.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extractedAt": "2026-09-09",
|
|
3
|
+
"acryl": {
|
|
4
|
+
"repository": "https://github.com/acryldev/acryl",
|
|
5
|
+
"sourcePackage": "acryl-development-canvas",
|
|
6
|
+
"sourcePath": "acryl-development-canvas/"
|
|
7
|
+
},
|
|
8
|
+
"strategy": "Copy-only extraction from the ACRYL workspace. The source package remains in ACRYL unchanged; this repository publishes the same Host and Client Cordis plugin as an independently installable package."
|
|
9
|
+
}
|