chore: v2.8.13 — Artifacts reinstall/edit/installs, agent steps in chat, pick a local file to attach, Windows paths as links

- Chat: an Agent step shows its task, status and tool calls and opens its conversation in place; Windows paths (E:\…, C:/…) in replies open as files
- Prompt: attach a file on this computer by path (native picker), clearer too-large messages
- Artifacts: edit title/description and a skill's files (new snapshot), Reinstall, install history, Hub-only rows, skills installed into ~/.claude/skills and ~/.agents/skills
- Files: batch upload of small files in one extract
- AI Tools: npm install falls back to --prefix ~/.local when the global prefix is not writable
This commit is contained in:
2026-10-20 16:44:55 +07:00
parent 49f87c4da3
commit 0547488f13
59 changed files with 4285 additions and 690 deletions
+25
View File
@@ -952,6 +952,31 @@ db.exec(`
CREATE INDEX IF NOT EXISTS idx_artifacts_shared ON artifacts(shared, kind);
CREATE INDEX IF NOT EXISTS idx_artifacts_session ON artifacts(session_id);
`);
// `in_library = 0`: its owner removed it from their library while it was
// shared, so it lives on in the Hub only (`remove`); unsharing it then deletes
// it. Existing rows are in their owner's library.
try {
db.prepare("SELECT in_library FROM artifacts LIMIT 1").get();
} catch {
db.prepare("ALTER TABLE artifacts ADD COLUMN in_library INTEGER NOT NULL DEFAULT 1").run();
}
// One row per install of an artifact (server/lib/artifacts.js `install`):
// who, when, and the folders it was written to — `artifacts.installs` only
// counts. Installs before this table existed stay counted, not listed.
// Additive; rows go with their artifact.
db.exec(`
CREATE TABLE IF NOT EXISTS artifact_installs (
id INTEGER PRIMARY KEY AUTOINCREMENT,
artifact_id INTEGER NOT NULL,
user_id INTEGER,
paths TEXT NOT NULL DEFAULT '[]',
replaced INTEGER NOT NULL DEFAULT 0,
installed_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')),
FOREIGN KEY (artifact_id) REFERENCES artifacts(id) ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS idx_artifact_installs_artifact ON artifact_installs(artifact_id, id);
`);
// Seed lane_stage_events from the snapshots that predate it, so upgrading does
// not read as "every pipeline has never run". Each lane's live `stages` blob