@kosuke-ai/kosuke 1.0.58 → 1.0.60

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.
Files changed (80) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +31 -2
  3. package/dist/commands/hand-written.js +15 -0
  4. package/dist/commands/help.js +52 -0
  5. package/dist/generated/commands/crons/create--personal.js +2 -1
  6. package/dist/generated/commands/crons/update--personal.js +2 -1
  7. package/dist/generated/commands/deploys/queue-update.js +2 -1
  8. package/dist/generated/commands/find/index.js +17 -0
  9. package/dist/generated/commands/index.js +279 -291
  10. package/dist/generated/commands/integrations/tools-call.js +2 -1
  11. package/dist/generated/commands/projects/batch-merging-get.js +1 -1
  12. package/dist/generated/commands/projects/batch-merging-picks-set.js +2 -1
  13. package/dist/generated/commands/projects/batch-merging-set.js +19 -1
  14. package/dist/generated/commands/projects/create.js +21 -9
  15. package/dist/generated/commands/projects/labels-delete.js +2 -1
  16. package/dist/generated/commands/projects/live-logs-list.js +1 -1
  17. package/dist/generated/commands/projects/live-queries-run.js +1 -1
  18. package/dist/generated/commands/projects/live-traffic-get.js +1 -1
  19. package/dist/generated/commands/projects/releases-list.js +1 -1
  20. package/dist/generated/commands/projects/services-create.js +6 -3
  21. package/dist/generated/commands/projects/services-update.js +6 -3
  22. package/dist/generated/commands/projects/settings-set.js +4 -2
  23. package/dist/generated/commands/projects/versions-list.js +1 -1
  24. package/dist/generated/commands/sensei/cards-mark-read.js +1 -1
  25. package/dist/generated/commands/sensei/cards-set.js +40 -10
  26. package/dist/generated/commands/sensei/connect-buttons-create.js +2 -1
  27. package/dist/generated/commands/sensei/describe-cards-create.js +1 -1
  28. package/dist/generated/commands/sensei/messages-send.js +2 -1
  29. package/dist/generated/commands/sensei/sessions-assessments-create.js +3 -1
  30. package/dist/generated/commands/sensei/sessions-facts-get.js +1 -1
  31. package/dist/generated/commands/sensei/suggestions-create.js +2 -1
  32. package/dist/generated/commands/sensei/threads-get.js +8 -1
  33. package/dist/generated/commands/sensei/threads-split.js +2 -1
  34. package/dist/generated/commands/sensei/tickets-merge.js +4 -2
  35. package/dist/generated/commands/sensei/watch-reads-finish.js +4 -2
  36. package/dist/generated/commands/sensei/writing-samples-create.js +2 -1
  37. package/dist/generated/commands/sessions/get.js +1 -1
  38. package/dist/generated/commands/sessions/labels-set.js +6 -3
  39. package/dist/generated/commands/sessions/labels-update.js +4 -2
  40. package/dist/generated/commands/sessions/list--all.js +2 -3
  41. package/dist/generated/commands/sessions/qa-runs-finish.js +2 -1
  42. package/dist/generated/commands/sessions/qa-runs-results-create.js +2 -1
  43. package/dist/generated/commands/sessions/qa-runs-start.js +2 -1
  44. package/dist/generated/commands/sessions/queue-update.js +2 -1
  45. package/dist/generated/commands/sessions/send.js +4 -2
  46. package/dist/generated/commands/sessions/update.js +2 -1
  47. package/dist/generated/commands/skills/create--personal.js +2 -1
  48. package/dist/generated/commands/skills/create.js +2 -1
  49. package/dist/generated/commands/skills/update--personal.js +2 -1
  50. package/dist/generated/commands/skills/update.js +2 -1
  51. package/dist/generated/commands/tasks/create--personal.js +235 -11
  52. package/dist/generated/commands/tasks/create.js +1 -1
  53. package/dist/generated/commands/tasks/delete--personal.js +6 -3
  54. package/dist/generated/commands/tasks/get--personal.js +6 -3
  55. package/dist/generated/commands/tasks/list--all.js +1 -1
  56. package/dist/generated/commands/tasks/list--personal.js +91 -9
  57. package/dist/generated/commands/tasks/move--personal.js +7 -4
  58. package/dist/generated/commands/tasks/start--personal.js +6 -3
  59. package/dist/generated/commands/tasks/update--personal.js +85 -10
  60. package/dist/generated/commands/tasks/update.js +3 -2
  61. package/dist/generated/commands/user/personal-space-get.js +19 -0
  62. package/dist/generated/commands/workspaces/sandboxes-stop.js +2 -1
  63. package/dist/program.js +13 -2
  64. package/dist/runtime/arguments.js +58 -0
  65. package/dist/runtime/attach.js +177 -18
  66. package/dist/runtime/help.js +398 -0
  67. package/dist/runtime/personal-space-id.js +26 -0
  68. package/dist/runtime/personal-space.js +10 -0
  69. package/dist/runtime/runtime.js +25 -5
  70. package/dist/runtime/thread-text.js +316 -0
  71. package/openapi.json +321 -599
  72. package/package.json +11 -4
  73. package/dist/generated/commands/projects/backlog-items-create.js +0 -35
  74. package/dist/generated/commands/projects/backlog-items-delete.js +0 -20
  75. package/dist/generated/commands/projects/backlog-items-list.js +0 -19
  76. package/dist/generated/commands/projects/backlog-items-send.js +0 -20
  77. package/dist/generated/commands/projects/backlog-items-update.js +0 -42
  78. package/dist/generated/commands/projects/live-writes-create.js +0 -38
  79. package/dist/generated/commands/projects/live-writes-get.js +0 -21
  80. package/dist/generated/commands/projects/workflow-set.js +0 -33
@@ -32,7 +32,8 @@ export const operation = {
32
32
  "flag": "arguments",
33
33
  "kind": "json",
34
34
  "required": true,
35
- "description": "The tool's arguments, as its input schema describes them."
35
+ "description": "The tool's arguments, as its input schema describes them.",
36
+ "shape": "{[key: string]: unknown}"
36
37
  },
37
38
  {
38
39
  "name": "account",
@@ -6,7 +6,7 @@ export const operation = {
6
6
  "batch-merging",
7
7
  "get"
8
8
  ],
9
- "summary": "Read the Merge agent's mode (train: the merge train, batch: Batch merging, off: the platform merges nothing and members merge themselves; enabled is true for batch), how many go-ahead pull requests wait, and the run open now.",
9
+ "summary": "Read the Merge agent's mode (train: the merge train, batch: Batch merging, off: the platform merges nothing and members merge themselves; enabled is true for batch), its Go-ahead under the merge train (goAhead member: a member gives each pull request the go-ahead; checks: a pull request whose required checks pass on its latest commit has it) and waitForQa (under checks, QA must pass too), how many go-ahead pull requests wait, and the run open now.",
10
10
  "pathParams": [
11
11
  "projectId"
12
12
  ],
@@ -19,7 +19,8 @@ export const operation = {
19
19
  "flag": "pull-requests",
20
20
  "kind": "json",
21
21
  "required": true,
22
- "description": "Every task pull request merged into this Batch's branch now, in merge order: the whole list, never its base Batch's. An empty list clears it."
22
+ "description": "Every task pull request merged into this Batch's branch now, in merge order: the whole list, never its base Batch's. An empty list clears it.",
23
+ "shape": "integer[] (max 500)"
23
24
  }
24
25
  ],
25
26
  "required": true
@@ -6,7 +6,7 @@ export const operation = {
6
6
  "batch-merging",
7
7
  "set"
8
8
  ],
9
- "summary": "Switch the Merge agent's mode. batch: Batch merging, a batch agent combines go-ahead pull requests into one Batch pull request, reviews and QAs it, then an admin approves it. train: the merge train merges them one at a time. off, the mode a new project starts in: the platform merges, enqueues and batches nothing; members merge their pull requests themselves, and a run already open finishes what it carries. Batches run as the member who turned Batch merging on. Switching to train or batch starts a run for the go-ahead pull requests that wait.",
9
+ "summary": "Switch the Merge agent's mode, its Go-ahead, or Wait for QA; give any of them, and the others stay. mode batch: Batch merging, a batch agent combines go-ahead pull requests into one Batch pull request, reviews and QAs it, then an admin approves it. train: the merge train merges them one at a time. off, the mode an imported repository starts in: the platform merges, enqueues and batches nothing; members merge their pull requests themselves, and a run already open finishes what it carries. Batches run as the member who turned Batch merging on. goAhead, under the merge train: member, a member gives each pull request the go-ahead (QA must pass too); checks, a pull request a platform agent works on whose required checks pass on its latest commit has the go-ahead with nobody giving it, and waitForQa true makes it wait for QA to pass there too. Leaving train with checks takes back every go-ahead the checks gave. Switching to train or batch starts a run for the go-ahead pull requests that wait.",
10
10
  "pathParams": [
11
11
  "projectId"
12
12
  ],
@@ -31,6 +31,24 @@ export const operation = {
31
31
  "kind": "boolean",
32
32
  "required": false,
33
33
  "description": "Older form of mode: true is batch, false is train. Give mode or enabled."
34
+ },
35
+ {
36
+ "name": "goAhead",
37
+ "flag": "go-ahead",
38
+ "kind": "string",
39
+ "required": false,
40
+ "description": "Under the merge train, what gives a pull request the go-ahead. member: a member gives each one, today's behaviour. checks: a pull request whose required checks pass on its latest commit has the go-ahead; nobody has to give it.",
41
+ "choices": [
42
+ "member",
43
+ "checks"
44
+ ]
45
+ },
46
+ {
47
+ "name": "waitForQa",
48
+ "flag": "wait-for-qa",
49
+ "kind": "boolean",
50
+ "required": false,
51
+ "description": "Under goAhead checks: true makes a pull request also wait for its QA to pass on its latest commit before it merges. Under member, QA is always required."
34
52
  }
35
53
  ],
36
54
  "required": true
@@ -5,7 +5,7 @@ export const operation = {
5
5
  "projects",
6
6
  "create"
7
7
  ],
8
- "summary": "Connect a GitHub repository as a project in a workspace, or describe what to build to create a YOLO project on a new Kosuke-Org repository. Pass workflow yolo with a repository to import it in YOLO mode, with an optional prompt as its first message. Pass personal instead of orgId to create it in your Personal: your own credential, or your Sensei. Its first Deploy starts by itself, as the caller's; sessions start once it lands. Imports only a repository your own GitHub Connection can write to: 403 GITHUB_REPOSITORY_ACCESS_REQUIRED otherwise, 401 GITHUB_RECONNECT_REQUIRED when GitHub no longer accepts your connection. Pass workflow yolo or personal only when the member asked for it. Report a chatError; on BRANCH_PROTECTED give its message and do not retry.",
8
+ "summary": "Connect a GitHub repository as a project in a workspace (its Merge agent starts Off), or describe what to build to start a repository from kosuke-starter on a new Kosuke-Org repository (its Merge agent starts on the merge train with the go-ahead from passing checks, unless mergeAgentMode and mergeGoAhead say otherwise). With a repository, an optional prompt files its first task. Pass personal instead of orgId to create it in your Personal: your own credential, or your Sensei. Its first Deploy starts by itself, as the caller's; the first task starts on /kosuke:ship once it lands. Imports only a repository your own GitHub Connection can write to: 403 GITHUB_REPOSITORY_ACCESS_REQUIRED otherwise, 401 GITHUB_RECONNECT_REQUIRED when GitHub no longer accepts your connection. Pass personal only when the member asked for it. Report a chatError.",
9
9
  "pathParams": [],
10
10
  "query": [],
11
11
  "body": {
@@ -22,24 +22,36 @@ export const operation = {
22
22
  "flag": "repository-url",
23
23
  "kind": "string",
24
24
  "required": false,
25
- "description": "The GitHub repository to import. A Collaboration project unless workflow is yolo."
25
+ "description": "The GitHub repository to import. Its Merge agent starts Off."
26
26
  },
27
27
  {
28
28
  "name": "description",
29
29
  "flag": "description",
30
30
  "kind": "string",
31
31
  "required": false,
32
- "description": "What to build, in a sentence. Creates a YOLO project on a new private Kosuke-Org repository whose chat starts with it."
32
+ "description": "What to build, in a sentence. Starts a repository from kosuke-starter on a new private Kosuke-Org repository, with its first task filed from it."
33
33
  },
34
34
  {
35
- "name": "workflow",
36
- "flag": "workflow",
35
+ "name": "mergeAgentMode",
36
+ "flag": "merge-agent-mode",
37
37
  "kind": "string",
38
38
  "required": false,
39
- "description": "How the project takes changes: collaboration (a pull request per session) or yolo (one chat that saves each passing Turn straight to the default branch). Defaults to collaboration with repositoryUrl and to yolo with description. yolo needs a default branch that Sensei can push to.",
39
+ "description": "With description: the Merge agent mode the new repository starts in. Defaults to train.",
40
40
  "choices": [
41
- "collaboration",
42
- "yolo"
41
+ "train",
42
+ "batch",
43
+ "off"
44
+ ]
45
+ },
46
+ {
47
+ "name": "mergeGoAhead",
48
+ "flag": "merge-go-ahead",
49
+ "kind": "string",
50
+ "required": false,
51
+ "description": "With description and the train mode: what gives a pull request the go-ahead, a member (member) or its required checks passing on its head (checks). Defaults to checks.",
52
+ "choices": [
53
+ "member",
54
+ "checks"
43
55
  ]
44
56
  },
45
57
  {
@@ -47,7 +59,7 @@ export const operation = {
47
59
  "flag": "prompt",
48
60
  "kind": "string",
49
61
  "required": false,
50
- "description": "With repositoryUrl and workflow yolo: the YOLO project's first message. Its chat starts with it when the first Deploy lands."
62
+ "description": "With repositoryUrl: the first task's message. It starts on /kosuke:ship when the first Deploy lands."
51
63
  },
52
64
  {
53
65
  "name": "orgId",
@@ -39,7 +39,8 @@ export const operation = {
39
39
  "flag": "expected-session-ids",
40
40
  "kind": "json",
41
41
  "required": false,
42
- "description": "JSON array of the confirmed session IDs. Fail with 409 if the affected sessions changed, even when their count stayed the same."
42
+ "description": "JSON array of the confirmed session IDs. Fail with 409 if the affected sessions changed, even when their count stayed the same.",
43
+ "shape": "string[]"
43
44
  }
44
45
  ],
45
46
  "required": true
@@ -7,7 +7,7 @@ export const operation = {
7
7
  "logs",
8
8
  "list"
9
9
  ],
10
- "summary": "Read a published YOLO project's recent log lines from Workers Logs.",
10
+ "summary": "Read a published repository's recent log lines from Workers Logs.",
11
11
  "pathParams": [
12
12
  "projectId"
13
13
  ],
@@ -7,7 +7,7 @@ export const operation = {
7
7
  "queries",
8
8
  "run"
9
9
  ],
10
- "summary": "Run one read-only SQL statement against a published YOLO project's live database and return at most 500 rows. Anything that writes is refused.",
10
+ "summary": "Run one read-only SQL statement against a published repository's live database and return at most 500 rows. Anything that writes is refused.",
11
11
  "pathParams": [
12
12
  "projectId"
13
13
  ],
@@ -7,7 +7,7 @@ export const operation = {
7
7
  "traffic",
8
8
  "get"
9
9
  ],
10
- "summary": "Read a published YOLO project's request and error counts over the last hours, by status.",
10
+ "summary": "Read a published repository's request and error counts over the last hours, by status.",
11
11
  "pathParams": [
12
12
  "projectId"
13
13
  ],
@@ -6,7 +6,7 @@ export const operation = {
6
6
  "releases",
7
7
  "list"
8
8
  ],
9
- "summary": "List a YOLO project's Releases, newest first: the Version each published, its status (publishing, live, superseded or failed), and whether it changed the database schema.",
9
+ "summary": "List a repository's Releases, newest first: the Version each published, its status (publishing, live, superseded or failed), and whether it changed the database schema.",
10
10
  "pathParams": [
11
11
  "projectId"
12
12
  ],
@@ -36,7 +36,8 @@ export const operation = {
36
36
  "flag": "endpoints",
37
37
  "kind": "json",
38
38
  "required": false,
39
- "description": "Exposed endpoints. A service has 0..N (0 = background, no port); port/type/frontend/health are per endpoint. List the primary user-facing endpoint FIRST: it answers {{service.url}} and drives the readiness probe."
39
+ "description": "Exposed endpoints. A service has 0..N (0 = background, no port); port/type/frontend/health are per endpoint. List the primary user-facing endpoint FIRST: it answers {{service.url}} and drives the readiness probe.",
40
+ "shape": "{name: string, port: integer, exposure?: \"internal\"|\"public\"|\"preview\", healthRoute?: string}[]"
40
41
  },
41
42
  {
42
43
  "name": "startCommand",
@@ -57,14 +58,16 @@ export const operation = {
57
58
  "flag": "after",
58
59
  "kind": "json",
59
60
  "required": false,
60
- "description": "Other service names this service must start after. Ordering is readiness-gated: the service waits until its dependencies are accepting connections."
61
+ "description": "Other service names this service must start after. Ordering is readiness-gated: the service waits until its dependencies are accepting connections.",
62
+ "shape": "string[]"
61
63
  },
62
64
  {
63
65
  "name": "envFiles",
64
66
  "flag": "env-files",
65
67
  "kind": "json",
66
68
  "required": false,
67
- "description": "docker-stack only: paths (relative to `directory`) to write the resolved env into as a `.env` file. Empty defaults to a single `.env`. Example: Supabase needs [\".env\", \"supabase/functions/.env\"]: the root `.env` feeds config.toml's env() interpolation, while supabase/functions/.env is read by the Edge Functions"
69
+ "description": "docker-stack only: paths (relative to `directory`) to write the resolved env into as a `.env` file. Empty defaults to a single `.env`. Example: Supabase needs [\".env\", \"supabase/functions/.env\"]: the root `.env` feeds config.toml's env() interpolation, while supabase/functions/.env is read by the Edge Functions",
70
+ "shape": "string[]"
68
71
  },
69
72
  {
70
73
  "name": "name",
@@ -40,7 +40,8 @@ export const operation = {
40
40
  "name": "endpoints",
41
41
  "flag": "endpoints",
42
42
  "kind": "json",
43
- "required": false
43
+ "required": false,
44
+ "shape": "{name: string, port: integer, exposure?: \"internal\"|\"public\"|\"preview\", healthRoute?: string}[]"
44
45
  },
45
46
  {
46
47
  "name": "startCommand",
@@ -58,13 +59,15 @@ export const operation = {
58
59
  "name": "after",
59
60
  "flag": "after",
60
61
  "kind": "json",
61
- "required": false
62
+ "required": false,
63
+ "shape": "string[]"
62
64
  },
63
65
  {
64
66
  "name": "envFiles",
65
67
  "flag": "env-files",
66
68
  "kind": "json",
67
- "required": false
69
+ "required": false,
70
+ "shape": "string[]"
68
71
  },
69
72
  {
70
73
  "name": "sortOrder",
@@ -87,14 +87,16 @@ export const operation = {
87
87
  "flag": "services",
88
88
  "kind": "json",
89
89
  "required": false,
90
- "description": "Map of service name → configuration. Everything is a service: apps, workers, databases (Postgres/Redis as \"process\"), and container stacks (Supabase as \"docker-stack\"). Names must be lowercase alphanumeric with inner hyphens (they become DNS labels and systemd unit names)."
90
+ "description": "Map of service name → configuration. Everything is a service: apps, workers, databases (Postgres/Redis as \"process\"), and container stacks (Supabase as \"docker-stack\"). Names must be lowercase alphanumeric with inner hyphens (they become DNS labels and systemd unit names).",
91
+ "shape": "{[key: string]: {directory?: string, kind?: \"process\"|\"docker-stack\", endpoints?: {name: string, port: integer, exposure?: \"internal\"|\"public\"|\"preview\", healthRoute?: string}[], startCommand: string, stopCommand?: string, after?: string[], envFiles?: string[]}}"
91
92
  },
92
93
  {
93
94
  "name": "environment",
94
95
  "flag": "environment",
95
96
  "kind": "json",
96
97
  "required": false,
97
- "description": "Map of environment variable name → value. Injected into all services at startup. Values support service-URL placeholders like {{serviceName.url}} / {{serviceName.url_int}} resolved at sandbox boot."
98
+ "description": "Map of environment variable name → value. Injected into all services at startup. Values support service-URL placeholders like {{serviceName.url}} / {{serviceName.url_int}} resolved at sandbox boot.",
99
+ "shape": "{[key: string]: {value: string, isSecret?: boolean}}"
98
100
  }
99
101
  ],
100
102
  "required": true
@@ -6,7 +6,7 @@ export const operation = {
6
6
  "versions",
7
7
  "list"
8
8
  ],
9
- "summary": "List a YOLO project's Versions, newest first: each passing Turn saved to the default branch, with its commit and, for a Restore, the Version it brought back.",
9
+ "summary": "List a repository's Versions, newest first: each task merged into the default branch (and, for a migrated App, each Turn it saved), with its commit and, for a Restore, the Version it brought back.",
10
10
  "pathParams": [
11
11
  "projectId"
12
12
  ],
@@ -6,7 +6,7 @@ export const operation = {
6
6
  "cards",
7
7
  "mark-read"
8
8
  ],
9
- "summary": "Execute only the stored mark_read action of the card this member approved",
9
+ "summary": "Execute only the stored mark_read action of the card this member approved. A result with readUnconfirmed may have reached WhatsApp: run it again to check and re-send",
10
10
  "pathParams": [],
11
11
  "query": [],
12
12
  "body": {
@@ -27,7 +27,28 @@ export const operation = {
27
27
  "name": "blocks",
28
28
  "flag": "blocks",
29
29
  "kind": "json",
30
- "required": true
30
+ "required": true,
31
+ "shape": [
32
+ "T[] (max 12), each T one of:",
33
+ "{type: \"text\", role?: \"message\"|\"draft\", text: string}",
34
+ "{type: \"facts\", rows: {label: string, value: string}[] (max 20)}",
35
+ "{type: \"qa_report\", status?: \"passed\"|\"failed\"|\"blocked\"|\"skipped\"|\"running\", reason?: string, passed: integer, total: integer, sections: {title: string, passed: integer, total: integer, note?: string}[] (max 30), failed: {section: string, item: string, reason: string}[] (max 30), links: {label: string, href: string}[] (max 8)}",
36
+ "{type: \"diff\", summary: string, text?: {current: string, proposed: string}, files: {path: string, added: integer, removed: integer}[] (max 50)}",
37
+ "{type: \"checks\", items: {name: string, state: \"passed\"|\"failed\"|\"pending\"|\"skipped\", note?: string, href?: string}[] (max 50)}",
38
+ "{type: \"artifact\", sessionId?: string, cronId?: string, runId?: string, fileId?: string, version?: integer, slug?: string, caption?: string}",
39
+ "{type: \"clarification\", check?: {verdict: \"agrees\"|\"disagrees\"|\"unverified\", why: string}, questions: {id: string, topic: string, question: string, multiSelect?: boolean, options: {title: string, label?: string, description: string, isRecommended: boolean, sessionPick?: boolean, advisedAgainst?: boolean, outcome?: string, context?: string}[] (max 4)}[] (max 8)}",
40
+ "{type: \"reviewers\", people: {memberId?: string, login?: string, name: string, reason: string}[] (max 15)}",
41
+ "{type: \"merge_plan\", rows: {sessionId?: string, number: integer, title: string, headSha: string, action: \"merge\"|\"sync\"|\"wait\", why: string}[] (max 30)}",
42
+ "{type: \"deploy_variables\", deployJobId: string, pauseId: string}",
43
+ "{type: \"links\", items: {label: string, href: string}[] (max 8)}",
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, open?: boolean, details?: {state: \"passed\"|\"failed\"|\"waiting\"|\"info\", name: string, note?: string, href?: string}[] (max 30)}[] (max 12)}",
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}}",
47
+ "{type: \"person\", heading?: string, name: string, line?: string}",
48
+ "{type: \"image\", sessionId?: string, cronId?: string, runId?: string, fileId?: string, version?: integer, slug?: string, caption?: string, heading?: string}",
49
+ "{type: \"event\", title?: string, start: string, end?: string, timeZone?: string, notes?: {state: \"passed\"|\"failed\"|\"waiting\"|\"info\", text: string}[] (max 4)}",
50
+ "{type: \"ticket\", title: string, project?: string, line?: string}"
51
+ ]
31
52
  },
32
53
  {
33
54
  "name": "instruction",
@@ -40,7 +61,8 @@ export const operation = {
40
61
  "flag": "open",
41
62
  "kind": "json",
42
63
  "required": false,
43
- "description": "The page the primary button opens in place of an instruction, such as the link a teammate's message shares. The verb is the button's label (\"Open\", \"Read\"), and the tap opens the page, closes the card and sends nothing to Sensei. It takes a verb and an outcome, and no instruction, clarification block, Deploy form, action or covers."
64
+ "description": "The page the primary button opens in place of an instruction, such as the link a teammate's message shares. The verb is the button's label (\"Open\", \"Read\"), and the tap opens the page, closes the card and sends nothing to Sensei. It takes a verb and an outcome, and no instruction, clarification block, Deploy form, action or covers.",
65
+ "shape": "{href: string}"
44
66
  },
45
67
  {
46
68
  "name": "verb",
@@ -53,7 +75,8 @@ export const operation = {
53
75
  "flag": "actions",
54
76
  "kind": "json",
55
77
  "required": false,
56
- "description": "The card's own buttons, 2 at most with the verb counted among them (a card stored before this rule may hold 3, and keeps them only through an update that leaves them unchanged), in the card's three slots [negative] [Reply] [primary]: at most one action with tone primary (the filled button a swipe right taps; none beside a verb, which is the primary) and at most one with tone destructive, which takes the negative button's place. No other tone. Each label is one word of 12 characters at most; the prompt is what the tap sends to Sensei in this thread as the member's message, exactly as written and shown as its button's tooltip on a computer. A tap closes the card. Secondary choices go in the card's body or on a question card, never a further button."
78
+ "description": "The card's own buttons, 2 at most with the verb counted among them (a card stored before this rule may hold 3, and keeps them only through an update that leaves them unchanged), in the card's three slots [negative] [Reply] [primary]: at most one action with tone primary (the filled button a swipe right taps; none beside a verb, which is the primary) and at most one with tone destructive, which takes the negative button's place. No other tone. Each label is one word of 12 characters at most; the prompt is what the tap sends to Sensei in this thread as the member's message, exactly as written and shown as its button's tooltip on a computer. A tap closes the card. Secondary choices go in the card's body or on a question card, never a further button.",
79
+ "shape": "{label: string, prompt: string, tone?: \"primary\"|\"default\"|\"destructive\"}[] (max 3)"
57
80
  },
58
81
  {
59
82
  "name": "urgency",
@@ -119,45 +142,52 @@ export const operation = {
119
142
  "name": "proposedBy",
120
143
  "flag": "proposed-by",
121
144
  "kind": "json",
122
- "required": false
145
+ "required": false,
146
+ "shape": "{sessionId: string} | {cronId: string}"
123
147
  },
124
148
  {
125
149
  "name": "message",
126
150
  "flag": "message",
127
151
  "kind": "json",
128
- "required": false
152
+ "required": false,
153
+ "shape": "{id: string}"
129
154
  },
130
155
  {
131
156
  "name": "links",
132
157
  "flag": "links",
133
158
  "kind": "json",
134
- "required": false
159
+ "required": false,
160
+ "shape": "{label: string, href: string}[] (max 8)"
135
161
  },
136
162
  {
137
163
  "name": "target",
138
164
  "flag": "target",
139
165
  "kind": "json",
140
- "required": true
166
+ "required": true,
167
+ "shape": "{nudge: {day: integer}, job?: unknown, memory?: unknown, integration?: unknown, messages?: unknown, messagesDigest?: unknown, thread?: unknown, projectId?: unknown, sessionId?: unknown, pullRequest?: unknown, cronId?: unknown, deployJobId?: unknown} | {projectId: string, sessionId?: string, pullRequest?: {number: integer, headSha: string}, cronId?: string, deployJobId?: string, thread?: unknown, nudge?: unknown, job?: unknown, memory?: unknown, integration?: unknown, messages?: unknown, messagesDigest?: unknown} | {nudge?: unknown, job?: unknown, memory: \"general.md\", integration?: unknown, messages?: unknown, messagesDigest?: unknown, thread?: unknown, projectId?: unknown, sessionId?: unknown, pullRequest?: unknown, cronId?: unknown, deployJobId?: unknown} | {nudge?: unknown, job?: unknown, integration: \"linkedin\"|\"x\", memory?: unknown, messages?: unknown, messagesDigest?: unknown, thread?: unknown, projectId?: unknown, sessionId?: unknown, pullRequest?: unknown, cronId?: unknown, deployJobId?: unknown} | {nudge?: unknown, job?: unknown, messages: {connection: string, conversation: string}, messagesDigest?: unknown, memory?: unknown, integration?: unknown, thread?: unknown, projectId?: unknown, sessionId?: unknown, pullRequest?: unknown, cronId?: unknown, deployJobId?: unknown} | {nudge?: unknown, job?: unknown, messages?: unknown, messagesDigest: boolean, memory?: unknown, integration?: unknown, thread?: unknown, projectId?: unknown, sessionId?: unknown, pullRequest?: unknown, cronId?: unknown, deployJobId?: unknown} | {thread: boolean, nudge?: unknown, job?: unknown, memory?: unknown, integration?: unknown, messages?: unknown, messagesDigest?: unknown, projectId?: unknown, sessionId?: unknown, pullRequest?: unknown, cronId?: unknown, deployJobId?: unknown} | {nudge?: unknown, job: {delegateId: string, resultId: string}, memory?: unknown, integration?: unknown, messages?: unknown, messagesDigest?: unknown, thread?: unknown, projectId?: unknown, sessionId?: unknown, pullRequest?: unknown, cronId?: unknown, deployJobId?: unknown}"
141
168
  },
142
169
  {
143
170
  "name": "action",
144
171
  "flag": "action",
145
172
  "kind": "json",
146
- "required": false
173
+ "required": false,
174
+ "shape": "{type: \"reply\", connection: string, conversation: string, eventId?: string, messageId: string, text: string, attachments?: {fileId: string, version: integer, name: string, mediaType: string, byteSize: integer}[] (max 3)} | {type: \"mark_read\", rows: {connection: string, conversation: string, messageIds: string[] (max 12)}[] (max 50)}"
147
175
  },
148
176
  {
149
177
  "name": "signIn",
150
178
  "flag": "sign-in",
151
179
  "kind": "json",
152
180
  "required": false,
153
- "description": "A sign-in card on the member's Mac: the site, the Chrome profile ID, the Mac and, on the Sign in card of a site other than LinkedIn and X, the wall's url. Its Approve allows one tapped `kosuke mac browser login` for exactly these. Key it mac-sign-in:<site>:<profile> (the profile ID lowercase, spaces as hyphens: Profile 6 is profile-6) for Sign in, with :done for I'm signed in and :account for Continue as, both of which run --take. Only a card keyed mac-sign-in: takes it, and such a card needs it. A Sign in card for LinkedIn or X marks that connection signed out."
181
+ "description": "A sign-in card on the member's Mac: the site, the Chrome profile ID, the Mac and, on the Sign in card of a site other than LinkedIn and X, the wall's url. Its Approve allows one tapped `kosuke mac browser login` for exactly these. Key it mac-sign-in:<site>:<profile> (the profile ID lowercase, spaces as hyphens: Profile 6 is profile-6) for Sign in, with :done for I'm signed in and :account for Continue as, both of which run --take. Only a card keyed mac-sign-in: takes it, and such a card needs it. A Sign in card for LinkedIn or X marks that connection signed out.",
182
+ "shape": "{site: string, profile: string, deviceId: string, url?: string}"
154
183
  },
155
184
  {
156
185
  "name": "covers",
157
186
  "flag": "covers",
158
187
  "kind": "json",
159
188
  "required": false,
160
- "description": "The ids of the incoming_message events of this thread that this card answers: a reply covers the message it answers, a task or calendar card the message in its evidence, an FYI the event of every row. An FYI update keeps unread commitments and the events in its current evidence, discarding processed history; name at most 50 events per write. The open FYI keeps a reference to every message it has covered, which its Mark read marks, and its card read gives their count and the newest."
189
+ "description": "The ids of the incoming_message events of this thread that this card answers: a reply covers the message it answers, a task or calendar card the message in its evidence, an FYI the event of every row. An FYI update keeps unread commitments and the events in its current evidence, discarding processed history; name at most 50 events per write. The open FYI keeps a reference to every message it has covered, which its Mark read marks, and its card read gives their count and the newest.",
190
+ "shape": "string[] (max 50)"
161
191
  },
162
192
  {
163
193
  "name": "stateKey",
@@ -23,7 +23,8 @@ export const operation = {
23
23
  "flag": "items",
24
24
  "kind": "json",
25
25
  "required": true,
26
- "description": "One button each: github, notifications (iOS app only, once per member), toolkit:<slug> (a Personal integration such as toolkit:gmail), or subscription:<claude_code|codex|antigravity>."
26
+ "description": "One button each: github, notifications (iOS app only, once per member), toolkit:<slug> (a Personal integration such as toolkit:gmail), or subscription:<claude_code|codex|antigravity>.",
27
+ "shape": "string[] (max 6)"
27
28
  },
28
29
  {
29
30
  "name": "required",
@@ -6,7 +6,7 @@ export const operation = {
6
6
  "describe-cards",
7
7
  "create"
8
8
  ],
9
- "summary": "Put the Describe card in a message of your Turn's own thread, under your words: the member writes what the app does and creates it as a YOLO project in the workspace it names. Once created, the thread carries on in a Turn of its own. End your Turn after it. Refused when your Turn stopped.",
9
+ "summary": "Put the Describe card in a message of your Turn's own thread, under your words: the member writes what the app does and creates it as a repository from kosuke-starter in the workspace it names. Once created, the thread carries on in a Turn of its own. End your Turn after it. Refused when your Turn stopped.",
10
10
  "pathParams": [],
11
11
  "query": [],
12
12
  "body": {
@@ -72,7 +72,8 @@ export const operation = {
72
72
  "flag": "paths",
73
73
  "kind": "json",
74
74
  "required": false,
75
- "description": "The repository paths it is about, for the recipient to read. Nothing routes by them."
75
+ "description": "The repository paths it is about, for the recipient to read. Nothing routes by them.",
76
+ "shape": "string[] (max 20)"
76
77
  },
77
78
  {
78
79
  "name": "link",
@@ -34,7 +34,9 @@ export const operation = {
34
34
  "name": "repository",
35
35
  "flag": "repository",
36
36
  "kind": "json",
37
- "required": true
37
+ "required": true,
38
+ "description": "The pull request's repository as {\"owner\":\"...\",\"name\":\"...\"}, with the installationId facts return when known; the kosuke CLI also takes owner/repo.",
39
+ "shape": "{owner: string, name: string, installationId?: number | null}"
38
40
  },
39
41
  {
40
42
  "name": "pullRequestNumber",
@@ -7,7 +7,7 @@ export const operation = {
7
7
  "facts",
8
8
  "get"
9
9
  ],
10
- "summary": "Read fresh session evidence and the opaque revision needed for an assessment. Requires the running Sensei Turn to follow this session in its own thread.",
10
+ "summary": "Read fresh session evidence and the opaque revision needed for an assessment, with the pull request's headSha, mergeable, mergeStateStatus, reviewDecision, reviewRequests and isDraft at the top level (null when there is no readable pull request). Requires the running Sensei Turn to follow this session in its own thread.",
11
11
  "pathParams": [],
12
12
  "query": [
13
13
  {
@@ -23,7 +23,8 @@ export const operation = {
23
23
  "flag": "items",
24
24
  "kind": "json",
25
25
  "required": true,
26
- "description": "One pill each, at most four."
26
+ "description": "One pill each, at most four.",
27
+ "shape": "{text: string, newThread?: boolean}[] (max 4)"
27
28
  }
28
29
  ],
29
30
  "required": true
@@ -6,7 +6,7 @@ export const operation = {
6
6
  "threads",
7
7
  "get"
8
8
  ],
9
- "summary": "Read one of your Sensei Threads: its name, state, sessions and root, its replies oldest first, the Turn that runs or last ran in it, and its Up next. Paged: `limit` replies at a time, and `before` for the ones older than a reply already read. `session` keeps the rows about one Chat Session.",
9
+ "summary": "Read one of your Sensei Threads: its name, state, sessions and root, its replies oldest first, the Turn that runs or last ran in it, and its Up next. Paged: `limit` replies at a time, `before` for the ones older than a reply already read, and `since` for the ones newer than it. `session` keeps the rows about one Chat Session.",
10
10
  "pathParams": [
11
11
  "threadId"
12
12
  ],
@@ -25,6 +25,13 @@ export const operation = {
25
25
  "required": false,
26
26
  "description": "The id of the oldest reply already read: answers the replies before it, alone."
27
27
  },
28
+ {
29
+ "name": "since",
30
+ "flag": "since",
31
+ "kind": "string",
32
+ "required": false,
33
+ "description": "The id of the newest reply already read: answers only the replies after it, oldest first, alone."
34
+ },
28
35
  {
29
36
  "name": "session",
30
37
  "flag": "session",
@@ -16,7 +16,8 @@ export const operation = {
16
16
  "flag": "asks",
17
17
  "kind": "json",
18
18
  "required": true,
19
- "description": "The asks of the member’s message, in order. The first stays in this thread; each other one becomes a thread of its own."
19
+ "description": "The asks of the member’s message, in order. The first stays in this thread; each other one becomes a thread of its own.",
20
+ "shape": "{text: string}[] (max 10)"
20
21
  }
21
22
  ],
22
23
  "required": true
@@ -23,7 +23,8 @@ export const operation = {
23
23
  "flag": "fold",
24
24
  "kind": "json",
25
25
  "required": true,
26
- "description": "The other Backlog tickets of the same project, deleted by the merge."
26
+ "description": "The other Backlog tickets of the same project, deleted by the merge.",
27
+ "shape": "string[] (max 20)"
27
28
  },
28
29
  {
29
30
  "name": "content",
@@ -37,7 +38,8 @@ export const operation = {
37
38
  "flag": "revisions",
38
39
  "kind": "json",
39
40
  "required": true,
40
- "description": "The promptRevision `kosuke sessions get` gave for each ticket content was written from, the kept one included, keyed by session id."
41
+ "description": "The promptRevision `kosuke sessions get` gave for each ticket content was written from, the kept one included, keyed by session id.",
42
+ "shape": "{[key: string]: string}"
41
43
  }
42
44
  ],
43
45
  "required": true
@@ -44,14 +44,16 @@ export const operation = {
44
44
  "flag": "account",
45
45
  "kind": "json",
46
46
  "required": false,
47
- "description": "With ok: the signed-in account the page shows"
47
+ "description": "With ok: the signed-in account the page shows",
48
+ "shape": "{handle: string, name?: string | null}"
48
49
  },
49
50
  {
50
51
  "name": "conversations",
51
52
  "flag": "conversations",
52
53
  "kind": "json",
53
54
  "required": false,
54
- "description": "With ok: the conversation list, newest first"
55
+ "description": "With ok: the conversation list, newest first",
56
+ "shape": "{link: string, name?: string | null, kind?: \"direct\"|\"group\", muted?: boolean, unread?: boolean, newest: {sender?: string | null, fromMe?: boolean | null, text: string, truncated?: boolean}}[] (max 50)"
55
57
  },
56
58
  {
57
59
  "name": "more",
@@ -29,7 +29,8 @@ export const operation = {
29
29
  "flag": "messages",
30
30
  "kind": "json",
31
31
  "required": true,
32
- "description": "At most 50 messages the member sent."
32
+ "description": "At most 50 messages the member sent.",
33
+ "shape": "{id: string, text: string}[] (max 50)"
33
34
  }
34
35
  ],
35
36
  "required": true
@@ -5,7 +5,7 @@ export const operation = {
5
5
  "sessions",
6
6
  "get"
7
7
  ],
8
- "summary": "Read one chat session with its URL, latest job, pull request and taskId (the linked task in the project workspace, or null). A Backlog session also carries its promptRevision, which `kosuke sessions prompt update --if-revision` and `kosuke sensei tickets merge` name for each ticket an edit was written from. Each session carries waitingForDeploy: true while it waits for the Deploy to finish, false once the Deploy ends, before its sandbox starts.",
8
+ "summary": "Read one chat session with its URL, latest job, pull request and taskId (the linked task in the project workspace, or null). A Backlog session also carries its promptRevision, which `kosuke sessions prompt update --if-revision` and `kosuke sensei tickets merge` name for each ticket an edit was written from. Each session carries waitingForDeploy: true while it waits for the Deploy to finish, false once the Deploy ends, before its sandbox starts. senseiThread is your Sensei thread that follows the session (id, title, url, and for a Sensei Turn thisThread: whether it is that Turn's own), or null: its events and cards go there.",
9
9
  "pathParams": [
10
10
  "projectId",
11
11
  "sessionId"
@@ -19,21 +19,24 @@ export const operation = {
19
19
  "flag": "labels",
20
20
  "kind": "json",
21
21
  "required": true,
22
- "description": "JSON array of the labels the session keeps, replacing the ones it has. Up to 20, each up to 50 characters, stored lowercase. [] removes them all."
22
+ "description": "JSON array of the labels the session keeps, replacing the ones it has. Up to 20, each up to 50 characters, stored lowercase. [] removes them all.",
23
+ "shape": "string[] (max 20)"
23
24
  },
24
25
  {
25
26
  "name": "expectedLabels",
26
27
  "flag": "expected-labels",
27
28
  "kind": "json",
28
29
  "required": false,
29
- "description": "JSON array of the labels the caller last saw on the session. When given, the edit fails with 409 if the session carries different labels by now, or if a label it adds is no longer in the project's labels and is not listed in created."
30
+ "description": "JSON array of the labels the caller last saw on the session. When given, the edit fails with 409 if the session carries different labels by now, or if a label it adds is no longer in the project's labels and is not listed in created.",
31
+ "shape": "string[] (max 20)"
30
32
  },
31
33
  {
32
34
  "name": "created",
33
35
  "flag": "created",
34
36
  "kind": "json",
35
37
  "required": false,
36
- "description": "JSON array of the labels the caller means to create. With expectedLabels, only these may join the project's labels; without expectedLabels, every new name joins them."
38
+ "description": "JSON array of the labels the caller means to create. With expectedLabels, only these may join the project's labels; without expectedLabels, every new name joins them.",
39
+ "shape": "string[] (max 20)"
37
40
  }
38
41
  ],
39
42
  "required": true