@artifactshare/cli 0.23.0 → 0.24.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 +20 -0
- package/LICENSE +9 -9
- package/README.md +86 -27
- package/dist/cli.d.ts +14 -6
- package/dist/cli.js +1881 -1010
- package/dist/{cursor-acp-0XpA0raU.js → cursor-acp-DJ-rkyY3.js} +3 -5
- package/dist/cursor-acp-entry.js +3 -4
- package/dist/{cursor-notification--78v1rgg.js → cursor-notification-BIq-4zCX.js} +22 -9
- package/dist/index.d.ts +1 -3
- package/dist/index.js +2 -3
- package/dist/{runtime-CgvHR_2f.js → runtime-D944T46q.js} +1 -2
- package/package.json +7 -7
- package/skills/artifactshare/SKILL.md +32 -5
- package/skills/artifactshare/references/authentication-profiles-skills.md +1 -0
- package/skills/artifactshare/references/organize-settings.md +2 -1
- package/skills/artifactshare/references/preview.md +41 -3
- package/skills/artifactshare/references/rest-api-only.md +2 -0
- package/skills/artifactshare/references/static-sites.md +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as previewsDir, m as processAlive, t as CURSOR_ACP_ACK_TIMEOUT_MS } from "./cursor-notification-BIq-4zCX.js";
|
|
2
2
|
import { closeSync, mkdirSync, openSync, readFileSync, renameSync, rmSync, statSync, writeFileSync, writeSync } from "node:fs";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { spawn } from "node:child_process";
|
|
@@ -6,7 +6,7 @@ import { join, resolve } from "node:path";
|
|
|
6
6
|
import { createHash, randomBytes } from "node:crypto";
|
|
7
7
|
import { createServer } from "node:http";
|
|
8
8
|
import { createInterface } from "node:readline";
|
|
9
|
-
|
|
9
|
+
// src/preview/cursor-permission.ts
|
|
10
10
|
const MAX_PERMISSION_DISPLAY_LENGTH = 12e3;
|
|
11
11
|
function formatCursorPermissionRequest(toolCall) {
|
|
12
12
|
let serialized;
|
|
@@ -28,8 +28,7 @@ function formatCursorPermissionRequest(toolCall) {
|
|
|
28
28
|
if (sanitized.length <= MAX_PERMISSION_DISPLAY_LENGTH) return sanitized;
|
|
29
29
|
return `${sanitized.slice(0, MAX_PERMISSION_DISPLAY_LENGTH)}\n… (truncated)`;
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
//#region src/cursor-acp.ts
|
|
31
|
+
// src/cursor-acp.ts
|
|
33
32
|
async function runCursorAcp() {
|
|
34
33
|
const input = process.argv[2];
|
|
35
34
|
if (!input || input === "--help" || input === "-h") {
|
|
@@ -410,5 +409,4 @@ async function runCursorAcp() {
|
|
|
410
409
|
releaseWorkspaceLock();
|
|
411
410
|
process.exitCode = interrupted ? 130 : fatalAgentFailure ? 1 : previewExit.code ?? 1;
|
|
412
411
|
}
|
|
413
|
-
//#endregion
|
|
414
412
|
export { runCursorAcp };
|
package/dist/cursor-acp-entry.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as checkRuntime } from "./runtime-
|
|
3
|
-
|
|
4
|
-
if (checkRuntime(process.argv.slice(2))) await (await import("./cursor-acp-
|
|
5
|
-
//#endregion
|
|
2
|
+
import { t as checkRuntime } from "./runtime-D944T46q.js";
|
|
3
|
+
// src/cursor-acp-entry.ts
|
|
4
|
+
if (checkRuntime(process.argv.slice(2))) await (await import("./cursor-acp-DJ-rkyY3.js")).runCursorAcp();
|
|
6
5
|
export {};
|
|
@@ -2,7 +2,17 @@ import { chmodSync, closeSync, mkdirSync, openSync, readFileSync, realpathSync,
|
|
|
2
2
|
import { homedir } from "node:os";
|
|
3
3
|
import { basename, dirname, join, resolve } from "node:path";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
5
|
-
|
|
5
|
+
function isPreviewRewrite(value) {
|
|
6
|
+
if (typeof value !== "object" || value === null) return false;
|
|
7
|
+
const record = value;
|
|
8
|
+
return Object.keys(record).length === 2 && typeof record.original === "string" && typeof record.proposed === "string" && record.original.length > 0 && record.original.length <= 16e3 && record.proposed.length <= 16e3 && record.proposed !== record.original;
|
|
9
|
+
}
|
|
10
|
+
/** The anchored text a rewrite replaces, or null when the anchor has none. */
|
|
11
|
+
function rewritableText(anchor) {
|
|
12
|
+
if (anchor.kind === "text") return anchor.quotedText || null;
|
|
13
|
+
if (anchor.kind === "element") return anchor.ownText || null;
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
6
16
|
/** Custom header required on every mutating request. Its presence forces a
|
|
7
17
|
* CORS preflight from any cross-origin caller, and the server sends no CORS
|
|
8
18
|
* headers, so cross-origin writes fail in the browser. */
|
|
@@ -37,6 +47,7 @@ function isThreadMessage(value) {
|
|
|
37
47
|
function isPreviewAnnotation(value) {
|
|
38
48
|
if (typeof value !== "object" || value === null) return false;
|
|
39
49
|
const record = value;
|
|
50
|
+
if (record.rewrite !== void 0 && !isPreviewRewrite(record.rewrite)) return false;
|
|
40
51
|
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
52
|
}
|
|
42
53
|
function isPreviewAnchor(value, options = {}) {
|
|
@@ -44,6 +55,7 @@ function isPreviewAnchor(value, options = {}) {
|
|
|
44
55
|
const record = value;
|
|
45
56
|
if (record.kind === "artifact") return true;
|
|
46
57
|
if (record.state !== "attached" && record.state !== "orphaned") return false;
|
|
58
|
+
if (record.screen !== void 0 && (typeof record.screen !== "string" || record.screen.length === 0 || record.screen.length > 1e3)) return false;
|
|
47
59
|
const optionalString = (name) => record[name] === void 0 || typeof record[name] === "string";
|
|
48
60
|
if (record.kind === "element") return (Object.hasOwn(record, "ownTextHash") || Object.hasOwn(record, "ownTextExcerpt") ? !Object.hasOwn(record, "ownText") && typeof record.ownTextHash === "string" && /^[a-f0-9]{64}$/.test(record.ownTextHash) && typeof record.ownTextExcerpt === "string" && record.ownTextExcerpt.length <= 16e3 : optionalString("ownText")) && optionalString("tagName") && typeof record.selector === "string" && typeof record.label === "string" && typeof record.contextText === "string";
|
|
49
61
|
if (record.kind === "text") {
|
|
@@ -57,8 +69,7 @@ function isPreviewAnchor(value, options = {}) {
|
|
|
57
69
|
}
|
|
58
70
|
return false;
|
|
59
71
|
}
|
|
60
|
-
|
|
61
|
-
//#region src/preview/notification.ts
|
|
72
|
+
// src/preview/notification.ts
|
|
62
73
|
const FAILURE_CODES = /* @__PURE__ */ new Set([
|
|
63
74
|
"target_unavailable",
|
|
64
75
|
"rejected",
|
|
@@ -204,8 +215,7 @@ function createPreviewNotificationCoordinator(options) {
|
|
|
204
215
|
}
|
|
205
216
|
};
|
|
206
217
|
}
|
|
207
|
-
|
|
208
|
-
//#region src/preview/session.ts
|
|
218
|
+
// src/preview/session.ts
|
|
209
219
|
function previewsDir(env = process.env) {
|
|
210
220
|
const override = env.ARTIFACTSHARE_CONFIG_HOME;
|
|
211
221
|
const base = override !== void 0 && override !== "" ? override : join(homedir(), ".artifactshare");
|
|
@@ -240,6 +250,11 @@ function annotationsFilePath(sessionId, env = process.env) {
|
|
|
240
250
|
if (!isSessionId(sessionId)) throw new Error("invalid preview session id");
|
|
241
251
|
return join(previewsDir(env), `annotations-${sessionId}.json`);
|
|
242
252
|
}
|
|
253
|
+
/** Per-session review history: one JSON file per submitted batch. */
|
|
254
|
+
function historyDirPath(sessionId, env = process.env) {
|
|
255
|
+
if (!isSessionId(sessionId)) throw new Error("invalid preview session id");
|
|
256
|
+
return join(previewsDir(env), `history-${sessionId}`);
|
|
257
|
+
}
|
|
243
258
|
function previewRealpath(input) {
|
|
244
259
|
try {
|
|
245
260
|
return {
|
|
@@ -421,8 +436,7 @@ function releaseStaleClaim(sessionId, env = process.env) {
|
|
|
421
436
|
rmSync(lockPath, { force: true });
|
|
422
437
|
return true;
|
|
423
438
|
}
|
|
424
|
-
|
|
425
|
-
//#region src/preview/cursor-notification.ts
|
|
439
|
+
// src/preview/cursor-notification.ts
|
|
426
440
|
const PREVIEW_SESSION_PATTERN = /^[0-9a-f]{16}$/;
|
|
427
441
|
const BATCH_ID_PATTERN = /^[a-z0-9_-]{1,128}$/i;
|
|
428
442
|
const TOKEN_PATTERN = /^[0-9a-f]{64}$/;
|
|
@@ -524,5 +538,4 @@ function createCursorAcpAdapter(encoded, fetchImpl = globalThis.fetch) {
|
|
|
524
538
|
}
|
|
525
539
|
};
|
|
526
540
|
}
|
|
527
|
-
|
|
528
|
-
export { defaultPreviewNotificationRegistration as C, isPreviewAnchor as D, PREVIEW_SESSION_ENDPOINT as E, isPreviewAnnotation as O, createPreviewNotificationCoordinator as S, PREVIEW_MUTATION_HEADER as T, resolveLiveSession as _, annotationsFilePath as a, updateSessionNotificationRegistration as b, isSessionId as c, previewsDir as d, probeSession as f, removeSessionFile as g, releaseStaleClaim as h, cursorNotificationRegistration as i, isPreviewDoneItemInput as k, previewIdentityPath as l, readSessionFile as m, CURSOR_ACP_NOTIFICATION_TIMEOUT_MS as n, claimSessionStart as o, processAlive as p, createCursorAcpAdapter as r, isConnectionRefused as s, CURSOR_ACP_ACK_TIMEOUT_MS as t, previewRealpath as u, sessionIdForPath as v, samePreviewNotificationRegistration as w, writeSessionFile as x, tokenFingerprint as y };
|
|
541
|
+
export { isPreviewDoneItemInput as A, createPreviewNotificationCoordinator as C, PREVIEW_SESSION_ENDPOINT as D, PREVIEW_MUTATION_HEADER as E, rewritableText as M, isPreviewAnchor as O, writeSessionFile as S, samePreviewNotificationRegistration as T, removeSessionFile as _, annotationsFilePath as a, tokenFingerprint as b, isConnectionRefused as c, previewRealpath as d, previewsDir as f, releaseStaleClaim as g, readSessionFile as h, cursorNotificationRegistration as i, isPreviewRewrite as j, isPreviewAnnotation as k, isSessionId as l, processAlive as m, CURSOR_ACP_NOTIFICATION_TIMEOUT_MS as n, claimSessionStart as o, probeSession as p, createCursorAcpAdapter as r, historyDirPath as s, CURSOR_ACP_ACK_TIMEOUT_MS as t, previewIdentityPath as u, resolveLiveSession as v, defaultPreviewNotificationRegistration as w, updateSessionNotificationRegistration as x, sessionIdForPath as y };
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as checkRuntime } from "./runtime-
|
|
2
|
+
import { t as checkRuntime } from "./runtime-D944T46q.js";
|
|
3
3
|
import { realpathSync } from "node:fs";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
|
-
|
|
5
|
+
// src/index.ts
|
|
6
6
|
async function generateCliHelp(path) {
|
|
7
7
|
return (await import("./cli.js")).generateCliHelp(path);
|
|
8
8
|
}
|
|
@@ -14,5 +14,4 @@ if (process.argv[1]) try {
|
|
|
14
14
|
isDirectExecution = import.meta.url === pathToFileURL(process.argv[1]).href;
|
|
15
15
|
}
|
|
16
16
|
if (isDirectExecution && checkRuntime(cliArgv)) await (await import("./cli.js")).runCli(cliArgv);
|
|
17
|
-
//#endregion
|
|
18
17
|
export { generateCliHelp };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/runtime.ts
|
|
2
2
|
const MINIMUM_NODE_VERSION = "22.19.0";
|
|
3
3
|
function isSupportedNode(version) {
|
|
4
4
|
const match = /^(\d+)\.(\d+)\.(\d+)/.exec(version);
|
|
@@ -33,5 +33,4 @@ function checkRuntime(argv, version = process.versions.node) {
|
|
|
33
33
|
process.exitCode = 1;
|
|
34
34
|
return false;
|
|
35
35
|
}
|
|
36
|
-
//#endregion
|
|
37
36
|
export { checkRuntime as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artifactshare/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "Upload and share HTML, Markdown, PDF, folders, and static sites from terminals, AI agents, automation, and CI.",
|
|
5
5
|
"homepage": "https://artifactshare.com/connect",
|
|
6
6
|
"repository": {
|
|
@@ -40,17 +40,17 @@
|
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"gunshi": "0.37.
|
|
44
|
-
"undici": "8.
|
|
45
|
-
"zod": "4.6.
|
|
43
|
+
"gunshi": "0.37.3",
|
|
44
|
+
"undici": "8.12.4",
|
|
45
|
+
"zod": "4.6.7"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@artifactshare/contract": "0.1.0",
|
|
49
49
|
"@artifactshare/viewer-kit": "0.0.1",
|
|
50
|
-
"@types/node": "22.20.
|
|
51
|
-
"tsdown": "0.23.
|
|
50
|
+
"@types/node": "22.20.5",
|
|
51
|
+
"tsdown": "0.23.7",
|
|
52
52
|
"typescript": "7.0.2",
|
|
53
|
-
"vitest": "
|
|
53
|
+
"vitest": "5.1.0"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "pnpm --filter @artifactshare/contract build && node scripts/generate-preview-messages.mjs && tsdown",
|
|
@@ -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: 70
|
|
8
8
|
managed: true
|
|
9
9
|
-->
|
|
10
10
|
|
|
@@ -53,6 +53,8 @@ contain `$`, spaces, `*`, or `?`; use single quotes such as
|
|
|
53
53
|
`ask_human`, `report_issue`. When `error.requires_human` is true, report to
|
|
54
54
|
the user instead of retrying.
|
|
55
55
|
|
|
56
|
+
Workspace administrators can approve multiple destination projects for an ordinary bot in Settings → Bots. Keep the existing primary for old clients, and select another approved destination with `--project-id`. Existing imported credentials and sessions use the live approved set; no reimport is needed. `projects list` lists publishable approvals and `doctor` adds `approved_project_ids` and live `publishable_project_ids` while keeping `project_id` as primary. An approved default that is archived or has lost its private contributor grant reports `agent_destination_unavailable` with destination and upload readiness false; authentication remains valid. Older servers may omit the live array, in which case doctor retains approval-based diagnostics; without either array it uses the singular primary. `whoami` keeps its existing response and does not expose bot approvals. Human agent approvals remain limited to one project. For reports intended only for a private project audience, explicitly pass `--visibility project`: the destination alone does not prevent workspace-visible posts. Removing an approval revokes posting but retains project audience grants and their quota usage until an administrator removes them through project membership management.
|
|
57
|
+
|
|
56
58
|
## First-time setup
|
|
57
59
|
|
|
58
60
|
`npm exec --yes --package=@artifactshare/cli -- artifactshare init --json` detects the agent, installs or updates
|
|
@@ -102,7 +104,7 @@ npm exec --yes --package=@artifactshare/cli -- artifactshare share ./site-dir --
|
|
|
102
104
|
Posting to a project delivers to the audience defined by that project.
|
|
103
105
|
Without any destination it posts to home.
|
|
104
106
|
- Choose `home_audience` by purpose: use `config set home_audience private
|
|
105
|
-
--scope user --json` for a personal safe default in this CLI environment,
|
|
107
|
+
--scope user --json` for a personal safe default in this CLI environment,
|
|
106
108
|
use `--scope repository` only for a policy agreed by all participants, and
|
|
107
109
|
use `--visibility private|workspace|link` for one home post.
|
|
108
110
|
- Inspect the home audience policy before posting with
|
|
@@ -233,7 +235,15 @@ Do not launch duplicates while startup is indeterminate.
|
|
|
233
235
|
When the user submits feedback, read the whole batch with `preview next --json`,
|
|
234
236
|
fix it in one editing pass, save once, and report the batch with
|
|
235
237
|
`preview done --stdin --json`. Skip orphaned anchors with an explanatory note.
|
|
236
|
-
Saving reloads the preview
|
|
238
|
+
Saving reloads the preview after an open comment is added or cancelled. Failed
|
|
239
|
+
operations keep the draft available for retry; if the session ends, copy any
|
|
240
|
+
unconfirmed comment before closing the page, then use its restart command.
|
|
241
|
+
Oversized element hashes with lone-surrogate or U+FFFD candidates stay
|
|
242
|
+
orphaned/needs-check, including ambiguous legacy hashes; never infer a target
|
|
243
|
+
from their selector alone. The local Document background choice can recover
|
|
244
|
+
transparent HTML readability without changing authored styles, browser media
|
|
245
|
+
queries, or the shared viewer. Sharing happens only when the user opens its
|
|
246
|
+
share dialog.
|
|
237
247
|
|
|
238
248
|
## Changing and checking visibility
|
|
239
249
|
|
|
@@ -279,7 +289,8 @@ removal and unattended token imports.
|
|
|
279
289
|
|
|
280
290
|
Read [REST API only](references/rest-api-only.md) when working directly with
|
|
281
291
|
static-site inheritance or publisher device credentials. These have no supported
|
|
282
|
-
CLI workflows; do not invent flags for them.
|
|
292
|
+
CLI workflows; do not invent flags for them. Publisher version append responses
|
|
293
|
+
use a stable app viewer URL regardless of visibility; opening it still checks access.
|
|
283
294
|
|
|
284
295
|
## Quick reference
|
|
285
296
|
|
|
@@ -303,6 +314,7 @@ CLI workflows; do not invent flags for them.
|
|
|
303
314
|
| Find an ID from a title | `resolve <value> --json` |
|
|
304
315
|
| Open a share URL | `open <url> --json` |
|
|
305
316
|
| Preview a local file | `preview <file> --json` (local, no sign-in) |
|
|
317
|
+
| List approved bot destinations | `projects list --json` |
|
|
306
318
|
| Log out | `logout --profile <name> --json` |
|
|
307
319
|
|
|
308
320
|
For an orphaned comment, read its original source with `artifacts get <target> --version <anchor.version_id> --json` or MCP `get_artifact` `version_id`. See [comments](references/comments.md) for null anchors, removed versions and continuation. Historical ids are not the current id required for safe updates.
|
|
@@ -311,6 +323,21 @@ For an orphaned comment, read its original source with `artifacts get <target> -
|
|
|
311
323
|
|
|
312
324
|
Run `artifacts versions <target> --json` for HTML, Markdown, or static sites. Each entry includes `version_id`, `created_at`, `size_bytes`, and `is_current`, plus available labels and creator metadata. Pages contain up to 50 entries, newest first. While `has_more` is true, pass `next_cursor` as `--cursor`; an invalid or wrong-artifact cursor requires restarting without it. Publication or pruning between pages is not a snapshot.
|
|
313
325
|
|
|
314
|
-
For human and agent credentials, updated servers return `retain_versions` (null means unlimited), `version_count`, and `total_size_bytes` in `artifacts get
|
|
326
|
+
For human and agent credentials, updated servers return `retain_versions` (null means unlimited), `version_count`, and `total_size_bytes` in `artifacts get`, legacy `artifacts list` rows (without search filters), and history pages. Human search rows also include these fields; restricted agent and bot search rows omit all three. Counts and byte totals cover versions the caller can list, independently of the history page or source `--version`. Static-site history and totals include only published versions with a publication timestamp for every caller, including owners. Publisher credentials do not receive `version_count` or `total_size_bytes` and cannot list artifacts or read history. Publisher-created static-site versions may have a null `creator`. Static-site bytes sum all files in each version, including inherited files. Reused files count in each version. These are logical bytes, not physical storage, billing, or proof of object cleanup. Publisher-managed histories may exceed the policy because human-created and current versions are protected. Combine list pages and compare `total_size_bytes` client-side to find the largest artifacts.
|
|
315
327
|
|
|
316
328
|
Static-site `artifacts get` now succeeds with metadata only, without `content` or `format`; `--include`, `--version`, and `--offset` remain unsupported for sites. Updated CLI get explicitly requests metadata. Released source-only clients retain unsupported-kind, so open still suggests download. Publisher credentials can read their scoped current metadata and, for sites, retain_versions, without version counts or total sizes but cannot list history or use `get --include versions`. Existing human/agent access rules apply; unreadable artifacts return `target_not_found` (API 404), with failure JSON on stderr, empty stdout, and exit 1. Shared viewers retain history access with creator email redaction. All shared flags and supported target URL forms work with `artifacts versions`.
|
|
329
|
+
|
|
330
|
+
## Full-text search
|
|
331
|
+
|
|
332
|
+
Use `artifacts list --q <text>` (MCP: `list_artifacts` with `q`) to search body text and titles. `query` / `--query` matches titles only; combining it with full-text, owner, or period filters returns `validation_failed`. API `q: ""` browses discoverable files; the CLI requires nonblank `--q`, or omit it for owner/period browsing.
|
|
333
|
+
|
|
334
|
+
Filter by repeatable `--owner-user-ids` (MCP array `owner_user_ids`, user IDs, not email addresses), `--project-id` / `project_id`, or `--home` / empty `project_id`. Periods require `--date-field updated|viewed` (`date_field`) and either `--days 7|30|90` or ISO `--from` / `--to`. Date-only upper bounds include that UTC day; timestamp upper bounds are exclusive.
|
|
335
|
+
|
|
336
|
+
Search returns up to 50 grouped representatives per page, excerpts, `group_size` and `group_size_relation`, and `total` matching groups capped at 1000. `eq` means exact; `gte` means a lower bound. Group sizes count allowed matching documents with the same normalized title across the search, not just this page. Repeat normalized filters with `next_cursor`; restart without cursor after changing filters or credentials. Relative periods stay anchored to the first page.
|
|
337
|
+
|
|
338
|
+
Human CLI and MCP OAuth use person discovery. Restricted agents and bots search only its intersection with their readable project range; search omits their version/retention summaries. Publisher, bridge and bootstrap credentials cannot list/search. MCP OAuth does not accept bots.
|
|
339
|
+
|
|
340
|
+
Rephrase the query and search again before concluding that nothing exists.
|
|
341
|
+
A completed zero-result search succeeds with this `search_hint`; errors and capacity failures are not empty results. Retry with fewer or different words before concluding absence. For a query with two or more normalized terms and no matches for all terms, search automatically retries for any of the terms. No additional flag or OR syntax is needed. Results from this fallback carry the hint: "No documents matched all query terms. These results match any of the terms. Rephrase the query and search again." If search fails because search capacity was exceeded (the CLI reports `service_error` with `details.api_code` `search_capacity_exceeded`; the API answers HTTP 503), narrow the query or filters and search again; this error is not a zero-result search.
|
|
342
|
+
|
|
343
|
+
Full-text search shares 1,000 requests per authenticated actor per UTC day across all plans and clients. HTTP 429 and CLI JSON use `search_daily_limit_exceeded`; CLI `error.details.retry_at` is the exact UTC ISO reset, and `retry_after_seconds` mirrors HTTP `Retry-After`. Wait until reset before searching again. Title-only listing is unaffected.
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
refresh consumes the displayed token, overwriting an existing profile credential requires
|
|
24
24
|
`--force`, and a revoked or superseded bot token fails with `bot_token_invalid` (ask the
|
|
25
25
|
admin to reissue).
|
|
26
|
+
Administrators can edit an ordinary bot’s approved destinations in Settings → Bots without reimport. `doctor` checks `approved_project_ids` when available, falling back to the singular primary from older servers. Human agent approvals remain single-project.
|
|
26
27
|
Imported API-token profiles are not renewed by the CLI.
|
|
27
28
|
Use `--allow-plaintext-token-store` only on a trusted machine without a native token store.
|
|
28
29
|
That fallback is mode `0600` on POSIX and unavailable on Windows, where saved profiles require Credential Manager.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
## Audience and visibility settings
|
|
9
9
|
|
|
10
|
-
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.
|
|
10
|
+
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. Human agents remain limited to their fixed approved project. Ordinary workspace bots may select any destination in their administrator-approved set. Both require a verified contributor/manager grant for private projects; publisher credentials cannot select projects.
|
|
11
11
|
|
|
12
12
|
Posting to a project delivers to the audience defined by that project. Without
|
|
13
13
|
a destination, `share` posts to home. Choose the home audience by purpose:
|
|
@@ -98,6 +98,7 @@ npm exec --yes --package=@artifactshare/cli -- artifactshare projects edit <id>
|
|
|
98
98
|
npm exec --yes --package=@artifactshare/cli -- artifactshare projects edit <id> --archive --json
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
+
- `projects list` shows all currently publishable bot approvals, primary first. Administrators edit these in Settings → Bots; imported credentials stay valid. Explicitly use `--visibility project` for private-project reports. Removing an approval revokes posting but retains project audience grants and their quota usage.
|
|
101
102
|
- `projects create` uses `default_project_visibility` when saved, otherwise
|
|
102
103
|
`workspace`. Pass `--visibility private` for a confidential project.
|
|
103
104
|
- `projects edit` changes name, description, visibility, audience
|
|
@@ -55,6 +55,12 @@ npm exec --yes --package=@artifactshare/cli -- artifactshare preview start ./lp.
|
|
|
55
55
|
invocation's task or process handle as the server owner.
|
|
56
56
|
- Editing and saving the file reloads the page automatically; annotations
|
|
57
57
|
stay anchored where possible.
|
|
58
|
+
- Interactive documents (slides, tabs, SPAs): in comment mode the user
|
|
59
|
+
Alt/Option+clicks to operate the page and plainly clicks to comment. Element
|
|
60
|
+
and text anchors may carry `screen`, the URL state (a `#/` or `#!/` route
|
|
61
|
+
hash, or a History API path) they were made on; the default screen omits
|
|
62
|
+
it. Plain fragments such as `#section` and non-URL state such as an open
|
|
63
|
+
modal are not recorded. Use `screen` to find which slide or route a comment refers to.
|
|
58
64
|
- `preview next` returns every batch the user has submitted; it is
|
|
59
65
|
non-claiming (calling it again returns the same open items) and with
|
|
60
66
|
`--wait <sec>` it long-polls. `timed_out: true` and `session_ended: true`
|
|
@@ -71,6 +77,11 @@ npm exec --yes --package=@artifactshare/cli -- artifactshare preview start ./lp.
|
|
|
71
77
|
- Report outcomes with `preview done --stdin`; reply into a thread with
|
|
72
78
|
`preview reply --thread <id> --body <text>` (state unchanged); end the
|
|
73
79
|
session with `preview stop` (annotations stay saved on disk).
|
|
80
|
+
- `preview history <file>` lists earlier batches with before/after document
|
|
81
|
+
snapshots, and `--batch <id>` returns one batch's comments, reports and
|
|
82
|
+
snapshots. Use it to look up past corrections before reviewing a similar
|
|
83
|
+
document. It reads local files only; `fixed`/`skipped` are agent reports,
|
|
84
|
+
not human approval.
|
|
74
85
|
|
|
75
86
|
### Waking up when the user submits a batch
|
|
76
87
|
|
|
@@ -135,6 +146,14 @@ npm exec --yes --package=@artifactshare/cli -- artifactshare preview next --sess
|
|
|
135
146
|
`fixed` (you changed the file) or `skipped` (`note` explaining why is
|
|
136
147
|
required). The `note` is shown to the user as the thread summary, so
|
|
137
148
|
write it for them.
|
|
149
|
+
- An item with `rewrite: {original, proposed}` is the user's own wording:
|
|
150
|
+
replace `original` (the text at the anchor as displayed) with `proposed`
|
|
151
|
+
in the source file, keeping the surrounding markup. `comment` is their
|
|
152
|
+
optional reason and may be empty; an empty `proposed` means remove that
|
|
153
|
+
text. For an element, `original` is its displayed text with inline markup
|
|
154
|
+
flattened, so keep links and formatting in the source while applying the
|
|
155
|
+
new wording. Apply it as written rather than rephrasing it, and report
|
|
156
|
+
`skipped` with a note when the text cannot be found or applied.
|
|
138
157
|
- An item whose `anchor.state` is `orphaned` lost its place in the document;
|
|
139
158
|
do not try to re-fix it — report it as `skipped` with a note.
|
|
140
159
|
- `done` is idempotent per generation: each item comes back as `accepted`,
|
|
@@ -153,13 +172,32 @@ carried into the shared copy.
|
|
|
153
172
|
Element anchors keep raw `ownText` for normalized text of at most 16,000 UTF-16
|
|
154
173
|
code units, including empty text. Larger captures omit `ownText` and return
|
|
155
174
|
`ownTextHash` (the full normalized text's SHA-256, 64 lowercase hex characters)
|
|
156
|
-
and `ownTextExcerpt` (its first 16,000 code units
|
|
175
|
+
and `ownTextExcerpt` (at most its first 16,000 code units, shortened to 15,999
|
|
176
|
+
when necessary to avoid splitting a valid surrogate pair). `preview next` preserves these
|
|
157
177
|
fields. The excerpt is reader context only and is never used for matching.
|
|
158
|
-
|
|
159
|
-
|
|
178
|
+
UTF-8 SHA-256 bytes stay compatible for well-formed text. Oversized hash
|
|
179
|
+
candidates containing a lone surrogate or U+FFFD after whitespace normalization
|
|
180
|
+
are ineligible for attachment, including legacy hashes from literal U+FFFD.
|
|
181
|
+
Their comments stay stored and visible as orphaned/needs-check; neither the
|
|
182
|
+
selector nor the excerpt can override that verdict. Short raw-text anchors
|
|
183
|
+
(including U+FFFD), unambiguous legacy anchors and selection anchors remain
|
|
184
|
+
supported; existing stored raw text is not migrated. Failed annotation saves retain the draft and show a retry message.
|
|
160
185
|
Repeated Share focuses the existing dialog: editable snapshots refresh in place,
|
|
161
186
|
while sign-in, uploads and completed results keep their state.
|
|
162
187
|
|
|
188
|
+
The editor keeps its text and target during resizing and failed saves. Finish or
|
|
189
|
+
cancel the current entry before choosing another target or loading a queued
|
|
190
|
+
update. A failed operation can be retried; a lost acknowledgement does not prove
|
|
191
|
+
that nothing was saved. If Preview ends, copy any unconfirmed comment from the
|
|
192
|
+
surviving page before closing it, then use the displayed restart command.
|
|
193
|
+
Never-saved text is not restored from disk after restarting.
|
|
194
|
+
|
|
195
|
+
For HTML with unreadable colors on a transparent canvas, the local **Document
|
|
196
|
+
background** control offers light (the default) and dark backgrounds. It changes
|
|
197
|
+
only the iframe background behind transparent content; authored backgrounds and
|
|
198
|
+
colors, browser theme/media detection, Markdown and the shared Web Viewer are
|
|
199
|
+
unchanged. It is a manual readability recovery, not automatic theme correction.
|
|
200
|
+
|
|
163
201
|
### Local preview isolation
|
|
164
202
|
|
|
165
203
|
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.
|
|
@@ -32,6 +32,8 @@ flags, MCP inputs, or bridge inputs for inheritance.
|
|
|
32
32
|
|
|
33
33
|
### Publisher device credentials (API only)
|
|
34
34
|
|
|
35
|
+
Publisher version appends return a stable app /a/:id shareUrl for HTML, Markdown and static sites, independent of current visibility. Opening it uses normal viewer authorization and host routing; human update URLs retain their existing visibility behavior.
|
|
36
|
+
|
|
35
37
|
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.
|
|
36
38
|
|
|
37
39
|
The device API accepts `preset: "publisher"` with a required `device_name`.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
## Static-site scripts and data
|
|
2
2
|
|
|
3
3
|
Folder shares load external HTTPS images, stylesheets from jsDelivr, cdnjs,
|
|
4
|
-
unpkg, and Google Fonts (`fonts.googleapis.com`), and font files from
|
|
5
|
-
and Google Fonts (`fonts.gstatic.com`)
|
|
6
|
-
|
|
4
|
+
unpkg, and Google Fonts (`fonts.googleapis.com`), and font files from the same
|
|
5
|
+
jsDelivr, cdnjs, and unpkg CDNs and Google Fonts (`fonts.gstatic.com`), so
|
|
6
|
+
icon/font packages from those CDNs work as-is.
|
|
7
7
|
JavaScript `eval` and `new Function` remain blocked.
|
|
8
8
|
|
|
9
9
|
Folder shares support WebAssembly, same-origin worker files, and `blob:` workers.
|