@telepath-computer/television 0.1.20 → 0.1.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telepath-computer/television",
3
- "version": "0.1.20",
3
+ "version": "0.1.22",
4
4
  "type": "module",
5
5
  "main": "dist/electron.cjs",
6
6
  "bin": {
@@ -22,7 +22,7 @@
22
22
  "lint:fix": "npm run lint -- --fix",
23
23
  "type-check": "tsc --noEmit",
24
24
  "test:setup": "playwright install chromium",
25
- "test:core": "vitest run test/main.test.ts test/layout.test.ts test/television-client.test.ts test/workspace-service.test.ts test/browser-server.test.ts test/server-manager.test.ts test/server-store.test.ts test/artifacts.test.ts test/artifact-runtime.test.ts test/html-artifact-srcdoc.test.ts test/demo-layout-state.test.ts test/server.test.ts test/cli.test.ts test/acp-client.fake-server.test.ts",
25
+ "test:core": "vitest run test/main.test.ts test/layout.test.ts test/television-client.test.ts test/workspace-service.test.ts test/browser-server.test.ts test/server-manager.test.ts test/server-store.test.ts test/artifacts.test.ts test/artifact-runtime.test.ts test/html-artifact-srcdoc.test.ts test/demo-layout-state.test.ts test/server.test.ts test/cli.test.ts test/acp-client.fake-server.test.ts test/editable-markdown-socket-client.test.ts test/editable-markdown-socket-server.test.ts",
26
26
  "test:ui": "vitest run test/client-store.test.ts test/runtime.test.ts test/renderer.test.ts test/artifact-view.test.ts test/layout-stream.test.ts test/drag-controller.test.ts test/layout-mutations.test.ts test/workspace-view.test.ts test/app-root.test.ts test/chat-input.test.ts test/chat-history.test.ts test/chat-panel.test.ts test/wheel-gesture.test.ts",
27
27
  "test": "npm run test:core && npm run test:ui",
28
28
  "test:e2e": "playwright test --config=playwright.config.ts",
@@ -37,6 +37,7 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@agentclientprotocol/sdk": "^0.18.1",
40
+ "@milkdown/crepe": "^7.20.0",
40
41
  "@modelcontextprotocol/sdk": "^1.26.0",
41
42
  "@rupertsworld/daemon": "^0.1.1",
42
43
  "@rupertsworld/dependencies": "^0.2.0",
@@ -52,7 +53,9 @@
52
53
  "marked": "^17.0.4",
53
54
  "store-thing": "^0.2.0",
54
55
  "ulid": "^3.0.2",
55
- "ws": "^8.19.0"
56
+ "watcher": "^2.3.1",
57
+ "ws": "^8.19.0",
58
+ "zod": "^4.3.6"
56
59
  },
57
60
  "devDependencies": {
58
61
  "@eslint/js": "^9.39.4",
package/skill/SKILL.md CHANGED
@@ -22,6 +22,7 @@ All artifacts have:
22
22
 
23
23
  - `type`: the type string (`markdown` or `html`; defaults to `markdown`)
24
24
  - `title`: user-visible title shown in the workspace
25
+ - `path`: absolute file path to the artifact source on disk
25
26
 
26
27
  ### Markdown (default)
27
28
 
@@ -30,7 +31,7 @@ Use this for documents, reports, plans, status updates, or any content that bene
30
31
  Properties:
31
32
 
32
33
  - `type`: `markdown`
33
- - `content`: a markdown string, rendered as HTML
34
+ - `path`: absolute path to a `.md` file
34
35
 
35
36
  ### HTML
36
37
 
@@ -39,7 +40,9 @@ Use this for structured layouts, dashboards, data displays, or anything that nee
39
40
  Properties:
40
41
 
41
42
  - `type`: `html`
42
- - `content`: an HTML fragment element content only, no `<!doctype>`, `<html>`, `<head>`, or `<body>` tags
43
+ - `path`: absolute path to an `.html` file
44
+
45
+ HTML files should still be body-fragment style content for Television artifact rendering, not full standalone HTML documents.
43
46
 
44
47
  ```html
45
48
  <!-- Bad — rejected -->
@@ -89,19 +92,52 @@ tv get-workspace
89
92
  tv get-workspace --id "workspace-id"
90
93
  ```
91
94
 
95
+ This returns artifact metadata and file paths, not full artifact contents.
96
+
92
97
  ### Create an artifact
93
98
 
94
99
  ```bash
95
- tv create-artifact --title "Plan" --content "# Heading"
96
- tv create-artifact --title "Dashboard" --type html --content '<p>Hello</p>'
97
- tv create-artifact --title "Plan" --content "# Heading" --workspace "workspace-id"
100
+ tv create-artifact --path "/absolute/path/to/plan.md"
101
+ tv create-artifact --type html --path "/absolute/path/to/dashboard.html"
102
+ tv create-artifact --path "/absolute/path/to/plan.md" --workspace "workspace-id"
103
+ ```
104
+
105
+ Create the file first, then pass its path to Television.
106
+
107
+ Validation rules:
108
+
109
+ - path must be absolute
110
+ - markdown paths must end in `.md`
111
+ - html paths must end in `.html`
112
+ - file must exist
113
+ - file must be readable
114
+
115
+ Television stores artifacts as file pointers. If you need the artifact contents, read the file directly from the path.
116
+
117
+ If validation fails, the CLI exits non-zero with a clear error.
118
+
119
+ ### Find the Television data directory
120
+
121
+ ```bash
122
+ tv data-dir
98
123
  ```
99
124
 
125
+ Use this when the file belongs specifically to Television workspace state and does not already live in another project.
126
+
127
+ Guidance:
128
+
129
+ - best: put the file somewhere in the user's actual files where it is relevant to the artifact's purpose
130
+ - next best: put workspace-specific generated files in the Television data directory
131
+ - third best: put the file in the OpenClaw workspace if it is just transient working material
132
+
133
+ Do not put Television artifacts in a temp directory. Temp folders are an anti-pattern because the files are easy to lose and not meaningfully located.
134
+
135
+ Television does not own or delete the underlying files when artifacts are removed.
136
+
100
137
  ### Update an artifact
101
138
 
102
139
  ```bash
103
- tv update-artifact --id "artifact-id" --content "Updated content"
104
- tv update-artifact --id "artifact-id" --title "New title" --content "New content"
140
+ tv update-artifact --id "artifact-id" --title "New title"
105
141
  ```
106
142
 
107
143
  ### Remove an artifact