@kosuke-ai/kosuke 1.0.48 → 1.0.50

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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.50
4
+
5
+ - No change you will notice: internal code comments in the CLI were updated.
6
+ - Describe Device Requests as lasting the Turn that asked: a later Turn files a new request.
7
+
8
+ ## 1.0.49
9
+
10
+ - A message now takes up to 20 files instead of 10. The iOS photo picker lets you choose up to 20 photos at once, and the CLI's `--attach` accepts up to 20 files per request. Photos chosen in the iOS photo picker are no longer lost when the app wrongly decided the picker had not opened.
11
+
3
12
  ## 1.0.48
4
13
 
5
14
  - Command names from before the command grammar no longer run; `kosuke <group> --help` lists the current ones. The MCP server refuses the former toolsets too: a client that requests `deploy`, `members` or `personal-tasks` now gets HTTP 400 and must switch its configuration to `deploys`, `workspaces` or `tasks`. The `user` and `workspaces` toolsets no longer include the tools that moved to `crons`, `files`, `integrations`, `plugins`, `providers`, `sensei` and `skills`: request those toolsets instead.
@@ -297,6 +297,7 @@ function coverageLine(sessions) {
297
297
  : [];
298
298
  return `Workspaces covered: ${names.length ? names.join(', ') : 'none'}.`;
299
299
  }
300
+ /** @internal */
300
301
  export function planSummary(options) {
301
302
  const { sessions, apiUrl, now, workspace, peek = false } = options;
302
303
  const scope = workspace ? ` --workspace ${workspace}` : '';
@@ -338,7 +339,10 @@ export function planSummary(options) {
338
339
  scope,
339
340
  };
340
341
  }
341
- /** The whole digest, once `activity` answered the plan's `activityQuery`. */
342
+ /**
343
+ * The whole digest, once `activity` answered the plan's `activityQuery`.
344
+ * @internal
345
+ */
342
346
  export function renderSummary(plan, activity) {
343
347
  const lines = [...plan.head];
344
348
  // Every event the read returned is printed: without a peek, each is already marked seen.
@@ -90,4 +90,5 @@ export const HAND_WRITTEN = {
90
90
  workspace: true,
91
91
  },
92
92
  };
93
+ /** @internal */
93
94
  export const HAND_WRITTEN_COMMANDS = Object.values(HAND_WRITTEN);
@@ -48,7 +48,7 @@ export const operation = {
48
48
  }
49
49
  ],
50
50
  "attachments": {
51
- "maxFiles": 10,
51
+ "maxFiles": 20,
52
52
  "maxBytes": 10485760
53
53
  },
54
54
  "anonymous": false,
@@ -57,7 +57,7 @@ export const operation = {
57
57
  }
58
58
  ],
59
59
  "attachments": {
60
- "maxFiles": 10,
60
+ "maxFiles": 20,
61
61
  "maxBytes": 10485760
62
62
  },
63
63
  "anonymous": false,
@@ -6,7 +6,7 @@ export const operation = {
6
6
  "requests",
7
7
  "create"
8
8
  ],
9
- "summary": "From a Chat Session: ask to use a personal Mac from devices list, with the reason its owner reads on a card in this session's chat. A workspace device needs no request: it answers approved at once with grantId null, and no one is asked. The owner approves a personal Mac once per session: after that, asking again answers approved at once. Answers status pending or approved. Check devices list again for the answer; it expires after 30 minutes without an answer. While it is pending, go on with other work; when it is declined or expires, go on without it and say so. Once approved it stays approved for the rest of the session: pass --device-id on every mac command. One session at a time uses the device: on MAC_BUSY, wait with devices locks create, and run devices locks delete once done.",
9
+ "summary": "From a Chat Session: ask to use a personal Mac from devices list, with the reason its owner reads on a card in this session's chat. A workspace device needs no request: it answers approved at once with grantId null, and no one is asked. The owner approves a personal Mac for the Turn that asked: asking again in that Turn answers approved at once, and a later Turn asks again, with a new card for the owner. Answers status pending or approved. Check devices list again for the answer; it expires after 30 minutes without an answer, or when this Turn ends. While it is pending, go on with other work; when it is declined or expires, go on without it and say so. Once approved it lasts until this Turn ends: pass --device-id on every mac command; after that, mac commands on it are refused. One session at a time uses the device: on MAC_BUSY, wait with devices locks create, and run devices locks delete once done.",
10
10
  "pathParams": [
11
11
  "deviceId"
12
12
  ],
@@ -105,7 +105,7 @@ export const operation = {
105
105
  }
106
106
  ],
107
107
  "attachments": {
108
- "maxFiles": 10,
108
+ "maxFiles": 20,
109
109
  "maxBytes": 26214400
110
110
  },
111
111
  "anonymous": false,
@@ -84,7 +84,7 @@ export const operation = {
84
84
  }
85
85
  ],
86
86
  "attachments": {
87
- "maxFiles": 10,
87
+ "maxFiles": 20,
88
88
  "maxBytes": 26214400
89
89
  },
90
90
  "anonymous": false,
@@ -58,7 +58,7 @@ export const operation = {
58
58
  }
59
59
  ],
60
60
  "attachments": {
61
- "maxFiles": 10,
61
+ "maxFiles": 20,
62
62
  "maxBytes": 1048576
63
63
  },
64
64
  "anonymous": false,
@@ -6,7 +6,7 @@ export const operation = {
6
6
  "device-requests",
7
7
  "list"
8
8
  ],
9
- "summary": "List the Device Requests of a Chat Session, oldest first, as you would see them on its cards: id, device, kind, owner, reason, status (pending, approved, declined, expired, withdrawn or closed), who asked and who answered, when, canApprove, whether you may answer it, and occupiedBy, session or sensei when someone else uses the device while it is pending. A request past its 30 minutes reads expired.",
9
+ "summary": "List the Device Requests of a Chat Session, oldest first, as you would see them on its cards: id, device, kind, owner, reason, status (pending, approved, declined, expired, withdrawn or closed), who asked and who answered, when, canApprove, whether you may answer it, and occupiedBy, session or sensei when someone else uses the device while it is pending. A request past its 30 minutes reads expired, and so does a request or approval once the Turn that asked for it ended.",
10
10
  "pathParams": [],
11
11
  "query": [
12
12
  {
@@ -30,7 +30,7 @@ export const operation = {
30
30
  "flag": "decision",
31
31
  "kind": "string",
32
32
  "required": true,
33
- "description": "approve lets the session use the device until it ends; decline refuses it.",
33
+ "description": "approve lets the session use the device until the Turn that asked ends; decline refuses it.",
34
34
  "choices": [
35
35
  "approve",
36
36
  "decline"
@@ -240,7 +240,7 @@ export const operation = {
240
240
  }
241
241
  ],
242
242
  "attachments": {
243
- "maxFiles": 10,
243
+ "maxFiles": 20,
244
244
  "maxBytes": 10485760
245
245
  },
246
246
  "anonymous": false,
@@ -74,7 +74,7 @@ export const operation = {
74
74
  }
75
75
  ],
76
76
  "attachments": {
77
- "maxFiles": 10,
77
+ "maxFiles": 20,
78
78
  "maxBytes": 10485760
79
79
  },
80
80
  "anonymous": false,
@@ -49,7 +49,7 @@ export const operation = {
49
49
  }
50
50
  ],
51
51
  "attachments": {
52
- "maxFiles": 10,
52
+ "maxFiles": 20,
53
53
  "maxBytes": 10485760
54
54
  },
55
55
  "anonymous": false,
@@ -130,7 +130,7 @@ export const operation = {
130
130
  }
131
131
  ],
132
132
  "attachments": {
133
- "maxFiles": 10,
133
+ "maxFiles": 20,
134
134
  "maxBytes": 10485760
135
135
  },
136
136
  "anonymous": false,
@@ -284,7 +284,7 @@ export const operation = {
284
284
  }
285
285
  ],
286
286
  "attachments": {
287
- "maxFiles": 10,
287
+ "maxFiles": 20,
288
288
  "maxBytes": 10485760
289
289
  },
290
290
  "anonymous": false,
package/dist/program.js CHANGED
@@ -14,6 +14,7 @@ import { version } from './runtime/version.js';
14
14
  * The command tree: the commands `commands/hand-written.ts` lists by hand, everything else
15
15
  * from the generated descriptors, one leaf per command over its forms. Global flags are read
16
16
  * before any subcommand runs, so the runtime the subcommands share is built once, from them.
17
+ * @internal
17
18
  */
18
19
  export function createProgram(options = {}) {
19
20
  const program = new Command('kosuke')
@@ -5,6 +5,7 @@
5
5
  * decides which commands the tree shows.
6
6
  *
7
7
  * Imports nothing, so the generator can load it on plain node.
8
+ * @internal
8
9
  */
9
10
  export const AGENT_TOKENS = [
10
11
  // Wire contract with `src/lib/auth/sandbox-agent-token.ts`: a chat sandbox's own Turn.
@@ -21,7 +22,10 @@ export function agentTokenOf(key) {
21
22
  const found = AGENT_TOKENS.find(({ prefixes }) => prefixes.some((prefix) => key.startsWith(prefix)));
22
23
  return found?.token ?? null;
23
24
  }
24
- /** The descriptor value for the agent tokens the document grants an operation. */
25
+ /**
26
+ * The descriptor value for the agent tokens the document grants an operation.
27
+ * @internal
28
+ */
25
29
  export function agentReach(granted) {
26
30
  const tokens = AGENT_TOKENS.map(({ token }) => token).filter((token) => granted.includes(token));
27
31
  if (tokens.length === 0)
@@ -360,11 +360,17 @@ function jsonParser(raw) {
360
360
  function collect(value, previous) {
361
361
  return [...(previous ?? []), value];
362
362
  }
363
- /** commander stores `--exclude-archived` as `excludeArchived`. */
363
+ /**
364
+ * commander stores `--exclude-archived` as `excludeArchived`.
365
+ * @internal
366
+ */
364
367
  export function optionKey(flag) {
365
368
  return flag.replace(/-([a-z0-9])/g, (_, letter) => letter.toUpperCase());
366
369
  }
367
- /** `projectId` reads as `Project id`; `env-vars` as `Env vars`. */
370
+ /**
371
+ * `projectId` reads as `Project id`; `env-vars` as `Env vars`.
372
+ * @internal
373
+ */
368
374
  export function humanize(name) {
369
375
  const words = name
370
376
  .replace(/([a-z0-9])([A-Z])/g, '$1 $2')
package/openapi.json CHANGED
@@ -961,7 +961,7 @@
961
961
  "/api/devices/{deviceId}/requests": {
962
962
  "post": {
963
963
  "operationId": "devicesRequestsCreate",
964
- "summary": "From a Chat Session: ask to use a personal Mac from devices list, with the reason its owner reads on a card in this session's chat. A workspace device needs no request: it answers approved at once with grantId null, and no one is asked. The owner approves a personal Mac once per session: after that, asking again answers approved at once. Answers status pending or approved. Check devices list again for the answer; it expires after 30 minutes without an answer. While it is pending, go on with other work; when it is declined or expires, go on without it and say so. Once approved it stays approved for the rest of the session: pass --device-id on every mac command. One session at a time uses the device: on MAC_BUSY, wait with devices locks create, and run devices locks delete once done.",
964
+ "summary": "From a Chat Session: ask to use a personal Mac from devices list, with the reason its owner reads on a card in this session's chat. A workspace device needs no request: it answers approved at once with grantId null, and no one is asked. The owner approves a personal Mac for the Turn that asked: asking again in that Turn answers approved at once, and a later Turn asks again, with a new card for the owner. Answers status pending or approved. Check devices list again for the answer; it expires after 30 minutes without an answer, or when this Turn ends. While it is pending, go on with other work; when it is declined or expires, go on without it and say so. Once approved it lasts until this Turn ends: pass --device-id on every mac command; after that, mac commands on it are refused. One session at a time uses the device: on MAC_BUSY, wait with devices locks create, and run devices locks delete once done.",
965
965
  "tags": ["devices"],
966
966
  "x-kosuke-command": ["devices", "requests", "create"],
967
967
  "x-kosuke-sandbox-token": true,
@@ -6056,7 +6056,7 @@
6056
6056
  "tags": ["files"],
6057
6057
  "x-kosuke-command": ["files", "set"],
6058
6058
  "x-kosuke-attachments": true,
6059
- "x-kosuke-attachment-max-files": 10,
6059
+ "x-kosuke-attachment-max-files": 20,
6060
6060
  "x-kosuke-attachment-max-bytes": 26214400,
6061
6061
  "x-kosuke-sandbox-token": true,
6062
6062
  "x-kosuke-cron-token": true,
@@ -8358,7 +8358,7 @@
8358
8358
  "tags": ["tasks"],
8359
8359
  "x-kosuke-command": ["tasks", "create"],
8360
8360
  "x-kosuke-attachments": true,
8361
- "x-kosuke-attachment-max-files": 10,
8361
+ "x-kosuke-attachment-max-files": 20,
8362
8362
  "x-kosuke-attachment-max-bytes": 10485760,
8363
8363
  "x-kosuke-sandbox-token": true,
8364
8364
  "x-kosuke-cron-token": true,
@@ -11314,7 +11314,7 @@
11314
11314
  "tags": ["sessions"],
11315
11315
  "x-kosuke-command": ["sessions", "create"],
11316
11316
  "x-kosuke-attachments": true,
11317
- "x-kosuke-attachment-max-files": 10,
11317
+ "x-kosuke-attachment-max-files": 20,
11318
11318
  "x-kosuke-attachment-max-bytes": 10485760,
11319
11319
  "x-kosuke-sandbox-token": true,
11320
11320
  "x-kosuke-cron-token": true,
@@ -12639,7 +12639,7 @@
12639
12639
  "tags": ["sessions"],
12640
12640
  "x-kosuke-command": ["sessions", "send"],
12641
12641
  "x-kosuke-attachments": true,
12642
- "x-kosuke-attachment-max-files": 10,
12642
+ "x-kosuke-attachment-max-files": 20,
12643
12643
  "x-kosuke-attachment-max-bytes": 10485760,
12644
12644
  "x-kosuke-sandbox-token": true,
12645
12645
  "x-kosuke-cron-token": true,
@@ -14430,7 +14430,7 @@
14430
14430
  "tags": ["sessions"],
14431
14431
  "x-kosuke-command": ["sessions", "prompt", "update"],
14432
14432
  "x-kosuke-attachments": true,
14433
- "x-kosuke-attachment-max-files": 10,
14433
+ "x-kosuke-attachment-max-files": 20,
14434
14434
  "x-kosuke-attachment-max-bytes": 10485760,
14435
14435
  "x-kosuke-sandbox-token": true,
14436
14436
  "x-kosuke-cron-token": true,
@@ -15646,7 +15646,7 @@
15646
15646
  "tags": ["sessions"],
15647
15647
  "x-kosuke-command": ["sessions", "queue", "update"],
15648
15648
  "x-kosuke-attachments": true,
15649
- "x-kosuke-attachment-max-files": 10,
15649
+ "x-kosuke-attachment-max-files": 20,
15650
15650
  "x-kosuke-attachment-max-bytes": 10485760,
15651
15651
  "x-kosuke-sandbox-token": true,
15652
15652
  "x-kosuke-cron-token": true,
@@ -18452,7 +18452,7 @@
18452
18452
  "tags": ["deploys"],
18453
18453
  "x-kosuke-command": ["deploys", "start"],
18454
18454
  "x-kosuke-attachments": true,
18455
- "x-kosuke-attachment-max-files": 10,
18455
+ "x-kosuke-attachment-max-files": 20,
18456
18456
  "x-kosuke-attachment-max-bytes": 10485760,
18457
18457
  "x-kosuke-sandbox-token": true,
18458
18458
  "x-kosuke-cron-token": true,
@@ -18739,7 +18739,7 @@
18739
18739
  "tags": ["deploys"],
18740
18740
  "x-kosuke-command": ["deploys", "queue", "update"],
18741
18741
  "x-kosuke-attachments": true,
18742
- "x-kosuke-attachment-max-files": 10,
18742
+ "x-kosuke-attachment-max-files": 20,
18743
18743
  "x-kosuke-attachment-max-bytes": 10485760,
18744
18744
  "x-kosuke-sandbox-token": true,
18745
18745
  "x-kosuke-cron-token": true,
@@ -20441,7 +20441,7 @@
20441
20441
  "tags": ["prototypes"],
20442
20442
  "x-kosuke-command": ["prototypes", "create"],
20443
20443
  "x-kosuke-attachments": true,
20444
- "x-kosuke-attachment-max-files": 10,
20444
+ "x-kosuke-attachment-max-files": 20,
20445
20445
  "x-kosuke-attachment-max-bytes": 1048576,
20446
20446
  "x-kosuke-sandbox-token": true,
20447
20447
  "x-kosuke-sensei-token": true,
@@ -23314,7 +23314,7 @@
23314
23314
  "/api/sensei/device-requests": {
23315
23315
  "get": {
23316
23316
  "operationId": "senseiDeviceRequestsList",
23317
- "summary": "List the Device Requests of a Chat Session, oldest first, as you would see them on its cards: id, device, kind, owner, reason, status (pending, approved, declined, expired, withdrawn or closed), who asked and who answered, when, canApprove, whether you may answer it, and occupiedBy, session or sensei when someone else uses the device while it is pending. A request past its 30 minutes reads expired.",
23317
+ "summary": "List the Device Requests of a Chat Session, oldest first, as you would see them on its cards: id, device, kind, owner, reason, status (pending, approved, declined, expired, withdrawn or closed), who asked and who answered, when, canApprove, whether you may answer it, and occupiedBy, session or sensei when someone else uses the device while it is pending. A request past its 30 minutes reads expired, and so does a request or approval once the Turn that asked for it ended.",
23318
23318
  "tags": ["sensei"],
23319
23319
  "x-kosuke-command": ["sensei", "device-requests", "list"],
23320
23320
  "x-kosuke-sandbox-token": true,
@@ -23397,7 +23397,7 @@
23397
23397
  "decision": {
23398
23398
  "type": "string",
23399
23399
  "enum": ["approve", "decline"],
23400
- "description": "approve lets the session use the device until it ends; decline refuses it."
23400
+ "description": "approve lets the session use the device until the Turn that asked ends; decline refuses it."
23401
23401
  }
23402
23402
  },
23403
23403
  "required": ["sessionId", "requestId", "decision"]
@@ -26614,7 +26614,7 @@
26614
26614
  "scope": "personal"
26615
26615
  },
26616
26616
  "x-kosuke-attachments": true,
26617
- "x-kosuke-attachment-max-files": 10,
26617
+ "x-kosuke-attachment-max-files": 20,
26618
26618
  "x-kosuke-attachment-max-bytes": 26214400,
26619
26619
  "x-kosuke-sandbox-token": true,
26620
26620
  "x-kosuke-cron-token": true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kosuke-ai/kosuke",
3
- "version": "1.0.48",
3
+ "version": "1.0.50",
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,13 +40,11 @@
40
40
  "vitest": "^4.1.12"
41
41
  },
42
42
  "kosukeRelease": {
43
- "sourceCommit": "f75c0ef51a675f14fa5bcc79de7d275f7084b580",
44
- "sourceIdentity": "f07745a38e5f377026b443e17377c207475f86d04bec95ddce5886fb7adc9ffd",
43
+ "sourceCommit": "783c56f80b3c75df5f129ad9ef32d5f2cf0e7a92",
44
+ "sourceIdentity": "97a8761f0d47f9900bc37d7da2fb71dd14fc32222a97ec5d248c32986cd63bcd",
45
45
  "fragments": [
46
- "command-grammar-aliases-removed-mlwinm.json",
47
- "sensei-threads-create-puzuue.json",
48
- "session-env-sync-bk2sgu.json",
49
- "skill-marker-result-help-pkivi6.json"
46
+ "cli-internal-marks-3q4y00.json",
47
+ "device-approval-per-turn-23f44b.json"
50
48
  ]
51
49
  }
52
50
  }