Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,26 +244,26 @@ heyditto friends --output json

### `graphs`

Manage the public knowledge graphs you're subscribed to. Subscribed graphs are
Manage the public workspaces you're subscribed to. Subscribed workspaces are
folded into your `search`/`fetch` read paths (read-only). Subscriptions only ever
cover **other** users' public graphs by `@username` — this command can't touch
your own graph or an app's graph, since those aren't subscriptions.
cover **other** users' public workspaces by `@username` — this command can't touch
your own workspace or an app's workspace, since those aren't subscriptions.

```bash
heyditto graphs create feedback-triager # create a NEW dedicated graph you own (mint its CI key in the Ditto UI)
heyditto graphs list # graphs you're subscribed to
heyditto graphs available # readable knowledge graphs, including main/app graphs
heyditto graphs add @minos # subscribe to @minos's public graph
heyditto graphs create feedback-triager # create a NEW dedicated workspace you own (mint its CI key in the Ditto UI)
heyditto graphs list # workspaces you're subscribed to
heyditto graphs available # readable workspaces, including main/app workspaces
heyditto graphs add @minos # subscribe to @minos's public workspace
heyditto graphs remove @minos # unsubscribe
heyditto graphs subscribers # who's subscribed to your graph
heyditto graphs sharing --disable # disable public subscriptions to your graph
heyditto graphs subscribers # who's subscribed to your workspace
heyditto graphs sharing --disable # disable public subscriptions to your workspace
```

Top-level aliases are also available:

```bash
heyditto knowledge-graphs --output json
heyditto graph-sharing --enable --title "Support Graph" --description "Public support notes"
heyditto graph-sharing --enable --title "Support Workspace" --description "Public support notes"
```

### `status`
Expand Down
70 changes: 35 additions & 35 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,8 @@ function cmdConfig(options: CommonOptions): void {
}

// These commands mirror the MCP subscription tools. Subscriptions only ever
// cover other users' public graphs by @username; this cannot touch the account's
// own graph or app graph, since those are not subscriptions.
// cover other users' public workspaces by @username; this cannot touch the account's
// own workspace or app workspace, since those are not subscriptions.
async function cmdGraphsCreate(
nameParts: string[],
options: CommonOptions & { app?: string },
Expand Down Expand Up @@ -835,8 +835,8 @@ Environment:
addExamples(
program
.command("search")
.description("search private memories, optionally public graphs")
.summary("search private memories, optionally public graphs")
.description("search private memories, optionally public workspaces")
.summary("search private memories, optionally public workspaces")
.argument("<query...>", "one or more search queries")
.option("--include-public", "include public DittoHub memories")
.option("--filter-username <username>", "scope public results to a username")
Expand Down Expand Up @@ -929,7 +929,7 @@ Examples:
.summary("permanently delete a saved memory")
.argument("<memory-id>", "memory id")
.requiredOption("--confirm", "confirm permanent deletion")
.option("--kg <alias>", "knowledge graph alias")
.option("--kg <alias>", "workspace alias")
.addOption(outputOption())
.action(cmdDelete);

Expand All @@ -948,7 +948,7 @@ Examples:
.description("list related subjects for a subject")
.summary("list related subjects for a subject")
.argument("<subject-id>", "subject id")
.option("--kg <alias>", "knowledge graph alias")
.option("--kg <alias>", "workspace alias")
.option("--limit <number>", "maximum number of related subjects")
.option("--min-weight <number>", "minimum edge weight from 0 to 1")
.addOption(outputOption())
Expand Down Expand Up @@ -983,99 +983,99 @@ Examples:
program
.command("knowledge-graphs")
.alias("list_knowledge_graphs")
.description("list readable knowledge graphs")
.summary("list readable knowledge graphs")
.description("list readable workspaces")
.summary("list readable workspaces")
.addOption(outputOption())
.action(cmdKnowledgeGraphs);

program
.command("graph-sharing")
.alias("set_knowledge_graph_sharing")
.description("configure whether others can subscribe to your graph")
.summary("configure graph sharing")
.option("--enable", "allow public subscriptions to your graph")
.option("--disable", "disable public subscriptions to your graph")
.option("--title <title>", "subscribable graph title")
.option("--description <description>", "subscribable graph description")
.description("configure whether others can subscribe to your workspace")
.summary("configure workspace sharing")
.option("--enable", "allow public subscriptions to your workspace")
.option("--disable", "disable public subscriptions to your workspace")
.option("--title <title>", "subscribable workspace title")
.option("--description <description>", "subscribable workspace description")
.addOption(outputOption())
.action(cmdGraphSharing);

const graphs = program
.command("graphs")
.description("manage knowledge graph subscriptions")
.summary("manage knowledge graph subscriptions")
.description("manage workspace subscriptions")
.summary("manage workspace subscriptions")
.showHelpAfterError()
.addHelpText(
"after",
`
Subscriptions cover other users' public graphs by @username. They do not modify
your own graph or an app graph.`,
Subscriptions cover other users' public workspaces by @username. They do not modify
your own workspace or an app workspace.`,
);

graphs
.command("create")
.description("create a dedicated graph you own (optionally owned by an app)")
.argument("<name...>", "graph name")
.description("create a dedicated workspace you own (optionally owned by an app)")
.argument("<name...>", "workspace name")
.option(
"--app <appId>",
"create the graph OWNED BY one of your apps (an app can own many graphs)",
"create the workspace OWNED BY one of your apps (an app can own many workspaces)",
)
.addOption(outputOption())
.action(cmdGraphsCreate);

graphs
.command("list")
.description("list public graphs you're subscribed to")
.description("list public workspaces you're subscribed to")
.addOption(outputOption())
.action(cmdGraphsList);

graphs
.command("available")
.alias("list_knowledge_graphs")
.description("list readable knowledge graphs")
.description("list readable workspaces")
.addOption(outputOption())
.action(cmdKnowledgeGraphs);

graphs
.command("add")
.description("subscribe to a public graph")
.argument("<username>", "public graph username, with or without @")
.description("subscribe to a public workspace")
.argument("<username>", "public workspace username, with or without @")
.addOption(outputOption())
.action(cmdGraphsAdd);

graphs
.command("remove")
.description("unsubscribe from a public graph")
.argument("<username>", "public graph username, with or without @")
.description("unsubscribe from a public workspace")
.argument("<username>", "public workspace username, with or without @")
.addOption(outputOption())
.action(cmdGraphsRemove);

graphs
.command("subscribers")
.description("list who is subscribed to your graph")
.description("list who is subscribed to your workspace")
.addOption(outputOption())
.action(cmdGraphsSubscribers);

graphs
.command("sharing")
.alias("set_knowledge_graph_sharing")
.description("configure whether others can subscribe to your graph")
.option("--enable", "allow public subscriptions to your graph")
.option("--disable", "disable public subscriptions to your graph")
.option("--title <title>", "subscribable graph title")
.option("--description <description>", "subscribable graph description")
.description("configure whether others can subscribe to your workspace")
.option("--enable", "allow public subscriptions to your workspace")
.option("--disable", "disable public subscriptions to your workspace")
.option("--title <title>", "subscribable workspace title")
.option("--description <description>", "subscribable workspace description")
.addOption(outputOption())
.action(cmdGraphSharing);

program
.command("init")
.description("initialize a claimable agent account")
.argument("[graph...]", "public graphs to subscribe to")
.argument("[workspace...]", "public workspaces to subscribe to")
.addOption(new Option("--agent", "create a free, claimable agent account").hideHelp())
.option("--name <name>", "agent name")
.addOption(new Option("--agent-caller <name>", "agent name").hideHelp())
.addOption(
new Option("--subscribe <graph>", "public graphs to subscribe to")
new Option("--subscribe <workspace>", "public workspaces to subscribe to")
.argParser((value, previous: string[] | undefined) => [...(previous ?? []), value]),
)
.option("--json", "print machine-readable output")
Expand Down
2 changes: 1 addition & 1 deletion test/cli-help.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ test("delete requires explicit confirmation before auth", () => {
test("graphs available help exposes readable graph listing", () => {
const result = run(["graphs", "available", "--help"]);
assert.equal(result.status, 0);
assert.match(result.stdout, /list readable knowledge graphs/);
assert.match(result.stdout, /list readable workspaces/);
});

test("init help defaults to agent setup without showing legacy flag", () => {
Expand Down