@kosuke-ai/cli 1.0.0 → 1.0.1-next.3

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 CHANGED
@@ -24,6 +24,36 @@ The token comes from `--api-key`, then `KOSUKE_API_KEY`, then the file
24
24
  `KOSUKE_CONFIG_DIR`). `--api-url` / `KOSUKE_API_URL` point it at another
25
25
  deployment.
26
26
 
27
+ ## Nightly builds
28
+
29
+ The `next` dist-tag tracks the newest build of `main` that touched `apps/cli`
30
+ (a burst of merges publishes only the last one), so the CLI can be as new as
31
+ stage without waiting for a `cli-v*` release:
32
+
33
+ ```sh
34
+ npm install -g @kosuke-ai/cli@next
35
+ ```
36
+
37
+ `next` is a moving tag: the same command updates. Each build is a prerelease
38
+ (`1.0.1-next.12`), and npm never resolves a prerelease from a plain range, so
39
+ `npm install -g @kosuke-ai/cli` keeps giving the released line.
40
+
41
+ `kosuke auth login` writes the token, and the API URL when it is not the
42
+ default, into one `credentials.json` that replaces whatever was there, so a
43
+ config directory holds exactly one deployment and logging into stage would
44
+ overwrite a production login. Give stage its own directory, and keep
45
+ `KOSUKE_CONFIG_DIR` exported for every `kosuke` call meant for stage: a new
46
+ shell without it is silently back on production.
47
+
48
+ ```sh
49
+ export KOSUKE_CONFIG_DIR=~/.config/kosuke-stage
50
+ kosuke auth login --api-url https://app.stage.kosuke.ai
51
+ kosuke projects list # same shell, so it reads the stage token and URL
52
+ ```
53
+
54
+ A shell alias or direnv keeps the variable set; `kosuke auth status` prints
55
+ which URL, which token source and which credentials file won.
56
+
27
57
  ## Generated from the API
28
58
 
29
59
  `openapi.json` is the platform's own `GET /api/openapi.json`, snapshotted by
@@ -8,61 +8,62 @@ import { operation as o6 } from './preview/share-create.js';
8
8
  import { operation as o7 } from './preview/share-delete.js';
9
9
  import { operation as o8 } from './preview/share-get.js';
10
10
  import { operation as o9 } from './preview/shared.js';
11
- import { operation as o10 } from './projects/create.js';
12
- import { operation as o11 } from './projects/delete.js';
13
- import { operation as o12 } from './projects/env-vars-add.js';
14
- import { operation as o13 } from './projects/env-vars-remove.js';
15
- import { operation as o14 } from './projects/get.js';
16
- import { operation as o15 } from './projects/list.js';
17
- import { operation as o16 } from './projects/services-add.js';
18
- import { operation as o17 } from './projects/services-list.js';
19
- import { operation as o18 } from './projects/services-remove.js';
20
- import { operation as o19 } from './projects/services-update.js';
21
- import { operation as o20 } from './projects/settings-get.js';
22
- import { operation as o21 } from './projects/settings-import.js';
23
- import { operation as o22 } from './projects/settings-update.js';
24
- import { operation as o23 } from './projects/skills.js';
25
- import { operation as o24 } from './projects/update.js';
26
- import { operation as o25 } from './sessions/activate.js';
27
- import { operation as o26 } from './sessions/checklist-generate.js';
28
- import { operation as o27 } from './sessions/checklist-get.js';
29
- import { operation as o28 } from './sessions/comments-add.js';
30
- import { operation as o29 } from './sessions/comments-delete.js';
31
- import { operation as o30 } from './sessions/comments-list.js';
32
- import { operation as o31 } from './sessions/comments-update.js';
33
- import { operation as o32 } from './sessions/create.js';
34
- import { operation as o33 } from './sessions/delete.js';
35
- import { operation as o34 } from './sessions/diff-files.js';
36
- import { operation as o35 } from './sessions/diff-patch.js';
37
- import { operation as o36 } from './sessions/edit-prompt.js';
38
- import { operation as o37 } from './sessions/files-get.js';
39
- import { operation as o38 } from './sessions/files-list.js';
40
- import { operation as o39 } from './sessions/files-write.js';
41
- import { operation as o40 } from './sessions/get.js';
42
- import { operation as o41 } from './sessions/git-commit.js';
43
- import { operation as o42 } from './sessions/git-commit-message.js';
44
- import { operation as o43 } from './sessions/git-push.js';
45
- import { operation as o44 } from './sessions/git-state.js';
46
- import { operation as o45 } from './sessions/jobs-cancel.js';
47
- import { operation as o46 } from './sessions/jobs-get.js';
48
- import { operation as o47 } from './sessions/list.js';
49
- import { operation as o48 } from './sessions/messages.js';
50
- import { operation as o49 } from './sessions/search.js';
51
- import { operation as o50 } from './sessions/send.js';
52
- import { operation as o51 } from './sessions/update.js';
53
- import { operation as o52 } from './workspaces/access-status.js';
54
- import { operation as o53 } from './workspaces/ai-provider-get.js';
55
- import { operation as o54 } from './workspaces/ai-provider-remove.js';
56
- import { operation as o55 } from './workspaces/ai-provider-set.js';
57
- import { operation as o56 } from './workspaces/credits.js';
58
- import { operation as o57 } from './workspaces/get.js';
59
- import { operation as o58 } from './workspaces/getting-started-get.js';
60
- import { operation as o59 } from './workspaces/getting-started-update.js';
61
- import { operation as o60 } from './workspaces/list.js';
62
- import { operation as o61 } from './workspaces/members.js';
63
- import { operation as o62 } from './workspaces/sandbox-limit.js';
64
- import { operation as o63 } from './workspaces/stop-sandboxes.js';
65
- import { operation as o64 } from './workspaces/usage.js';
11
+ import { operation as o10 } from './preview/shared-artifact.js';
12
+ import { operation as o11 } from './projects/create.js';
13
+ import { operation as o12 } from './projects/delete.js';
14
+ import { operation as o13 } from './projects/env-vars-add.js';
15
+ import { operation as o14 } from './projects/env-vars-remove.js';
16
+ import { operation as o15 } from './projects/get.js';
17
+ import { operation as o16 } from './projects/list.js';
18
+ import { operation as o17 } from './projects/services-add.js';
19
+ import { operation as o18 } from './projects/services-list.js';
20
+ import { operation as o19 } from './projects/services-remove.js';
21
+ import { operation as o20 } from './projects/services-update.js';
22
+ import { operation as o21 } from './projects/settings-get.js';
23
+ import { operation as o22 } from './projects/settings-import.js';
24
+ import { operation as o23 } from './projects/settings-update.js';
25
+ import { operation as o24 } from './projects/skills.js';
26
+ import { operation as o25 } from './projects/update.js';
27
+ import { operation as o26 } from './sessions/activate.js';
28
+ import { operation as o27 } from './sessions/checklist-generate.js';
29
+ import { operation as o28 } from './sessions/checklist-get.js';
30
+ import { operation as o29 } from './sessions/comments-add.js';
31
+ import { operation as o30 } from './sessions/comments-delete.js';
32
+ import { operation as o31 } from './sessions/comments-list.js';
33
+ import { operation as o32 } from './sessions/comments-update.js';
34
+ import { operation as o33 } from './sessions/create.js';
35
+ import { operation as o34 } from './sessions/delete.js';
36
+ import { operation as o35 } from './sessions/diff-files.js';
37
+ import { operation as o36 } from './sessions/diff-patch.js';
38
+ import { operation as o37 } from './sessions/edit-prompt.js';
39
+ import { operation as o38 } from './sessions/files-get.js';
40
+ import { operation as o39 } from './sessions/files-list.js';
41
+ import { operation as o40 } from './sessions/files-write.js';
42
+ import { operation as o41 } from './sessions/get.js';
43
+ import { operation as o42 } from './sessions/git-commit.js';
44
+ import { operation as o43 } from './sessions/git-commit-message.js';
45
+ import { operation as o44 } from './sessions/git-push.js';
46
+ import { operation as o45 } from './sessions/git-state.js';
47
+ import { operation as o46 } from './sessions/jobs-cancel.js';
48
+ import { operation as o47 } from './sessions/jobs-get.js';
49
+ import { operation as o48 } from './sessions/list.js';
50
+ import { operation as o49 } from './sessions/messages.js';
51
+ import { operation as o50 } from './sessions/search.js';
52
+ import { operation as o51 } from './sessions/send.js';
53
+ import { operation as o52 } from './sessions/update.js';
54
+ import { operation as o53 } from './workspaces/access-status.js';
55
+ import { operation as o54 } from './workspaces/ai-provider-get.js';
56
+ import { operation as o55 } from './workspaces/ai-provider-remove.js';
57
+ import { operation as o56 } from './workspaces/ai-provider-set.js';
58
+ import { operation as o57 } from './workspaces/credits.js';
59
+ import { operation as o58 } from './workspaces/get.js';
60
+ import { operation as o59 } from './workspaces/getting-started-get.js';
61
+ import { operation as o60 } from './workspaces/getting-started-update.js';
62
+ import { operation as o61 } from './workspaces/list.js';
63
+ import { operation as o62 } from './workspaces/members.js';
64
+ import { operation as o63 } from './workspaces/sandbox-limit.js';
65
+ import { operation as o64 } from './workspaces/stop-sandboxes.js';
66
+ import { operation as o65 } from './workspaces/usage.js';
66
67
  export const operations = [
67
68
  o0,
68
69
  o1,
@@ -129,4 +130,5 @@ export const operations = [
129
130
  o62,
130
131
  o63,
131
132
  o64,
133
+ o65,
132
134
  ];
@@ -0,0 +1,19 @@
1
+ export const operation = {
2
+ "method": "get",
3
+ "path": "/api/shared-previews/{slug}/artifacts/{artifactId}",
4
+ "command": [
5
+ "preview",
6
+ "shared",
7
+ "artifact"
8
+ ],
9
+ "summary": "Read one artifact behind a public share link. No credential needed.",
10
+ "pathParams": [
11
+ "slug",
12
+ "artifactId"
13
+ ],
14
+ "query": [],
15
+ "body": null,
16
+ "multipart": null,
17
+ "attachments": false,
18
+ "anonymous": true
19
+ };
package/openapi.json CHANGED
@@ -5176,6 +5176,69 @@
5176
5176
  },
5177
5177
  "security": []
5178
5178
  }
5179
+ },
5180
+ "/api/shared-previews/{slug}/artifacts/{artifactId}": {
5181
+ "get": {
5182
+ "operationId": "previewSharedArtifact",
5183
+ "summary": "Read one artifact behind a public share link. No credential needed.",
5184
+ "tags": ["preview"],
5185
+ "x-kosuke-command": ["preview", "shared", "artifact"],
5186
+ "parameters": [
5187
+ {
5188
+ "name": "slug",
5189
+ "in": "path",
5190
+ "required": true,
5191
+ "schema": {
5192
+ "type": "string",
5193
+ "minLength": 1,
5194
+ "maxLength": 64
5195
+ }
5196
+ },
5197
+ {
5198
+ "name": "artifactId",
5199
+ "in": "path",
5200
+ "required": true,
5201
+ "schema": {
5202
+ "type": "string",
5203
+ "format": "uuid",
5204
+ "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)$"
5205
+ }
5206
+ }
5207
+ ],
5208
+ "responses": {
5209
+ "2XX": {
5210
+ "description": "Success envelope",
5211
+ "content": {
5212
+ "application/json": {
5213
+ "schema": {
5214
+ "$ref": "#/components/schemas/ApiSuccess"
5215
+ }
5216
+ }
5217
+ }
5218
+ },
5219
+ "4XX": {
5220
+ "description": "Error envelope",
5221
+ "content": {
5222
+ "application/json": {
5223
+ "schema": {
5224
+ "$ref": "#/components/schemas/ApiError"
5225
+ }
5226
+ }
5227
+ }
5228
+ },
5229
+ "5XX": {
5230
+ "description": "Error envelope",
5231
+ "content": {
5232
+ "application/json": {
5233
+ "schema": {
5234
+ "$ref": "#/components/schemas/ApiError"
5235
+ }
5236
+ }
5237
+ }
5238
+ }
5239
+ },
5240
+ "security": []
5241
+ }
5179
5242
  }
5180
5243
  },
5181
5244
  "components": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kosuke-ai/cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1-next.3",
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": {