@treeseed/core 0.8.10 → 0.8.12
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/dist/dev.d.ts +2 -1
- package/dist/dev.js +30 -8
- package/dist/scripts/dev-platform.js +3 -1
- package/package.json +2 -2
package/dist/dev.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare const TREESEED_DEFAULT_API_PORT = 3000;
|
|
|
8
8
|
export declare const TREESEED_DEFAULT_LOCAL_SMTP_HOST = "127.0.0.1";
|
|
9
9
|
export declare const TREESEED_DEFAULT_LOCAL_SMTP_PORT = 1025;
|
|
10
10
|
export declare const TREESEED_DEFAULT_MAILPIT_UI_PORT = 8025;
|
|
11
|
-
export type TreeseedIntegratedDevSurface = 'integrated' | 'web' | 'api' | 'manager' | 'worker' | 'agents' | 'services';
|
|
11
|
+
export type TreeseedIntegratedDevSurface = 'integrated' | 'all' | 'web' | 'api' | 'manager' | 'worker' | 'agents' | 'services';
|
|
12
12
|
export type TreeseedIntegratedDevSetupMode = 'auto' | 'check' | 'off';
|
|
13
13
|
export type TreeseedIntegratedDevFeedbackMode = 'live' | 'restart' | 'off';
|
|
14
14
|
export type TreeseedIntegratedDevOpenMode = 'auto' | 'on' | 'off';
|
|
@@ -23,6 +23,7 @@ export type TreeseedLocalRuntimeSelection = {
|
|
|
23
23
|
};
|
|
24
24
|
export type TreeseedIntegratedDevOptions = {
|
|
25
25
|
surface?: TreeseedIntegratedDevSurface;
|
|
26
|
+
surfaces?: string;
|
|
26
27
|
watch?: boolean;
|
|
27
28
|
cwd?: string;
|
|
28
29
|
stdio?: SpawnOptions['stdio'];
|
package/dist/dev.js
CHANGED
|
@@ -169,6 +169,7 @@ function browserHost(host) {
|
|
|
169
169
|
function webUrlFor(host, port) {
|
|
170
170
|
return `http://${browserHost(host)}:${port}`;
|
|
171
171
|
}
|
|
172
|
+
const CANONICAL_COMMAND_IDS = ["web", "api", "manager", "worker", "agents"];
|
|
172
173
|
function surfaceCommandIds(surface) {
|
|
173
174
|
switch (surface) {
|
|
174
175
|
case "web":
|
|
@@ -183,11 +184,29 @@ function surfaceCommandIds(surface) {
|
|
|
183
184
|
return ["agents"];
|
|
184
185
|
case "services":
|
|
185
186
|
return ["api", "manager", "worker", "agents"];
|
|
187
|
+
case "all":
|
|
188
|
+
return ["web", "api", "manager", "worker"];
|
|
186
189
|
case "integrated":
|
|
187
190
|
default:
|
|
188
|
-
return ["web", "api"];
|
|
191
|
+
return ["web", "api", "manager", "worker"];
|
|
189
192
|
}
|
|
190
193
|
}
|
|
194
|
+
function parseSurfaceValue(value) {
|
|
195
|
+
return value === "web" || value === "api" || value === "manager" || value === "worker" || value === "agents" || value === "services" || value === "all" || value === "integrated" ? value : null;
|
|
196
|
+
}
|
|
197
|
+
function selectedSurfaceCommandIds(options) {
|
|
198
|
+
const values = (options.surfaces?.trim() || options.surface || "integrated").split(",").map((entry) => entry.trim()).filter(Boolean);
|
|
199
|
+
const selected = /* @__PURE__ */ new Set();
|
|
200
|
+
for (const value of values.length > 0 ? values : ["integrated"]) {
|
|
201
|
+
const surface = parseSurfaceValue(value);
|
|
202
|
+
if (!surface) continue;
|
|
203
|
+
for (const id of surfaceCommandIds(surface)) {
|
|
204
|
+
selected.add(id);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
const selectedIds = CANONICAL_COMMAND_IDS.filter((id) => selected.has(id));
|
|
208
|
+
return selectedIds.length > 0 ? selectedIds : surfaceCommandIds("integrated");
|
|
209
|
+
}
|
|
191
210
|
function nodeLocalRuntime(label) {
|
|
192
211
|
return {
|
|
193
212
|
requested: "local",
|
|
@@ -411,10 +430,13 @@ function createAgentCommand(id, tenantRoot, agentPackageRoot, sharedEnv, apiHost
|
|
|
411
430
|
}
|
|
412
431
|
},
|
|
413
432
|
manager: {
|
|
414
|
-
label: "
|
|
415
|
-
source: "src/services/
|
|
416
|
-
dist: "dist/services/
|
|
417
|
-
|
|
433
|
+
label: "Manager",
|
|
434
|
+
source: "src/services/manager.ts",
|
|
435
|
+
dist: "dist/services/manager.js",
|
|
436
|
+
extraArgs: ["--mode", "loop"],
|
|
437
|
+
extraEnv: {
|
|
438
|
+
TREESEED_MANAGER_MODE: "loop"
|
|
439
|
+
}
|
|
418
440
|
},
|
|
419
441
|
worker: {
|
|
420
442
|
label: "Worker Runner",
|
|
@@ -435,7 +457,7 @@ function createAgentCommand(id, tenantRoot, agentPackageRoot, sharedEnv, apiHost
|
|
|
435
457
|
id,
|
|
436
458
|
label: config.label,
|
|
437
459
|
command: entrypoint.command,
|
|
438
|
-
args: entrypoint.args,
|
|
460
|
+
args: [...entrypoint.args, ...config.extraArgs ?? []],
|
|
439
461
|
cwd: tenantRoot,
|
|
440
462
|
env: {
|
|
441
463
|
...sharedEnv,
|
|
@@ -464,7 +486,7 @@ function createTreeseedIntegratedDevPlan(options = {}) {
|
|
|
464
486
|
const projectId = options.projectId ?? mergedEnv.TREESEED_PROJECT_ID;
|
|
465
487
|
const teamId = options.teamId ?? mergedEnv.TREESEED_HOSTING_TEAM_ID;
|
|
466
488
|
const apiBaseUrl = options.apiHost != null || options.apiPort != null ? `http://${apiHost}:${apiPort}` : mergedEnv.TREESEED_API_BASE_URL?.trim() || `http://${apiHost}:${apiPort}`;
|
|
467
|
-
const selectedCommandIds =
|
|
489
|
+
const selectedCommandIds = selectedSurfaceCommandIds(options);
|
|
468
490
|
const webUrl = selectedCommandIds.includes("web") ? webUrlFor(webHost, webPort) : null;
|
|
469
491
|
const sdkPackageRoot = resolvePackageRoot("@treeseed/sdk", tenantRoot);
|
|
470
492
|
const agentPackageRoot = resolvePackageRootEnvOverride(mergedEnv, "TREESEED_AGENT_PACKAGE_ROOT", tenantRoot) ?? resolveOptionalPackageRoot("@treeseed/agent", tenantRoot);
|
|
@@ -585,7 +607,7 @@ function createTreeseedIntegratedDevPlan(options = {}) {
|
|
|
585
607
|
localRuntimes: {
|
|
586
608
|
...commands.some((command) => command.id === "web") ? { web: webLocalRuntime } : {},
|
|
587
609
|
...commands.some((command) => command.id === "api") ? { api: nodeLocalRuntime("Treeseed API") } : {},
|
|
588
|
-
...commands.some((command) => command.id === "manager") ? { manager: nodeLocalRuntime("
|
|
610
|
+
...commands.some((command) => command.id === "manager") ? { manager: nodeLocalRuntime("Manager") } : {},
|
|
589
611
|
...commands.some((command) => command.id === "worker") ? { worker: nodeLocalRuntime("Worker Runner") } : {},
|
|
590
612
|
...commands.some((command) => command.id === "agents") ? { agents: nodeLocalRuntime("Agents Loop") } : {}
|
|
591
613
|
},
|
|
@@ -26,10 +26,11 @@ function parseSurface(value) {
|
|
|
26
26
|
value === 'worker' ||
|
|
27
27
|
value === 'agents' ||
|
|
28
28
|
value === 'services' ||
|
|
29
|
+
value === 'all' ||
|
|
29
30
|
value === 'integrated') {
|
|
30
31
|
return value;
|
|
31
32
|
}
|
|
32
|
-
return
|
|
33
|
+
return undefined;
|
|
33
34
|
}
|
|
34
35
|
function parseSetupMode(value) {
|
|
35
36
|
if (value === 'auto' || value === 'check' || value === 'off') {
|
|
@@ -51,6 +52,7 @@ function parseOpenMode(value) {
|
|
|
51
52
|
}
|
|
52
53
|
const exitCode = await runTreeseedIntegratedDev({
|
|
53
54
|
surface: parseSurface(readOption('--surface')),
|
|
55
|
+
surfaces: readOption('--surfaces'),
|
|
54
56
|
watch: readFlag('--watch'),
|
|
55
57
|
webHost: readOption('--host'),
|
|
56
58
|
webPort: readNumberOption('--port'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@treeseed/core",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.12",
|
|
4
4
|
"description": "Treeseed web framework package for Astro/Starlight site runtimes.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@astrojs/sitemap": "3.7.0",
|
|
71
71
|
"@astrojs/starlight": "0.37.6",
|
|
72
72
|
"@tailwindcss/vite": "^4.1.4",
|
|
73
|
-
"@treeseed/sdk": "0.8.
|
|
73
|
+
"@treeseed/sdk": "0.8.12",
|
|
74
74
|
"astro": "^5.6.1",
|
|
75
75
|
"esbuild": "^0.28.0",
|
|
76
76
|
"katex": "^0.16.22",
|