@pleri/olam-cli 0.1.43 → 0.1.45
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/bin/check-node.cjs +38 -0
- package/bin/olam.cjs +26 -0
- package/dist/image-digests.json +1 -1
- package/dist/index.js +31 -3
- package/dist/mcp-server.js +30 -2
- package/package.json +6 -2
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const REQUIRED_MAJOR = 22;
|
|
4
|
+
|
|
5
|
+
function checkNodeVersion(versionString) {
|
|
6
|
+
if (typeof versionString !== 'string' || versionString.length === 0) {
|
|
7
|
+
return { ok: false, detected: String(versionString), required: REQUIRED_MAJOR };
|
|
8
|
+
}
|
|
9
|
+
const major = parseInt(versionString.split('.')[0], 10);
|
|
10
|
+
if (Number.isNaN(major) || major < REQUIRED_MAJOR) {
|
|
11
|
+
return { ok: false, detected: versionString, required: REQUIRED_MAJOR };
|
|
12
|
+
}
|
|
13
|
+
return { ok: true, detected: versionString, required: REQUIRED_MAJOR };
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function formatBanner(detected) {
|
|
17
|
+
return [
|
|
18
|
+
'',
|
|
19
|
+
'[31molam: unsupported Node.js version[0m',
|
|
20
|
+
'',
|
|
21
|
+
` required: Node ${REQUIRED_MAJOR}+`,
|
|
22
|
+
` detected: Node ${detected}`,
|
|
23
|
+
'',
|
|
24
|
+
' Why: the CLI uses node:fs.globSync, which was added in Node 22.0.0.',
|
|
25
|
+
' Older runtimes fail at module-load before any error handler runs.',
|
|
26
|
+
'',
|
|
27
|
+
' Fix (pick one):',
|
|
28
|
+
' mise: mise use --global node@22',
|
|
29
|
+
' nvm: nvm install 22 && nvm use 22',
|
|
30
|
+
' asdf: asdf install nodejs 22.20.0 && asdf global nodejs 22.20.0',
|
|
31
|
+
' brew: brew install node@22 && brew link --overwrite --force node@22',
|
|
32
|
+
'',
|
|
33
|
+
' Then re-run: olam bootstrap',
|
|
34
|
+
'',
|
|
35
|
+
].join('\n');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
module.exports = { checkNodeVersion, formatBanner, REQUIRED_MAJOR };
|
package/bin/olam.cjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// CJS shim that runs before the ESM bundle to fail fast on unsupported Node.
|
|
3
|
+
// Kept in CJS so the parse step uses only Node ≥0.x APIs — this file must
|
|
4
|
+
// load cleanly even on the Node versions we are about to reject.
|
|
5
|
+
'use strict';
|
|
6
|
+
|
|
7
|
+
const { checkNodeVersion, formatBanner } = require('./check-node.cjs');
|
|
8
|
+
|
|
9
|
+
const result = checkNodeVersion(process.versions.node);
|
|
10
|
+
|
|
11
|
+
if (!result.ok) {
|
|
12
|
+
process.stderr.write(formatBanner(result.detected));
|
|
13
|
+
// 64 = EX_USAGE per BSD sysexits — "the command was used incorrectly".
|
|
14
|
+
// Distinct from 1 (generic), 2 (pleri-not-configured), 3 (pull failed),
|
|
15
|
+
// 4 (protocol mismatch), 5 (auth); see packages/cli/src/exit-codes.ts.
|
|
16
|
+
process.exit(64);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const { join } = require('node:path');
|
|
20
|
+
const { pathToFileURL } = require('node:url');
|
|
21
|
+
const bundlePath = join(__dirname, '..', 'dist', 'index.js');
|
|
22
|
+
|
|
23
|
+
import(pathToFileURL(bundlePath).href).catch((err) => {
|
|
24
|
+
process.stderr.write(`olam: failed to load CLI bundle (${bundlePath})\n ${err && err.message ? err.message : err}\n`);
|
|
25
|
+
process.exit(1);
|
|
26
|
+
});
|
package/dist/image-digests.json
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
"devbox": "sha256:9363a1979d7df0ed2b2c964c183ba3e739383c146416f27b1ceb976f64648fd9",
|
|
4
4
|
"host-cp": "sha256:29d2e544db7fabae259a0311a76ff367ee5e2ca5f48e9640ebefaf3c5997bda3",
|
|
5
5
|
"$schema_version": 1,
|
|
6
|
-
"$published_version": "0.1.
|
|
6
|
+
"$published_version": "0.1.45",
|
|
7
7
|
"$registry": "ghcr.io/pleri"
|
|
8
8
|
}
|
package/dist/index.js
CHANGED
|
@@ -4598,7 +4598,7 @@ function isSecureOrLocalhost(value) {
|
|
|
4598
4598
|
return false;
|
|
4599
4599
|
return parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1" || parsed.hostname === "[::1]" || parsed.hostname === "::1";
|
|
4600
4600
|
}
|
|
4601
|
-
var repoTypeSchema, envSetupSchema, RepoConfigSchema, ServiceConfigSchema, sshHostSchema, computeProviderType, stackImageSchema, computeProvidersSchema, ComputeConfigSchema, CostConfigSchema, DashboardConfigSchema, PleriConfigSchema, authModeSchema, AuthConfigSchema, DevboxRegistrySchema, DevboxImageSelectorSchema, DevboxConfigSchema, OlamConfigSchema;
|
|
4601
|
+
var repoTypeSchema, envSetupSchema, EntitledMcpsSchema, RepoConfigSchema, ServiceConfigSchema, sshHostSchema, computeProviderType, stackImageSchema, computeProvidersSchema, ComputeConfigSchema, CostConfigSchema, DashboardConfigSchema, PleriConfigSchema, authModeSchema, AuthConfigSchema, DevboxRegistrySchema, DevboxImageSelectorSchema, DevboxConfigSchema, WorldsDefaultSchema, OlamConfigSchema;
|
|
4602
4602
|
var init_schema2 = __esm({
|
|
4603
4603
|
"../core/dist/config/schema.js"() {
|
|
4604
4604
|
"use strict";
|
|
@@ -4612,6 +4612,10 @@ var init_schema2 = __esm({
|
|
|
4612
4612
|
env_overrides: external_exports.record(external_exports.string(), external_exports.string()).optional().default({}),
|
|
4613
4613
|
auto_generate: external_exports.boolean().optional().default(true)
|
|
4614
4614
|
});
|
|
4615
|
+
EntitledMcpsSchema = external_exports.union([
|
|
4616
|
+
external_exports.literal("*"),
|
|
4617
|
+
external_exports.array(external_exports.string())
|
|
4618
|
+
]);
|
|
4615
4619
|
RepoConfigSchema = external_exports.object({
|
|
4616
4620
|
// Symmetric ingress validation with WorkspaceRepoSchema.name — same rule
|
|
4617
4621
|
// applies whether names enter via `.olam/config.yaml` or `~/.olam/
|
|
@@ -4636,7 +4640,18 @@ var init_schema2 = __esm({
|
|
|
4636
4640
|
// HTTP liveness services this repo exposes. Flowed through from
|
|
4637
4641
|
// WorkspaceRepoSchema.readiness_services; used by WorldManager to build
|
|
4638
4642
|
// the per-world readiness chain at world-create time.
|
|
4639
|
-
readiness_services: external_exports.array(ReadinessServiceSchema).optional()
|
|
4643
|
+
readiness_services: external_exports.array(ReadinessServiceSchema).optional(),
|
|
4644
|
+
// Per-repo entitlement overrides. When unset, falls back to
|
|
4645
|
+
// `worlds_default.<field>`. Empty array `[]` means "explicitly none."
|
|
4646
|
+
// Only enforced server-side when root `multi_tenant: true`; advisory
|
|
4647
|
+
// metadata otherwise. See `EntitledMcpsSchema` (forward-declared below)
|
|
4648
|
+
// and the plan's Phase 0 / Phase E sections.
|
|
4649
|
+
//
|
|
4650
|
+
// Note: forward-reference via z.lazy() — `EntitledMcpsSchema` is declared
|
|
4651
|
+
// after RepoConfigSchema in this file (it sits with WorldsDefaultSchema).
|
|
4652
|
+
// z.lazy() defers resolution to first parse/validate, breaking the cycle.
|
|
4653
|
+
entitled_mcps: EntitledMcpsSchema.optional(),
|
|
4654
|
+
agent_teams_enabled: external_exports.boolean().optional()
|
|
4640
4655
|
});
|
|
4641
4656
|
ServiceConfigSchema = external_exports.object({
|
|
4642
4657
|
image: external_exports.string().min(1),
|
|
@@ -4764,6 +4779,10 @@ var init_schema2 = __esm({
|
|
|
4764
4779
|
*/
|
|
4765
4780
|
image_selectors: external_exports.array(DevboxImageSelectorSchema).optional().default([])
|
|
4766
4781
|
});
|
|
4782
|
+
WorldsDefaultSchema = external_exports.object({
|
|
4783
|
+
entitled_mcps: EntitledMcpsSchema.optional().default("*"),
|
|
4784
|
+
agent_teams_enabled: external_exports.boolean().optional().default(true)
|
|
4785
|
+
});
|
|
4767
4786
|
OlamConfigSchema = external_exports.object({
|
|
4768
4787
|
version: external_exports.number().int().positive(),
|
|
4769
4788
|
repos: external_exports.array(RepoConfigSchema).min(1, "At least one repo is required"),
|
|
@@ -4780,7 +4799,16 @@ var init_schema2 = __esm({
|
|
|
4780
4799
|
pleri: PleriConfigSchema.optional(),
|
|
4781
4800
|
auth: AuthConfigSchema.optional().default({ mode: "oauth" }),
|
|
4782
4801
|
dashboard: DashboardConfigSchema.optional().default({ port: 9740, tunnel: false }),
|
|
4783
|
-
devbox: DevboxConfigSchema.optional()
|
|
4802
|
+
devbox: DevboxConfigSchema.optional(),
|
|
4803
|
+
// Multi-tenant flag: governs whether entitlement values are enforced (true,
|
|
4804
|
+
// CF deployment) or advisory (false, single-operator Docker; default).
|
|
4805
|
+
// See `WorldsDefaultSchema` and `RepoConfigSchema.entitled_mcps` for the
|
|
4806
|
+
// values themselves.
|
|
4807
|
+
multi_tenant: external_exports.boolean().optional().default(false),
|
|
4808
|
+
worlds_default: WorldsDefaultSchema.optional().default({
|
|
4809
|
+
entitled_mcps: "*",
|
|
4810
|
+
agent_teams_enabled: true
|
|
4811
|
+
})
|
|
4784
4812
|
});
|
|
4785
4813
|
}
|
|
4786
4814
|
});
|
package/dist/mcp-server.js
CHANGED
|
@@ -28081,6 +28081,10 @@ var envSetupSchema = external_exports.object({
|
|
|
28081
28081
|
env_overrides: external_exports.record(external_exports.string(), external_exports.string()).optional().default({}),
|
|
28082
28082
|
auto_generate: external_exports.boolean().optional().default(true)
|
|
28083
28083
|
});
|
|
28084
|
+
var EntitledMcpsSchema = external_exports.union([
|
|
28085
|
+
external_exports.literal("*"),
|
|
28086
|
+
external_exports.array(external_exports.string())
|
|
28087
|
+
]);
|
|
28084
28088
|
var RepoConfigSchema = external_exports.object({
|
|
28085
28089
|
// Symmetric ingress validation with WorkspaceRepoSchema.name — same rule
|
|
28086
28090
|
// applies whether names enter via `.olam/config.yaml` or `~/.olam/
|
|
@@ -28105,7 +28109,18 @@ var RepoConfigSchema = external_exports.object({
|
|
|
28105
28109
|
// HTTP liveness services this repo exposes. Flowed through from
|
|
28106
28110
|
// WorkspaceRepoSchema.readiness_services; used by WorldManager to build
|
|
28107
28111
|
// the per-world readiness chain at world-create time.
|
|
28108
|
-
readiness_services: external_exports.array(ReadinessServiceSchema).optional()
|
|
28112
|
+
readiness_services: external_exports.array(ReadinessServiceSchema).optional(),
|
|
28113
|
+
// Per-repo entitlement overrides. When unset, falls back to
|
|
28114
|
+
// `worlds_default.<field>`. Empty array `[]` means "explicitly none."
|
|
28115
|
+
// Only enforced server-side when root `multi_tenant: true`; advisory
|
|
28116
|
+
// metadata otherwise. See `EntitledMcpsSchema` (forward-declared below)
|
|
28117
|
+
// and the plan's Phase 0 / Phase E sections.
|
|
28118
|
+
//
|
|
28119
|
+
// Note: forward-reference via z.lazy() — `EntitledMcpsSchema` is declared
|
|
28120
|
+
// after RepoConfigSchema in this file (it sits with WorldsDefaultSchema).
|
|
28121
|
+
// z.lazy() defers resolution to first parse/validate, breaking the cycle.
|
|
28122
|
+
entitled_mcps: EntitledMcpsSchema.optional(),
|
|
28123
|
+
agent_teams_enabled: external_exports.boolean().optional()
|
|
28109
28124
|
});
|
|
28110
28125
|
var ServiceConfigSchema = external_exports.object({
|
|
28111
28126
|
image: external_exports.string().min(1),
|
|
@@ -28246,6 +28261,10 @@ var DevboxConfigSchema = external_exports.object({
|
|
|
28246
28261
|
*/
|
|
28247
28262
|
image_selectors: external_exports.array(DevboxImageSelectorSchema).optional().default([])
|
|
28248
28263
|
});
|
|
28264
|
+
var WorldsDefaultSchema = external_exports.object({
|
|
28265
|
+
entitled_mcps: EntitledMcpsSchema.optional().default("*"),
|
|
28266
|
+
agent_teams_enabled: external_exports.boolean().optional().default(true)
|
|
28267
|
+
});
|
|
28249
28268
|
var OlamConfigSchema = external_exports.object({
|
|
28250
28269
|
version: external_exports.number().int().positive(),
|
|
28251
28270
|
repos: external_exports.array(RepoConfigSchema).min(1, "At least one repo is required"),
|
|
@@ -28262,7 +28281,16 @@ var OlamConfigSchema = external_exports.object({
|
|
|
28262
28281
|
pleri: PleriConfigSchema.optional(),
|
|
28263
28282
|
auth: AuthConfigSchema.optional().default({ mode: "oauth" }),
|
|
28264
28283
|
dashboard: DashboardConfigSchema.optional().default({ port: 9740, tunnel: false }),
|
|
28265
|
-
devbox: DevboxConfigSchema.optional()
|
|
28284
|
+
devbox: DevboxConfigSchema.optional(),
|
|
28285
|
+
// Multi-tenant flag: governs whether entitlement values are enforced (true,
|
|
28286
|
+
// CF deployment) or advisory (false, single-operator Docker; default).
|
|
28287
|
+
// See `WorldsDefaultSchema` and `RepoConfigSchema.entitled_mcps` for the
|
|
28288
|
+
// values themselves.
|
|
28289
|
+
multi_tenant: external_exports.boolean().optional().default(false),
|
|
28290
|
+
worlds_default: WorldsDefaultSchema.optional().default({
|
|
28291
|
+
entitled_mcps: "*",
|
|
28292
|
+
agent_teams_enabled: true
|
|
28293
|
+
})
|
|
28266
28294
|
});
|
|
28267
28295
|
|
|
28268
28296
|
// ../core/dist/config/defaults.js
|
package/package.json
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pleri/olam-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.45",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
|
-
"olam": "./
|
|
6
|
+
"olam": "./bin/olam.cjs"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
9
|
+
"bin",
|
|
9
10
|
"dist",
|
|
10
11
|
"host-cp",
|
|
11
12
|
"plugin",
|
|
12
13
|
"README.md"
|
|
13
14
|
],
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=22.0.0"
|
|
17
|
+
},
|
|
14
18
|
"repository": {
|
|
15
19
|
"type": "git",
|
|
16
20
|
"url": "https://github.com/pleri/olam.git",
|