@kosuke-ai/cli 1.0.1-next.4 → 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 (86) hide show
  1. package/README.md +104 -0
  2. package/dist/commands/mcp.js +85 -0
  3. package/dist/generated/commands/index.js +43 -39
  4. package/dist/generated/commands/sessions/artifacts-get.js +20 -0
  5. package/dist/generated/commands/sessions/artifacts-list.js +19 -0
  6. package/dist/generated/tools/deploy/cancel.js +20 -0
  7. package/dist/generated/tools/deploy/messages.js +20 -0
  8. package/dist/generated/tools/deploy/run.js +52 -0
  9. package/dist/generated/tools/index.js +138 -0
  10. package/dist/generated/tools/preview/get.js +24 -0
  11. package/dist/generated/tools/preview/health.js +24 -0
  12. package/dist/generated/tools/preview/reset.js +23 -0
  13. package/dist/generated/tools/preview/share-create.js +24 -0
  14. package/dist/generated/tools/preview/share-delete.js +24 -0
  15. package/dist/generated/tools/preview/share-get.js +24 -0
  16. package/dist/generated/tools/preview/shared-artifact.js +25 -0
  17. package/dist/generated/tools/preview/shared.js +20 -0
  18. package/dist/generated/tools/projects/create.js +26 -0
  19. package/dist/generated/tools/projects/delete.js +20 -0
  20. package/dist/generated/tools/projects/env-vars-add.js +50 -0
  21. package/dist/generated/tools/projects/env-vars-remove.js +31 -0
  22. package/dist/generated/tools/projects/get.js +20 -0
  23. package/dist/generated/tools/projects/list.js +12 -0
  24. package/dist/generated/tools/projects/services-add.js +111 -0
  25. package/dist/generated/tools/projects/services-list.js +20 -0
  26. package/dist/generated/tools/projects/services-remove.js +25 -0
  27. package/dist/generated/tools/projects/services-update.js +104 -0
  28. package/dist/generated/tools/projects/settings-get.js +20 -0
  29. package/dist/generated/tools/projects/settings-import.js +208 -0
  30. package/dist/generated/tools/projects/settings-update.js +72 -0
  31. package/dist/generated/tools/projects/skills.js +32 -0
  32. package/dist/generated/tools/projects/update.js +24 -0
  33. package/dist/generated/tools/sessions/activate.js +25 -0
  34. package/dist/generated/tools/sessions/artifacts-get.js +30 -0
  35. package/dist/generated/tools/sessions/artifacts-list.js +25 -0
  36. package/dist/generated/tools/sessions/checklist-generate.js +25 -0
  37. package/dist/generated/tools/sessions/checklist-get.js +25 -0
  38. package/dist/generated/tools/sessions/comments-add.js +53 -0
  39. package/dist/generated/tools/sessions/comments-delete.js +30 -0
  40. package/dist/generated/tools/sessions/comments-list.js +25 -0
  41. package/dist/generated/tools/sessions/comments-update.js +62 -0
  42. package/dist/generated/tools/sessions/create.js +69 -0
  43. package/dist/generated/tools/sessions/delete.js +25 -0
  44. package/dist/generated/tools/sessions/diff-files.js +25 -0
  45. package/dist/generated/tools/sessions/diff-patch.js +64 -0
  46. package/dist/generated/tools/sessions/edit-prompt.js +69 -0
  47. package/dist/generated/tools/sessions/files-get.js +30 -0
  48. package/dist/generated/tools/sessions/files-list.js +25 -0
  49. package/dist/generated/tools/sessions/files-write.js +37 -0
  50. package/dist/generated/tools/sessions/get.js +25 -0
  51. package/dist/generated/tools/sessions/git-commit-message.js +25 -0
  52. package/dist/generated/tools/sessions/git-commit.js +29 -0
  53. package/dist/generated/tools/sessions/git-push.js +25 -0
  54. package/dist/generated/tools/sessions/git-state.js +25 -0
  55. package/dist/generated/tools/sessions/jobs-cancel.js +30 -0
  56. package/dist/generated/tools/sessions/jobs-get.js +30 -0
  57. package/dist/generated/tools/sessions/list.js +56 -0
  58. package/dist/generated/tools/sessions/messages.js +25 -0
  59. package/dist/generated/tools/sessions/search.js +17 -0
  60. package/dist/generated/tools/sessions/send.js +137 -0
  61. package/dist/generated/tools/sessions/update.js +63 -0
  62. package/dist/generated/tools/workspaces/access-status.js +28 -0
  63. package/dist/generated/tools/workspaces/ai-provider-get.js +20 -0
  64. package/dist/generated/tools/workspaces/ai-provider-remove.js +39 -0
  65. package/dist/generated/tools/workspaces/ai-provider-set.js +106 -0
  66. package/dist/generated/tools/workspaces/credits.js +20 -0
  67. package/dist/generated/tools/workspaces/get.js +20 -0
  68. package/dist/generated/tools/workspaces/getting-started-get.js +20 -0
  69. package/dist/generated/tools/workspaces/getting-started-update.js +27 -0
  70. package/dist/generated/tools/workspaces/list.js +12 -0
  71. package/dist/generated/tools/workspaces/members.js +24 -0
  72. package/dist/generated/tools/workspaces/sandbox-limit.js +20 -0
  73. package/dist/generated/tools/workspaces/stop-sandboxes.js +31 -0
  74. package/dist/generated/tools/workspaces/usage.js +28 -0
  75. package/dist/program.js +4 -2
  76. package/dist/runtime/mcp-attachments.js +110 -0
  77. package/dist/runtime/mcp-composite-support.js +49 -0
  78. package/dist/runtime/mcp-composite.js +309 -0
  79. package/dist/runtime/mcp-guard.js +74 -0
  80. package/dist/runtime/mcp-invoke.js +123 -0
  81. package/dist/runtime/mcp-open-pr.js +83 -0
  82. package/dist/runtime/mcp-redact.js +31 -0
  83. package/dist/runtime/mcp-server.js +219 -0
  84. package/dist/runtime/mcp-tool.js +6 -0
  85. package/openapi.json +134 -0
  86. package/package.json +2 -1
@@ -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
+ };
@@ -0,0 +1,50 @@
1
+ import { operation } from '../../commands/projects/env-vars-add.js';
2
+ export const tool = {
3
+ "name": "projects_env_vars_add",
4
+ "toolset": "projects",
5
+ "description": "Add environment variables. The body is a JSON array of { key, value, isSecret? }.",
6
+ "inputSchema": {
7
+ "type": "object",
8
+ "properties": {
9
+ "projectId": {
10
+ "type": "string",
11
+ "description": "Project id."
12
+ },
13
+ "body": {
14
+ "description": "The whole request body.",
15
+ "minItems": 1,
16
+ "type": "array",
17
+ "items": {
18
+ "type": "object",
19
+ "properties": {
20
+ "value": {
21
+ "type": "string",
22
+ "description": "The environment variable value. Supports {{placeholder}} syntax resolved at sandbox startup. Available placeholders: {{<service_name>.url}} — public HTTPS URL of a service (only for public services). {{<service_name>.url_int}} — internal localhost URL of a service (e.g. http://localhost:3000). "
23
+ },
24
+ "isSecret": {
25
+ "default": false,
26
+ "description": "Whether this variable contains sensitive data. Secret values are masked in the UI and encrypted at rest.",
27
+ "type": "boolean"
28
+ },
29
+ "key": {
30
+ "type": "string",
31
+ "minLength": 1,
32
+ "maxLength": 255,
33
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
34
+ }
35
+ },
36
+ "required": [
37
+ "value",
38
+ "key"
39
+ ]
40
+ }
41
+ }
42
+ },
43
+ "required": [
44
+ "projectId",
45
+ "body"
46
+ ],
47
+ "additionalProperties": false
48
+ },
49
+ operation,
50
+ };
@@ -0,0 +1,31 @@
1
+ import { operation } from '../../commands/projects/env-vars-remove.js';
2
+ export const tool = {
3
+ "name": "projects_env_vars_remove",
4
+ "toolset": "projects",
5
+ "description": "Remove environment variables. The body is a JSON array of variable ids.",
6
+ "inputSchema": {
7
+ "type": "object",
8
+ "properties": {
9
+ "projectId": {
10
+ "type": "string",
11
+ "description": "Project id."
12
+ },
13
+ "body": {
14
+ "description": "The whole request body.",
15
+ "minItems": 1,
16
+ "type": "array",
17
+ "items": {
18
+ "type": "string",
19
+ "format": "uuid",
20
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
21
+ }
22
+ }
23
+ },
24
+ "required": [
25
+ "projectId",
26
+ "body"
27
+ ],
28
+ "additionalProperties": false
29
+ },
30
+ operation,
31
+ };
@@ -0,0 +1,20 @@
1
+ import { operation } from '../../commands/projects/get.js';
2
+ export const tool = {
3
+ "name": "projects_get",
4
+ "toolset": "projects",
5
+ "description": "Read one project.",
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,12 @@
1
+ import { operation } from '../../commands/projects/list.js';
2
+ export const tool = {
3
+ "name": "projects_list",
4
+ "toolset": "projects",
5
+ "description": "List the projects you can reach. With an auth token this spans every workspace you belong to; a browser session sees only its active workspace.",
6
+ "inputSchema": {
7
+ "type": "object",
8
+ "properties": {},
9
+ "additionalProperties": false
10
+ },
11
+ operation,
12
+ };
@@ -0,0 +1,111 @@
1
+ import { operation } from '../../commands/projects/services-add.js';
2
+ export const tool = {
3
+ "name": "projects_services_add",
4
+ "toolset": "projects",
5
+ "description": "Add a service. A port already used by another service is rejected by the handler.",
6
+ "inputSchema": {
7
+ "type": "object",
8
+ "properties": {
9
+ "projectId": {
10
+ "type": "string",
11
+ "description": "Project id."
12
+ },
13
+ "directory": {
14
+ "type": "string",
15
+ "description": "Relative path to the service directory within the repository (e.g. \"api\", \"apps/web\"). Defaults to repository root."
16
+ },
17
+ "kind": {
18
+ "type": "string",
19
+ "description": "Run mode. \"process\": a plain command supervised directly (apps, workers, Postgres, Redis). \"docker-stack\": a multi-container docker-compose stack (e.g. Supabase) with up/down commands.",
20
+ "enum": [
21
+ "process",
22
+ "docker-stack"
23
+ ]
24
+ },
25
+ "endpoints": {
26
+ "description": "Exposed endpoints. A service has 0..N (0 = background, no port); port/type/frontend/health are per endpoint. List the primary user-facing endpoint FIRST: it answers {{service.url}} and drives the readiness probe.",
27
+ "default": [],
28
+ "type": "array",
29
+ "items": {
30
+ "type": "object",
31
+ "properties": {
32
+ "name": {
33
+ "type": "string",
34
+ "minLength": 1,
35
+ "maxLength": 63,
36
+ "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$",
37
+ "description": "Endpoint name, unique within the service (e.g. \"api\", \"studio\"). Lowercase alphanumeric with inner hyphens — non-primary endpoint names become part of the preview host."
38
+ },
39
+ "port": {
40
+ "type": "integer",
41
+ "minimum": 1,
42
+ "maximum": 65535,
43
+ "description": "Port this endpoint listens on."
44
+ },
45
+ "exposure": {
46
+ "default": "internal",
47
+ "description": "\"internal\": sandbox-only (no URL). \"public\": browser-reachable URL, not rendered. \"preview\": public URL AND shown in the preview panel.",
48
+ "type": "string",
49
+ "enum": [
50
+ "internal",
51
+ "public",
52
+ "preview"
53
+ ]
54
+ },
55
+ "healthRoute": {
56
+ "description": "HTTP readiness path (e.g. \"/api/health\"), probed with an HTTP GET. Set ONLY on HTTP services. Omit for for non-http services (e.g. datastores like Postgres/Redis/MySQL/Mongo/…). An HTTP probe against their binary wire protocol never succeeds and hangs the unit's boot.",
57
+ "type": "string",
58
+ "maxLength": 255,
59
+ "pattern": "^\\/.*"
60
+ }
61
+ },
62
+ "required": [
63
+ "name",
64
+ "port"
65
+ ]
66
+ }
67
+ },
68
+ "startCommand": {
69
+ "type": "string",
70
+ "description": "Shell command to start the service (e.g. \"npm run dev\"). The service MUST bind the first endpoint's port: pass it explicitly via a framework flag (e.g. \"next dev -p 3000\") or inline env for apps that only read process.env.PORT (e.g. \"PORT=3000 npm run dev\"). Steps that need a live dependency (migrations, seeds) belong at the front of this command; they re-run on every restart, so keep them idempotent. This command may span multiple lines — prefer that over a long single-line `&&` chain when there are several steps. For \"docker-stack\" services this is the up command (e.g. \"supabase start\")."
71
+ },
72
+ "stopCommand": {
73
+ "type": "string",
74
+ "description": "Optional command to stop the service (e.g. \"docker compose down\")."
75
+ },
76
+ "after": {
77
+ "description": "Other service names this service must start after. Ordering is readiness-gated — the service waits until its dependencies are accepting connections.",
78
+ "default": [],
79
+ "type": "array",
80
+ "items": {
81
+ "type": "string",
82
+ "minLength": 1,
83
+ "maxLength": 100
84
+ }
85
+ },
86
+ "envFiles": {
87
+ "description": "docker-stack only: paths (relative to `directory`) to write the resolved env into as a `.env` file. Empty defaults to a single `.env`. Example: Supabase needs [\".env\", \"supabase/functions/.env\"] — the root `.env` feeds config.toml's env() interpolation, while supabase/functions/.env is read by the Edge Functions",
88
+ "default": [],
89
+ "type": "array",
90
+ "items": {
91
+ "type": "string",
92
+ "minLength": 1,
93
+ "maxLength": 255
94
+ }
95
+ },
96
+ "name": {
97
+ "type": "string"
98
+ },
99
+ "sortOrder": {
100
+ "type": "integer"
101
+ }
102
+ },
103
+ "required": [
104
+ "projectId",
105
+ "startCommand",
106
+ "name"
107
+ ],
108
+ "additionalProperties": false
109
+ },
110
+ operation,
111
+ };
@@ -0,0 +1,20 @@
1
+ import { operation } from '../../commands/projects/services-list.js';
2
+ export const tool = {
3
+ "name": "projects_services_list",
4
+ "toolset": "projects",
5
+ "description": "List the project services, in the order they start. Carries no environment variables.",
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,25 @@
1
+ import { operation } from '../../commands/projects/services-remove.js';
2
+ export const tool = {
3
+ "name": "projects_services_remove",
4
+ "toolset": "projects",
5
+ "description": "Remove one service.",
6
+ "inputSchema": {
7
+ "type": "object",
8
+ "properties": {
9
+ "projectId": {
10
+ "type": "string",
11
+ "description": "Project id."
12
+ },
13
+ "serviceId": {
14
+ "type": "string",
15
+ "description": "Service id."
16
+ }
17
+ },
18
+ "required": [
19
+ "projectId",
20
+ "serviceId"
21
+ ],
22
+ "additionalProperties": false
23
+ },
24
+ operation,
25
+ };
@@ -0,0 +1,104 @@
1
+ import { operation } from '../../commands/projects/services-update.js';
2
+ export const tool = {
3
+ "name": "projects_services_update",
4
+ "toolset": "projects",
5
+ "description": "Change one service. Every field is optional; only the ones sent change.",
6
+ "inputSchema": {
7
+ "type": "object",
8
+ "properties": {
9
+ "projectId": {
10
+ "type": "string",
11
+ "description": "Project id."
12
+ },
13
+ "serviceId": {
14
+ "type": "string",
15
+ "description": "Service id."
16
+ },
17
+ "name": {
18
+ "type": "string"
19
+ },
20
+ "directory": {
21
+ "type": "string"
22
+ },
23
+ "kind": {
24
+ "type": "string",
25
+ "enum": [
26
+ "process",
27
+ "docker-stack"
28
+ ]
29
+ },
30
+ "endpoints": {
31
+ "type": "array",
32
+ "items": {
33
+ "type": "object",
34
+ "properties": {
35
+ "name": {
36
+ "type": "string",
37
+ "minLength": 1,
38
+ "maxLength": 63,
39
+ "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$",
40
+ "description": "Endpoint name, unique within the service (e.g. \"api\", \"studio\"). Lowercase alphanumeric with inner hyphens — non-primary endpoint names become part of the preview host."
41
+ },
42
+ "port": {
43
+ "type": "integer",
44
+ "minimum": 1,
45
+ "maximum": 65535,
46
+ "description": "Port this endpoint listens on."
47
+ },
48
+ "exposure": {
49
+ "default": "internal",
50
+ "description": "\"internal\": sandbox-only (no URL). \"public\": browser-reachable URL, not rendered. \"preview\": public URL AND shown in the preview panel.",
51
+ "type": "string",
52
+ "enum": [
53
+ "internal",
54
+ "public",
55
+ "preview"
56
+ ]
57
+ },
58
+ "healthRoute": {
59
+ "description": "HTTP readiness path (e.g. \"/api/health\"), probed with an HTTP GET. Set ONLY on HTTP services. Omit for for non-http services (e.g. datastores like Postgres/Redis/MySQL/Mongo/…). An HTTP probe against their binary wire protocol never succeeds and hangs the unit's boot.",
60
+ "type": "string",
61
+ "maxLength": 255,
62
+ "pattern": "^\\/.*"
63
+ }
64
+ },
65
+ "required": [
66
+ "name",
67
+ "port"
68
+ ]
69
+ }
70
+ },
71
+ "startCommand": {
72
+ "type": "string"
73
+ },
74
+ "stopCommand": {
75
+ "type": "string"
76
+ },
77
+ "after": {
78
+ "type": "array",
79
+ "items": {
80
+ "type": "string",
81
+ "minLength": 1,
82
+ "maxLength": 100
83
+ }
84
+ },
85
+ "envFiles": {
86
+ "type": "array",
87
+ "items": {
88
+ "type": "string",
89
+ "minLength": 1,
90
+ "maxLength": 255
91
+ }
92
+ },
93
+ "sortOrder": {
94
+ "type": "integer"
95
+ }
96
+ },
97
+ "required": [
98
+ "projectId",
99
+ "serviceId"
100
+ ],
101
+ "additionalProperties": false
102
+ },
103
+ operation,
104
+ };
@@ -0,0 +1,20 @@
1
+ import { operation } from '../../commands/projects/settings-get.js';
2
+ export const tool = {
3
+ "name": "projects_settings_get",
4
+ "toolset": "projects",
5
+ "description": "Read the project settings: setup commands, services, environment and sandbox size.",
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
+ };