@jclvsh/dropspace 2.0.3 → 2.1.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/README.md +18 -17
- package/dist/cli-utils.js +4 -1
- package/dist/cli.js +3 -1
- package/dist/commands/keys.js +5 -10
- package/dist/tools/keys.js +4 -1
- package/dist/types.d.ts +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,6 +9,7 @@ npm install -g @jclvsh/dropspace
|
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
This installs two binaries:
|
|
12
|
+
|
|
12
13
|
- `dropspace` — CLI for terminal use
|
|
13
14
|
- `dropspace-mcp` — MCP server for AI agents
|
|
14
15
|
|
|
@@ -41,15 +42,15 @@ dropspace launches --help
|
|
|
41
42
|
|
|
42
43
|
### CLI Commands
|
|
43
44
|
|
|
44
|
-
| Group
|
|
45
|
-
|
|
|
46
|
-
| launches
|
|
47
|
-
| personas
|
|
48
|
-
| connections | list
|
|
49
|
-
| keys
|
|
50
|
-
| webhooks
|
|
51
|
-
| status
|
|
52
|
-
| usage
|
|
45
|
+
| Group | Commands | Count |
|
|
46
|
+
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----- |
|
|
47
|
+
| launches | list, create, get, update, delete, publish, retry, generate, retry-content, analytics, batch-analytics, status, delete-post, delete-posts | 14 |
|
|
48
|
+
| personas | list, create, get, update, delete, analyze | 6 |
|
|
49
|
+
| connections | list | 1 |
|
|
50
|
+
| keys | me, list, create, rename, revoke | 5 |
|
|
51
|
+
| webhooks | list, create, get, update, delete, rotate-secret, deliveries | 7 |
|
|
52
|
+
| status | dropspace official account connections | 1 |
|
|
53
|
+
| usage | plan, limits, and billing period | 1 |
|
|
53
54
|
|
|
54
55
|
## MCP Server Configuration
|
|
55
56
|
|
|
@@ -269,14 +270,14 @@ Generate an API key at [www.dropspace.dev/settings](https://www.dropspace.dev/se
|
|
|
269
270
|
|
|
270
271
|
API keys support scoped permissions:
|
|
271
272
|
|
|
272
|
-
| Scope | Access
|
|
273
|
-
| ---------- |
|
|
274
|
-
| `read` | List and read launches, personas, connections, dropspace status
|
|
275
|
-
| `write` | Create and update launches, personas
|
|
276
|
-
| `delete` | Delete launches, personas
|
|
277
|
-
| `publish` | Publish and retry launches
|
|
278
|
-
| `generate` | Generate AI content, retry content generation
|
|
279
|
-
| `admin` | Manage API keys and webhooks
|
|
273
|
+
| Scope | Access |
|
|
274
|
+
| ---------- | --------------------------------------------------------------- |
|
|
275
|
+
| `read` | List and read launches, personas, connections, dropspace status |
|
|
276
|
+
| `write` | Create and update launches, personas |
|
|
277
|
+
| `delete` | Delete launches, personas |
|
|
278
|
+
| `publish` | Publish and retry launches |
|
|
279
|
+
| `generate` | Generate AI content, retry content generation |
|
|
280
|
+
| `admin` | Manage API keys and webhooks |
|
|
280
281
|
|
|
281
282
|
### Recommended Scopes by Use Case
|
|
282
283
|
|
package/dist/cli-utils.js
CHANGED
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from "node:module";
|
|
2
3
|
import { Command } from "commander";
|
|
3
4
|
import { DropspaceClient } from "./client.js";
|
|
4
5
|
import { handleError } from "./cli-utils.js";
|
|
6
|
+
const pkg = createRequire(import.meta.url)("../package.json");
|
|
5
7
|
import { registerLaunchCommands } from "./commands/launches.js";
|
|
6
8
|
import { registerPersonaCommands } from "./commands/personas.js";
|
|
7
9
|
import { registerConnectionCommands } from "./commands/connections.js";
|
|
@@ -12,7 +14,7 @@ import { registerUsageCommands } from "./commands/usage.js";
|
|
|
12
14
|
const program = new Command()
|
|
13
15
|
.name("dropspace")
|
|
14
16
|
.description("dropspace CLI - manage launches, personas, and more")
|
|
15
|
-
.version(
|
|
17
|
+
.version(pkg.version)
|
|
16
18
|
.option("--json", "output as JSON (default)")
|
|
17
19
|
.option("--format <fmt>", "output format: json, table", "json");
|
|
18
20
|
try {
|
package/dist/commands/keys.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { formatOutput, handleError, getFormat, parseList } from "../cli-utils.js";
|
|
2
2
|
export function registerKeyCommands(program, client) {
|
|
3
3
|
const keys = program.command("keys").alias("k").description("manage API keys");
|
|
4
|
-
keys
|
|
5
|
-
.command("me")
|
|
4
|
+
keys.command("me")
|
|
6
5
|
.description("get current API key info")
|
|
7
6
|
.action(async () => {
|
|
8
7
|
try {
|
|
@@ -13,8 +12,7 @@ export function registerKeyCommands(program, client) {
|
|
|
13
12
|
handleError(error);
|
|
14
13
|
}
|
|
15
14
|
});
|
|
16
|
-
keys
|
|
17
|
-
.command("list")
|
|
15
|
+
keys.command("list")
|
|
18
16
|
.description("list API keys (requires admin scope)")
|
|
19
17
|
.action(async () => {
|
|
20
18
|
try {
|
|
@@ -25,8 +23,7 @@ export function registerKeyCommands(program, client) {
|
|
|
25
23
|
handleError(error);
|
|
26
24
|
}
|
|
27
25
|
});
|
|
28
|
-
keys
|
|
29
|
-
.command("create")
|
|
26
|
+
keys.command("create")
|
|
30
27
|
.description("create a new API key (requires admin scope)")
|
|
31
28
|
.requiredOption("-n, --name <name>", "key name")
|
|
32
29
|
.option("--scopes <list>", "comma-separated scopes: read,write,delete,publish,generate,admin", parseList)
|
|
@@ -42,8 +39,7 @@ export function registerKeyCommands(program, client) {
|
|
|
42
39
|
handleError(error);
|
|
43
40
|
}
|
|
44
41
|
});
|
|
45
|
-
keys
|
|
46
|
-
.command("rename <id>")
|
|
42
|
+
keys.command("rename <id>")
|
|
47
43
|
.description("rename an API key (requires admin scope)")
|
|
48
44
|
.requiredOption("-n, --name <name>", "new key name")
|
|
49
45
|
.action(async (id, opts) => {
|
|
@@ -55,8 +51,7 @@ export function registerKeyCommands(program, client) {
|
|
|
55
51
|
handleError(error);
|
|
56
52
|
}
|
|
57
53
|
});
|
|
58
|
-
keys
|
|
59
|
-
.command("revoke <id>")
|
|
54
|
+
keys.command("revoke <id>")
|
|
60
55
|
.description("permanently revoke an API key (requires admin scope)")
|
|
61
56
|
.action(async (id) => {
|
|
62
57
|
try {
|
package/dist/tools/keys.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
2
|
+
// Cross-repo canonical scope vocabulary (2026-05-07): read/write/generate/send/admin.
|
|
3
|
+
// Pre-rename: `delete` was folded into `write` (soft-deletes are writes); `publish` is now `send`.
|
|
4
|
+
// Existing keys with legacy scope values continue to authenticate via SCOPE_ALIASES on the server.
|
|
5
|
+
const SCOPES = ["read", "write", "generate", "send", "admin"];
|
|
3
6
|
export function registerKeyTools(server, client) {
|
|
4
7
|
server.tool("get_current_api_key", "get the current API key's info — name, scopes, and prefix (no scope required)", {}, async () => {
|
|
5
8
|
try {
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** Paginated API response wrapper */
|
|
2
2
|
export interface PaginatedResponse<T> {
|
|
3
|
+
success: true;
|
|
3
4
|
data: T[];
|
|
4
5
|
pagination: {
|
|
5
6
|
page: number;
|
|
@@ -10,14 +11,18 @@ export interface PaginatedResponse<T> {
|
|
|
10
11
|
}
|
|
11
12
|
/** Single-item API response wrapper */
|
|
12
13
|
export interface DataResponse<T> {
|
|
14
|
+
success: true;
|
|
13
15
|
data: T;
|
|
14
16
|
}
|
|
15
17
|
/** API error response */
|
|
16
18
|
export interface ApiErrorResponse {
|
|
19
|
+
success: false;
|
|
17
20
|
error: {
|
|
18
21
|
code: string;
|
|
19
22
|
message: string;
|
|
23
|
+
requestId: string;
|
|
20
24
|
field?: string;
|
|
25
|
+
details?: Record<string, unknown>;
|
|
21
26
|
};
|
|
22
27
|
}
|
|
23
28
|
/** Launch resource */
|