@point-seven-studio/jq-deck 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,6 +21,8 @@ export interface Args {
21
21
  }
22
22
  export declare function parseArgs(argv: string[], env?: Record<string, string | undefined>): Args;
23
23
  export interface Context {
24
+ /** Where running tools leave their notes (presence.ts), read for the links at the foot of the page. */
25
+ runningDir: string;
24
26
  /** The config file, read again on each page load for corrections made on the JQ Agents board. */
25
27
  configFile: string;
26
28
  port: number;
@@ -8,4 +8,5 @@ export declare const TABS: readonly ["overview", "sessions", "setup", "mail"];
8
8
  export type Tab = (typeof TABS)[number];
9
9
  /** The repository the Setup tab opens on: the asked one, else the first with something to fix. */
10
10
  export declare function pickRepo(repos: RepoRow[], asked: string | null): RepoRow | null;
11
- export declare function renderShell(o: Overview, tab: Tab, repo: string | null, version: string): string;
11
+ /** `bar` is the links to the other tools (presence.ts `toolbar`), or '' for a page with none. */
12
+ export declare function renderShell(o: Overview, tab: Tab, repo: string | null, version: string, bar?: string): string;
@@ -0,0 +1,38 @@
1
+ export type ToolId = 'deck' | 'groundcrew' | 'crosstalk' | 'agents';
2
+ export interface ToolInfo {
3
+ id: ToolId;
4
+ name: string;
5
+ /** What it shows, in a few words. */
6
+ what: string;
7
+ /** The port it serves on unless told otherwise. */
8
+ port: number;
9
+ /** The command that starts its page. */
10
+ run: string;
11
+ }
12
+ export declare const TOOLS: readonly ToolInfo[];
13
+ export declare function runningDir(env?: Record<string, string | undefined>): string;
14
+ /** Every tool, with the port of its running page or null. `isAlive` is a parameter so a test can decide. */
15
+ export declare function readRunning(dir?: string, isAlive?: (pid: number) => boolean): Record<ToolId, number | null>;
16
+ /**
17
+ * Say "this tool is serving on this port" until the process ends. Returns a function
18
+ * that takes the note away. Never throws: a tool that cannot write the note still runs,
19
+ * and the other pages show it as not running.
20
+ */
21
+ export declare function announce(tool: ToolId, port: number, dir?: string): () => void;
22
+ /** `"team": "https://..."` in ~/.jq/config.json. Null when absent, unreadable, or not an http(s) address. */
23
+ export declare function readTeamUrl(file?: string): string | null;
24
+ /** Works on every JQ page: each defines these colours, and the fallbacks cover one that does not. */
25
+ export declare const TOOLBAR_CSS = "\nbody{padding-bottom:64px}\n.jqbar{position:fixed;left:0;right:0;bottom:0;z-index:5;display:flex;flex-wrap:wrap;align-items:center;gap:4px 14px;padding:8px 16px;font:13px/1.4 system-ui,sans-serif;background:var(--card,Canvas);color:var(--fg,CanvasText);border-top:1px solid var(--line,GrayText)}\n.jqbar a{color:var(--link,LinkText)}\n.jqbar .here{font-weight:700}\n.jqbar details[open]{order:-1;flex-basis:100%}\n.jqbar summary{cursor:pointer;color:var(--mut,GrayText);list-style:none;display:inline-block;padding:2px 0}\n.jqbar summary::-webkit-details-marker{display:none}\n.jqbar summary::after{content:\" \u25B8\"}\n.jqbar details[open] summary::after{content:\" \u25BE\"}\n.jqbar summary small,.jqbar a small{font-size:11px;font-weight:400}\n.jqbar details>div{margin:4px 0 6px;padding:8px 10px;max-width:640px;border:1px solid var(--line,GrayText);border-radius:8px;background:var(--well,Canvas)}\n.jqbar details>div p{margin:0 0 4px}\n.jqbar code{font:12px ui-monospace,Menlo,monospace;word-break:break-all}\n.jqbar a:focus-visible,.jqbar summary:focus-visible{outline:2px solid var(--link,LinkText);outline-offset:2px}\n@media print{.jqbar{display:none}body{padding-bottom:0}}\n";
26
+ export interface ToolbarOptions {
27
+ /** The page this bar is on: a tool, or 'team' for the team board. */
28
+ here: ToolId | 'team';
29
+ /**
30
+ * What is running on the reader's own machine, when the page can know. Null when it
31
+ * cannot: the page is served from somewhere else.
32
+ */
33
+ running: Record<ToolId, number | null> | null;
34
+ /** The team board's address, when this machine knows one. Ignored on the team board itself. */
35
+ team?: string | null;
36
+ }
37
+ /** The bar's HTML. Put TOOLBAR_CSS in the page's style, and this just before </body>. */
38
+ export declare function toolbar(o: ToolbarOptions): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@point-seven-studio/jq-deck",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "One command, one local page: every Claude Code session on your machine, the setup check for each repository, and the mailbox between sessions. Read-only; sends nothing anywhere. Unofficial; not affiliated with or endorsed by Anthropic.",
5
5
  "bin": {
6
6
  "jq-deck": "dist/jq-deck.mjs"