@kosuke-ai/kosuke 1.0.161 → 1.0.163
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 +8 -0
- package/dist/commands/skill-runs.js +2 -0
- package/dist/generated/commands/sessions/list--all.js +1 -0
- package/dist/generated/commands/user/push-devices-create.js +22 -1
- package/dist/runtime/client-header.js +34 -0
- package/dist/runtime/client.js +2 -0
- package/openapi.json +23 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.163
|
|
4
|
+
|
|
5
|
+
- Task and session reads now say whether an open Sensei card of the task's Assignee is about it (assigneeCardOpen).
|
|
6
|
+
|
|
7
|
+
## 1.0.162
|
|
8
|
+
|
|
9
|
+
- Every Kosuke app now tells the server which version and build it is and what it runs on: the CLI, the Mac app, the iPhone app and the Watch send an `X-Kosuke-Client` header such as `mac/0.1.109 (macOS 15.1.1; MacBookPro18,3; arm64)`, and the Mac, iPhone and Watch also report their OS version and model when they register.
|
|
10
|
+
|
|
3
11
|
## 1.0.161
|
|
4
12
|
|
|
5
13
|
- `kosuke integrations list --toolkit` takes an MCP server's toolkit, such as `mcp-deepwiki`: the tools of an MCP server you or a workspace admin added in Settings, Integrations.
|
|
@@ -3,6 +3,7 @@ import { appendFile, lstat, readFile } from 'node:fs/promises';
|
|
|
3
3
|
import { isAbsolute } from 'node:path';
|
|
4
4
|
import { agentTokenOf } from '../runtime/agent-tokens.js';
|
|
5
5
|
import { groupFor, leafAt } from '../runtime/attach.js';
|
|
6
|
+
import { CLIENT_HEADER, clientHeader } from '../runtime/client-header.js';
|
|
6
7
|
import { OWN_TEXT } from '../runtime/help.js';
|
|
7
8
|
import { HAND_WRITTEN } from './hand-written.js';
|
|
8
9
|
const FLAGS = new Set([
|
|
@@ -191,6 +192,7 @@ export async function runSkillMarkerCommand(argv, options = {}) {
|
|
|
191
192
|
headers: {
|
|
192
193
|
authorization: `Bearer ${env.KOSUKE_API_KEY}`,
|
|
193
194
|
'content-type': 'application/json',
|
|
195
|
+
[CLIENT_HEADER]: clientHeader,
|
|
194
196
|
},
|
|
195
197
|
body: JSON.stringify(marker),
|
|
196
198
|
signal: controller.signal,
|
|
@@ -6,7 +6,7 @@ export const operation = {
|
|
|
6
6
|
"push-devices",
|
|
7
7
|
"create"
|
|
8
8
|
],
|
|
9
|
-
"summary": "Register an iPhone or Apple Watch for push notifications with its hex APNs device token, the app bundle id it was issued to and its APNs environment. A token already registered moves to you. The Watch also sends its installationId and a generation it raises on every registration; one older than the registration already held for that installation answers 409. Both apps send their appVersion, which decides the notification categories they are sent. Called by the Sensei iOS and Watch apps; answers 204.",
|
|
9
|
+
"summary": "Register an iPhone or Apple Watch for push notifications with its hex APNs device token, the app bundle id it was issued to and its APNs environment. A token already registered moves to you. The Watch also sends its installationId and a generation it raises on every registration; one older than the registration already held for that installation answers 409. Both apps send their appVersion, which decides the notification categories they are sent, and may send their osVersion, model and build, kept on the device; one that does not read is left out, never refused. Called by the Sensei iOS and Watch apps; answers 204.",
|
|
10
10
|
"pathParams": [],
|
|
11
11
|
"query": [],
|
|
12
12
|
"body": {
|
|
@@ -66,6 +66,27 @@ export const operation = {
|
|
|
66
66
|
"flag": "app-version",
|
|
67
67
|
"kind": "string",
|
|
68
68
|
"required": false
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "osVersion",
|
|
72
|
+
"flag": "os-version",
|
|
73
|
+
"kind": "string",
|
|
74
|
+
"required": false,
|
|
75
|
+
"description": "The OS version, such as 18.1."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "model",
|
|
79
|
+
"flag": "model",
|
|
80
|
+
"kind": "string",
|
|
81
|
+
"required": false,
|
|
82
|
+
"description": "The machine identifier, such as iPhone16,2 or Watch7,1."
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "build",
|
|
86
|
+
"flag": "build",
|
|
87
|
+
"kind": "string",
|
|
88
|
+
"required": false,
|
|
89
|
+
"description": "The build's CFBundleVersion, such as 212."
|
|
69
90
|
}
|
|
70
91
|
],
|
|
71
92
|
"required": true
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { release } from 'node:os';
|
|
2
|
+
import { version } from './version.js';
|
|
3
|
+
/** The header every Kosuke client sends, so the platform knows which app, at which version, on which OS. */
|
|
4
|
+
export const CLIENT_HEADER = 'X-Kosuke-Client';
|
|
5
|
+
/** The arch tokens the platform reads as an arch when it is the only item after the OS. */
|
|
6
|
+
const KNOWN_ARCHES = new Set(['arm64', 'aarch64', 'x86_64', 'x64', 'ia32', 'arm']);
|
|
7
|
+
/** `value` kept to `allowed` characters (others become `_`) and `max` long; null when empty. */
|
|
8
|
+
function token(value, allowed, max) {
|
|
9
|
+
const kept = value.replace(allowed, '_').slice(0, max);
|
|
10
|
+
return kept ? kept : null;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* `cli/<version> (<platform> <osRelease>; <arch>)`, e.g. `cli/10.26.0 (darwin 24.1.0; arm64)`.
|
|
14
|
+
* Each part is reduced to the characters the platform accepts rather than sent raw; a part that
|
|
15
|
+
* is left empty is dropped, and an arch the platform would not read as one is left out.
|
|
16
|
+
*/
|
|
17
|
+
function clientHeaderValue(info) {
|
|
18
|
+
const product = `cli/${token(info.version, /[^0-9A-Za-z._-]/g, 64) ?? '0'}`;
|
|
19
|
+
// process.platform is letters and digits (`win32`).
|
|
20
|
+
const os = token(info.platform, /[^A-Za-z0-9]/g, 32);
|
|
21
|
+
if (!os)
|
|
22
|
+
return product;
|
|
23
|
+
const osVersion = token(info.osRelease, /[^0-9A-Za-z._-]/g, 32);
|
|
24
|
+
const arch = KNOWN_ARCHES.has(info.arch) ? info.arch : null;
|
|
25
|
+
const system = [osVersion ? `${os} ${osVersion}` : os, ...(arch ? [arch] : [])].join('; ');
|
|
26
|
+
return `${product} (${system})`;
|
|
27
|
+
}
|
|
28
|
+
/** This CLI's header value, on this machine. */
|
|
29
|
+
export const clientHeader = clientHeaderValue({
|
|
30
|
+
version,
|
|
31
|
+
platform: process.platform,
|
|
32
|
+
osRelease: release(),
|
|
33
|
+
arch: process.arch,
|
|
34
|
+
});
|
package/dist/runtime/client.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import createClient, {} from 'openapi-fetch';
|
|
2
|
+
import { CLIENT_HEADER, clientHeader } from './client-header.js';
|
|
2
3
|
import { version } from './version.js';
|
|
3
4
|
const MAX_ATTEMPTS = 3;
|
|
4
5
|
// A few hundred ms, growing: this sits in front of a human or agent waiting
|
|
@@ -202,6 +203,7 @@ export function createApiClient({ apiUrl, apiKey, fetch, answerTimeoutMs, }) {
|
|
|
202
203
|
headers: {
|
|
203
204
|
...(apiKey ? { Authorization: `Bearer ${apiKey}` } : {}),
|
|
204
205
|
'User-Agent': `@kosuke-ai/kosuke/${version}`,
|
|
206
|
+
[CLIENT_HEADER]: clientHeader,
|
|
205
207
|
},
|
|
206
208
|
fetch: withIntegrationCap(withTransportRetry(answerTimeoutMs === undefined ? base : withAnswerTimeout(base, answerTimeoutMs))),
|
|
207
209
|
});
|
package/openapi.json
CHANGED
|
@@ -815,6 +815,7 @@
|
|
|
815
815
|
"prReviewDecision",
|
|
816
816
|
"prApproved",
|
|
817
817
|
"prReviewersRequested",
|
|
818
|
+
"assigneeCardOpen",
|
|
818
819
|
"reviewersAsked",
|
|
819
820
|
"effort",
|
|
820
821
|
"stage",
|
|
@@ -23210,7 +23211,7 @@
|
|
|
23210
23211
|
"/api/push/devices": {
|
|
23211
23212
|
"post": {
|
|
23212
23213
|
"operationId": "userPushDevicesCreate",
|
|
23213
|
-
"summary": "Register an iPhone or Apple Watch for push notifications with its hex APNs device token, the app bundle id it was issued to and its APNs environment. A token already registered moves to you. The Watch also sends its installationId and a generation it raises on every registration; one older than the registration already held for that installation answers 409. Both apps send their appVersion, which decides the notification categories they are sent. Called by the Sensei iOS and Watch apps; answers 204.",
|
|
23214
|
+
"summary": "Register an iPhone or Apple Watch for push notifications with its hex APNs device token, the app bundle id it was issued to and its APNs environment. A token already registered moves to you. The Watch also sends its installationId and a generation it raises on every registration; one older than the registration already held for that installation answers 409. Both apps send their appVersion, which decides the notification categories they are sent, and may send their osVersion, model and build, kept on the device; one that does not read is left out, never refused. Called by the Sensei iOS and Watch apps; answers 204.",
|
|
23214
23215
|
"tags": ["user"],
|
|
23215
23216
|
"x-kosuke-command": ["user", "push-devices", "create"],
|
|
23216
23217
|
"x-kosuke-sandbox-token": true,
|
|
@@ -23259,6 +23260,27 @@
|
|
|
23259
23260
|
"appVersion": {
|
|
23260
23261
|
"type": "string",
|
|
23261
23262
|
"pattern": "^\\d{1,6}(\\.\\d{1,6}){0,3}$"
|
|
23263
|
+
},
|
|
23264
|
+
"osVersion": {
|
|
23265
|
+
"description": "The OS version, such as 18.1.",
|
|
23266
|
+
"type": "string",
|
|
23267
|
+
"minLength": 1,
|
|
23268
|
+
"maxLength": 32,
|
|
23269
|
+
"pattern": "^[0-9A-Za-z._-]+$"
|
|
23270
|
+
},
|
|
23271
|
+
"model": {
|
|
23272
|
+
"description": "The machine identifier, such as iPhone16,2 or Watch7,1.",
|
|
23273
|
+
"type": "string",
|
|
23274
|
+
"minLength": 1,
|
|
23275
|
+
"maxLength": 64,
|
|
23276
|
+
"pattern": "^[A-Za-z0-9,._-]+$"
|
|
23277
|
+
},
|
|
23278
|
+
"build": {
|
|
23279
|
+
"description": "The build's CFBundleVersion, such as 212.",
|
|
23280
|
+
"type": "string",
|
|
23281
|
+
"minLength": 1,
|
|
23282
|
+
"maxLength": 64,
|
|
23283
|
+
"pattern": "^[0-9A-Za-z._-]+$"
|
|
23262
23284
|
}
|
|
23263
23285
|
},
|
|
23264
23286
|
"required": ["token", "platform", "bundleId", "environment"]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kosuke-ai/kosuke",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.163",
|
|
4
4
|
"description": "Sensei platform CLI. The client customers install to drive app.kosuke.ai from their own machine.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"minimatch": "^11.0.1"
|
|
44
44
|
},
|
|
45
45
|
"kosukeRelease": {
|
|
46
|
-
"sourceCommit": "
|
|
47
|
-
"sourceIdentity": "
|
|
46
|
+
"sourceCommit": "70b604a5af1689f9b1b9449a3450f71f866fdc6c",
|
|
47
|
+
"sourceIdentity": "d3882849b9a240c19299f9599c40444af665bbb425aaa8177815f3e66037c223",
|
|
48
48
|
"fragments": [
|
|
49
|
-
"
|
|
49
|
+
"assignee-card-open-cli.json"
|
|
50
50
|
]
|
|
51
51
|
}
|
|
52
52
|
}
|