listspace 0.1.0 → 0.1.1
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 +14 -0
- package/README.md +3 -3
- package/dist/listspace.mjs +16 -12
- package/package.json +4 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
One version runs through the CLI, the skill and the Claude Code plugin, so each entry covers all three.
|
|
4
|
+
|
|
5
|
+
## 0.1.1
|
|
6
|
+
|
|
7
|
+
- The name is written Listspace everywhere: in the CLI's help, its messages and its README, and in the skill and the plugin.
|
|
8
|
+
- Spaces: the skill describes `list_spaces`, `create_space` and `update_space`, and `space_id` on boards (`list_boards`, `create_board`, `update_board`).
|
|
9
|
+
- Important items: the skill describes `list_important_items`, everything the user marked important, grouped by board.
|
|
10
|
+
- Link previews: the skill describes `link_previews` in `get_item` (title, image and site, and for books the ISBN, authors and summary).
|
|
11
|
+
|
|
12
|
+
## 0.1.0
|
|
13
|
+
|
|
14
|
+
- First release: sign in with a personal token, read boards, sessions and the Inbox, add items and move them (also to the done list), work through a board with `next`, `claim` and `release`, and undo your own calls.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# listspace
|
|
2
2
|
|
|
3
|
-
The command line for [
|
|
3
|
+
The command line for [Listspace](https://listspace.app), the project board your AI agents keep up to date. People and coding agents use it to read boards, add and move items, work through a board on their own, and undo their own changes. It talks to the Listspace REST API (`https://api.listspace.app/v1`).
|
|
4
4
|
|
|
5
5
|
Node 20 or later. No runtime dependencies.
|
|
6
6
|
|
|
@@ -20,7 +20,7 @@ npm install -g listspace
|
|
|
20
20
|
|
|
21
21
|
## Sign in
|
|
22
22
|
|
|
23
|
-
Create a personal token in
|
|
23
|
+
Create a personal token in Listspace under **Settings > API**, then save it:
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
26
|
npx listspace login --token ls_...
|
|
@@ -38,7 +38,7 @@ 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 (
|
|
41
|
+
login [--token ls_...] Save a personal token (Listspace: Settings > API).
|
|
42
42
|
logout Forget the saved token.
|
|
43
43
|
whoami Plan, freedom levels, guidance and boards (alias: account).
|
|
44
44
|
|
package/dist/listspace.mjs
CHANGED
|
@@ -9,11 +9,13 @@ import { parseArgs } from "node:util";
|
|
|
9
9
|
// src/decode.ts
|
|
10
10
|
var DecodeError = class extends Error {
|
|
11
11
|
constructor(path2, expected) {
|
|
12
|
-
super(`Unexpected response from
|
|
12
|
+
super(`Unexpected response from Listspace: ${path2} should be ${expected}.`);
|
|
13
13
|
this.path = path2;
|
|
14
14
|
this.expected = expected;
|
|
15
15
|
this.name = "DecodeError";
|
|
16
16
|
}
|
|
17
|
+
path;
|
|
18
|
+
expected;
|
|
17
19
|
};
|
|
18
20
|
function isRecord(value) {
|
|
19
21
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -209,7 +211,7 @@ function page(entry) {
|
|
|
209
211
|
var errorBody = object({ error: object({ code: string, message: string }) });
|
|
210
212
|
|
|
211
213
|
// src/version.ts
|
|
212
|
-
var VERSION = "0.1.
|
|
214
|
+
var VERSION = "0.1.1";
|
|
213
215
|
|
|
214
216
|
// src/api.ts
|
|
215
217
|
var DEFAULT_API_URL = "https://api.listspace.app/v1";
|
|
@@ -224,19 +226,21 @@ var CliFailure = class extends Error {
|
|
|
224
226
|
this.error = error;
|
|
225
227
|
this.name = "CliFailure";
|
|
226
228
|
}
|
|
229
|
+
error;
|
|
227
230
|
};
|
|
228
231
|
var fail = (error) => {
|
|
229
232
|
throw new CliFailure(error);
|
|
230
233
|
};
|
|
231
|
-
var LOGIN_HINT = "Run `listspace login` with a personal token (
|
|
234
|
+
var LOGIN_HINT = "Run `listspace login` with a personal token (Listspace: Settings > API), or set LISTSPACE_TOKEN.";
|
|
232
235
|
var ApiClient = class {
|
|
233
236
|
constructor(options) {
|
|
234
237
|
this.options = options;
|
|
235
238
|
}
|
|
239
|
+
options;
|
|
236
240
|
/** Sends one request and decodes `data` from the answer. */
|
|
237
241
|
async data(method, path2, decoder, init = {}) {
|
|
238
242
|
const json = await this.send(method, path2, init);
|
|
239
|
-
if (!isRecord(json) || !("data" in json)) return fail({ kind: "unexpected", message: "Unexpected response from
|
|
243
|
+
if (!isRecord(json) || !("data" in json)) return fail({ kind: "unexpected", message: "Unexpected response from Listspace: no data." });
|
|
240
244
|
return { value: decodeOrFail(decoder, json.data, "data"), raw: json.data };
|
|
241
245
|
}
|
|
242
246
|
/** Sends one request and decodes the whole body (list endpoints with next_cursor). */
|
|
@@ -263,7 +267,7 @@ var ApiClient = class {
|
|
|
263
267
|
);
|
|
264
268
|
} catch (cause) {
|
|
265
269
|
const reason = cause instanceof Error ? cause.message : String(cause);
|
|
266
|
-
return fail({ kind: "network", message: `Could not reach
|
|
270
|
+
return fail({ kind: "network", message: `Could not reach Listspace at ${url.origin}: ${reason}` });
|
|
267
271
|
}
|
|
268
272
|
const text = await response.text();
|
|
269
273
|
let json = null;
|
|
@@ -271,7 +275,7 @@ var ApiClient = class {
|
|
|
271
275
|
try {
|
|
272
276
|
json = JSON.parse(text);
|
|
273
277
|
} catch {
|
|
274
|
-
if (response.ok) return fail({ kind: "unexpected", message: `
|
|
278
|
+
if (response.ok) return fail({ kind: "unexpected", message: `Listspace answered ${response.status} with something that is not JSON.` });
|
|
275
279
|
}
|
|
276
280
|
}
|
|
277
281
|
if (response.ok) return json;
|
|
@@ -288,7 +292,7 @@ function decodeOrFail(decoder, value, path2) {
|
|
|
288
292
|
}
|
|
289
293
|
function errorFor(response, json) {
|
|
290
294
|
let code2 = "unknown";
|
|
291
|
-
let message = `
|
|
295
|
+
let message = `Listspace answered ${response.status}.`;
|
|
292
296
|
try {
|
|
293
297
|
const parsed = errorBody(json, "body");
|
|
294
298
|
code2 = parsed.error.code;
|
|
@@ -674,12 +678,12 @@ async function removeToken(dir) {
|
|
|
674
678
|
}
|
|
675
679
|
|
|
676
680
|
// src/cli.ts
|
|
677
|
-
var HELP = `listspace ${VERSION}:
|
|
681
|
+
var HELP = `listspace ${VERSION}: Listspace from the command line, for people and coding agents.
|
|
678
682
|
|
|
679
683
|
Usage: listspace <command> [arguments] [--json]
|
|
680
684
|
|
|
681
685
|
Sign in
|
|
682
|
-
login [--token ls_...] Save a personal token (
|
|
686
|
+
login [--token ls_...] Save a personal token (Listspace: Settings > API).
|
|
683
687
|
Without --token it reads the token from stdin.
|
|
684
688
|
logout Forget the saved token.
|
|
685
689
|
whoami Plan, freedom levels, guidance and boards (alias: account).
|
|
@@ -792,7 +796,7 @@ async function clientFor(io, dir) {
|
|
|
792
796
|
case "none":
|
|
793
797
|
return fail({ kind: "auth", message: `Not signed in. ${LOGIN_HINT}` });
|
|
794
798
|
case "invalid":
|
|
795
|
-
return fail({ kind: "auth", message: `The token in ${source.where} is not a
|
|
799
|
+
return fail({ kind: "auth", message: `The token in ${source.where} is not a Listspace token (ls_ and 43 characters). ${LOGIN_HINT}` });
|
|
796
800
|
default: {
|
|
797
801
|
const exhaustive = source;
|
|
798
802
|
return exhaustive;
|
|
@@ -805,7 +809,7 @@ var apiUrl = (env) => {
|
|
|
805
809
|
};
|
|
806
810
|
async function loginMethod(flags, io) {
|
|
807
811
|
if (flags.token !== void 0) return { kind: "token", raw: flags.token };
|
|
808
|
-
const typed = await io.readSecret("Paste a personal token from
|
|
812
|
+
const typed = await io.readSecret("Paste a personal token from Listspace (Settings > API): ");
|
|
809
813
|
if (typed === null || typed.trim() === "") return { kind: "pairing" };
|
|
810
814
|
return { kind: "token", raw: typed };
|
|
811
815
|
}
|
|
@@ -815,7 +819,7 @@ async function login(flags, io, dir) {
|
|
|
815
819
|
return usage("No token given. Pass --token ls_... or pipe one in (signing in from the browser comes later).");
|
|
816
820
|
}
|
|
817
821
|
const token = parseToken(method.raw);
|
|
818
|
-
if (token === null) return usage("That is not a
|
|
822
|
+
if (token === null) return usage("That is not a Listspace token: it starts with ls_ and has 43 more characters.");
|
|
819
823
|
const client = new ApiClient({ baseUrl: apiUrl(io.env), token, fetch: io.fetch });
|
|
820
824
|
const answer = await client.data("GET", "/account", account);
|
|
821
825
|
const path2 = await saveToken(dir, token);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "listspace",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Listspace from the command line: the agentic project memory, for people and coding agents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"listspace",
|
|
7
7
|
"cli",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"files": [
|
|
33
33
|
"dist/listspace.mjs",
|
|
34
34
|
"README.md",
|
|
35
|
+
"CHANGELOG.md",
|
|
35
36
|
"LICENSE"
|
|
36
37
|
],
|
|
37
38
|
"engines": {
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
48
|
"@types/node": "20.19.43",
|
|
48
|
-
"esbuild": "0.
|
|
49
|
+
"esbuild": "0.28.2",
|
|
49
50
|
"typescript": "5.8.3"
|
|
50
51
|
}
|
|
51
52
|
}
|