@kosuke-ai/cli 6.4.0 → 6.5.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.
@@ -85,6 +85,23 @@ const obj = (value) => value && typeof value === 'object' && !Array.isArray(valu
85
85
  function dataOf(result) {
86
86
  return result.response.ok ? obj(obj(result.data)?.data) : null;
87
87
  }
88
+ /**
89
+ * A DeepSeek API key's balance, which it reports instead of windows: `balance 12.40 USD`,
90
+ * each currency apart, or `balance empty` once it cannot pay for a request.
91
+ */
92
+ function balanceWords(usage) {
93
+ const balance = obj(usage?.balance);
94
+ if (!balance)
95
+ return null;
96
+ if (balance.available === false)
97
+ return 'balance empty';
98
+ const amounts = (Array.isArray(balance.amounts) ? balance.amounts : []).flatMap((amount) => {
99
+ const total = str(obj(amount)?.total);
100
+ const currency = str(obj(amount)?.currency);
101
+ return total && currency ? [`${total} ${currency}`] : [];
102
+ });
103
+ return amounts.length ? `balance ${amounts.join(', ')}` : null;
104
+ }
88
105
  /** `session 42%, week 61%` or `session 42%, month 12%`, with only the windows the provider reported. */
89
106
  function usageWords(usage) {
90
107
  const windows = ['session', 'week', 'month'].flatMap((name) => {
@@ -93,19 +110,23 @@ function usageWords(usage) {
93
110
  ? [`${name} ${Math.round(utilization)}% used`]
94
111
  : [];
95
112
  });
96
- return windows.length ? windows.join(', ') : null;
113
+ const balance = balanceWords(usage);
114
+ const words = balance ? [...windows, balance] : windows;
115
+ return words.length ? words.join(', ') : null;
97
116
  }
98
117
  const SUBSCRIPTIONS = [
99
118
  { key: 'anthropic', label: 'Your Claude subscription', usage: 'claude_code' },
100
119
  { key: 'openai', label: 'Your Codex subscription', usage: 'codex' },
101
120
  { key: 'zai', label: 'Your GLM Coding Plan', usage: 'coding_plan' },
102
121
  { key: 'moonshot', label: 'Your Kimi Code', usage: 'kimi_code' },
122
+ { key: 'deepseek', label: 'Your DeepSeek API key', usage: 'deepseek_api' },
103
123
  ];
104
124
  const WORKSPACE_PROVIDERS = [
105
125
  { key: 'anthropic', name: 'Anthropic' },
106
126
  { key: 'openai', name: 'OpenAI' },
107
127
  { key: 'zai', name: 'Z.ai' },
108
128
  { key: 'moonshot', name: 'Moonshot AI' },
129
+ { key: 'deepseek', name: 'DeepSeek' },
109
130
  ];
110
131
  const AUTH_METHOD_NAMES = {
111
132
  api_key: 'API key',
@@ -114,8 +135,15 @@ const AUTH_METHOD_NAMES = {
114
135
  codex: 'Codex login',
115
136
  coding_plan: 'GLM Coding Plan',
116
137
  kimi_code: 'Kimi Code',
138
+ deepseek_api: 'DeepSeek API',
117
139
  };
118
- const USAGE_PLANS = ['claude_code', 'codex', 'coding_plan', 'kimi_code'];
140
+ const USAGE_PLANS = [
141
+ 'claude_code',
142
+ 'codex',
143
+ 'coding_plan',
144
+ 'kimi_code',
145
+ 'deepseek_api',
146
+ ];
119
147
  function subscriptionEntries(subscriptions) {
120
148
  return SUBSCRIPTIONS.flatMap(({ key, label, usage }) => {
121
149
  const row = obj(subscriptions[key]);
@@ -181,6 +209,7 @@ async function fetchProviders(client, workspace, signal) {
181
209
  codex: '/api/organizations/{workspaceId}/ai-provider/codex-usage',
182
210
  coding_plan: '/api/organizations/{workspaceId}/ai-provider/coding-plan-usage',
183
211
  kimi_code: '/api/organizations/{workspaceId}/ai-provider/kimi-code-usage',
212
+ deepseek_api: '/api/organizations/{workspaceId}/ai-provider/deepseek-usage',
184
213
  };
185
214
  const shared = (settings ? workspaceEntries(settings) : []).map((entry) => ({
186
215
  entry,
@@ -109,69 +109,72 @@ import { operation as o107 } from './sessions/steer.js';
109
109
  import { operation as o108 } from './sessions/title-generate.js';
110
110
  import { operation as o109 } from './sessions/update.js';
111
111
  import { operation as o110 } from './user/auth-token-revoke.js';
112
- import { operation as o111 } from './user/plugins-list.js';
113
- import { operation as o112 } from './user/plugins-update.js';
114
- import { operation as o113 } from './user/profile.js';
115
- import { operation as o114 } from './user/push-devices-register.js';
116
- import { operation as o115 } from './user/push-devices-remove.js';
117
- import { operation as o116 } from './user/skills-create.js';
118
- import { operation as o117 } from './user/skills-delete.js';
119
- import { operation as o118 } from './user/skills-get.js';
120
- import { operation as o119 } from './user/skills-list.js';
121
- import { operation as o120 } from './user/skills-update.js';
122
- import { operation as o121 } from './user/subscriptions-delete.js';
123
- import { operation as o122 } from './user/subscriptions-get.js';
124
- import { operation as o123 } from './user/subscriptions-login-claude-complete.js';
125
- import { operation as o124 } from './user/subscriptions-login-claude-start.js';
126
- import { operation as o125 } from './user/subscriptions-login-codex-complete.js';
127
- import { operation as o126 } from './user/subscriptions-login-codex-start.js';
128
- import { operation as o127 } from './user/subscriptions-logins-delete.js';
129
- import { operation as o128 } from './user/subscriptions-logins-reorder.js';
130
- import { operation as o129 } from './user/subscriptions-set-default-model.js';
131
- import { operation as o130 } from './user/subscriptions-set-key.js';
132
- import { operation as o131 } from './user/subscriptions-usage.js';
133
- import { operation as o132 } from './workspaces/access-status.js';
134
- import { operation as o133 } from './workspaces/ai-provider-get.js';
135
- import { operation as o134 } from './workspaces/ai-provider-logins-reorder.js';
136
- import { operation as o135 } from './workspaces/ai-provider-remove.js';
137
- import { operation as o136 } from './workspaces/ai-provider-set.js';
138
- import { operation as o137 } from './workspaces/ai-provider-usage-claude.js';
139
- import { operation as o138 } from './workspaces/ai-provider-usage-codex.js';
140
- import { operation as o139 } from './workspaces/ai-provider-usage-coding-plan.js';
141
- import { operation as o140 } from './workspaces/ai-provider-usage-kimi-code.js';
142
- import { operation as o141 } from './workspaces/artifacts.js';
143
- import { operation as o142 } from './workspaces/credits.js';
144
- import { operation as o143 } from './workspaces/get.js';
145
- import { operation as o144 } from './workspaces/getting-started-get.js';
146
- import { operation as o145 } from './workspaces/getting-started-update.js';
147
- import { operation as o146 } from './workspaces/integrations-get.js';
148
- import { operation as o147 } from './workspaces/integrations-list.js';
149
- import { operation as o148 } from './workspaces/integrations-remove.js';
150
- import { operation as o149 } from './workspaces/integrations-slack-get.js';
151
- import { operation as o150 } from './workspaces/lead-cards.js';
152
- import { operation as o151 } from './workspaces/lead-merge.js';
153
- import { operation as o152 } from './workspaces/lead-notifications-open.js';
154
- import { operation as o153 } from './workspaces/lead-proposals-create.js';
155
- import { operation as o154 } from './workspaces/lead-review-request.js';
156
- import { operation as o155 } from './workspaces/lead-session-send.js';
157
- import { operation as o156 } from './workspaces/lead-triage.js';
158
- import { operation as o157 } from './workspaces/list.js';
159
- import { operation as o158 } from './workspaces/members.js';
160
- import { operation as o159 } from './workspaces/plugins-list.js';
161
- import { operation as o160 } from './workspaces/plugins-update.js';
162
- import { operation as o161 } from './workspaces/provider-login-claude-complete.js';
163
- import { operation as o162 } from './workspaces/provider-login-claude-start.js';
164
- import { operation as o163 } from './workspaces/provider-login-codex-complete.js';
165
- import { operation as o164 } from './workspaces/provider-login-codex-start.js';
166
- import { operation as o165 } from './workspaces/sandbox-limit.js';
167
- import { operation as o166 } from './workspaces/skills-create.js';
168
- import { operation as o167 } from './workspaces/skills-delete.js';
169
- import { operation as o168 } from './workspaces/skills-get.js';
170
- import { operation as o169 } from './workspaces/skills-list.js';
171
- import { operation as o170 } from './workspaces/skills-update.js';
172
- import { operation as o171 } from './workspaces/stop-sandboxes.js';
173
- import { operation as o172 } from './workspaces/timezone-set.js';
174
- import { operation as o173 } from './workspaces/usage.js';
112
+ import { operation as o111 } from './user/integrations-list.js';
113
+ import { operation as o112 } from './user/integrations-remove.js';
114
+ import { operation as o113 } from './user/plugins-list.js';
115
+ import { operation as o114 } from './user/plugins-update.js';
116
+ import { operation as o115 } from './user/profile.js';
117
+ import { operation as o116 } from './user/push-devices-register.js';
118
+ import { operation as o117 } from './user/push-devices-remove.js';
119
+ import { operation as o118 } from './user/skills-create.js';
120
+ import { operation as o119 } from './user/skills-delete.js';
121
+ import { operation as o120 } from './user/skills-get.js';
122
+ import { operation as o121 } from './user/skills-list.js';
123
+ import { operation as o122 } from './user/skills-update.js';
124
+ import { operation as o123 } from './user/subscriptions-delete.js';
125
+ import { operation as o124 } from './user/subscriptions-get.js';
126
+ import { operation as o125 } from './user/subscriptions-login-claude-complete.js';
127
+ import { operation as o126 } from './user/subscriptions-login-claude-start.js';
128
+ import { operation as o127 } from './user/subscriptions-login-codex-complete.js';
129
+ import { operation as o128 } from './user/subscriptions-login-codex-start.js';
130
+ import { operation as o129 } from './user/subscriptions-logins-delete.js';
131
+ import { operation as o130 } from './user/subscriptions-logins-reorder.js';
132
+ import { operation as o131 } from './user/subscriptions-set-default-model.js';
133
+ import { operation as o132 } from './user/subscriptions-set-key.js';
134
+ import { operation as o133 } from './user/subscriptions-usage.js';
135
+ import { operation as o134 } from './workspaces/access-status.js';
136
+ import { operation as o135 } from './workspaces/ai-provider-get.js';
137
+ import { operation as o136 } from './workspaces/ai-provider-logins-reorder.js';
138
+ import { operation as o137 } from './workspaces/ai-provider-remove.js';
139
+ import { operation as o138 } from './workspaces/ai-provider-set.js';
140
+ import { operation as o139 } from './workspaces/ai-provider-usage-claude.js';
141
+ import { operation as o140 } from './workspaces/ai-provider-usage-codex.js';
142
+ import { operation as o141 } from './workspaces/ai-provider-usage-coding-plan.js';
143
+ import { operation as o142 } from './workspaces/ai-provider-usage-deepseek.js';
144
+ import { operation as o143 } from './workspaces/ai-provider-usage-kimi-code.js';
145
+ import { operation as o144 } from './workspaces/artifacts.js';
146
+ import { operation as o145 } from './workspaces/credits.js';
147
+ import { operation as o146 } from './workspaces/get.js';
148
+ import { operation as o147 } from './workspaces/getting-started-get.js';
149
+ import { operation as o148 } from './workspaces/getting-started-update.js';
150
+ import { operation as o149 } from './workspaces/integrations-get.js';
151
+ import { operation as o150 } from './workspaces/integrations-list.js';
152
+ import { operation as o151 } from './workspaces/integrations-remove.js';
153
+ import { operation as o152 } from './workspaces/integrations-slack-get.js';
154
+ import { operation as o153 } from './workspaces/lead-cards.js';
155
+ import { operation as o154 } from './workspaces/lead-merge.js';
156
+ import { operation as o155 } from './workspaces/lead-notifications-open.js';
157
+ import { operation as o156 } from './workspaces/lead-proposals-create.js';
158
+ import { operation as o157 } from './workspaces/lead-review-request.js';
159
+ import { operation as o158 } from './workspaces/lead-session-send.js';
160
+ import { operation as o159 } from './workspaces/lead-triage.js';
161
+ import { operation as o160 } from './workspaces/list.js';
162
+ import { operation as o161 } from './workspaces/members.js';
163
+ import { operation as o162 } from './workspaces/plugins-list.js';
164
+ import { operation as o163 } from './workspaces/plugins-update.js';
165
+ import { operation as o164 } from './workspaces/provider-login-claude-complete.js';
166
+ import { operation as o165 } from './workspaces/provider-login-claude-start.js';
167
+ import { operation as o166 } from './workspaces/provider-login-codex-complete.js';
168
+ import { operation as o167 } from './workspaces/provider-login-codex-start.js';
169
+ import { operation as o168 } from './workspaces/sandbox-limit.js';
170
+ import { operation as o169 } from './workspaces/skills-create.js';
171
+ import { operation as o170 } from './workspaces/skills-delete.js';
172
+ import { operation as o171 } from './workspaces/skills-get.js';
173
+ import { operation as o172 } from './workspaces/skills-list.js';
174
+ import { operation as o173 } from './workspaces/skills-update.js';
175
+ import { operation as o174 } from './workspaces/stop-sandboxes.js';
176
+ import { operation as o175 } from './workspaces/timezone-set.js';
177
+ import { operation as o176 } from './workspaces/usage.js';
175
178
  export const operations = [
176
179
  o0,
177
180
  o1,
@@ -347,4 +350,7 @@ export const operations = [
347
350
  o171,
348
351
  o172,
349
352
  o173,
353
+ o174,
354
+ o175,
355
+ o176,
350
356
  ];
@@ -0,0 +1,20 @@
1
+ export const operation = {
2
+ "method": "get",
3
+ "path": "/api/user/integrations",
4
+ "command": [
5
+ "user",
6
+ "integrations",
7
+ "list"
8
+ ],
9
+ "summary": "List the integrations you can connect for yourself, such as Gmail or Notion, with your own connections to each: label, status and whether a Reconnect is needed. They belong to you and follow you into every workspace you belong to. Never a credential or a connected-account identifier, and only a signed-in member or their own API key can read them: an agent token, a workspace admin and every other member cannot.",
10
+ "pathParams": [],
11
+ "query": [],
12
+ "body": null,
13
+ "multipart": null,
14
+ "attachments": false,
15
+ "anonymous": false,
16
+ "sandboxToken": false,
17
+ "orchestratorToken": false,
18
+ "cronToken": false,
19
+ "leadToken": false
20
+ };
@@ -0,0 +1,23 @@
1
+ export const operation = {
2
+ "method": "delete",
3
+ "path": "/api/user/integrations/{toolkit}/connections/{connectionId}",
4
+ "command": [
5
+ "user",
6
+ "integrations",
7
+ "remove"
8
+ ],
9
+ "summary": "Disconnect one of your own integration connections by toolkit slug and connection id, such as gmail and the id `user integrations list` returns: agents lose it at once, then Kosuke deletes the stored authorization, retrying in the background if needed. Revoking the authorization at the toolkit itself is not part of this. A connection that is not yours, or is already gone, answers 404.",
10
+ "pathParams": [
11
+ "toolkit",
12
+ "connectionId"
13
+ ],
14
+ "query": [],
15
+ "body": null,
16
+ "multipart": null,
17
+ "attachments": false,
18
+ "anonymous": false,
19
+ "sandboxToken": false,
20
+ "orchestratorToken": false,
21
+ "cronToken": false,
22
+ "leadToken": false
23
+ };
@@ -6,7 +6,7 @@ export const operation = {
6
6
  "subscriptions",
7
7
  "delete"
8
8
  ],
9
- "summary": "Disconnect every login of your subscription for one provider, anthropic, openai, zai or moonshot, and release the sandboxes running on it. Answers 204.",
9
+ "summary": "Disconnect every login of your subscription for one provider, anthropic, openai, zai, moonshot or deepseek, and release the sandboxes running on it. Answers 204.",
10
10
  "pathParams": [
11
11
  "provider"
12
12
  ],
@@ -6,7 +6,7 @@ export const operation = {
6
6
  "subscriptions",
7
7
  "get"
8
8
  ],
9
- "summary": "Read your Claude, Codex, GLM Coding Plan and Kimi Code subscriptions and your default model. Per provider: the login in use (connected, needsReauth, accountEmail, and maskedApiKey for a pasted plan key) and every login in the order it is used (logins).",
9
+ "summary": "Read your Claude, Codex, GLM Coding Plan, Kimi Code and DeepSeek API subscriptions and your default model. Per provider: the login in use (connected, needsReauth, accountEmail, and maskedApiKey for a pasted key) and every login in the order it is used (logins).",
10
10
  "pathParams": [],
11
11
  "query": [],
12
12
  "body": null,
@@ -6,7 +6,7 @@ export const operation = {
6
6
  "subscriptions",
7
7
  "set-key"
8
8
  ],
9
- "summary": "Add a GLM Coding Plan (zai) or Kimi Code (moonshot) key to your subscriptions: Claude and Codex connect by signing in. With loginId it replaces that key instead. The key is tested with one call before it is kept; 409 when it is already connected or you hold five.",
9
+ "summary": "Add a GLM Coding Plan (zai), Kimi Code (moonshot) or DeepSeek API (deepseek) key to your subscriptions: Claude and Codex connect by signing in. With loginId it replaces that key instead. The key is tested with one call before it is kept, and a DeepSeek key with an empty balance still passes; 409 when it is already connected or you hold five.",
10
10
  "pathParams": [
11
11
  "provider"
12
12
  ],
@@ -6,7 +6,7 @@ export const operation = {
6
6
  "subscriptions",
7
7
  "usage"
8
8
  ],
9
- "summary": "Read the session and weekly utilization of your Claude (claude_code, the default), Codex, GLM Coding Plan (coding_plan) or Kimi Code (kimi_code) subscription: of the login in use, or of the one loginId names. Kimi Code reports a monthly window instead of a weekly one. 400 when it is not connected or needs reconnecting.",
9
+ "summary": "Read the session and weekly utilization of your Claude (claude_code, the default), Codex, GLM Coding Plan (coding_plan) or Kimi Code (kimi_code) subscription, or the balance of your DeepSeek API (deepseek_api) key: of the login in use, or of the one loginId names. Kimi Code reports a monthly window instead of a weekly one; DeepSeek reports no windows, only a balance per currency. 400 when it is not connected or needs reconnecting.",
10
10
  "pathParams": [],
11
11
  "query": [
12
12
  {
@@ -18,7 +18,8 @@ export const operation = {
18
18
  "claude_code",
19
19
  "codex",
20
20
  "coding_plan",
21
- "kimi_code"
21
+ "kimi_code",
22
+ "deepseek_api"
22
23
  ]
23
24
  },
24
25
  {
@@ -20,7 +20,8 @@ export const operation = {
20
20
  "anthropic",
21
21
  "openai",
22
22
  "zai",
23
- "moonshot"
23
+ "moonshot",
24
+ "deepseek"
24
25
  ]
25
26
  },
26
27
  {
@@ -28,14 +29,15 @@ export const operation = {
28
29
  "flag": "auth-method",
29
30
  "kind": "string",
30
31
  "required": true,
31
- "description": "Must belong to the provider: anthropic takes api_key, aws_bedrock or claude_code, openai api_key or codex, zai coding_plan, moonshot kimi_code.",
32
+ "description": "Must belong to the provider: anthropic takes api_key, aws_bedrock or claude_code, openai api_key or codex, zai coding_plan, moonshot kimi_code, deepseek deepseek_api.",
32
33
  "choices": [
33
34
  "api_key",
34
35
  "aws_bedrock",
35
36
  "claude_code",
36
37
  "codex",
37
38
  "coding_plan",
38
- "kimi_code"
39
+ "kimi_code",
40
+ "deepseek_api"
39
41
  ]
40
42
  },
41
43
  {
@@ -0,0 +1,23 @@
1
+ export const operation = {
2
+ "method": "get",
3
+ "path": "/api/organizations/{workspaceId}/ai-provider/deepseek-usage",
4
+ "command": [
5
+ "workspaces",
6
+ "ai-provider",
7
+ "usage",
8
+ "deepseek"
9
+ ],
10
+ "summary": "Read the balance of the workspace's DeepSeek API key, one amount per currency, in place of usage windows. 400 when the workspace holds no DeepSeek API key.",
11
+ "pathParams": [
12
+ "workspaceId"
13
+ ],
14
+ "query": [],
15
+ "body": null,
16
+ "multipart": null,
17
+ "attachments": false,
18
+ "anonymous": false,
19
+ "sandboxToken": true,
20
+ "orchestratorToken": true,
21
+ "cronToken": true,
22
+ "leadToken": true
23
+ };
@@ -6,7 +6,7 @@ export const operation = {
6
6
  "integrations",
7
7
  "get"
8
8
  ],
9
- "summary": "Read one workspace integration by toolkit slug, such as sentry: status, the tenant it is confined to, whether agents may make changes, requested scopes, who authorized it and whether remote cleanup is pending. Never a credential or a connected-account identifier. A toolkit the workspace never connected and this deployment does not offer is a 404.",
9
+ "summary": "Read one workspace integration by toolkit slug, such as sentry: status, the tenant it is confined to, requested scopes, who authorized it, whether remote cleanup is pending and each of its connections. Never a credential or a connected-account identifier. A toolkit the workspace never connected and this deployment does not offer is a 404.",
10
10
  "pathParams": [
11
11
  "workspaceId",
12
12
  "toolkit"
@@ -1,13 +1,13 @@
1
1
  export const operation = {
2
2
  "method": "get",
3
- "path": "/api/organizations/{workspaceId}/integrations/slack",
3
+ "path": "/api/organizations/{workspaceId}/integrations/bots/slack",
4
4
  "command": [
5
5
  "workspaces",
6
6
  "integrations",
7
7
  "slack",
8
8
  "get"
9
9
  ],
10
- "summary": "Read the workspace Slack integration: the connected Slack workspace, who authorized it and when. Never the bot token.",
10
+ "summary": "Read the workspace Slack Bot: the connected Slack workspace, who installed it and when. Never the bot token.",
11
11
  "pathParams": [
12
12
  "workspaceId"
13
13
  ],
package/openapi.json CHANGED
@@ -905,6 +905,20 @@
905
905
  }
906
906
  },
907
907
  "required": ["operation"]
908
+ },
909
+ {
910
+ "type": "object",
911
+ "properties": {
912
+ "operation": {
913
+ "type": "string",
914
+ "const": "deepseek_deepseek_api"
915
+ },
916
+ "deepseekApiKey": {
917
+ "type": "string",
918
+ "minLength": 1
919
+ }
920
+ },
921
+ "required": ["operation"]
908
922
  }
909
923
  ]
910
924
  }
@@ -965,14 +979,14 @@
965
979
  "required": true,
966
980
  "schema": {
967
981
  "type": "string",
968
- "enum": ["anthropic", "openai", "zai", "moonshot"]
982
+ "enum": ["anthropic", "openai", "zai", "moonshot", "deepseek"]
969
983
  }
970
984
  },
971
985
  {
972
986
  "name": "authMethod",
973
987
  "in": "query",
974
988
  "required": true,
975
- "description": "Must belong to the provider: anthropic takes api_key, aws_bedrock or claude_code, openai api_key or codex, zai coding_plan, moonshot kimi_code.",
989
+ "description": "Must belong to the provider: anthropic takes api_key, aws_bedrock or claude_code, openai api_key or codex, zai coding_plan, moonshot kimi_code, deepseek deepseek_api.",
976
990
  "schema": {
977
991
  "type": "string",
978
992
  "enum": [
@@ -981,9 +995,10 @@
981
995
  "claude_code",
982
996
  "codex",
983
997
  "coding_plan",
984
- "kimi_code"
998
+ "kimi_code",
999
+ "deepseek_api"
985
1000
  ],
986
- "description": "Must belong to the provider: anthropic takes api_key, aws_bedrock or claude_code, openai api_key or codex, zai coding_plan, moonshot kimi_code."
1001
+ "description": "Must belong to the provider: anthropic takes api_key, aws_bedrock or claude_code, openai api_key or codex, zai coding_plan, moonshot kimi_code, deepseek deepseek_api."
987
1002
  }
988
1003
  },
989
1004
  {
@@ -1222,6 +1237,61 @@
1222
1237
  }
1223
1238
  }
1224
1239
  },
1240
+ "/api/organizations/{workspaceId}/ai-provider/deepseek-usage": {
1241
+ "get": {
1242
+ "operationId": "workspacesAiProviderUsageDeepseek",
1243
+ "summary": "Read the balance of the workspace's DeepSeek API key, one amount per currency, in place of usage windows. 400 when the workspace holds no DeepSeek API key.",
1244
+ "tags": ["workspaces"],
1245
+ "x-kosuke-command": ["workspaces", "ai-provider", "usage", "deepseek"],
1246
+ "x-kosuke-sandbox-token": true,
1247
+ "x-kosuke-orchestrator-token": true,
1248
+ "x-kosuke-cron-token": true,
1249
+ "x-kosuke-lead-token": true,
1250
+ "parameters": [
1251
+ {
1252
+ "name": "workspaceId",
1253
+ "in": "path",
1254
+ "required": true,
1255
+ "schema": {
1256
+ "type": "string",
1257
+ "minLength": 1
1258
+ }
1259
+ }
1260
+ ],
1261
+ "responses": {
1262
+ "2XX": {
1263
+ "description": "Success envelope",
1264
+ "content": {
1265
+ "application/json": {
1266
+ "schema": {
1267
+ "$ref": "#/components/schemas/ApiSuccess"
1268
+ }
1269
+ }
1270
+ }
1271
+ },
1272
+ "4XX": {
1273
+ "description": "Error envelope",
1274
+ "content": {
1275
+ "application/json": {
1276
+ "schema": {
1277
+ "$ref": "#/components/schemas/ApiError"
1278
+ }
1279
+ }
1280
+ }
1281
+ },
1282
+ "5XX": {
1283
+ "description": "Error envelope",
1284
+ "content": {
1285
+ "application/json": {
1286
+ "schema": {
1287
+ "$ref": "#/components/schemas/ApiError"
1288
+ }
1289
+ }
1290
+ }
1291
+ }
1292
+ }
1293
+ }
1294
+ },
1225
1295
  "/api/organizations/{workspaceId}/ai-provider/kimi-code-usage": {
1226
1296
  "get": {
1227
1297
  "operationId": "workspacesAiProviderUsageKimiCode",
@@ -2979,7 +3049,7 @@
2979
3049
  "/api/organizations/{workspaceId}/integrations/{toolkit}": {
2980
3050
  "get": {
2981
3051
  "operationId": "workspacesIntegrationsGet",
2982
- "summary": "Read one workspace integration by toolkit slug, such as sentry: status, the tenant it is confined to, whether agents may make changes, requested scopes, who authorized it and whether remote cleanup is pending. Never a credential or a connected-account identifier. A toolkit the workspace never connected and this deployment does not offer is a 404.",
3052
+ "summary": "Read one workspace integration by toolkit slug, such as sentry: status, the tenant it is confined to, requested scopes, who authorized it, whether remote cleanup is pending and each of its connections. Never a credential or a connected-account identifier. A toolkit the workspace never connected and this deployment does not offer is a 404.",
2983
3053
  "tags": ["workspaces"],
2984
3054
  "x-kosuke-command": ["workspaces", "integrations", "get"],
2985
3055
  "x-kosuke-sandbox-token": true,
@@ -3098,10 +3168,10 @@
3098
3168
  }
3099
3169
  }
3100
3170
  },
3101
- "/api/organizations/{workspaceId}/integrations/slack": {
3171
+ "/api/organizations/{workspaceId}/integrations/bots/slack": {
3102
3172
  "get": {
3103
3173
  "operationId": "workspacesIntegrationsSlackGet",
3104
- "summary": "Read the workspace Slack integration: the connected Slack workspace, who authorized it and when. Never the bot token.",
3174
+ "summary": "Read the workspace Slack Bot: the connected Slack workspace, who installed it and when. Never the bot token.",
3105
3175
  "tags": ["workspaces"],
3106
3176
  "x-kosuke-command": ["workspaces", "integrations", "slack", "get"],
3107
3177
  "x-kosuke-sandbox-token": true,
@@ -13039,6 +13109,106 @@
13039
13109
  }
13040
13110
  }
13041
13111
  },
13112
+ "/api/user/integrations": {
13113
+ "get": {
13114
+ "operationId": "userIntegrationsList",
13115
+ "summary": "List the integrations you can connect for yourself, such as Gmail or Notion, with your own connections to each: label, status and whether a Reconnect is needed. They belong to you and follow you into every workspace you belong to. Never a credential or a connected-account identifier, and only a signed-in member or their own API key can read them: an agent token, a workspace admin and every other member cannot.",
13116
+ "tags": ["user"],
13117
+ "x-kosuke-command": ["user", "integrations", "list"],
13118
+ "responses": {
13119
+ "2XX": {
13120
+ "description": "Success envelope",
13121
+ "content": {
13122
+ "application/json": {
13123
+ "schema": {
13124
+ "$ref": "#/components/schemas/ApiSuccess"
13125
+ }
13126
+ }
13127
+ }
13128
+ },
13129
+ "4XX": {
13130
+ "description": "Error envelope",
13131
+ "content": {
13132
+ "application/json": {
13133
+ "schema": {
13134
+ "$ref": "#/components/schemas/ApiError"
13135
+ }
13136
+ }
13137
+ }
13138
+ },
13139
+ "5XX": {
13140
+ "description": "Error envelope",
13141
+ "content": {
13142
+ "application/json": {
13143
+ "schema": {
13144
+ "$ref": "#/components/schemas/ApiError"
13145
+ }
13146
+ }
13147
+ }
13148
+ }
13149
+ }
13150
+ }
13151
+ },
13152
+ "/api/user/integrations/{toolkit}/connections/{connectionId}": {
13153
+ "delete": {
13154
+ "operationId": "userIntegrationsRemove",
13155
+ "summary": "Disconnect one of your own integration connections by toolkit slug and connection id, such as gmail and the id `user integrations list` returns: agents lose it at once, then Kosuke deletes the stored authorization, retrying in the background if needed. Revoking the authorization at the toolkit itself is not part of this. A connection that is not yours, or is already gone, answers 404.",
13156
+ "tags": ["user"],
13157
+ "x-kosuke-command": ["user", "integrations", "remove"],
13158
+ "parameters": [
13159
+ {
13160
+ "name": "toolkit",
13161
+ "in": "path",
13162
+ "required": true,
13163
+ "schema": {
13164
+ "type": "string",
13165
+ "minLength": 1
13166
+ }
13167
+ },
13168
+ {
13169
+ "name": "connectionId",
13170
+ "in": "path",
13171
+ "required": true,
13172
+ "schema": {
13173
+ "type": "string",
13174
+ "minLength": 1
13175
+ }
13176
+ }
13177
+ ],
13178
+ "responses": {
13179
+ "2XX": {
13180
+ "description": "Success envelope",
13181
+ "content": {
13182
+ "application/json": {
13183
+ "schema": {
13184
+ "$ref": "#/components/schemas/ApiSuccess"
13185
+ }
13186
+ }
13187
+ }
13188
+ },
13189
+ "4XX": {
13190
+ "description": "Error envelope",
13191
+ "content": {
13192
+ "application/json": {
13193
+ "schema": {
13194
+ "$ref": "#/components/schemas/ApiError"
13195
+ }
13196
+ }
13197
+ }
13198
+ },
13199
+ "5XX": {
13200
+ "description": "Error envelope",
13201
+ "content": {
13202
+ "application/json": {
13203
+ "schema": {
13204
+ "$ref": "#/components/schemas/ApiError"
13205
+ }
13206
+ }
13207
+ }
13208
+ }
13209
+ }
13210
+ }
13211
+ },
13042
13212
  "/api/user/plugins": {
13043
13213
  "get": {
13044
13214
  "operationId": "userPluginsList",
@@ -13524,7 +13694,7 @@
13524
13694
  "/api/user/subscriptions": {
13525
13695
  "get": {
13526
13696
  "operationId": "userSubscriptionsGet",
13527
- "summary": "Read your Claude, Codex, GLM Coding Plan and Kimi Code subscriptions and your default model. Per provider: the login in use (connected, needsReauth, accountEmail, and maskedApiKey for a pasted plan key) and every login in the order it is used (logins).",
13697
+ "summary": "Read your Claude, Codex, GLM Coding Plan, Kimi Code and DeepSeek API subscriptions and your default model. Per provider: the login in use (connected, needsReauth, accountEmail, and maskedApiKey for a pasted key) and every login in the order it is used (logins).",
13528
13698
  "tags": ["user"],
13529
13699
  "x-kosuke-command": ["user", "subscriptions", "get"],
13530
13700
  "x-kosuke-sandbox-token": true,
@@ -13622,7 +13792,7 @@
13622
13792
  "/api/user/subscriptions/{provider}": {
13623
13793
  "put": {
13624
13794
  "operationId": "userSubscriptionsSetKey",
13625
- "summary": "Add a GLM Coding Plan (zai) or Kimi Code (moonshot) key to your subscriptions: Claude and Codex connect by signing in. With loginId it replaces that key instead. The key is tested with one call before it is kept; 409 when it is already connected or you hold five.",
13795
+ "summary": "Add a GLM Coding Plan (zai), Kimi Code (moonshot) or DeepSeek API (deepseek) key to your subscriptions: Claude and Codex connect by signing in. With loginId it replaces that key instead. The key is tested with one call before it is kept, and a DeepSeek key with an empty balance still passes; 409 when it is already connected or you hold five.",
13626
13796
  "tags": ["user"],
13627
13797
  "x-kosuke-command": ["user", "subscriptions", "set-key"],
13628
13798
  "parameters": [
@@ -13632,7 +13802,7 @@
13632
13802
  "required": true,
13633
13803
  "schema": {
13634
13804
  "type": "string",
13635
- "enum": ["anthropic", "openai", "zai", "moonshot"]
13805
+ "enum": ["anthropic", "openai", "zai", "moonshot", "deepseek"]
13636
13806
  }
13637
13807
  }
13638
13808
  ],
@@ -13694,7 +13864,7 @@
13694
13864
  },
13695
13865
  "delete": {
13696
13866
  "operationId": "userSubscriptionsDelete",
13697
- "summary": "Disconnect every login of your subscription for one provider, anthropic, openai, zai or moonshot, and release the sandboxes running on it. Answers 204.",
13867
+ "summary": "Disconnect every login of your subscription for one provider, anthropic, openai, zai, moonshot or deepseek, and release the sandboxes running on it. Answers 204.",
13698
13868
  "tags": ["user"],
13699
13869
  "x-kosuke-command": ["user", "subscriptions", "delete"],
13700
13870
  "parameters": [
@@ -13704,7 +13874,7 @@
13704
13874
  "required": true,
13705
13875
  "schema": {
13706
13876
  "type": "string",
13707
- "enum": ["anthropic", "openai", "zai", "moonshot"]
13877
+ "enum": ["anthropic", "openai", "zai", "moonshot", "deepseek"]
13708
13878
  }
13709
13879
  }
13710
13880
  ],
@@ -13755,7 +13925,7 @@
13755
13925
  "required": true,
13756
13926
  "schema": {
13757
13927
  "type": "string",
13758
- "enum": ["anthropic", "openai", "zai", "moonshot"]
13928
+ "enum": ["anthropic", "openai", "zai", "moonshot", "deepseek"]
13759
13929
  }
13760
13930
  },
13761
13931
  {
@@ -13816,7 +13986,7 @@
13816
13986
  "required": true,
13817
13987
  "schema": {
13818
13988
  "type": "string",
13819
- "enum": ["anthropic", "openai", "zai", "moonshot"]
13989
+ "enum": ["anthropic", "openai", "zai", "moonshot", "deepseek"]
13820
13990
  }
13821
13991
  }
13822
13992
  ],
@@ -14114,7 +14284,7 @@
14114
14284
  "/api/user/subscriptions/usage": {
14115
14285
  "get": {
14116
14286
  "operationId": "userSubscriptionsUsage",
14117
- "summary": "Read the session and weekly utilization of your Claude (claude_code, the default), Codex, GLM Coding Plan (coding_plan) or Kimi Code (kimi_code) subscription: of the login in use, or of the one loginId names. Kimi Code reports a monthly window instead of a weekly one. 400 when it is not connected or needs reconnecting.",
14287
+ "summary": "Read the session and weekly utilization of your Claude (claude_code, the default), Codex, GLM Coding Plan (coding_plan) or Kimi Code (kimi_code) subscription, or the balance of your DeepSeek API (deepseek_api) key: of the login in use, or of the one loginId names. Kimi Code reports a monthly window instead of a weekly one; DeepSeek reports no windows, only a balance per currency. 400 when it is not connected or needs reconnecting.",
14118
14288
  "tags": ["user"],
14119
14289
  "x-kosuke-command": ["user", "subscriptions", "usage"],
14120
14290
  "x-kosuke-sandbox-token": true,
@@ -14129,7 +14299,7 @@
14129
14299
  "schema": {
14130
14300
  "default": "claude_code",
14131
14301
  "type": "string",
14132
- "enum": ["claude_code", "codex", "coding_plan", "kimi_code"]
14302
+ "enum": ["claude_code", "codex", "coding_plan", "kimi_code", "deepseek_api"]
14133
14303
  }
14134
14304
  },
14135
14305
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kosuke-ai/cli",
3
- "version": "6.4.0",
3
+ "version": "6.5.0",
4
4
  "description": "Kosuke platform CLI. The client customers install to drive app.kosuke.ai from their own machine.",
5
5
  "license": "MIT",
6
6
  "repository": {