@llmnative/runner 1.1.2 → 1.3.0

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/openapi/v1.yaml CHANGED
@@ -8,6 +8,10 @@ info:
8
8
  the admin token of the machine, a platform key (`rk_platform_…`, from pairing) or a project key of a tenant (`rk_…`).
9
9
  A platform key (or the admin token) names the tenant with `X-Runner-Tenant`. The person a request is for is
10
10
  `X-Runner-User` (with the permission `act-as-user` for a project key). Errors are `{ "error": "<code>" }`.
11
+ A platform key paired with a `project` owns only the tenants `<project>` and `<project>-<tenant>`: any other is
12
+ answered as missing (403 `outside project` when it tries to make one).
13
+ Modules of the image (RUNNER_MODULES) serve `/v1/modules/<name>/…` for one tenant (a project key with the
14
+ permission `modules`, or a platform key with `X-Runner-Tenant`) and `/hooks/<name>/…` in public.
11
15
  servers:
12
16
  - url: https://runner.example.com
13
17
  components:
@@ -26,7 +30,7 @@ components:
26
30
  Account:
27
31
  type: object
28
32
  properties:
29
- provider: { type: string, enum: [claude-code, opencode-go, opencode] }
33
+ provider: { type: string, enum: [claude-code, opencode-go, opencode, anthropic, openai, gemini, mistral, deepseek, openrouter] }
30
34
  id: { type: string }
31
35
  label: { type: string }
32
36
  at: { type: string, format: date-time }
@@ -42,8 +46,9 @@ components:
42
46
  id: { type: string }
43
47
  kind: { type: string, enum: [platform, project] }
44
48
  tenant: { type: string }
49
+ project: { type: string, description: 'Platform keys: the project whose tenants it owns (<project>, <project>-…); none, every tenant' }
45
50
  name: { type: string }
46
- permissions: { type: array, items: { type: string, enum: [complete, chat, 'chat:tools', accounts, 'accounts:tenant', act-as-user, keys] } }
51
+ permissions: { type: array, items: { type: string, enum: [complete, chat, 'chat:tools', accounts, 'accounts:tenant', act-as-user, keys, modules] } }
47
52
  createdAt: { type: string, format: date-time }
48
53
  expiresAt: { type: [string, 'null'], format: date-time }
49
54
  ChatEvent:
@@ -68,7 +73,7 @@ paths:
68
73
  post:
69
74
  security: []
70
75
  summary: A pairing code (printed by the installer) gives a platform key, shown once
71
- requestBody: { content: { application/json: { schema: { type: object, properties: { code: { type: string }, name: { type: string } }, required: [code] } } } }
76
+ requestBody: { content: { application/json: { schema: { type: object, properties: { code: { type: string }, name: { type: string }, project: { type: string, pattern: '^[a-z0-9]{1,32}$', description: 'The project the platform key owns the tenants of (<project>, <project>-…); none, every tenant' } }, required: [code] } } } }
72
77
  responses:
73
78
  '200': { description: The key, content: { application/json: { schema: { type: object, properties: { key: { type: string }, record: { $ref: '#/components/schemas/Key' }, version: { type: string } } } } } }
74
79
  '401': { description: bad code }
@@ -77,7 +82,7 @@ paths:
77
82
  post:
78
83
  security: []
79
84
  summary: A platform asks to connect (device flow); the admin approves it in the console at approveUrl
80
- requestBody: { content: { application/json: { schema: { type: object, properties: { name: { type: string } } } } } }
85
+ requestBody: { content: { application/json: { schema: { type: object, properties: { name: { type: string }, project: { type: string, pattern: '^[a-z0-9]{1,32}$', description: 'The project the platform key owns the tenants of (<project>, <project>-…); none, every tenant' } } } } } }
81
86
  responses:
82
87
  '201': { description: '{ request (secret of the platform), code (shown on both sides), approveUrl, expiresAt, interval }' }
83
88
  '429': { description: busy (too many requests waiting) }
@@ -91,7 +96,13 @@ paths:
91
96
  /v1/admin/pairing/requests:
92
97
  get:
93
98
  summary: (admin token) The pairing requests waiting
94
- responses: { '200': { description: '{ requests: [{ code, name, from?, createdAt, expiresAt }] }' } }
99
+ responses: { '200': { description: '{ requests: [{ code, name, project?, from?, createdAt, expiresAt }] }' } }
100
+ /v1/admin/keys/{key}/project:
101
+ put:
102
+ summary: (admin token) The project of a platform key; null, every tenant (as keys made before 1.2)
103
+ parameters: [{ name: key, in: path, required: true, schema: { type: string } }]
104
+ requestBody: { content: { application/json: { schema: { type: object, properties: { project: { type: [string, 'null'] } }, required: [project] } } } }
105
+ responses: { '200': { description: '{ record }' }, '400': { description: invalid project }, '404': { description: not found } }
95
106
  /v1/admin/pairing/requests/{code}/{answer}:
96
107
  post:
97
108
  summary: (admin token) Approves or refuses a pairing request
@@ -157,8 +168,8 @@ paths:
157
168
  responses: { '200': { description: '{ connected, account }' }, '409': { description: 'refused | no-session | no-token' } }
158
169
  /v1/accounts/{provider}:
159
170
  post:
160
- summary: A key (opencode-go, opencode), or a token made with claude setup-token (claude-code)
161
- parameters: [{ name: provider, in: path, required: true, schema: { enum: [claude-code, opencode-go, opencode] } }, { $ref: '#/components/parameters/tenant' }, { $ref: '#/components/parameters/user' }]
171
+ summary: A key (opencode-go, opencode, or the API key of a provider by use opencode runs), or a token made with claude setup-token (claude-code)
172
+ parameters: [{ name: provider, in: path, required: true, schema: { enum: [claude-code, opencode-go, opencode, anthropic, openai, gemini, mistral, deepseek, openrouter] } }, { $ref: '#/components/parameters/tenant' }, { $ref: '#/components/parameters/user' }]
162
173
  requestBody: { content: { application/json: { schema: { type: object, properties: { key: { type: string }, token: { type: string }, label: { type: string } } } } } }
163
174
  responses: { '201': { description: '{ account }' } }
164
175
  /v1/accounts/{provider}/{id}:
@@ -180,7 +191,7 @@ paths:
180
191
  post:
181
192
  summary: (complete) One answer, no tools
182
193
  parameters: [{ $ref: '#/components/parameters/tenant' }, { $ref: '#/components/parameters/user' }]
183
- requestBody: { content: { application/json: { schema: { type: object, properties: { provider: { enum: [claude-code, opencode-go] }, model: { type: string }, prompt: { type: string, maxLength: 200000 }, effort: { enum: [low, medium, high, xhigh, max] } }, required: [provider, model, prompt] } } } }
194
+ requestBody: { content: { application/json: { schema: { type: object, properties: { provider: { enum: [claude-code, opencode-go, opencode, anthropic, openai, gemini, mistral, deepseek, openrouter] }, model: { type: string, description: 'For opencode, bare or as opencode names it (gemini → google/<model>)' }, prompt: { type: string, maxLength: 200000 }, effort: { enum: [low, medium, high, xhigh, max] } }, required: [provider, model, prompt] } } } }
184
195
  responses:
185
196
  '200': { description: '{ text, usage? }' }
186
197
  '409': { description: 'no-provider | no-credit (with until)', content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmnative/runner",
3
- "version": "1.1.2",
3
+ "version": "1.3.0",
4
4
  "description": "LLMNative Runner: Claude Code and opencode on your own VPS, for many tenants, with subscriptions per person. Client, management UI and installer of the runner.",
5
5
  "type": "module",
6
6
  "exports": {