@kosuke-ai/kosuke 1.0.22 → 1.0.24

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.24
4
+
5
+ - `kosuke sessions get` now returns the session's taskId, the task it belongs to, or null.
6
+
7
+ ## 1.0.23
8
+
9
+ - Add `kosuke workspaces usage breakdown get` to read what used a workspace's Credentials, by work, repository and model (owners and admins).
10
+
3
11
  ## 1.0.22
4
12
 
5
13
  - `kosuke sessions qa runs results create` accepts a video's `check` and an item's `noVideo`, and its answer names the passes it blocked for having no playable video (`unprovenVideo`); `start` names the carried passes it reset for a retest (`videoRetest`).
@@ -329,7 +329,8 @@ import { operation as o327 } from './workspaces/members-list--all.js';
329
329
  import { operation as o328 } from './workspaces/sandbox-limit-get.js';
330
330
  import { operation as o329 } from './workspaces/sandboxes-stop.js';
331
331
  import { operation as o330 } from './workspaces/timezone-set.js';
332
- import { operation as o331 } from './workspaces/usage-get.js';
332
+ import { operation as o331 } from './workspaces/usage-breakdown-get.js';
333
+ import { operation as o332 } from './workspaces/usage-get.js';
333
334
  export const operations = [
334
335
  o0,
335
336
  o1,
@@ -663,4 +664,5 @@ export const operations = [
663
664
  o329,
664
665
  o330,
665
666
  o331,
667
+ o332,
666
668
  ];
@@ -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 and pull request. 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.",
9
9
  "pathParams": [
10
10
  "projectId",
11
11
  "sessionId"
@@ -0,0 +1,40 @@
1
+ export const operation = {
2
+ "method": "get",
3
+ "path": "/api/organizations/{workspaceId}/usage/breakdown",
4
+ "command": [
5
+ "workspaces",
6
+ "usage",
7
+ "breakdown",
8
+ "get"
9
+ ],
10
+ "summary": "Read what used the workspace's Credentials over range (7d by default, 30d or all) in calendar days of tz (an IANA time zone, UTC by default): totals and per-day counts, then rows grouped by work, repository and model, each with its Providers and busiest Chat Sessions (the top five by every count, so sort by the one you show). Counts attempts run on the workspace's Credentials since recording began on 22 October 2026; days before it have recorded false and are never 0. turns counts every attempt; the four token counts are sums of reported counts only, never added together, with missing and inProgress counted apart. Members' own Subscriptions, Sensei, Kosuke free and platform work are excluded. Owners and admins only. 400 on another range or an unknown time zone.",
11
+ "pathParams": [
12
+ "workspaceId"
13
+ ],
14
+ "query": [
15
+ {
16
+ "name": "range",
17
+ "flag": "range",
18
+ "kind": "string",
19
+ "required": false,
20
+ "description": "Calendar days to include: 7d, 30d or all recorded days.",
21
+ "choices": [
22
+ "7d",
23
+ "30d",
24
+ "all"
25
+ ]
26
+ },
27
+ {
28
+ "name": "tz",
29
+ "flag": "tz",
30
+ "kind": "string",
31
+ "required": false,
32
+ "description": "IANA time zone for calendar days. Default: UTC."
33
+ }
34
+ ],
35
+ "body": null,
36
+ "multipart": null,
37
+ "attachments": false,
38
+ "anonymous": false,
39
+ "agents": "all"
40
+ };
package/openapi.json CHANGED
@@ -9123,6 +9123,83 @@
9123
9123
  }
9124
9124
  }
9125
9125
  },
9126
+ "/api/organizations/{workspaceId}/usage/breakdown": {
9127
+ "get": {
9128
+ "operationId": "workspacesUsageBreakdownGet",
9129
+ "summary": "Read what used the workspace's Credentials over range (7d by default, 30d or all) in calendar days of tz (an IANA time zone, UTC by default): totals and per-day counts, then rows grouped by work, repository and model, each with its Providers and busiest Chat Sessions (the top five by every count, so sort by the one you show). Counts attempts run on the workspace's Credentials since recording began on 22 October 2026; days before it have recorded false and are never 0. turns counts every attempt; the four token counts are sums of reported counts only, never added together, with missing and inProgress counted apart. Members' own Subscriptions, Sensei, Kosuke free and platform work are excluded. Owners and admins only. 400 on another range or an unknown time zone.",
9130
+ "tags": ["workspaces"],
9131
+ "x-kosuke-command": ["workspaces", "usage", "breakdown", "get"],
9132
+ "x-kosuke-sandbox-token": true,
9133
+ "x-kosuke-cron-token": true,
9134
+ "x-kosuke-sensei-token": true,
9135
+ "parameters": [
9136
+ {
9137
+ "name": "workspaceId",
9138
+ "in": "path",
9139
+ "required": true,
9140
+ "schema": {
9141
+ "type": "string",
9142
+ "minLength": 1
9143
+ }
9144
+ },
9145
+ {
9146
+ "name": "range",
9147
+ "in": "query",
9148
+ "required": false,
9149
+ "description": "Calendar days to include: 7d, 30d or all recorded days.",
9150
+ "schema": {
9151
+ "default": "7d",
9152
+ "description": "Calendar days to include: 7d, 30d or all recorded days.",
9153
+ "type": "string",
9154
+ "enum": ["7d", "30d", "all"]
9155
+ }
9156
+ },
9157
+ {
9158
+ "name": "tz",
9159
+ "in": "query",
9160
+ "required": false,
9161
+ "description": "IANA time zone for calendar days. Default: UTC.",
9162
+ "schema": {
9163
+ "default": "UTC",
9164
+ "description": "IANA time zone for calendar days. Default: UTC.",
9165
+ "type": "string"
9166
+ }
9167
+ }
9168
+ ],
9169
+ "responses": {
9170
+ "2XX": {
9171
+ "description": "Success envelope",
9172
+ "content": {
9173
+ "application/json": {
9174
+ "schema": {
9175
+ "$ref": "#/components/schemas/ApiSuccess"
9176
+ }
9177
+ }
9178
+ }
9179
+ },
9180
+ "4XX": {
9181
+ "description": "Error envelope",
9182
+ "content": {
9183
+ "application/json": {
9184
+ "schema": {
9185
+ "$ref": "#/components/schemas/ApiError"
9186
+ }
9187
+ }
9188
+ }
9189
+ },
9190
+ "5XX": {
9191
+ "description": "Error envelope",
9192
+ "content": {
9193
+ "application/json": {
9194
+ "schema": {
9195
+ "$ref": "#/components/schemas/ApiError"
9196
+ }
9197
+ }
9198
+ }
9199
+ }
9200
+ }
9201
+ }
9202
+ },
9126
9203
  "/api/personal-tasks": {
9127
9204
  "get": {
9128
9205
  "operationId": "tasksListPersonal",
@@ -11219,7 +11296,7 @@
11219
11296
  "/api/projects/{projectId}/chat-sessions/{sessionId}": {
11220
11297
  "get": {
11221
11298
  "operationId": "sessionsGet",
11222
- "summary": "Read one chat session with its URL, latest job and pull request. 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.",
11299
+ "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.",
11223
11300
  "tags": ["sessions"],
11224
11301
  "x-kosuke-command": ["sessions", "get"],
11225
11302
  "x-kosuke-sandbox-token": true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kosuke-ai/kosuke",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
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,10 +40,10 @@
40
40
  "vitest": "^4.1.12"
41
41
  },
42
42
  "kosukeRelease": {
43
- "sourceCommit": "9d304234fb9a4a255e971fd6cdeb97348c57d8a5",
44
- "sourceIdentity": "f84d14ea15555dc8de6983fa32ca642dbca69bb6d0c85e77669ec713cf15f931",
43
+ "sourceCommit": "0dcf5d86232829892f1ad4d75c72f1bb35a8bb9d",
44
+ "sourceIdentity": "605c6812882b4a73800f7c826123a0d0bdbe15891a5d7336e24394da9c8f9565",
45
45
  "fragments": [
46
- "qa-video-check.json"
46
+ "sessions-get-task-id.json"
47
47
  ]
48
48
  }
49
49
  }