dsh-generative-ui 0.0.1 → 0.0.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.
Files changed (52) hide show
  1. package/README.md +17 -4
  2. package/lib/client.js +484 -98
  3. package/lib/client.js.map +19 -17
  4. package/lib/index.js +523 -34
  5. package/lib/types/card-failure.d.ts +88 -0
  6. package/lib/types/client/canvas/CanvasLauncher.d.ts +6 -0
  7. package/lib/types/client/canvas/CanvasPanel.d.ts +88 -0
  8. package/lib/types/client/canvas/collect.d.ts +45 -0
  9. package/lib/types/client/canvas/index.d.ts +43 -0
  10. package/lib/types/client/canvas/mount.d.ts +30 -0
  11. package/lib/types/client/canvas/panel-css.d.ts +1 -0
  12. package/lib/types/client/canvas/read.d.ts +12 -0
  13. package/lib/types/client/canvas/subpages.d.ts +20 -0
  14. package/lib/types/client/canvas/useDismissable.d.ts +15 -0
  15. package/lib/types/client/index.d.ts +20 -0
  16. package/lib/types/client/runtime/GenUISurface.d.ts +189 -0
  17. package/lib/types/client/runtime/bindings.d.ts +143 -0
  18. package/lib/types/client/runtime/compiler.d.ts +35 -0
  19. package/lib/types/client/runtime/inline-fence.d.ts +50 -0
  20. package/lib/types/client/runtime/observe.d.ts +30 -0
  21. package/lib/types/client/runtime/register.d.ts +2 -0
  22. package/lib/types/client/runtime/registry.d.ts +7 -0
  23. package/lib/types/client/runtime/report-error.d.ts +64 -0
  24. package/lib/types/client/runtime/segments.d.ts +18 -0
  25. package/lib/types/client/runtime/state.d.ts +18 -0
  26. package/lib/types/client/runtime/uno-config.d.ts +16 -0
  27. package/lib/types/client/runtime/uno.d.ts +50 -0
  28. package/lib/types/client/session.d.ts +26 -0
  29. package/lib/types/contract-assets.d.ts +51 -0
  30. package/lib/types/contract.d.ts +56 -0
  31. package/lib/types/index.d.ts +298 -0
  32. package/lib/types/prompt.d.ts +13 -0
  33. package/lib/types/skill.d.ts +27 -0
  34. package/package.json +8 -4
  35. package/src/card-failure.ts +106 -0
  36. package/src/client/canvas/CanvasPanel.tsx +10 -4
  37. package/src/client/canvas/index.ts +1 -1
  38. package/src/client/index.ts +22 -9
  39. package/src/client/runtime/GenUISurface.tsx +172 -48
  40. package/src/client/runtime/bindings.ts +3 -2
  41. package/src/client/runtime/compiler.ts +24 -2
  42. package/src/client/runtime/inline-fence.ts +185 -8
  43. package/src/client/runtime/register.ts +16 -4
  44. package/src/client/runtime/report-error.ts +89 -34
  45. package/src/client/runtime/state.ts +13 -1
  46. package/src/client/runtime/uno-config.ts +13 -0
  47. package/src/client/session.ts +10 -3
  48. package/src/contract-assets.ts +11 -0
  49. package/src/index.ts +113 -10
  50. package/src/prompt.ts +154 -10
  51. package/src/skill.ts +296 -22
  52. package/types/fs.d.ts +15 -1
package/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # dsh-generative-ui
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/dsh-generative-ui)](https://www.npmjs.com/package/dsh-generative-ui)
3
4
  [![pkg.pr.new](https://pkg.pr.new/badge/CNSeniorious000/dsh-generative-ui)](https://pkg.pr.new/~/CNSeniorious000/dsh-generative-ui)
4
5
  [![MIT](https://img.shields.io/badge/license-MIT-blue)](./LICENSE)
5
6
 
@@ -16,20 +17,27 @@ The `ui4a` in that fence is the harness this implements — **UI for Agent**, fr
16
17
 
17
18
  ## Install
18
19
 
19
- **Not on npm yet**, so install the preview build published on every push:
20
+ ```sh
21
+ dsh plugin --profile web add dsh-generative-ui
22
+ ```
23
+
24
+ Every release is published from CI over OIDC, so the tarball carries npm provenance. For an
25
+ unreleased commit there is a preview build of every push:
20
26
 
21
27
  ```sh
22
28
  dsh plugin --profile web add https://pkg.pr.new/CNSeniorious000/dsh-generative-ui@main
23
29
  ```
24
30
 
25
- Or, working on it locally, point the profile at your checkout — `lib/` is built by `prepare`, so
31
+ And working on it locally, point the profile at your checkout — `lib/` is built by `prepare`, so
26
32
  the profile does not care that this package uses bun and dsh uses pnpm:
27
33
 
28
34
  ```sh
29
35
  dsh plugin --profile web add link:/path/to/dsh-generative-ui
30
36
  ```
31
37
 
32
- `dsh plugin` forwards to the profile's package manager, so either form installs the package. Mounting it also takes one line in `~/.dsh/profiles/web/package.json` the profile's bundle list is what dsh actually boots:
38
+ `dsh plugin` forwards to the profile's package manager, so any of these installs the package —
39
+ and adds it to `~/.dsh/profiles/web/package.json`'s `dsh.profile.bundles`, which is the list dsh
40
+ actually boots. Verified on a clean machine, the bundle list reads:
33
41
 
34
42
  ```json
35
43
  {
@@ -45,7 +53,12 @@ dsh plugin --profile web add link:/path/to/dsh-generative-ui
45
53
  }
46
54
  ```
47
55
 
48
- Then restart `dsh web` plugins are mounted at boot, and there is no hot-reload for adding one.
56
+ The `dependencies` entry beside it is whatever form you installed and from the registry that is
57
+ a caret, which on a `0.0.x` version pins exactly: `^0.0.1` matches `0.0.1` and nothing later. Edit
58
+ it to `~0.0.1` if you want patches.
59
+
60
+ Start `dsh web` and it is there — or restart it if it was already running, since plugins are
61
+ mounted at boot and adding one has no hot-reload.
49
62
 
50
63
  **If nothing happens, check which agent preset the session is on first.** Under `minimal`
51
64
  (极简模式) the persona is declared `complete: true`, so nothing can append to the system prompt and