@kosuke-ai/kosuke 1.0.14 → 1.0.15
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/CHANGELOG.md +4 -0
- package/README.md +5 -1
- package/dist/commands/hand-written.js +1 -1
- package/dist/commands/integrations.js +113 -1
- package/dist/generated/commands/index.js +267 -265
- package/dist/generated/commands/integrations/uploads-create.js +64 -0
- package/dist/integrations/file-upload.js +153 -0
- package/openapi.json +101 -0
- package/package.json +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.15
|
|
4
|
+
|
|
5
|
+
- `kosuke integrations call --file <argument>=<path>` uploads a local file for a tool's file argument, such as a YouTube video or a Gmail attachment.
|
|
6
|
+
|
|
3
7
|
## 1.0.14
|
|
4
8
|
|
|
5
9
|
- `kosuke devices list` says whether another session or Sensei already uses each device, and `kosuke sensei device-requests list` says it for each pending request.
|
package/README.md
CHANGED
|
@@ -165,6 +165,7 @@ kosuke integrations list --workspace <id> # a block per toolk
|
|
|
165
165
|
kosuke integrations list --workspace <id> --toolkit gmail # that toolkit's tools
|
|
166
166
|
kosuke integrations tools get <tool> --workspace <id> # one tool's input schema
|
|
167
167
|
kosuke integrations call <tool> --workspace <id> --account notion-personal --args '{"query":"roadmap"}'
|
|
168
|
+
kosuke integrations call youtube_upload_video --workspace <id> --args-file video.json --file videoFilePath=./clip.mp4
|
|
168
169
|
```
|
|
169
170
|
|
|
170
171
|
`list` with no filter prints each toolkit's connections (alias, scope, label,
|
|
@@ -174,7 +175,10 @@ and how to narrow it. `--account` takes a connection's alias such as
|
|
|
174
175
|
`notion-personal`, its short id or `scope:label`; case, curly quotes and extra
|
|
175
176
|
spaces do not matter, and it is needed when several connections can run a tool.
|
|
176
177
|
`call` prints the tool's text on stdout and the connection it ran on on stderr,
|
|
177
|
-
and exits 1 when the tool reports an error.
|
|
178
|
+
and exits 1 when the tool reports an error. A tool's file argument takes a file
|
|
179
|
+
reference: `--file <argument>=<path>` uploads the local file and fills it in,
|
|
180
|
+
once per file, and a file inside a list or object names its path, such as
|
|
181
|
+
`attachment.0`. The file goes straight to storage, up to 5 GiB.
|
|
178
182
|
|
|
179
183
|
With an API key, `--workspace` is required (you must belong to it), and `call`
|
|
180
184
|
runs only your own personal connections. Inside an agent's turn the credential
|
|
@@ -55,7 +55,7 @@ export const HAND_WRITTEN = {
|
|
|
55
55
|
integrationsCall: {
|
|
56
56
|
command: ['integrations', 'call'],
|
|
57
57
|
positionals: ['name', 'stdin'],
|
|
58
|
-
flags: ['--account', '--args', '--args-file', '--workspace'],
|
|
58
|
+
flags: ['--account', '--args', '--args-file', '--file', '--workspace'],
|
|
59
59
|
agents: 'all',
|
|
60
60
|
workspace: true,
|
|
61
61
|
},
|
|
@@ -4,6 +4,7 @@ import { leafAt } from '../runtime/attach.js';
|
|
|
4
4
|
import { HAND_WRITTEN } from './hand-written.js';
|
|
5
5
|
import { isTurnToken } from '../runtime/credentials.js';
|
|
6
6
|
import { connectionOf, failureOf, isRow, oneLine, readOverview, rowsOf, TOOLS_PATH, transportFailure, } from '../integrations/api.js';
|
|
7
|
+
import { FILE_UPLOAD_PATH, fileSize, MAX_FILE_BYTES, md5Of, mimetypeOf, parseFileArgument, putFile, setAt, uploadName, } from '../integrations/file-upload.js';
|
|
7
8
|
import { choiceLines, renderOverview } from '../integrations/render.js';
|
|
8
9
|
/**
|
|
9
10
|
* `kosuke integrations list|call` and `kosuke integrations tools get`: the connected tools,
|
|
@@ -24,6 +25,8 @@ const READ_TIMEOUT_MS = 30_000;
|
|
|
24
25
|
* 60 s budget, and wait no longer than their answer takes.
|
|
25
26
|
*/
|
|
26
27
|
const CALL_TIMEOUT_MS = 330_000;
|
|
28
|
+
/** One file's PUT to storage; the storage URL lets an upload start for an hour. */
|
|
29
|
+
const UPLOAD_TIMEOUT_MS = 60 * 60_000;
|
|
27
30
|
const EXIT_FAILED = 1;
|
|
28
31
|
const EXIT_USAGE = 2;
|
|
29
32
|
const TOOLKIT_PATTERN = /^[a-z0-9_]{1,64}$/;
|
|
@@ -57,6 +60,13 @@ function accountText(raw) {
|
|
|
57
60
|
}
|
|
58
61
|
return raw;
|
|
59
62
|
}
|
|
63
|
+
function fileArguments(raw, previous = []) {
|
|
64
|
+
const parsed = parseFileArgument(raw);
|
|
65
|
+
if (!parsed) {
|
|
66
|
+
throw new InvalidArgumentError('Expected <argument>=<path>, such as videoFilePath=./clip.mp4 or attachment.0=./report.pdf.');
|
|
67
|
+
}
|
|
68
|
+
return [...previous, parsed];
|
|
69
|
+
}
|
|
60
70
|
function limitNumber(raw) {
|
|
61
71
|
if (!/^\d+$/.test(raw) || Number(raw) < 1 || Number(raw) > 100) {
|
|
62
72
|
throw new InvalidArgumentError('Expected a whole number from 1 to 100.');
|
|
@@ -111,10 +121,36 @@ function failureText(text, choices, tool, given) {
|
|
|
111
121
|
}
|
|
112
122
|
return body.message;
|
|
113
123
|
}
|
|
124
|
+
/** The reserved upload a successful file-upload answer carries in its text. */
|
|
125
|
+
function uploadOf(answer) {
|
|
126
|
+
const block = rowsOf(answer.content)[0];
|
|
127
|
+
if (!block || typeof block.text !== 'string')
|
|
128
|
+
return null;
|
|
129
|
+
let body;
|
|
130
|
+
try {
|
|
131
|
+
body = JSON.parse(block.text);
|
|
132
|
+
}
|
|
133
|
+
catch {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
if (!isRow(body) || typeof body.file !== 'string' || !isRow(body.upload))
|
|
137
|
+
return null;
|
|
138
|
+
const { url, headers } = body.upload;
|
|
139
|
+
if (typeof url !== 'string' || !url.startsWith('https://'))
|
|
140
|
+
return null;
|
|
141
|
+
const kept = {};
|
|
142
|
+
if (isRow(headers)) {
|
|
143
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
144
|
+
if (typeof value === 'string')
|
|
145
|
+
kept[key] = value;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return { file: body.file, url, headers: kept };
|
|
149
|
+
}
|
|
114
150
|
export function attachIntegrationsCommands(root, runtime, deps = {}) {
|
|
115
151
|
const { stdout = (text) => process.stdout.write(text), stderr = (text) => process.stderr.write(text), exit = (code) => {
|
|
116
152
|
process.exitCode = code;
|
|
117
|
-
}, readStdin = readAllStdin, readFile: readText = (path) => readFile(path, 'utf8'), readTimeoutMs = READ_TIMEOUT_MS, callTimeoutMs = CALL_TIMEOUT_MS, } = deps;
|
|
153
|
+
}, readStdin = readAllStdin, readFile: readText = (path) => readFile(path, 'utf8'), readTimeoutMs = READ_TIMEOUT_MS, callTimeoutMs = CALL_TIMEOUT_MS, uploadFetch = (input, init) => globalThis.fetch(input, init), } = deps;
|
|
118
154
|
const fail = (failure, code = EXIT_FAILED) => {
|
|
119
155
|
stderr(`${typeof failure === 'string' ? failure : failure.message}\n`);
|
|
120
156
|
exit(code);
|
|
@@ -214,6 +250,8 @@ export function attachIntegrationsCommands(root, runtime, deps = {}) {
|
|
|
214
250
|
.option('--account <account>', 'The connection to run on: an alias, id or scope:label. Needed when several can run the tool.', accountText)
|
|
215
251
|
.option('--args <json>', 'The tool arguments, a JSON object. Default {}.')
|
|
216
252
|
.option('--args-file <path>', 'Read the arguments from a file, or - for stdin.')
|
|
253
|
+
.option('--file <argument=path>', 'Upload a local file for a file argument and pass its reference there. Repeat it for ' +
|
|
254
|
+
'several files; one inside a list or object names its path, such as attachment.0.', fileArguments)
|
|
217
255
|
.option('--workspace <id>', WORKSPACE_HELP)
|
|
218
256
|
.addHelpText('after', '\nWith an API key, a call runs only on your own personal connections; one on a workspace\n' +
|
|
219
257
|
"connection is refused (an agent's turn in the workspace can run it).\n" +
|
|
@@ -224,6 +262,14 @@ export function attachIntegrationsCommands(root, runtime, deps = {}) {
|
|
|
224
262
|
const toolArguments = await readArguments(flags, dash);
|
|
225
263
|
const client = runtime.client({ answerTimeoutMs: callTimeoutMs });
|
|
226
264
|
const workspace = workspaceFor(runtime, flags.workspace);
|
|
265
|
+
for (const file of flags.file ?? []) {
|
|
266
|
+
const placed = await uploadFile(client, name, file, flags.account, workspace);
|
|
267
|
+
if (placed === null)
|
|
268
|
+
return;
|
|
269
|
+
if (!setAt(toolArguments, file.at, placed)) {
|
|
270
|
+
throw new UsageError(`--file ${file.at.join('.')} does not fit the arguments: something else is already there.`);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
227
273
|
let data;
|
|
228
274
|
try {
|
|
229
275
|
const result = await client.POST(EXECUTE_PATH, {
|
|
@@ -245,6 +291,72 @@ export function attachIntegrationsCommands(root, runtime, deps = {}) {
|
|
|
245
291
|
}
|
|
246
292
|
report(name, flags.account, data);
|
|
247
293
|
}));
|
|
294
|
+
/**
|
|
295
|
+
* Reserves one file's upload, sends the file to storage and answers its reference, or reports
|
|
296
|
+
* the failure and answers null. Nothing is called yet, so a failure here changes nothing.
|
|
297
|
+
*/
|
|
298
|
+
async function uploadFile(client, name, file, account, workspace) {
|
|
299
|
+
const size = await fileSize(file.path);
|
|
300
|
+
if (size === null)
|
|
301
|
+
throw new UsageError(`--file: ${file.path} is not a file this can read.`);
|
|
302
|
+
if (size === 0)
|
|
303
|
+
throw new UsageError(`--file: ${file.path} is empty.`);
|
|
304
|
+
if (size > MAX_FILE_BYTES)
|
|
305
|
+
throw new UsageError(`--file: ${file.path} is larger than 5 GiB.`);
|
|
306
|
+
const filename = uploadName(file.path);
|
|
307
|
+
if (filename === null) {
|
|
308
|
+
throw new UsageError(`--file: rename ${file.path} to a plain name of up to 255 characters.`);
|
|
309
|
+
}
|
|
310
|
+
const mimetype = mimetypeOf(filename);
|
|
311
|
+
let md5;
|
|
312
|
+
try {
|
|
313
|
+
md5 = await md5Of(file.path);
|
|
314
|
+
}
|
|
315
|
+
catch {
|
|
316
|
+
throw new UsageError(`--file: could not read ${file.path}.`);
|
|
317
|
+
}
|
|
318
|
+
let data;
|
|
319
|
+
try {
|
|
320
|
+
const result = await client.POST(FILE_UPLOAD_PATH, {
|
|
321
|
+
params: { query: workspace ? { workspace } : {} },
|
|
322
|
+
body: { name, filename, mimetype, md5, ...(account ? { account } : {}) },
|
|
323
|
+
signal: AbortSignal.timeout(readTimeoutMs),
|
|
324
|
+
});
|
|
325
|
+
if (!result.response.ok) {
|
|
326
|
+
fail(failureOf(result.response.status, result.error, 'GET'));
|
|
327
|
+
return null;
|
|
328
|
+
}
|
|
329
|
+
data = isRow(result.data) ? result.data.data : undefined;
|
|
330
|
+
}
|
|
331
|
+
catch (error) {
|
|
332
|
+
// Reserving an upload changes nothing a retry could repeat, so it reads like a lookup.
|
|
333
|
+
fail(transportFailure(error, 'GET'));
|
|
334
|
+
return null;
|
|
335
|
+
}
|
|
336
|
+
const answer = isRow(data) ? data : {};
|
|
337
|
+
if (answer.isError === true) {
|
|
338
|
+
report(name, account, data);
|
|
339
|
+
return null;
|
|
340
|
+
}
|
|
341
|
+
const upload = uploadOf(answer);
|
|
342
|
+
if (!upload) {
|
|
343
|
+
fail('Integration tools returned an unexpected response.');
|
|
344
|
+
return null;
|
|
345
|
+
}
|
|
346
|
+
let status;
|
|
347
|
+
try {
|
|
348
|
+
status = await putFile(uploadFetch, upload, file.path, size, mimetype, AbortSignal.timeout(UPLOAD_TIMEOUT_MS));
|
|
349
|
+
}
|
|
350
|
+
catch {
|
|
351
|
+
fail(`Could not upload ${file.path}; the tool was not called. Try again.`);
|
|
352
|
+
return null;
|
|
353
|
+
}
|
|
354
|
+
if (status < 200 || status > 299) {
|
|
355
|
+
fail(`The upload of ${file.path} was refused (HTTP ${status}); the tool was not called.`);
|
|
356
|
+
return null;
|
|
357
|
+
}
|
|
358
|
+
return upload.file;
|
|
359
|
+
}
|
|
248
360
|
/** Reads `--args`, `--args-file` or a lone `-`: one source at most, and a JSON object. */
|
|
249
361
|
async function readArguments(flags, dash) {
|
|
250
362
|
if (dash !== undefined && dash !== '-')
|
|
@@ -64,271 +64,272 @@ import { operation as o62 } from './integrations/connections-list.js';
|
|
|
64
64
|
import { operation as o63 } from './integrations/connections-list--personal.js';
|
|
65
65
|
import { operation as o64 } from './integrations/tools-call.js';
|
|
66
66
|
import { operation as o65 } from './integrations/tools-list.js';
|
|
67
|
-
import { operation as o66 } from './
|
|
68
|
-
import { operation as o67 } from './mac/
|
|
69
|
-
import { operation as o68 } from './mac/
|
|
70
|
-
import { operation as o69 } from './mac/browser-connections-
|
|
71
|
-
import { operation as o70 } from './mac/browser-
|
|
72
|
-
import { operation as o71 } from './mac/browser-
|
|
73
|
-
import { operation as o72 } from './mac/browser-
|
|
74
|
-
import { operation as o73 } from './mac/
|
|
75
|
-
import { operation as o74 } from './mac/
|
|
76
|
-
import { operation as o75 } from './mac/files-
|
|
77
|
-
import { operation as o76 } from './mac/files-
|
|
78
|
-
import { operation as o77 } from './mac/files-
|
|
79
|
-
import { operation as o78 } from './mac/files-
|
|
80
|
-
import { operation as o79 } from './mac/
|
|
81
|
-
import { operation as o80 } from './mac/
|
|
82
|
-
import { operation as o81 } from './mac/
|
|
83
|
-
import { operation as o82 } from './mac/
|
|
84
|
-
import { operation as o83 } from './mac/
|
|
85
|
-
import { operation as o84 } from './mac/
|
|
86
|
-
import { operation as o85 } from './mac/
|
|
87
|
-
import { operation as o86 } from './mac/
|
|
88
|
-
import { operation as o87 } from './
|
|
89
|
-
import { operation as o88 } from './
|
|
90
|
-
import { operation as o89 } from './plugins/list
|
|
91
|
-
import { operation as o90 } from './plugins/
|
|
92
|
-
import { operation as o91 } from './plugins/update
|
|
93
|
-
import { operation as o92 } from './
|
|
94
|
-
import { operation as o93 } from './preview/
|
|
95
|
-
import { operation as o94 } from './preview/
|
|
96
|
-
import { operation as o95 } from './preview/
|
|
97
|
-
import { operation as o96 } from './preview/share-
|
|
98
|
-
import { operation as o97 } from './preview/share-
|
|
99
|
-
import { operation as o98 } from './preview/
|
|
100
|
-
import { operation as o99 } from './preview/shared-get.js';
|
|
101
|
-
import { operation as o100 } from './
|
|
102
|
-
import { operation as o101 } from './projects/backlog-items-
|
|
103
|
-
import { operation as o102 } from './projects/backlog-items-
|
|
104
|
-
import { operation as o103 } from './projects/backlog-items-
|
|
105
|
-
import { operation as o104 } from './projects/backlog-items-
|
|
106
|
-
import { operation as o105 } from './projects/
|
|
107
|
-
import { operation as o106 } from './projects/batch-merging-
|
|
108
|
-
import { operation as o107 } from './projects/batch-merging-
|
|
109
|
-
import { operation as o108 } from './projects/batch-merging-members-
|
|
110
|
-
import { operation as o109 } from './projects/batch-merging-
|
|
111
|
-
import { operation as o110 } from './projects/
|
|
112
|
-
import { operation as o111 } from './projects/
|
|
113
|
-
import { operation as o112 } from './projects/
|
|
114
|
-
import { operation as o113 } from './projects/
|
|
115
|
-
import { operation as o114 } from './projects/env-vars-
|
|
116
|
-
import { operation as o115 } from './projects/
|
|
117
|
-
import { operation as o116 } from './projects/
|
|
118
|
-
import { operation as o117 } from './projects/labels-
|
|
119
|
-
import { operation as o118 } from './projects/labels-
|
|
120
|
-
import { operation as o119 } from './projects/labels-
|
|
121
|
-
import { operation as o120 } from './projects/
|
|
122
|
-
import { operation as o121 } from './projects/
|
|
123
|
-
import { operation as o122 } from './projects/live-
|
|
124
|
-
import { operation as o123 } from './projects/live-
|
|
125
|
-
import { operation as o124 } from './projects/live-
|
|
126
|
-
import { operation as o125 } from './projects/live-writes-
|
|
127
|
-
import { operation as o126 } from './projects/
|
|
128
|
-
import { operation as o127 } from './projects/qa-guide-
|
|
129
|
-
import { operation as o128 } from './projects/
|
|
130
|
-
import { operation as o129 } from './projects/
|
|
131
|
-
import { operation as o130 } from './projects/services-
|
|
132
|
-
import { operation as o131 } from './projects/services-
|
|
133
|
-
import { operation as o132 } from './projects/services-
|
|
134
|
-
import { operation as o133 } from './projects/
|
|
135
|
-
import { operation as o134 } from './projects/settings-
|
|
136
|
-
import { operation as o135 } from './projects/settings-
|
|
137
|
-
import { operation as o136 } from './projects/
|
|
138
|
-
import { operation as o137 } from './projects/
|
|
139
|
-
import { operation as o138 } from './projects/
|
|
140
|
-
import { operation as o139 } from './projects/
|
|
141
|
-
import { operation as o140 } from './
|
|
142
|
-
import { operation as o141 } from './
|
|
143
|
-
import { operation as o142 } from './providers/
|
|
144
|
-
import { operation as o143 } from './providers/
|
|
145
|
-
import { operation as o144 } from './providers/delete
|
|
146
|
-
import { operation as o145 } from './providers/
|
|
147
|
-
import { operation as o146 } from './providers/get
|
|
148
|
-
import { operation as o147 } from './providers/
|
|
149
|
-
import { operation as o148 } from './providers/google-
|
|
150
|
-
import { operation as o149 } from './providers/google-
|
|
151
|
-
import { operation as o150 } from './providers/google-methods-
|
|
152
|
-
import { operation as o151 } from './providers/google-set.js';
|
|
153
|
-
import { operation as o152 } from './providers/
|
|
154
|
-
import { operation as o153 } from './providers/grok-get
|
|
155
|
-
import { operation as o154 } from './providers/grok-
|
|
156
|
-
import { operation as o155 } from './providers/grok-update
|
|
157
|
-
import { operation as o156 } from './providers/
|
|
158
|
-
import { operation as o157 } from './providers/
|
|
159
|
-
import { operation as o158 } from './providers/logins-cancel--provider-antigravity.js';
|
|
160
|
-
import { operation as o159 } from './providers/logins-
|
|
161
|
-
import { operation as o160 } from './providers/logins-complete--personal-provider-
|
|
162
|
-
import { operation as o161 } from './providers/logins-complete--personal-provider-
|
|
163
|
-
import { operation as o162 } from './providers/logins-complete--personal-provider-
|
|
164
|
-
import { operation as o163 } from './providers/logins-complete--provider-
|
|
165
|
-
import { operation as o164 } from './providers/logins-complete--provider-
|
|
166
|
-
import { operation as o165 } from './providers/logins-complete--provider-
|
|
167
|
-
import { operation as o166 } from './providers/logins-complete--provider-
|
|
168
|
-
import { operation as o167 } from './providers/logins-
|
|
169
|
-
import { operation as o168 } from './providers/logins-
|
|
170
|
-
import { operation as o169 } from './providers/logins-recheck
|
|
171
|
-
import { operation as o170 } from './providers/logins-
|
|
172
|
-
import { operation as o171 } from './providers/logins-start--personal-provider-
|
|
173
|
-
import { operation as o172 } from './providers/logins-start--personal-provider-
|
|
174
|
-
import { operation as o173 } from './providers/logins-start--personal-provider-
|
|
175
|
-
import { operation as o174 } from './providers/logins-start--provider-
|
|
176
|
-
import { operation as o175 } from './providers/logins-start--provider-
|
|
177
|
-
import { operation as o176 } from './providers/logins-start--provider-
|
|
178
|
-
import { operation as o177 } from './providers/logins-start--provider-
|
|
179
|
-
import { operation as o178 } from './providers/
|
|
180
|
-
import { operation as o179 } from './providers/
|
|
181
|
-
import { operation as o180 } from './providers/token-usage-get
|
|
182
|
-
import { operation as o181 } from './providers/usage-get--personal.js';
|
|
183
|
-
import { operation as o182 } from './providers/usage-get--
|
|
184
|
-
import { operation as o183 } from './providers/usage-get--provider-
|
|
185
|
-
import { operation as o184 } from './providers/usage-get--provider-
|
|
186
|
-
import { operation as o185 } from './providers/usage-get--provider-
|
|
187
|
-
import { operation as o186 } from './providers/usage-get--provider-
|
|
188
|
-
import { operation as o187 } from './providers/usage-get--provider-
|
|
189
|
-
import { operation as o188 } from './providers/usage-get--provider-
|
|
190
|
-
import { operation as o189 } from './providers/usage-get--provider-
|
|
191
|
-
import { operation as o190 } from './
|
|
192
|
-
import { operation as o191 } from './sensei/cards-
|
|
193
|
-
import { operation as o192 } from './sensei/cards-
|
|
194
|
-
import { operation as o193 } from './sensei/cards-
|
|
195
|
-
import { operation as o194 } from './sensei/cards-
|
|
196
|
-
import { operation as o195 } from './sensei/
|
|
197
|
-
import { operation as o196 } from './sensei/
|
|
198
|
-
import { operation as o197 } from './sensei/
|
|
199
|
-
import { operation as o198 } from './sensei/delegates-
|
|
200
|
-
import { operation as o199 } from './sensei/delegates-
|
|
201
|
-
import { operation as o200 } from './sensei/delegates-
|
|
202
|
-
import { operation as o201 } from './sensei/delegates-
|
|
203
|
-
import { operation as o202 } from './sensei/
|
|
204
|
-
import { operation as o203 } from './sensei/
|
|
205
|
-
import { operation as o204 } from './sensei/device-requests-
|
|
206
|
-
import { operation as o205 } from './sensei/
|
|
207
|
-
import { operation as o206 } from './sensei/memory-
|
|
208
|
-
import { operation as o207 } from './sensei/
|
|
209
|
-
import { operation as o208 } from './sensei/merge
|
|
210
|
-
import { operation as o209 } from './sensei/
|
|
211
|
-
import { operation as o210 } from './sensei/messages-
|
|
212
|
-
import { operation as o211 } from './sensei/messages-
|
|
213
|
-
import { operation as o212 } from './sensei/
|
|
214
|
-
import { operation as o213 } from './sensei/
|
|
215
|
-
import { operation as o214 } from './sensei/reels-
|
|
216
|
-
import { operation as o215 } from './sensei/
|
|
217
|
-
import { operation as o216 } from './sensei/
|
|
218
|
-
import { operation as o217 } from './sensei/review-
|
|
219
|
-
import { operation as o218 } from './sensei/review-
|
|
220
|
-
import { operation as o219 } from './sensei/
|
|
221
|
-
import { operation as o220 } from './sensei/sessions-
|
|
222
|
-
import { operation as o221 } from './sensei/
|
|
223
|
-
import { operation as o222 } from './sensei/
|
|
224
|
-
import { operation as o223 } from './sensei/threads-
|
|
225
|
-
import { operation as o224 } from './sensei/threads-
|
|
226
|
-
import { operation as o225 } from './sensei/threads-
|
|
227
|
-
import { operation as o226 } from './sensei/threads-
|
|
228
|
-
import { operation as o227 } from './sensei/
|
|
229
|
-
import { operation as o228 } from './sensei/
|
|
230
|
-
import { operation as o229 } from './sensei/
|
|
231
|
-
import { operation as o230 } from './
|
|
232
|
-
import { operation as o231 } from './sessions/
|
|
233
|
-
import { operation as o232 } from './sessions/artifacts-
|
|
234
|
-
import { operation as o233 } from './sessions/artifacts-
|
|
235
|
-
import { operation as o234 } from './sessions/
|
|
236
|
-
import { operation as o235 } from './sessions/
|
|
237
|
-
import { operation as o236 } from './sessions/
|
|
238
|
-
import { operation as o237 } from './sessions/desktop-
|
|
239
|
-
import { operation as o238 } from './sessions/desktop-
|
|
240
|
-
import { operation as o239 } from './sessions/
|
|
241
|
-
import { operation as o240 } from './sessions/diff-comments-
|
|
242
|
-
import { operation as o241 } from './sessions/diff-comments-
|
|
243
|
-
import { operation as o242 } from './sessions/diff-comments-
|
|
244
|
-
import { operation as o243 } from './sessions/diff-
|
|
245
|
-
import { operation as o244 } from './sessions/diff-
|
|
246
|
-
import { operation as o245 } from './sessions/diff-
|
|
247
|
-
import { operation as o246 } from './sessions/
|
|
248
|
-
import { operation as o247 } from './sessions/files-
|
|
249
|
-
import { operation as o248 } from './sessions/files-
|
|
250
|
-
import { operation as o249 } from './sessions/
|
|
251
|
-
import { operation as o250 } from './sessions/
|
|
252
|
-
import { operation as o251 } from './sessions/git-commit
|
|
253
|
-
import { operation as o252 } from './sessions/git-
|
|
254
|
-
import { operation as o253 } from './sessions/git-
|
|
255
|
-
import { operation as o254 } from './sessions/
|
|
256
|
-
import { operation as o255 } from './sessions/go-ahead-
|
|
257
|
-
import { operation as o256 } from './sessions/
|
|
258
|
-
import { operation as o257 } from './sessions/jobs-
|
|
259
|
-
import { operation as o258 } from './sessions/jobs-
|
|
260
|
-
import { operation as o259 } from './sessions/
|
|
261
|
-
import { operation as o260 } from './sessions/labels-
|
|
262
|
-
import { operation as o261 } from './sessions/
|
|
263
|
-
import { operation as o262 } from './sessions/list
|
|
264
|
-
import { operation as o263 } from './sessions/
|
|
265
|
-
import { operation as o264 } from './sessions/
|
|
266
|
-
import { operation as o265 } from './sessions/messages-
|
|
267
|
-
import { operation as o266 } from './sessions/
|
|
268
|
-
import { operation as o267 } from './sessions/
|
|
269
|
-
import { operation as o268 } from './sessions/
|
|
270
|
-
import { operation as o269 } from './sessions/qa-runs-
|
|
271
|
-
import { operation as o270 } from './sessions/qa-runs-
|
|
272
|
-
import { operation as o271 } from './sessions/qa-runs-
|
|
273
|
-
import { operation as o272 } from './sessions/qa-runs-
|
|
274
|
-
import { operation as o273 } from './sessions/qa-runs-
|
|
275
|
-
import { operation as o274 } from './sessions/qa-
|
|
276
|
-
import { operation as o275 } from './sessions/
|
|
277
|
-
import { operation as o276 } from './sessions/queue-
|
|
278
|
-
import { operation as o277 } from './sessions/queue-
|
|
279
|
-
import { operation as o278 } from './sessions/queue-
|
|
280
|
-
import { operation as o279 } from './sessions/queue-
|
|
281
|
-
import { operation as o280 } from './sessions/queue-
|
|
282
|
-
import { operation as o281 } from './sessions/queue-
|
|
283
|
-
import { operation as o282 } from './sessions/
|
|
284
|
-
import { operation as o283 } from './sessions/
|
|
285
|
-
import { operation as o284 } from './sessions/
|
|
286
|
-
import { operation as o285 } from './sessions/
|
|
287
|
-
import { operation as o286 } from './sessions/
|
|
288
|
-
import { operation as o287 } from './sessions/
|
|
289
|
-
import { operation as o288 } from './sessions/
|
|
290
|
-
import { operation as o289 } from './sessions/
|
|
291
|
-
import { operation as o290 } from './
|
|
292
|
-
import { operation as o291 } from './skills/create
|
|
293
|
-
import { operation as o292 } from './skills/
|
|
294
|
-
import { operation as o293 } from './skills/delete
|
|
295
|
-
import { operation as o294 } from './skills/
|
|
296
|
-
import { operation as o295 } from './skills/get
|
|
297
|
-
import { operation as o296 } from './skills/
|
|
298
|
-
import { operation as o297 } from './skills/list
|
|
299
|
-
import { operation as o298 } from './skills/
|
|
300
|
-
import { operation as o299 } from './skills/update
|
|
301
|
-
import { operation as o300 } from './
|
|
302
|
-
import { operation as o301 } from './tasks/create
|
|
303
|
-
import { operation as o302 } from './tasks/
|
|
304
|
-
import { operation as o303 } from './tasks/delete
|
|
305
|
-
import { operation as o304 } from './tasks/
|
|
306
|
-
import { operation as o305 } from './tasks/get
|
|
307
|
-
import { operation as o306 } from './tasks/
|
|
308
|
-
import { operation as o307 } from './tasks/list.js';
|
|
309
|
-
import { operation as o308 } from './tasks/list
|
|
310
|
-
import { operation as o309 } from './tasks/list--
|
|
311
|
-
import { operation as o310 } from './tasks/
|
|
312
|
-
import { operation as o311 } from './tasks/move
|
|
313
|
-
import { operation as o312 } from './tasks/
|
|
314
|
-
import { operation as o313 } from './tasks/start
|
|
315
|
-
import { operation as o314 } from './tasks/
|
|
316
|
-
import { operation as o315 } from './tasks/update
|
|
317
|
-
import { operation as o316 } from './
|
|
318
|
-
import { operation as o317 } from './user/
|
|
319
|
-
import { operation as o318 } from './user/
|
|
320
|
-
import { operation as o319 } from './user/push-devices-
|
|
321
|
-
import { operation as o320 } from './user/
|
|
322
|
-
import { operation as o321 } from './
|
|
323
|
-
import { operation as o322 } from './workspaces/
|
|
324
|
-
import { operation as o323 } from './workspaces/get.js';
|
|
325
|
-
import { operation as o324 } from './workspaces/
|
|
326
|
-
import { operation as o325 } from './workspaces/
|
|
327
|
-
import { operation as o326 } from './workspaces/members-list
|
|
328
|
-
import { operation as o327 } from './workspaces/
|
|
329
|
-
import { operation as o328 } from './workspaces/
|
|
330
|
-
import { operation as o329 } from './workspaces/
|
|
331
|
-
import { operation as o330 } from './workspaces/
|
|
67
|
+
import { operation as o66 } from './integrations/uploads-create.js';
|
|
68
|
+
import { operation as o67 } from './mac/apps-list.js';
|
|
69
|
+
import { operation as o68 } from './mac/ax-tree-get.js';
|
|
70
|
+
import { operation as o69 } from './mac/browser-connections-list.js';
|
|
71
|
+
import { operation as o70 } from './mac/browser-connections-update.js';
|
|
72
|
+
import { operation as o71 } from './mac/browser-login.js';
|
|
73
|
+
import { operation as o72 } from './mac/browser-profiles-list.js';
|
|
74
|
+
import { operation as o73 } from './mac/browser-run.js';
|
|
75
|
+
import { operation as o74 } from './mac/click.js';
|
|
76
|
+
import { operation as o75 } from './mac/files-delete.js';
|
|
77
|
+
import { operation as o76 } from './mac/files-get.js';
|
|
78
|
+
import { operation as o77 } from './mac/files-list.js';
|
|
79
|
+
import { operation as o78 } from './mac/files-move.js';
|
|
80
|
+
import { operation as o79 } from './mac/files-set.js';
|
|
81
|
+
import { operation as o80 } from './mac/key.js';
|
|
82
|
+
import { operation as o81 } from './mac/open.js';
|
|
83
|
+
import { operation as o82 } from './mac/screenshots-create.js';
|
|
84
|
+
import { operation as o83 } from './mac/scroll.js';
|
|
85
|
+
import { operation as o84 } from './mac/shell.js';
|
|
86
|
+
import { operation as o85 } from './mac/status-get.js';
|
|
87
|
+
import { operation as o86 } from './mac/type.js';
|
|
88
|
+
import { operation as o87 } from './mac/windows-list.js';
|
|
89
|
+
import { operation as o88 } from './models/list.js';
|
|
90
|
+
import { operation as o89 } from './plugins/list.js';
|
|
91
|
+
import { operation as o90 } from './plugins/list--personal.js';
|
|
92
|
+
import { operation as o91 } from './plugins/update.js';
|
|
93
|
+
import { operation as o92 } from './plugins/update--personal.js';
|
|
94
|
+
import { operation as o93 } from './preview/get.js';
|
|
95
|
+
import { operation as o94 } from './preview/health-get.js';
|
|
96
|
+
import { operation as o95 } from './preview/reset.js';
|
|
97
|
+
import { operation as o96 } from './preview/share-create.js';
|
|
98
|
+
import { operation as o97 } from './preview/share-delete.js';
|
|
99
|
+
import { operation as o98 } from './preview/share-get.js';
|
|
100
|
+
import { operation as o99 } from './preview/shared-artifacts-get.js';
|
|
101
|
+
import { operation as o100 } from './preview/shared-get.js';
|
|
102
|
+
import { operation as o101 } from './projects/backlog-items-create.js';
|
|
103
|
+
import { operation as o102 } from './projects/backlog-items-delete.js';
|
|
104
|
+
import { operation as o103 } from './projects/backlog-items-list.js';
|
|
105
|
+
import { operation as o104 } from './projects/backlog-items-send.js';
|
|
106
|
+
import { operation as o105 } from './projects/backlog-items-update.js';
|
|
107
|
+
import { operation as o106 } from './projects/batch-merging-finish.js';
|
|
108
|
+
import { operation as o107 } from './projects/batch-merging-get.js';
|
|
109
|
+
import { operation as o108 } from './projects/batch-merging-members-create.js';
|
|
110
|
+
import { operation as o109 } from './projects/batch-merging-members-delete.js';
|
|
111
|
+
import { operation as o110 } from './projects/batch-merging-set.js';
|
|
112
|
+
import { operation as o111 } from './projects/branches-list.js';
|
|
113
|
+
import { operation as o112 } from './projects/create.js';
|
|
114
|
+
import { operation as o113 } from './projects/delete.js';
|
|
115
|
+
import { operation as o114 } from './projects/env-vars-create.js';
|
|
116
|
+
import { operation as o115 } from './projects/env-vars-delete.js';
|
|
117
|
+
import { operation as o116 } from './projects/get.js';
|
|
118
|
+
import { operation as o117 } from './projects/labels-delete.js';
|
|
119
|
+
import { operation as o118 } from './projects/labels-list.js';
|
|
120
|
+
import { operation as o119 } from './projects/labels-sessions-list.js';
|
|
121
|
+
import { operation as o120 } from './projects/labels-update.js';
|
|
122
|
+
import { operation as o121 } from './projects/list.js';
|
|
123
|
+
import { operation as o122 } from './projects/live-logs-list.js';
|
|
124
|
+
import { operation as o123 } from './projects/live-queries-run.js';
|
|
125
|
+
import { operation as o124 } from './projects/live-traffic-get.js';
|
|
126
|
+
import { operation as o125 } from './projects/live-writes-create.js';
|
|
127
|
+
import { operation as o126 } from './projects/live-writes-get.js';
|
|
128
|
+
import { operation as o127 } from './projects/qa-guide-get.js';
|
|
129
|
+
import { operation as o128 } from './projects/qa-guide-set.js';
|
|
130
|
+
import { operation as o129 } from './projects/releases-list.js';
|
|
131
|
+
import { operation as o130 } from './projects/services-create.js';
|
|
132
|
+
import { operation as o131 } from './projects/services-delete.js';
|
|
133
|
+
import { operation as o132 } from './projects/services-list.js';
|
|
134
|
+
import { operation as o133 } from './projects/services-update.js';
|
|
135
|
+
import { operation as o134 } from './projects/settings-get.js';
|
|
136
|
+
import { operation as o135 } from './projects/settings-set.js';
|
|
137
|
+
import { operation as o136 } from './projects/settings-update.js';
|
|
138
|
+
import { operation as o137 } from './projects/skills-list.js';
|
|
139
|
+
import { operation as o138 } from './projects/update.js';
|
|
140
|
+
import { operation as o139 } from './projects/versions-list.js';
|
|
141
|
+
import { operation as o140 } from './projects/workflow-set.js';
|
|
142
|
+
import { operation as o141 } from './prototypes/create.js';
|
|
143
|
+
import { operation as o142 } from './providers/access-get.js';
|
|
144
|
+
import { operation as o143 } from './providers/default-model-set--personal.js';
|
|
145
|
+
import { operation as o144 } from './providers/delete.js';
|
|
146
|
+
import { operation as o145 } from './providers/delete--personal.js';
|
|
147
|
+
import { operation as o146 } from './providers/get.js';
|
|
148
|
+
import { operation as o147 } from './providers/get--personal.js';
|
|
149
|
+
import { operation as o148 } from './providers/google-delete.js';
|
|
150
|
+
import { operation as o149 } from './providers/google-get.js';
|
|
151
|
+
import { operation as o150 } from './providers/google-methods-delete.js';
|
|
152
|
+
import { operation as o151 } from './providers/google-methods-set.js';
|
|
153
|
+
import { operation as o152 } from './providers/google-set.js';
|
|
154
|
+
import { operation as o153 } from './providers/grok-get.js';
|
|
155
|
+
import { operation as o154 } from './providers/grok-get--personal.js';
|
|
156
|
+
import { operation as o155 } from './providers/grok-update.js';
|
|
157
|
+
import { operation as o156 } from './providers/grok-update--personal.js';
|
|
158
|
+
import { operation as o157 } from './providers/keys-set--personal.js';
|
|
159
|
+
import { operation as o158 } from './providers/logins-cancel--personal-provider-antigravity.js';
|
|
160
|
+
import { operation as o159 } from './providers/logins-cancel--provider-antigravity.js';
|
|
161
|
+
import { operation as o160 } from './providers/logins-complete--personal-provider-antigravity.js';
|
|
162
|
+
import { operation as o161 } from './providers/logins-complete--personal-provider-claude-code.js';
|
|
163
|
+
import { operation as o162 } from './providers/logins-complete--personal-provider-codex.js';
|
|
164
|
+
import { operation as o163 } from './providers/logins-complete--personal-provider-muse-code.js';
|
|
165
|
+
import { operation as o164 } from './providers/logins-complete--provider-antigravity.js';
|
|
166
|
+
import { operation as o165 } from './providers/logins-complete--provider-claude-code.js';
|
|
167
|
+
import { operation as o166 } from './providers/logins-complete--provider-codex.js';
|
|
168
|
+
import { operation as o167 } from './providers/logins-complete--provider-muse-code.js';
|
|
169
|
+
import { operation as o168 } from './providers/logins-delete--personal.js';
|
|
170
|
+
import { operation as o169 } from './providers/logins-recheck.js';
|
|
171
|
+
import { operation as o170 } from './providers/logins-recheck--personal.js';
|
|
172
|
+
import { operation as o171 } from './providers/logins-start--personal-provider-antigravity.js';
|
|
173
|
+
import { operation as o172 } from './providers/logins-start--personal-provider-claude-code.js';
|
|
174
|
+
import { operation as o173 } from './providers/logins-start--personal-provider-codex.js';
|
|
175
|
+
import { operation as o174 } from './providers/logins-start--personal-provider-muse-code.js';
|
|
176
|
+
import { operation as o175 } from './providers/logins-start--provider-antigravity.js';
|
|
177
|
+
import { operation as o176 } from './providers/logins-start--provider-claude-code.js';
|
|
178
|
+
import { operation as o177 } from './providers/logins-start--provider-codex.js';
|
|
179
|
+
import { operation as o178 } from './providers/logins-start--provider-muse-code.js';
|
|
180
|
+
import { operation as o179 } from './providers/set.js';
|
|
181
|
+
import { operation as o180 } from './providers/token-usage-get.js';
|
|
182
|
+
import { operation as o181 } from './providers/token-usage-get--personal.js';
|
|
183
|
+
import { operation as o182 } from './providers/usage-get--personal.js';
|
|
184
|
+
import { operation as o183 } from './providers/usage-get--provider-antigravity.js';
|
|
185
|
+
import { operation as o184 } from './providers/usage-get--provider-claude-code.js';
|
|
186
|
+
import { operation as o185 } from './providers/usage-get--provider-codex.js';
|
|
187
|
+
import { operation as o186 } from './providers/usage-get--provider-coding-plan.js';
|
|
188
|
+
import { operation as o187 } from './providers/usage-get--provider-deepseek-api.js';
|
|
189
|
+
import { operation as o188 } from './providers/usage-get--provider-grok.js';
|
|
190
|
+
import { operation as o189 } from './providers/usage-get--provider-kimi-code.js';
|
|
191
|
+
import { operation as o190 } from './providers/usage-get--provider-muse-code.js';
|
|
192
|
+
import { operation as o191 } from './sensei/cards-close.js';
|
|
193
|
+
import { operation as o192 } from './sensei/cards-list.js';
|
|
194
|
+
import { operation as o193 } from './sensei/cards-mark-read.js';
|
|
195
|
+
import { operation as o194 } from './sensei/cards-reply.js';
|
|
196
|
+
import { operation as o195 } from './sensei/cards-set.js';
|
|
197
|
+
import { operation as o196 } from './sensei/chat-get.js';
|
|
198
|
+
import { operation as o197 } from './sensei/connect-buttons-create.js';
|
|
199
|
+
import { operation as o198 } from './sensei/delegates-get.js';
|
|
200
|
+
import { operation as o199 } from './sensei/delegates-list.js';
|
|
201
|
+
import { operation as o200 } from './sensei/delegates-notes-create.js';
|
|
202
|
+
import { operation as o201 } from './sensei/delegates-start.js';
|
|
203
|
+
import { operation as o202 } from './sensei/delegates-stop.js';
|
|
204
|
+
import { operation as o203 } from './sensei/describe-cards-create.js';
|
|
205
|
+
import { operation as o204 } from './sensei/device-requests-list.js';
|
|
206
|
+
import { operation as o205 } from './sensei/device-requests-update.js';
|
|
207
|
+
import { operation as o206 } from './sensei/memory-get.js';
|
|
208
|
+
import { operation as o207 } from './sensei/memory-set.js';
|
|
209
|
+
import { operation as o208 } from './sensei/merge.js';
|
|
210
|
+
import { operation as o209 } from './sensei/merge-rule-set.js';
|
|
211
|
+
import { operation as o210 } from './sensei/messages-move.js';
|
|
212
|
+
import { operation as o211 } from './sensei/messages-reply.js';
|
|
213
|
+
import { operation as o212 } from './sensei/messages-send.js';
|
|
214
|
+
import { operation as o213 } from './sensei/notifications-mark-read.js';
|
|
215
|
+
import { operation as o214 } from './sensei/reels-activity-list.js';
|
|
216
|
+
import { operation as o215 } from './sensei/reels-ranks-list.js';
|
|
217
|
+
import { operation as o216 } from './sensei/repository-cards-create.js';
|
|
218
|
+
import { operation as o217 } from './sensei/review-approvals-create.js';
|
|
219
|
+
import { operation as o218 } from './sensei/review-context-get.js';
|
|
220
|
+
import { operation as o219 } from './sensei/review-requests-create.js';
|
|
221
|
+
import { operation as o220 } from './sensei/sessions-assessments-create.js';
|
|
222
|
+
import { operation as o221 } from './sensei/sessions-facts-get.js';
|
|
223
|
+
import { operation as o222 } from './sensei/suggestions-create.js';
|
|
224
|
+
import { operation as o223 } from './sensei/threads-close.js';
|
|
225
|
+
import { operation as o224 } from './sensei/threads-get.js';
|
|
226
|
+
import { operation as o225 } from './sensei/threads-list.js';
|
|
227
|
+
import { operation as o226 } from './sensei/threads-move.js';
|
|
228
|
+
import { operation as o227 } from './sensei/threads-split.js';
|
|
229
|
+
import { operation as o228 } from './sensei/tickets-merge.js';
|
|
230
|
+
import { operation as o229 } from './sensei/watch-reads-finish.js';
|
|
231
|
+
import { operation as o230 } from './sensei/widgets-get.js';
|
|
232
|
+
import { operation as o231 } from './sessions/app-stack-start.js';
|
|
233
|
+
import { operation as o232 } from './sessions/artifacts-create.js';
|
|
234
|
+
import { operation as o233 } from './sessions/artifacts-get.js';
|
|
235
|
+
import { operation as o234 } from './sessions/artifacts-list.js';
|
|
236
|
+
import { operation as o235 } from './sessions/create.js';
|
|
237
|
+
import { operation as o236 } from './sessions/delete.js';
|
|
238
|
+
import { operation as o237 } from './sessions/desktop-control-set.js';
|
|
239
|
+
import { operation as o238 } from './sessions/desktop-get.js';
|
|
240
|
+
import { operation as o239 } from './sessions/desktop-start.js';
|
|
241
|
+
import { operation as o240 } from './sessions/diff-comments-create.js';
|
|
242
|
+
import { operation as o241 } from './sessions/diff-comments-delete.js';
|
|
243
|
+
import { operation as o242 } from './sessions/diff-comments-list.js';
|
|
244
|
+
import { operation as o243 } from './sessions/diff-comments-update.js';
|
|
245
|
+
import { operation as o244 } from './sessions/diff-commits-list.js';
|
|
246
|
+
import { operation as o245 } from './sessions/diff-files-list.js';
|
|
247
|
+
import { operation as o246 } from './sessions/diff-patch-get.js';
|
|
248
|
+
import { operation as o247 } from './sessions/files-get.js';
|
|
249
|
+
import { operation as o248 } from './sessions/files-list.js';
|
|
250
|
+
import { operation as o249 } from './sessions/files-set.js';
|
|
251
|
+
import { operation as o250 } from './sessions/get.js';
|
|
252
|
+
import { operation as o251 } from './sessions/git-commit.js';
|
|
253
|
+
import { operation as o252 } from './sessions/git-commit-message-create.js';
|
|
254
|
+
import { operation as o253 } from './sessions/git-push.js';
|
|
255
|
+
import { operation as o254 } from './sessions/git-state-get.js';
|
|
256
|
+
import { operation as o255 } from './sessions/go-ahead-delete.js';
|
|
257
|
+
import { operation as o256 } from './sessions/go-ahead-set.js';
|
|
258
|
+
import { operation as o257 } from './sessions/jobs-cancel.js';
|
|
259
|
+
import { operation as o258 } from './sessions/jobs-get.js';
|
|
260
|
+
import { operation as o259 } from './sessions/jobs-list.js';
|
|
261
|
+
import { operation as o260 } from './sessions/labels-set.js';
|
|
262
|
+
import { operation as o261 } from './sessions/labels-update.js';
|
|
263
|
+
import { operation as o262 } from './sessions/list.js';
|
|
264
|
+
import { operation as o263 } from './sessions/list--all.js';
|
|
265
|
+
import { operation as o264 } from './sessions/mark-read.js';
|
|
266
|
+
import { operation as o265 } from './sessions/messages-get.js';
|
|
267
|
+
import { operation as o266 } from './sessions/messages-list.js';
|
|
268
|
+
import { operation as o267 } from './sessions/prompt-update.js';
|
|
269
|
+
import { operation as o268 } from './sessions/pull-request-mark-ready.js';
|
|
270
|
+
import { operation as o269 } from './sessions/qa-runs-finish.js';
|
|
271
|
+
import { operation as o270 } from './sessions/qa-runs-fixes-create.js';
|
|
272
|
+
import { operation as o271 } from './sessions/qa-runs-get.js';
|
|
273
|
+
import { operation as o272 } from './sessions/qa-runs-results-create.js';
|
|
274
|
+
import { operation as o273 } from './sessions/qa-runs-start.js';
|
|
275
|
+
import { operation as o274 } from './sessions/qa-runs-stop.js';
|
|
276
|
+
import { operation as o275 } from './sessions/qa-set.js';
|
|
277
|
+
import { operation as o276 } from './sessions/queue-delete.js';
|
|
278
|
+
import { operation as o277 } from './sessions/queue-list.js';
|
|
279
|
+
import { operation as o278 } from './sessions/queue-move.js';
|
|
280
|
+
import { operation as o279 } from './sessions/queue-resume.js';
|
|
281
|
+
import { operation as o280 } from './sessions/queue-send.js';
|
|
282
|
+
import { operation as o281 } from './sessions/queue-steer.js';
|
|
283
|
+
import { operation as o282 } from './sessions/queue-update.js';
|
|
284
|
+
import { operation as o283 } from './sessions/review-set.js';
|
|
285
|
+
import { operation as o284 } from './sessions/runtime-commands-run.js';
|
|
286
|
+
import { operation as o285 } from './sessions/search.js';
|
|
287
|
+
import { operation as o286 } from './sessions/send.js';
|
|
288
|
+
import { operation as o287 } from './sessions/start.js';
|
|
289
|
+
import { operation as o288 } from './sessions/steer.js';
|
|
290
|
+
import { operation as o289 } from './sessions/sync.js';
|
|
291
|
+
import { operation as o290 } from './sessions/update.js';
|
|
292
|
+
import { operation as o291 } from './skills/create.js';
|
|
293
|
+
import { operation as o292 } from './skills/create--personal.js';
|
|
294
|
+
import { operation as o293 } from './skills/delete.js';
|
|
295
|
+
import { operation as o294 } from './skills/delete--personal.js';
|
|
296
|
+
import { operation as o295 } from './skills/get.js';
|
|
297
|
+
import { operation as o296 } from './skills/get--personal.js';
|
|
298
|
+
import { operation as o297 } from './skills/list.js';
|
|
299
|
+
import { operation as o298 } from './skills/list--personal.js';
|
|
300
|
+
import { operation as o299 } from './skills/update.js';
|
|
301
|
+
import { operation as o300 } from './skills/update--personal.js';
|
|
302
|
+
import { operation as o301 } from './tasks/create.js';
|
|
303
|
+
import { operation as o302 } from './tasks/create--personal.js';
|
|
304
|
+
import { operation as o303 } from './tasks/delete.js';
|
|
305
|
+
import { operation as o304 } from './tasks/delete--personal.js';
|
|
306
|
+
import { operation as o305 } from './tasks/get.js';
|
|
307
|
+
import { operation as o306 } from './tasks/get--personal.js';
|
|
308
|
+
import { operation as o307 } from './tasks/labels-list.js';
|
|
309
|
+
import { operation as o308 } from './tasks/list.js';
|
|
310
|
+
import { operation as o309 } from './tasks/list--all.js';
|
|
311
|
+
import { operation as o310 } from './tasks/list--personal.js';
|
|
312
|
+
import { operation as o311 } from './tasks/move.js';
|
|
313
|
+
import { operation as o312 } from './tasks/move--personal.js';
|
|
314
|
+
import { operation as o313 } from './tasks/start.js';
|
|
315
|
+
import { operation as o314 } from './tasks/start--personal.js';
|
|
316
|
+
import { operation as o315 } from './tasks/update.js';
|
|
317
|
+
import { operation as o316 } from './tasks/update--personal.js';
|
|
318
|
+
import { operation as o317 } from './user/api-keys-delete.js';
|
|
319
|
+
import { operation as o318 } from './user/profile-get.js';
|
|
320
|
+
import { operation as o319 } from './user/push-devices-create.js';
|
|
321
|
+
import { operation as o320 } from './user/push-devices-delete.js';
|
|
322
|
+
import { operation as o321 } from './user/usage-get.js';
|
|
323
|
+
import { operation as o322 } from './workspaces/artifacts-search.js';
|
|
324
|
+
import { operation as o323 } from './workspaces/credits-get.js';
|
|
325
|
+
import { operation as o324 } from './workspaces/get.js';
|
|
326
|
+
import { operation as o325 } from './workspaces/list.js';
|
|
327
|
+
import { operation as o326 } from './workspaces/members-list.js';
|
|
328
|
+
import { operation as o327 } from './workspaces/members-list--all.js';
|
|
329
|
+
import { operation as o328 } from './workspaces/sandbox-limit-get.js';
|
|
330
|
+
import { operation as o329 } from './workspaces/sandboxes-stop.js';
|
|
331
|
+
import { operation as o330 } from './workspaces/timezone-set.js';
|
|
332
|
+
import { operation as o331 } from './workspaces/usage-get.js';
|
|
332
333
|
export const operations = [
|
|
333
334
|
o0,
|
|
334
335
|
o1,
|
|
@@ -661,4 +662,5 @@ export const operations = [
|
|
|
661
662
|
o328,
|
|
662
663
|
o329,
|
|
663
664
|
o330,
|
|
665
|
+
o331,
|
|
664
666
|
];
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export const operation = {
|
|
2
|
+
"method": "post",
|
|
3
|
+
"path": "/api/agent-integrations/file-uploads",
|
|
4
|
+
"command": [
|
|
5
|
+
"integrations",
|
|
6
|
+
"uploads",
|
|
7
|
+
"create"
|
|
8
|
+
],
|
|
9
|
+
"summary": "Reserve the upload of one file for an integration tool that takes files, on the connection a call would run on. The answer is a file reference and a URL: PUT the file to the URL with the headers given, then pass the reference as the file argument of that tool on that connection. `kosuke integrations call --file` does all of it, and is the command to use. A failure answers 200 with isError true, as a call does. A Connector Token or a browser session is refused.",
|
|
10
|
+
"pathParams": [],
|
|
11
|
+
"query": [
|
|
12
|
+
{
|
|
13
|
+
"name": "workspace",
|
|
14
|
+
"flag": "workspace",
|
|
15
|
+
"kind": "string",
|
|
16
|
+
"required": false,
|
|
17
|
+
"description": "The workspace the call is made in. Required with an API key, which is refused with 403 when you are not a member of it. An agent credential reaches its own workspace and refuses another."
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"body": {
|
|
21
|
+
"fields": [
|
|
22
|
+
{
|
|
23
|
+
"name": "name",
|
|
24
|
+
"flag": "name",
|
|
25
|
+
"kind": "string",
|
|
26
|
+
"required": true,
|
|
27
|
+
"description": "The tool the file is for, as the tools list names it."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "account",
|
|
31
|
+
"flag": "account",
|
|
32
|
+
"kind": "string",
|
|
33
|
+
"required": false,
|
|
34
|
+
"description": "The connection the call will run on: its short id, its alias or scope:label. Needed when several can run the tool."
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "filename",
|
|
38
|
+
"flag": "filename",
|
|
39
|
+
"kind": "string",
|
|
40
|
+
"required": true,
|
|
41
|
+
"description": "The file name the vendor receives, without a directory."
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "mimetype",
|
|
45
|
+
"flag": "mimetype",
|
|
46
|
+
"kind": "string",
|
|
47
|
+
"required": true,
|
|
48
|
+
"description": "The MIME type of the file, such as video/mp4."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "md5",
|
|
52
|
+
"flag": "md5",
|
|
53
|
+
"kind": "string",
|
|
54
|
+
"required": true,
|
|
55
|
+
"description": "The MD5 digest of the file, in lowercase hex."
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"required": true
|
|
59
|
+
},
|
|
60
|
+
"multipart": null,
|
|
61
|
+
"attachments": false,
|
|
62
|
+
"anonymous": false,
|
|
63
|
+
"agents": "all"
|
|
64
|
+
};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { createReadStream } from 'node:fs';
|
|
3
|
+
import { stat } from 'node:fs/promises';
|
|
4
|
+
import { basename, extname } from 'node:path';
|
|
5
|
+
import { Readable } from 'node:stream';
|
|
6
|
+
/**
|
|
7
|
+
* `kosuke integrations call --file <argument>=<path>`: a local file for a tool's file argument.
|
|
8
|
+
* The platform reserves the upload and answers a file reference; the file goes straight to the
|
|
9
|
+
* storage URL it names, never through the platform, so a large video costs the platform nothing.
|
|
10
|
+
*/
|
|
11
|
+
export const FILE_UPLOAD_PATH = '/api/agent-integrations/file-uploads';
|
|
12
|
+
/** The storage takes one PUT of at most 5 GiB. */
|
|
13
|
+
export const MAX_FILE_BYTES = 5 * 1024 ** 3;
|
|
14
|
+
const NAME = /^[A-Za-z_][A-Za-z0-9_-]{0,63}$/;
|
|
15
|
+
const INDEX = /^\d{1,4}$/;
|
|
16
|
+
const UNSAFE = new Set(['__proto__', 'constructor', 'prototype']);
|
|
17
|
+
/** `videoFilePath=./clip.mp4`, or `attachment.0=./a.pdf` for a file inside a list or object. */
|
|
18
|
+
export function parseFileArgument(raw) {
|
|
19
|
+
const split = raw.indexOf('=');
|
|
20
|
+
if (split <= 0 || split === raw.length - 1)
|
|
21
|
+
return null;
|
|
22
|
+
const at = raw.slice(0, split).split('.');
|
|
23
|
+
const path = raw.slice(split + 1);
|
|
24
|
+
if (!NAME.test(at[0]))
|
|
25
|
+
return null;
|
|
26
|
+
if (at.some((segment) => UNSAFE.has(segment) || !(NAME.test(segment) || INDEX.test(segment)))) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
return { at, path };
|
|
30
|
+
}
|
|
31
|
+
/** Puts `value` at `at`, making the lists and objects on the way; false when one is in the way. */
|
|
32
|
+
export function setAt(args, at, value) {
|
|
33
|
+
let parent = args;
|
|
34
|
+
for (let index = 0; index < at.length; index += 1) {
|
|
35
|
+
const segment = at[index];
|
|
36
|
+
const last = index === at.length - 1;
|
|
37
|
+
const nextIsIndex = !last && INDEX.test(at[index + 1]);
|
|
38
|
+
if (Array.isArray(parent)) {
|
|
39
|
+
if (!INDEX.test(segment))
|
|
40
|
+
return false;
|
|
41
|
+
const position = Number(segment);
|
|
42
|
+
if (position > parent.length)
|
|
43
|
+
return false;
|
|
44
|
+
if (last) {
|
|
45
|
+
parent[position] = value;
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
parent[position] ??= nextIsIndex ? [] : {};
|
|
49
|
+
const child = parent[position];
|
|
50
|
+
if (typeof child !== 'object' || child === null)
|
|
51
|
+
return false;
|
|
52
|
+
parent = child;
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
if (INDEX.test(segment))
|
|
56
|
+
return false;
|
|
57
|
+
if (last) {
|
|
58
|
+
parent[segment] = value;
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
if (!Object.hasOwn(parent, segment))
|
|
62
|
+
parent[segment] = nextIsIndex ? [] : {};
|
|
63
|
+
const child = parent[segment];
|
|
64
|
+
if (typeof child !== 'object' || child === null)
|
|
65
|
+
return false;
|
|
66
|
+
if (nextIsIndex !== Array.isArray(child))
|
|
67
|
+
return false;
|
|
68
|
+
parent = child;
|
|
69
|
+
}
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
const MIME_TYPES = {
|
|
73
|
+
'.3gp': 'video/3gpp',
|
|
74
|
+
'.avi': 'video/x-msvideo',
|
|
75
|
+
'.flv': 'video/x-flv',
|
|
76
|
+
'.m4v': 'video/x-m4v',
|
|
77
|
+
'.mkv': 'video/x-matroska',
|
|
78
|
+
'.mov': 'video/quicktime',
|
|
79
|
+
'.mp4': 'video/mp4',
|
|
80
|
+
'.mpeg': 'video/mpeg',
|
|
81
|
+
'.mpg': 'video/mpeg',
|
|
82
|
+
'.webm': 'video/webm',
|
|
83
|
+
'.wmv': 'video/x-ms-wmv',
|
|
84
|
+
'.mp3': 'audio/mpeg',
|
|
85
|
+
'.m4a': 'audio/mp4',
|
|
86
|
+
'.wav': 'audio/wav',
|
|
87
|
+
'.ogg': 'audio/ogg',
|
|
88
|
+
'.srt': 'application/x-subrip',
|
|
89
|
+
'.vtt': 'text/vtt',
|
|
90
|
+
'.sbv': 'text/plain',
|
|
91
|
+
'.ttml': 'application/ttml+xml',
|
|
92
|
+
'.dfxp': 'application/ttml+xml',
|
|
93
|
+
'.scc': 'text/plain',
|
|
94
|
+
'.gif': 'image/gif',
|
|
95
|
+
'.jpeg': 'image/jpeg',
|
|
96
|
+
'.jpg': 'image/jpeg',
|
|
97
|
+
'.png': 'image/png',
|
|
98
|
+
'.svg': 'image/svg+xml',
|
|
99
|
+
'.webp': 'image/webp',
|
|
100
|
+
'.csv': 'text/csv',
|
|
101
|
+
'.html': 'text/html',
|
|
102
|
+
'.json': 'application/json',
|
|
103
|
+
'.md': 'text/markdown',
|
|
104
|
+
'.txt': 'text/plain',
|
|
105
|
+
'.xml': 'application/xml',
|
|
106
|
+
'.pdf': 'application/pdf',
|
|
107
|
+
'.zip': 'application/zip',
|
|
108
|
+
'.doc': 'application/msword',
|
|
109
|
+
'.docx': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
110
|
+
'.xls': 'application/vnd.ms-excel',
|
|
111
|
+
'.xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
112
|
+
'.ppt': 'application/vnd.ms-powerpoint',
|
|
113
|
+
'.pptx': 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
|
114
|
+
};
|
|
115
|
+
export function mimetypeOf(name) {
|
|
116
|
+
return MIME_TYPES[extname(name).toLowerCase()] ?? 'application/octet-stream';
|
|
117
|
+
}
|
|
118
|
+
/** The name the vendor receives: the base name, when the platform can take it. */
|
|
119
|
+
export function uploadName(path) {
|
|
120
|
+
const name = basename(path);
|
|
121
|
+
return name.length > 0 && name.length <= 255 && !/[/\\\p{Cc}]/u.test(name) ? name : null;
|
|
122
|
+
}
|
|
123
|
+
export async function fileSize(path) {
|
|
124
|
+
try {
|
|
125
|
+
const info = await stat(path);
|
|
126
|
+
return info.isFile() ? info.size : null;
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
export async function md5Of(path) {
|
|
133
|
+
const hash = createHash('md5');
|
|
134
|
+
for await (const chunk of createReadStream(path))
|
|
135
|
+
hash.update(chunk);
|
|
136
|
+
return hash.digest('hex');
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* One PUT of the whole file. The length is stated because the storage refuses a chunked upload,
|
|
140
|
+
* and the file is streamed so a large video is never held in memory.
|
|
141
|
+
*/
|
|
142
|
+
export async function putFile(fetch, upload, path, size, mimetype, signal) {
|
|
143
|
+
const response = await fetch(upload.url, {
|
|
144
|
+
method: 'PUT',
|
|
145
|
+
headers: { ...upload.headers, 'content-type': mimetype, 'content-length': String(size) },
|
|
146
|
+
body: Readable.toWeb(createReadStream(path)),
|
|
147
|
+
duplex: 'half',
|
|
148
|
+
redirect: 'error',
|
|
149
|
+
signal,
|
|
150
|
+
});
|
|
151
|
+
await response.body?.cancel().catch(() => undefined);
|
|
152
|
+
return response.status;
|
|
153
|
+
}
|
package/openapi.json
CHANGED
|
@@ -232,6 +232,107 @@
|
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
234
|
},
|
|
235
|
+
"/api/agent-integrations/file-uploads": {
|
|
236
|
+
"post": {
|
|
237
|
+
"operationId": "integrationsUploadsCreate",
|
|
238
|
+
"summary": "Reserve the upload of one file for an integration tool that takes files, on the connection a call would run on. The answer is a file reference and a URL: PUT the file to the URL with the headers given, then pass the reference as the file argument of that tool on that connection. `kosuke integrations call --file` does all of it, and is the command to use. A failure answers 200 with isError true, as a call does. A Connector Token or a browser session is refused.",
|
|
239
|
+
"tags": ["integrations"],
|
|
240
|
+
"x-kosuke-command": ["integrations", "uploads", "create"],
|
|
241
|
+
"x-kosuke-sandbox-token": true,
|
|
242
|
+
"x-kosuke-cron-token": true,
|
|
243
|
+
"x-kosuke-sensei-token": true,
|
|
244
|
+
"parameters": [
|
|
245
|
+
{
|
|
246
|
+
"name": "workspace",
|
|
247
|
+
"in": "query",
|
|
248
|
+
"required": false,
|
|
249
|
+
"description": "The workspace the call is made in. Required with an API key, which is refused with 403 when you are not a member of it. An agent credential reaches its own workspace and refuses another.",
|
|
250
|
+
"schema": {
|
|
251
|
+
"description": "The workspace the call is made in. Required with an API key, which is refused with 403 when you are not a member of it. An agent credential reaches its own workspace and refuses another.",
|
|
252
|
+
"type": "string",
|
|
253
|
+
"minLength": 1,
|
|
254
|
+
"maxLength": 100
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
"requestBody": {
|
|
259
|
+
"required": true,
|
|
260
|
+
"content": {
|
|
261
|
+
"application/json": {
|
|
262
|
+
"schema": {
|
|
263
|
+
"type": "object",
|
|
264
|
+
"properties": {
|
|
265
|
+
"name": {
|
|
266
|
+
"type": "string",
|
|
267
|
+
"minLength": 1,
|
|
268
|
+
"maxLength": 80,
|
|
269
|
+
"description": "The tool the file is for, as the tools list names it."
|
|
270
|
+
},
|
|
271
|
+
"account": {
|
|
272
|
+
"description": "The connection the call will run on: its short id, its alias or scope:label. Needed when several can run the tool.",
|
|
273
|
+
"type": "string",
|
|
274
|
+
"minLength": 1,
|
|
275
|
+
"maxLength": 100
|
|
276
|
+
},
|
|
277
|
+
"filename": {
|
|
278
|
+
"type": "string",
|
|
279
|
+
"minLength": 1,
|
|
280
|
+
"maxLength": 255,
|
|
281
|
+
"pattern": "^[^/\\\\\\p{Cc}]+$",
|
|
282
|
+
"description": "The file name the vendor receives, without a directory."
|
|
283
|
+
},
|
|
284
|
+
"mimetype": {
|
|
285
|
+
"type": "string",
|
|
286
|
+
"maxLength": 255,
|
|
287
|
+
"pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$",
|
|
288
|
+
"description": "The MIME type of the file, such as video/mp4."
|
|
289
|
+
},
|
|
290
|
+
"md5": {
|
|
291
|
+
"type": "string",
|
|
292
|
+
"pattern": "^[a-f0-9]{32}$",
|
|
293
|
+
"description": "The MD5 digest of the file, in lowercase hex."
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"required": ["name", "filename", "mimetype", "md5"],
|
|
297
|
+
"additionalProperties": false
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"responses": {
|
|
303
|
+
"2XX": {
|
|
304
|
+
"description": "Success envelope",
|
|
305
|
+
"content": {
|
|
306
|
+
"application/json": {
|
|
307
|
+
"schema": {
|
|
308
|
+
"$ref": "#/components/schemas/ApiSuccess"
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
"4XX": {
|
|
314
|
+
"description": "Error envelope",
|
|
315
|
+
"content": {
|
|
316
|
+
"application/json": {
|
|
317
|
+
"schema": {
|
|
318
|
+
"$ref": "#/components/schemas/ApiError"
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
"5XX": {
|
|
324
|
+
"description": "Error envelope",
|
|
325
|
+
"content": {
|
|
326
|
+
"application/json": {
|
|
327
|
+
"schema": {
|
|
328
|
+
"$ref": "#/components/schemas/ApiError"
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
},
|
|
235
336
|
"/api/agent-integrations/tools": {
|
|
236
337
|
"get": {
|
|
237
338
|
"operationId": "integrationsToolsList",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kosuke-ai/kosuke",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
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": {
|
|
@@ -40,11 +40,10 @@
|
|
|
40
40
|
"vitest": "^4.1.12"
|
|
41
41
|
},
|
|
42
42
|
"kosukeRelease": {
|
|
43
|
-
"sourceCommit": "
|
|
44
|
-
"sourceIdentity": "
|
|
43
|
+
"sourceCommit": "e8cfc6a10560808a7caeb3459689a40d350802ad",
|
|
44
|
+
"sourceIdentity": "53826d80538eb10915ea379597ea571039d4144d2b6d95c47bd5b01ef75588f2",
|
|
45
45
|
"fragments": [
|
|
46
|
-
"
|
|
47
|
-
"task-requested-branch.json"
|
|
46
|
+
"cli-integrations-call-file-k7w2qd.json"
|
|
48
47
|
]
|
|
49
48
|
}
|
|
50
49
|
}
|