@dreamlake/dreamlake-cli 0.104.7 → 0.105.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/dist/api/content.d.ts +4 -3
- package/dist/api/index.d.ts +33 -23
- package/dist/api/index.js +25 -16
- package/dist/api/memo-character-plan.d.ts +2 -0
- package/dist/api/memo-character-plan.js +2 -0
- package/dist/api/memo-editing.d.ts +2 -0
- package/dist/api/memo-editing.js +2 -0
- package/dist/api/memo-edits.d.ts +63 -0
- package/dist/api/memo-edits.js +206 -0
- package/dist/api/memo-events.d.ts +44 -0
- package/dist/api/memo-events.js +65 -0
- package/dist/api/memo-facade.d.ts +294 -0
- package/dist/api/memo-facade.js +382 -0
- package/dist/api/memo-files.d.ts +111 -0
- package/dist/api/memo-files.js +110 -0
- package/dist/api/memo-html-read.d.ts +2 -0
- package/dist/api/memo-html-read.js +2 -0
- package/dist/api/memo-html.d.ts +2 -0
- package/dist/api/memo-html.js +2 -0
- package/dist/api/memo-linger.d.ts +85 -0
- package/dist/api/memo-linger.js +271 -0
- package/dist/api/memo-presence.d.ts +109 -0
- package/dist/api/memo-presence.js +75 -0
- package/dist/api/memo-reading.d.ts +55 -0
- package/dist/api/memo-reading.js +43 -0
- package/dist/api/memo-toc.d.ts +2 -0
- package/dist/api/memo-toc.js +2 -0
- package/dist/api/memo-write.d.ts +119 -0
- package/dist/api/memo-write.js +221 -0
- package/dist/api/memos.d.ts +344 -0
- package/dist/api/memos.js +231 -0
- package/dist/api/note-character-plan.d.ts +2 -2
- package/dist/api/note-character-plan.js +2 -2
- package/dist/api/note-editing.d.ts +2 -2
- package/dist/api/note-editing.js +2 -2
- package/dist/api/note-edits.d.ts +2 -59
- package/dist/api/note-edits.js +2 -205
- package/dist/api/note-events.d.ts +2 -41
- package/dist/api/note-events.js +2 -64
- package/dist/api/note-facade.d.ts +2 -268
- package/dist/api/note-facade.js +2 -376
- package/dist/api/note-files.d.ts +2 -102
- package/dist/api/note-files.js +2 -107
- package/dist/api/note-html-read.d.ts +2 -2
- package/dist/api/note-html-read.js +2 -2
- package/dist/api/note-html.d.ts +2 -2
- package/dist/api/note-html.js +2 -2
- package/dist/api/note-linger.d.ts +2 -83
- package/dist/api/note-linger.js +2 -270
- package/dist/api/note-presence.d.ts +2 -100
- package/dist/api/note-presence.js +2 -73
- package/dist/api/note-reading.d.ts +2 -51
- package/dist/api/note-reading.js +2 -42
- package/dist/api/note-toc.d.ts +2 -2
- package/dist/api/note-toc.js +2 -2
- package/dist/api/note-write.d.ts +2 -110
- package/dist/api/note-write.js +2 -217
- package/dist/api/notes.d.ts +2 -335
- package/dist/api/notes.js +2 -230
- package/dist/api/open-resources.js +3 -3
- package/dist/api/workspace.d.ts +3 -2
- package/dist/api/workspace.js +7 -6
- package/dist/cli/artifact/index.js +3 -3
- package/dist/cli/folders/index.d.ts +1 -1
- package/dist/cli/folders/index.js +4 -4
- package/dist/cli/help-examples.generated.js +1 -1
- package/dist/cli/index.js +2 -2
- package/dist/cli/{notes → memos}/api-transport.d.ts +1 -1
- package/dist/cli/{notes → memos}/api-transport.js +1 -1
- package/dist/cli/{notes → memos}/archive-command.d.ts +1 -1
- package/dist/cli/{notes → memos}/archive-command.js +5 -5
- package/dist/cli/{notes → memos}/character-plan.d.ts +3 -1
- package/dist/cli/{notes → memos}/character-plan.js +7 -5
- package/dist/cli/{notes → memos}/document.d.ts +9 -9
- package/dist/cli/{notes → memos}/document.js +12 -12
- package/dist/cli/{notes → memos}/edit-commands.d.ts +8 -8
- package/dist/cli/{notes → memos}/edit-commands.js +14 -14
- package/dist/cli/{notes → memos}/events.d.ts +3 -3
- package/dist/cli/{notes → memos}/events.js +2 -2
- package/dist/cli/{notes → memos}/files-commands.d.ts +2 -2
- package/dist/cli/{notes → memos}/files-commands.js +5 -5
- package/dist/cli/{notes → memos}/index.d.ts +16 -16
- package/dist/cli/{notes → memos}/index.js +53 -53
- package/dist/cli/{notes → memos}/linger.d.ts +3 -3
- package/dist/cli/{notes → memos}/linger.js +5 -5
- package/dist/cli/{notes → memos}/move-command.d.ts +5 -5
- package/dist/cli/{notes → memos}/move-command.js +6 -6
- package/dist/cli/{notes → memos}/rm-command.d.ts +2 -2
- package/dist/cli/{notes → memos}/rm-command.js +2 -2
- package/dist/cli/{notes → memos}/select-command.d.ts +1 -1
- package/dist/cli/{notes → memos}/select-command.js +4 -4
- package/dist/cli/{notes → memos}/suggest-diff.d.ts +1 -1
- package/dist/cli/{notes → memos}/suggest-diff.js +2 -2
- package/dist/cli/{notes → memos}/transfer-command.d.ts +2 -2
- package/dist/cli/{notes → memos}/transfer-command.js +2 -2
- package/dist/cli/share.d.ts +1 -1
- package/dist/cli/share.js +10 -6
- package/dist/cli/update/index.js +3 -3
- package/dist/cli/version.d.ts +1 -1
- package/dist/cli/version.js +1 -1
- package/package.json +9 -9
- /package/dist/cli/{notes → memos}/editing.d.ts +0 -0
- /package/dist/cli/{notes → memos}/editing.js +0 -0
- /package/dist/cli/{notes → memos}/html-read.d.ts +0 -0
- /package/dist/cli/{notes → memos}/html-read.js +0 -0
- /package/dist/cli/{notes → memos}/html.d.ts +0 -0
- /package/dist/cli/{notes → memos}/html.js +0 -0
- /package/dist/cli/{notes → memos}/media-commands.d.ts +0 -0
- /package/dist/cli/{notes → memos}/media-commands.js +0 -0
- /package/dist/cli/{notes → memos}/toc.d.ts +0 -0
- /package/dist/cli/{notes → memos}/toc.js +0 -0
- /package/dist/cli/{notes → memos}/version-commands.d.ts +0 -0
- /package/dist/cli/{notes → memos}/version-commands.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Command } from 'commander';
|
|
2
2
|
import { type MetadataTransferOptions } from '../ownership/metadata-transfer.js';
|
|
3
|
-
export type
|
|
3
|
+
export type MemoTransferOptions = MetadataTransferOptions;
|
|
4
4
|
/** The Note convenience command uses the same capability-bound metadata protocol. */
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function runMemosTransfer(noteId: string, opts: MemoTransferOptions): Promise<number>;
|
|
6
6
|
export declare function registerTransferCommand(notes: Command): void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { metadataTransferFlags, runMetadataTransfer } from '../ownership/metadata-transfer.js';
|
|
2
2
|
/** The Note convenience command uses the same capability-bound metadata protocol. */
|
|
3
|
-
export function
|
|
3
|
+
export function runMemosTransfer(noteId, opts) {
|
|
4
4
|
return runMetadataTransfer('note', noteId, opts);
|
|
5
5
|
}
|
|
6
6
|
export function registerTransferCommand(notes) {
|
|
7
7
|
metadataTransferFlags(notes.command('transfer <note-id>').description('Request a recipient-accepted, metadata-only Memo ownership transfer'))
|
|
8
|
-
.action(async (noteId, opts) => { process.exitCode = await
|
|
8
|
+
.action(async (noteId, opts) => { process.exitCode = await runMemosTransfer(noteId, opts); });
|
|
9
9
|
}
|
package/dist/cli/share.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Share management uses catalog metadata only; it never reads or rewrites content. */
|
|
2
2
|
import type { Command } from "commander";
|
|
3
|
-
import { type ConnOpts } from "./
|
|
3
|
+
import { type ConnOpts } from "./memos/index.js";
|
|
4
4
|
type Kind = "notes" | "artifact";
|
|
5
5
|
type Operation = "get" | "create" | "revoke" | "access" | "remove" | "visibility";
|
|
6
6
|
interface ShareOptions extends ConnOpts {
|
package/dist/cli/share.js
CHANGED
|
@@ -3,15 +3,16 @@ import { resolveCtx } from "./compat/ctx.js";
|
|
|
3
3
|
import { withConnFlags } from "./compat/flags.js";
|
|
4
4
|
import { requireNamespace, requireToken } from "./compat/http.js";
|
|
5
5
|
import { emitJson, fail, renderTable } from "./helpers.js";
|
|
6
|
-
import { resolveNote } from "./
|
|
6
|
+
import { resolveNote } from "./memos/index.js";
|
|
7
7
|
import { webBase } from "./workflow/index.js";
|
|
8
8
|
export async function runShare(kind, operation, ref, opts) {
|
|
9
9
|
if (operation === "create" && kind === "notes" && !["read", "write"].includes(opts.role ?? "read")) {
|
|
10
10
|
fail("--role must be read or write");
|
|
11
11
|
return 1;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
const visibilities = kind === "artifact" ? ["private", "public", "unlisted"] : ["private", "public"];
|
|
14
|
+
if (operation === "visibility" && !visibilities.includes(opts.visibility ?? "")) {
|
|
15
|
+
fail(`visibility must be ${visibilities.join(", ")}`);
|
|
15
16
|
return 1;
|
|
16
17
|
}
|
|
17
18
|
const c = resolveCtx(opts);
|
|
@@ -45,6 +46,9 @@ export async function runShare(kind, operation, ref, opts) {
|
|
|
45
46
|
return 1;
|
|
46
47
|
row = await requestJson(c.remote, `/namespaces/${encodeURIComponent(ns)}/artifacts/${encodeURIComponent(id)}`, { token });
|
|
47
48
|
}
|
|
49
|
+
const urlId = kind === "artifact" ? row.slug ?? ref : id;
|
|
50
|
+
if (kind === "artifact" && typeof row.artifactId === "string")
|
|
51
|
+
id = row.artifactId;
|
|
48
52
|
const base = `/namespaces/${encodeURIComponent(ns)}/${kind === "notes" ? "notes" : "artifacts"}/${encodeURIComponent(id)}`;
|
|
49
53
|
const canManage = kind === "notes" ? row.permissions?.share : row.viewerCanManage;
|
|
50
54
|
// The artifact mutation endpoint is an upsert: preflight avoids creating a
|
|
@@ -89,10 +93,10 @@ export async function runShare(kind, operation, ref, opts) {
|
|
|
89
93
|
: { json: { share: operation === "create" } }),
|
|
90
94
|
});
|
|
91
95
|
}
|
|
92
|
-
const url = `${webBase(c.remote)}/${encodeURIComponent(ns)}/${kind === "notes" ? "notes" : "artifacts"}/${encodeURIComponent(
|
|
96
|
+
const url = `${webBase(c.remote)}/${encodeURIComponent(ns)}/${kind === "notes" ? "notes" : "artifacts"}/${encodeURIComponent(urlId)}`;
|
|
93
97
|
const result = {
|
|
94
98
|
url, visibility: row.visibility,
|
|
95
|
-
publicUrl: row.visibility === "public" ? url : null,
|
|
99
|
+
publicUrl: row.visibility === "public" || (kind === "artifact" && row.visibility === "unlisted") ? url : null,
|
|
96
100
|
shareUrl: row.shareToken ? `${url}?share=${encodeURIComponent(row.shareToken)}` : null,
|
|
97
101
|
shareRole: kind === "notes" ? row.shareRole ?? null : row.shareToken ? "read" : null,
|
|
98
102
|
// An omitted token is redacted, not evidence that sharing is disabled.
|
|
@@ -132,7 +136,7 @@ export function registerShareCommands(parent, kind) {
|
|
|
132
136
|
else
|
|
133
137
|
cmd.action(async (ref, opts) => { process.exit(await runShare(kind, operation, ref, opts)); });
|
|
134
138
|
}
|
|
135
|
-
withConnFlags(parent.command("visibility").argument("<resource>").argument("<visibility>", "private or public")
|
|
139
|
+
withConnFlags(parent.command("visibility").argument("<resource>").argument("<visibility>", kind === "artifact" ? "private, public or unlisted" : "private or public")
|
|
136
140
|
.description("set read visibility; does not revoke share links or accepted access")
|
|
137
141
|
.option("--namespace <slug>", "namespace").option("--json", "emit structured JSON"))
|
|
138
142
|
.action(async (ref, visibility, opts) => { process.exit(await runShare(kind, "visibility", ref, { ...opts, visibility })); });
|
package/dist/cli/update/index.js
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
import { HttpError, requestJson } from "../client.js";
|
|
9
9
|
import { resolveNamespace, resolveRemote, resolveToken } from "../config.js";
|
|
10
10
|
import { fail, ok, splitCsv } from "../helpers.js";
|
|
11
|
-
import { resolveNote, seg } from "../
|
|
12
|
-
import {
|
|
11
|
+
import { resolveNote, seg } from "../memos/index.js";
|
|
12
|
+
import { memoProjectNode } from "../memos/move-command.js";
|
|
13
13
|
import { fetchAllBindrs, fetchAllEpisodes, matchBindrs, matchEpisodes, resolveProjectCtx, } from "../resources.js";
|
|
14
14
|
import { formatProject } from "../target.js";
|
|
15
15
|
function nothingToDo(opts) {
|
|
@@ -62,7 +62,7 @@ export async function runUpdateBindr(name, opts) {
|
|
|
62
62
|
const noteId = await resolveNote({ remote, token, ns: s.namespace }, opts.addNote);
|
|
63
63
|
if (!noteId)
|
|
64
64
|
return 1;
|
|
65
|
-
const node = await
|
|
65
|
+
const node = await memoProjectNode(remote, token, s.namespace, noteId, s.project);
|
|
66
66
|
// Idempotent on the server: re-tagging an already-tagged node changes nothing.
|
|
67
67
|
const res = await requestJson(remote, `/bindrs/${seg(bindr.id)}/members`, {
|
|
68
68
|
method: "POST",
|
package/dist/cli/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.105.0";
|
package/dist/cli/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dreamlake/dreamlake-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.105.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dreamlake-ai/dreamlake-cli.git"
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"node": ">=18"
|
|
37
37
|
},
|
|
38
38
|
"optionalDependencies": {
|
|
39
|
-
"@dreamlake/dreamlake-cli-darwin-arm64": "0.
|
|
40
|
-
"@dreamlake/dreamlake-cli-darwin-x64": "0.
|
|
41
|
-
"@dreamlake/dreamlake-cli-linux-x64": "0.
|
|
42
|
-
"@dreamlake/dreamlake-cli-linux-arm64": "0.
|
|
43
|
-
"@dreamlake/dreamlake-cli-linux-x64-musl": "0.
|
|
44
|
-
"@dreamlake/dreamlake-cli-linux-arm64-musl": "0.
|
|
45
|
-
"@dreamlake/dreamlake-cli-win32-x64": "0.
|
|
46
|
-
"@dreamlake/dreamlake-cli-win32-arm64": "0.
|
|
39
|
+
"@dreamlake/dreamlake-cli-darwin-arm64": "0.105.0",
|
|
40
|
+
"@dreamlake/dreamlake-cli-darwin-x64": "0.105.0",
|
|
41
|
+
"@dreamlake/dreamlake-cli-linux-x64": "0.105.0",
|
|
42
|
+
"@dreamlake/dreamlake-cli-linux-arm64": "0.105.0",
|
|
43
|
+
"@dreamlake/dreamlake-cli-linux-x64-musl": "0.105.0",
|
|
44
|
+
"@dreamlake/dreamlake-cli-linux-arm64-musl": "0.105.0",
|
|
45
|
+
"@dreamlake/dreamlake-cli-win32-x64": "0.105.0",
|
|
46
|
+
"@dreamlake/dreamlake-cli-win32-arm64": "0.105.0"
|
|
47
47
|
}
|
|
48
48
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|