listspace 0.1.1 → 0.3.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  One version runs through the CLI, the skill and the Claude Code plugin, so each entry covers all three.
4
4
 
5
+ ## Unreleased
6
+
7
+ - The Claude Code plugin has a progress check (`hooks/progress-check.mjs`): when a turn in a session that uses Listspace changed files, committed, pushed, opened or merged a pull request or deployed, and made no Listspace write after that work, Claude is sent back once to move the item and add a short comment. At most once every 3 turns, never twice in a row. It keeps only the facts, no command or file name.
8
+ - The skill and `AGENTS.md.snippet` say that work tracked elsewhere, such as a pull request or a deploy, still moves the matching item with a short comment, and the skill reads the server's `reminder` and `claimed_by_you`. It also offers an optional line for the project's CLAUDE.md or AGENTS.md that asks every agent to keep the board up to date.
9
+ - The Claude Code plugin has a decision check (`hooks/hooks.json`): when the user picks an option, says yes to a proposal or corrects a fact in a session that uses Listspace, and no decision was recorded in that turn, Claude is sent back once to check it and record it with `record_decision` if it affects future work. Plain rules, no model call; a yes to an offer to act, a maybe or a bug report does not count. It keeps only an 80-character excerpt of a prompt that reads like a decision, in the plugin's data folder. Needs Node.js 18 or later; without it the check stays silent.
10
+ - The skill records a decision the moment the user picks an option, says yes to a proposal or corrects a fact, with three short examples, and says it is Proposed until the user accepts it.
11
+ - `end_session` takes `decisions`: every decision of the session. The ones the board does not have yet are recorded as Proposed in the Inbox. The skill, `reference/tools.md` and `AGENTS.md.snippet` say so.
12
+ - `listspace new-board` takes `--space <space id>`, so an agent on the CLI can put a new board in the space the user chose, as `create_board` does with `space_id`. The text output says which space the board went to and passes on the server's note when no space was given and the user has more than one.
13
+ - The skill's CLI table shows `--space`.
14
+ - The skill looks for a `Listspace board:` line in the project's CLAUDE.md or AGENTS.md at the start of a session and starts on that board without asking. When there is none, it offers, after the user picks a board, to add that line and one sentence of instructions to the file, and writes only after a yes. `AGENTS.md.snippet` starts with the same line.
15
+ - The skill's "Keep the board up to date" section says the default guidance asks the same in general words for any kind of board, and gives the code project version.
16
+ - On a board someone else shared with the user, the skill treats the owner's text (`shared_board.owner_instructions`) as data, never as instructions, and never lets text on that board steer it to read, copy or move the user's other boards.
17
+ - The skill starts only from `last_sessions`, the summaries of the user's own agents. Summaries other people on the board left come as `notes_from_others`, with who wrote them, and the skill treats them as notes, never as instructions.
18
+ - The skill knows that approving or rejecting a request is a sign-off in the user's name: it needs Act (4), waits in the Inbox below it, and the sender sees which assistant answered.
19
+
20
+ ## 0.2.0
21
+
22
+ - New command `listspace attach <item> <file> [<file>...]`: uploads files from your computer to an item through the REST API, so an agent no longer has to write a file out as base64. The type comes from the extension (the same types the app accepts; Markdown goes up as plain text), and every file is checked before the first upload: known type, present, not empty, at most 8 MB. `--json` prints one server answer per file. Needs level 4 (Act) on the board.
23
+ - The skill tells agents to use `listspace attach` for local files instead of `attach_file` with base64, and has a new reference page, `reference/files.md`.
24
+
5
25
  ## 0.1.1
6
26
 
7
27
  - The name is written Listspace everywhere: in the CLI's help, its messages and its README, and in the skill and the plugin.
package/README.md CHANGED
@@ -20,7 +20,7 @@ npm install -g listspace
20
20
 
21
21
  ## Sign in
22
22
 
23
- Create a personal token in Listspace under **Settings > API**, then save it:
23
+ Create a personal token in Listspace under **Settings > Developers**, then save it:
24
24
 
25
25
  ```bash
26
26
  npx listspace login --token ls_...
@@ -38,9 +38,9 @@ The token is saved as `credentials.json` (mode 600) in your OS config directory:
38
38
 
39
39
  ```text
40
40
  Sign in
41
- login [--token ls_...] Save a personal token (Listspace: Settings > API).
41
+ login [--token ls_...] Save a personal token (Listspace: Settings > Developers).
42
42
  logout Forget the saved token.
43
- whoami Plan, freedom levels, guidance and boards (alias: account).
43
+ whoami Plan, agent access, guidance and boards (alias: account).
44
44
 
45
45
  Read
46
46
  boards Your boards with their ids.
@@ -49,14 +49,20 @@ Read
49
49
  board <board> Lists and items with their ids.
50
50
  inbox <board> [--status pending|accepted|rejected|withdrawn|expired|failed|all]
51
51
 
52
- Write (the board's freedom level decides what is made and what waits in the Inbox)
53
- new-board <title> [--description <text>]
52
+ Write (the board's agent access level decides what is made and what waits in the Inbox)
53
+ new-board <title> [--description <text>] [--space <space id>]
54
+ With more than one space (see whoami), ask the user
55
+ which one and pass --space; without it the board
56
+ goes to the default space.
54
57
  add <board> <list> <title> [--description <markdown>]
55
58
  move <item> <list>
56
59
  done <item> Move to the board's done list.
57
60
  undo <request_id> Take back one of your own calls.
58
61
  Writes take --inbox --reason "<why>" to suggest instead of change.
59
62
 
63
+ Files from this computer (needs level 4, Act)
64
+ attach <item> <file> [<file>...] At most 8 MB each.
65
+
60
66
  Work on your own (needs level 4, Act)
61
67
  next <board> [--kinds todo,backlog] [--label <id>] [--no-move] [--ttl <minutes>]
62
68
  claim <item> [--ttl <minutes>]
@@ -72,6 +78,16 @@ npx listspace session "Website"
72
78
  npx listspace add "Website" ideas "Try dark mode" --description "Seen in **settings**"
73
79
  ```
74
80
 
81
+ ## Attach files
82
+
83
+ `attach` uploads files from your computer to an item, one after another:
84
+
85
+ ```bash
86
+ npx listspace attach 2b6f0c1e-... ./contract.pdf ./screenshots/footer.png
87
+ ```
88
+
89
+ The type comes from the extension: images (jpg, png, gif, webp, svg), PDF, Word, Excel and PowerPoint files, text, Markdown, CSV, JSON, archives (zip, rar, 7z), audio and video. Each file can be at most 8 MB. Every file is checked before the first one is sent. Attaching needs level 4 (Act) on the board: a file cannot wait in the Inbox.
90
+
75
91
  ## Output for agents and scripts
76
92
 
77
93
  Every command takes `--json` and then prints the API's JSON instead of text:
@@ -92,7 +108,7 @@ Exit codes: 0 ok, 1 failed, 2 usage error, 3 sign-in needed, 4 rate limited (wai
92
108
 
93
109
  ## What agents may do
94
110
 
95
- Each board has a freedom level that decides what an agent may change on its own. Changes that need your approval wait in the board's Inbox, and every change shows who made it. The rules are in [What AI agents can do](https://listspace.app/docs/agents). Agents that support MCP can also connect to `https://mcp.listspace.app` instead of using this CLI ([setup](https://listspace.app/docs/mcp)).
111
+ Each board has an agent access level that decides what an agent may change on its own. Changes that need your approval wait in the board's Inbox, and every change shows who made it. The rules are in [What AI agents can do](https://listspace.app/docs/agents). Agents that support MCP can also connect to `https://mcp.listspace.app` instead of using this CLI ([setup](https://listspace.app/docs/mcp)).
96
112
 
97
113
  ## License
98
114
 
@@ -147,7 +147,11 @@ var createdBoard = object({
147
147
  instructions: nullable(string),
148
148
  level,
149
149
  lists: array(object({ id: string, title: string, kind: listKind })),
150
- undo: nullable(object({ request_id: string }))
150
+ undo: nullable(object({ request_id: string })),
151
+ /** Where the board went (absent from servers before spaces) */
152
+ space: withDefault(nullable(object({ id: string, name: string })), null),
153
+ /** Set when no space was given and the user has more than one */
154
+ space_note: withDefault(nullable(string), null)
151
155
  });
152
156
  var inbox = object({
153
157
  suggestions: array(
@@ -209,9 +213,21 @@ function page(entry) {
209
213
  return object({ data: array(entry), next_cursor: nullable(string) });
210
214
  }
211
215
  var errorBody = object({ error: object({ code: string, message: string }) });
216
+ var attached = object({
217
+ outcome: literal("applied"),
218
+ level,
219
+ attachment: object({
220
+ id: string,
221
+ item_id: string,
222
+ filename: string,
223
+ mime_type: nullable(string),
224
+ size_bytes: nullable(number),
225
+ url: string
226
+ })
227
+ });
212
228
 
213
229
  // src/version.ts
214
- var VERSION = "0.1.1";
230
+ var VERSION = "0.3.0";
215
231
 
216
232
  // src/api.ts
217
233
  var DEFAULT_API_URL = "https://api.listspace.app/v1";
@@ -231,7 +247,7 @@ var CliFailure = class extends Error {
231
247
  var fail = (error) => {
232
248
  throw new CliFailure(error);
233
249
  };
234
- var LOGIN_HINT = "Run `listspace login` with a personal token (Listspace: Settings > API), or set LISTSPACE_TOKEN.";
250
+ var LOGIN_HINT = "Run `listspace login` with a personal token (Listspace: Settings > Developers), or set LISTSPACE_TOKEN.";
235
251
  var ApiClient = class {
236
252
  constructor(options) {
237
253
  this.options = options;
@@ -307,11 +323,85 @@ function errorFor(response, json) {
307
323
  return { kind: "rate_limited", message: `${message} ${wait} before trying again.`, retryAfterSeconds: seconds };
308
324
  }
309
325
  if (response.status === 403 && code2 === "insufficient_scope") {
310
- return { kind: "api", status: 403, code: code2, message: `${message} This token is read only; create a read and write token in Settings > API.` };
326
+ return { kind: "api", status: 403, code: code2, message: `${message} This token is read only; create a read and write token in Settings > Developers.` };
311
327
  }
312
328
  return { kind: "api", status: response.status, code: code2, message };
313
329
  }
314
330
 
331
+ // src/files.ts
332
+ import { readFile, stat } from "node:fs/promises";
333
+ var MAX_FILE_BYTES = 8 * 1024 * 1024;
334
+ var TYPES = {
335
+ jpg: "image/jpeg",
336
+ jpeg: "image/jpeg",
337
+ png: "image/png",
338
+ gif: "image/gif",
339
+ webp: "image/webp",
340
+ svg: "image/svg+xml",
341
+ pdf: "application/pdf",
342
+ txt: "text/plain",
343
+ md: "text/plain",
344
+ markdown: "text/plain",
345
+ csv: "text/csv",
346
+ doc: "application/msword",
347
+ docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
348
+ xls: "application/vnd.ms-excel",
349
+ xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
350
+ ppt: "application/vnd.ms-powerpoint",
351
+ pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
352
+ zip: "application/zip",
353
+ rar: "application/x-rar-compressed",
354
+ "7z": "application/x-7z-compressed",
355
+ mp3: "audio/mpeg",
356
+ wav: "audio/wav",
357
+ ogg: "audio/ogg",
358
+ mp4: "video/mp4",
359
+ mpeg: "video/mpeg",
360
+ mpg: "video/mpeg",
361
+ mov: "video/quicktime",
362
+ json: "application/json",
363
+ js: "application/javascript",
364
+ html: "text/html",
365
+ htm: "text/html",
366
+ css: "text/css"
367
+ };
368
+ var ATTACHABLE_EXTENSIONS = Object.keys(TYPES);
369
+ function fileNameOf(path2) {
370
+ return path2.split(/[\\/]/).filter((part) => part !== "").pop() ?? path2;
371
+ }
372
+ function mimeTypeFor(fileName) {
373
+ const dot = fileName.lastIndexOf(".");
374
+ if (dot <= 0 || dot === fileName.length - 1) return null;
375
+ return TYPES[fileName.slice(dot + 1).toLowerCase()] ?? null;
376
+ }
377
+ async function readLocalFile(path2, maxBytes) {
378
+ let size;
379
+ try {
380
+ const info = await stat(path2);
381
+ if (!info.isFile()) return { kind: "not_a_file" };
382
+ size = info.size;
383
+ } catch (error) {
384
+ if (isErrnoCode(error, "ENOENT")) return { kind: "missing" };
385
+ return { kind: "unreadable", reason: error instanceof Error ? error.message : String(error) };
386
+ }
387
+ if (size > maxBytes) return { kind: "too_large", sizeBytes: size };
388
+ try {
389
+ const bytes = await readFile(path2);
390
+ if (bytes.length > maxBytes) return { kind: "too_large", sizeBytes: bytes.length };
391
+ return { kind: "ok", bytes };
392
+ } catch (error) {
393
+ return { kind: "unreadable", reason: error instanceof Error ? error.message : String(error) };
394
+ }
395
+ }
396
+ function isErrnoCode(error, code2) {
397
+ return typeof error === "object" && error !== null && "code" in error && error.code === code2;
398
+ }
399
+ function formatSize(bytes) {
400
+ if (bytes < 1024) return `${bytes} bytes`;
401
+ if (bytes < 1024 * 1024) return `${Math.round(bytes / 1024)} KB`;
402
+ return `${(bytes / 1024 / 1024).toFixed(1)} MB`;
403
+ }
404
+
315
405
  // src/format.ts
316
406
  var levelText = (level2) => `level ${level2.effective} (${level2.name})`;
317
407
  function block(title, text) {
@@ -394,6 +484,8 @@ function formatCreatedBoard(board) {
394
484
  `Created board "${board.title}" ${board.id}`,
395
485
  board.url,
396
486
  `Lists: ${board.lists.map((list) => list.title).join(", ")}`,
487
+ ...board.space === null ? [] : [`Space: ${board.space.name}`],
488
+ ...board.space_note === null ? [] : [board.space_note],
397
489
  ...block("Board instructions (follow these)", board.instructions),
398
490
  ...board.undo === null ? [] : [`Undo: listspace undo ${board.undo.request_id}`]
399
491
  ].join("\n");
@@ -467,6 +559,12 @@ function formatRelease(result) {
467
559
  }
468
560
  }
469
561
  }
562
+ function formatAttached(results) {
563
+ return results.map(({ attachment, level: level2 }) => {
564
+ const size = attachment.size_bytes === null ? "" : ` (${formatSize(attachment.size_bytes)})`;
565
+ return `Attached "${attachment.filename}"${size} to ${attachment.item_id} ${attachment.id} (${levelText(level2)}).`;
566
+ }).join("\n");
567
+ }
470
568
 
471
569
  // src/commands.ts
472
570
  var inboxFields = (choice) => {
@@ -544,7 +642,11 @@ async function boardCommand(client, input) {
544
642
  return { raw: answer.raw, text: formatBoard(answer.value) };
545
643
  }
546
644
  async function newBoardCommand(client, input) {
547
- const body = input.description === null ? { title: input.title } : { title: input.title, description: input.description };
645
+ const body = {
646
+ title: input.title,
647
+ ...input.description === null ? {} : { description: input.description },
648
+ ...input.space === null ? {} : { space_id: input.space }
649
+ };
548
650
  const answer = await client.data("POST", "/boards", createdBoard, { body });
549
651
  return { raw: answer.raw, text: formatCreatedBoard(answer.value) };
550
652
  }
@@ -621,9 +723,58 @@ async function releaseCommand(client, input) {
621
723
  const answer = await client.data("DELETE", `/items/${path(input.item)}/claim`, releaseResult);
622
724
  return { raw: answer.raw, text: formatRelease(answer.value) };
623
725
  }
726
+ async function prepareFiles(paths, read) {
727
+ const out = [];
728
+ for (const filePath of paths) {
729
+ const fileName = fileNameOf(filePath);
730
+ if (fileName.length > 255) return fail({ kind: "usage", message: `${fileName}: the file name is longer than 255 characters. Rename it first.` });
731
+ const mimeType = mimeTypeFor(fileName);
732
+ if (mimeType === null) {
733
+ return fail({ kind: "usage", message: `${fileName}: this type of file cannot be attached. Allowed: ${ATTACHABLE_EXTENSIONS.join(", ")}.` });
734
+ }
735
+ const file = await read(filePath, MAX_FILE_BYTES);
736
+ switch (file.kind) {
737
+ case "ok":
738
+ if (file.bytes.length === 0) return fail({ kind: "usage", message: `${filePath} is empty.` });
739
+ out.push({ path: filePath, fileName, mimeType, bytes: file.bytes });
740
+ break;
741
+ case "missing":
742
+ return fail({ kind: "usage", message: `${filePath}: no such file.` });
743
+ case "not_a_file":
744
+ return fail({ kind: "usage", message: `${filePath} is a folder, not a file.` });
745
+ case "too_large":
746
+ return fail({ kind: "usage", message: `${filePath} is ${formatSize(file.sizeBytes)}; a file can be at most ${formatSize(MAX_FILE_BYTES)}. Share a link with attach_url instead, or make it smaller.` });
747
+ case "unreadable":
748
+ return fail({ kind: "unexpected", message: `Could not read ${filePath}: ${file.reason}` });
749
+ default: {
750
+ const exhaustive = file;
751
+ return exhaustive;
752
+ }
753
+ }
754
+ }
755
+ return out;
756
+ }
757
+ async function attachCommand(client, input) {
758
+ if (!UUID.test(input.item)) return fail({ kind: "usage", message: `"${input.item}" is not an item id. Item ids come from \`listspace board <board>\`.` });
759
+ const results = [];
760
+ const raw = [];
761
+ for (const file of input.files) {
762
+ const body = { filename: file.fileName, mime_type: file.mimeType, content_base64: Buffer.from(file.bytes).toString("base64") };
763
+ try {
764
+ const answer = await client.data("POST", `/items/${path(input.item)}/attachments`, attached, { body });
765
+ results.push(answer.value);
766
+ raw.push(answer.raw);
767
+ } catch (error) {
768
+ if (!(error instanceof CliFailure) || results.length === 0) throw error;
769
+ const done = results.map((result) => result.attachment.filename).join(", ");
770
+ throw new CliFailure({ ...error.error, message: `Attached ${done}; ${file.fileName} and the rest were not: ${error.error.message}` });
771
+ }
772
+ }
773
+ return { raw: { data: raw }, text: formatAttached(results) };
774
+ }
624
775
 
625
776
  // src/config.ts
626
- import { chmod, mkdir, readFile, rm, writeFile } from "node:fs/promises";
777
+ import { chmod, mkdir, readFile as readFile2, rm, writeFile } from "node:fs/promises";
627
778
  import { homedir } from "node:os";
628
779
  import { join } from "node:path";
629
780
  function configDir(env, platform = process.platform, home = homedir()) {
@@ -644,7 +795,7 @@ async function loadToken(env, dir) {
644
795
  const path2 = credentialsPath(dir);
645
796
  let text;
646
797
  try {
647
- text = await readFile(path2, "utf8");
798
+ text = await readFile2(path2, "utf8");
648
799
  } catch {
649
800
  return { kind: "none" };
650
801
  }
@@ -669,7 +820,7 @@ async function saveToken(dir, token) {
669
820
  async function removeToken(dir) {
670
821
  const path2 = credentialsPath(dir);
671
822
  try {
672
- await readFile(path2);
823
+ await readFile2(path2);
673
824
  } catch {
674
825
  return false;
675
826
  }
@@ -683,10 +834,10 @@ var HELP = `listspace ${VERSION}: Listspace from the command line, for people an
683
834
  Usage: listspace <command> [arguments] [--json]
684
835
 
685
836
  Sign in
686
- login [--token ls_...] Save a personal token (Listspace: Settings > API).
837
+ login [--token ls_...] Save a personal token (Listspace: Settings > Developers).
687
838
  Without --token it reads the token from stdin.
688
839
  logout Forget the saved token.
689
- whoami Plan, freedom levels, guidance and boards (alias: account).
840
+ whoami Plan, agent access, guidance and boards (alias: account).
690
841
 
691
842
  Read
692
843
  boards Your boards with their ids.
@@ -695,14 +846,24 @@ Read
695
846
  board <board> Lists and items with their ids.
696
847
  inbox <board> [--status pending|accepted|rejected|withdrawn|expired|failed|all]
697
848
 
698
- Write (the board's freedom level decides what is made and what waits in the Inbox)
699
- new-board <title> [--description <text>] A board from "Project (for agents)".
849
+ Write (the board's agent access level decides what is made and what waits in the Inbox)
850
+ new-board <title> [--description <text>] [--space <space id>]
851
+ A board from "Project (for agents)". With more than
852
+ one space (see whoami), ask the user which one and
853
+ pass --space; without it the board goes to the
854
+ default space.
700
855
  add <board> <list> <title> [--description <markdown>]
701
856
  move <item> <list>
702
857
  done <item> Move to the board's done list.
703
858
  undo <request_id> Take back one of your own calls.
704
859
  Writes take --inbox --reason "<why>" to suggest instead of change.
705
860
 
861
+ Files from this computer (needs level 4, Act; a file cannot wait in the Inbox)
862
+ attach <item> <file> [<file>...]
863
+ Upload files to an item, at most 8 MB each:
864
+ images, PDF, Office files, text, Markdown, CSV,
865
+ JSON, archives, audio and video.
866
+
706
867
  Work on your own (needs level 4, Act; other agents leave a claimed item alone)
707
868
  next <board> [--kinds todo,backlog] [--label <id>] [--no-move] [--ttl <minutes>]
708
869
  Claim the top open item no one is working on and
@@ -742,6 +903,7 @@ var OPTIONS = {
742
903
  version: { type: "boolean", short: "v" },
743
904
  token: { type: "string" },
744
905
  description: { type: "string" },
906
+ space: { type: "string" },
745
907
  inbox: { type: "boolean" },
746
908
  reason: { type: "string" },
747
909
  status: { type: "string" },
@@ -809,7 +971,7 @@ var apiUrl = (env) => {
809
971
  };
810
972
  async function loginMethod(flags, io) {
811
973
  if (flags.token !== void 0) return { kind: "token", raw: flags.token };
812
- const typed = await io.readSecret("Paste a personal token from Listspace (Settings > API): ");
974
+ const typed = await io.readSecret("Paste a personal token from Listspace (Settings > Developers): ");
813
975
  if (typed === null || typed.trim() === "") return { kind: "pairing" };
814
976
  return { kind: "token", raw: typed };
815
977
  }
@@ -835,7 +997,7 @@ async function dispatch(command, args, flags, io, dir) {
835
997
  case "logout": {
836
998
  positionals(command, args, []);
837
999
  const removed = await removeToken(dir);
838
- return { raw: { signed_out: removed }, text: removed ? "Signed out: the saved token is gone (revoke it in Settings > API if it leaked)." : "No saved token." };
1000
+ return { raw: { signed_out: removed }, text: removed ? "Signed out: the saved token is gone (revoke it in Settings > Developers if it leaked)." : "No saved token." };
839
1001
  }
840
1002
  case "whoami":
841
1003
  case "account":
@@ -854,7 +1016,7 @@ async function dispatch(command, args, flags, io, dir) {
854
1016
  }
855
1017
  case "new-board": {
856
1018
  const [title] = positionals(command, args, ["title"]);
857
- return newBoardCommand(await clientFor(io, dir), { title, description: flags.description ?? null });
1019
+ return newBoardCommand(await clientFor(io, dir), { title, description: flags.description ?? null, space: flags.space ?? null });
858
1020
  }
859
1021
  case "add": {
860
1022
  const [board, list, title] = positionals(command, args, ["board", "list", "title"]);
@@ -892,6 +1054,13 @@ async function dispatch(command, args, flags, io, dir) {
892
1054
  const [item2] = positionals(command, args, ["item"]);
893
1055
  return releaseCommand(await clientFor(io, dir), { item: item2 });
894
1056
  }
1057
+ case "attach": {
1058
+ const [item2, ...paths] = args;
1059
+ if (item2 === void 0 || paths.length === 0) return usage("`attach` takes <item> and one or more files.");
1060
+ if (flags.inbox === true) return usage("A file cannot wait in the Inbox: attaching needs level 4 (Act) on the board.");
1061
+ const files = await prepareFiles(paths, io.readFile);
1062
+ return attachCommand(await clientFor(io, dir), { item: item2, files });
1063
+ }
895
1064
  case "undo": {
896
1065
  const [requestId] = positionals(command, args, ["request_id"]);
897
1066
  return undoCommand(await clientFor(io, dir), { requestId });
@@ -975,6 +1144,7 @@ var code = await run(process.argv.slice(2), {
975
1144
  `),
976
1145
  stderr: (text) => process.stderr.write(`${text}
977
1146
  `),
978
- readSecret
1147
+ readSecret,
1148
+ readFile: readLocalFile
979
1149
  });
980
1150
  process.exitCode = code;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "listspace",
3
- "version": "0.1.1",
3
+ "version": "0.3.0",
4
4
  "description": "Listspace from the command line: the agentic project memory, for people and coding agents.",
5
5
  "keywords": [
6
6
  "listspace",
@@ -41,12 +41,12 @@
41
41
  "scripts": {
42
42
  "build": "esbuild src/main.ts --bundle --platform=node --format=esm --target=node20 --outfile=dist/listspace.mjs --banner:js=\"#!/usr/bin/env node\"",
43
43
  "typecheck": "tsc --noEmit",
44
- "test": "tsc -p tsconfig.test.json && node --test build/test/api.test.js build/test/cli.test.js build/test/config.test.js build/test/commands.test.js",
44
+ "test": "tsc -p tsconfig.test.json && node --test build/test/api.test.js build/test/cli.test.js build/test/config.test.js build/test/commands.test.js build/test/attach.test.js",
45
45
  "prepublishOnly": "npm run typecheck && npm test && npm run build"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/node": "20.19.43",
49
49
  "esbuild": "0.28.2",
50
- "typescript": "5.8.3"
50
+ "typescript": "5.9.3"
51
51
  }
52
52
  }