@kosuke-ai/cli 1.0.1-next.5 → 1.0.1-next.6

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.
Files changed (82) hide show
  1. package/README.md +104 -0
  2. package/dist/commands/mcp.js +85 -0
  3. package/dist/generated/tools/deploy/cancel.js +20 -0
  4. package/dist/generated/tools/deploy/messages.js +20 -0
  5. package/dist/generated/tools/deploy/run.js +52 -0
  6. package/dist/generated/tools/index.js +138 -0
  7. package/dist/generated/tools/preview/get.js +24 -0
  8. package/dist/generated/tools/preview/health.js +24 -0
  9. package/dist/generated/tools/preview/reset.js +23 -0
  10. package/dist/generated/tools/preview/share-create.js +24 -0
  11. package/dist/generated/tools/preview/share-delete.js +24 -0
  12. package/dist/generated/tools/preview/share-get.js +24 -0
  13. package/dist/generated/tools/preview/shared-artifact.js +25 -0
  14. package/dist/generated/tools/preview/shared.js +20 -0
  15. package/dist/generated/tools/projects/create.js +26 -0
  16. package/dist/generated/tools/projects/delete.js +20 -0
  17. package/dist/generated/tools/projects/env-vars-add.js +50 -0
  18. package/dist/generated/tools/projects/env-vars-remove.js +31 -0
  19. package/dist/generated/tools/projects/get.js +20 -0
  20. package/dist/generated/tools/projects/list.js +12 -0
  21. package/dist/generated/tools/projects/services-add.js +111 -0
  22. package/dist/generated/tools/projects/services-list.js +20 -0
  23. package/dist/generated/tools/projects/services-remove.js +25 -0
  24. package/dist/generated/tools/projects/services-update.js +104 -0
  25. package/dist/generated/tools/projects/settings-get.js +20 -0
  26. package/dist/generated/tools/projects/settings-import.js +208 -0
  27. package/dist/generated/tools/projects/settings-update.js +72 -0
  28. package/dist/generated/tools/projects/skills.js +32 -0
  29. package/dist/generated/tools/projects/update.js +24 -0
  30. package/dist/generated/tools/sessions/activate.js +25 -0
  31. package/dist/generated/tools/sessions/artifacts-get.js +30 -0
  32. package/dist/generated/tools/sessions/artifacts-list.js +25 -0
  33. package/dist/generated/tools/sessions/checklist-generate.js +25 -0
  34. package/dist/generated/tools/sessions/checklist-get.js +25 -0
  35. package/dist/generated/tools/sessions/comments-add.js +53 -0
  36. package/dist/generated/tools/sessions/comments-delete.js +30 -0
  37. package/dist/generated/tools/sessions/comments-list.js +25 -0
  38. package/dist/generated/tools/sessions/comments-update.js +62 -0
  39. package/dist/generated/tools/sessions/create.js +69 -0
  40. package/dist/generated/tools/sessions/delete.js +25 -0
  41. package/dist/generated/tools/sessions/diff-files.js +25 -0
  42. package/dist/generated/tools/sessions/diff-patch.js +64 -0
  43. package/dist/generated/tools/sessions/edit-prompt.js +69 -0
  44. package/dist/generated/tools/sessions/files-get.js +30 -0
  45. package/dist/generated/tools/sessions/files-list.js +25 -0
  46. package/dist/generated/tools/sessions/files-write.js +37 -0
  47. package/dist/generated/tools/sessions/get.js +25 -0
  48. package/dist/generated/tools/sessions/git-commit-message.js +25 -0
  49. package/dist/generated/tools/sessions/git-commit.js +29 -0
  50. package/dist/generated/tools/sessions/git-push.js +25 -0
  51. package/dist/generated/tools/sessions/git-state.js +25 -0
  52. package/dist/generated/tools/sessions/jobs-cancel.js +30 -0
  53. package/dist/generated/tools/sessions/jobs-get.js +30 -0
  54. package/dist/generated/tools/sessions/list.js +56 -0
  55. package/dist/generated/tools/sessions/messages.js +25 -0
  56. package/dist/generated/tools/sessions/search.js +17 -0
  57. package/dist/generated/tools/sessions/send.js +137 -0
  58. package/dist/generated/tools/sessions/update.js +63 -0
  59. package/dist/generated/tools/workspaces/access-status.js +28 -0
  60. package/dist/generated/tools/workspaces/ai-provider-get.js +20 -0
  61. package/dist/generated/tools/workspaces/ai-provider-remove.js +39 -0
  62. package/dist/generated/tools/workspaces/ai-provider-set.js +106 -0
  63. package/dist/generated/tools/workspaces/credits.js +20 -0
  64. package/dist/generated/tools/workspaces/get.js +20 -0
  65. package/dist/generated/tools/workspaces/getting-started-get.js +20 -0
  66. package/dist/generated/tools/workspaces/getting-started-update.js +27 -0
  67. package/dist/generated/tools/workspaces/list.js +12 -0
  68. package/dist/generated/tools/workspaces/members.js +24 -0
  69. package/dist/generated/tools/workspaces/sandbox-limit.js +20 -0
  70. package/dist/generated/tools/workspaces/stop-sandboxes.js +31 -0
  71. package/dist/generated/tools/workspaces/usage.js +28 -0
  72. package/dist/program.js +4 -2
  73. package/dist/runtime/mcp-attachments.js +110 -0
  74. package/dist/runtime/mcp-composite-support.js +49 -0
  75. package/dist/runtime/mcp-composite.js +309 -0
  76. package/dist/runtime/mcp-guard.js +74 -0
  77. package/dist/runtime/mcp-invoke.js +123 -0
  78. package/dist/runtime/mcp-open-pr.js +83 -0
  79. package/dist/runtime/mcp-redact.js +31 -0
  80. package/dist/runtime/mcp-server.js +219 -0
  81. package/dist/runtime/mcp-tool.js +6 -0
  82. package/package.json +2 -1
package/README.md CHANGED
@@ -62,3 +62,107 @@ into `src/generated/`: request types (openapi-typescript) and one descriptor per
62
62
  operation, which the hand-written runtime turns into commands. `npm run check`
63
63
  regenerates and fails on any difference, so the tree is only ever what the
64
64
  document says.
65
+
66
+ ## MCP server
67
+
68
+ The same package serves the platform to an MCP client: `kosuke mcp serve` runs on
69
+ your machine as a child process of Claude, Cursor or Codex, speaks MCP over
70
+ stdio, and talks to app.kosuke.ai with the token above. There is nothing to
71
+ deploy. One block in the client's config is the whole install:
72
+
73
+ ```json
74
+ {
75
+ "mcpServers": {
76
+ "kosuke": {
77
+ "command": "npx",
78
+ "args": ["-y", "@kosuke-ai/cli", "mcp", "serve"],
79
+ "env": { "KOSUKE_API_KEY": "kosuke_..." }
80
+ }
81
+ }
82
+ }
83
+ ```
84
+
85
+ `KOSUKE_API_URL` in the same `env` points it at another deployment. `kosuke mcp
86
+ tools` prints the tool list as JSON without starting a server.
87
+
88
+ Attachments are read from disk, and the model picks the path, so the server
89
+ only reads under one directory: the working directory it was started in, or
90
+ `KOSUKE_MCP_ATTACHMENT_ROOT` / `--attachment-root`. Set it to the project you
91
+ are working on. A path outside the root, a symlink that leads out of it, and
92
+ any hidden path under it (`.ssh`, `.aws`, `.config`, `.env`) are refused
93
+ before anything is read.
94
+
95
+ ### Tools
96
+
97
+ Every operation of the API is a tool, generated from the same descriptors as
98
+ the commands: `kosuke sessions send` is the tool `sessions_send`, path params
99
+ and request fields are its arguments, and the API's own description is the
100
+ tool's. A body that is not a flat object (`projects_env_vars_add`,
101
+ `workspaces_ai_provider_set`) is one `body` argument with the real schema. The
102
+ four operations that take files accept `attachments: [{ "path": "..." }]`, paths
103
+ on the machine the server runs on, like `--attach`, confined to the attachment
104
+ root above.
105
+
106
+ On top, three hand-written tools for the arcs that otherwise make an agent
107
+ plumb ids by hand. They only ever call the generated tools:
108
+
109
+ | Tool | What it does |
110
+ | -------- | ------------------------------------------------------------------------------------------------------------------- |
111
+ | `ship` | Create a chat session from a prompt and start its first turn, or start a backlog session. Returns the job to watch. |
112
+ | `watch` | Poll a chat job, or the deploy, until it settles, with progress on the way. Returns the last assistant message. |
113
+ | `submit` | Send the `open-pr` skill to a session so it opens, or updates, its pull request. Returns the job to watch. |
114
+
115
+ ### Toolsets
116
+
117
+ Seventy-odd tools on every turn is more than a model chooses between well, so
118
+ they are grouped by the spec's own tags. All are on by default; load a subset
119
+ with `--toolsets` (or `KOSUKE_MCP_TOOLSETS`) in the `args`/`env` above.
120
+ `kosuke mcp tools` prints the current list; the counts here are as of this
121
+ version of the document:
122
+
123
+ | Toolset | Tools | Covers |
124
+ | ------------ | ----: | ---------------------------------------------------------------------------------------------- |
125
+ | `sessions` | 29 | Chat sessions: create, send, jobs, messages, files, diff, comments, git, checklist, artifacts. |
126
+ | `projects` | 15 | Projects and their settings: services, environment variables, import, skills. |
127
+ | `workspaces` | 13 | Workspaces: members, usage, credits, AI provider, sandboxes. |
128
+ | `preview` | 8 | Preview URLs, health, reset, share links and shared artifacts. |
129
+ | `deploy` | 3 | Run, cancel and read the agentic deploy. |
130
+ | `composite` | 3 | `ship`, `watch`, `submit`. |
131
+
132
+ ```json
133
+ "args": ["-y", "@kosuke-ai/cli", "mcp", "serve", "--toolsets", "sessions,composite"]
134
+ ```
135
+
136
+ `--read-only` keeps only the tools that read: the GET operations and `watch`,
137
+ minus the three reads that wake a paused sandbox and so start billing
138
+ (`preview_get`, `preview_shared`, `sessions_files_get`). The same rule sets
139
+ each tool's `readOnlyHint`, the signal a client uses to run a call without
140
+ asking.
141
+
142
+ ### Safeguards
143
+
144
+ Tool arguments and results end up in the agent's transcript, so the server
145
+ enforces these rather than asking:
146
+
147
+ - A provider key (`anthropicApiKey`, `bedrockApiKey`, `openaiApiKey`) or an
148
+ environment variable marked `isSecret` in an argument is refused before any
149
+ request is made, so the server never knowingly forwards a declared secret.
150
+ It cannot stop a value the caller does not declare: whatever a model puts
151
+ in an argument is in the transcript already. Set secrets in Settings or with
152
+ the CLI.
153
+ - Free text is never refused, but an argument that looks like it quotes a
154
+ credential comes back with a `warnings` entry on the result.
155
+ - Attachments come only from the attachment root, never from a hidden path.
156
+ - Environment values marked secret (`envVars[].value` where `isSecret`) and the
157
+ `sentryDsn` field of a project are redacted from every result. Prose that
158
+ quotes such a value, in a chat message for instance, is returned as the
159
+ platform sent it.
160
+ - A preview share link is a credential. Only `preview_share_get` and
161
+ `preview_share_create` return one, and their descriptions say so.
162
+ - Admin, webhook, billing, browser-auth, key-management and preview auth-token
163
+ routes are not in the document, so no tool, composite or generated, can reach
164
+ them.
165
+
166
+ A remote HTTP transport (a one-click connector rather than a local process) is
167
+ a separate piece of work; this server is shaped so it can be added without
168
+ changing the tools.
@@ -0,0 +1,85 @@
1
+ import { resolve } from 'node:path';
2
+ import { UsageError } from '../runtime/invoke.js';
3
+ import { defaultAttachmentPolicy } from '../runtime/mcp-attachments.js';
4
+ import { ALL_TOOLSETS, availableToolsets, selectTools, serveStdio, toolListing, } from '../runtime/mcp-server.js';
5
+ export function attachMcpCommands(root, runtime, deps = {}) {
6
+ const { env = process.env, fetch, stdout = (line) => process.stdout.write(line + '\n'), stderr = (line) => process.stderr.write(line + '\n'), exit = (code) => {
7
+ process.exitCode = code;
8
+ }, serve = serveStdio, } = deps;
9
+ const mcp = root
10
+ .command('mcp')
11
+ .description('Serve the platform to an MCP client such as Claude, Cursor or Codex.');
12
+ const toolsetHelp = `Comma-separated toolsets to expose: ${[ALL_TOOLSETS, ...availableToolsets()].join(', ')}. ` +
13
+ `Default all, or KOSUKE_MCP_TOOLSETS.`;
14
+ const selection = (flags) => ({
15
+ toolsets: parseToolsets(flags.toolsets ?? env.KOSUKE_MCP_TOOLSETS),
16
+ readOnly: flags.readOnly === true,
17
+ });
18
+ const attachmentRootHelp = 'Directory attachments may come from; nothing outside it is read. ' +
19
+ 'Default: the working directory, or KOSUKE_MCP_ATTACHMENT_ROOT.';
20
+ mcp
21
+ .command('serve')
22
+ .description('Start the MCP server on stdio. Uses the same auth token as every other command.')
23
+ .option('--toolsets <names>', toolsetHelp)
24
+ .option('--read-only', 'Expose only the tools that read.')
25
+ .option('--attachment-root <path>', attachmentRootHelp)
26
+ .action(async (flags) => {
27
+ const { apiKey, apiUrl } = runtime.credentials();
28
+ if (!apiKey) {
29
+ stderr('No auth token. Set KOSUKE_API_KEY in the MCP client config, pass --api-key, or run ' +
30
+ '`kosuke auth login`. Create one in Settings on the platform.');
31
+ exit(1);
32
+ return;
33
+ }
34
+ try {
35
+ await serve({
36
+ apiUrl,
37
+ apiKey,
38
+ ...selection(flags),
39
+ attachments: flags.attachmentRoot
40
+ ? { root: resolve(flags.attachmentRoot) }
41
+ : defaultAttachmentPolicy(env),
42
+ ...(fetch ? { fetch } : {}),
43
+ log: stderr,
44
+ });
45
+ }
46
+ catch (error) {
47
+ if (!(error instanceof UsageError))
48
+ throw error;
49
+ stderr(error.message);
50
+ exit(1);
51
+ }
52
+ });
53
+ mcp
54
+ .command('tools')
55
+ .description('Print the tools the server would expose, as JSON, without starting it.')
56
+ .option('--toolsets <names>', toolsetHelp)
57
+ .option('--read-only', 'Only the tools that read.')
58
+ .action((flags) => {
59
+ try {
60
+ stdout(JSON.stringify(selectTools(selection(flags)).map(toolListing), null, 2));
61
+ }
62
+ catch (error) {
63
+ if (!(error instanceof UsageError))
64
+ throw error;
65
+ stderr(error.message);
66
+ exit(1);
67
+ }
68
+ });
69
+ }
70
+ /**
71
+ * Absent means every toolset; given but naming none is refused, since a typo
72
+ * in KOSUKE_MCP_TOOLSETS must not quietly serve everything.
73
+ */
74
+ function parseToolsets(value) {
75
+ if (value === undefined)
76
+ return [];
77
+ const names = value
78
+ .split(',')
79
+ .map((name) => name.trim())
80
+ .filter(Boolean);
81
+ if (!names.length) {
82
+ throw new UsageError(`--toolsets (or KOSUKE_MCP_TOOLSETS) names no toolset; use all, or a comma-separated list.`);
83
+ }
84
+ return names;
85
+ }
@@ -0,0 +1,20 @@
1
+ import { operation } from '../../commands/deploy/cancel.js';
2
+ export const tool = {
3
+ "name": "deploy_cancel",
4
+ "toolset": "deploy",
5
+ "description": "Stop the running deploy. Steers queued behind it are discarded and listed.",
6
+ "inputSchema": {
7
+ "type": "object",
8
+ "properties": {
9
+ "projectId": {
10
+ "type": "string",
11
+ "description": "Project id."
12
+ }
13
+ },
14
+ "required": [
15
+ "projectId"
16
+ ],
17
+ "additionalProperties": false
18
+ },
19
+ operation,
20
+ };
@@ -0,0 +1,20 @@
1
+ import { operation } from '../../commands/deploy/messages.js';
2
+ export const tool = {
3
+ "name": "deploy_messages",
4
+ "toolset": "deploy",
5
+ "description": "Read the deploy conversation and the current deploy status.",
6
+ "inputSchema": {
7
+ "type": "object",
8
+ "properties": {
9
+ "projectId": {
10
+ "type": "string",
11
+ "description": "Project id."
12
+ }
13
+ },
14
+ "required": [
15
+ "projectId"
16
+ ],
17
+ "additionalProperties": false
18
+ },
19
+ operation,
20
+ };
@@ -0,0 +1,52 @@
1
+ import { operation } from '../../commands/deploy/run.js';
2
+ export const tool = {
3
+ "name": "deploy_run",
4
+ "toolset": "deploy",
5
+ "description": "Start a deploy (empty JSON body), continue the current one with userResponse, or steer a running one with steerTargetDeployJobId. Attachments ride along as multipart, where the message is called content.",
6
+ "inputSchema": {
7
+ "type": "object",
8
+ "properties": {
9
+ "projectId": {
10
+ "type": "string",
11
+ "description": "Project id."
12
+ },
13
+ "userResponse": {
14
+ "type": "string"
15
+ },
16
+ "steerTargetDeployJobId": {
17
+ "type": "string"
18
+ },
19
+ "freshDeploy": {
20
+ "type": "boolean"
21
+ },
22
+ "content": {
23
+ "type": "string",
24
+ "description": "The message for the deploy agent."
25
+ },
26
+ "attachments": {
27
+ "type": "array",
28
+ "maxItems": 10,
29
+ "description": "Files to attach, at most 10 of 10 MiB each. Each is a path on this machine; the request is sent as multipart when any are given.",
30
+ "items": {
31
+ "type": "object",
32
+ "properties": {
33
+ "path": {
34
+ "type": "string",
35
+ "description": "Path of a file to attach."
36
+ }
37
+ },
38
+ "required": [
39
+ "path"
40
+ ],
41
+ "additionalProperties": false
42
+ }
43
+ }
44
+ },
45
+ "required": [
46
+ "projectId",
47
+ "content"
48
+ ],
49
+ "additionalProperties": false
50
+ },
51
+ operation,
52
+ };
@@ -0,0 +1,138 @@
1
+ import { tool as t0 } from './deploy/cancel.js';
2
+ import { tool as t1 } from './deploy/messages.js';
3
+ import { tool as t2 } from './deploy/run.js';
4
+ import { tool as t3 } from './preview/get.js';
5
+ import { tool as t4 } from './preview/health.js';
6
+ import { tool as t5 } from './preview/reset.js';
7
+ import { tool as t6 } from './preview/share-create.js';
8
+ import { tool as t7 } from './preview/share-delete.js';
9
+ import { tool as t8 } from './preview/share-get.js';
10
+ import { tool as t9 } from './preview/shared.js';
11
+ import { tool as t10 } from './preview/shared-artifact.js';
12
+ import { tool as t11 } from './projects/create.js';
13
+ import { tool as t12 } from './projects/delete.js';
14
+ import { tool as t13 } from './projects/env-vars-add.js';
15
+ import { tool as t14 } from './projects/env-vars-remove.js';
16
+ import { tool as t15 } from './projects/get.js';
17
+ import { tool as t16 } from './projects/list.js';
18
+ import { tool as t17 } from './projects/services-add.js';
19
+ import { tool as t18 } from './projects/services-list.js';
20
+ import { tool as t19 } from './projects/services-remove.js';
21
+ import { tool as t20 } from './projects/services-update.js';
22
+ import { tool as t21 } from './projects/settings-get.js';
23
+ import { tool as t22 } from './projects/settings-import.js';
24
+ import { tool as t23 } from './projects/settings-update.js';
25
+ import { tool as t24 } from './projects/skills.js';
26
+ import { tool as t25 } from './projects/update.js';
27
+ import { tool as t26 } from './sessions/activate.js';
28
+ import { tool as t27 } from './sessions/artifacts-get.js';
29
+ import { tool as t28 } from './sessions/artifacts-list.js';
30
+ import { tool as t29 } from './sessions/checklist-generate.js';
31
+ import { tool as t30 } from './sessions/checklist-get.js';
32
+ import { tool as t31 } from './sessions/comments-add.js';
33
+ import { tool as t32 } from './sessions/comments-delete.js';
34
+ import { tool as t33 } from './sessions/comments-list.js';
35
+ import { tool as t34 } from './sessions/comments-update.js';
36
+ import { tool as t35 } from './sessions/create.js';
37
+ import { tool as t36 } from './sessions/delete.js';
38
+ import { tool as t37 } from './sessions/diff-files.js';
39
+ import { tool as t38 } from './sessions/diff-patch.js';
40
+ import { tool as t39 } from './sessions/edit-prompt.js';
41
+ import { tool as t40 } from './sessions/files-get.js';
42
+ import { tool as t41 } from './sessions/files-list.js';
43
+ import { tool as t42 } from './sessions/files-write.js';
44
+ import { tool as t43 } from './sessions/get.js';
45
+ import { tool as t44 } from './sessions/git-commit.js';
46
+ import { tool as t45 } from './sessions/git-commit-message.js';
47
+ import { tool as t46 } from './sessions/git-push.js';
48
+ import { tool as t47 } from './sessions/git-state.js';
49
+ import { tool as t48 } from './sessions/jobs-cancel.js';
50
+ import { tool as t49 } from './sessions/jobs-get.js';
51
+ import { tool as t50 } from './sessions/list.js';
52
+ import { tool as t51 } from './sessions/messages.js';
53
+ import { tool as t52 } from './sessions/search.js';
54
+ import { tool as t53 } from './sessions/send.js';
55
+ import { tool as t54 } from './sessions/update.js';
56
+ import { tool as t55 } from './workspaces/access-status.js';
57
+ import { tool as t56 } from './workspaces/ai-provider-get.js';
58
+ import { tool as t57 } from './workspaces/ai-provider-remove.js';
59
+ import { tool as t58 } from './workspaces/ai-provider-set.js';
60
+ import { tool as t59 } from './workspaces/credits.js';
61
+ import { tool as t60 } from './workspaces/get.js';
62
+ import { tool as t61 } from './workspaces/getting-started-get.js';
63
+ import { tool as t62 } from './workspaces/getting-started-update.js';
64
+ import { tool as t63 } from './workspaces/list.js';
65
+ import { tool as t64 } from './workspaces/members.js';
66
+ import { tool as t65 } from './workspaces/sandbox-limit.js';
67
+ import { tool as t66 } from './workspaces/stop-sandboxes.js';
68
+ import { tool as t67 } from './workspaces/usage.js';
69
+ export const tools = [
70
+ t0,
71
+ t1,
72
+ t2,
73
+ t3,
74
+ t4,
75
+ t5,
76
+ t6,
77
+ t7,
78
+ t8,
79
+ t9,
80
+ t10,
81
+ t11,
82
+ t12,
83
+ t13,
84
+ t14,
85
+ t15,
86
+ t16,
87
+ t17,
88
+ t18,
89
+ t19,
90
+ t20,
91
+ t21,
92
+ t22,
93
+ t23,
94
+ t24,
95
+ t25,
96
+ t26,
97
+ t27,
98
+ t28,
99
+ t29,
100
+ t30,
101
+ t31,
102
+ t32,
103
+ t33,
104
+ t34,
105
+ t35,
106
+ t36,
107
+ t37,
108
+ t38,
109
+ t39,
110
+ t40,
111
+ t41,
112
+ t42,
113
+ t43,
114
+ t44,
115
+ t45,
116
+ t46,
117
+ t47,
118
+ t48,
119
+ t49,
120
+ t50,
121
+ t51,
122
+ t52,
123
+ t53,
124
+ t54,
125
+ t55,
126
+ t56,
127
+ t57,
128
+ t58,
129
+ t59,
130
+ t60,
131
+ t61,
132
+ t62,
133
+ t63,
134
+ t64,
135
+ t65,
136
+ t66,
137
+ t67,
138
+ ];
@@ -0,0 +1,24 @@
1
+ import { operation } from '../../commands/preview/get.js';
2
+ export const tool = {
3
+ "name": "preview_get",
4
+ "toolset": "preview",
5
+ "description": "Read the preview URLs of the project's main sandbox, or of one chat session's.",
6
+ "inputSchema": {
7
+ "type": "object",
8
+ "properties": {
9
+ "projectId": {
10
+ "type": "string",
11
+ "description": "Project id."
12
+ },
13
+ "sessionId": {
14
+ "type": "string",
15
+ "description": "A chat session's preview instead of the project's main one."
16
+ }
17
+ },
18
+ "required": [
19
+ "projectId"
20
+ ],
21
+ "additionalProperties": false
22
+ },
23
+ operation,
24
+ };
@@ -0,0 +1,24 @@
1
+ import { operation } from '../../commands/preview/health.js';
2
+ export const tool = {
3
+ "name": "preview_health",
4
+ "toolset": "preview",
5
+ "description": "Read the health of every service behind a preview.",
6
+ "inputSchema": {
7
+ "type": "object",
8
+ "properties": {
9
+ "projectId": {
10
+ "type": "string",
11
+ "description": "Project id."
12
+ },
13
+ "sessionId": {
14
+ "type": "string",
15
+ "description": "A chat session's preview instead of the project's main one."
16
+ }
17
+ },
18
+ "required": [
19
+ "projectId"
20
+ ],
21
+ "additionalProperties": false
22
+ },
23
+ operation,
24
+ };
@@ -0,0 +1,23 @@
1
+ import { operation } from '../../commands/preview/reset.js';
2
+ export const tool = {
3
+ "name": "preview_reset",
4
+ "toolset": "preview",
5
+ "description": "Queue a rebuild of a preview sandbox from scratch.",
6
+ "inputSchema": {
7
+ "type": "object",
8
+ "properties": {
9
+ "projectId": {
10
+ "type": "string",
11
+ "description": "Project id."
12
+ },
13
+ "sessionId": {
14
+ "type": "string"
15
+ }
16
+ },
17
+ "required": [
18
+ "projectId"
19
+ ],
20
+ "additionalProperties": false
21
+ },
22
+ operation,
23
+ };
@@ -0,0 +1,24 @@
1
+ import { operation } from '../../commands/preview/share-create.js';
2
+ export const tool = {
3
+ "name": "preview_share_create",
4
+ "toolset": "preview",
5
+ "description": "Create the public share link of a preview. The body sessionId wins over the query one. Returns the share link itself, which is a credential: anyone holding it can open the preview.",
6
+ "inputSchema": {
7
+ "type": "object",
8
+ "properties": {
9
+ "projectId": {
10
+ "type": "string",
11
+ "description": "Project id."
12
+ },
13
+ "sessionId": {
14
+ "type": "string",
15
+ "description": "A chat session's preview instead of the project's main one."
16
+ }
17
+ },
18
+ "required": [
19
+ "projectId"
20
+ ],
21
+ "additionalProperties": false
22
+ },
23
+ operation,
24
+ };
@@ -0,0 +1,24 @@
1
+ import { operation } from '../../commands/preview/share-delete.js';
2
+ export const tool = {
3
+ "name": "preview_share_delete",
4
+ "toolset": "preview",
5
+ "description": "Revoke the public share link of a preview.",
6
+ "inputSchema": {
7
+ "type": "object",
8
+ "properties": {
9
+ "projectId": {
10
+ "type": "string",
11
+ "description": "Project id."
12
+ },
13
+ "sessionId": {
14
+ "type": "string",
15
+ "description": "A chat session's preview instead of the project's main one."
16
+ }
17
+ },
18
+ "required": [
19
+ "projectId"
20
+ ],
21
+ "additionalProperties": false
22
+ },
23
+ operation,
24
+ };
@@ -0,0 +1,24 @@
1
+ import { operation } from '../../commands/preview/share-get.js';
2
+ export const tool = {
3
+ "name": "preview_share_get",
4
+ "toolset": "preview",
5
+ "description": "Read the public share link of a preview, if one exists. Returns the share link itself, which is a credential: anyone holding it can open the preview.",
6
+ "inputSchema": {
7
+ "type": "object",
8
+ "properties": {
9
+ "projectId": {
10
+ "type": "string",
11
+ "description": "Project id."
12
+ },
13
+ "sessionId": {
14
+ "type": "string",
15
+ "description": "A chat session's preview instead of the project's main one."
16
+ }
17
+ },
18
+ "required": [
19
+ "projectId"
20
+ ],
21
+ "additionalProperties": false
22
+ },
23
+ operation,
24
+ };
@@ -0,0 +1,25 @@
1
+ import { operation } from '../../commands/preview/shared-artifact.js';
2
+ export const tool = {
3
+ "name": "preview_shared_artifact",
4
+ "toolset": "preview",
5
+ "description": "Read one artifact behind a public share link. No credential needed.",
6
+ "inputSchema": {
7
+ "type": "object",
8
+ "properties": {
9
+ "slug": {
10
+ "type": "string",
11
+ "description": "Slug."
12
+ },
13
+ "artifactId": {
14
+ "type": "string",
15
+ "description": "Artifact id."
16
+ }
17
+ },
18
+ "required": [
19
+ "slug",
20
+ "artifactId"
21
+ ],
22
+ "additionalProperties": false
23
+ },
24
+ operation,
25
+ };
@@ -0,0 +1,20 @@
1
+ import { operation } from '../../commands/preview/shared.js';
2
+ export const tool = {
3
+ "name": "preview_shared",
4
+ "toolset": "preview",
5
+ "description": "Resolve a public share link. No credential needed; rate limited per caller.",
6
+ "inputSchema": {
7
+ "type": "object",
8
+ "properties": {
9
+ "slug": {
10
+ "type": "string",
11
+ "description": "Slug."
12
+ }
13
+ },
14
+ "required": [
15
+ "slug"
16
+ ],
17
+ "additionalProperties": false
18
+ },
19
+ operation,
20
+ };
@@ -0,0 +1,26 @@
1
+ import { operation } from '../../commands/projects/create.js';
2
+ export const tool = {
3
+ "name": "projects_create",
4
+ "toolset": "projects",
5
+ "description": "Connect a GitHub repository as a project in a workspace.",
6
+ "inputSchema": {
7
+ "type": "object",
8
+ "properties": {
9
+ "name": {
10
+ "type": "string"
11
+ },
12
+ "repositoryUrl": {
13
+ "type": "string"
14
+ },
15
+ "orgId": {
16
+ "type": "string"
17
+ }
18
+ },
19
+ "required": [
20
+ "name",
21
+ "repositoryUrl"
22
+ ],
23
+ "additionalProperties": false
24
+ },
25
+ operation,
26
+ };
@@ -0,0 +1,20 @@
1
+ import { operation } from '../../commands/projects/delete.js';
2
+ export const tool = {
3
+ "name": "projects_delete",
4
+ "toolset": "projects",
5
+ "description": "Delete a project and everything it owns. Workspace admins only.",
6
+ "inputSchema": {
7
+ "type": "object",
8
+ "properties": {
9
+ "projectId": {
10
+ "type": "string",
11
+ "description": "Project id."
12
+ }
13
+ },
14
+ "required": [
15
+ "projectId"
16
+ ],
17
+ "additionalProperties": false
18
+ },
19
+ operation,
20
+ };