@nylorun/admin 0.4.0-beta → 0.5.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 CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.0-beta
4
+
5
+ ### Minor Changes
6
+
7
+ - db956bc: Studio creates Tenants. While the Host has none, Studio asks for a name and creates the first one. A Tenant with no agents shows **Connect your code**: its model provider, the `npx @nylorun/cli tenant use <id>` command, and `npm run dev`. It switches to the agent list when the first agent registers.
8
+
9
+ Every Tenant Studio creates registers the derived principal `project` (`PROJECT_PRINCIPAL_ID` in `@nylorun/admin`). `nylo tenant use` now falls back to that key, derived from the local admin key, so a Project links a Studio-created Tenant with no stored key. When it replaces a one-time application key, it keeps that key as `.nylorun/credentials.<tenantId>.json`, and `nylo tenant use <that id>` switches back. `nylorun up` again offers Studio for creating the first Tenant.
10
+
11
+ ## 0.4.1-beta
12
+
13
+ ### Patch Changes
14
+
15
+ - Pin core to the tested release.
16
+ - Updated dependencies [e537a82]
17
+ - Updated dependencies [5278b4e]
18
+ - Updated dependencies [426fd27]
19
+ - Updated dependencies [8cda500]
20
+ - @nylorun/core@0.8.0-beta
21
+
3
22
  ## 0.4.0-beta
4
23
 
5
24
  ### Minor Changes
@@ -4,6 +4,12 @@
4
4
  * memory; the Tenant stores only its hash, as principal `studio`.
5
5
  */
6
6
  export declare function deriveStudioToken(adminKey: string, tenantId: string): string;
7
+ /**
8
+ * The derived principal that Projects on this machine use. A Tenant created
9
+ * with it (Studio creates every Tenant this way) can be linked to a Project by
10
+ * `nylo tenant use`, which derives the key from the local admin key.
11
+ */
12
+ export declare const PROJECT_PRINCIPAL_ID = "project";
7
13
  /**
8
14
  * Deterministic key of a derived principal (`principalId`, e.g. `babai`) on one Tenant,
9
15
  * derived from the admin key. The Tenant stores only its hash, registered when the Tenant
@@ -14,6 +14,12 @@ export function deriveStudioToken(adminKey, tenantId) {
14
14
  .update(message)
15
15
  .digest("hex");
16
16
  }
17
+ /**
18
+ * The derived principal that Projects on this machine use. A Tenant created
19
+ * with it (Studio creates every Tenant this way) can be linked to a Project by
20
+ * `nylo tenant use`, which derives the key from the local admin key.
21
+ */
22
+ export const PROJECT_PRINCIPAL_ID = "project";
17
23
  /**
18
24
  * Deterministic key of a derived principal (`principalId`, e.g. `babai`) on one Tenant,
19
25
  * derived from the admin key. The Tenant stores only its hash, registered when the Tenant
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import type { AdminStatus, AdminTenant, AdminTenantStatus, TenantEnvelope } from "@nylorun/core/contracts";
2
2
  import { ERROR_CODES, PROTOCOL_FEATURES, compareVersions, type ErrorCode } from "@nylorun/core/compatibility";
3
- import { deriveStudioToken, deriveTenantKey } from "./derived-credentials.js";
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 type { ErrorCode };
7
7
  export { AdminError };
8
- export { deriveStudioToken, deriveTenantKey };
8
+ export { PROJECT_PRINCIPAL_ID, deriveStudioToken, deriveTenantKey };
9
9
  export interface Admin {
10
10
  readonly url: string;
11
11
  readonly source: "options" | "environment" | "local-host";
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { ERROR_CODES, PROTOCOL_FEATURES, compareVersions, } from "@nylorun/core/compatibility";
2
2
  import { AdminClient, resolveAdminConnection } from "./client.js";
3
- import { deriveStudioToken, deriveTenantKey } from "./derived-credentials.js";
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 { deriveStudioToken, deriveTenantKey };
7
+ export { PROJECT_PRINCIPAL_ID, deriveStudioToken, deriveTenantKey };
8
8
  export function createAdmin(options) {
9
9
  return new AdminClient(resolveAdminConnection(options));
10
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nylorun/admin",
3
- "version": "0.4.0-beta",
3
+ "version": "0.5.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.7.0-beta"
27
+ "@nylorun/core": "0.8.0-beta"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "zod": "^4.6.5"