@artifactshare/cli 0.14.0 → 0.15.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 +13 -0
- package/README.md +8 -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 +124 -1656
- package/package.json +1 -1
- package/skills/artifactshare/SKILL.md +9 -1
- package/skills/artifactshare/artifactshare.mdc +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ For user-facing announcements, see https://artifactshare.com/updates?product=cli
|
|
|
5
5
|
|
|
6
6
|
## Unreleased
|
|
7
7
|
|
|
8
|
+
## 0.15.0 - 2026-10-08
|
|
9
|
+
|
|
10
|
+
- Add owner-only `edit --retain-versions N` (or `all`) to prune old versions, release storage, and preserve version numbers.
|
|
11
|
+
|
|
12
|
+
- Preserve local-preview highlights and anchor updates after back/forward restoration.
|
|
13
|
+
|
|
14
|
+
- Internal: harden shared preview-reporter generation guards and preserve text verification when page code replaces array methods.
|
|
15
|
+
|
|
16
|
+
- Internal: build the preview reporter from typed modules and test the shared anchor engine directly, preserving annotation and handshake behavior.
|
|
17
|
+
|
|
18
|
+
- Preserve legacy preview annotations, including long quotes and trimmed context, and skip malformed saved records individually with a warning.
|
|
19
|
+
- Resolve quoted comments in the viewer using exact context; expose optional `anchor.position_state` (`attached`, `needs-check`, `unchecked`) while retaining `anchor.state`. Local preview uses the same selectors and paints highlights without changing document text nodes.
|
|
20
|
+
|
|
8
21
|
## 0.14.0 - 2026-09-30
|
|
9
22
|
|
|
10
23
|
- Include the Viewer version number in update JSON at `data.version.number`, with or without a label; retain compatibility with older servers.
|
package/README.md
CHANGED
|
@@ -179,6 +179,8 @@ npm exec --yes --package=@artifactshare/cli -- artifactshare config get home_aud
|
|
|
179
179
|
|
|
180
180
|
Use `--scope repository` only for a policy agreed by all repository participants, and pass `--visibility private|workspace|link` for a one-time home override. For link sharing, pass exactly one of `--link-expires-at <RFC3339 UTC>` or `--no-link-expiry`; omit both to use the workspace default. For project creation, pass `projects create <name> --visibility private|workspace`; persistent project defaults are documented in `projects create --help`. Pass `--no-slack-notify` to suppress the project Slack notification for one post.
|
|
181
181
|
|
|
182
|
+
Owners can run `edit <target> --retain-versions 24 --json` to keep the latest 24 published versions, or `--retain-versions all` to clear the limit. Setting or lowering the limit immediately deletes older versions and releases their storage. The response includes `retain_versions` and `deleted_versions`. Deleted version URLs return 404; comments and surviving version numbers remain. This requires unrestricted owner credentials; agent-preset credentials cannot change retention. The edit API accepts the same setting as `retain_versions` (a positive integer or `null`) at `POST /api/cli/shareables/:id/edit`.
|
|
183
|
+
|
|
182
184
|
Link sharing is available on every plan; Team workspaces can turn it off. A workspace policy may allow a finite expiry from 1 to 365 days or no expiration; the initial default is 30 days and the initial maximum is no limit. Share and edit results include the confirmed `link_expires_at` UTC timestamp or `null`. If a link command fails, use `link_sharing_plan_required` as a legacy code (no plan limit applies today), `link_sharing_disabled` to ask the workspace owner or a Team owner or admin to enable the workspace setting, or `link_expiry_invalid` to correct the timestamp or choose `--no-link-expiry` when allowed. Under the default thresholds, `link_publish_rate_limited` means the service observed 20 counted files before a publication in a Free workspace less than 14 days old during its rolling 24-hour window. A file counts once for its most recent change to link visibility, or for creation with link visibility while it remains link-shared. Share with specific people. `error.recovery` indicates `retry_later`; use `error.message` and `error.hint` for when to retry. Retry the link publication later instead of retrying immediately with unchanged input.
|
|
183
185
|
|
|
184
186
|
For the complete settings reference, `home_audience` is the canonical home key. `default_artifact_visibility` remains a compatibility alias, and `default_project_visibility` is the advanced default for `projects create`. User and repository settings are resolved with repository taking precedence, followed by user and product default `workspace`; home also checks the compatibility alias at each scope. Use `config get home_audience --scope effective --json` to confirm the resolved audience. Keyless `config get --json` returns only `home_audience`; pass an explicit key to read either other setting. These settings only affect new home posts and project creation; update, edit, Web, and MCP defaults are unchanged.
|
|
@@ -253,3 +255,9 @@ version menu and full history show the label as plain text.
|
|
|
253
255
|
`GET /api/shareables/:id/versions` remains a current-version lookup.
|
|
254
256
|
Labels are update-only: initial uploads, `share --key`, `append`, preview,
|
|
255
257
|
bridge publishing, and MCP update inputs do not accept them.
|
|
258
|
+
|
|
259
|
+
### Quoted comment positions
|
|
260
|
+
|
|
261
|
+
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.
|
|
262
|
+
|
|
263
|
+
Older comments may have lost spaces at the edges of their saved context. The viewer tries those boundary spaces only and attaches only at one unique position. It cannot reconstruct missing separators inside old context (for example, `ab` saved across list items now measured as `a b`); those comments need a position check.
|
package/dist/cursor-acp-entry.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { d as previewsDir, p as processAlive, t as CURSOR_ACP_ACK_TIMEOUT_MS } from "./cursor-notification-
|
|
2
|
+
import { d as previewsDir, p as processAlive, t as CURSOR_ACP_ACK_TIMEOUT_MS } from "./cursor-notification-Hz6fuACK.js";
|
|
3
3
|
import { closeSync, mkdirSync, openSync, readFileSync, renameSync, rmSync, statSync, writeFileSync, writeSync } from "node:fs";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import { spawn } from "node:child_process";
|
|
@@ -37,16 +37,24 @@ function isThreadMessage(value) {
|
|
|
37
37
|
function isPreviewAnnotation(value) {
|
|
38
38
|
if (typeof value !== "object" || value === null) return false;
|
|
39
39
|
const record = value;
|
|
40
|
-
return typeof record.thread === "string" && Number.isInteger(record.generation) && typeof record.status === "string" && ANNOTATION_STATUSES.has(record.status) && isPreviewAnchor(record.anchor) && typeof record.comment === "string" && Array.isArray(record.messages) && record.messages.every(isThreadMessage) && (record.batch_id === null || typeof record.batch_id === "string") && typeof record.created_at === "string" && typeof record.updated_at === "string" && (record.summary === null || typeof record.summary === "string");
|
|
40
|
+
return typeof record.thread === "string" && Number.isInteger(record.generation) && typeof record.status === "string" && ANNOTATION_STATUSES.has(record.status) && isPreviewAnchor(record.anchor, { stored: true }) && typeof record.comment === "string" && Array.isArray(record.messages) && record.messages.every(isThreadMessage) && (record.batch_id === null || typeof record.batch_id === "string") && typeof record.created_at === "string" && typeof record.updated_at === "string" && (record.summary === null || typeof record.summary === "string");
|
|
41
41
|
}
|
|
42
|
-
function isPreviewAnchor(value) {
|
|
42
|
+
function isPreviewAnchor(value, options = {}) {
|
|
43
43
|
if (typeof value !== "object" || value === null) return false;
|
|
44
44
|
const record = value;
|
|
45
45
|
if (record.kind === "artifact") return true;
|
|
46
46
|
if (record.state !== "attached" && record.state !== "orphaned") return false;
|
|
47
47
|
const optionalString = (name) => record[name] === void 0 || typeof record[name] === "string";
|
|
48
48
|
if (record.kind === "element") return optionalString("ownText") && optionalString("tagName") && typeof record.selector === "string" && typeof record.label === "string" && typeof record.contextText === "string";
|
|
49
|
-
if (record.kind === "text")
|
|
49
|
+
if (record.kind === "text") {
|
|
50
|
+
if (record.position_state !== void 0 && ![
|
|
51
|
+
"attached",
|
|
52
|
+
"needs-check",
|
|
53
|
+
"unchecked"
|
|
54
|
+
].includes(record.position_state)) return false;
|
|
55
|
+
if (record.selectorFormat !== void 0 && (record.selectorFormat !== "normalized-v1" || typeof record.textHash !== "string" || !/^[a-f0-9]{64}$/.test(record.textHash) || typeof record.ambiguousAtCreation !== "boolean" || !Number.isSafeInteger(record.textStart) || !Number.isSafeInteger(record.textEnd) || record.textStart < 0 || typeof record.quotedText !== "string" || record.textEnd - record.textStart !== record.quotedText.length)) return false;
|
|
56
|
+
return typeof record.quotedText === "string" && (options.stored || record.quotedText.length > 0 && record.quotedText.length <= 1e3) && typeof record.prefixText === "string" && (options.stored || record.prefixText.length <= 400) && typeof record.suffixText === "string" && (options.stored || record.suffixText.length <= 400) && (record.textStart === null || Number.isInteger(record.textStart)) && (record.textEnd === null || Number.isInteger(record.textEnd)) && (record.cssPath === null || typeof record.cssPath === "string");
|
|
57
|
+
}
|
|
50
58
|
return false;
|
|
51
59
|
}
|
|
52
60
|
//#endregion
|