@telepath-computer/television 0.1.59 → 0.1.61
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/dist/cli.cjs
CHANGED
|
@@ -33552,6 +33552,7 @@ var DEFAULT_LAYOUT_UNIT = 120;
|
|
|
33552
33552
|
var CARD_GAP = 16;
|
|
33553
33553
|
var CARD_WIDTH = DEFAULT_LAYOUT_UNIT * LAYOUT_FULL_WIDTH_UNITS + CARD_GAP * (LAYOUT_FULL_WIDTH_UNITS - 1);
|
|
33554
33554
|
var CARD_HEIGHT = DEFAULT_LAYOUT_UNIT * LAYOUT_FULL_HEIGHT_UNITS + CARD_GAP * (LAYOUT_FULL_HEIGHT_UNITS - 1);
|
|
33555
|
+
var LAYOUT_MOBILE_BREAKPOINT_PX = CARD_WIDTH + CARD_GAP * 2;
|
|
33555
33556
|
|
|
33556
33557
|
// ../layout/src/layout.ts
|
|
33557
33558
|
function removeArtifactFromLayout(layout, artifactID) {
|
|
@@ -50016,8 +50017,8 @@ function getDevPackageDir() {
|
|
|
50016
50017
|
return import_node_path7.default.resolve(import_node_path7.default.dirname((0, import_node_url.fileURLToPath)(import_meta.url)), "..");
|
|
50017
50018
|
}
|
|
50018
50019
|
function readCLIVersion() {
|
|
50019
|
-
if ("0.1.
|
|
50020
|
-
return "0.1.
|
|
50020
|
+
if ("0.1.61".length > 0) {
|
|
50021
|
+
return "0.1.61";
|
|
50021
50022
|
}
|
|
50022
50023
|
const devPackageJsonPath = import_node_path7.default.join(getDevPackageDir(), "package.json");
|
|
50023
50024
|
if (!(0, import_node_fs4.existsSync)(devPackageJsonPath)) {
|
|
@@ -50026,8 +50027,8 @@ function readCLIVersion() {
|
|
|
50026
50027
|
return JSON.parse((0, import_node_fs4.readFileSync)(devPackageJsonPath, "utf8")).version;
|
|
50027
50028
|
}
|
|
50028
50029
|
function readWorkflowHelpText() {
|
|
50029
|
-
if ('# Television\n\nTelevision is a persistent artifact screen for agents. Use it when the user\nshould be able to inspect, revisit, and refine a file-backed result instead of\nonly reading a chat reply.\n\nIf you lose context, run:\n\n```bash\ntv help\n```\n\nThat command prints this full skill as one blob. There is no topic-scoped help\nin the current implementation.\n\n## Mental model\n\n- A **screen** is a named viewer surface with a layout.\n- An **artifact** is a file-backed result that can exist independently of any\n screen. It can be unplaced, attached to one screen, or attached to multiple\n screens.\n- **Screen membership** is separate from artifact identity: attaching/detaching\n controls which screens show an artifact; deleting removes the artifact\n globally. The CLI create commands require `--screen` so in-progress artifacts\n are visible immediately.\n- An **internal artifact** is a Television-managed bundle. You create a pending\n bundle, edit files in that bundle, then commit it.\n- An **external artifact** is a pointer to an existing absolute file on disk.\n Television displays that file but does not own or delete it.\n- **Pending** means a create or edit is staged but not yet committed.\n- **Trash** means metadata and committed internal bundles moved out of the live\n tree. There is no restore workflow in the current scope.\n\nThe core workflow is:\n\n1. Decide whether the result should be internal or external.\n2. Create or stage the artifact with the CLI.\n3. For internal artifacts, edit files in the pending bundle.\n4. Commit when the validation rules are satisfied.\n\n## User communication during multi-step workflows\n\nWhen you are doing a multi-step artifact workflow, keep the user informed as you\nprogress.\n\nRequired communication style:\n\n- verbalize key actions and decisions as they happen\n- keep the language concise\n- prefer short updates over long explanations\n- frame updates in the user\'s world and goals, not in the internal mechanics of the skill or CLI workflow\n- avoid technical workflow jargon unless the user explicitly asks for it\n- do not write reports, long paragraphs, or chatty summaries while the work is in progress\n- do not use lists unless the user explicitly asks for one\n- optimize for speed and token efficiency\n\nGood examples:\n\n- "Starting the artifact now."\n- "Reviewing the draft and source material."\n- "Updating the HTML and efficiently navigating the artifact creation flow."\n- "The artifact did not pass validation yet; fixing the draft notes and retrying."\n- "Finalizing the artifact now."\n- "Done."\n\nBad examples:\n\n- multi-paragraph progress reports\n- long retrospective narration during execution\n- verbose bullet lists for routine workflow steps\n\n## Internal versus external\n\nUse an **internal artifact** when:\n\n- the artifact is purpose-built for Television\n- Television should own the bundle structure\n- future agents should be able to maintain the result by reading bundle files\n- you need a staged create or staged edit workflow\n\nUse an **external artifact** when:\n\n- a real file already exists on disk\n- the user wants Television to display that existing file\n- you do not need a Television-managed bundle\n\nDecision rule:\n\n- If the result should be maintained as a Television-owned long-lived artifact,\n choose internal.\n- If the result is already a real file outside Television and should stay that\n way, choose external.\n\nSupported artifact types:\n\n- `text/markdown`\n- `text/html`\n\n## Internal bundle files\n\nEvery internal artifact bundle contains:\n\n- `artifact.md`\n- `data.json`\n- `memory.md`\n- `public/index.md` or `public/index.html`\n\nFresh pending bundles are intentionally minimal:\n\n- `artifact.md` is blank\n- `memory.md` is blank\n- `public/index.md` or `public/index.html` is blank\n- `data.json` is exactly `{}`\n\nThe scaffold is not commit-valid by itself. Learn the required structure from\nthis skill, not from placeholder content in the scaffold.\n\n### `artifact.md`\n\n`artifact.md` is the contract for the artifact. It explains what the artifact\nis for, what conceptual material it is based on, how it should render, and how\nlater agents should maintain it.\n\nBefore commit, `artifact.md` must be non-empty and contain all of these exact\nheadings:\n\n```md\n## User intent\n## Purpose\n## Data shape\n## Data sources\n## Rendering\n## Update workflow\n## Non-goals\n```\n\nWhat each section should capture:\n\n- `## User intent`: faithful restatement or quotation of what the user actually said they wanted; this is critical and should preserve the user\'s language as closely as practical, including requests, feedback, complaints, constraints, and guidance\n- `## Purpose`: what the artifact is trying to achieve\n- `## Data shape`: the conceptual shape you reasoned about while authoring; for markdown artifacts this will often just be `{}`\n- `## Data sources`: where the underlying facts, notes, or source material came from and how they were obtained\n- `## Rendering`: how `public/index.md` or `public/index.html` should present it\n- `## Update workflow`: how future agents should refresh or modify it\n- `## Non-goals`: what is intentionally excluded, especially application-like runtime behavior\n\n### `data.json`\n\n`data.json` is a **thinking artifact**, not a runtime payload.\n\nIts purpose is to help the model separate:\n\n- reasoning / planning / authoring structure\n- from final presentation in `public/index.md` or `public/index.html`\n\nUse it to capture the pure conceptual shape of what you are about to render.\nThis is an authoring aid for agents, not an application data layer.\n\nHard rules:\n\n- **Do not treat `data.json` as live runtime state.**\n- **Do not write HTML/JS that loads, depends on, or synchronizes against `data.json`.**\n- **Do not build application-like data-driven artifacts.**\n- **We do not support runtime data-backed artifacts at this time.**\n- Artifacts are static markdown or static HTML documents.\n- HTML artifacts may include JavaScript and extra assets under `public/`, but\n that JavaScript must stay presentation-oriented and self-contained, not\n driven by `data.json` as an application state container.\n\nFor `text/markdown` artifacts, leave `data.json` as exactly:\n\n```json\n{}\n```\n\nThere is usually little value in separating content from presentation for\nmarkdown artifacts, so prefer `{}` unless there is a very strong authoring\nreason not to.\n\nFor `text/html` artifacts, use `data.json` only when it helps you think clearly\nabout the material before rendering. It may describe the conceptual structure\nof the artifact, but it must not become a runtime contract.\n\nValidation rule:\n\n- `data.json` must exist and contain valid JSON\n\nThe current validator does not require the JSON value to be an object, but an\nobject is the normal choice.\n\n### `memory.md`\n\n`memory.md` is the working scratchpad for later agents. Record decisions,\nlimitations, data-retrieval notes, problems encountered, what changed, and what\nshould be watched during future edits.\n\nRequired validation anchors:\n\n- `memory.md` must contain `## Activity Log`\n- `memory.md` must contain at least one UTC timestamp in exact\n `YYYY-MM-DDTHH:MM:SSZ` format\n- at least one timestamp must be from the last 30 minutes when you commit\n\nThe minimum required heading is:\n\n```md\n## Activity Log\n```\n\nWhat to record beyond that is up to the artifact and the work performed.\n\n### `public/index.md` and `public/index.html`\n\nThis is the rendered entry file that Television serves.\n\n- Markdown artifacts use `public/index.md`\n- HTML artifacts use `public/index.html`\n- the entry file must match the artifact `type`\n- the entry file must be non-empty before commit\n\nFor HTML artifacts:\n\n- `public/index.html` is a full HTML document, not a body fragment\n- additional public assets may live under `public/`\n- keep paths relative to `public/`\n\n## Quality bar\n\nBuild artifacts that are durable, truthful, and maintainable by later agents.\n\nRequired quality standards:\n\n- be faithful to source data\n- do not invent or hallucinate missing facts\n- do not silently truncate a dataset and pretend it is complete\n- prefer truth over completeness when those goals conflict\n- make limitations, sampling, missing data, and freshness visible\n- keep rendering aligned with the reasoning captured in `artifact.md`, `data.json`, and `memory.md`\n- keep `data.json` as an authoring/thinking artifact rather than a runtime dependency\n- keep the artifact maintainable by a future agent reading only the bundle files\n\nAnti-patterns:\n\n- cursory or low-effort data collection\n- fake data added to make the artifact look complete\n- brittle one-off hacks that a later agent cannot reproduce\n- hidden dependencies that are not documented in `artifact.md` or `memory.md`\n- layout churn during simple data refreshes when the data model did not change\n\n## HTML house style\n\nHTML artifacts should feel intentional and readable inside Television tiles.\n\nTelevision provides a full base stylesheet for HTML artifacts. Only add custom\nCSS when you need something not covered by the built-in styles. Prefer the base\nstyles and theme tokens so artifacts stay visually coherent with the rest of\nTelevision.\n\nHouse-style guidance:\n\n- use semantic HTML first\n- keep the most important information near the top\n- design for small, medium, and large tile sizes\n- avoid horizontal overflow unless there is no reasonable alternative\n- make empty states and error states explicit\n- prefer the built-in HTML styling before inventing custom component chrome\n\n### Elements\n\nStandard elements already have sensible defaults, so you usually do not need to\nstyle from scratch:\n\n- headings (`h1`\u2013`h6`) \u2014 sized and weighted\n- `p`, `ul`, `ol` \u2014 readable defaults\n- `code` and `pre` \u2014 monospace, muted background\n- `blockquote` \u2014 left border, muted text\n- `table`, `th`, `td` \u2014 bordered, striped headers\n- `button` \u2014 styled with border and hover state; use `size="sm"` or `size="md"` when appropriate\n- `hr` \u2014 subtle border\n- `a` \u2014 inherits color by default\n\n### `.prose` class\n\nUse a `.prose` wrapper for document-style HTML where readable vertical rhythm is\nappropriate. Do not rely on `.prose` for dashboards, tables, control surfaces,\nor dense custom layouts.\n\n```html\n<div class="prose">\n <h1>Title</h1>\n <p>Some content with proper spacing between elements.</p>\n <ul>\n <li>Item one</li>\n <li>Item two</li>\n </ul>\n</div>\n```\n\n### CSS variables\n\nUse the existing Television tokens when they are available in the runtime.\nThese are the preferred way to stay aligned with the app theme.\n\nColors:\n- `--color-bg` \u2014 page background\n- `--color-bg-muted` \u2014 subtle background\n- `--color-surface` \u2014 card or panel background\n- `--color-text` \u2014 primary text\n- `--color-text-muted` \u2014 secondary or label text\n- `--color-border` \u2014 border color\n\nSpacing:\n- `--space-4`\n- `--space-8`\n- `--space-12`\n- `--space-16`\n- `--space-24`\n- `--space-32`\n\nFonts:\n- `--font-sans`\n- `--font-mono`\n\nText sizes:\n- `--text-sm`\n- `--text-base`\n- `--text-lg`\n- `--text-xl`\n\nRadius:\n- `--radius-4`\n- `--radius-8`\n\n## Workflows\n\n### Create new internal artifact\n\n1. Decide that the result should be an internal artifact.\n2. Start the pending bundle:\n\n```bash\ntv create-internal-artifact --screen "<screen-id>" --type text/markdown --title "Artifact title"\n```\n\nOr:\n\n```bash\ntv create-internal-artifact --screen "<screen-id>" --type text/html --title "Artifact title"\n```\n\n`--screen` is required for internal artifact creation so the user can see the in-progress artifact immediately.\n\n3. Read the returned pending path and edit files there.\n4. Write `artifact.md`.\n5. In `artifact.md`, capture the user\'s language faithfully in `## User intent` before doing the rest of the authoring work. Use direct quotes when helpful, or a close paraphrase when that is clearer, but keep it representative of what the user actually said they wanted.\n6. Think through the artifact in a pure way and write `data.json` only as an authoring aid.\n7. For markdown artifacts, leave `data.json` as `{}` unless there is a compelling authoring reason not to.\n8. Render `public/index.md` or `public/index.html`.\n9. Append a current timestamped activity entry in `memory.md`.\n10. Commit:\n\n```bash\ntv commit-pending-artifact --id "<artifact-id>"\n```\n\n### Update internal artifact with fresh data\n\n1. Stage the edit:\n\n```bash\ntv edit-internal-artifact --id "<artifact-id>"\n```\n\n2. Read `artifact.md`, `data.json`, and `memory.md` before changing anything.\n3. Refresh the underlying facts or source material.\n4. Update `data.json` only if it helps clarify the authoring plan.\n5. For markdown artifacts, prefer to keep `data.json` as `{}`.\n6. Make the minimum rendering changes needed to keep the artifact correct.\n7. Record what changed in `memory.md`.\n8. Commit:\n\n```bash\ntv commit-pending-artifact --id "<artifact-id>"\n```\n\nAvoid unnecessary layout or styling churn during data-only refreshes.\n\n### Modify internal artifact from user feedback\n\n1. Stage the edit:\n\n```bash\ntv edit-internal-artifact --id "<artifact-id>"\n```\n\n2. Read `artifact.md`, `data.json`, and `memory.md`.\n3. Update `artifact.md` if the user intent or non-goals changed.\n4. When the user has added feedback, complaints, corrections, or new guidance, update `## User intent` so it remains a faithful record of what the user actually wants now. Preserve the user\'s language as closely as practical, using direct quotes or close paraphrases.\n5. Update `data.json` only if it improves the authoring model of the artifact.\n6. For markdown artifacts, prefer to keep `data.json` as `{}`.\n7. Adjust `public/index.md` or `public/index.html` as narrowly as possible.\n8. Record the request, decision, and resulting change in `memory.md`.\n9. Commit:\n\n```bash\ntv commit-pending-artifact --id "<artifact-id>"\n```\n\n### Abandon pending work\n\nIf the staged work should be discarded instead of committed:\n\n```bash\ntv abandon-pending-artifact --id "<artifact-id>"\n```\n\n### Create external artifact\n\nUse this when the file already exists on disk and Television should display it\nwithout owning a bundle:\n\n```bash\ntv create-external-artifact --screen "<screen-id>" --type text/markdown --title "Artifact title" --path /absolute/path/to/file.md\n```\n\nOr:\n\n```bash\ntv create-external-artifact --screen "<screen-id>" --type text/html --title "Artifact title" --path /absolute/path/to/file.html\n```\n\n`--screen` is required for CLI creation so the file appears on a visible screen immediately.\n\nRules:\n\n- `--path` must be absolute\n- the file must already exist and be readable\n- the extension must match `type`\n- external artifacts do not use pending create, pending edit, commit, or abandon\n\n## CLI reference\n\nArtifact commands:\n\n```bash\ntv create-internal-artifact --screen "<screen-id>" --type <text/markdown|text/html> --title "Artifact title"\ntv create-external-artifact --screen "<screen-id>" --type <text/markdown|text/html> --title "Artifact title" --path /absolute/path\ntv edit-internal-artifact --id "<artifact-id>"\ntv commit-pending-artifact --id "<artifact-id>"\ntv abandon-pending-artifact --id "<artifact-id>"\ntv update-artifact --id "<artifact-id>" --title "New title"\ntv list-artifacts [--screen "<screen-id>"] [--unplaced]\ntv get-artifact --id "<artifact-id>"\ntv delete-artifact --id "<artifact-id>"\n```\n\nScreen commands:\n\n```bash\ntv create-screen --name "Screen name"\ntv list-screens\ntv get-screen --id "<screen-id>"\ntv remove-screen --id "<screen-id>"\n```\n\nScreen membership commands:\n\n```bash\ntv attach-artifact --id "<artifact-id>" --screen "<screen-id>"\ntv detach-artifact --id "<artifact-id>" --screen "<screen-id>"\n```\n\nViewer commands:\n\n```bash\ntv viewer-status\ntv set-active-screen --id "<screen-id>"\ntv focus-artifact --id "<artifact-id>" [--screen "<screen-id>"]\n```\n\nServer commands:\n\n```bash\ntv status\ntv storage-path\ntv serve\ntv stop\n```\n\nCLI behavior notes:\n\n- `--screen` is required on CLI create commands so new artifacts are visible immediately; use `tv attach-artifact` and `tv detach-artifact` for later screen membership changes\n- workflow and mutation commands print plain text\n- read commands print JSON\n- `tv get-screen` includes artifact `kind` and `status`\n- `tv attach-artifact` appends a default-sized card to the right end of the strip; idempotent if the artifact is already on that screen\n- `tv detach-artifact` removes the card from a screen\'s layout; the artifact metadata is never touched, even on the last reference\n- `tv delete-artifact` is the way to globally remove an artifact (detaches from every screen, then trashes the bundle / forgets the external pointer / discards pending-create)\n- `tv list-artifacts` accepts `--screen <id>` to filter by screen membership and `--unplaced` to surface artifacts attached to no screen\n- `tv update-artifact` changes title metadata only\n- `tv set-active-screen` sets which screen the GUI is focused on; the change is persisted and broadcast to connected clients\n- `tv focus-artifact` is a transient nudge: clients switch screens if needed, scroll the artifact\'s card into view, and play a brief highlight animation; pass `--screen <id>` to pin which screen, otherwise the server picks one (preferring the active screen when the artifact is there)\n- `tv viewer-status` prints the active screen ID and the count of connected GUI clients\n- when the CLI reports an error, follow the directive to run `tv help`\n\n## Deferred or out of scope\n\nThese are not part of the current implementation:\n\n- `tv help <topic>`\n- restore-from-trash\n- pending-listing commands\n- attestation or nonce commands\n- stale pending cleanup or stale trash cleanup\n- markdown editor UI recovery\n- client-side pending presentation work\n- multi-section help output'.length > 0) {
|
|
50030
|
-
return '# Television\n\nTelevision is a persistent artifact screen for agents. Use it when the user\nshould be able to inspect, revisit, and refine a file-backed result instead of\nonly reading a chat reply.\n\nIf you lose context, run:\n\n```bash\ntv help\n```\n\nThat command prints this full skill as one blob. There is no topic-scoped help\nin the current implementation.\n\n## Mental model\n\n- A **screen** is a named viewer surface with a layout.\n- An **artifact** is a file-backed result that can exist independently of any\n screen. It can be unplaced, attached to one screen, or attached to multiple\n screens.\n- **Screen membership** is separate from artifact identity: attaching/detaching\n controls which screens show an artifact; deleting removes the artifact\n globally. The CLI create commands require `--screen` so in-progress artifacts\n are visible immediately.\n- An **internal artifact** is a Television-managed bundle. You create a pending\n bundle, edit files in that bundle, then commit it.\n- An **external artifact** is a pointer to an existing absolute file on disk.\n Television displays that file but does not own or delete it.\n- **Pending** means a create or edit is staged but not yet committed.\n- **Trash** means metadata and committed internal bundles moved out of the live\n tree. There is no restore workflow in the current scope.\n\nThe core workflow is:\n\n1. Decide whether the result should be internal or external.\n2. Create or stage the artifact with the CLI.\n3. For internal artifacts, edit files in the pending bundle.\n4. Commit when the validation rules are satisfied.\n\n## User communication during multi-step workflows\n\nWhen you are doing a multi-step artifact workflow, keep the user informed as you\nprogress.\n\nRequired communication style:\n\n- verbalize key actions and decisions as they happen\n- keep the language concise\n- prefer short updates over long explanations\n- frame updates in the user\'s world and goals, not in the internal mechanics of the skill or CLI workflow\n- avoid technical workflow jargon unless the user explicitly asks for it\n- do not write reports, long paragraphs, or chatty summaries while the work is in progress\n- do not use lists unless the user explicitly asks for one\n- optimize for speed and token efficiency\n\nGood examples:\n\n- "Starting the artifact now."\n- "Reviewing the draft and source material."\n- "Updating the HTML and efficiently navigating the artifact creation flow."\n- "The artifact did not pass validation yet; fixing the draft notes and retrying."\n- "Finalizing the artifact now."\n- "Done."\n\nBad examples:\n\n- multi-paragraph progress reports\n- long retrospective narration during execution\n- verbose bullet lists for routine workflow steps\n\n## Internal versus external\n\nUse an **internal artifact** when:\n\n- the artifact is purpose-built for Television\n- Television should own the bundle structure\n- future agents should be able to maintain the result by reading bundle files\n- you need a staged create or staged edit workflow\n\nUse an **external artifact** when:\n\n- a real file already exists on disk\n- the user wants Television to display that existing file\n- you do not need a Television-managed bundle\n\nDecision rule:\n\n- If the result should be maintained as a Television-owned long-lived artifact,\n choose internal.\n- If the result is already a real file outside Television and should stay that\n way, choose external.\n\nSupported artifact types:\n\n- `text/markdown`\n- `text/html`\n\n## Internal bundle files\n\nEvery internal artifact bundle contains:\n\n- `artifact.md`\n- `data.json`\n- `memory.md`\n- `public/index.md` or `public/index.html`\n\nFresh pending bundles are intentionally minimal:\n\n- `artifact.md` is blank\n- `memory.md` is blank\n- `public/index.md` or `public/index.html` is blank\n- `data.json` is exactly `{}`\n\nThe scaffold is not commit-valid by itself. Learn the required structure from\nthis skill, not from placeholder content in the scaffold.\n\n### `artifact.md`\n\n`artifact.md` is the contract for the artifact. It explains what the artifact\nis for, what conceptual material it is based on, how it should render, and how\nlater agents should maintain it.\n\nBefore commit, `artifact.md` must be non-empty and contain all of these exact\nheadings:\n\n```md\n## User intent\n## Purpose\n## Data shape\n## Data sources\n## Rendering\n## Update workflow\n## Non-goals\n```\n\nWhat each section should capture:\n\n- `## User intent`: faithful restatement or quotation of what the user actually said they wanted; this is critical and should preserve the user\'s language as closely as practical, including requests, feedback, complaints, constraints, and guidance\n- `## Purpose`: what the artifact is trying to achieve\n- `## Data shape`: the conceptual shape you reasoned about while authoring; for markdown artifacts this will often just be `{}`\n- `## Data sources`: where the underlying facts, notes, or source material came from and how they were obtained\n- `## Rendering`: how `public/index.md` or `public/index.html` should present it\n- `## Update workflow`: how future agents should refresh or modify it\n- `## Non-goals`: what is intentionally excluded, especially application-like runtime behavior\n\n### `data.json`\n\n`data.json` is a **thinking artifact**, not a runtime payload.\n\nIts purpose is to help the model separate:\n\n- reasoning / planning / authoring structure\n- from final presentation in `public/index.md` or `public/index.html`\n\nUse it to capture the pure conceptual shape of what you are about to render.\nThis is an authoring aid for agents, not an application data layer.\n\nHard rules:\n\n- **Do not treat `data.json` as live runtime state.**\n- **Do not write HTML/JS that loads, depends on, or synchronizes against `data.json`.**\n- **Do not build application-like data-driven artifacts.**\n- **We do not support runtime data-backed artifacts at this time.**\n- Artifacts are static markdown or static HTML documents.\n- HTML artifacts may include JavaScript and extra assets under `public/`, but\n that JavaScript must stay presentation-oriented and self-contained, not\n driven by `data.json` as an application state container.\n\nFor `text/markdown` artifacts, leave `data.json` as exactly:\n\n```json\n{}\n```\n\nThere is usually little value in separating content from presentation for\nmarkdown artifacts, so prefer `{}` unless there is a very strong authoring\nreason not to.\n\nFor `text/html` artifacts, use `data.json` only when it helps you think clearly\nabout the material before rendering. It may describe the conceptual structure\nof the artifact, but it must not become a runtime contract.\n\nValidation rule:\n\n- `data.json` must exist and contain valid JSON\n\nThe current validator does not require the JSON value to be an object, but an\nobject is the normal choice.\n\n### `memory.md`\n\n`memory.md` is the working scratchpad for later agents. Record decisions,\nlimitations, data-retrieval notes, problems encountered, what changed, and what\nshould be watched during future edits.\n\nRequired validation anchors:\n\n- `memory.md` must contain `## Activity Log`\n- `memory.md` must contain at least one UTC timestamp in exact\n `YYYY-MM-DDTHH:MM:SSZ` format\n- at least one timestamp must be from the last 30 minutes when you commit\n\nThe minimum required heading is:\n\n```md\n## Activity Log\n```\n\nWhat to record beyond that is up to the artifact and the work performed.\n\n### `public/index.md` and `public/index.html`\n\nThis is the rendered entry file that Television serves.\n\n- Markdown artifacts use `public/index.md`\n- HTML artifacts use `public/index.html`\n- the entry file must match the artifact `type`\n- the entry file must be non-empty before commit\n\nFor HTML artifacts:\n\n- `public/index.html` is a full HTML document, not a body fragment\n- additional public assets may live under `public/`\n- keep paths relative to `public/`\n\n## Quality bar\n\nBuild artifacts that are durable, truthful, and maintainable by later agents.\n\nRequired quality standards:\n\n- be faithful to source data\n- do not invent or hallucinate missing facts\n- do not silently truncate a dataset and pretend it is complete\n- prefer truth over completeness when those goals conflict\n- make limitations, sampling, missing data, and freshness visible\n- keep rendering aligned with the reasoning captured in `artifact.md`, `data.json`, and `memory.md`\n- keep `data.json` as an authoring/thinking artifact rather than a runtime dependency\n- keep the artifact maintainable by a future agent reading only the bundle files\n\nAnti-patterns:\n\n- cursory or low-effort data collection\n- fake data added to make the artifact look complete\n- brittle one-off hacks that a later agent cannot reproduce\n- hidden dependencies that are not documented in `artifact.md` or `memory.md`\n- layout churn during simple data refreshes when the data model did not change\n\n## HTML house style\n\nHTML artifacts should feel intentional and readable inside Television tiles.\n\nTelevision provides a full base stylesheet for HTML artifacts. Only add custom\nCSS when you need something not covered by the built-in styles. Prefer the base\nstyles and theme tokens so artifacts stay visually coherent with the rest of\nTelevision.\n\nHouse-style guidance:\n\n- use semantic HTML first\n- keep the most important information near the top\n- design for small, medium, and large tile sizes\n- avoid horizontal overflow unless there is no reasonable alternative\n- make empty states and error states explicit\n- prefer the built-in HTML styling before inventing custom component chrome\n\n### Elements\n\nStandard elements already have sensible defaults, so you usually do not need to\nstyle from scratch:\n\n- headings (`h1`\u2013`h6`) \u2014 sized and weighted\n- `p`, `ul`, `ol` \u2014 readable defaults\n- `code` and `pre` \u2014 monospace, muted background\n- `blockquote` \u2014 left border, muted text\n- `table`, `th`, `td` \u2014 bordered, striped headers\n- `button` \u2014 styled with border and hover state; use `size="sm"` or `size="md"` when appropriate\n- `hr` \u2014 subtle border\n- `a` \u2014 inherits color by default\n\n### `.prose` class\n\nUse a `.prose` wrapper for document-style HTML where readable vertical rhythm is\nappropriate. Do not rely on `.prose` for dashboards, tables, control surfaces,\nor dense custom layouts.\n\n```html\n<div class="prose">\n <h1>Title</h1>\n <p>Some content with proper spacing between elements.</p>\n <ul>\n <li>Item one</li>\n <li>Item two</li>\n </ul>\n</div>\n```\n\n### CSS variables\n\nUse the existing Television tokens when they are available in the runtime.\nThese are the preferred way to stay aligned with the app theme.\n\nColors:\n- `--color-bg` \u2014 page background\n- `--color-bg-muted` \u2014 subtle background\n- `--color-surface` \u2014 card or panel background\n- `--color-text` \u2014 primary text\n- `--color-text-muted` \u2014 secondary or label text\n- `--color-border` \u2014 border color\n\nSpacing:\n- `--space-4`\n- `--space-8`\n- `--space-12`\n- `--space-16`\n- `--space-24`\n- `--space-32`\n\nFonts:\n- `--font-sans`\n- `--font-mono`\n\nText sizes:\n- `--text-sm`\n- `--text-base`\n- `--text-lg`\n- `--text-xl`\n\nRadius:\n- `--radius-4`\n- `--radius-8`\n\n## Workflows\n\n### Create new internal artifact\n\n1. Decide that the result should be an internal artifact.\n2. Start the pending bundle:\n\n```bash\ntv create-internal-artifact --screen "<screen-id>" --type text/markdown --title "Artifact title"\n```\n\nOr:\n\n```bash\ntv create-internal-artifact --screen "<screen-id>" --type text/html --title "Artifact title"\n```\n\n`--screen` is required for internal artifact creation so the user can see the in-progress artifact immediately.\n\n3. Read the returned pending path and edit files there.\n4. Write `artifact.md`.\n5. In `artifact.md`, capture the user\'s language faithfully in `## User intent` before doing the rest of the authoring work. Use direct quotes when helpful, or a close paraphrase when that is clearer, but keep it representative of what the user actually said they wanted.\n6. Think through the artifact in a pure way and write `data.json` only as an authoring aid.\n7. For markdown artifacts, leave `data.json` as `{}` unless there is a compelling authoring reason not to.\n8. Render `public/index.md` or `public/index.html`.\n9. Append a current timestamped activity entry in `memory.md`.\n10. Commit:\n\n```bash\ntv commit-pending-artifact --id "<artifact-id>"\n```\n\n### Update internal artifact with fresh data\n\n1. Stage the edit:\n\n```bash\ntv edit-internal-artifact --id "<artifact-id>"\n```\n\n2. Read `artifact.md`, `data.json`, and `memory.md` before changing anything.\n3. Refresh the underlying facts or source material.\n4. Update `data.json` only if it helps clarify the authoring plan.\n5. For markdown artifacts, prefer to keep `data.json` as `{}`.\n6. Make the minimum rendering changes needed to keep the artifact correct.\n7. Record what changed in `memory.md`.\n8. Commit:\n\n```bash\ntv commit-pending-artifact --id "<artifact-id>"\n```\n\nAvoid unnecessary layout or styling churn during data-only refreshes.\n\n### Modify internal artifact from user feedback\n\n1. Stage the edit:\n\n```bash\ntv edit-internal-artifact --id "<artifact-id>"\n```\n\n2. Read `artifact.md`, `data.json`, and `memory.md`.\n3. Update `artifact.md` if the user intent or non-goals changed.\n4. When the user has added feedback, complaints, corrections, or new guidance, update `## User intent` so it remains a faithful record of what the user actually wants now. Preserve the user\'s language as closely as practical, using direct quotes or close paraphrases.\n5. Update `data.json` only if it improves the authoring model of the artifact.\n6. For markdown artifacts, prefer to keep `data.json` as `{}`.\n7. Adjust `public/index.md` or `public/index.html` as narrowly as possible.\n8. Record the request, decision, and resulting change in `memory.md`.\n9. Commit:\n\n```bash\ntv commit-pending-artifact --id "<artifact-id>"\n```\n\n### Abandon pending work\n\nIf the staged work should be discarded instead of committed:\n\n```bash\ntv abandon-pending-artifact --id "<artifact-id>"\n```\n\n### Create external artifact\n\nUse this when the file already exists on disk and Television should display it\nwithout owning a bundle:\n\n```bash\ntv create-external-artifact --screen "<screen-id>" --type text/markdown --title "Artifact title" --path /absolute/path/to/file.md\n```\n\nOr:\n\n```bash\ntv create-external-artifact --screen "<screen-id>" --type text/html --title "Artifact title" --path /absolute/path/to/file.html\n```\n\n`--screen` is required for CLI creation so the file appears on a visible screen immediately.\n\nRules:\n\n- `--path` must be absolute\n- the file must already exist and be readable\n- the extension must match `type`\n- external artifacts do not use pending create, pending edit, commit, or abandon\n\n## CLI reference\n\nArtifact commands:\n\n```bash\ntv create-internal-artifact --screen "<screen-id>" --type <text/markdown|text/html> --title "Artifact title"\ntv create-external-artifact --screen "<screen-id>" --type <text/markdown|text/html> --title "Artifact title" --path /absolute/path\ntv edit-internal-artifact --id "<artifact-id>"\ntv commit-pending-artifact --id "<artifact-id>"\ntv abandon-pending-artifact --id "<artifact-id>"\ntv update-artifact --id "<artifact-id>" --title "New title"\ntv list-artifacts [--screen "<screen-id>"] [--unplaced]\ntv get-artifact --id "<artifact-id>"\ntv delete-artifact --id "<artifact-id>"\n```\n\nScreen commands:\n\n```bash\ntv create-screen --name "Screen name"\ntv list-screens\ntv get-screen --id "<screen-id>"\ntv remove-screen --id "<screen-id>"\n```\n\nScreen membership commands:\n\n```bash\ntv attach-artifact --id "<artifact-id>" --screen "<screen-id>"\ntv detach-artifact --id "<artifact-id>" --screen "<screen-id>"\n```\n\nViewer commands:\n\n```bash\ntv viewer-status\ntv set-active-screen --id "<screen-id>"\ntv focus-artifact --id "<artifact-id>" [--screen "<screen-id>"]\n```\n\nServer commands:\n\n```bash\ntv status\ntv storage-path\ntv serve\ntv stop\n```\n\nCLI behavior notes:\n\n- `--screen` is required on CLI create commands so new artifacts are visible immediately; use `tv attach-artifact` and `tv detach-artifact` for later screen membership changes\n- workflow and mutation commands print plain text\n- read commands print JSON\n- `tv get-screen` includes artifact `kind` and `status`\n- `tv attach-artifact` appends a default-sized card to the right end of the strip; idempotent if the artifact is already on that screen\n- `tv detach-artifact` removes the card from a screen\'s layout; the artifact metadata is never touched, even on the last reference\n- `tv delete-artifact` is the way to globally remove an artifact (detaches from every screen, then trashes the bundle / forgets the external pointer / discards pending-create)\n- `tv list-artifacts` accepts `--screen <id>` to filter by screen membership and `--unplaced` to surface artifacts attached to no screen\n- `tv update-artifact` changes title metadata only\n- `tv set-active-screen` sets which screen the GUI is focused on; the change is persisted and broadcast to connected clients\n- `tv focus-artifact` is a transient nudge: clients switch screens if needed, scroll the artifact\'s card into view, and play a brief highlight animation; pass `--screen <id>` to pin which screen, otherwise the server picks one (preferring the active screen when the artifact is there)\n- `tv viewer-status` prints the active screen ID and the count of connected GUI clients\n- when the CLI reports an error, follow the directive to run `tv help`\n\n## Deferred or out of scope\n\nThese are not part of the current implementation:\n\n- `tv help <topic>`\n- restore-from-trash\n- pending-listing commands\n- attestation or nonce commands\n- stale pending cleanup or stale trash cleanup\n- markdown editor UI recovery\n- client-side pending presentation work\n- multi-section help output';
|
|
50030
|
+
if ('# Television\n\nTelevision is a persistent artifact screen for agents. Use it when the user\nshould be able to inspect, revisit, and refine a file-backed result instead of\nonly reading a chat reply.\n\nIf you lose context, run:\n\n```bash\ntv help\n```\n\nThat command prints this full skill as one blob. There is no topic-scoped help\nin the current implementation.\n\n## Mental model\n\n- A **screen** is a named viewer surface with a layout.\n- An **artifact** is a file-backed result that can exist independently of any\n screen. It can be unplaced, attached to one screen, or attached to multiple\n screens.\n- **Screen membership** is separate from artifact identity: attaching/detaching\n controls which screens show an artifact; deleting removes the artifact\n globally. The CLI create commands require `--screen` so in-progress artifacts\n are visible immediately.\n- An **internal artifact** is a Television-managed bundle. You create a pending\n bundle, edit files in that bundle, then commit it.\n- An **external artifact** is a pointer to an existing absolute file on disk.\n Television displays that file but does not own or delete it.\n- **Pending** means a create or edit is staged but not yet committed.\n- **Trash** means metadata and committed internal bundles moved out of the live\n tree. There is no restore workflow in the current scope.\n\nThe core workflow is:\n\n1. Decide whether the result should be internal or external.\n2. Decide whether the user should be taken to the new screen or artifact now, or whether the work should happen in the background.\n3. Create or stage the artifact with the CLI.\n4. For internal artifacts, edit files in the pending bundle.\n5. Commit when the validation rules are satisfied.\n\n## Focus and viewer attention\n\nTelevision separates state changes from viewer attention.\n\nState changes:\n\n- create a screen\n- create an artifact on a screen\n- attach an existing artifact to another screen\n\nViewer-attention changes:\n\n- switch to a screen\n- focus an artifact so clients switch screens if needed, scroll it into view, and highlight it\n\nAgent-facing create and attach commands require **exactly one** of `--focus` or `--no-focus`:\n\n- `tv create-screen`\n- `tv create-internal-artifact`\n- `tv create-external-artifact`\n- `tv attach-artifact`\n\nUse this decision rule:\n\n- use `--focus` when the user likely wants to inspect the new screen or artifact right away\n- use `--no-focus` when the user likely wants background setup while keeping attention on the current screen or on some other task\n\nHeuristic examples:\n\n- use `--focus` for requests like "show me", "open it", "put it on screen", "let me review it", or when the created thing is the obvious next object of attention\n- use `--no-focus` for requests like "set this up", "make it in the background", "prepare it", "wire this in", or when the user is still focused on something else\n\nImportant communication rule:\n\n- when you use `--no-focus`, explicitly say what you did in chat so the user knows the work happened even though Television did not switch views\n\nIf you forget these rules or the CLI rejects a command for missing focus intent, run `tv help` and reread this section before retrying.\n\n## User communication during multi-step workflows\n\nWhen you are doing a multi-step artifact workflow, keep the user informed as you\nprogress.\n\nRequired communication style:\n\n- verbalize key actions and decisions as they happen\n- keep the language concise\n- prefer short updates over long explanations\n- frame updates in the user\'s world and goals, not in the internal mechanics of the skill or CLI workflow\n- avoid technical workflow jargon unless the user explicitly asks for it\n- do not write reports, long paragraphs, or chatty summaries while the work is in progress\n- do not use lists unless the user explicitly asks for one\n- optimize for speed and token efficiency\n\nGood examples:\n\n- "Starting the artifact now."\n- "Reviewing the draft and source material."\n- "Updating the HTML and efficiently navigating the artifact creation flow."\n- "The artifact did not pass validation yet; fixing the draft notes and retrying."\n- "Finalizing the artifact now."\n- "Done."\n\nBad examples:\n\n- multi-paragraph progress reports\n- long retrospective narration during execution\n- verbose bullet lists for routine workflow steps\n\n## Internal versus external\n\nUse an **internal artifact** when:\n\n- the artifact is purpose-built for Television\n- Television should own the bundle structure\n- future agents should be able to maintain the result by reading bundle files\n- you need a staged create or staged edit workflow\n\nUse an **external artifact** when:\n\n- a real file already exists on disk\n- the user wants Television to display that existing file\n- you do not need a Television-managed bundle\n\nDecision rule:\n\n- If the result should be maintained as a Television-owned long-lived artifact,\n choose internal.\n- If the result is already a real file outside Television and should stay that\n way, choose external.\n\nSupported artifact types:\n\n- `text/markdown`\n- `text/html`\n\n## Internal bundle files\n\nEvery internal artifact bundle contains:\n\n- `artifact.md`\n- `data.json`\n- `memory.md`\n- `public/index.md` or `public/index.html`\n\nFresh pending bundles are intentionally minimal:\n\n- `artifact.md` is blank\n- `memory.md` is blank\n- `public/index.md` or `public/index.html` is blank\n- `data.json` is exactly `{}`\n\nThe scaffold is not commit-valid by itself. Learn the required structure from\nthis skill, not from placeholder content in the scaffold.\n\n### `artifact.md`\n\n`artifact.md` is the contract for the artifact. It explains what the artifact\nis for, what conceptual material it is based on, how it should render, and how\nlater agents should maintain it.\n\nBefore commit, `artifact.md` must be non-empty and contain all of these exact\nheadings:\n\n```md\n## User intent\n## Purpose\n## Data shape\n## Data sources\n## Rendering\n## Update workflow\n## Non-goals\n```\n\nWhat each section should capture:\n\n- `## User intent`: faithful restatement or quotation of what the user actually said they wanted; this is critical and should preserve the user\'s language as closely as practical, including requests, feedback, complaints, constraints, and guidance\n- `## Purpose`: what the artifact is trying to achieve\n- `## Data shape`: the conceptual shape you reasoned about while authoring; for markdown artifacts this will often just be `{}`\n- `## Data sources`: where the underlying facts, notes, or source material came from and how they were obtained\n- `## Rendering`: how `public/index.md` or `public/index.html` should present it\n- `## Update workflow`: how future agents should refresh or modify it\n- `## Non-goals`: what is intentionally excluded, especially application-like runtime behavior\n\n### `data.json`\n\n`data.json` is a **thinking artifact**, not a runtime payload.\n\nIts purpose is to help the model separate:\n\n- reasoning / planning / authoring structure\n- from final presentation in `public/index.md` or `public/index.html`\n\nUse it to capture the pure conceptual shape of what you are about to render.\nThis is an authoring aid for agents, not an application data layer.\n\nHard rules:\n\n- **Do not treat `data.json` as live runtime state.**\n- **Do not write HTML/JS that loads, depends on, or synchronizes against `data.json`.**\n- **Do not build application-like data-driven artifacts.**\n- **We do not support runtime data-backed artifacts at this time.**\n- Artifacts are static markdown or static HTML documents.\n- HTML artifacts may include JavaScript and extra assets under `public/`, but\n that JavaScript must stay presentation-oriented and self-contained, not\n driven by `data.json` as an application state container.\n\nFor `text/markdown` artifacts, leave `data.json` as exactly:\n\n```json\n{}\n```\n\nThere is usually little value in separating content from presentation for\nmarkdown artifacts, so prefer `{}` unless there is a very strong authoring\nreason not to.\n\nFor `text/html` artifacts, use `data.json` only when it helps you think clearly\nabout the material before rendering. It may describe the conceptual structure\nof the artifact, but it must not become a runtime contract.\n\nValidation rule:\n\n- `data.json` must exist and contain valid JSON\n\nThe current validator does not require the JSON value to be an object, but an\nobject is the normal choice.\n\n### `memory.md`\n\n`memory.md` is the working scratchpad for later agents. Record decisions,\nlimitations, data-retrieval notes, problems encountered, what changed, and what\nshould be watched during future edits.\n\nRequired validation anchors:\n\n- `memory.md` must contain `## Activity Log`\n- `memory.md` must contain at least one UTC timestamp in exact\n `YYYY-MM-DDTHH:MM:SSZ` format\n- at least one timestamp must be from the last 30 minutes when you commit\n\nThe minimum required heading is:\n\n```md\n## Activity Log\n```\n\nWhat to record beyond that is up to the artifact and the work performed.\n\n### `public/index.md` and `public/index.html`\n\nThis is the rendered entry file that Television serves.\n\n- Markdown artifacts use `public/index.md`\n- HTML artifacts use `public/index.html`\n- the entry file must match the artifact `type`\n- the entry file must be non-empty before commit\n\nFor HTML artifacts:\n\n- `public/index.html` is a full HTML document, not a body fragment\n- additional public assets may live under `public/`\n- keep paths relative to `public/`\n\n## Quality bar\n\nBuild artifacts that are durable, truthful, and maintainable by later agents.\n\nRequired quality standards:\n\n- be faithful to source data\n- do not invent or hallucinate missing facts\n- do not silently truncate a dataset and pretend it is complete\n- prefer truth over completeness when those goals conflict\n- make limitations, sampling, missing data, and freshness visible\n- keep rendering aligned with the reasoning captured in `artifact.md`, `data.json`, and `memory.md`\n- keep `data.json` as an authoring/thinking artifact rather than a runtime dependency\n- keep the artifact maintainable by a future agent reading only the bundle files\n\nAnti-patterns:\n\n- cursory or low-effort data collection\n- fake data added to make the artifact look complete\n- brittle one-off hacks that a later agent cannot reproduce\n- hidden dependencies that are not documented in `artifact.md` or `memory.md`\n- layout churn during simple data refreshes when the data model did not change\n\n## HTML house style\n\nHTML artifacts should feel intentional and readable inside Television tiles.\n\nTelevision provides a full base stylesheet for HTML artifacts. Only add custom\nCSS when you need something not covered by the built-in styles. Prefer the base\nstyles and theme tokens so artifacts stay visually coherent with the rest of\nTelevision.\n\nHouse-style guidance:\n\n- use semantic HTML first\n- keep the most important information near the top\n- design for small, medium, and large tile sizes\n- avoid horizontal overflow unless there is no reasonable alternative\n- make empty states and error states explicit\n- prefer the built-in HTML styling before inventing custom component chrome\n\n### Elements\n\nStandard elements already have sensible defaults, so you usually do not need to\nstyle from scratch:\n\n- headings (`h1`\u2013`h6`) \u2014 sized and weighted\n- `p`, `ul`, `ol` \u2014 readable defaults\n- `code` and `pre` \u2014 monospace, muted background\n- `blockquote` \u2014 left border, muted text\n- `table`, `th`, `td` \u2014 bordered, striped headers\n- `button` \u2014 styled with border and hover state; use `size="sm"` or `size="md"` when appropriate\n- `hr` \u2014 subtle border\n- `a` \u2014 inherits color by default\n\n### `.prose` class\n\nUse a `.prose` wrapper for document-style HTML where readable vertical rhythm is\nappropriate. Do not rely on `.prose` for dashboards, tables, control surfaces,\nor dense custom layouts.\n\n```html\n<div class="prose">\n <h1>Title</h1>\n <p>Some content with proper spacing between elements.</p>\n <ul>\n <li>Item one</li>\n <li>Item two</li>\n </ul>\n</div>\n```\n\n### CSS variables\n\nUse the existing Television tokens when they are available in the runtime.\nThese are the preferred way to stay aligned with the app theme.\n\nColors:\n- `--color-bg` \u2014 page background\n- `--color-bg-muted` \u2014 subtle background\n- `--color-surface` \u2014 card or panel background\n- `--color-text` \u2014 primary text\n- `--color-text-muted` \u2014 secondary or label text\n- `--color-border` \u2014 border color\n\nSpacing:\n- `--space-4`\n- `--space-8`\n- `--space-12`\n- `--space-16`\n- `--space-24`\n- `--space-32`\n\nFonts:\n- `--font-sans`\n- `--font-mono`\n\nText sizes:\n- `--text-sm`\n- `--text-base`\n- `--text-lg`\n- `--text-xl`\n\nRadius:\n- `--radius-4`\n- `--radius-8`\n\n## Workflows\n\n### Create new internal artifact\n\n1. Decide that the result should be an internal artifact.\n2. Start the pending bundle:\n\n```bash\ntv create-internal-artifact --screen "<screen-id>" --type text/markdown --title "Artifact title" --focus\n```\n\nOr:\n\n```bash\ntv create-internal-artifact --screen "<screen-id>" --type text/html --title "Artifact title" --no-focus\n```\n\n`--screen` is required for internal artifact creation so the artifact has immediate screen membership. `--focus` or `--no-focus` is also required so you explicitly decide whether the user should be taken to it now.\n\n3. Read the returned pending path and edit files there.\n4. Write `artifact.md`.\n5. In `artifact.md`, capture the user\'s language faithfully in `## User intent` before doing the rest of the authoring work. Use direct quotes when helpful, or a close paraphrase when that is clearer, but keep it representative of what the user actually said they wanted.\n6. Think through the artifact in a pure way and write `data.json` only as an authoring aid.\n7. For markdown artifacts, leave `data.json` as `{}` unless there is a compelling authoring reason not to.\n8. Render `public/index.md` or `public/index.html`.\n9. Append a current timestamped activity entry in `memory.md`.\n10. Commit:\n\n```bash\ntv commit-pending-artifact --id "<artifact-id>"\n```\n\n### Update internal artifact with fresh data\n\n1. Stage the edit:\n\n```bash\ntv edit-internal-artifact --id "<artifact-id>"\n```\n\n2. Read `artifact.md`, `data.json`, and `memory.md` before changing anything.\n3. Refresh the underlying facts or source material.\n4. Update `data.json` only if it helps clarify the authoring plan.\n5. For markdown artifacts, prefer to keep `data.json` as `{}`.\n6. Make the minimum rendering changes needed to keep the artifact correct.\n7. Record what changed in `memory.md`.\n8. Commit:\n\n```bash\ntv commit-pending-artifact --id "<artifact-id>"\n```\n\nAvoid unnecessary layout or styling churn during data-only refreshes.\n\n### Modify internal artifact from user feedback\n\n1. Stage the edit:\n\n```bash\ntv edit-internal-artifact --id "<artifact-id>"\n```\n\n2. Read `artifact.md`, `data.json`, and `memory.md`.\n3. Update `artifact.md` if the user intent or non-goals changed.\n4. When the user has added feedback, complaints, corrections, or new guidance, update `## User intent` so it remains a faithful record of what the user actually wants now. Preserve the user\'s language as closely as practical, using direct quotes or close paraphrases.\n5. Update `data.json` only if it improves the authoring model of the artifact.\n6. For markdown artifacts, prefer to keep `data.json` as `{}`.\n7. Adjust `public/index.md` or `public/index.html` as narrowly as possible.\n8. Record the request, decision, and resulting change in `memory.md`.\n9. Commit:\n\n```bash\ntv commit-pending-artifact --id "<artifact-id>"\n```\n\n### Abandon pending work\n\nIf the staged work should be discarded instead of committed:\n\n```bash\ntv abandon-pending-artifact --id "<artifact-id>"\n```\n\n### Create external artifact\n\nUse this when the file already exists on disk and Television should display it\nwithout owning a bundle:\n\n```bash\ntv create-external-artifact --screen "<screen-id>" --type text/markdown --title "Artifact title" --path /absolute/path/to/file.md --focus\n```\n\nOr:\n\n```bash\ntv create-external-artifact --screen "<screen-id>" --type text/html --title "Artifact title" --path /absolute/path/to/file.html --no-focus\n```\n\n`--screen` is required for CLI creation so the file has immediate screen membership. `--focus` or `--no-focus` is also required so you explicitly decide whether the user should be taken to it now.\n\nRules:\n\n- `--path` must be absolute\n- the file must already exist and be readable\n- the extension must match `type`\n- external artifacts do not use pending create, pending edit, commit, or abandon\n\n## CLI reference\n\nArtifact commands:\n\n```bash\ntv create-internal-artifact --screen "<screen-id>" --type <text/markdown|text/html> --title "Artifact title" (--focus|--no-focus)\ntv create-external-artifact --screen "<screen-id>" --type <text/markdown|text/html> --title "Artifact title" --path /absolute/path (--focus|--no-focus)\ntv edit-internal-artifact --id "<artifact-id>"\ntv commit-pending-artifact --id "<artifact-id>"\ntv abandon-pending-artifact --id "<artifact-id>"\ntv update-artifact --id "<artifact-id>" --title "New title"\ntv list-artifacts [--screen "<screen-id>"] [--unplaced]\ntv get-artifact --id "<artifact-id>"\ntv delete-artifact --id "<artifact-id>"\n```\n\nScreen commands:\n\n```bash\ntv create-screen --name "Screen name" (--focus|--no-focus)\ntv list-screens\ntv get-screen --id "<screen-id>"\ntv remove-screen --id "<screen-id>"\n```\n\nScreen membership commands:\n\n```bash\ntv attach-artifact --id "<artifact-id>" --screen "<screen-id>" (--focus|--no-focus)\ntv detach-artifact --id "<artifact-id>" --screen "<screen-id>"\n```\n\nViewer commands:\n\n```bash\ntv viewer-status\ntv set-active-screen --id "<screen-id>"\ntv focus-artifact --id "<artifact-id>" [--screen "<screen-id>"]\n```\n\nServer commands:\n\n```bash\ntv status\ntv storage-path\ntv serve\ntv stop\n```\n\nCLI behavior notes:\n\n- `--screen` is required on CLI create commands so new artifacts get immediate screen membership; use `tv attach-artifact` and `tv detach-artifact` for later screen membership changes\n- `tv create-screen`, `tv create-internal-artifact`, `tv create-external-artifact`, and `tv attach-artifact` require exactly one of `--focus` or `--no-focus`\n- workflow and mutation commands print plain text\n- read commands print JSON\n- `tv get-screen` includes artifact `kind` and `status`\n- `tv attach-artifact` appends a default-sized card to the right end of the strip; idempotent if the artifact is already on that screen\n- `tv detach-artifact` removes the card from a screen\'s layout; the artifact metadata is never touched, even on the last reference\n- `tv delete-artifact` is the way to globally remove an artifact (detaches from every screen, then trashes the bundle / forgets the external pointer / discards pending-create)\n- `tv list-artifacts` accepts `--screen <id>` to filter by screen membership and `--unplaced` to surface artifacts attached to no screen\n- `tv update-artifact` changes title metadata only\n- `tv set-active-screen` sets which screen the GUI is focused on; the change is persisted and broadcast to connected clients\n- `tv focus-artifact` is a transient nudge: clients switch screens if needed, scroll the artifact\'s card into view, and play a brief highlight animation; pass `--screen <id>` to pin which screen, otherwise the server picks one (preferring the active screen when the artifact is there)\n- `tv viewer-status` prints the active screen ID and the count of connected GUI clients\n- when the CLI reports an error, follow the directive to run `tv help`\n\n## Deferred or out of scope\n\nThese are not part of the current implementation:\n\n- `tv help <topic>`\n- restore-from-trash\n- pending-listing commands\n- attestation or nonce commands\n- stale pending cleanup or stale trash cleanup\n- markdown editor UI recovery\n- client-side pending presentation work\n- multi-section help output'.length > 0) {
|
|
50031
|
+
return '# Television\n\nTelevision is a persistent artifact screen for agents. Use it when the user\nshould be able to inspect, revisit, and refine a file-backed result instead of\nonly reading a chat reply.\n\nIf you lose context, run:\n\n```bash\ntv help\n```\n\nThat command prints this full skill as one blob. There is no topic-scoped help\nin the current implementation.\n\n## Mental model\n\n- A **screen** is a named viewer surface with a layout.\n- An **artifact** is a file-backed result that can exist independently of any\n screen. It can be unplaced, attached to one screen, or attached to multiple\n screens.\n- **Screen membership** is separate from artifact identity: attaching/detaching\n controls which screens show an artifact; deleting removes the artifact\n globally. The CLI create commands require `--screen` so in-progress artifacts\n are visible immediately.\n- An **internal artifact** is a Television-managed bundle. You create a pending\n bundle, edit files in that bundle, then commit it.\n- An **external artifact** is a pointer to an existing absolute file on disk.\n Television displays that file but does not own or delete it.\n- **Pending** means a create or edit is staged but not yet committed.\n- **Trash** means metadata and committed internal bundles moved out of the live\n tree. There is no restore workflow in the current scope.\n\nThe core workflow is:\n\n1. Decide whether the result should be internal or external.\n2. Decide whether the user should be taken to the new screen or artifact now, or whether the work should happen in the background.\n3. Create or stage the artifact with the CLI.\n4. For internal artifacts, edit files in the pending bundle.\n5. Commit when the validation rules are satisfied.\n\n## Focus and viewer attention\n\nTelevision separates state changes from viewer attention.\n\nState changes:\n\n- create a screen\n- create an artifact on a screen\n- attach an existing artifact to another screen\n\nViewer-attention changes:\n\n- switch to a screen\n- focus an artifact so clients switch screens if needed, scroll it into view, and highlight it\n\nAgent-facing create and attach commands require **exactly one** of `--focus` or `--no-focus`:\n\n- `tv create-screen`\n- `tv create-internal-artifact`\n- `tv create-external-artifact`\n- `tv attach-artifact`\n\nUse this decision rule:\n\n- use `--focus` when the user likely wants to inspect the new screen or artifact right away\n- use `--no-focus` when the user likely wants background setup while keeping attention on the current screen or on some other task\n\nHeuristic examples:\n\n- use `--focus` for requests like "show me", "open it", "put it on screen", "let me review it", or when the created thing is the obvious next object of attention\n- use `--no-focus` for requests like "set this up", "make it in the background", "prepare it", "wire this in", or when the user is still focused on something else\n\nImportant communication rule:\n\n- when you use `--no-focus`, explicitly say what you did in chat so the user knows the work happened even though Television did not switch views\n\nIf you forget these rules or the CLI rejects a command for missing focus intent, run `tv help` and reread this section before retrying.\n\n## User communication during multi-step workflows\n\nWhen you are doing a multi-step artifact workflow, keep the user informed as you\nprogress.\n\nRequired communication style:\n\n- verbalize key actions and decisions as they happen\n- keep the language concise\n- prefer short updates over long explanations\n- frame updates in the user\'s world and goals, not in the internal mechanics of the skill or CLI workflow\n- avoid technical workflow jargon unless the user explicitly asks for it\n- do not write reports, long paragraphs, or chatty summaries while the work is in progress\n- do not use lists unless the user explicitly asks for one\n- optimize for speed and token efficiency\n\nGood examples:\n\n- "Starting the artifact now."\n- "Reviewing the draft and source material."\n- "Updating the HTML and efficiently navigating the artifact creation flow."\n- "The artifact did not pass validation yet; fixing the draft notes and retrying."\n- "Finalizing the artifact now."\n- "Done."\n\nBad examples:\n\n- multi-paragraph progress reports\n- long retrospective narration during execution\n- verbose bullet lists for routine workflow steps\n\n## Internal versus external\n\nUse an **internal artifact** when:\n\n- the artifact is purpose-built for Television\n- Television should own the bundle structure\n- future agents should be able to maintain the result by reading bundle files\n- you need a staged create or staged edit workflow\n\nUse an **external artifact** when:\n\n- a real file already exists on disk\n- the user wants Television to display that existing file\n- you do not need a Television-managed bundle\n\nDecision rule:\n\n- If the result should be maintained as a Television-owned long-lived artifact,\n choose internal.\n- If the result is already a real file outside Television and should stay that\n way, choose external.\n\nSupported artifact types:\n\n- `text/markdown`\n- `text/html`\n\n## Internal bundle files\n\nEvery internal artifact bundle contains:\n\n- `artifact.md`\n- `data.json`\n- `memory.md`\n- `public/index.md` or `public/index.html`\n\nFresh pending bundles are intentionally minimal:\n\n- `artifact.md` is blank\n- `memory.md` is blank\n- `public/index.md` or `public/index.html` is blank\n- `data.json` is exactly `{}`\n\nThe scaffold is not commit-valid by itself. Learn the required structure from\nthis skill, not from placeholder content in the scaffold.\n\n### `artifact.md`\n\n`artifact.md` is the contract for the artifact. It explains what the artifact\nis for, what conceptual material it is based on, how it should render, and how\nlater agents should maintain it.\n\nBefore commit, `artifact.md` must be non-empty and contain all of these exact\nheadings:\n\n```md\n## User intent\n## Purpose\n## Data shape\n## Data sources\n## Rendering\n## Update workflow\n## Non-goals\n```\n\nWhat each section should capture:\n\n- `## User intent`: faithful restatement or quotation of what the user actually said they wanted; this is critical and should preserve the user\'s language as closely as practical, including requests, feedback, complaints, constraints, and guidance\n- `## Purpose`: what the artifact is trying to achieve\n- `## Data shape`: the conceptual shape you reasoned about while authoring; for markdown artifacts this will often just be `{}`\n- `## Data sources`: where the underlying facts, notes, or source material came from and how they were obtained\n- `## Rendering`: how `public/index.md` or `public/index.html` should present it\n- `## Update workflow`: how future agents should refresh or modify it\n- `## Non-goals`: what is intentionally excluded, especially application-like runtime behavior\n\n### `data.json`\n\n`data.json` is a **thinking artifact**, not a runtime payload.\n\nIts purpose is to help the model separate:\n\n- reasoning / planning / authoring structure\n- from final presentation in `public/index.md` or `public/index.html`\n\nUse it to capture the pure conceptual shape of what you are about to render.\nThis is an authoring aid for agents, not an application data layer.\n\nHard rules:\n\n- **Do not treat `data.json` as live runtime state.**\n- **Do not write HTML/JS that loads, depends on, or synchronizes against `data.json`.**\n- **Do not build application-like data-driven artifacts.**\n- **We do not support runtime data-backed artifacts at this time.**\n- Artifacts are static markdown or static HTML documents.\n- HTML artifacts may include JavaScript and extra assets under `public/`, but\n that JavaScript must stay presentation-oriented and self-contained, not\n driven by `data.json` as an application state container.\n\nFor `text/markdown` artifacts, leave `data.json` as exactly:\n\n```json\n{}\n```\n\nThere is usually little value in separating content from presentation for\nmarkdown artifacts, so prefer `{}` unless there is a very strong authoring\nreason not to.\n\nFor `text/html` artifacts, use `data.json` only when it helps you think clearly\nabout the material before rendering. It may describe the conceptual structure\nof the artifact, but it must not become a runtime contract.\n\nValidation rule:\n\n- `data.json` must exist and contain valid JSON\n\nThe current validator does not require the JSON value to be an object, but an\nobject is the normal choice.\n\n### `memory.md`\n\n`memory.md` is the working scratchpad for later agents. Record decisions,\nlimitations, data-retrieval notes, problems encountered, what changed, and what\nshould be watched during future edits.\n\nRequired validation anchors:\n\n- `memory.md` must contain `## Activity Log`\n- `memory.md` must contain at least one UTC timestamp in exact\n `YYYY-MM-DDTHH:MM:SSZ` format\n- at least one timestamp must be from the last 30 minutes when you commit\n\nThe minimum required heading is:\n\n```md\n## Activity Log\n```\n\nWhat to record beyond that is up to the artifact and the work performed.\n\n### `public/index.md` and `public/index.html`\n\nThis is the rendered entry file that Television serves.\n\n- Markdown artifacts use `public/index.md`\n- HTML artifacts use `public/index.html`\n- the entry file must match the artifact `type`\n- the entry file must be non-empty before commit\n\nFor HTML artifacts:\n\n- `public/index.html` is a full HTML document, not a body fragment\n- additional public assets may live under `public/`\n- keep paths relative to `public/`\n\n## Quality bar\n\nBuild artifacts that are durable, truthful, and maintainable by later agents.\n\nRequired quality standards:\n\n- be faithful to source data\n- do not invent or hallucinate missing facts\n- do not silently truncate a dataset and pretend it is complete\n- prefer truth over completeness when those goals conflict\n- make limitations, sampling, missing data, and freshness visible\n- keep rendering aligned with the reasoning captured in `artifact.md`, `data.json`, and `memory.md`\n- keep `data.json` as an authoring/thinking artifact rather than a runtime dependency\n- keep the artifact maintainable by a future agent reading only the bundle files\n\nAnti-patterns:\n\n- cursory or low-effort data collection\n- fake data added to make the artifact look complete\n- brittle one-off hacks that a later agent cannot reproduce\n- hidden dependencies that are not documented in `artifact.md` or `memory.md`\n- layout churn during simple data refreshes when the data model did not change\n\n## HTML house style\n\nHTML artifacts should feel intentional and readable inside Television tiles.\n\nTelevision provides a full base stylesheet for HTML artifacts. Only add custom\nCSS when you need something not covered by the built-in styles. Prefer the base\nstyles and theme tokens so artifacts stay visually coherent with the rest of\nTelevision.\n\nHouse-style guidance:\n\n- use semantic HTML first\n- keep the most important information near the top\n- design for small, medium, and large tile sizes\n- avoid horizontal overflow unless there is no reasonable alternative\n- make empty states and error states explicit\n- prefer the built-in HTML styling before inventing custom component chrome\n\n### Elements\n\nStandard elements already have sensible defaults, so you usually do not need to\nstyle from scratch:\n\n- headings (`h1`\u2013`h6`) \u2014 sized and weighted\n- `p`, `ul`, `ol` \u2014 readable defaults\n- `code` and `pre` \u2014 monospace, muted background\n- `blockquote` \u2014 left border, muted text\n- `table`, `th`, `td` \u2014 bordered, striped headers\n- `button` \u2014 styled with border and hover state; use `size="sm"` or `size="md"` when appropriate\n- `hr` \u2014 subtle border\n- `a` \u2014 inherits color by default\n\n### `.prose` class\n\nUse a `.prose` wrapper for document-style HTML where readable vertical rhythm is\nappropriate. Do not rely on `.prose` for dashboards, tables, control surfaces,\nor dense custom layouts.\n\n```html\n<div class="prose">\n <h1>Title</h1>\n <p>Some content with proper spacing between elements.</p>\n <ul>\n <li>Item one</li>\n <li>Item two</li>\n </ul>\n</div>\n```\n\n### CSS variables\n\nUse the existing Television tokens when they are available in the runtime.\nThese are the preferred way to stay aligned with the app theme.\n\nColors:\n- `--color-bg` \u2014 page background\n- `--color-bg-muted` \u2014 subtle background\n- `--color-surface` \u2014 card or panel background\n- `--color-text` \u2014 primary text\n- `--color-text-muted` \u2014 secondary or label text\n- `--color-border` \u2014 border color\n\nSpacing:\n- `--space-4`\n- `--space-8`\n- `--space-12`\n- `--space-16`\n- `--space-24`\n- `--space-32`\n\nFonts:\n- `--font-sans`\n- `--font-mono`\n\nText sizes:\n- `--text-sm`\n- `--text-base`\n- `--text-lg`\n- `--text-xl`\n\nRadius:\n- `--radius-4`\n- `--radius-8`\n\n## Workflows\n\n### Create new internal artifact\n\n1. Decide that the result should be an internal artifact.\n2. Start the pending bundle:\n\n```bash\ntv create-internal-artifact --screen "<screen-id>" --type text/markdown --title "Artifact title" --focus\n```\n\nOr:\n\n```bash\ntv create-internal-artifact --screen "<screen-id>" --type text/html --title "Artifact title" --no-focus\n```\n\n`--screen` is required for internal artifact creation so the artifact has immediate screen membership. `--focus` or `--no-focus` is also required so you explicitly decide whether the user should be taken to it now.\n\n3. Read the returned pending path and edit files there.\n4. Write `artifact.md`.\n5. In `artifact.md`, capture the user\'s language faithfully in `## User intent` before doing the rest of the authoring work. Use direct quotes when helpful, or a close paraphrase when that is clearer, but keep it representative of what the user actually said they wanted.\n6. Think through the artifact in a pure way and write `data.json` only as an authoring aid.\n7. For markdown artifacts, leave `data.json` as `{}` unless there is a compelling authoring reason not to.\n8. Render `public/index.md` or `public/index.html`.\n9. Append a current timestamped activity entry in `memory.md`.\n10. Commit:\n\n```bash\ntv commit-pending-artifact --id "<artifact-id>"\n```\n\n### Update internal artifact with fresh data\n\n1. Stage the edit:\n\n```bash\ntv edit-internal-artifact --id "<artifact-id>"\n```\n\n2. Read `artifact.md`, `data.json`, and `memory.md` before changing anything.\n3. Refresh the underlying facts or source material.\n4. Update `data.json` only if it helps clarify the authoring plan.\n5. For markdown artifacts, prefer to keep `data.json` as `{}`.\n6. Make the minimum rendering changes needed to keep the artifact correct.\n7. Record what changed in `memory.md`.\n8. Commit:\n\n```bash\ntv commit-pending-artifact --id "<artifact-id>"\n```\n\nAvoid unnecessary layout or styling churn during data-only refreshes.\n\n### Modify internal artifact from user feedback\n\n1. Stage the edit:\n\n```bash\ntv edit-internal-artifact --id "<artifact-id>"\n```\n\n2. Read `artifact.md`, `data.json`, and `memory.md`.\n3. Update `artifact.md` if the user intent or non-goals changed.\n4. When the user has added feedback, complaints, corrections, or new guidance, update `## User intent` so it remains a faithful record of what the user actually wants now. Preserve the user\'s language as closely as practical, using direct quotes or close paraphrases.\n5. Update `data.json` only if it improves the authoring model of the artifact.\n6. For markdown artifacts, prefer to keep `data.json` as `{}`.\n7. Adjust `public/index.md` or `public/index.html` as narrowly as possible.\n8. Record the request, decision, and resulting change in `memory.md`.\n9. Commit:\n\n```bash\ntv commit-pending-artifact --id "<artifact-id>"\n```\n\n### Abandon pending work\n\nIf the staged work should be discarded instead of committed:\n\n```bash\ntv abandon-pending-artifact --id "<artifact-id>"\n```\n\n### Create external artifact\n\nUse this when the file already exists on disk and Television should display it\nwithout owning a bundle:\n\n```bash\ntv create-external-artifact --screen "<screen-id>" --type text/markdown --title "Artifact title" --path /absolute/path/to/file.md --focus\n```\n\nOr:\n\n```bash\ntv create-external-artifact --screen "<screen-id>" --type text/html --title "Artifact title" --path /absolute/path/to/file.html --no-focus\n```\n\n`--screen` is required for CLI creation so the file has immediate screen membership. `--focus` or `--no-focus` is also required so you explicitly decide whether the user should be taken to it now.\n\nRules:\n\n- `--path` must be absolute\n- the file must already exist and be readable\n- the extension must match `type`\n- external artifacts do not use pending create, pending edit, commit, or abandon\n\n## CLI reference\n\nArtifact commands:\n\n```bash\ntv create-internal-artifact --screen "<screen-id>" --type <text/markdown|text/html> --title "Artifact title" (--focus|--no-focus)\ntv create-external-artifact --screen "<screen-id>" --type <text/markdown|text/html> --title "Artifact title" --path /absolute/path (--focus|--no-focus)\ntv edit-internal-artifact --id "<artifact-id>"\ntv commit-pending-artifact --id "<artifact-id>"\ntv abandon-pending-artifact --id "<artifact-id>"\ntv update-artifact --id "<artifact-id>" --title "New title"\ntv list-artifacts [--screen "<screen-id>"] [--unplaced]\ntv get-artifact --id "<artifact-id>"\ntv delete-artifact --id "<artifact-id>"\n```\n\nScreen commands:\n\n```bash\ntv create-screen --name "Screen name" (--focus|--no-focus)\ntv list-screens\ntv get-screen --id "<screen-id>"\ntv remove-screen --id "<screen-id>"\n```\n\nScreen membership commands:\n\n```bash\ntv attach-artifact --id "<artifact-id>" --screen "<screen-id>" (--focus|--no-focus)\ntv detach-artifact --id "<artifact-id>" --screen "<screen-id>"\n```\n\nViewer commands:\n\n```bash\ntv viewer-status\ntv set-active-screen --id "<screen-id>"\ntv focus-artifact --id "<artifact-id>" [--screen "<screen-id>"]\n```\n\nServer commands:\n\n```bash\ntv status\ntv storage-path\ntv serve\ntv stop\n```\n\nCLI behavior notes:\n\n- `--screen` is required on CLI create commands so new artifacts get immediate screen membership; use `tv attach-artifact` and `tv detach-artifact` for later screen membership changes\n- `tv create-screen`, `tv create-internal-artifact`, `tv create-external-artifact`, and `tv attach-artifact` require exactly one of `--focus` or `--no-focus`\n- workflow and mutation commands print plain text\n- read commands print JSON\n- `tv get-screen` includes artifact `kind` and `status`\n- `tv attach-artifact` appends a default-sized card to the right end of the strip; idempotent if the artifact is already on that screen\n- `tv detach-artifact` removes the card from a screen\'s layout; the artifact metadata is never touched, even on the last reference\n- `tv delete-artifact` is the way to globally remove an artifact (detaches from every screen, then trashes the bundle / forgets the external pointer / discards pending-create)\n- `tv list-artifacts` accepts `--screen <id>` to filter by screen membership and `--unplaced` to surface artifacts attached to no screen\n- `tv update-artifact` changes title metadata only\n- `tv set-active-screen` sets which screen the GUI is focused on; the change is persisted and broadcast to connected clients\n- `tv focus-artifact` is a transient nudge: clients switch screens if needed, scroll the artifact\'s card into view, and play a brief highlight animation; pass `--screen <id>` to pin which screen, otherwise the server picks one (preferring the active screen when the artifact is there)\n- `tv viewer-status` prints the active screen ID and the count of connected GUI clients\n- when the CLI reports an error, follow the directive to run `tv help`\n\n## Deferred or out of scope\n\nThese are not part of the current implementation:\n\n- `tv help <topic>`\n- restore-from-trash\n- pending-listing commands\n- attestation or nonce commands\n- stale pending cleanup or stale trash cleanup\n- markdown editor UI recovery\n- client-side pending presentation work\n- multi-section help output';
|
|
50031
50032
|
}
|
|
50032
50033
|
const devSkillPath = import_node_path7.default.join(getDevPackageDir(), "skill/SKILL.md");
|
|
50033
50034
|
if (!(0, import_node_fs4.existsSync)(devSkillPath)) {
|
|
@@ -50104,6 +50105,16 @@ function validateExternalArtifactPath(inputPath) {
|
|
|
50104
50105
|
}
|
|
50105
50106
|
return inputPath;
|
|
50106
50107
|
}
|
|
50108
|
+
function resolveFocusDirective(argv, commandName) {
|
|
50109
|
+
const shouldFocus = argv.includes("--focus");
|
|
50110
|
+
const shouldNotFocus = argv.includes("--no-focus");
|
|
50111
|
+
if (shouldFocus === shouldNotFocus) {
|
|
50112
|
+
throw createDirectiveError(
|
|
50113
|
+
`tv ${commandName} requires exactly one of --focus or --no-focus. Television separates creation and placement from viewer attention; choose whether to show the result now or keep it in the background.`
|
|
50114
|
+
);
|
|
50115
|
+
}
|
|
50116
|
+
return shouldFocus;
|
|
50117
|
+
}
|
|
50107
50118
|
function formatArtifactRemovalResult(result) {
|
|
50108
50119
|
if (result.outcome === "unlinked") {
|
|
50109
50120
|
return [` ${result.artifactID}: unlinked (still referenced elsewhere)`];
|
|
@@ -50225,7 +50236,7 @@ function createEnvironment(environment) {
|
|
|
50225
50236
|
onSignal: environment.onSignal ?? ((signal, handler) => process.on(signal, handler))
|
|
50226
50237
|
};
|
|
50227
50238
|
}
|
|
50228
|
-
function createProgram(env) {
|
|
50239
|
+
function createProgram(env, argv = []) {
|
|
50229
50240
|
const program2 = new Command();
|
|
50230
50241
|
const createAuthenticatedClient = (serverURL) => {
|
|
50231
50242
|
return env.createClient(serverURL, readAuthToken(getTelevisionStoragePath()));
|
|
@@ -50289,7 +50300,8 @@ function createProgram(env) {
|
|
|
50289
50300
|
});
|
|
50290
50301
|
});
|
|
50291
50302
|
});
|
|
50292
|
-
program2.command("create-internal-artifact").description("Create a pending internal Television-managed artifact bundle").requiredOption("--screen <id>", "Target screen ID").requiredOption("--type <type>", `Artifact type (${ARTIFACT_TYPES.join(" or ")})`).requiredOption("--title <title>", "Artifact title").option("--server <url>", "Server URL", DEFAULT_SERVER_URL).action(async (opts) => {
|
|
50303
|
+
program2.command("create-internal-artifact").description("Create a pending internal Television-managed artifact bundle").requiredOption("--screen <id>", "Target screen ID").requiredOption("--type <type>", `Artifact type (${ARTIFACT_TYPES.join(" or ")})`).requiredOption("--title <title>", "Artifact title").option("--focus", "Switch viewer attention to the new artifact after creation").option("--no-focus", "Create the artifact in the background without changing viewer attention").option("--server <url>", "Server URL", DEFAULT_SERVER_URL).action(async (opts) => {
|
|
50304
|
+
const shouldFocus = resolveFocusDirective(argv, "create-internal-artifact");
|
|
50293
50305
|
if (!isArtifactType(opts.type)) {
|
|
50294
50306
|
throw createDirectiveError(
|
|
50295
50307
|
`tv create-internal-artifact requires --type to be one of: ${ARTIFACT_TYPES.join(", ")}.`
|
|
@@ -50301,6 +50313,9 @@ function createProgram(env) {
|
|
|
50301
50313
|
type: opts.type,
|
|
50302
50314
|
screenID: opts.screen
|
|
50303
50315
|
});
|
|
50316
|
+
if (shouldFocus) {
|
|
50317
|
+
await client.viewer.focus({ artifactID: result.artifact.id, screenID: opts.screen });
|
|
50318
|
+
}
|
|
50304
50319
|
if (!("pendingPath" in result)) {
|
|
50305
50320
|
throw new Error("Server did not return pendingPath for internal artifact creation");
|
|
50306
50321
|
}
|
|
@@ -50325,7 +50340,8 @@ function createProgram(env) {
|
|
|
50325
50340
|
await client.artifacts.abandonPending({ artifactID: opts.id });
|
|
50326
50341
|
writeLine(env.stdout, `Pending operation on artifact ${opts.id} abandoned.`);
|
|
50327
50342
|
});
|
|
50328
|
-
program2.command("create-external-artifact").description("Create an external artifact that points at an existing file").requiredOption("--screen <id>", "Target screen ID").requiredOption("--type <type>", `Artifact type (${ARTIFACT_TYPES.join(" or ")})`).requiredOption("--title <title>", "Artifact title").requiredOption("--path <path>", "Absolute path to an existing content file").option("--server <url>", "Server URL", DEFAULT_SERVER_URL).action(async (opts) => {
|
|
50343
|
+
program2.command("create-external-artifact").description("Create an external artifact that points at an existing file").requiredOption("--screen <id>", "Target screen ID").requiredOption("--type <type>", `Artifact type (${ARTIFACT_TYPES.join(" or ")})`).requiredOption("--title <title>", "Artifact title").requiredOption("--path <path>", "Absolute path to an existing content file").option("--focus", "Switch viewer attention to the new artifact after creation").option("--no-focus", "Create the artifact in the background without changing viewer attention").option("--server <url>", "Server URL", DEFAULT_SERVER_URL).action(async (opts) => {
|
|
50344
|
+
const shouldFocus = resolveFocusDirective(argv, "create-external-artifact");
|
|
50329
50345
|
if (!isArtifactType(opts.type)) {
|
|
50330
50346
|
throw createDirectiveError(
|
|
50331
50347
|
`tv create-external-artifact requires --type to be one of: ${ARTIFACT_TYPES.join(", ")}.`
|
|
@@ -50346,6 +50362,9 @@ If you wish to display temporary content to the user, use an internal artifact i
|
|
|
50346
50362
|
type: opts.type,
|
|
50347
50363
|
screenID: opts.screen
|
|
50348
50364
|
});
|
|
50365
|
+
if (shouldFocus) {
|
|
50366
|
+
await client.viewer.focus({ artifactID: artifact.id, screenID: opts.screen });
|
|
50367
|
+
}
|
|
50349
50368
|
writeLine(env.stdout, `External artifact ${artifact.id} created.`);
|
|
50350
50369
|
writeLine(env.stdout, `Television will display content from ${externalPath} and watch it for changes.`);
|
|
50351
50370
|
});
|
|
@@ -50372,12 +50391,16 @@ If you wish to display temporary content to the user, use an internal artifact i
|
|
|
50372
50391
|
);
|
|
50373
50392
|
await detachAction(opts);
|
|
50374
50393
|
});
|
|
50375
|
-
program2.command("attach-artifact").description("Attach an existing artifact to a screen by appending a card to the strip end").requiredOption("--id <id>", "Artifact ID").requiredOption("--screen <id>", "Screen ID").option("--server <url>", "Server URL", DEFAULT_SERVER_URL).action(async (opts) => {
|
|
50394
|
+
program2.command("attach-artifact").description("Attach an existing artifact to a screen by appending a card to the strip end").requiredOption("--id <id>", "Artifact ID").requiredOption("--screen <id>", "Screen ID").option("--focus", "Switch viewer attention to the artifact after attaching it").option("--no-focus", "Attach the artifact in the background without changing viewer attention").option("--server <url>", "Server URL", DEFAULT_SERVER_URL).action(async (opts) => {
|
|
50395
|
+
const shouldFocus = resolveFocusDirective(argv, "attach-artifact");
|
|
50376
50396
|
const client = createAuthenticatedClient(opts.server);
|
|
50377
50397
|
const result = await client.artifacts.attach({
|
|
50378
50398
|
artifactID: opts.id,
|
|
50379
50399
|
screenID: opts.screen
|
|
50380
50400
|
});
|
|
50401
|
+
if (shouldFocus) {
|
|
50402
|
+
await client.viewer.focus({ artifactID: opts.id, screenID: opts.screen });
|
|
50403
|
+
}
|
|
50381
50404
|
writeLine(
|
|
50382
50405
|
env.stdout,
|
|
50383
50406
|
`Artifact ${result.artifact.id} attached to screen ${result.screenID} as card ${result.cardID}.`
|
|
@@ -50401,9 +50424,13 @@ If you wish to display temporary content to the user, use an internal artifact i
|
|
|
50401
50424
|
if (opts.unplaced) filter.unplaced = true;
|
|
50402
50425
|
writeJSON(env.stdout, await client.artifacts.list(filter));
|
|
50403
50426
|
});
|
|
50404
|
-
program2.command("create-screen").description("Create a new screen").requiredOption("--name <name>", "Screen name").option("--server <url>", "Server URL", DEFAULT_SERVER_URL).action(async (opts) => {
|
|
50427
|
+
program2.command("create-screen").description("Create a new screen").requiredOption("--name <name>", "Screen name").option("--focus", "Switch Television to the new screen after creating it").option("--no-focus", "Create the screen in the background without switching Television").option("--server <url>", "Server URL", DEFAULT_SERVER_URL).action(async (opts) => {
|
|
50428
|
+
const shouldFocus = resolveFocusDirective(argv, "create-screen");
|
|
50405
50429
|
const client = createAuthenticatedClient(opts.server);
|
|
50406
50430
|
const { screen } = await client.screens.create({ name: opts.name });
|
|
50431
|
+
if (shouldFocus) {
|
|
50432
|
+
await client.viewer.setActive({ screenID: screen.id });
|
|
50433
|
+
}
|
|
50407
50434
|
writeLine(env.stdout, `Screen created: ${screen.id} (${screen.name})`);
|
|
50408
50435
|
});
|
|
50409
50436
|
program2.command("remove-screen").description("Move a screen to trash and cascade artifact removals").requiredOption("--id <id>", "Screen ID").option("--server <url>", "Server URL", DEFAULT_SERVER_URL).action(async (opts) => {
|
|
@@ -50483,7 +50510,7 @@ async function runCLI(argv, environment = {}) {
|
|
|
50483
50510
|
if (argv[0] === "help") {
|
|
50484
50511
|
throw createDirectiveError("tv help does not accept additional arguments.");
|
|
50485
50512
|
}
|
|
50486
|
-
const program2 = createProgram(env);
|
|
50513
|
+
const program2 = createProgram(env, argv);
|
|
50487
50514
|
await program2.parseAsync(argv, { from: "user" });
|
|
50488
50515
|
return 0;
|
|
50489
50516
|
} catch (error48) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
artifact-view{display:flex;flex-direction:column;width:100%;height:100%;border-radius:var(--radius-16);overflow:hidden;transition:box-shadow .15s ease,transform .15s ease}artifact-view .artifact-title-bar{display:flex;align-items:center;justify-content:space-between;height:30px;padding:0 6px 0 10px;border:0;box-shadow:inset 0 .5px 0 var(--color-border-muted);font-size:12px;font-weight:500;touch-action:none;-webkit-user-select:none;user-select:none}artifact-view[dragging=true]{box-shadow:0 6px 16px #00000024,0 20px 56px #0000003d}artifact-view[dragging=true] .artifact-title-bar{background:linear-gradient(180deg,var(--color-highlight),transparent),var(--color-surface-muted);backdrop-filter:none;-webkit-backdrop-filter:none}artifact-view .artifact-title-group{display:flex;align-items:center;gap:6px;min-width:0}artifact-view .artifact-title-icon{display:inline-flex;flex:none;color:var(--color-text-muted)}artifact-view .artifact-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}artifact-view .artifact-close-btn{width:20px;height:20px;border-radius:var(--radius-4)}artifact-view .artifact-content{flex:1;min-height:0;overflow:auto;background:var(--color-surface)}artifact-view iframe.artifact-frame{border:0;width:100%;display:block}artifact-view .artifact-placeholder{display:flex;align-items:center;justify-content:center;color:var(--color-text-muted, #888);font-size:12px}layout-view{width:100%;flex:1;min-width:0;min-height:0;display:flex;align-items:flex-start;padding:40px 0 60px;overflow:hidden;outline:none;position:relative;--layout-unit-x: 120px;--layout-unit-y: 120px;--layout-gap: 16px;--layout-drag-transition-ms: 0ms;--color-drag-target: color-mix( in srgb, var(--color-border, var(--neutral-300, #cbd5e1)) 55%, transparent )}layout-view .track{display:flex;align-items:start;gap:var(--layout-gap);flex-shrink:0;width:max-content;will-change:transform;transition:transform .2s ease}layout-view .node{display:grid;grid-template-columns:repeat(4,var(--layout-unit-x));grid-template-rows:repeat(6,var(--layout-unit-y));gap:var(--layout-gap);align-self:start;width:calc(var(--layout-unit-x) * 4 + var(--layout-gap) * 3);will-change:transform}layout-view .card-slot{border-radius:var(--radius-12);box-sizing:border-box;cursor:default;min-width:0;min-height:0;position:relative;z-index:1}layout-view .card-slot artifact-view{width:100%;height:100%}layout-view .card-placeholder{border-radius:var(--radius-12);background:var(--color-drag-target);position:relative;z-index:0}layout-view .card-placeholder[data-layout-placeholder-ghost=true]{background:transparent;border:0;opacity:0;pointer-events:none}layout-view .drag-preview{position:fixed;z-index:10;pointer-events:none}layout-view .drag-preview>*{width:100%;height:100%}@keyframes card-focus-pulse{0%{box-shadow:0 0 0 0 var(--color-accent, #3b82f6)}20%{box-shadow:0 0 0 6px color-mix(in srgb,var(--color-accent, #3b82f6) 60%,transparent)}40%{box-shadow:0 0 0 0 transparent}60%{box-shadow:0 0 0 6px color-mix(in srgb,var(--color-accent, #3b82f6) 60%,transparent)}to{box-shadow:0 0 0 0 transparent}}layout-view .card-slot.card-focus-pulse{animation:card-focus-pulse .6s ease-out 1}screen-view{width:100%;flex:1;min-width:0;min-height:0;display:flex;flex-direction:column}screen-view .empty{flex:1;display:flex;align-items:center;justify-content:center;margin:0;padding:16px;text-align:center;color:var(--color-text-muted)}home-screen{display:flex;flex-direction:column;flex:1;width:100%;min-height:100vh;padding:0 24px;box-sizing:border-box}home-screen:before,home-screen:after{content:"";flex:1 1 0}home-screen:before{min-height:20vh}home-screen .tiles,home-screen .empty{flex:0 0 auto;width:100%;max-width:560px;margin:0 auto}home-screen .tiles{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;list-style:none;padding:0}home-screen .tile{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:84px;padding:14px 16px;border-radius:var(--radius-16);text-align:left}home-screen .tile-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}home-screen .tile-star{flex:0 0 auto;display:inline-flex;align-items:center;color:var(--yellow-500)}home-screen .empty{color:var(--color-text-muted);text-align:center}screen-breadcrumb{display:inline-flex;align-items:center;gap:0;font-size:13px;font-weight:600;color:#000000b3}screen-breadcrumb[tone=dark]{color:#ffffffd9}screen-breadcrumb .home,screen-breadcrumb .star{border-radius:var(--radius-8)}screen-breadcrumb .star[data-starred]{color:var(--yellow-500)}screen-breadcrumb .separator{display:inline-flex;align-items:center;color:#00000059}screen-breadcrumb[tone=dark] .separator{color:#ffffff80}screen-breadcrumb dropdown-menu [slot=trigger]{padding:2px 6px;border-radius:var(--radius-8)}screen-breadcrumb ui-popover::part(panel){min-width:240px;font-weight:var(--font-weight-body)}screen-breadcrumb .screen-form{display:grid;gap:var(--space-12);color:var(--color-text);font-size:var(--text-base);font-weight:var(--font-weight-body)}screen-breadcrumb .screen-form .confirm-text{margin:0}screen-breadcrumb .screen-form .error{margin:0;color:var(--color-danger);font-size:var(--text-sm)}screen-breadcrumb .screen-form .actions{display:flex;justify-content:flex-end;gap:var(--space-6)}screen-create-button{display:inline-flex;align-items:center;color:#000000b3}screen-create-button[tone=dark]{color:#ffffffd9}screen-create-button .new-screen{border-radius:var(--radius-4)}message-history{position:relative;display:flex;flex-direction:column;min-height:0;color:#ffffffe6;line-height:1.5}message-history:not(:has(.message)){display:none}message-history .history-scroll{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:12px;padding:24px 8px 12px;overflow-y:auto;mask-image:linear-gradient(to bottom,transparent 0,black 24px,black calc(100% - 24px),transparent 100%);-webkit-mask-image:linear-gradient(to bottom,transparent 0,black 24px,black calc(100% - 24px),transparent 100%)}message-history[data-pinned] .history-scroll{mask-image:linear-gradient(to bottom,transparent 0,black 24px);-webkit-mask-image:linear-gradient(to bottom,transparent 0,black 24px)}message-history .message{padding:6px 10px;border-radius:var(--radius-8);word-wrap:break-word}message-history .message-user{align-self:flex-start;max-width:85%;background:#ffffff26;white-space:pre-wrap}message-history .message-assistant{align-self:stretch}message-history .message-tool_call{align-self:stretch;border:1px solid rgba(255,255,255,.12);background:#ffffff0d}message-history .tool-call-header{display:flex;align-items:baseline;justify-content:space-between;gap:8px}message-history .tool-call-title{font-weight:600}message-history .tool-call-meta{color:#fff9;font-size:.85em;white-space:nowrap}message-history .tool-call-text{margin:6px 0 0;padding:8px 10px;border-radius:var(--radius-8);background:#0003;color:#ffffffd9;overflow:auto;max-height:240px;white-space:pre-wrap;font-family:var(--font-mono);font-size:.9em}message-history .message-assistant>:first-child{margin-top:0}message-history .message-assistant>:last-child{margin-bottom:0}message-history .message-assistant p,message-history .message-assistant ul,message-history .message-assistant ol,message-history .message-assistant pre,message-history .message-assistant blockquote{margin:0 0 8px}message-history .message-assistant h1,message-history .message-assistant h2,message-history .message-assistant h3,message-history .message-assistant h4{margin:12px 0 4px;font-weight:600;line-height:1.3}message-history .message-assistant ul,message-history .message-assistant ol{padding-left:20px}message-history .message-assistant code{padding:1px 4px;border-radius:var(--radius-4);background:#ffffff1a;font-family:var(--font-mono);font-size:.9em}message-history .message-assistant pre{padding:8px 10px;border-radius:var(--radius-8);background:#ffffff14;overflow-x:auto}message-history .message-assistant pre code{padding:0;background:none}message-history .message-assistant blockquote{padding-left:10px;border-left:2px solid rgba(255,255,255,.2);color:#ffffffb3}message-history .message-assistant a{color:#fffffff2;text-decoration:underline;text-underline-offset:2px}message-history .history-jump{position:absolute;right:8px;bottom:8px;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:var(--radius-full);background:#ffffff26;color:#ffffffe6;transition:opacity .15s ease}message-history .history-jump:hover{background:#ffffff40}message-history[data-pinned] .history-jump{opacity:0;pointer-events:none}command-panel{display:flex;width:320px;padding:12px 16px;border-radius:var(--radius-16);z-index:1000}command-panel .trigger{flex:1;min-width:0;display:flex;align-items:center;justify-content:flex-start;gap:8px;color:#ffffff8c;line-height:1.4;cursor:text;outline:none}command-panel .trigger .label{flex:1;min-width:0;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}command-panel .trigger .kbd{flex:0 0 auto;padding:1px 6px;border-radius:var(--radius-4);background:#ffffff1a;border:.5px solid rgba(255,255,255,.15);color:#ffffff8c;font-size:.85em;line-height:1.3;letter-spacing:.02em}command-panel[open]{width:380px;padding:8px;flex-direction:column}command-panel[open] message-history{max-height:min(60vh,480px);margin:-8px -8px 0}command-panel[open] .input,command-panel[open] .input:focus{flex:0 0 auto;min-width:0;max-height:192px;padding:8px 10px;border:none;border-radius:var(--radius-8);resize:none;outline:none;box-shadow:none;background:#ffffff26;color:#ffffffe6;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:1.4;field-sizing:content}television-app{width:100%;height:100%;display:block;background:url(./gradient-textured-e-Dp94sOPT.jpg) center / cover no-repeat}.electron-draggable{-webkit-app-region:drag}.electron-draggable>*{-webkit-app-region:no-drag}television-app>main{position:relative;display:flex;flex-direction:column;width:100%;height:100%;min-width:0;min-height:0;-webkit-user-select:none;user-select:none}television-app>main.auth-gate{align-items:center;justify-content:center}television-app>main>screen-view,television-app>main>home-screen{flex:1;min-height:0}television-app>main>.chrome{position:absolute;top:0;right:0;bottom:0;left:0;padding:8px;pointer-events:none;display:flex;flex-direction:column}television-app>main>.chrome>*{pointer-events:auto}television-app>main>.chrome>.top-row{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-8, 8px)}body.electron television-app>main>.chrome>.top-row{padding-left:78px}television-app>main>.chrome>command-panel{margin-top:auto;align-self:flex-end}.auth-modal{width:min(384px,100%);display:flex;flex-direction:column;padding:20px;border:1px solid var(--color-border);border-radius:var(--radius-12);background:var(--color-bg)}.auth-form{display:flex;flex-direction:column;gap:12px}.auth-modal-title,.auth-modal-copy{margin:0}.auth-token-input-invalid{border-color:#c74343}:root{--color-bg: var(--neutral-200);--color-border: var(--neutral-300)}
|
|
1
|
+
artifact-view{display:flex;flex-direction:column;width:100%;height:100%;border-radius:var(--radius-16);overflow:hidden;transition:box-shadow .15s ease,transform .15s ease}artifact-view .artifact-title-bar{display:flex;align-items:center;justify-content:space-between;height:30px;padding:0 6px 0 10px;border:0;box-shadow:inset 0 .5px 0 var(--color-border-muted);font-size:12px;font-weight:500;touch-action:none;-webkit-user-select:none;user-select:none}artifact-view[dragging=true]{box-shadow:0 6px 16px #00000024,0 20px 56px #0000003d}artifact-view[dragging=true] .artifact-title-bar{background:linear-gradient(180deg,var(--color-highlight),transparent),var(--color-surface-muted);backdrop-filter:none;-webkit-backdrop-filter:none}artifact-view .artifact-title-group{display:flex;align-items:center;gap:6px;min-width:0}artifact-view .artifact-title-icon{display:inline-flex;flex:none;color:var(--color-text-muted)}artifact-view .artifact-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}artifact-view .artifact-close-btn{width:20px;height:20px;border-radius:var(--radius-4)}artifact-view .artifact-content{flex:1;min-height:0;overflow:auto;background:var(--color-surface)}artifact-view iframe.artifact-frame{border:0;width:100%;display:block}artifact-view .artifact-placeholder{display:flex;align-items:center;justify-content:center;color:var(--color-text-muted, #888);font-size:12px}layout-view{width:100%;flex:1;min-width:0;min-height:0;display:flex;align-items:flex-start;padding:40px 0 60px;overflow:hidden;outline:none;position:relative;--layout-unit-x: 120px;--layout-unit-y: 120px;--layout-gap: 16px;--layout-drag-transition-ms: 0ms;--color-drag-target: color-mix( in srgb, var(--color-border, var(--neutral-300, #cbd5e1)) 55%, transparent )}layout-view .track{display:flex;align-items:start;gap:var(--layout-gap);flex-shrink:0;width:max-content;will-change:transform;transition:transform .2s ease}layout-view .node{display:grid;grid-template-columns:repeat(4,var(--layout-unit-x));grid-template-rows:repeat(6,var(--layout-unit-y));gap:var(--layout-gap);align-self:start;width:calc(var(--layout-unit-x) * 4 + var(--layout-gap) * 3);will-change:transform}layout-view .card-slot{border-radius:var(--radius-12);box-sizing:border-box;cursor:default;min-width:0;min-height:0;position:relative;z-index:1}layout-view .card-slot artifact-view{width:100%;height:100%}layout-view .card-placeholder{border-radius:var(--radius-12);background:var(--color-drag-target);position:relative;z-index:0}layout-view .card-placeholder[data-layout-placeholder-ghost=true]{background:transparent;border:0;opacity:0;pointer-events:none}layout-view .drag-preview{position:fixed;z-index:10;pointer-events:none}layout-view .drag-preview>*{width:100%;height:100%}@keyframes card-focus-pulse{0%{box-shadow:0 0 0 0 var(--color-accent, #3b82f6)}20%{box-shadow:0 0 0 6px color-mix(in srgb,var(--color-accent, #3b82f6) 60%,transparent)}40%{box-shadow:0 0 0 0 transparent}60%{box-shadow:0 0 0 6px color-mix(in srgb,var(--color-accent, #3b82f6) 60%,transparent)}to{box-shadow:0 0 0 0 transparent}}layout-view .card-slot.card-focus-pulse{animation:card-focus-pulse .6s ease-out 1}screen-view{width:100%;flex:1;min-width:0;min-height:0;display:flex;flex-direction:column}screen-view .empty{flex:1;display:flex;align-items:center;justify-content:center;margin:0;padding:16px;text-align:center;color:var(--color-text-muted)}home-screen{display:flex;flex-direction:column;flex:1;width:100%;min-height:100vh;padding:0 24px;box-sizing:border-box}home-screen:before,home-screen:after{content:"";flex:1 1 0}home-screen:before{min-height:20vh}home-screen .tiles,home-screen .empty{flex:0 0 auto;width:100%;max-width:560px;margin:0 auto}home-screen .tiles{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;list-style:none;padding:0}home-screen .tile{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:84px;padding:14px 16px;border-radius:var(--radius-16);text-align:left}home-screen .tile-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}home-screen .tile-star{flex:0 0 auto;display:inline-flex;align-items:center;color:var(--yellow-500)}home-screen .empty{color:var(--color-text-muted);text-align:center}screen-breadcrumb{display:inline-flex;align-items:center;gap:0;font-size:13px;font-weight:600;color:#000000b3}screen-breadcrumb[tone=dark]{color:#ffffffd9}screen-breadcrumb .home,screen-breadcrumb .star{border-radius:var(--radius-8)}screen-breadcrumb .star[data-starred]{color:var(--yellow-500)}screen-breadcrumb .separator{display:inline-flex;align-items:center;color:#00000059}screen-breadcrumb[tone=dark] .separator{color:#ffffff80}screen-breadcrumb dropdown-menu [slot=trigger]{padding:2px 6px;border-radius:var(--radius-8)}screen-breadcrumb ui-popover::part(panel){min-width:240px;font-weight:var(--font-weight-body)}screen-breadcrumb .screen-form{display:grid;gap:var(--space-12);color:var(--color-text);font-size:var(--text-base);font-weight:var(--font-weight-body)}screen-breadcrumb .screen-form .confirm-text{margin:0}screen-breadcrumb .screen-form .error{margin:0;color:var(--color-danger);font-size:var(--text-sm)}screen-breadcrumb .screen-form .actions{display:flex;justify-content:flex-end;gap:var(--space-6)}screen-create-button{display:inline-flex;align-items:center;color:#000000b3}screen-create-button[tone=dark]{color:#ffffffd9}screen-create-button .new-screen{border-radius:var(--radius-4)}message-history{position:relative;display:flex;flex-direction:column;min-height:0;color:#ffffffe6;line-height:1.5}message-history:not(:has(.message)){display:none}message-history .history-scroll{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:12px;padding:24px 8px 12px;overflow-y:auto;mask-image:linear-gradient(to bottom,transparent 0,black 24px,black calc(100% - 24px),transparent 100%);-webkit-mask-image:linear-gradient(to bottom,transparent 0,black 24px,black calc(100% - 24px),transparent 100%)}message-history[data-pinned] .history-scroll{mask-image:linear-gradient(to bottom,transparent 0,black 24px);-webkit-mask-image:linear-gradient(to bottom,transparent 0,black 24px)}message-history .message{padding:6px 10px;border-radius:var(--radius-8);word-wrap:break-word}message-history .message-user{align-self:flex-start;max-width:85%;background:#ffffff26;white-space:pre-wrap}message-history .message-assistant{align-self:stretch}message-history .message-tool_call{align-self:stretch;border:1px solid rgba(255,255,255,.12);background:#ffffff0d}message-history .tool-call-header{display:flex;align-items:baseline;justify-content:space-between;gap:8px}message-history .tool-call-title{font-weight:600}message-history .tool-call-meta{color:#fff9;font-size:.85em;white-space:nowrap}message-history .tool-call-text{margin:6px 0 0;padding:8px 10px;border-radius:var(--radius-8);background:#0003;color:#ffffffd9;overflow:auto;max-height:240px;white-space:pre-wrap;font-family:var(--font-mono);font-size:.9em}message-history .message-assistant>:first-child{margin-top:0}message-history .message-assistant>:last-child{margin-bottom:0}message-history .message-assistant p,message-history .message-assistant ul,message-history .message-assistant ol,message-history .message-assistant pre,message-history .message-assistant blockquote{margin:0 0 8px}message-history .message-assistant h1,message-history .message-assistant h2,message-history .message-assistant h3,message-history .message-assistant h4{margin:12px 0 4px;font-weight:600;line-height:1.3}message-history .message-assistant ul,message-history .message-assistant ol{padding-left:20px}message-history .message-assistant code{padding:1px 4px;border-radius:var(--radius-4);background:#ffffff1a;font-family:var(--font-mono);font-size:.9em}message-history .message-assistant pre{padding:8px 10px;border-radius:var(--radius-8);background:#ffffff14;overflow-x:auto}message-history .message-assistant pre code{padding:0;background:none}message-history .message-assistant blockquote{padding-left:10px;border-left:2px solid rgba(255,255,255,.2);color:#ffffffb3}message-history .message-assistant a{color:#fffffff2;text-decoration:underline;text-underline-offset:2px}message-history .history-jump{position:absolute;right:8px;bottom:8px;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:var(--radius-full);background:#ffffff26;color:#ffffffe6;transition:opacity .15s ease}message-history .history-jump:hover{background:#ffffff40}message-history[data-pinned] .history-jump{opacity:0;pointer-events:none}command-panel{display:flex;width:320px;padding:12px 16px;border-radius:var(--radius-16);z-index:1000}command-panel .trigger{flex:1;min-width:0;display:flex;align-items:center;justify-content:flex-start;gap:8px;color:#ffffff8c;line-height:1.4;cursor:text;outline:none}command-panel .trigger .label{flex:1;min-width:0;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}command-panel .trigger .kbd{flex:0 0 auto;padding:1px 6px;border-radius:var(--radius-4);background:#ffffff1a;border:.5px solid rgba(255,255,255,.15);color:#ffffff8c;font-size:.85em;line-height:1.3;letter-spacing:.02em}command-panel[open]{width:420px;max-width:100%;padding:0;flex-direction:column;gap:10px;border-radius:0}command-panel[open] .chat{border-radius:var(--radius-16);overflow:hidden;display:flex;flex-direction:column}command-panel[open] .chat message-history{max-height:min(60vh,480px)}command-panel[open] .input{display:flex;border-radius:var(--radius-16);padding:12px 16px;cursor:text}command-panel[open] .input .textarea,command-panel[open] .input .textarea:focus{flex:1;min-width:0;max-height:192px;padding:0;border:none;border-radius:0;resize:none;outline:none;box-shadow:none;background:transparent;color:#ffffffe6;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:1.4}television-app{width:100%;height:100%;display:block;background:url(./gradient-textured-e-Dp94sOPT.jpg) center / cover no-repeat}.electron-draggable{-webkit-app-region:drag}.electron-draggable>*{-webkit-app-region:no-drag}television-app>main{position:relative;display:flex;flex-direction:column;width:100%;height:100%;min-width:0;min-height:0;-webkit-user-select:none;user-select:none}television-app>main.auth-gate{align-items:center;justify-content:center}television-app>main>screen-view,television-app>main>home-screen{flex:1;min-height:0}television-app>main>.chrome{position:absolute;top:0;right:0;bottom:0;left:0;padding:8px;pointer-events:none;display:flex;flex-direction:column}television-app>main>.chrome>*{pointer-events:auto}television-app>main>.chrome>.top-row{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-8, 8px)}body.electron television-app>main>.chrome>.top-row{padding-left:78px}television-app>main>.chrome>command-panel{margin-top:auto;align-self:flex-end}@media (max-width: 560px){television-app>main>.chrome>command-panel{align-self:center}}.auth-modal{width:min(384px,100%);display:flex;flex-direction:column;padding:20px;border:1px solid var(--color-border);border-radius:var(--radius-12);background:var(--color-bg)}.auth-form{display:flex;flex-direction:column;gap:12px}.auth-modal-title,.auth-modal-copy{margin:0}.auth-token-input-invalid{border-color:#c74343}:root{--color-bg: var(--neutral-200);--color-border: var(--neutral-300)}
|