@kosuke-ai/kosuke 1.0.83 → 1.0.84

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,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.84
4
+
5
+ - `kosuke sensei cards set` takes a `model` on a ticket or Start card: the model the member named for the task, which the card shows and the task is filed on.
6
+ - Document that Kosuke sets a digest row's count of older unread messages when a card is written.
7
+ - kosuke user settings update takes --system-cron and --system-cron-on to turn a system cron on or off for you, and kosuke user settings get lists each one.
8
+ - `kosuke sensei threads notes send` sends a short note from a Sensei Turn to another thread of the same member, and `kosuke sensei threads notes get` reads where it stands.
9
+ - `kosuke sessions update` takes `"model": null` in a `--body` for a Backlog session: it clears the session's own model, so it starts on its Assignee's Default Model.
10
+
3
11
  ## 1.0.83
4
12
 
5
13
  - Sensei free runs on one fixed Free model. Free model labels and API descriptions no longer call it Auto.
@@ -230,115 +230,117 @@ import { operation as o228 } from './sensei/threads-create.js';
230
230
  import { operation as o229 } from './sensei/threads-get.js';
231
231
  import { operation as o230 } from './sensei/threads-list.js';
232
232
  import { operation as o231 } from './sensei/threads-move.js';
233
- import { operation as o232 } from './sensei/threads-split.js';
234
- import { operation as o233 } from './sensei/tickets-merge.js';
235
- import { operation as o234 } from './sensei/watch-reads-finish.js';
236
- import { operation as o235 } from './sensei/widgets-get.js';
237
- import { operation as o236 } from './sensei/writing-get.js';
238
- import { operation as o237 } from './sensei/writing-set.js';
239
- import { operation as o238 } from './sensei/writing-samples-create.js';
240
- import { operation as o239 } from './sessions/app-stack-start.js';
241
- import { operation as o240 } from './sessions/artifacts-create.js';
242
- import { operation as o241 } from './sessions/artifacts-get.js';
243
- import { operation as o242 } from './sessions/artifacts-list.js';
244
- import { operation as o243 } from './sessions/create.js';
245
- import { operation as o244 } from './sessions/delete.js';
246
- import { operation as o245 } from './sessions/desktop-control-set.js';
247
- import { operation as o246 } from './sessions/desktop-get.js';
248
- import { operation as o247 } from './sessions/desktop-start.js';
249
- import { operation as o248 } from './sessions/diff-comments-create.js';
250
- import { operation as o249 } from './sessions/diff-comments-delete.js';
251
- import { operation as o250 } from './sessions/diff-comments-list.js';
252
- import { operation as o251 } from './sessions/diff-comments-update.js';
253
- import { operation as o252 } from './sessions/diff-commits-list.js';
254
- import { operation as o253 } from './sessions/diff-files-list.js';
255
- import { operation as o254 } from './sessions/diff-patch-get.js';
256
- import { operation as o255 } from './sessions/env-sync.js';
257
- import { operation as o256 } from './sessions/files-get.js';
258
- import { operation as o257 } from './sessions/files-list.js';
259
- import { operation as o258 } from './sessions/files-set.js';
260
- import { operation as o259 } from './sessions/get.js';
261
- import { operation as o260 } from './sessions/git-state-get.js';
262
- import { operation as o261 } from './sessions/go-ahead-delete.js';
263
- import { operation as o262 } from './sessions/go-ahead-set.js';
264
- import { operation as o263 } from './sessions/jobs-cancel.js';
265
- import { operation as o264 } from './sessions/jobs-get.js';
266
- import { operation as o265 } from './sessions/jobs-list.js';
267
- import { operation as o266 } from './sessions/labels-set.js';
268
- import { operation as o267 } from './sessions/labels-update.js';
269
- import { operation as o268 } from './sessions/list.js';
270
- import { operation as o269 } from './sessions/list--all.js';
271
- import { operation as o270 } from './sessions/mark-read.js';
272
- import { operation as o271 } from './sessions/messages-get.js';
273
- import { operation as o272 } from './sessions/messages-list.js';
274
- import { operation as o273 } from './sessions/prompt-update.js';
275
- import { operation as o274 } from './sessions/qa-runs-finish.js';
276
- import { operation as o275 } from './sessions/qa-runs-fixes-create.js';
277
- import { operation as o276 } from './sessions/qa-runs-get.js';
278
- import { operation as o277 } from './sessions/qa-runs-results-create.js';
279
- import { operation as o278 } from './sessions/qa-runs-start.js';
280
- import { operation as o279 } from './sessions/qa-runs-stop.js';
281
- import { operation as o280 } from './sessions/qa-set.js';
282
- import { operation as o281 } from './sessions/queue-delete.js';
283
- import { operation as o282 } from './sessions/queue-list.js';
284
- import { operation as o283 } from './sessions/queue-move.js';
285
- import { operation as o284 } from './sessions/queue-resume.js';
286
- import { operation as o285 } from './sessions/queue-send.js';
287
- import { operation as o286 } from './sessions/queue-steer.js';
288
- import { operation as o287 } from './sessions/queue-update.js';
289
- import { operation as o288 } from './sessions/review-set.js';
290
- import { operation as o289 } from './sessions/runtime-commands-run.js';
291
- import { operation as o290 } from './sessions/search.js';
292
- import { operation as o291 } from './sessions/send.js';
293
- import { operation as o292 } from './sessions/start.js';
294
- import { operation as o293 } from './sessions/steer.js';
295
- import { operation as o294 } from './sessions/update.js';
296
- import { operation as o295 } from './skills/create.js';
297
- import { operation as o296 } from './skills/create--personal.js';
298
- import { operation as o297 } from './skills/delete.js';
299
- import { operation as o298 } from './skills/delete--personal.js';
300
- import { operation as o299 } from './skills/get.js';
301
- import { operation as o300 } from './skills/get--personal.js';
302
- import { operation as o301 } from './skills/list.js';
303
- import { operation as o302 } from './skills/list--personal.js';
304
- import { operation as o303 } from './skills/update.js';
305
- import { operation as o304 } from './skills/update--personal.js';
306
- import { operation as o305 } from './tasks/create.js';
307
- import { operation as o306 } from './tasks/create--personal.js';
308
- import { operation as o307 } from './tasks/delete.js';
309
- import { operation as o308 } from './tasks/delete--personal.js';
310
- import { operation as o309 } from './tasks/get.js';
311
- import { operation as o310 } from './tasks/get--personal.js';
312
- import { operation as o311 } from './tasks/labels-list.js';
313
- import { operation as o312 } from './tasks/list.js';
314
- import { operation as o313 } from './tasks/list--all.js';
315
- import { operation as o314 } from './tasks/list--personal.js';
316
- import { operation as o315 } from './tasks/move.js';
317
- import { operation as o316 } from './tasks/move--personal.js';
318
- import { operation as o317 } from './tasks/project-set.js';
319
- import { operation as o318 } from './tasks/start.js';
320
- import { operation as o319 } from './tasks/start--personal.js';
321
- import { operation as o320 } from './tasks/update.js';
322
- import { operation as o321 } from './tasks/update--personal.js';
323
- import { operation as o322 } from './user/api-keys-delete.js';
324
- import { operation as o323 } from './user/personal-space-get.js';
325
- import { operation as o324 } from './user/profile-get.js';
326
- import { operation as o325 } from './user/push-devices-create.js';
327
- import { operation as o326 } from './user/push-devices-delete.js';
328
- import { operation as o327 } from './user/settings-get.js';
329
- import { operation as o328 } from './user/settings-update.js';
330
- import { operation as o329 } from './user/usage-get.js';
331
- import { operation as o330 } from './workspaces/artifacts-search.js';
332
- import { operation as o331 } from './workspaces/credits-get.js';
333
- import { operation as o332 } from './workspaces/get.js';
334
- import { operation as o333 } from './workspaces/list.js';
335
- import { operation as o334 } from './workspaces/members-list.js';
336
- import { operation as o335 } from './workspaces/members-list--all.js';
337
- import { operation as o336 } from './workspaces/sandbox-limit-get.js';
338
- import { operation as o337 } from './workspaces/sandboxes-stop.js';
339
- import { operation as o338 } from './workspaces/timezone-set.js';
340
- import { operation as o339 } from './workspaces/usage-breakdown-get.js';
341
- import { operation as o340 } from './workspaces/usage-get.js';
233
+ import { operation as o232 } from './sensei/threads-notes-get.js';
234
+ import { operation as o233 } from './sensei/threads-notes-send.js';
235
+ import { operation as o234 } from './sensei/threads-split.js';
236
+ import { operation as o235 } from './sensei/tickets-merge.js';
237
+ import { operation as o236 } from './sensei/watch-reads-finish.js';
238
+ import { operation as o237 } from './sensei/widgets-get.js';
239
+ import { operation as o238 } from './sensei/writing-get.js';
240
+ import { operation as o239 } from './sensei/writing-set.js';
241
+ import { operation as o240 } from './sensei/writing-samples-create.js';
242
+ import { operation as o241 } from './sessions/app-stack-start.js';
243
+ import { operation as o242 } from './sessions/artifacts-create.js';
244
+ import { operation as o243 } from './sessions/artifacts-get.js';
245
+ import { operation as o244 } from './sessions/artifacts-list.js';
246
+ import { operation as o245 } from './sessions/create.js';
247
+ import { operation as o246 } from './sessions/delete.js';
248
+ import { operation as o247 } from './sessions/desktop-control-set.js';
249
+ import { operation as o248 } from './sessions/desktop-get.js';
250
+ import { operation as o249 } from './sessions/desktop-start.js';
251
+ import { operation as o250 } from './sessions/diff-comments-create.js';
252
+ import { operation as o251 } from './sessions/diff-comments-delete.js';
253
+ import { operation as o252 } from './sessions/diff-comments-list.js';
254
+ import { operation as o253 } from './sessions/diff-comments-update.js';
255
+ import { operation as o254 } from './sessions/diff-commits-list.js';
256
+ import { operation as o255 } from './sessions/diff-files-list.js';
257
+ import { operation as o256 } from './sessions/diff-patch-get.js';
258
+ import { operation as o257 } from './sessions/env-sync.js';
259
+ import { operation as o258 } from './sessions/files-get.js';
260
+ import { operation as o259 } from './sessions/files-list.js';
261
+ import { operation as o260 } from './sessions/files-set.js';
262
+ import { operation as o261 } from './sessions/get.js';
263
+ import { operation as o262 } from './sessions/git-state-get.js';
264
+ import { operation as o263 } from './sessions/go-ahead-delete.js';
265
+ import { operation as o264 } from './sessions/go-ahead-set.js';
266
+ import { operation as o265 } from './sessions/jobs-cancel.js';
267
+ import { operation as o266 } from './sessions/jobs-get.js';
268
+ import { operation as o267 } from './sessions/jobs-list.js';
269
+ import { operation as o268 } from './sessions/labels-set.js';
270
+ import { operation as o269 } from './sessions/labels-update.js';
271
+ import { operation as o270 } from './sessions/list.js';
272
+ import { operation as o271 } from './sessions/list--all.js';
273
+ import { operation as o272 } from './sessions/mark-read.js';
274
+ import { operation as o273 } from './sessions/messages-get.js';
275
+ import { operation as o274 } from './sessions/messages-list.js';
276
+ import { operation as o275 } from './sessions/prompt-update.js';
277
+ import { operation as o276 } from './sessions/qa-runs-finish.js';
278
+ import { operation as o277 } from './sessions/qa-runs-fixes-create.js';
279
+ import { operation as o278 } from './sessions/qa-runs-get.js';
280
+ import { operation as o279 } from './sessions/qa-runs-results-create.js';
281
+ import { operation as o280 } from './sessions/qa-runs-start.js';
282
+ import { operation as o281 } from './sessions/qa-runs-stop.js';
283
+ import { operation as o282 } from './sessions/qa-set.js';
284
+ import { operation as o283 } from './sessions/queue-delete.js';
285
+ import { operation as o284 } from './sessions/queue-list.js';
286
+ import { operation as o285 } from './sessions/queue-move.js';
287
+ import { operation as o286 } from './sessions/queue-resume.js';
288
+ import { operation as o287 } from './sessions/queue-send.js';
289
+ import { operation as o288 } from './sessions/queue-steer.js';
290
+ import { operation as o289 } from './sessions/queue-update.js';
291
+ import { operation as o290 } from './sessions/review-set.js';
292
+ import { operation as o291 } from './sessions/runtime-commands-run.js';
293
+ import { operation as o292 } from './sessions/search.js';
294
+ import { operation as o293 } from './sessions/send.js';
295
+ import { operation as o294 } from './sessions/start.js';
296
+ import { operation as o295 } from './sessions/steer.js';
297
+ import { operation as o296 } from './sessions/update.js';
298
+ import { operation as o297 } from './skills/create.js';
299
+ import { operation as o298 } from './skills/create--personal.js';
300
+ import { operation as o299 } from './skills/delete.js';
301
+ import { operation as o300 } from './skills/delete--personal.js';
302
+ import { operation as o301 } from './skills/get.js';
303
+ import { operation as o302 } from './skills/get--personal.js';
304
+ import { operation as o303 } from './skills/list.js';
305
+ import { operation as o304 } from './skills/list--personal.js';
306
+ import { operation as o305 } from './skills/update.js';
307
+ import { operation as o306 } from './skills/update--personal.js';
308
+ import { operation as o307 } from './tasks/create.js';
309
+ import { operation as o308 } from './tasks/create--personal.js';
310
+ import { operation as o309 } from './tasks/delete.js';
311
+ import { operation as o310 } from './tasks/delete--personal.js';
312
+ import { operation as o311 } from './tasks/get.js';
313
+ import { operation as o312 } from './tasks/get--personal.js';
314
+ import { operation as o313 } from './tasks/labels-list.js';
315
+ import { operation as o314 } from './tasks/list.js';
316
+ import { operation as o315 } from './tasks/list--all.js';
317
+ import { operation as o316 } from './tasks/list--personal.js';
318
+ import { operation as o317 } from './tasks/move.js';
319
+ import { operation as o318 } from './tasks/move--personal.js';
320
+ import { operation as o319 } from './tasks/project-set.js';
321
+ import { operation as o320 } from './tasks/start.js';
322
+ import { operation as o321 } from './tasks/start--personal.js';
323
+ import { operation as o322 } from './tasks/update.js';
324
+ import { operation as o323 } from './tasks/update--personal.js';
325
+ import { operation as o324 } from './user/api-keys-delete.js';
326
+ import { operation as o325 } from './user/personal-space-get.js';
327
+ import { operation as o326 } from './user/profile-get.js';
328
+ import { operation as o327 } from './user/push-devices-create.js';
329
+ import { operation as o328 } from './user/push-devices-delete.js';
330
+ import { operation as o329 } from './user/settings-get.js';
331
+ import { operation as o330 } from './user/settings-update.js';
332
+ import { operation as o331 } from './user/usage-get.js';
333
+ import { operation as o332 } from './workspaces/artifacts-search.js';
334
+ import { operation as o333 } from './workspaces/credits-get.js';
335
+ import { operation as o334 } from './workspaces/get.js';
336
+ import { operation as o335 } from './workspaces/list.js';
337
+ import { operation as o336 } from './workspaces/members-list.js';
338
+ import { operation as o337 } from './workspaces/members-list--all.js';
339
+ import { operation as o338 } from './workspaces/sandbox-limit-get.js';
340
+ import { operation as o339 } from './workspaces/sandboxes-stop.js';
341
+ import { operation as o340 } from './workspaces/timezone-set.js';
342
+ import { operation as o341 } from './workspaces/usage-breakdown-get.js';
343
+ import { operation as o342 } from './workspaces/usage-get.js';
342
344
  export const operations = [
343
345
  o0,
344
346
  o1,
@@ -681,4 +683,6 @@ export const operations = [
681
683
  o338,
682
684
  o339,
683
685
  o340,
686
+ o341,
687
+ o342,
684
688
  ];
@@ -6,7 +6,7 @@ export const operation = {
6
6
  "cards",
7
7
  "set"
8
8
  ],
9
- "summary": "Open a card in your Turn's own thread, or update its open card with that key by passing the revision you read. Refused when the card moved, closed or is being sent, when your Turn stopped, when the session now lives in another thread (SESSION_MOVED), when the card has no primary (PRIMARY_REQUIRED: give it a verb, \"Ok\" when nothing follows), or when an id it names is not in the member's reach. The answer's warnings name what a written card misses (QA_REPORT_MISSING: a ready-, merge- or review- card with no qa_report block).",
9
+ "summary": "Open a card in your Turn's thread, or update the open card with that key at the revision you read. Refused when the card moved, closed or is being sent, when your Turn stopped, when the session now lives in another thread (SESSION_MOVED), when the card has no primary (PRIMARY_REQUIRED: give it a verb, \"Ok\" when nothing follows), or when an id it names is not in the member's reach. The answer's warnings name what a written card misses (QA_REPORT_MISSING: a ready-, merge- or review- card with no qa_report block).",
10
10
  "pathParams": [],
11
11
  "query": [],
12
12
  "body": {
@@ -43,7 +43,7 @@ export const operation = {
43
43
  "{type: \"links\", items: {label: string, href: string}[] (max 8)}",
44
44
  "{type: \"evidence\", artifacts?: ({sessionId: string, slug: string, caption?: string} | {cronId: string, runId: string, slug: string, caption?: string} | {fileId: string, version: integer, caption?: string})[] (max 2), rows: {state: \"passed\"|\"failed\"|\"waiting\"|\"info\", eventId?: string, label: string, result: string, media?: {eventId: string, parts: integer[] (max 10)}, open?: boolean, details?: {state: \"passed\"|\"failed\"|\"waiting\"|\"info\", name: string, note?: string, href?: string}[] (max 30)}[] (max 12)}",
45
45
  "{type: \"changes\", title: string, items: {change: \"removed\"|\"added\"|\"kept\", text: string}[] (max 20)}",
46
- "{type: \"messages\", caption?: string, rows: {network: \"gmail\"|\"slack\"|\"telegram\"|\"whatsapp\"|\"linkedin\"|\"x\", sender: string, subject: string, count: integer, at: string, link?: string, connection?: string, conversation?: string}[] (max 12), older?: {conversations: integer, messages: integer}}",
46
+ "{type: \"messages\", caption?: string, rows: {network: \"gmail\"|\"slack\"|\"telegram\"|\"whatsapp\"|\"linkedin\"|\"x\", sender: string, subject: string, count: integer, olderUnread?: integer, at: string, link?: string, connection?: string, conversation?: string}[] (max 12), older?: {conversations: integer, messages: integer}}",
47
47
  "{type: \"person\", heading?: string, name: string, line?: string}",
48
48
  "{type: \"image\", sessionId?: string, cronId?: string, runId?: string, fileId?: string, version?: integer, slug?: string, caption?: string, heading?: string}",
49
49
  "{type: \"event\", title?: string, start: string, end?: string, timeZone?: string, notes?: {state: \"passed\"|\"failed\"|\"waiting\"|\"info\", text: string}[] (max 4)}",
@@ -139,6 +139,12 @@ export const operation = {
139
139
  "guide"
140
140
  ]
141
141
  },
142
+ {
143
+ "name": "model",
144
+ "flag": "model",
145
+ "kind": "string",
146
+ "required": false
147
+ },
142
148
  {
143
149
  "name": "proposedBy",
144
150
  "flag": "proposed-by",
@@ -0,0 +1,22 @@
1
+ export const operation = {
2
+ "method": "get",
3
+ "path": "/api/sensei/thread-notes/{noteId}",
4
+ "command": [
5
+ "sensei",
6
+ "threads",
7
+ "notes",
8
+ "get"
9
+ ],
10
+ "summary": "Read one note your Sensei sent to another of your threads and where it stands: `waiting` until that thread's Sensei reads it, `delivered` with deliveredAt, `failed` when its Turns kept failing on it, or `refused` with why (`too_many`, `too_deep`).",
11
+ "pathParams": [
12
+ "noteId"
13
+ ],
14
+ "query": [],
15
+ "body": null,
16
+ "multipart": null,
17
+ "attachments": false,
18
+ "anonymous": false,
19
+ "agents": [
20
+ "senseiToken"
21
+ ]
22
+ };
@@ -0,0 +1,38 @@
1
+ export const operation = {
2
+ "method": "post",
3
+ "path": "/api/sensei/thread-notes",
4
+ "command": [
5
+ "sensei",
6
+ "threads",
7
+ "notes",
8
+ "send"
9
+ ],
10
+ "summary": "Send a short note from this Turn's thread to another of your member's threads. That thread reads it on its next Turn, or wakes for it, even when it is marked done. Sensei's reply there stays hidden, and a note grants nothing there. The same words to the same thread in one Turn send once. Answers noteId and status, `waiting` until that thread's Sensei read it: read it again with `kosuke sensei threads notes get`. Refused with THREAD_NOTE_TOO_MANY past 5 notes an hour between two threads or 30 an hour for the member, and with THREAD_NOTE_TOO_DEEP past a chain of 3 notes that led to each other: nothing reached that thread, the member sees why, and the refusal is final. Pass the body with --body or --body-file.",
11
+ "pathParams": [],
12
+ "query": [],
13
+ "body": {
14
+ "fields": [
15
+ {
16
+ "name": "toThreadId",
17
+ "flag": "to",
18
+ "kind": "string",
19
+ "required": true,
20
+ "description": "The thread that reads the note: an id from `kosuke sensei threads list`."
21
+ },
22
+ {
23
+ "name": "text",
24
+ "flag": "text",
25
+ "kind": "string",
26
+ "required": true,
27
+ "description": "The note, in words the other thread can use with no other context."
28
+ }
29
+ ],
30
+ "required": true
31
+ },
32
+ "multipart": null,
33
+ "attachments": false,
34
+ "anonymous": false,
35
+ "agents": [
36
+ "senseiToken"
37
+ ]
38
+ };
@@ -42,7 +42,8 @@ export const operation = {
42
42
  "name": "model",
43
43
  "flag": "model",
44
44
  "kind": "string",
45
- "required": false
45
+ "required": false,
46
+ "description": "A model. In a JSON body, null clears a Backlog session's own model, so it starts on its Assignee's Default Model; a started session refuses it."
46
47
  },
47
48
  {
48
49
  "name": "kosukeFree",
@@ -6,7 +6,7 @@ export const operation = {
6
6
  "settings",
7
7
  "get"
8
8
  ],
9
- "summary": "Read your stored timezone and its source (auto follows your device, manual is pinned), and the zone Kosuke resolves for you with where it came from.",
9
+ "summary": "Read your stored timezone and its source (auto follows your device, manual is pinned), the zone Kosuke resolves for you with where it came from, and whether each system cron is on for you.",
10
10
  "pathParams": [],
11
11
  "query": [],
12
12
  "body": null,
@@ -6,7 +6,7 @@ export const operation = {
6
6
  "settings",
7
7
  "update"
8
8
  ],
9
- "summary": "Set your timezone, an IANA name such as Europe/Rome; an unknown or offset-only zone is refused. timeZone without timeZoneSource pins it (manual). timeZoneSource alone keeps the stored zone; manual with none stored is refused.",
9
+ "summary": "Set your timezone, an IANA name such as Europe/Rome; an unknown or offset-only zone is refused. timeZone without timeZoneSource pins it (manual). timeZoneSource alone keeps the stored zone; manual with none stored is refused. systemCron with systemCronOn turns that system cron on or off for you: off starts no new run, and keeps its thread, cards and files.",
10
10
  "pathParams": [],
11
11
  "query": [],
12
12
  "body": {
@@ -26,6 +26,23 @@ export const operation = {
26
26
  "auto",
27
27
  "manual"
28
28
  ]
29
+ },
30
+ {
31
+ "name": "systemCron",
32
+ "flag": "system-cron",
33
+ "kind": "string",
34
+ "required": false,
35
+ "choices": [
36
+ "writing-style",
37
+ "pulse",
38
+ "crons-suggestion"
39
+ ]
40
+ },
41
+ {
42
+ "name": "systemCronOn",
43
+ "flag": "system-cron-on",
44
+ "kind": "boolean",
45
+ "required": false
29
46
  }
30
47
  ],
31
48
  "required": true
@@ -238,6 +238,18 @@ function clarificationQuestions(block) {
238
238
  const fallback = str(block.content)?.trim();
239
239
  return fallback ? [fallback] : [];
240
240
  }
241
+ /** A note this thread sent or got, with the other thread and where a sent one stands. */
242
+ function noteLine(note) {
243
+ if (!isRecord(note))
244
+ return undefined;
245
+ const words = str(note.text);
246
+ if (!words)
247
+ return undefined;
248
+ const other = `"${str(note.title) ?? ''}" (thread ${str(note.threadId) ?? ''})`;
249
+ return note.side === 'from'
250
+ ? `note from ${other}: ${words}`
251
+ : `note ${str(note.noteId) ?? ''} to ${other}, ${str(note.status) ?? ''}: ${words}`;
252
+ }
241
253
  /** One row as an agent reads it, or undefined for a row that carries no words. */
242
254
  function messageView(row, context) {
243
255
  const blocks = records(row.blocks);
@@ -291,6 +303,9 @@ function messageView(row, context) {
291
303
  }
292
304
  }
293
305
  const metadata = isRecord(row.metadata) ? row.metadata : undefined;
306
+ const threadNote = noteLine(metadata?.threadNote);
307
+ if (threadNote)
308
+ notes.push(threadNote);
294
309
  // An as-drawn Approve row shows the card's short words in place of its instruction.
295
310
  const content = str(metadata?.cardRequest) ?? str(row.content);
296
311
  const text = content?.trim() ? content : texts.join('\n\n');
package/openapi.json CHANGED
@@ -11792,8 +11792,16 @@
11792
11792
  "enum": ["backlog", "active", "under-review", "archived", "completed"]
11793
11793
  },
11794
11794
  "model": {
11795
- "type": "string",
11796
- "minLength": 1
11795
+ "description": "A model. In a JSON body, null clears a Backlog session's own model, so it starts on its Assignee's Default Model; a started session refuses it.",
11796
+ "anyOf": [
11797
+ {
11798
+ "type": "string",
11799
+ "minLength": 1
11800
+ },
11801
+ {
11802
+ "type": "null"
11803
+ }
11804
+ ]
11797
11805
  },
11798
11806
  "kosukeFree": {
11799
11807
  "description": "true runs the session on Sensei free, on the serving source's model; false, or picking any other model, takes it off. Refused for a session no member is assigned to and for one the workspace pays for.",
@@ -20970,7 +20978,7 @@
20970
20978
  },
20971
20979
  "post": {
20972
20980
  "operationId": "senseiCardsSet",
20973
- "summary": "Open a card in your Turn's own thread, or update its open card with that key by passing the revision you read. Refused when the card moved, closed or is being sent, when your Turn stopped, when the session now lives in another thread (SESSION_MOVED), when the card has no primary (PRIMARY_REQUIRED: give it a verb, \"Ok\" when nothing follows), or when an id it names is not in the member's reach. The answer's warnings name what a written card misses (QA_REPORT_MISSING: a ready-, merge- or review- card with no qa_report block).",
20981
+ "summary": "Open a card in your Turn's thread, or update the open card with that key at the revision you read. Refused when the card moved, closed or is being sent, when your Turn stopped, when the session now lives in another thread (SESSION_MOVED), when the card has no primary (PRIMARY_REQUIRED: give it a verb, \"Ok\" when nothing follows), or when an id it names is not in the member's reach. The answer's warnings name what a written card misses (QA_REPORT_MISSING: a ready-, merge- or review- card with no qa_report block).",
20974
20982
  "tags": ["sensei"],
20975
20983
  "x-kosuke-command": ["sensei", "cards", "set"],
20976
20984
  "x-kosuke-sandbox-token": true,
@@ -21808,6 +21816,11 @@
21808
21816
  "exclusiveMinimum": 0,
21809
21817
  "maximum": 9007199254740991
21810
21818
  },
21819
+ "olderUnread": {
21820
+ "type": "integer",
21821
+ "exclusiveMinimum": 0,
21822
+ "maximum": 9007199254740991
21823
+ },
21811
21824
  "at": {
21812
21825
  "type": "string",
21813
21826
  "minLength": 1,
@@ -22087,6 +22100,9 @@
22087
22100
  "type": "string",
22088
22101
  "enum": ["session", "sensei", "ticket", "guide"]
22089
22102
  },
22103
+ "model": {
22104
+ "type": "string"
22105
+ },
22090
22106
  "proposedBy": {
22091
22107
  "anyOf": [
22092
22108
  {
@@ -25017,6 +25033,126 @@
25017
25033
  }
25018
25034
  }
25019
25035
  },
25036
+ "/api/sensei/thread-notes": {
25037
+ "post": {
25038
+ "operationId": "senseiThreadsNotesSend",
25039
+ "summary": "Send a short note from this Turn's thread to another of your member's threads. That thread reads it on its next Turn, or wakes for it, even when it is marked done. Sensei's reply there stays hidden, and a note grants nothing there. The same words to the same thread in one Turn send once. Answers noteId and status, `waiting` until that thread's Sensei read it: read it again with `kosuke sensei threads notes get`. Refused with THREAD_NOTE_TOO_MANY past 5 notes an hour between two threads or 30 an hour for the member, and with THREAD_NOTE_TOO_DEEP past a chain of 3 notes that led to each other: nothing reached that thread, the member sees why, and the refusal is final. Pass the body with --body or --body-file.",
25040
+ "tags": ["sensei"],
25041
+ "x-kosuke-command": ["sensei", "threads", "notes", "send"],
25042
+ "x-kosuke-sensei-token": true,
25043
+ "requestBody": {
25044
+ "required": true,
25045
+ "content": {
25046
+ "application/json": {
25047
+ "schema": {
25048
+ "type": "object",
25049
+ "properties": {
25050
+ "toThreadId": {
25051
+ "type": "string",
25052
+ "format": "uuid",
25053
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
25054
+ "x-kosuke-flag": "to",
25055
+ "description": "The thread that reads the note: an id from `kosuke sensei threads list`."
25056
+ },
25057
+ "text": {
25058
+ "type": "string",
25059
+ "minLength": 1,
25060
+ "maxLength": 1000,
25061
+ "description": "The note, in words the other thread can use with no other context."
25062
+ }
25063
+ },
25064
+ "required": ["toThreadId", "text"]
25065
+ }
25066
+ }
25067
+ }
25068
+ },
25069
+ "responses": {
25070
+ "2XX": {
25071
+ "description": "Success envelope",
25072
+ "content": {
25073
+ "application/json": {
25074
+ "schema": {
25075
+ "$ref": "#/components/schemas/ApiSuccess"
25076
+ }
25077
+ }
25078
+ }
25079
+ },
25080
+ "4XX": {
25081
+ "description": "Error envelope",
25082
+ "content": {
25083
+ "application/json": {
25084
+ "schema": {
25085
+ "$ref": "#/components/schemas/ApiError"
25086
+ }
25087
+ }
25088
+ }
25089
+ },
25090
+ "5XX": {
25091
+ "description": "Error envelope",
25092
+ "content": {
25093
+ "application/json": {
25094
+ "schema": {
25095
+ "$ref": "#/components/schemas/ApiError"
25096
+ }
25097
+ }
25098
+ }
25099
+ }
25100
+ }
25101
+ }
25102
+ },
25103
+ "/api/sensei/thread-notes/{noteId}": {
25104
+ "get": {
25105
+ "operationId": "senseiThreadsNotesGet",
25106
+ "summary": "Read one note your Sensei sent to another of your threads and where it stands: `waiting` until that thread's Sensei reads it, `delivered` with deliveredAt, `failed` when its Turns kept failing on it, or `refused` with why (`too_many`, `too_deep`).",
25107
+ "tags": ["sensei"],
25108
+ "x-kosuke-command": ["sensei", "threads", "notes", "get"],
25109
+ "x-kosuke-sensei-token": true,
25110
+ "parameters": [
25111
+ {
25112
+ "name": "noteId",
25113
+ "in": "path",
25114
+ "required": true,
25115
+ "schema": {
25116
+ "type": "string",
25117
+ "format": "uuid",
25118
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
25119
+ }
25120
+ }
25121
+ ],
25122
+ "responses": {
25123
+ "2XX": {
25124
+ "description": "Success envelope",
25125
+ "content": {
25126
+ "application/json": {
25127
+ "schema": {
25128
+ "$ref": "#/components/schemas/ApiSuccess"
25129
+ }
25130
+ }
25131
+ }
25132
+ },
25133
+ "4XX": {
25134
+ "description": "Error envelope",
25135
+ "content": {
25136
+ "application/json": {
25137
+ "schema": {
25138
+ "$ref": "#/components/schemas/ApiError"
25139
+ }
25140
+ }
25141
+ }
25142
+ },
25143
+ "5XX": {
25144
+ "description": "Error envelope",
25145
+ "content": {
25146
+ "application/json": {
25147
+ "schema": {
25148
+ "$ref": "#/components/schemas/ApiError"
25149
+ }
25150
+ }
25151
+ }
25152
+ }
25153
+ }
25154
+ }
25155
+ },
25020
25156
  "/api/sensei/thread-split": {
25021
25157
  "post": {
25022
25158
  "operationId": "senseiThreadsSplit",
@@ -28073,7 +28209,7 @@
28073
28209
  "/api/user/settings": {
28074
28210
  "get": {
28075
28211
  "operationId": "userSettingsGet",
28076
- "summary": "Read your stored timezone and its source (auto follows your device, manual is pinned), and the zone Kosuke resolves for you with where it came from.",
28212
+ "summary": "Read your stored timezone and its source (auto follows your device, manual is pinned), the zone Kosuke resolves for you with where it came from, and whether each system cron is on for you.",
28077
28213
  "tags": ["user"],
28078
28214
  "x-kosuke-command": ["user", "settings", "get"],
28079
28215
  "x-kosuke-sandbox-token": true,
@@ -28114,7 +28250,7 @@
28114
28250
  },
28115
28251
  "patch": {
28116
28252
  "operationId": "userSettingsUpdate",
28117
- "summary": "Set your timezone, an IANA name such as Europe/Rome; an unknown or offset-only zone is refused. timeZone without timeZoneSource pins it (manual). timeZoneSource alone keeps the stored zone; manual with none stored is refused.",
28253
+ "summary": "Set your timezone, an IANA name such as Europe/Rome; an unknown or offset-only zone is refused. timeZone without timeZoneSource pins it (manual). timeZoneSource alone keeps the stored zone; manual with none stored is refused. systemCron with systemCronOn turns that system cron on or off for you: off starts no new run, and keeps its thread, cards and files.",
28118
28254
  "tags": ["user"],
28119
28255
  "x-kosuke-command": ["user", "settings", "update"],
28120
28256
  "x-kosuke-sandbox-token": true,
@@ -28133,6 +28269,13 @@
28133
28269
  "timeZoneSource": {
28134
28270
  "type": "string",
28135
28271
  "enum": ["auto", "manual"]
28272
+ },
28273
+ "systemCron": {
28274
+ "type": "string",
28275
+ "enum": ["writing-style", "pulse", "crons-suggestion"]
28276
+ },
28277
+ "systemCronOn": {
28278
+ "type": "boolean"
28136
28279
  }
28137
28280
  }
28138
28281
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kosuke-ai/kosuke",
3
- "version": "1.0.83",
3
+ "version": "1.0.84",
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,11 +43,14 @@
43
43
  "minimatch": "^11.0.1"
44
44
  },
45
45
  "kosukeRelease": {
46
- "sourceCommit": "185b72e730189a837bb4e26ebadb6bc047cdfe31",
47
- "sourceIdentity": "de8f83d731a2d408b5cb47e0e7baf6d38bb0c81fcf3798a9b41919cadcae52e6",
46
+ "sourceCommit": "e1bc831fbed48e9daefa23c97a217a9cbd96d46a",
47
+ "sourceIdentity": "7a04ff004c01ca8512abbd85479e1dc268941b5cb1596e7b4328bd634cd64a99",
48
48
  "fragments": [
49
- "kosuke-free-fixed-model.json",
50
- "remove-auto-model.json"
49
+ "sensei-card-task-model-7q3k9z.json",
50
+ "fyi-digest-older-unread-el9p3r.json",
51
+ "system-crons-switches-j14pon.json",
52
+ "sensei-thread-notes-q7m2xd.json",
53
+ "session-model-default-b290q1.json"
51
54
  ]
52
55
  }
53
56
  }