@artifactshare/cli 0.19.1 → 0.20.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 +10 -1
- package/README.md +34 -24
- package/dist/cli.js +683 -114
- package/package.json +1 -1
- package/skills/artifactshare/SKILL.md +86 -607
- package/skills/artifactshare/references/authentication-profiles-skills.md +72 -0
- package/skills/artifactshare/references/comments.md +64 -0
- package/skills/artifactshare/references/local-write-recovery.md +35 -0
- package/skills/artifactshare/references/organize-settings.md +109 -0
- package/skills/artifactshare/references/preview.md +155 -0
- package/skills/artifactshare/references/rest-api-only.md +76 -0
- package/skills/artifactshare/references/static-sites.md +39 -0
- package/skills/artifactshare/references/upload-path-safety.md +18 -0
- package/skills/artifactshare/references/version-labels.md +30 -0
- package/skills/artifactshare/artifactshare.mdc +0 -351
|
@@ -1,351 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Share, publish, upload, host, update, open, or read back existing files and Artifact Share URLs; or show a local file in the browser for review before sharing.
|
|
3
|
-
alwaysApply: false
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<!-- artifactshare-skill
|
|
7
|
-
version: 45
|
|
8
|
-
managed: true
|
|
9
|
-
-->
|
|
10
|
-
|
|
11
|
-
# Artifact Share CLI
|
|
12
|
-
|
|
13
|
-
Artifact Share is for the last step after a file already exists: share,
|
|
14
|
-
publish, upload, or host HTML pages, Markdown documents, folders, and static
|
|
15
|
-
sites; return a browser link; update the same URL; open or read back an
|
|
16
|
-
Artifact Share URL; and read or post comments. Use
|
|
17
|
-
`npm exec --yes --package=@artifactshare/cli -- artifactshare` from the terminal.
|
|
18
|
-
Run `npm exec --yes --package=@artifactshare/cli -- artifactshare <command> --help` before choosing a command.
|
|
19
|
-
|
|
20
|
-
Use this rule for Artifact Share, artifactshare, and contextual "as" requests.
|
|
21
|
-
Japanese requests such as `as でアップして` or `as に上げて` are strong
|
|
22
|
-
Artifact Share intents. In English, treat "as" as a user shorthand only when
|
|
23
|
-
the surrounding request is about sharing, publishing, updating, opening, or
|
|
24
|
-
reading a shared URL; bare English "as" alone is not an Artifact Share trigger.
|
|
25
|
-
|
|
26
|
-
Do not use this rule just because the user says "artifact". Claude Artifact is
|
|
27
|
-
for creating or designing an artifact inside the chat. Artifact Share is for
|
|
28
|
-
sharing, updating, opening, or reading back existing files, folders, static
|
|
29
|
-
sites, and Artifact Share URLs.
|
|
30
|
-
|
|
31
|
-
A user-named CLI or MCP route overrides automatic capability selection. Prefer
|
|
32
|
-
the CLI when a coding agent can work in a user-controlled workspace, fetch the
|
|
33
|
-
package, and connect to Artifact Share, even when MCP is available. Use
|
|
34
|
-
remote MCP for source text in chat or a temporary sandbox when CLI network
|
|
35
|
-
access is unavailable or uncertain; a temporary file alone is not enough to
|
|
36
|
-
try `npm exec`. MCP OAuth is separate from CLI authentication: follow the CLI
|
|
37
|
-
`auth_required` recovery, then reuse the saved profile.
|
|
38
|
-
Use `append <target> <path> --json` to append a non-empty UTF-8 file exactly
|
|
39
|
-
as-is to a single-file artifact. Markdown is appended at source end; HTML is
|
|
40
|
-
inserted before an ASCII case-insensitive `</body>` when present, or at source
|
|
41
|
-
end otherwise. It inserts no separator and does not support static sites.
|
|
42
|
-
|
|
43
|
-
Quote paths and free-form text before passing them through a shell. Paths may
|
|
44
|
-
contain `$`, spaces, `*`, or `?`; use single quotes such as
|
|
45
|
-
`'apps/web/app/routes/a.$id/index.tsx'` so the shell does not expand them.
|
|
46
|
-
|
|
47
|
-
- Always pass `--json`; on failure read `error.code`, `error.hint`, and `error.recovery`.
|
|
48
|
-
- Link sharing is available on every plan (Team workspaces can turn it off). Use `--visibility link` with
|
|
49
|
-
exactly one of `--link-expires-at <RFC3339 UTC>` or `--no-link-expiry`; omit
|
|
50
|
-
both to use the workspace default on share or preserve the current expiry on
|
|
51
|
-
edit. Results expose `link_expires_at` as a UTC timestamp or `null`. The
|
|
52
|
-
initial default is 30 days and the initial maximum is unlimited.
|
|
53
|
-
- For an attended coding agent on the user's own machine, use `login --preset agent --profile <name> --json`; add `--project <exact-name-or-id>` to confirm a fixed project or omit it to use the browser picker. In CI, issue an API token at `https://artifactshare.com/settings/tokens` and inject it with `ARTIFACTSHARE_TOKEN` or `--token`. A shared agent platform uses a workspace-managed bot credential in a trusted host outside the model sandbox; never expose it to model shell commands. Do not pass tokens to `login`.
|
|
54
|
-
- To save that token as a named profile without TTY or browser login, pipe it on standard input: `printf '%s' "$TOKEN" | npm exec --yes --package=@artifactshare/cli -- artifactshare profiles import-token --profile <name> --json`. Imported API-token profiles are not renewed by the CLI. Bot tokens (`asb_` prefix) import through the same command as rotating refresh credentials; overwriting an existing profile credential needs `--force`, and a rejected bot token reports `bot_token_invalid` (recovery is an admin reissue). Add `--allow-plaintext-token-store` only on a trusted machine without a native token store. That fallback is mode `0600` on POSIX and unavailable on Windows, where saved profiles require Credential Manager.
|
|
55
|
-
- Use `login --profile <name> --json` when a user is present for browser approval. The pending event on stderr includes `browser_open`. Profiles created by `login` renew expired CLI sessions automatically.
|
|
56
|
-
- Use `logout --profile <name> --json` to revoke a device-login credential before removing it locally; this keeps profile metadata. API-token profiles are removed locally only and their server token is not revoked.
|
|
57
|
-
- Switch profiles with `profiles use <name> --json`; list with `profiles list --json`; remove a profile entry and its credential with `profiles delete <name> --json`.
|
|
58
|
-
- When the user gives an Artifact Share URL, start with `open <artifact-id-or-url> --json`. It ensures this rule is installed or updated, then reads single-file artifacts or returns a `download` next command for static sites and multi-file artifacts.
|
|
59
|
-
- Destination lists include only active projects you can post into. A private project permits its creator, a current workspace owner/admin on the team plan, or a verified contributor/manager. On free and plus, admin status alone does not permit placement in another member’s private project. Viewer access and individual artifact grants do not authorize placement. Agents and bots still require their fixed project and a verified contributor/manager grant for private projects; publisher credentials cannot select projects.
|
|
60
|
-
- Share with `share <path> --json`. In JSON output, give the user `data.artifact.url`; the artifact ID is `data.artifact.id`. Do not rerun `share` just to inspect the JSON shape: without `--key`, each successful run creates a new artifact. Posting to a project delivers to the audience defined by that project. Pick it with `--project-id <id>` or `--project <name>` (by exact name), or use the saved default. With no destination, share posts to home. Choose `home_audience` by purpose: use `config set home_audience private --scope user --json` for a personal safe default in this CLI environment, use `--scope repository` only for a policy agreed by all participants, and use `--visibility private|workspace|link` for one home post. For link sharing, pass exactly one of `--link-expires-at <RFC3339 UTC>` or `--no-link-expiry`; omit both to use the workspace default. Confirm the resolved audience with `config get home_audience --scope effective --json`; `--grant-email` does not change the resolved default.
|
|
61
|
-
- If a successful `share` result contains `data.warnings`, tell the user each
|
|
62
|
-
warning explicitly. `slack_reauthorization_required` means project Slack
|
|
63
|
-
notifications are not being delivered until the channel is reauthorized.
|
|
64
|
-
- For new projects, pass `projects create <name> --visibility private|workspace`; persistent project defaults are documented in `projects create --help`. The complete `config --help` reference covers the canonical `home_audience`, user/repository/effective scopes, and resolution. `default_artifact_visibility` is a compatibility alias; `default_project_visibility` is the advanced project-creation default. Home resolution checks repository then user settings, including the alias at each scope, then product default `workspace`. Keyless `config get --json` returns only `home_audience`; pass an explicit key for either other setting. These settings do not change update, edit, Web, or MCP defaults.
|
|
65
|
-
- For repeat jobs with a stable caller-owned name, use `share <path> --key <key> --json`: the first run creates the artifact, later runs add versions to the same artifact.
|
|
66
|
-
- To keep an existing share URL, do not use `share --artifact-id`; add a version with `update <artifact-id-or-url> <path> --json`. `update` does not change title, visibility, viewers, or placement.
|
|
67
|
-
- After `login --preset agent`, updates require `--expected-version <version-id>` using `data.version.id` from the previous successful `share` or `update` output. If omitted, `expected_version_required` reports `recovery.kind: change_input`; retry with that value. `artifacts get` instead returns the current version as `data.version_id`.
|
|
68
|
-
|
|
69
|
-
Unknown options fail locally with `unknown_option` before authentication, requests,
|
|
70
|
-
or writes. Correct `details.option`; the hint suggests a nearby option when one
|
|
71
|
-
exists. Use the selected command’s `--help` to see accepted options.
|
|
72
|
-
A digits-only `--expected-version` fails with `invalid_expected_version`: pass a
|
|
73
|
-
version id from `data.version.id` in the previous share or update output, or
|
|
74
|
-
`data.version_id` from `artifacts get <target> --json` for a single-file artifact.
|
|
75
|
-
Both errors have `recovery.kind: change_input` and are agent-recoverable.
|
|
76
|
-
`unsupported_node_version` requires upgrading Node.js to 22.19.0 or newer;
|
|
77
|
-
it reports the current version and uses `recovery.kind: ask_human` with
|
|
78
|
-
`agent_recoverable: false` and `requires_human: true`.
|
|
79
|
-
- Read back with `artifacts get <target> --json`. Pass `--include versions` or `--include comments` to fetch history or comments in one call. If truncated, call again with `--offset` set to `next_offset`.
|
|
80
|
-
- In the successful JSON response, read the source from `data.content` and the current version from `data.version_id`. See `artifacts get --help` for the complete contract and continuation example.
|
|
81
|
-
- Download static-site bundles with `download <target> --output ./out --json`. Pass `--force` to overwrite an existing output directory.
|
|
82
|
-
- 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.
|
|
83
|
-
- 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`.
|
|
84
|
-
- 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.
|
|
85
|
-
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.
|
|
86
|
-
|
|
87
|
-
- 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.
|
|
88
|
-
- Change post-share settings with `edit <target>`: `--title`, `--visibility private|workspace|project|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. Project visibility requires the artifact to be in a project after the edit; use --project-id <id> in the same request if needed. An explicit --visibility project at home (including --home) is refused without changes. Moving a project-visible artifact home makes it private only when project visibility is not explicitly requested. `move` remains for placement-only automation; prefer `edit`.
|
|
89
|
-
- For link errors, `link_sharing_plan_required` is a legacy code (Free can use link sharing now),
|
|
90
|
-
`link_sharing_disabled` means the workspace owner (or a Team admin) must resume the workspace
|
|
91
|
-
setting, and `link_expiry_invalid` means the timestamp must be future and
|
|
92
|
-
within policy (or the workspace must allow `--no-link-expiry`);
|
|
93
|
-
`link_publish_rate_limited` means that, under the default thresholds, the
|
|
94
|
-
service observed 20 counted files before a publication in a Free workspace
|
|
95
|
-
less than 14 days old during its rolling 24-hour window. A file counts once
|
|
96
|
-
for its most recent change to link visibility, or for creation with link
|
|
97
|
-
visibility while it remains link-shared. Share with specific people.
|
|
98
|
-
`error.recovery` indicates `retry_later`; use `error.message` and
|
|
99
|
-
`error.hint` for when to retry. Retry the link publication later instead of
|
|
100
|
-
retrying immediately with unchanged input.
|
|
101
|
-
- `artifacts delete <artifact-id-or-url>` is an alias of `delete`; both return JSON `command: "delete"`. Keep using top-level `delete` in deletion workflows.
|
|
102
|
-
- Permanently remove an artifact only when the user explicitly asks with `delete <artifact-id-or-url> --json`.
|
|
103
|
-
- Manage projects: `projects list --json`, `projects create <name> --json` (uses `default_project_visibility` when saved, otherwise `workspace`; pass `--visibility private` for a confidential project), `projects edit <id>` for name, description, visibility, audience (`--add-email`/`--remove-email`), and archive state (`--archive`/`--unarchive`).
|
|
104
|
-
- Save a default project with `init --project-id <id> --json`. Preview setup with `init --dry-run --json`.
|
|
105
|
-
- Manage skills: `skills ensure --tool auto --json` detects Claude Code, Codex, or Cursor and installs or updates user-scope skills; Cursor project scope needs `skills install --tool cursor --scope project --json`. Use `skills install --tool cursor --scope user --json` for the Cursor user-scope skill explicitly. Project scope is opt-in via `skills install --tool <tool> --scope project --json`. `skills update --json` updates installed managed skills; `--force` overwrites unmanaged files on install.
|
|
106
|
-
- Preview a local `.md` / `.html` file with `preview <file> --json` (add `--no-open` to keep the browser closed). Preview start is a long-lived service, so run the CLI invocation itself once with the environment's long-running/background process mechanism and retain that task or process as its owner; add no shell pipeline, redirection, command substitution, or wrapper that waits for process exit (tool-managed background output capture is fine). The single ready JSON line (`url` / generated `session` / `share_origin` / `reused` / sanitized `agent`) is the startup handshake: a task id or PID alone is not readiness, and `--session` is only for later `next` / `done` / `reply` / `stop`, never start. While one launch is still running without readable ready output, do not launch a second or infer a URL from listening ports; report that startup is unverified and ask the user how to proceed. A `reused: true` handshake is valid, but that invocation exits because the original process remains the server owner; do not treat the reused invocation's handle as ownership. Saving the file reloads the page. A preview started inside Codex registers the trusted thread UUID and uses `codex queue` for a fixed batch-ready notice; `queued` means accepted, while `preview next` is the first proof of processing. If it remains queued, reopen the session with `codex resume`. In Claude Code, only when background tasks are enabled (`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS` is neither `1` nor `true`) and Bash exposes `run_in_background`, run preview start as one Bash background task, read it through Claude Code's task-output mechanism until the ready JSON arrives, and keep a non-reused task alive; then arm `preview next --wait 3600` as a separate background task. Re-arm after `preview done`, but not after `timed_out: true`. If background waiting is disabled or rejected after start, use manual pickup. If background Bash tasks are unavailable before start, ask the user to run and keep preview open in their own terminal; that user-owned process owns the server and pickup is manual. In Cursor, keep `preview next --wait 90` in the foreground. The user annotates in the browser and submits batches. Fetch them with `preview next [--wait <sec>] [--session <id>]` — non-claiming long poll where `timed_out` / `session_ended` are normal empty results and `preview_session_not_found` means no live session, `preview_request_failed` means the session is alive and rejected the request, and `preview_session_unverified` means the recorded session went silent — retry, then stop the process before `preview stop <file> --force`. Fix the whole batch in one edit, then pipe `{"items":[{"thread","generation","outcome":"fixed|skipped","note"}]}` to `preview done --stdin` (idempotent per generation; results `accepted|stale|already_reported|unknown_thread`; `skipped` needs a note; items with `anchor.state: "orphaned"` are skipped, not re-fixed; the note becomes the thread summary). `preview reply --thread <id> --body <text>` answers without changing state; `preview stop` ends the session and keeps annotations. Never copy comment content into a provider notification; `preview next` is the source of truth. If `preview next` immediately returns the same items again, stop polling and tell the user. Nothing is uploaded unless the user shares from the page.
|
|
107
|
-
- Check the current state with `whoami --json` or `doctor --json` for token storage, authentication, destination, network, upload access, and skill update status.
|
|
108
|
-
- First-time setup: `npm exec --yes --package=@artifactshare/cli -- artifactshare init --json` detects Claude Code, Codex, or Cursor, installs or updates user-scope skills, and reports the next steps (sign in, then share). For Cursor project scope, run `skills install --tool cursor --scope project --json` explicitly.
|
|
109
|
-
|
|
110
|
-
### Version labels
|
|
111
|
-
|
|
112
|
-
Successful update API responses include `number`, a positive integer matching the
|
|
113
|
-
Viewer’s `v{number}` for the created version. CLI JSON exposes it as
|
|
114
|
-
`data.version.number`, with or without a label. Older server responses may omit
|
|
115
|
-
`number`; the CLI accepts them and omits `data.version.number`.
|
|
116
|
-
|
|
117
|
-
The optional `--label <label>` option on `artifactshare update <target> <path>`
|
|
118
|
-
attaches an immutable note to the new version of an HTML file, Markdown file, or static-site
|
|
119
|
-
bundle. Labels are normalized to Unicode NFC, then leading and trailing Unicode
|
|
120
|
-
space separators (Zs) are trimmed. Internal spacing and case are preserved.
|
|
121
|
-
The result must contain 1–80 Unicode code points (not bytes or UTF-16 units).
|
|
122
|
-
Letters, marks, numbers, punctuation, symbols, space separators, and U+200D
|
|
123
|
-
(joined emoji) are allowed. Empty values, tabs, newlines, controls, bidi formatting
|
|
124
|
-
controls, and unpaired surrogates are rejected; labels are never truncated.
|
|
125
|
-
CLI validation happens before authentication or upload. For a value beginning
|
|
126
|
-
with a known flag, use `--label=--text` to pass it explicitly.
|
|
127
|
-
|
|
128
|
-
The update API accepts one optional `label` query parameter on
|
|
129
|
-
`POST /api/shareables/:id/versions`, including `artifact_kind=static_site` uploads.
|
|
130
|
-
Invalid or repeated labels return HTTP 400 `validation-failed` before upload work.
|
|
131
|
-
Omission stores NULL and never inherits a prior label. Successful update API responses include `label`, and CLI JSON includes
|
|
132
|
-
`data.version.label`: the normalized, stored label or `null` when omitted.
|
|
133
|
-
Existing unlabeled rows are unchanged. Authorized history at
|
|
134
|
-
`GET /api/cli/artifacts/:id?include=versions` includes `label` only when present;
|
|
135
|
-
`artifacts get <target> --include versions --json` preserves it. The viewer's
|
|
136
|
-
version menu and full history show the label as plain text.
|
|
137
|
-
`GET /api/shareables/:id/versions` remains a current-version lookup.
|
|
138
|
-
Labels are update-only: initial uploads, `share --key`, `append`, preview,
|
|
139
|
-
bridge publishing, and MCP update inputs do not accept them.
|
|
140
|
-
|
|
141
|
-
Owners with unrestricted credentials can use `edit <target> --retain-versions N` to keep the latest N eligible published versions, or `--retain-versions all` to clear the limit. For files created by or assigned to a publisher client, this counts only published publisher versions (including earlier clients) and keeps every version people added, even when an unrestricted owner changes the setting. Other files keep counting all published versions. The current version is always kept. Setting or lowering retention prunes older eligible published versions immediately; the response includes `retain_versions` and `deleted_versions`. Owners can also change this setting in file history, with confirmation before existing versions are removed. Authorized viewers of removed versions see an explanation and a latest-version link (HTTP 410). Clearing never restores deleted content. Comments and surviving version numbers remain. Agent-preset credentials cannot change retention.
|
|
142
|
-
|
|
143
|
-
The browser share page opens HTML, Markdown, and static sites with its URL fragment (`#…`) and follows fragment changes inside the frame. Copy link includes the current fragment, so filtered views and Markdown headings can be shared. For static sites, only the entrypoint updates the share fragment; subpages leave it unchanged. This does not change CLI local preview.
|
|
144
|
-
|
|
145
|
-
Targets accept artifact IDs, app share URLs, per-ID `artifactshare.link` viewer URLs, and `a-<id>--v-<hex-version>.artifactshareusercontent.com` or `l-<id>--v-<hex-version>.artifactshareusercontent.com` execution URLs. Legacy sandbox and link-content URLs still resolve to IDs through the API; they no longer serve file content. Public share URLs are unchanged.
|
|
146
|
-
|
|
147
|
-
## Static-site scripts and data
|
|
148
|
-
|
|
149
|
-
Folder shares load external HTTPS images, stylesheets from jsDelivr, cdnjs,
|
|
150
|
-
unpkg, and Google Fonts (`fonts.googleapis.com`), and font files from jsDelivr
|
|
151
|
-
and Google Fonts (`fonts.gstatic.com`). Load icon/font packages from jsDelivr
|
|
152
|
-
or bundle the font files because cdnjs and unpkg font files are blocked.
|
|
153
|
-
JavaScript `eval` and `new Function` remain blocked.
|
|
154
|
-
|
|
155
|
-
Folder shares support WebAssembly, same-origin worker files, and `blob:` workers.
|
|
156
|
-
DuckDB-WASM can load from jsDelivr: its `getJsDelivrBundles()` setup uses a blob
|
|
157
|
-
worker to `importScripts()` the CDN worker and fetch its `.wasm` file. The existing
|
|
158
|
-
script CDNs are allowed inside blob workers; JavaScript `eval` and `new Function`
|
|
159
|
-
remain blocked in the page and its blob workers.
|
|
160
|
-
|
|
161
|
-
DuckDB-WASM loads runtime extensions such as `parquet` and `json` from
|
|
162
|
-
`https://extensions.duckdb.org/<duckdb-version>/<wasm_eh|wasm_mvp>/<name>.duckdb_extension.wasm`.
|
|
163
|
-
Static-site `connect-src` permits that origin: blob workers inherit the page's
|
|
164
|
-
policy, and same-origin JavaScript workers carry it. This permission covers
|
|
165
|
-
extension fetching, not arbitrary network origins.
|
|
166
|
-
|
|
167
|
-
To avoid the external extension request, bundle every needed extension matching
|
|
168
|
-
the DuckDB engine version and selected WASM platform. Preserve the repository's
|
|
169
|
-
version/platform layout, for example
|
|
170
|
-
`extensions/v1.4.3/wasm_eh/parquet.duckdb_extension.wasm` for `@duckdb/duckdb-wasm@1.32.0`.
|
|
171
|
-
The folder must match the engine version the page loads, which `SELECT version()`
|
|
172
|
-
reports, so pin the package version. In the page, compute
|
|
173
|
-
`new URL('extensions', location.href).href` (no trailing slash; DuckDB appends `/<version>/...`) and use that absolute same-origin
|
|
174
|
-
repository URL in `SET custom_extension_repository = '<absolute same-origin repository URL>'`
|
|
175
|
-
before any extension loads or queries. This avoids requests to the extension
|
|
176
|
-
host; jsDelivr core bundles still require CDN requests.
|
|
177
|
-
|
|
178
|
-
Keep data such as `data/*.parquet` in the shared folder. In the page, build an
|
|
179
|
-
absolute same-origin URL with `new URL('data/rows.parquet', location.href).href`
|
|
180
|
-
and pass it to DuckDB-WASM's `registerFileURL()` before querying the registered
|
|
181
|
-
file with SQL. Relative URLs cannot be resolved inside its blob worker.
|
|
182
|
-
Static-site binary assets support HTTP byte ranges. To refresh data while keeping
|
|
183
|
-
the same share URL, replace the data locally and update the folder as a new
|
|
184
|
-
version; each version retains its own isolated origin. Single-file HTML and
|
|
185
|
-
Markdown have different script policies; these permissions apply to folder shares.
|
|
186
|
-
|
|
187
|
-
### API-only static-site inheritance
|
|
188
|
-
|
|
189
|
-
`POST /api/shareables/:id/versions?artifact_kind=static_site` accepts one
|
|
190
|
-
`base_version` and repeated `delete_path` query parameters. For example,
|
|
191
|
-
`?artifact_kind=static_site&base_version=v1&delete_path=data/old.parquet&delete_path=old.js`
|
|
192
|
-
with multipart `file` parts for `data/a.parquet` replaces that data file, removes
|
|
193
|
-
the two listed paths, and inherits all other files without copying their objects.
|
|
194
|
-
The base must be the current published version; a stale base returns HTTP 409
|
|
195
|
-
`version_conflict`. It also supplies the expected version for agent credentials.
|
|
196
|
-
If `expected_version` is supplied, it must equal the base (otherwise HTTP 400
|
|
197
|
-
`validation-failed`). Neither parameter changes write permissions.
|
|
198
|
-
|
|
199
|
-
Deletion paths use the same normalization and validation as uploaded paths.
|
|
200
|
-
Sending and deleting the same path is invalid. A case-only addition requires
|
|
201
|
-
explicitly deleting the old spelling. An absent deletion path is harmless.
|
|
202
|
-
A base permits zero sent files, provided the resulting manifest still includes
|
|
203
|
-
`index.html` or `index.md`. Entrypoint precedence, file-count, total-size, and
|
|
204
|
-
case-collision checks apply to the complete resulting manifest. Without a base,
|
|
205
|
-
the existing full replacement behavior applies. Empty or repeated bases,
|
|
206
|
-
deletion without a base, and inheritance parameters on other artifact kinds
|
|
207
|
-
return HTTP 400 `validation-failed`.
|
|
208
|
-
|
|
209
|
-
Version size is the logical sum of that version's files. Workspace quota counts
|
|
210
|
-
physical objects once across retained versions; only sent files add bytes.
|
|
211
|
-
Pruning keeps objects referenced by remaining versions. Version URLs retain
|
|
212
|
-
immutable manifests. This is a REST API feature: there are no CLI `update`
|
|
213
|
-
flags, MCP inputs, or bridge inputs for inheritance.
|
|
214
|
-
|
|
215
|
-
### Publisher device credentials (API only)
|
|
216
|
-
|
|
217
|
-
Versions added with publisher credentials are scheduled updates: content and live viewers refresh, but list order, feeds, unread indicators, and human update labels do not change. Browser history marks Scheduled update without exposing client names. API `updated_at` remains the actual mutation time; internal `activity_at` controls human activity ordering. Initial creation and versions published through other credentials keep their existing behavior.
|
|
218
|
-
|
|
219
|
-
The device API accepts `preset: "publisher"` with a required `device_name`.
|
|
220
|
-
Names are trimmed, NFC-normalized, case-sensitive, and limited to 1–100 Unicode
|
|
221
|
-
letters, marks, numbers, ASCII spaces, or `._-()`. The browser approver explicitly
|
|
222
|
-
creates a new client or continues one of their existing clients in that workspace.
|
|
223
|
-
Names cannot be edited on the approval screen: if a name already exists, continue
|
|
224
|
-
that client or request login again with a different name. Only explicit continuation
|
|
225
|
-
restores access to earlier files; `device_id` never selects a client.
|
|
226
|
-
|
|
227
|
-
A publisher can create private HTML, Markdown, or static-site artifacts in the
|
|
228
|
-
approver's home. Static sites use `POST /api/shareables/uploads?artifact_kind=static_site`.
|
|
229
|
-
It can manage only artifacts created by or assigned to its client, still owned by
|
|
230
|
-
that approver in the same workspace, including after the owner shares or moves them.
|
|
231
|
-
Single-file versions require `expected_version`. Static-site versions accept
|
|
232
|
-
`artifact_kind=static_site` with either `expected_version` for replacement or
|
|
233
|
-
`base_version` for changed-files uploads and repeated `delete_path` removals.
|
|
234
|
-
The base must be current. Version uploads preserve audience, location and retention.
|
|
235
|
-
|
|
236
|
-
On artifacts created by or assigned to a publisher client, retention counts only published versions added with publisher credentials, including earlier clients, and keeps every other version. This also applies to unrestricted owner edits. The newest N publisher versions and every current version are kept; drafts do not count. Unmanaged artifacts continue to count all published versions.
|
|
237
|
-
|
|
238
|
-
The exact `GET /api/cli/artifacts/:id/download` returns raw source bytes for
|
|
239
|
-
single files and a JSON manifest with version id, paths and SHA-256 hashes for
|
|
240
|
-
static sites. Individual `download/*` requests are denied. `GET /api/cli/artifacts/:id`
|
|
241
|
-
includes visibility; static-site readback contains metadata only. No `include`
|
|
242
|
-
expansions are allowed. `DELETE /api/cli/artifacts/:id` deletes the artifact.
|
|
243
|
-
POST or PATCH `/api/cli/shareables/:id/edit` accepts only `retain_versions`, a
|
|
244
|
-
positive integer or null. Setting a limit prunes older versions immediately;
|
|
245
|
-
clearing it never restores deleted content. Other presets remain POST-only.
|
|
246
|
-
|
|
247
|
-
The owner can assign an existing artifact using an unrestricted credential or
|
|
248
|
-
browser session: `POST /api/cli/artifacts/:id/adopt` with
|
|
249
|
-
`{"publisher_client_id":"client1"}`. Obtain the verified client id from whoami or
|
|
250
|
-
doctor. Assignment replaces the previous client's access and is audited even when
|
|
251
|
-
repeated; historical creation attribution stays unchanged. Publisher credentials
|
|
252
|
-
cannot adopt. There is no adoption UI or CLI command.
|
|
253
|
-
|
|
254
|
-
Other clients' artifacts, list, resolve, comments, audience/title/expiry edits,
|
|
255
|
-
move, projects, append and upsert remain denied. Existing presets' download and
|
|
256
|
-
readback responses are unchanged. CLI publisher login/resume and publishing/download
|
|
257
|
-
workflows remain unsupported; use the API. Credentials retain their client across
|
|
258
|
-
rotation and can be revoked from Settings → CLI sessions.
|
|
259
|
-
|
|
260
|
-
## Comment windows and posting limits
|
|
261
|
-
|
|
262
|
-
`comments list <target> --json` returns at most 50 threads, open first. Each
|
|
263
|
-
thread contains its current first message and latest three replies, plus
|
|
264
|
-
`message_count`, `reply_count` and `older_cursor`. These are partial histories.
|
|
265
|
-
Use `comments list <target> --thread-id <id> --before <older_cursor> --limit 50
|
|
266
|
-
--json` for older replies. Repeat with the returned cursor until it is null;
|
|
267
|
-
merge by message ID and display in `(created_at, message_id)` order. Each page
|
|
268
|
-
also includes the current first message. Cursors remain usable after their
|
|
269
|
-
boundary message is deleted. `--around-message-id <id>` selects a bounded page
|
|
270
|
-
containing a message; do not combine it with `--before`.
|
|
271
|
-
|
|
272
|
-
A thread holds 500 currently stored messages, including its first message.
|
|
273
|
-
`thread_capacity` means start a new thread. Existing excess messages are kept;
|
|
274
|
-
deletions can restore space. Deleting the first message promotes the next
|
|
275
|
-
earliest message; deleting the last removes the thread and anchor. Resolved
|
|
276
|
-
threads still refuse replies.
|
|
277
|
-
|
|
278
|
-
Creation and replies share 20 admissions per authenticated user and artifact
|
|
279
|
-
per fixed UTC minute across browser, CLI, MCP and API tokens. Adjacent minute
|
|
280
|
-
boundaries can admit 40 posts within a sliding 60 seconds. `rate_limited`
|
|
281
|
-
includes `retry_after_seconds` and UTC `retry_at`; HTTP also sends `Retry-After`.
|
|
282
|
-
Keep unsent content and retry after that time. Invalid requests, capacity refusals
|
|
283
|
-
and closed-thread refusals observed before admission consume nothing. Rate
|
|
284
|
-
refusals do not increment the counter; quota storage failures refuse the post.
|
|
285
|
-
Once admitted, commit failures and status/version/capacity races consume the admission without a
|
|
286
|
-
refund. Edits, deletions, resolve/reopen and anchor reports consume nothing.
|
|
287
|
-
Mutation readback contains only the affected thread window and changed message.
|
|
288
|
-
`refresh_required: true` means the write committed but advisory readback failed:
|
|
289
|
-
read that thread by ID; do not replay the write automatically.
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
### Upload path safety
|
|
293
|
-
|
|
294
|
-
For `share`, `append`, and `update`, use a regular file or directory (`append`
|
|
295
|
-
requires one nonempty UTF-8 file). Relative selections stay in physical cwd and
|
|
296
|
-
reject linked components. Absolute selections trust parent directories but reject
|
|
297
|
-
a linked selection or included descendant. Never normalize `..`: every such
|
|
298
|
-
component is rejected; pass a direct absolute path. Copy linked content into the
|
|
299
|
-
selection or pass the target by absolute path. Hidden names, `__MACOSX`, excluded
|
|
300
|
-
dependency/metadata directories, and ignored OS filenames are skipped before
|
|
301
|
-
inspection. Other entries use `lstat`; cloud placeholders work with stable file
|
|
302
|
-
identities. Content is verified before authentication or project lookup, and auth
|
|
303
|
-
retries reuse it. `validation_failed` includes `details.path` and `details.reason`:
|
|
304
|
-
`parent_traversal`, `link`, `outside_cwd`, `not_found`, `changed`,
|
|
305
|
-
`unsupported_guarantee`, or `invalid_type`. Follow the specific hint; retry for
|
|
306
|
-
`changed` or `upload_read_failed` (filesystem errno in `details.errno`). POSIX uses
|
|
307
|
-
available `O_NOFOLLOW`; Windows uses the same handle identity checks and rejects
|
|
308
|
-
links reported by `lstat`. Neither detects every transient swap-and-restore or
|
|
309
|
-
same-identity, same-size in-place edit. See the CLI README for the full guarantee.
|
|
310
|
-
|
|
311
|
-
## Local write recovery
|
|
312
|
-
|
|
313
|
-
Download accepts only unique artifact IDs matching `^[a-z0-9]{10}$`, including
|
|
314
|
-
IDs from list pages and the previous index.
|
|
315
|
-
Artifact IDs with surrounding whitespace are rejected, not trimmed, including
|
|
316
|
-
single-download targets. Remove the whitespace before retrying. URLs use normal
|
|
317
|
-
URL-to-ID resolution. Output parents may be links; their resolved directory identities are rechecked.
|
|
318
|
-
Linked output roots, indexes, and listed artifact trees are refused even with `--force`. Preflight checks every listed
|
|
319
|
-
artifact tree, including unchanged versions, and the index; unrelated content is
|
|
320
|
-
not walked. Network failures and invalid manifest paths, bodies, or identities are recorded per artifact;
|
|
321
|
-
every boundary violation stops further publication, including the final index.
|
|
322
|
-
Successful replacements retain originals and previous indexes in `data.backup_paths`
|
|
323
|
-
and report them in human output. Inspect those paths before manual cleanup.
|
|
324
|
-
Failed recovery also names retained paths in the error. Cleanup removes only
|
|
325
|
-
CLI-created temporary entries, never containers holding originals. Staging and
|
|
326
|
-
backups live in one private directory inside the output root for project
|
|
327
|
-
downloads, or in its parent for single downloads. Project index temporary files
|
|
328
|
-
use that same private directory so publication stays on the output filesystem.
|
|
329
|
-
Identity checks detect observed swaps;
|
|
330
|
-
Node path-based operations do not provide atomic confinement against arbitrary
|
|
331
|
-
concurrent changes.
|
|
332
|
-
|
|
333
|
-
Config-mode `init` preserves unknown keys and refuses links at `.artifactshare`
|
|
334
|
-
or `config.local.json`. Git worktrees/submodules save config normally but warn
|
|
335
|
-
instead of following `.git` files, links, or redirect metadata. Only a real
|
|
336
|
-
repository `.git` directory with regular or absent `info/exclude` is updated.
|
|
337
|
-
Follow `git_exclude_warning` to add the exact exclude line manually. Onboarding
|
|
338
|
-
without config arguments still installs user-scope skills.
|
|
339
|
-
|
|
340
|
-
Upload aliases use the stored filename for kind, filename, and content type.
|
|
341
|
-
Retry `changed` when an enumerated file disappears; correct `not_found` when a
|
|
342
|
-
relative path passes through a regular file. Both `share --help` and
|
|
343
|
-
`append --help` list `upload_read_failed` and all `validation_failed` reasons:
|
|
344
|
-
`link`, `outside_cwd`, `parent_traversal`, `changed`, `not_found`, `invalid_type`,
|
|
345
|
-
and `unsupported_guarantee`.
|
|
346
|
-
|
|
347
|
-
### Local preview isolation
|
|
348
|
-
|
|
349
|
-
Local HTML and Markdown previews run scripts inside a frame with `sandbox="allow-scripts"`. Preview isolation cannot be disabled. `localStorage`, IndexedDB, and other same-origin features are unavailable; the review shell always shows this restriction. Reporter observations are bounded, document-scoped display data. Saving or submitting feedback requires an explicit action in the review shell.
|
|
350
|
-
|
|
351
|
-
Local preview and share-dialog HTTP routes still lack per-session authentication. Loopback binding, Host checks and fixed mutation headers do not authenticate other local clients. Do not treat knowledge of the local port as an access-control boundary. Session authentication and private browser launchers are deferred; the existing ready `url` and `--no-open` behavior are unchanged.
|