@kosuke-ai/cli 5.16.0 → 6.0.1
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/README.md +11 -1
- package/dist/generated/commands/crons/create.js +2 -9
- package/dist/generated/commands/crons/update.js +1 -8
- package/dist/generated/commands/index.js +3 -1
- package/dist/generated/commands/sessions/get.js +1 -1
- package/dist/generated/commands/user/profile.js +1 -1
- package/dist/generated/commands/workspaces/get.js +1 -1
- package/dist/generated/commands/workspaces/lead-proposals-create.js +1 -1
- package/dist/generated/commands/workspaces/timezone-set.js +32 -0
- package/openapi.json +83 -28
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,8 @@ kosuke sessions create <projectId> --title "Fix the login form" \
|
|
|
13
13
|
--content "See the screenshot" --status backlog --attach shot.png
|
|
14
14
|
kosuke crons create <workspaceId> --project <projectId> --project <projectId> \
|
|
15
15
|
--name "Daily ingest" --prompt "/sources" \
|
|
16
|
-
--cron-expression "0 6 * * *"
|
|
16
|
+
--cron-expression "0 6 * * *"
|
|
17
|
+
kosuke workspaces timezone-set <workspaceId> --timezone Europe/Zurich
|
|
17
18
|
```
|
|
18
19
|
|
|
19
20
|
Every API command prints the platform's JSON response as is, so it pipes into `jq`.
|
|
@@ -64,6 +65,15 @@ so on stderr and exits 1.
|
|
|
64
65
|
This command is written by hand: the stream is a WebSocket, which the OpenAPI
|
|
65
66
|
document below cannot describe.
|
|
66
67
|
|
|
68
|
+
## Upgrading from 5.x
|
|
69
|
+
|
|
70
|
+
A cron no longer has a timezone of its own: every cron of a workspace is read
|
|
71
|
+
in the Workspace Timezone, which `kosuke workspaces timezone-set <workspaceId>
|
|
72
|
+
--timezone Europe/Zurich` sets, as an owner or admin. `crons create` and `crons
|
|
73
|
+
update` lose `--timezone`, and the API refuses a cron body that still sends one,
|
|
74
|
+
which is what an older CLI does with `--timezone`. `crons get` still prints the
|
|
75
|
+
cron's `timezone`, the workspace's.
|
|
76
|
+
|
|
67
77
|
## Upgrading from 4.x
|
|
68
78
|
|
|
69
79
|
A cron now belongs to its workspace and covers one or more projects, so every
|
|
@@ -5,7 +5,7 @@ export const operation = {
|
|
|
5
5
|
"crons",
|
|
6
6
|
"create"
|
|
7
7
|
],
|
|
8
|
-
"summary": "Create a cron, enabled, with you as its creator, in one or more of the workspace's projects: each fire runs the Cron Agent in every one of them at once. Every run spends the workspace's Credentials, never a member's Subscription, so a workspace with no usable provider is refused. The model is an encoded id such as anthropic:opus__xhigh; null or left out uses the saved Workspace Default Model when its Provider has usable workspace Credentials, otherwise Kosuke's choice among usable workspace Credentials at run time. The crontab may not fire more often than every 15 minutes.",
|
|
8
|
+
"summary": "Create a cron, enabled, with you as its creator, in one or more of the workspace's projects: each fire runs the Cron Agent in every one of them at once. Every run spends the workspace's Credentials, never a member's Subscription, so a workspace with no usable provider is refused. The model is an encoded id such as anthropic:opus__xhigh; null or left out uses the saved Workspace Default Model when its Provider has usable workspace Credentials, otherwise Kosuke's choice among usable workspace Credentials at run time. The crontab is read in the Workspace Timezone (workspaces timezone-set), and may not fire more often than every 15 minutes. A body that sends timezone is refused.",
|
|
9
9
|
"pathParams": [
|
|
10
10
|
"workspaceId"
|
|
11
11
|
],
|
|
@@ -38,14 +38,7 @@ export const operation = {
|
|
|
38
38
|
"flag": "cron-expression",
|
|
39
39
|
"kind": "string",
|
|
40
40
|
"required": true,
|
|
41
|
-
"description": "Five fields: minute, hour, day of month, month, day of week. At most one fire every 15 minutes."
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"name": "timezone",
|
|
45
|
-
"flag": "timezone",
|
|
46
|
-
"kind": "string",
|
|
47
|
-
"required": true,
|
|
48
|
-
"description": "The IANA zone the crontab is read in, e.g. Europe/Zurich or UTC."
|
|
41
|
+
"description": "Five fields: minute, hour, day of month, month, day of week, read in the Workspace Timezone (kosuke workspaces timezone-set). At most one fire every 15 minutes."
|
|
49
42
|
},
|
|
50
43
|
{
|
|
51
44
|
"name": "model",
|
|
@@ -39,14 +39,7 @@ export const operation = {
|
|
|
39
39
|
"flag": "cron-expression",
|
|
40
40
|
"kind": "string",
|
|
41
41
|
"required": false,
|
|
42
|
-
"description": "Five fields: minute, hour, day of month, month, day of week. At most one fire every 15 minutes."
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"name": "timezone",
|
|
46
|
-
"flag": "timezone",
|
|
47
|
-
"kind": "string",
|
|
48
|
-
"required": false,
|
|
49
|
-
"description": "The IANA zone the crontab is read in, e.g. Europe/Zurich or UTC."
|
|
42
|
+
"description": "Five fields: minute, hour, day of month, month, day of week, read in the Workspace Timezone (kosuke workspaces timezone-set). At most one fire every 15 minutes."
|
|
50
43
|
},
|
|
51
44
|
{
|
|
52
45
|
"name": "model",
|
|
@@ -165,7 +165,8 @@ import { operation as o163 } from './workspaces/skills-get.js';
|
|
|
165
165
|
import { operation as o164 } from './workspaces/skills-list.js';
|
|
166
166
|
import { operation as o165 } from './workspaces/skills-update.js';
|
|
167
167
|
import { operation as o166 } from './workspaces/stop-sandboxes.js';
|
|
168
|
-
import { operation as o167 } from './workspaces/
|
|
168
|
+
import { operation as o167 } from './workspaces/timezone-set.js';
|
|
169
|
+
import { operation as o168 } from './workspaces/usage.js';
|
|
169
170
|
export const operations = [
|
|
170
171
|
o0,
|
|
171
172
|
o1,
|
|
@@ -335,4 +336,5 @@ export const operations = [
|
|
|
335
336
|
o165,
|
|
336
337
|
o166,
|
|
337
338
|
o167,
|
|
339
|
+
o168,
|
|
338
340
|
];
|
|
@@ -5,7 +5,7 @@ export const operation = {
|
|
|
5
5
|
"sessions",
|
|
6
6
|
"get"
|
|
7
7
|
],
|
|
8
|
-
"summary": "Read one chat session with its latest job and pull request. A Backlog session also carries its promptRevision, which a merge proposal names for each ticket it was written from.",
|
|
8
|
+
"summary": "Read one chat session with its URL, latest job and pull request. A Backlog session also carries its promptRevision, which a merge proposal names for each ticket it was written from.",
|
|
9
9
|
"pathParams": [
|
|
10
10
|
"projectId",
|
|
11
11
|
"sessionId"
|
|
@@ -5,7 +5,7 @@ export const operation = {
|
|
|
5
5
|
"user",
|
|
6
6
|
"profile"
|
|
7
7
|
],
|
|
8
|
-
"summary": "Read your account: id, email, name, onboarding state, default model, auto-commit and
|
|
8
|
+
"summary": "Read your account: id, email, name, onboarding state, default model, auto-commit setting and Reply Style.",
|
|
9
9
|
"pathParams": [],
|
|
10
10
|
"query": [],
|
|
11
11
|
"body": null,
|
|
@@ -6,7 +6,7 @@ export const operation = {
|
|
|
6
6
|
"lead-proposals",
|
|
7
7
|
"create"
|
|
8
8
|
],
|
|
9
|
-
"summary": "Open a Lead Card in a member's Needs you that proposes one thing, with one line of why: your own, or from a Cron Run the Needs you of the member memberId names. kind start proposes starting a Backlog session, and is refused unless that member is idle. kind delete_ticket (with evidence), merge_tickets (with sessionIds, mergedContent and the promptRevision sessions get gave for each ticket in revisions) and create_cron (with name, prompt, crontab,
|
|
9
|
+
"summary": "Open a Lead Card in a member's Needs you that proposes one thing, with one line of why: your own, or from a Cron Run the Needs you of the member memberId names. kind start proposes starting a Backlog session, and is refused unless that member is idle. kind delete_ticket (with evidence), merge_tickets (with sessionIds, mergedContent and the promptRevision sessions get gave for each ticket in revisions) and create_cron (with name, prompt, crontab, read in the Workspace Timezone, and projectIds, and no sessionId) change nothing until the member accepts the card. Pass the body whole with --body or --body-file.",
|
|
10
10
|
"pathParams": [
|
|
11
11
|
"workspaceId"
|
|
12
12
|
],
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export const operation = {
|
|
2
|
+
"method": "put",
|
|
3
|
+
"path": "/api/organizations/{workspaceId}/timezone",
|
|
4
|
+
"command": [
|
|
5
|
+
"workspaces",
|
|
6
|
+
"timezone-set"
|
|
7
|
+
],
|
|
8
|
+
"summary": "Set the Workspace Timezone, the IANA zone every cron of the workspace is read and shown in, e.g. Europe/Rome. Each enabled cron's next run moves to the new zone, except one already due, which fires on its slot. Refused, naming the crons, when any cron would fire more often than every 15 minutes or never in the new zone; nothing changes then. Sending the zone already set changes nothing. Owners and admins only.",
|
|
9
|
+
"pathParams": [
|
|
10
|
+
"workspaceId"
|
|
11
|
+
],
|
|
12
|
+
"query": [],
|
|
13
|
+
"body": {
|
|
14
|
+
"fields": [
|
|
15
|
+
{
|
|
16
|
+
"name": "timezone",
|
|
17
|
+
"flag": "timezone",
|
|
18
|
+
"kind": "string",
|
|
19
|
+
"required": true,
|
|
20
|
+
"description": "The IANA zone every cron of the workspace is read and shown in, e.g. Europe/Rome or UTC."
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"required": true
|
|
24
|
+
},
|
|
25
|
+
"multipart": null,
|
|
26
|
+
"attachments": false,
|
|
27
|
+
"anonymous": false,
|
|
28
|
+
"sandboxToken": true,
|
|
29
|
+
"orchestratorToken": true,
|
|
30
|
+
"cronToken": true,
|
|
31
|
+
"leadToken": true
|
|
32
|
+
};
|
package/openapi.json
CHANGED
|
@@ -591,7 +591,7 @@
|
|
|
591
591
|
"/api/organizations/{workspaceId}": {
|
|
592
592
|
"get": {
|
|
593
593
|
"operationId": "workspacesGet",
|
|
594
|
-
"summary": "Read one workspace
|
|
594
|
+
"summary": "Read one workspace, your role in it, and its timezone, the one every cron is read in.",
|
|
595
595
|
"tags": ["workspaces"],
|
|
596
596
|
"x-kosuke-command": ["workspaces", "get"],
|
|
597
597
|
"x-kosuke-sandbox-token": true,
|
|
@@ -1463,7 +1463,7 @@
|
|
|
1463
1463
|
},
|
|
1464
1464
|
"post": {
|
|
1465
1465
|
"operationId": "cronsCreate",
|
|
1466
|
-
"summary": "Create a cron, enabled, with you as its creator, in one or more of the workspace's projects: each fire runs the Cron Agent in every one of them at once. Every run spends the workspace's Credentials, never a member's Subscription, so a workspace with no usable provider is refused. The model is an encoded id such as anthropic:opus__xhigh; null or left out uses the saved Workspace Default Model when its Provider has usable workspace Credentials, otherwise Kosuke's choice among usable workspace Credentials at run time. The crontab may not fire more often than every 15 minutes.",
|
|
1466
|
+
"summary": "Create a cron, enabled, with you as its creator, in one or more of the workspace's projects: each fire runs the Cron Agent in every one of them at once. Every run spends the workspace's Credentials, never a member's Subscription, so a workspace with no usable provider is refused. The model is an encoded id such as anthropic:opus__xhigh; null or left out uses the saved Workspace Default Model when its Provider has usable workspace Credentials, otherwise Kosuke's choice among usable workspace Credentials at run time. The crontab is read in the Workspace Timezone (workspaces timezone-set), and may not fire more often than every 15 minutes. A body that sends timezone is refused.",
|
|
1467
1467
|
"tags": ["crons"],
|
|
1468
1468
|
"x-kosuke-command": ["crons", "create"],
|
|
1469
1469
|
"x-kosuke-sandbox-token": true,
|
|
@@ -1513,13 +1513,7 @@
|
|
|
1513
1513
|
"type": "string",
|
|
1514
1514
|
"minLength": 1,
|
|
1515
1515
|
"maxLength": 100,
|
|
1516
|
-
"description": "Five fields: minute, hour, day of month, month, day of week. At most one fire every 15 minutes."
|
|
1517
|
-
},
|
|
1518
|
-
"timezone": {
|
|
1519
|
-
"type": "string",
|
|
1520
|
-
"minLength": 1,
|
|
1521
|
-
"maxLength": 64,
|
|
1522
|
-
"description": "The IANA zone the crontab is read in, e.g. Europe/Zurich or UTC."
|
|
1516
|
+
"description": "Five fields: minute, hour, day of month, month, day of week, read in the Workspace Timezone (kosuke workspaces timezone-set). At most one fire every 15 minutes."
|
|
1523
1517
|
},
|
|
1524
1518
|
"model": {
|
|
1525
1519
|
"description": "An encoded model id such as anthropic:opus__xhigh. Null, or left out on create, uses the Workspace Default Model at run time, then Kosuke's choice among available workspace Credentials.",
|
|
@@ -1534,7 +1528,7 @@
|
|
|
1534
1528
|
]
|
|
1535
1529
|
}
|
|
1536
1530
|
},
|
|
1537
|
-
"required": ["name", "projectIds", "prompt", "cronExpression"
|
|
1531
|
+
"required": ["name", "projectIds", "prompt", "cronExpression"]
|
|
1538
1532
|
}
|
|
1539
1533
|
}
|
|
1540
1534
|
}
|
|
@@ -1699,13 +1693,7 @@
|
|
|
1699
1693
|
"type": "string",
|
|
1700
1694
|
"minLength": 1,
|
|
1701
1695
|
"maxLength": 100,
|
|
1702
|
-
"description": "Five fields: minute, hour, day of month, month, day of week. At most one fire every 15 minutes."
|
|
1703
|
-
},
|
|
1704
|
-
"timezone": {
|
|
1705
|
-
"type": "string",
|
|
1706
|
-
"minLength": 1,
|
|
1707
|
-
"maxLength": 64,
|
|
1708
|
-
"description": "The IANA zone the crontab is read in, e.g. Europe/Zurich or UTC."
|
|
1696
|
+
"description": "Five fields: minute, hour, day of month, month, day of week, read in the Workspace Timezone (kosuke workspaces timezone-set). At most one fire every 15 minutes."
|
|
1709
1697
|
},
|
|
1710
1698
|
"model": {
|
|
1711
1699
|
"description": "An encoded model id such as anthropic:opus__xhigh. Null, or left out on create, uses the Workspace Default Model at run time, then Kosuke's choice among available workspace Credentials.",
|
|
@@ -3229,7 +3217,7 @@
|
|
|
3229
3217
|
"/api/organizations/{workspaceId}/lead/proposals": {
|
|
3230
3218
|
"post": {
|
|
3231
3219
|
"operationId": "workspacesLeadProposalsCreate",
|
|
3232
|
-
"summary": "Open a Lead Card in a member's Needs you that proposes one thing, with one line of why: your own, or from a Cron Run the Needs you of the member memberId names. kind start proposes starting a Backlog session, and is refused unless that member is idle. kind delete_ticket (with evidence), merge_tickets (with sessionIds, mergedContent and the promptRevision sessions get gave for each ticket in revisions) and create_cron (with name, prompt, crontab,
|
|
3220
|
+
"summary": "Open a Lead Card in a member's Needs you that proposes one thing, with one line of why: your own, or from a Cron Run the Needs you of the member memberId names. kind start proposes starting a Backlog session, and is refused unless that member is idle. kind delete_ticket (with evidence), merge_tickets (with sessionIds, mergedContent and the promptRevision sessions get gave for each ticket in revisions) and create_cron (with name, prompt, crontab, read in the Workspace Timezone, and projectIds, and no sessionId) change nothing until the member accepts the card. Pass the body whole with --body or --body-file.",
|
|
3233
3221
|
"tags": ["workspaces"],
|
|
3234
3222
|
"x-kosuke-command": ["workspaces", "lead-proposals", "create"],
|
|
3235
3223
|
"x-kosuke-sandbox-token": true,
|
|
@@ -3434,13 +3422,7 @@
|
|
|
3434
3422
|
"type": "string",
|
|
3435
3423
|
"minLength": 1,
|
|
3436
3424
|
"maxLength": 100,
|
|
3437
|
-
"description": "Five fields: minute, hour, day of month, month, day of week. At most one fire every 15 minutes."
|
|
3438
|
-
},
|
|
3439
|
-
"timezone": {
|
|
3440
|
-
"type": "string",
|
|
3441
|
-
"minLength": 1,
|
|
3442
|
-
"maxLength": 64,
|
|
3443
|
-
"description": "The IANA zone the crontab is read in, e.g. Europe/Zurich or UTC."
|
|
3425
|
+
"description": "Five fields: minute, hour, day of month, month, day of week, read in the Workspace Timezone (kosuke workspaces timezone-set). At most one fire every 15 minutes."
|
|
3444
3426
|
},
|
|
3445
3427
|
"projectIds": {
|
|
3446
3428
|
"minItems": 1,
|
|
@@ -3460,7 +3442,6 @@
|
|
|
3460
3442
|
"name",
|
|
3461
3443
|
"prompt",
|
|
3462
3444
|
"crontab",
|
|
3463
|
-
"timezone",
|
|
3464
3445
|
"projectIds"
|
|
3465
3446
|
]
|
|
3466
3447
|
}
|
|
@@ -4606,6 +4587,80 @@
|
|
|
4606
4587
|
}
|
|
4607
4588
|
}
|
|
4608
4589
|
},
|
|
4590
|
+
"/api/organizations/{workspaceId}/timezone": {
|
|
4591
|
+
"put": {
|
|
4592
|
+
"operationId": "workspacesTimezoneSet",
|
|
4593
|
+
"summary": "Set the Workspace Timezone, the IANA zone every cron of the workspace is read and shown in, e.g. Europe/Rome. Each enabled cron's next run moves to the new zone, except one already due, which fires on its slot. Refused, naming the crons, when any cron would fire more often than every 15 minutes or never in the new zone; nothing changes then. Sending the zone already set changes nothing. Owners and admins only.",
|
|
4594
|
+
"tags": ["workspaces"],
|
|
4595
|
+
"x-kosuke-command": ["workspaces", "timezone-set"],
|
|
4596
|
+
"x-kosuke-sandbox-token": true,
|
|
4597
|
+
"x-kosuke-orchestrator-token": true,
|
|
4598
|
+
"x-kosuke-cron-token": true,
|
|
4599
|
+
"x-kosuke-lead-token": true,
|
|
4600
|
+
"parameters": [
|
|
4601
|
+
{
|
|
4602
|
+
"name": "workspaceId",
|
|
4603
|
+
"in": "path",
|
|
4604
|
+
"required": true,
|
|
4605
|
+
"schema": {
|
|
4606
|
+
"type": "string",
|
|
4607
|
+
"minLength": 1
|
|
4608
|
+
}
|
|
4609
|
+
}
|
|
4610
|
+
],
|
|
4611
|
+
"requestBody": {
|
|
4612
|
+
"required": true,
|
|
4613
|
+
"content": {
|
|
4614
|
+
"application/json": {
|
|
4615
|
+
"schema": {
|
|
4616
|
+
"type": "object",
|
|
4617
|
+
"properties": {
|
|
4618
|
+
"timezone": {
|
|
4619
|
+
"type": "string",
|
|
4620
|
+
"minLength": 1,
|
|
4621
|
+
"maxLength": 64,
|
|
4622
|
+
"description": "The IANA zone every cron of the workspace is read and shown in, e.g. Europe/Rome or UTC."
|
|
4623
|
+
}
|
|
4624
|
+
},
|
|
4625
|
+
"required": ["timezone"]
|
|
4626
|
+
}
|
|
4627
|
+
}
|
|
4628
|
+
}
|
|
4629
|
+
},
|
|
4630
|
+
"responses": {
|
|
4631
|
+
"2XX": {
|
|
4632
|
+
"description": "Success envelope",
|
|
4633
|
+
"content": {
|
|
4634
|
+
"application/json": {
|
|
4635
|
+
"schema": {
|
|
4636
|
+
"$ref": "#/components/schemas/ApiSuccess"
|
|
4637
|
+
}
|
|
4638
|
+
}
|
|
4639
|
+
}
|
|
4640
|
+
},
|
|
4641
|
+
"4XX": {
|
|
4642
|
+
"description": "Error envelope",
|
|
4643
|
+
"content": {
|
|
4644
|
+
"application/json": {
|
|
4645
|
+
"schema": {
|
|
4646
|
+
"$ref": "#/components/schemas/ApiError"
|
|
4647
|
+
}
|
|
4648
|
+
}
|
|
4649
|
+
}
|
|
4650
|
+
},
|
|
4651
|
+
"5XX": {
|
|
4652
|
+
"description": "Error envelope",
|
|
4653
|
+
"content": {
|
|
4654
|
+
"application/json": {
|
|
4655
|
+
"schema": {
|
|
4656
|
+
"$ref": "#/components/schemas/ApiError"
|
|
4657
|
+
}
|
|
4658
|
+
}
|
|
4659
|
+
}
|
|
4660
|
+
}
|
|
4661
|
+
}
|
|
4662
|
+
}
|
|
4663
|
+
},
|
|
4609
4664
|
"/api/organizations/{workspaceId}/usage": {
|
|
4610
4665
|
"get": {
|
|
4611
4666
|
"operationId": "workspacesUsage",
|
|
@@ -5363,7 +5418,7 @@
|
|
|
5363
5418
|
"/api/projects/{projectId}/chat-sessions/{sessionId}": {
|
|
5364
5419
|
"get": {
|
|
5365
5420
|
"operationId": "sessionsGet",
|
|
5366
|
-
"summary": "Read one chat session with its latest job and pull request. A Backlog session also carries its promptRevision, which a merge proposal names for each ticket it was written from.",
|
|
5421
|
+
"summary": "Read one chat session with its URL, latest job and pull request. A Backlog session also carries its promptRevision, which a merge proposal names for each ticket it was written from.",
|
|
5367
5422
|
"tags": ["sessions"],
|
|
5368
5423
|
"x-kosuke-command": ["sessions", "get"],
|
|
5369
5424
|
"x-kosuke-sandbox-token": true,
|
|
@@ -12441,7 +12496,7 @@
|
|
|
12441
12496
|
"/api/user/profile": {
|
|
12442
12497
|
"get": {
|
|
12443
12498
|
"operationId": "userProfile",
|
|
12444
|
-
"summary": "Read your account: id, email, name, onboarding state, default model, auto-commit and
|
|
12499
|
+
"summary": "Read your account: id, email, name, onboarding state, default model, auto-commit setting and Reply Style.",
|
|
12445
12500
|
"tags": ["user"],
|
|
12446
12501
|
"x-kosuke-command": ["user", "profile"],
|
|
12447
12502
|
"x-kosuke-sandbox-token": true,
|