@productlobster/plob 0.1.6 → 0.1.7
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/README.md +28 -4
- package/dist/cli.js +920 -88
- package/dist/index.d.ts +19 -0
- package/dist/index.js +920 -88
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,11 +23,12 @@ plob --help
|
|
|
23
23
|
| `plob logout` | Remove the stored API key. |
|
|
24
24
|
| `plob guide` | Print the agent setup guide (local, no network). |
|
|
25
25
|
| `plob workspaces` | List accessible workspaces. |
|
|
26
|
-
| `plob audit --idea <text
|
|
27
|
-
| `plob launch --idea <text
|
|
26
|
+
| `plob audit [--idea <text>]` | Assess the workspace's existing product. |
|
|
27
|
+
| `plob launch [--idea <text>]` | Take the workspace's idea through the launch workflow. |
|
|
28
28
|
| `plob focused-analysis --question <text> [--analysis-type <id>]` | Run a single focused analysis. |
|
|
29
29
|
| `plob prototype [--context <text>] [--template <id>]` | Build a clickable prototype. |
|
|
30
30
|
| `plob refine --target <runId> --instruction <text>` | Re-run a prior run with new instructions. |
|
|
31
|
+
| `plob build --target <runId>` | Build the prototype and requirements from a finished launch run. |
|
|
31
32
|
| `plob run-status <runId> [--since <cursor>]` | Read a run's status. |
|
|
32
33
|
| `plob run-output <runId> [--stage <name>]` | Read structured run output. |
|
|
33
34
|
| `plob checkpoint-resolve <runId> <optionId>` | Resolve a pending decision in a run. |
|
|
@@ -37,17 +38,24 @@ plob --help
|
|
|
37
38
|
| `plob prototype-pack --prototype-id <id> [--out <dir>]` | Fetch a prototype ZIP reference (extracts when `--out` is set). |
|
|
38
39
|
| `plob document-list [--type <type>] [--run <runId>] [--latest] [--since <iso>] [--limit <n>] [--cursor <cursor>]` | List workspace documents. `--latest` applies only with `--type`. |
|
|
39
40
|
| `plob document-get --document-id <id>` | Read a document. |
|
|
41
|
+
| `plob analysis-pull <documentId> [--out <file>] [--body-only]` | Write one analysis document as Markdown, with the statements it rests on. |
|
|
40
42
|
| `plob document-put --document-id <id> --version-token <token> --content <markdown> [--idempotency-key <key>]` | Update a document. |
|
|
41
43
|
| `plob context-pack [--sections <list>] [--limit <n>] [--cursor <cursor>]` | Read accumulated workspace context. |
|
|
42
44
|
| `plob observe --kind <kind> --content <text> [--idempotency-key <key>]` | Record a single observation. |
|
|
43
45
|
| `plob ingest --bundle <path-or-dash> [--content-type <type>] [--source-name <name>] [--idempotency-key <key>]` | Ingest a bundle of notes. |
|
|
46
|
+
| `plob premise-list [--document-id <id> \| --run-id <id>] [--status <status>] [--cursor <cursor>]` | List the statements the workspace's analyses rely on, with suggested changes waiting for the person. Each line shows the premise id and the revision id `plob premise-propose` needs. Available once the workspace's server lists the `premise-list` tool. |
|
|
47
|
+
| `plob premise-propose --premise-id <id> --revision-id <id> --proposal <confirm\|correct> --evidence <text> [--text <text>] [--source-document-id <id>] [--idempotency-key <key>]` | Suggest a confirmation or a corrected wording for one statement, with your evidence, for the person to confirm. Needs `write:observe`. Prints the suggestion id and "Waiting for the person to confirm." Generates an idempotency key when none is given. Available once the workspace's server lists the `premise-propose` tool. |
|
|
44
48
|
| `plob --workspace <workspaceId> upload --file <path>` | Upload a document file to a workspace. |
|
|
45
49
|
| `plob --version` | Print the installed CLI version. |
|
|
46
50
|
|
|
47
51
|
`plob workspaces` lists the workspace your stored credential can access. The initial credential is workspace-bound, so it returns that single workspace.
|
|
48
52
|
|
|
53
|
+
`plob launch` and `plob audit` run on the workspace's stored product idea, the same product every start in the app uses, so leave `--idea` out. A different product needs a new workspace. These runs do not yet carry the onboarding context the app's Start Analysis adds. From plob 0.1.7 `--idea` is optional; when given, it is sent and must be the workspace's product. The server refuses a different product with `workspace_mismatch` and starts nothing: the key works only in its one workspace, so a new product needs a new workspace that the person creates in the app. The message says what the person does next and names the link, and `--json` carries it in `details.url`: the new-workspace page; the plan page when the plan has no room for another workspace, the trial has ended or an invoice is overdue; or, at a beta workspace allowance, the support email address. A workspace that is not set up yet refuses both commands until the person finishes setting it up in the app. A blank `--idea` is refused before any call.
|
|
54
|
+
|
|
49
55
|
`plob refine` starts a poll-only refinement of a prior run. It returns the child run id; poll it with `plob run-status`.
|
|
50
56
|
|
|
57
|
+
`plob build --target <runId>` builds the prototype, its solution design and its requirements from a finished launch run. It returns the build's run id; poll it with `plob run-status` and answer its checkpoint with `plob checkpoint-resolve`. Only a launch run that finished after its second checkpoint can be built; any other run in the workspace answers `conflict`, a run id from outside it answers `workspace_mismatch`, and nothing starts. If a build of that run is already under way, the command prints that build's run id instead of starting another. A blank `--target` is refused before any call. The first build of a run is included with it; a second build counts as one of the person's full analyses. When the build ends, the person gets one email from ProductLobster unless they turned emails off; the CLI sends none.
|
|
58
|
+
|
|
51
59
|
The global `--workspace <id>` option is used by `plob upload`; for every other command the workspace is resolved server-side from the stored API key, and the CLI never sends a workspace identifier.
|
|
52
60
|
|
|
53
61
|
## Examples
|
|
@@ -55,7 +63,7 @@ The global `--workspace <id>` option is used by `plob upload`; for every other c
|
|
|
55
63
|
Start a run and poll it as JSON:
|
|
56
64
|
|
|
57
65
|
```bash
|
|
58
|
-
plob --json launch
|
|
66
|
+
plob --json launch
|
|
59
67
|
plob --json run-status run_123 | jq .status
|
|
60
68
|
```
|
|
61
69
|
|
|
@@ -102,6 +110,21 @@ local filesystem: this does not defend against another process replacing parent
|
|
|
102
110
|
directories during extraction, and exclusive creation may not be reliable on
|
|
103
111
|
every network filesystem.
|
|
104
112
|
|
|
113
|
+
Pull one analysis as a Markdown file:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
plob analysis-pull doc_123 --out ./analysis.md
|
|
117
|
+
plob analysis-pull doc_123 --body-only > analysis.md
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
`plob analysis-pull` (plob 0.1.7 and later) reads the document with `document-get`, then the statements it cites with `premise-list`, on one connection. The Markdown is the title, the body, and, when the workspace records statements, a "What we're taking as true" section with one line per statement (its tier, its status, and "confirmed" when the person confirmed it), followed by one line counting the suggested changes waiting for the person on those statements. The text of a suggestion is never included. Server text quoted in the title and the statements is Markdown-escaped, so it cannot add headings, links, images or HTML. The section lists at most 200 statements and says so when there are more. When the workspace does not record statements, the section is left out and so are the `premiseCount` and `truncated` fields below and the JSON `premises` and `truncated`.
|
|
121
|
+
|
|
122
|
+
- `--out <file>` creates a new file (permissions 0600 on POSIX) that opens with a front-matter block holding `documentId`, `versionToken`, `premiseCount` (the statements listed) and `truncated`. It never overwrites or follows anything already at the path, a symlink included; the folder must already exist and allow writing, and a path ending in `/` is refused. Each refusal exits `2` with nothing written; a write that fails part-way removes the partial file. Stdout then carries only the metadata: `Wrote <path>` on a terminal, or one JSON document `{ path, documentId, versionToken, premiseCount, truncated }`, never the body.
|
|
123
|
+
- `--body-only` sends only the Markdown to stdout, even when stdout is piped, and writes the document id and version token to stderr; a failure then goes to stderr as text, so stdout is the Markdown or nothing. With `--out` it writes the file without front-matter. It cannot be combined with `--json` (exit `2`), and the Markdown still includes the title and the statements section.
|
|
124
|
+
- Otherwise output follows the usual rule: the document id, the version token and the Markdown on a terminal, or one JSON document (`document`, `premises`, `truncated`) under `--json` or a pipe.
|
|
125
|
+
|
|
126
|
+
The version token belongs to the stored document: use it with `plob document-put` to replace the stored body (read the body with `plob document-get`). Don't write the pulled Markdown back as it is, since it adds the title, the statements section and any front-matter. One pull makes several requests on the connection (about 4 for the document, plus one per page of up to 50 statements: up to about 14), and they count against the per-connection limit of about 50 requests a minute, so pull a few documents a minute rather than a whole workspace at once.
|
|
127
|
+
|
|
105
128
|
`plob upload` attaches one file to the selected workspace. Use the workspace `id` from `plob workspaces`, not the display name. The connection must include the `write:upload` scope. Supported extensions: `.pdf`, `.docx`, `.txt`, `.md`, `.markdown`, `.csv`, `.png`, `.jpg`, `.jpeg`, and `.webp`; files must be non-empty and at most 10 MB.
|
|
106
129
|
|
|
107
130
|
```bash
|
|
@@ -180,7 +203,8 @@ Anything shaped like an API key is redacted to `ak_[redacted]` in those diagnost
|
|
|
180
203
|
| 16 | Rate limited |
|
|
181
204
|
| 17 | CLI version revoked; upgrade before retrying |
|
|
182
205
|
| 18 | Backend temporarily unavailable; retry shortly |
|
|
183
|
-
| 19 |
|
|
206
|
+
| 19 | The account is read-only (trial or plan ended, or invoice overdue); the message says which |
|
|
207
|
+
| 20 | `not_available`: the command exists but is not turned on for this workspace; don't retry |
|
|
184
208
|
| 70 | Network or transport failure |
|
|
185
209
|
|
|
186
210
|
When the server reports a version is no longer supported, the CLI exits 17 and prints the npm upgrade command from the structured error details. In `--json` mode, the same detail is emitted in the single JSON error document.
|