@artifactshare/cli 0.14.0 → 0.15.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 +23 -0
- package/README.md +40 -0
- package/dist/cursor-acp-entry.js +1 -1
- package/dist/{cursor-notification-BBGHJ5v5.js → cursor-notification-Hz6fuACK.js} +11 -3
- package/dist/index.js +141 -1658
- package/package.json +1 -1
- package/skills/artifactshare/SKILL.md +71 -1
- package/skills/artifactshare/artifactshare.mdc +68 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artifactshare/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "Upload and share HTML, Markdown, folders, and static sites from terminals, AI agents, automation, and CI.",
|
|
5
5
|
"homepage": "https://artifactshare.com/connect",
|
|
6
6
|
"repository": {
|
|
@@ -4,7 +4,7 @@ description: Share, publish, upload, host, update, open, or read back existing f
|
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<!-- artifactshare-skill
|
|
7
|
-
version:
|
|
7
|
+
version: 42
|
|
8
8
|
managed: true
|
|
9
9
|
-->
|
|
10
10
|
|
|
@@ -246,6 +246,8 @@ npm exec --yes --package=@artifactshare/cli -- artifactshare comments post <arti
|
|
|
246
246
|
npm exec --yes --package=@artifactshare/cli -- artifactshare comments post <artifact-id-or-url> --body '<text>' --agent 'Claude' --json
|
|
247
247
|
```
|
|
248
248
|
|
|
249
|
+
Quoted comments are resolved in the viewer using the exact quote and surrounding context, never the nearest repeated words. `--quote-before` and `--quote-after` accept up to 400 characters per side; preserve spaces next to the quote. Creation does not search the artifact. Optional `anchor.position_state` is `unchecked` until that version is viewed, then `attached` or `needs-check`. Only `attached` maps to `anchor.state: attached`; both other states map to `orphaned`. Older responses may omit `position_state`. Local preview uses the same strict resolution on every reload and preserves the original quote when its position needs checking.
|
|
250
|
+
|
|
249
251
|
- `--reply-to <thread-id>` replies to an existing thread from `comments list`.
|
|
250
252
|
- `--quote <text>` anchors a new thread to the quoted text. Copy the text from
|
|
251
253
|
`artifacts get` so it matches exactly. When the same text appears more than
|
|
@@ -279,6 +281,12 @@ npm exec --yes --package=@artifactshare/cli -- artifactshare edit <artifact-id-o
|
|
|
279
281
|
npm exec --yes --package=@artifactshare/cli -- artifactshare delete <artifact-id-or-url> --json
|
|
280
282
|
```
|
|
281
283
|
|
|
284
|
+
- Owners with unrestricted credentials can set `edit <target> --retain-versions N`
|
|
285
|
+
to keep the latest N published versions, or `--retain-versions all` to keep all
|
|
286
|
+
future versions. Setting or lowering retention immediately deletes older
|
|
287
|
+
versions; the response reports `retain_versions` and `deleted_versions`.
|
|
288
|
+
Deleted version links return 404, while comments and surviving version numbers
|
|
289
|
+
remain. Agent-preset credentials cannot change retention.
|
|
282
290
|
- `edit` changes title, visibility, explicit viewers, or project placement
|
|
283
291
|
without adding a new version.
|
|
284
292
|
- Set `--visibility link` with `--link-expires-at <RFC3339 UTC>` for a finite
|
|
@@ -556,3 +564,65 @@ version menu and full history show the label as plain text.
|
|
|
556
564
|
`GET /api/shareables/:id/versions` remains a current-version lookup.
|
|
557
565
|
Labels are update-only: initial uploads, `share --key`, `append`, preview,
|
|
558
566
|
bridge publishing, and MCP update inputs do not accept them.
|
|
567
|
+
|
|
568
|
+
## Static-site scripts and data
|
|
569
|
+
|
|
570
|
+
Folder shares support WebAssembly, same-origin worker files, and `blob:` workers.
|
|
571
|
+
DuckDB-WASM can load from jsDelivr: its `getJsDelivrBundles()` setup uses a blob
|
|
572
|
+
worker to `importScripts()` the CDN worker and fetch its `.wasm` file. The existing
|
|
573
|
+
script CDNs are allowed inside blob workers; JavaScript `eval` and `new Function`
|
|
574
|
+
remain blocked in the page and its blob workers.
|
|
575
|
+
|
|
576
|
+
DuckDB-WASM loads runtime extensions such as `parquet` and `json` from
|
|
577
|
+
`https://extensions.duckdb.org/<duckdb-version>/<wasm_eh|wasm_mvp>/<name>.duckdb_extension.wasm`.
|
|
578
|
+
Static-site `connect-src` permits that origin: blob workers inherit the page's
|
|
579
|
+
policy, and same-origin JavaScript workers carry it. This permission covers
|
|
580
|
+
extension fetching, not arbitrary network origins.
|
|
581
|
+
|
|
582
|
+
To avoid the external extension request, bundle every needed extension matching
|
|
583
|
+
the DuckDB engine version and selected WASM platform. Preserve the repository's
|
|
584
|
+
version/platform layout, for example
|
|
585
|
+
`extensions/v1.4.3/wasm_eh/parquet.duckdb_extension.wasm` for `@duckdb/duckdb-wasm@1.32.0`.
|
|
586
|
+
The folder must match the engine version the page loads, which `SELECT version()`
|
|
587
|
+
reports, so pin the package version. In the page, compute
|
|
588
|
+
`new URL('extensions', location.href).href` (no trailing slash; DuckDB appends `/<version>/...`) and use that absolute same-origin
|
|
589
|
+
repository URL in `SET custom_extension_repository = '<absolute same-origin repository URL>'`
|
|
590
|
+
before any extension loads or queries. This avoids requests to the extension
|
|
591
|
+
host; jsDelivr core bundles still require CDN requests.
|
|
592
|
+
|
|
593
|
+
Keep data such as `data/*.parquet` in the shared folder. In the page, build an
|
|
594
|
+
absolute same-origin URL with `new URL('data/rows.parquet', location.href).href`
|
|
595
|
+
and pass it to DuckDB-WASM's `registerFileURL()` before querying the registered
|
|
596
|
+
file with SQL. Relative URLs cannot be resolved inside its blob worker.
|
|
597
|
+
Static-site binary assets support HTTP byte ranges. To refresh data while keeping
|
|
598
|
+
the same share URL, replace the data locally and update the folder as a new
|
|
599
|
+
version; each version retains its own isolated origin. Single-file HTML and
|
|
600
|
+
Markdown have different script policies; these permissions apply to folder shares.
|
|
601
|
+
|
|
602
|
+
### API-only static-site inheritance
|
|
603
|
+
|
|
604
|
+
`POST /api/shareables/:id/versions?artifact_kind=static_site` accepts one
|
|
605
|
+
`base_version` and repeated `delete_path` query parameters. For example,
|
|
606
|
+
`?artifact_kind=static_site&base_version=v1&delete_path=data/old.parquet&delete_path=old.js`
|
|
607
|
+
with multipart `file` parts for `data/a.parquet` replaces that data file, removes
|
|
608
|
+
the two listed paths, and inherits all other files without copying their objects.
|
|
609
|
+
The base must be the current published version; a stale base returns HTTP 409
|
|
610
|
+
`version_conflict`. It also supplies the expected version for agent credentials.
|
|
611
|
+
If `expected_version` is supplied, it must equal the base (otherwise HTTP 400
|
|
612
|
+
`validation-failed`). Neither parameter changes write permissions.
|
|
613
|
+
|
|
614
|
+
Deletion paths use the same normalization and validation as uploaded paths.
|
|
615
|
+
Sending and deleting the same path is invalid. A case-only addition requires
|
|
616
|
+
explicitly deleting the old spelling. An absent deletion path is harmless.
|
|
617
|
+
A base permits zero sent files, provided the resulting manifest still includes
|
|
618
|
+
`index.html` or `index.md`. Entrypoint precedence, file-count, total-size, and
|
|
619
|
+
case-collision checks apply to the complete resulting manifest. Without a base,
|
|
620
|
+
the existing full replacement behavior applies. Empty or repeated bases,
|
|
621
|
+
deletion without a base, and inheritance parameters on other artifact kinds
|
|
622
|
+
return HTTP 400 `validation-failed`.
|
|
623
|
+
|
|
624
|
+
Version size is the logical sum of that version's files. Workspace quota counts
|
|
625
|
+
physical objects once across retained versions; only sent files add bytes.
|
|
626
|
+
Pruning keeps objects referenced by remaining versions. Version URLs retain
|
|
627
|
+
immutable manifests. This is a REST API feature: there are no CLI `update`
|
|
628
|
+
flags, MCP inputs, or bridge inputs for inheritance.
|
|
@@ -4,7 +4,7 @@ alwaysApply: false
|
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<!-- artifactshare-skill
|
|
7
|
-
version:
|
|
7
|
+
version: 42
|
|
8
8
|
managed: true
|
|
9
9
|
-->
|
|
10
10
|
|
|
@@ -70,6 +70,8 @@ contain `$`, spaces, `*`, or `?`; use single quotes such as
|
|
|
70
70
|
- Fetch every document in a project with `download --project-id <id> --output <dir> --json`. Each artifact lands in `<dir>/<artifactId>/` and `<dir>/index.json` maps ids to titles, owners, and statuses. The listing includes other members' artifacts you can view; `spa` and `workspace_app` artifacts are skipped. Pass `--force` to replace previously downloaded artifact directories. A partial failure prints `ok: true` with the failure list on stdout and exits 1 — check both `index.json` and the exit code. Re-running against the same `<dir>` is an incremental sync: artifacts whose version is unchanged are reported as `unchanged` and not fetched again.
|
|
71
71
|
- Find artifact IDs with `artifacts list --json`; filter with `--project-id <id>`, `--home`, or `--query <text>`. With `--project-id`, the list includes other members' artifacts you can view (with `owner_email`); when `has_more` is true, continue with `--cursor <next_cursor>`. Resolve titles, project names, and URLs to IDs with `resolve <value> --json`.
|
|
72
72
|
- Comment with `comments post <target> --body '<text>' --json`. Reply with `--reply-to <thread-id>`. Anchor to quoted text with `--quote '<text>'`; add `--quote-before`/`--quote-after` to disambiguate. Declare the posting agent with `--agent '<name>'` (e.g. `Claude`); omit for no badge. `comments list` returns an `agent` field on agent-posted messages.
|
|
73
|
+
Quoted comments are resolved in the viewer using the exact quote and surrounding context, never the nearest repeated words. `--quote-before` and `--quote-after` accept up to 400 characters per side; preserve spaces next to the quote. Creation does not search the artifact. Optional `anchor.position_state` is `unchecked` until that version is viewed, then `attached` or `needs-check`. Only `attached` maps to `anchor.state: attached`; both other states map to `orphaned`. Older responses may omit `position_state`. Local preview uses the same strict resolution on every reload and preserves the original quote when its position needs checking.
|
|
74
|
+
|
|
73
75
|
- Edit, resolve, reopen, and delete comments with `comments edit`, `comments resolve`, `comments reopen`, and `comments delete` using IDs from `comments list`. Comment deletion cannot be undone; omit `--message-id` from `comments delete` only when the user wants the whole thread deleted.
|
|
74
76
|
- Change post-share settings with `edit <target>`: `--title`, `--visibility private|workspace|link`, `--link-expires-at <RFC3339 UTC>`, `--no-link-expiry`, `--grant-email`, `--revoke-email`, `--project-id`, `--home`. The expiry options are mutually exclusive; omit both to preserve an existing link expiry. Moving a `project` visibility file home makes it `private`. `move` remains for placement-only automation; prefer `edit`.
|
|
75
77
|
- For link errors, `link_sharing_plan_required` is a legacy code (Free can use link sharing now),
|
|
@@ -123,3 +125,68 @@ version menu and full history show the label as plain text.
|
|
|
123
125
|
`GET /api/shareables/:id/versions` remains a current-version lookup.
|
|
124
126
|
Labels are update-only: initial uploads, `share --key`, `append`, preview,
|
|
125
127
|
bridge publishing, and MCP update inputs do not accept them.
|
|
128
|
+
|
|
129
|
+
Owners with unrestricted credentials can use `edit <target> --retain-versions N` to keep the latest N versions, or `--retain-versions all` to clear the limit. Setting or lowering retention prunes older published versions immediately; the response includes `retain_versions` and `deleted_versions`. Comments and surviving version numbers remain. Agent-preset credentials cannot change retention.
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
## Static-site scripts and data
|
|
133
|
+
|
|
134
|
+
Folder shares support WebAssembly, same-origin worker files, and `blob:` workers.
|
|
135
|
+
DuckDB-WASM can load from jsDelivr: its `getJsDelivrBundles()` setup uses a blob
|
|
136
|
+
worker to `importScripts()` the CDN worker and fetch its `.wasm` file. The existing
|
|
137
|
+
script CDNs are allowed inside blob workers; JavaScript `eval` and `new Function`
|
|
138
|
+
remain blocked in the page and its blob workers.
|
|
139
|
+
|
|
140
|
+
DuckDB-WASM loads runtime extensions such as `parquet` and `json` from
|
|
141
|
+
`https://extensions.duckdb.org/<duckdb-version>/<wasm_eh|wasm_mvp>/<name>.duckdb_extension.wasm`.
|
|
142
|
+
Static-site `connect-src` permits that origin: blob workers inherit the page's
|
|
143
|
+
policy, and same-origin JavaScript workers carry it. This permission covers
|
|
144
|
+
extension fetching, not arbitrary network origins.
|
|
145
|
+
|
|
146
|
+
To avoid the external extension request, bundle every needed extension matching
|
|
147
|
+
the DuckDB engine version and selected WASM platform. Preserve the repository's
|
|
148
|
+
version/platform layout, for example
|
|
149
|
+
`extensions/v1.4.3/wasm_eh/parquet.duckdb_extension.wasm` for `@duckdb/duckdb-wasm@1.32.0`.
|
|
150
|
+
The folder must match the engine version the page loads, which `SELECT version()`
|
|
151
|
+
reports, so pin the package version. In the page, compute
|
|
152
|
+
`new URL('extensions', location.href).href` (no trailing slash; DuckDB appends `/<version>/...`) and use that absolute same-origin
|
|
153
|
+
repository URL in `SET custom_extension_repository = '<absolute same-origin repository URL>'`
|
|
154
|
+
before any extension loads or queries. This avoids requests to the extension
|
|
155
|
+
host; jsDelivr core bundles still require CDN requests.
|
|
156
|
+
|
|
157
|
+
Keep data such as `data/*.parquet` in the shared folder. In the page, build an
|
|
158
|
+
absolute same-origin URL with `new URL('data/rows.parquet', location.href).href`
|
|
159
|
+
and pass it to DuckDB-WASM's `registerFileURL()` before querying the registered
|
|
160
|
+
file with SQL. Relative URLs cannot be resolved inside its blob worker.
|
|
161
|
+
Static-site binary assets support HTTP byte ranges. To refresh data while keeping
|
|
162
|
+
the same share URL, replace the data locally and update the folder as a new
|
|
163
|
+
version; each version retains its own isolated origin. Single-file HTML and
|
|
164
|
+
Markdown have different script policies; these permissions apply to folder shares.
|
|
165
|
+
|
|
166
|
+
### API-only static-site inheritance
|
|
167
|
+
|
|
168
|
+
`POST /api/shareables/:id/versions?artifact_kind=static_site` accepts one
|
|
169
|
+
`base_version` and repeated `delete_path` query parameters. For example,
|
|
170
|
+
`?artifact_kind=static_site&base_version=v1&delete_path=data/old.parquet&delete_path=old.js`
|
|
171
|
+
with multipart `file` parts for `data/a.parquet` replaces that data file, removes
|
|
172
|
+
the two listed paths, and inherits all other files without copying their objects.
|
|
173
|
+
The base must be the current published version; a stale base returns HTTP 409
|
|
174
|
+
`version_conflict`. It also supplies the expected version for agent credentials.
|
|
175
|
+
If `expected_version` is supplied, it must equal the base (otherwise HTTP 400
|
|
176
|
+
`validation-failed`). Neither parameter changes write permissions.
|
|
177
|
+
|
|
178
|
+
Deletion paths use the same normalization and validation as uploaded paths.
|
|
179
|
+
Sending and deleting the same path is invalid. A case-only addition requires
|
|
180
|
+
explicitly deleting the old spelling. An absent deletion path is harmless.
|
|
181
|
+
A base permits zero sent files, provided the resulting manifest still includes
|
|
182
|
+
`index.html` or `index.md`. Entrypoint precedence, file-count, total-size, and
|
|
183
|
+
case-collision checks apply to the complete resulting manifest. Without a base,
|
|
184
|
+
the existing full replacement behavior applies. Empty or repeated bases,
|
|
185
|
+
deletion without a base, and inheritance parameters on other artifact kinds
|
|
186
|
+
return HTTP 400 `validation-failed`.
|
|
187
|
+
|
|
188
|
+
Version size is the logical sum of that version's files. Workspace quota counts
|
|
189
|
+
physical objects once across retained versions; only sent files add bytes.
|
|
190
|
+
Pruning keeps objects referenced by remaining versions. Version URLs retain
|
|
191
|
+
immutable manifests. This is a REST API feature: there are no CLI `update`
|
|
192
|
+
flags, MCP inputs, or bridge inputs for inheritance.
|