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

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.
@@ -4,6 +4,8 @@ export declare const DEFAULT_PORT = 4316;
4
4
  export interface Args {
5
5
  json: boolean;
6
6
  watch: boolean;
7
+ /** --watch says nothing when a report goes through. For a login job, whose log would otherwise grow by a line a minute. */
8
+ quiet: boolean;
7
9
  exec: string | null;
8
10
  intervalS: number;
9
11
  /** Repositories --watch may report. null: not said on the command line. */
@@ -21,6 +23,8 @@ export interface Args {
21
23
  }
22
24
  export declare function parseArgs(argv: string[], env?: Record<string, string | undefined>): Args;
23
25
  export interface Context {
26
+ /** Where running tools leave their notes (presence.ts), read for the links at the foot of the page. */
27
+ runningDir: string;
24
28
  /** The config file, read again on each page load for corrections made on the JQ Agents board. */
25
29
  configFile: string;
26
30
  port: number;
@@ -0,0 +1,67 @@
1
+ export declare const JOB_LABEL = "studio.pointseven.jq-deck-report";
2
+ export declare const UNIT_NAME = "jq-deck-report.service";
3
+ export interface JoinArgs {
4
+ url: string;
5
+ repos: string[] | null;
6
+ sendQuestions: string[] | null;
7
+ intervalS: number;
8
+ /** The board's own page, saved as "team" so the local pages can link to it. */
9
+ board: string | null;
10
+ service: boolean;
11
+ config: string;
12
+ }
13
+ export declare function parseJoin(argv: string[], env?: Record<string, string | undefined>): JoinArgs;
14
+ /** Where everything join writes lives. `home` is passed in so tests use a folder of their own. */
15
+ export declare function joinPaths(home: string, platform?: NodeJS.Platform): {
16
+ dir: string;
17
+ token: string;
18
+ script: string;
19
+ log: string;
20
+ job: string | null;
21
+ };
22
+ /**
23
+ * The script is built by putting paths inside quotes. A path holding a quote, a dollar
24
+ * sign, a backtick, a backslash or a line break could end the quotes early, so such a
25
+ * path is refused. It is never escaped and hoped for.
26
+ */
27
+ export declare function safeForScript(what: string, value: string): string;
28
+ export interface ScriptParts {
29
+ node: string;
30
+ deck: string;
31
+ server: string;
32
+ url: string;
33
+ tokenFile: string;
34
+ configFile: string;
35
+ intervalS: number;
36
+ }
37
+ export declare function reportScript(p: ScriptParts): string;
38
+ /** A launchd job (macOS): started at login, restarted if it stops. */
39
+ export declare function launchdPlist(o: {
40
+ script: string;
41
+ log: string;
42
+ home: string;
43
+ }): string;
44
+ /** A systemd user unit (Linux). */
45
+ export declare function systemdUnit(o: {
46
+ script: string;
47
+ log: string;
48
+ home: string;
49
+ }): string;
50
+ /**
51
+ * On macOS a job started by the system may not read Desktop, Documents or Downloads
52
+ * unless the program is given Full Disk Access. Returns the folder's name when `tree`
53
+ * is inside one of them.
54
+ */
55
+ export declare function protectedFolder(tree: string, home: string, platform?: NodeJS.Platform): string | null;
56
+ /** Listed names that matched no repository with a session: usually a spelling slip. */
57
+ export declare function unmatched(listed: string[], repos: {
58
+ name: string;
59
+ remote: string | null;
60
+ tree: string;
61
+ }[]): string[];
62
+ /** Sets keys in the config file and keeps every other key as it was. */
63
+ export declare function mergeConfig(file: string, set: Record<string, unknown>): void;
64
+ /** The first file of this name on PATH, with links followed. Looked up by reading folders: nothing is run. */
65
+ export declare function findOnPath(name: string, envPath: string | undefined): string | null;
66
+ export declare function join(argv: string[], env?: NodeJS.ProcessEnv, home?: string): Promise<void>;
67
+ export declare function leave(home?: string): Promise<void>;
@@ -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.4.0",
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"