@nylorun/admin 0.7.0-beta → 0.9.0-beta
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 +44 -0
- package/README.md +7 -6
- package/dist/client.d.ts +6 -6
- package/dist/client.js +31 -21
- package/dist/derived-credentials.d.ts +1 -1
- package/dist/derived-credentials.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/studio-login.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.0-beta
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- b352feb: **File artifacts, message parts and capability links (protocol 6).** Upgrade these with the Runtime: they speak protocol 6, which this Runtime serves beside 4 and 5. See MIGRATION.md.
|
|
8
|
+
|
|
9
|
+
- **`@nylorun/runtime`: file artifacts.** A file is an artifact: an `af_` id, a name and numbered immutable versions, with rows in the new `artifacts` and `artifact_versions` tables (migration `0004_artifacts`) and bytes in the Object store (`BlobStore`). `POST /v1/artifacts?name=&sessionId=` uploads a file in one streamed request and `POST /v1/artifacts/{id}/versions` adds a version, within the Tenant's limits (`GET`/`PUT /v1/tenant/artifacts`: 100 MiB per file and 10 GiB in all by default); a body past either is `413 limit_exceeded`, refused mid-stream with nothing stored. `GET /v1/artifacts` lists them (by session), `GET /v1/artifacts/{id}` reads one with its versions, `GET /v1/artifacts/{id}/versions/{n|latest}/content` downloads through the Runtime with HTTP Range (`206`, `Content-Range`, `416`), and `DELETE /v1/artifacts/{id}` deletes it with its bytes. A session's artifacts go with it on a sessions reset, and appear in its history as `artifact.created`, `artifact.version.created` and `artifact.deleted` (new in the event catalog). A subject reaches only the artifacts of their own sessions.
|
|
10
|
+
- **`@nylorun/runtime`: capability links.** `POST /v1/artifacts/{id}/links` mints a short-lived path, `/v1/artifact-links/<token>`, that downloads one version (with Range) with no credential and no `Nylorun-Protocol`: an ES256 JWT (`typ: nylorun-artifact+jwt`) signed with the Tenant's signing key, at most 15 minutes, and dead once the artifact is deleted. The Host logs its path without the token.
|
|
11
|
+
- **Breaking (`@nylorun/core`, `@nylorun/runtime`): message `parts`.** A user message may carry `parts`: `text`, and `file` by `artifactId` (and `version`, else the latest, pinned when the message is accepted). Model-gate reads the file from the Object store: an image goes to the model as image input, a text file as text, and any other file fails the call (`invalid_request`). The record and the transcript hold only the reference. The gateway builds its `BlobStore` from `NYLORUN_OBJECT_STORE_*` (the Tenant's `fs` store without it). `PROTOCOL_VERSION` is 6; `HOST_PROTOCOL` is 4–6 and protocol 6 clients require the feature `artifacts`.
|
|
12
|
+
- **`@nylorun/runtime`: `save_artifact`.** A session with a sandbox gets the `nylorun.artifacts` capability, whose `save_artifact` tool saves a sandbox file (`path`) or text (`content`) as an artifact of the session, carrying the turn and tool call on its event.
|
|
13
|
+
- **Breaking (`@nylorun/runtime`): `MediaStore` is removed.** `MediaStore` and `localMedia` leave `@nylorun/runtime/node`, and `piModel` takes `files` (a resolver from an artifact reference to its bytes) instead of `media`; images are file artifacts. The image checks (`decodeImageBase64`, `validateImageBytes`, `IMAGE_MEDIA_TYPES`, `MAX_IMAGE_BYTES`) stay.
|
|
14
|
+
- **`@nylorun/agents`:** `client.artifacts` (`upload`, `uploadVersion`, `list`, `get`, `download` with a range, `link`, `delete`), also on `BrowserClient`, and `session.inputParts(parts)`. A request with a body of its own type keeps it.
|
|
15
|
+
- `@nylorun/admin`, `@nylorun/cli`, `nylorun`, `@nylorun/studio`: speak protocol 6.
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Pin core to the tested release.
|
|
20
|
+
- Updated dependencies [b352feb]
|
|
21
|
+
- Updated dependencies [6077272]
|
|
22
|
+
- Updated dependencies [b6bf1f5]
|
|
23
|
+
- Updated dependencies [8ed4ea6]
|
|
24
|
+
- Updated dependencies [678e085]
|
|
25
|
+
- Updated dependencies [926711b]
|
|
26
|
+
- @nylorun/core@0.12.0-beta
|
|
27
|
+
|
|
28
|
+
## 0.8.0-beta
|
|
29
|
+
|
|
30
|
+
### Minor Changes
|
|
31
|
+
|
|
32
|
+
- 4b9906f: **Breaking: "Tenant" replaces "stack", and `nylorun start` works anywhere.** Each local installation holds one Tenant, and its name is the Tenant's name, so help, output, errors and docs say Tenant. See MIGRATION.md.
|
|
33
|
+
|
|
34
|
+
- **Breaking (`nylorun`): selection.** Every command acts on the Tenant `--tenant <name>` names (replaces `--name`, which is removed), else `NYLORUN_TENANT` (replaces `NYLORUN_STACK`), else the Project link's `tenant`; `start` in a project names a new one after the project directory. Outside a project, or with `start --no-link`, commands act on the Tenant `default`. In a project without a link, commands other than `start` exit 2 and list the machine's Tenants. A name starting with `tn_` (a Tenant id) is refused.
|
|
35
|
+
- **Breaking (`nylorun`): files.** Host roots are under `~/.nylorun/tenants/<name>/` (was `~/.nylorun/stacks/<name>/`) with `tenant.json` (was `stack.json`); the `.env` key is `NYLORUN_TENANT_NAME` (was `NYLORUN_STACK_NAME`); `NYLORUN_COMPOSE_PROJECT` replaces `NYLORUN_STACK_PROJECT`. Compose projects stay `nylorun-<name>`. Every command first moves 0.4 Host roots from `~/.nylorun/stacks/` to `~/.nylorun/tenants/` (renaming `stack.json` and the `.env` key), so they keep their volumes and keys. `nylorun ls` lists only directories with `tenant.json`.
|
|
36
|
+
- **Breaking (`nylorun`): removed.** `nylorun legacy` and all handling of the single stack of releases before 0.4; the hidden `nylorun stack <cmd>` alias; `nylorun doctor stack|runtime`. Output says Tenant: `ls` prints `TENANT` and JSON `{ "tenants": [...] }`, `status` prints the Tenant id on its own line, and `doctor`'s row is `tenant`.
|
|
37
|
+
- **Breaking: Project link format 3.** `.nylorun/link.json` is `{ "format": 3, "tenant", "tenantId", "hostUrl", "hostId" }`; `tenant` replaces `stack`. `@nylorun/agents`, `@nylorun/cli` and `@nylorun/admin` refuse an older link and name `npx nylorun start`, which rewrites it. `@nylorun/core`'s `ProjectLinkFileSchema` parses formats 0–3 with `tenant`.
|
|
38
|
+
- **Breaking (`@nylorun/admin`):** `createAdmin({ tenant })` replaces `{ stack }`, `tenantHostRoot(name)` replaces `stackHostRoot(name)`, and local resolution reads `NYLORUN_TENANT` and the link's `tenant`.
|
|
39
|
+
- `@nylorun/cli`: `status` and `endpoints` drop the `stack` line and JSON key; messages say Tenant. `@nylorun/agents`: a Runtime too old for the client says "update the Runtime (npx nylorun@latest start)". `@nylorun/studio`: setup hints say Tenant. `@nylorun/create-agent`: the next steps describe `npx nylorun@beta start` as this project's Tenant and its link.
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- Pin core to the tested release.
|
|
44
|
+
- Updated dependencies [4b9906f]
|
|
45
|
+
- @nylorun/core@0.11.0-beta
|
|
46
|
+
|
|
3
47
|
## 0.7.0-beta
|
|
4
48
|
|
|
5
49
|
### Major Changes
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ import { createAdmin } from "@nylorun/admin";
|
|
|
9
9
|
|
|
10
10
|
// Resolution: explicit options → NYLORUN_ADMIN_URL + NYLORUN_ADMIN_KEY → local Host
|
|
11
11
|
const admin = createAdmin();
|
|
12
|
-
// or: createAdmin({ url, key }) / createAdmin({
|
|
12
|
+
// or: createAdmin({ url, key }) / createAdmin({ tenant: "my-app" }) / createAdmin({ home })
|
|
13
13
|
|
|
14
14
|
const { tenant } = await admin.status();
|
|
15
15
|
// tenant: { id, name, state: "open" | "unavailable", envelope, cause? }
|
|
@@ -38,10 +38,11 @@ so rotating the admin key rotates every derived key. `nylorun start` writes the
|
|
|
38
38
|
`project` key into a Project's `.nylorun/credentials.json`.
|
|
39
39
|
|
|
40
40
|
Local Host resolution reads `host.json` and `host-credentials.json` from the
|
|
41
|
-
Host root: `options.home`, else `NYLORUN_HOME`, else the
|
|
42
|
-
`~/.nylorun/
|
|
43
|
-
`
|
|
44
|
-
from `options.cwd` upwards
|
|
41
|
+
Host root: `options.home`, else `NYLORUN_HOME`, else the Tenant's Host root
|
|
42
|
+
`~/.nylorun/tenants/<tenant>/` for the local Tenant named by `options.tenant`,
|
|
43
|
+
`NYLORUN_TENANT` or the Project link (`tenant` in `.nylorun/link.json`, format
|
|
44
|
+
3, found from `options.cwd` upwards; a link from an older nylorun throws
|
|
45
|
+
`connection_missing`). On POSIX the credentials file must be owned by the
|
|
45
46
|
user and not group- or world-readable. First use checks `/health`
|
|
46
47
|
compatibility and throws `incompatible_host` on mismatch.
|
|
47
48
|
|
|
@@ -51,7 +52,7 @@ Tenant.
|
|
|
51
52
|
|
|
52
53
|
Errors are `AdminError` with a registry `code` from `@nylorun/core`
|
|
53
54
|
(`ERROR_CODES`). Re-exports: `PROTOCOL_FEATURES`, `ERROR_CODES`,
|
|
54
|
-
`compareVersions`, `deriveStudioToken`, `deriveTenantKey`, `
|
|
55
|
+
`compareVersions`, `deriveStudioToken`, `deriveTenantKey`, `tenantHostRoot`,
|
|
55
56
|
`PROJECT_PRINCIPAL_ID`.
|
|
56
57
|
|
|
57
58
|
Developer applications do **not** depend on this package — only managing
|
package/dist/client.d.ts
CHANGED
|
@@ -16,15 +16,15 @@ export interface ResolvedAdmin {
|
|
|
16
16
|
export interface AdminConnectionOptions {
|
|
17
17
|
url?: string;
|
|
18
18
|
key?: string;
|
|
19
|
-
/** The Host root itself (overrides `NYLORUN_HOME` and the
|
|
19
|
+
/** The Host root itself (overrides `NYLORUN_HOME` and the Tenant). */
|
|
20
20
|
home?: string;
|
|
21
|
-
/** The local
|
|
22
|
-
|
|
23
|
-
/** Where to look for a Project link naming the
|
|
21
|
+
/** The local Tenant whose Host root (`~/.nylorun/tenants/<tenant>/`) to read. */
|
|
22
|
+
tenant?: string;
|
|
23
|
+
/** Where to look for a Project link naming the Tenant; defaults to the working directory. */
|
|
24
24
|
cwd?: string;
|
|
25
25
|
}
|
|
26
|
-
/** A local
|
|
27
|
-
export declare function
|
|
26
|
+
/** A local Tenant's Host root: `~/.nylorun/tenants/<name>/`. */
|
|
27
|
+
export declare function tenantHostRoot(name: string): string;
|
|
28
28
|
/**
|
|
29
29
|
* Resolve Admin API connection once: options → environment → local Host.
|
|
30
30
|
*/
|
package/dist/client.js
CHANGED
|
@@ -9,15 +9,16 @@ function env(name) {
|
|
|
9
9
|
const value = process.env[name];
|
|
10
10
|
return value === undefined || value.trim() === "" ? undefined : value;
|
|
11
11
|
}
|
|
12
|
-
/** A local
|
|
13
|
-
export function
|
|
14
|
-
return resolve(join(homedir(), ".nylorun", "
|
|
12
|
+
/** A local Tenant's Host root: `~/.nylorun/tenants/<name>/`. */
|
|
13
|
+
export function tenantHostRoot(name) {
|
|
14
|
+
return resolve(join(homedir(), ".nylorun", "tenants", name));
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* The
|
|
18
|
-
* stops at the home directory, which holds the
|
|
17
|
+
* The Tenant a Project link names (`.nylorun/link.json`, format 3), from `cwd` upwards, or the
|
|
18
|
+
* path of a link from an older nylorun. The walk stops at the home directory, which holds the
|
|
19
|
+
* Tenants and is never a Project.
|
|
19
20
|
*/
|
|
20
|
-
function
|
|
21
|
+
function linkedTenant(cwd) {
|
|
21
22
|
const real = (path) => {
|
|
22
23
|
try {
|
|
23
24
|
return realpathSync(path);
|
|
@@ -30,41 +31,47 @@ function linkedStack(cwd) {
|
|
|
30
31
|
let directory = real(resolve(cwd));
|
|
31
32
|
const root = parse(directory).root;
|
|
32
33
|
while (directory !== stop) {
|
|
34
|
+
const path = join(directory, ".nylorun", "link.json");
|
|
33
35
|
let raw;
|
|
34
36
|
try {
|
|
35
|
-
raw = readFileSync(
|
|
37
|
+
raw = readFileSync(path, "utf8");
|
|
36
38
|
}
|
|
37
39
|
catch {
|
|
38
40
|
/* no link here */
|
|
39
41
|
}
|
|
40
42
|
if (raw !== undefined) {
|
|
41
43
|
try {
|
|
42
|
-
|
|
44
|
+
const link = ProjectLinkFileSchema.parse(JSON.parse(raw));
|
|
45
|
+
return link.format < 3 ? { olderLink: path } : { tenant: link.tenant };
|
|
43
46
|
}
|
|
44
47
|
catch {
|
|
45
|
-
return
|
|
48
|
+
return {};
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
51
|
if (directory === root)
|
|
49
|
-
return
|
|
52
|
+
return {};
|
|
50
53
|
directory = dirname(directory);
|
|
51
54
|
}
|
|
52
|
-
return
|
|
55
|
+
return {};
|
|
53
56
|
}
|
|
54
57
|
/**
|
|
55
|
-
* The Host root of the local Host: `options.home`, `NYLORUN_HOME`, or the Host root of the
|
|
56
|
-
* named by `options.
|
|
58
|
+
* The Host root of the local Host: `options.home`, `NYLORUN_HOME`, or the Host root of the
|
|
59
|
+
* Tenant named by `options.tenant`, `NYLORUN_TENANT` or the Project link. No `home` when none
|
|
60
|
+
* names one; `olderLink` when the Project link is from an older nylorun.
|
|
57
61
|
*/
|
|
58
62
|
function resolveHome(options) {
|
|
59
63
|
if (options?.home !== undefined && options.home.trim() !== "")
|
|
60
|
-
return resolve(options.home);
|
|
64
|
+
return { home: resolve(options.home) };
|
|
61
65
|
const fromEnv = env("NYLORUN_HOME");
|
|
62
66
|
if (fromEnv)
|
|
63
|
-
return resolve(fromEnv);
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
return { home: resolve(fromEnv) };
|
|
68
|
+
const named = options?.tenant?.trim() || env("NYLORUN_TENANT")?.trim();
|
|
69
|
+
if (named)
|
|
70
|
+
return { home: tenantHostRoot(named) };
|
|
71
|
+
const linked = linkedTenant(options?.cwd ?? process.cwd());
|
|
72
|
+
return linked.tenant
|
|
73
|
+
? { home: tenantHostRoot(linked.tenant) }
|
|
74
|
+
: { olderLink: linked.olderLink };
|
|
68
75
|
}
|
|
69
76
|
function connectionMissing(message) {
|
|
70
77
|
throw new AdminError("connection_missing", message);
|
|
@@ -73,7 +80,7 @@ function sourcesTriedMessage(home) {
|
|
|
73
80
|
return (`Tried options (url + key), environment (NYLORUN_ADMIN_URL + NYLORUN_ADMIN_KEY), ` +
|
|
74
81
|
(home
|
|
75
82
|
? `and local Host settings (host.json + host-credentials.json under ${home}).`
|
|
76
|
-
: "and local Host settings (no
|
|
83
|
+
: "and local Host settings (no Tenant named: pass `tenant`, set NYLORUN_TENANT or " +
|
|
77
84
|
"NYLORUN_HOME, or run in a Project that `npx nylorun start` linked)."));
|
|
78
85
|
}
|
|
79
86
|
function assertCredentialsSafe(path) {
|
|
@@ -142,7 +149,7 @@ function readLocalHost(home) {
|
|
|
142
149
|
* Resolve Admin API connection once: options → environment → local Host.
|
|
143
150
|
*/
|
|
144
151
|
export function resolveAdminConnection(options) {
|
|
145
|
-
const home = resolveHome(options);
|
|
152
|
+
const { home, olderLink } = resolveHome(options);
|
|
146
153
|
const optionUrl = options?.url?.trim() || undefined;
|
|
147
154
|
const optionKey = options?.key?.trim() || undefined;
|
|
148
155
|
if (optionUrl || optionKey) {
|
|
@@ -169,6 +176,9 @@ export function resolveAdminConnection(options) {
|
|
|
169
176
|
...(home ? { home } : {}),
|
|
170
177
|
};
|
|
171
178
|
}
|
|
179
|
+
if (olderLink) {
|
|
180
|
+
connectionMissing(`The Project link at ${olderLink} is from an older nylorun. Run "npx nylorun start" in this project to link it again.`);
|
|
181
|
+
}
|
|
172
182
|
const local = home === undefined ? undefined : readLocalHost(home);
|
|
173
183
|
if (local) {
|
|
174
184
|
return {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
export declare function deriveStudioToken(adminKey: string, tenantId: string): string;
|
|
7
7
|
/**
|
|
8
8
|
* The derived principal that Projects use. The Host registers it on its Tenant by default
|
|
9
|
-
* (`NYLORUN_DERIVED_PRINCIPALS`), and `nylorun start` derives its key from the
|
|
9
|
+
* (`NYLORUN_DERIVED_PRINCIPALS`), and `nylorun start` derives its key from the Tenant's admin
|
|
10
10
|
* key into the Project's `.nylorun/credentials.json`.
|
|
11
11
|
*/
|
|
12
12
|
export declare const PROJECT_PRINCIPAL_ID = "project";
|
|
@@ -16,7 +16,7 @@ export function deriveStudioToken(adminKey, tenantId) {
|
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* The derived principal that Projects use. The Host registers it on its Tenant by default
|
|
19
|
-
* (`NYLORUN_DERIVED_PRINCIPALS`), and `nylorun start` derives its key from the
|
|
19
|
+
* (`NYLORUN_DERIVED_PRINCIPALS`), and `nylorun start` derives its key from the Tenant's admin
|
|
20
20
|
* key into the Project's `.nylorun/credentials.json`.
|
|
21
21
|
*/
|
|
22
22
|
export const PROJECT_PRINCIPAL_ID = "project";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { AdminStatus, HostTenant, TenantEnvelope } from "@nylorun/core/contracts";
|
|
2
2
|
import { ERROR_CODES, PROTOCOL_FEATURES, compareVersions, type ErrorCode } from "@nylorun/core/compatibility";
|
|
3
|
-
import {
|
|
3
|
+
import { tenantHostRoot, type AdminConnectionOptions } from "./client.js";
|
|
4
4
|
import { PROJECT_PRINCIPAL_ID, deriveStudioToken, deriveTenantKey } from "./derived-credentials.js";
|
|
5
5
|
import { AdminError } from "./errors.js";
|
|
6
6
|
export { ERROR_CODES, PROTOCOL_FEATURES, compareVersions };
|
|
7
7
|
export type { ErrorCode };
|
|
8
8
|
export { AdminError };
|
|
9
|
-
export { PROJECT_PRINCIPAL_ID, deriveStudioToken, deriveTenantKey,
|
|
9
|
+
export { PROJECT_PRINCIPAL_ID, deriveStudioToken, deriveTenantKey, tenantHostRoot };
|
|
10
10
|
export { mintStudioLoginToken } from "./studio-login.js";
|
|
11
11
|
export interface Admin {
|
|
12
12
|
/** The Host's Tenant API URL. */
|
|
@@ -25,8 +25,8 @@ export interface Admin {
|
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* Resolution: explicit `url` + `key` → `NYLORUN_ADMIN_URL` + `NYLORUN_ADMIN_KEY` → the local
|
|
28
|
-
* Host's settings in its Host root (`home`, `NYLORUN_HOME`, or the
|
|
29
|
-
* `
|
|
28
|
+
* Host's settings in its Host root (`home`, `NYLORUN_HOME`, or the Tenant named by `tenant`,
|
|
29
|
+
* `NYLORUN_TENANT` or the Project link under `cwd`: `~/.nylorun/tenants/<tenant>/`).
|
|
30
30
|
*/
|
|
31
31
|
export declare function createAdmin(options?: AdminConnectionOptions): Admin;
|
|
32
32
|
export type { AdminConnectionOptions, AdminStatus, HostTenant, TenantEnvelope };
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ERROR_CODES, PROTOCOL_FEATURES, compareVersions, } from "@nylorun/core/compatibility";
|
|
2
|
-
import { AdminClient, resolveAdminConnection,
|
|
2
|
+
import { AdminClient, resolveAdminConnection, tenantHostRoot, } from "./client.js";
|
|
3
3
|
import { PROJECT_PRINCIPAL_ID, deriveStudioToken, deriveTenantKey, } from "./derived-credentials.js";
|
|
4
4
|
import { AdminError } from "./errors.js";
|
|
5
5
|
export { ERROR_CODES, PROTOCOL_FEATURES, compareVersions };
|
|
6
6
|
export { AdminError };
|
|
7
|
-
export { PROJECT_PRINCIPAL_ID, deriveStudioToken, deriveTenantKey,
|
|
7
|
+
export { PROJECT_PRINCIPAL_ID, deriveStudioToken, deriveTenantKey, tenantHostRoot };
|
|
8
8
|
export { mintStudioLoginToken } from "./studio-login.js";
|
|
9
9
|
/**
|
|
10
10
|
* Resolution: explicit `url` + `key` → `NYLORUN_ADMIN_URL` + `NYLORUN_ADMIN_KEY` → the local
|
|
11
|
-
* Host's settings in its Host root (`home`, `NYLORUN_HOME`, or the
|
|
12
|
-
* `
|
|
11
|
+
* Host's settings in its Host root (`home`, `NYLORUN_HOME`, or the Tenant named by `tenant`,
|
|
12
|
+
* `NYLORUN_TENANT` or the Project link under `cwd`: `~/.nylorun/tenants/<tenant>/`).
|
|
13
13
|
*/
|
|
14
14
|
export function createAdmin(options) {
|
|
15
15
|
return new AdminClient(resolveAdminConnection(options));
|
package/dist/studio-login.js
CHANGED
|
@@ -51,6 +51,6 @@ export async function mintStudioLoginToken(options) {
|
|
|
51
51
|
}
|
|
52
52
|
const parsed = StudioLoginTokenResponseSchema.safeParse(JSON.parse(text));
|
|
53
53
|
if (!parsed.success)
|
|
54
|
-
throw new AdminError("incompatible_host", "This Studio does not support login tokens limited to a Tenant; update
|
|
54
|
+
throw new AdminError("incompatible_host", "This Studio does not support login tokens limited to a Tenant; update Studio (npx nylorun@latest start).");
|
|
55
55
|
return parsed.data;
|
|
56
56
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nylorun/admin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0-beta",
|
|
4
4
|
"description": "Nylorun Admin API client for Tenants and Host status",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"clean": "node -e \"import('node:fs').then(({rmSync})=>rmSync('dist',{recursive:true,force:true}))\""
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@nylorun/core": "0.
|
|
27
|
+
"@nylorun/core": "0.12.0-beta"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"zod": "^4.6.5"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "^24.0.0",
|
|
34
34
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
35
|
-
"vitest": "^5.0.
|
|
35
|
+
"vitest": "^5.0.2"
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
38
|
"node": ">=24"
|