@lincyaw/dsh 0.1.0 → 0.2.0-rc.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/README.md +8 -4
- package/build/client.mjs +7 -1
- package/build/dist/client.js +1364 -64
- package/build/dist/client.json +225 -21
- package/build/ensure.mjs +11 -2
- package/cordis.patch.yml +9 -0
- package/entries/events.mjs +7 -0
- package/entries/load.mjs +11 -0
- package/entries/telemetry.mjs +7 -0
- package/entries/turns.mjs +7 -0
- package/package.json +32 -19
- package/src/client/RootLayout.tsx +332 -0
- package/src/client/agent-requests.ts +64 -0
- package/src/client/assistant-setup.tsx +185 -0
- package/src/client/author-settings.ts +57 -0
- package/src/client/brand.tsx +21 -14
- package/src/client/contract.ts +48 -1
- package/src/client/document-context.ts +39 -0
- package/src/client/dsh.d.ts +27 -1
- package/src/client/fallback.tsx +23 -19
- package/src/client/frame.css +280 -120
- package/src/client/index.tsx +72 -69
- package/src/client/launch-target.ts +89 -0
- package/src/client/layout.ts +90 -77
- package/src/client/mascot.tsx +37 -0
- package/src/client/messages.ts +142 -49
- package/src/client/{chrome.tsx → navigation-shell.tsx} +20 -25
- package/src/client/observable.ts +16 -0
- package/src/client/paths.ts +17 -0
- package/src/client/root-reload.ts +163 -0
- package/src/client/runtime-diagnostics.tsx +228 -0
- package/src/client/settings-opener.ts +26 -0
- package/src/client/{source.tsx → source-links.tsx} +16 -26
- package/src/client/speech-settings.tsx +7 -0
- package/src/client/styles.css +42 -0
- package/src/client/theme.ts +4 -2
- package/src/client/workbench-keys.ts +36 -0
- package/src/client/workspace-events.ts +114 -0
- package/src/node/bindings.ts +345 -0
- package/src/node/context.ts +131 -20
- package/src/node/{dsh.ts → dsh-types.ts} +33 -2
- package/src/node/fake-collector.ts +46 -0
- package/src/node/fake-model.ts +80 -0
- package/src/node/launch.ts +127 -10
- package/src/node/policy.ts +20 -23
- package/src/node/routes.ts +21 -11
- package/src/node/server-routes.ts +3 -0
- package/src/node/service.ts +58 -207
- package/src/node/skills.ts +9 -31
- package/src/node/telemetry.ts +126 -0
- package/src/node/tools.ts +34 -11
- package/src/node/{turns/index.ts → turns.ts} +48 -37
- package/src/node/workbench.ts +51 -6
- package/src/node/workspace-events.ts +167 -0
- package/src/node/workspaces.ts +2 -2
- package/src/workspace-events.ts +31 -0
- package/web.patch.yml +27 -56
- package/rows/load.mjs +0 -8
- package/rows/turns.mjs +0 -7
- package/skills/presmium-author/SKILL.md +0 -95
- package/skills/presmium-author/references/assistance.md +0 -27
- package/skills/presmium-author/references/code.md +0 -52
- package/skills/presmium-author/references/directives.md +0 -592
- package/skills/presmium-author/references/publishing.md +0 -60
- package/skills/presmium-author/references/writing.md +0 -72
- package/skills/presmium-present/SKILL.md +0 -69
- package/skills/presmium-present/references/classroom.md +0 -46
- package/skills/presmium-present/references/delivery.md +0 -63
- package/skills/presmium-present/references/lecture.md +0 -58
- package/src/client/Frame.tsx +0 -314
- /package/{rows → entries}/context.mjs +0 -0
- /package/{rows → entries}/policy.mjs +0 -0
- /package/{rows → entries}/routes.mjs +0 -0
- /package/{rows → entries}/service.mjs +0 -0
- /package/{rows → entries}/skills.mjs +0 -0
- /package/{rows → entries}/tools.mjs +0 -0
- /package/{rows → entries}/workbench.mjs +0 -0
- /package/{rows → entries}/workspaces.mjs +0 -0
package/README.md
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
# @lincyaw/dsh
|
|
2
2
|
|
|
3
|
-
Presmium's bundle for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (MIT): Presmium's workbench as a DeepSeek Harness distribution. Its host side keeps web sessions at the workspace root with read/write access throughout that directory. Selecting a lecture updates Presmium's document tools and context without changing the session or its working directory. It also provides Presmium's approval policy, authoring skills, and the workbench's data routes. Its client side (`./client`, precompiled) replaces DeepSeek Harness's layout with Presmium's (
|
|
3
|
+
Presmium's bundle for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (MIT): Presmium's workbench as a DeepSeek Harness distribution. Its host side keeps web sessions at the workspace root with read/write access throughout that directory. Selecting a lecture updates Presmium's document tools and context without changing the session or its working directory. It also provides Presmium's approval policy, authoring skills, and the workbench's data routes. Its client side (`./client`, precompiled) replaces DeepSeek Harness's layout with Presmium's (the documents, a document edited on its rendered page with comments and version history, the AI assistant docked at the right), maps its colours onto Presmium's and puts Presmium's brand in its places. Experimental (0.x): it follows one exact version of DeepSeek Harness, `0.2.1-alpha.4`.
|
|
4
4
|
|
|
5
|
-
Part of [Presmium](https://github.com/Lincyaw/presmium), which
|
|
5
|
+
Part of [Presmium](https://github.com/Lincyaw/presmium), which compiles canonical lecture.json teaching documents into web pages, slides, Jupyter notebooks and narrated playback.
|
|
6
6
|
|
|
7
7
|
## Usage
|
|
8
8
|
|
|
9
|
-
`presmium studio` installs and starts it; you do not add it yourself. A launcher of its own writes a profile with `@lincyaw/dsh/launch` (`writeProfile`), passes the patches `launchPatches(carrier)` returns with `--patch`, and sets `launchEnv(dshHome)`; with `PRESMIUM_SERVICE_URL` and `PRESMIUM_SERVICE_TOKEN`
|
|
9
|
+
`presmium studio` installs and starts it; you do not add it yourself. A launcher of its own writes a profile with `@lincyaw/dsh/launch` (`writeProfile`), passes the patches `launchPatches(carrier)` returns with `--patch`, and sets `launchEnv(dshHome)`; it can start the workspace service as studio does with `launchWorkspaceServer`. With `PRESMIUM_SERVICE_URL` and `PRESMIUM_SERVICE_TOKEN` the bundle uses that workspace service, otherwise it starts `presmium serve` itself in the same way.
|
|
10
|
+
|
|
11
|
+
To collect usage for analysis, set `PRESMIUM_TELEMETRY_URL` to your OTLP/HTTP logs endpoint (for example `http://collector:4318/v1/logs`) in the environment that starts the studio, with `PRESMIUM_TELEMETRY_HEADERS` (`key=value,…`, values URL-encoded) for its authorization and optionally `PRESMIUM_TELEMETRY_USER` as the resource's `user.id`. The bundle then exports every event of every session as `session-log` records, and the author's operations in the workbench as `presmium.workbench.<operation>` events; a request handed to the AI carries `dsh.request.id`, the id its user message carries in the session, which leads to the turn it started. Without the URL nothing is recorded or sent. DeepSeek Harness's own telemetry stays off.
|
|
10
12
|
|
|
11
13
|
In a checkout of the repository the client bundle is built when DeepSeek Harness starts and its sources are newer (`build/ensure.mjs`); `node build/client.mjs` builds it by hand, and packing the package (`prepack`) builds it for publishing.
|
|
12
14
|
|
|
@@ -16,7 +18,9 @@ Presmium provides one navigation shell and composes Harness's session browser an
|
|
|
16
18
|
|
|
17
19
|
## Documentation
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
Studio keeps the teaching workflow simple: describe a change, inspect its preview, select the relevant content and review the agent's edit. Full code editing can use the VS Code extension. Each agent step receives current document, focus and bounded browser feedback. `presmium__get_diagnostics` reads the same bounded diagnostic snapshot as the workbench without compiling; `presmium__check_document` explicitly runs compilation and plugin checks; `presmium__get_outputs` reads compiled recordings, and `presmium__get_runtime` reads reported browser failures, live code results and session resets. These reports are observations, not verification of newly edited source; rerun affected code after a change. No author window means no browser feedback is available.
|
|
22
|
+
|
|
23
|
+
- [Design of the workbench on DeepSeek Harness](https://github.com/Lincyaw/presmium/blob/main/docs/studio.md)
|
|
20
24
|
|
|
21
25
|
## License
|
|
22
26
|
|
package/build/client.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { renameSync, mkdirSync, writeFileSync } from 'node:fs'
|
|
2
|
+
import { chmodSync, renameSync, mkdirSync, writeFileSync } from 'node:fs'
|
|
3
3
|
import { join, relative } from 'node:path'
|
|
4
4
|
import { fileURLToPath, pathToFileURL } from 'node:url'
|
|
5
5
|
import { SHELL_MODULES } from '../src/client/contract.ts'
|
|
@@ -20,6 +20,9 @@ const noWoffFallback = {
|
|
|
20
20
|
function writeWhole(file, text) {
|
|
21
21
|
const temporary = `${file}.${process.pid}.${Date.now()}.tmp`
|
|
22
22
|
writeFileSync(temporary, text)
|
|
23
|
+
// Build outputs are public client assets shared by local source-checkout users.
|
|
24
|
+
// A private launcher umask must not make the bundle or its input manifest unreadable.
|
|
25
|
+
chmodSync(temporary, 0o644)
|
|
23
26
|
renameSync(temporary, file)
|
|
24
27
|
}
|
|
25
28
|
|
|
@@ -32,6 +35,7 @@ export async function buildClient() {
|
|
|
32
35
|
minify: true,
|
|
33
36
|
metafile: true,
|
|
34
37
|
absWorkingDir: PACKAGE,
|
|
38
|
+
conditions: ['style'],
|
|
35
39
|
loader: { '.woff2': 'dataurl' },
|
|
36
40
|
plugins: [noWoffFallback],
|
|
37
41
|
logLevel: 'warning',
|
|
@@ -49,6 +53,8 @@ export async function buildClient() {
|
|
|
49
53
|
legalComments: 'none',
|
|
50
54
|
metafile: true,
|
|
51
55
|
external: [...SHELL_MODULES],
|
|
56
|
+
// the mascot's sprite sheets travel inside the single client file
|
|
57
|
+
loader: { '.png': 'dataurl' },
|
|
52
58
|
define: { '__PRESMIUM_CSS__': JSON.stringify(css.outputFiles[0].text), 'process.env.NODE_ENV': '"production"' },
|
|
53
59
|
logLevel: 'warning',
|
|
54
60
|
})
|