@hachej/boring-core 0.1.31 → 0.1.32
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/app/front/index.js +2 -1
- package/dist/app/server/index.d.ts +7 -13
- package/dist/app/server/index.js +12 -18
- package/package.json +5 -5
package/dist/app/front/index.js
CHANGED
|
@@ -33,6 +33,12 @@ interface CreateCoreWorkspaceAgentServerOptions extends Omit<RegisterAgentRoutes
|
|
|
33
33
|
excludeDefaults?: CreateWorkspaceAgentServerOptions['excludeDefaults'];
|
|
34
34
|
defaultPluginPackages?: CreateWorkspaceAgentServerOptions['defaultPluginPackages'];
|
|
35
35
|
appPackageJsonPath?: CreateWorkspaceAgentServerOptions['appPackageJsonPath'];
|
|
36
|
+
/**
|
|
37
|
+
* Enable workspace plugin-authoring tooling/prompt for this app.
|
|
38
|
+
* Defaults to false for full-app/core production composition; set true only
|
|
39
|
+
* when a live plugin-editing experience is activated.
|
|
40
|
+
*/
|
|
41
|
+
installPluginAuthoring?: CreateWorkspaceAgentServerOptions['installPluginAuthoring'];
|
|
36
42
|
/** Core consumes plugins statically for now; app-level hot reload is explicitly unsupported. */
|
|
37
43
|
hotReload?: false;
|
|
38
44
|
forceProvisioning?: boolean;
|
|
@@ -94,16 +100,4 @@ interface RunCoreWorkspaceAgentServerOptions {
|
|
|
94
100
|
}
|
|
95
101
|
declare function runCoreWorkspaceAgentServer(importMetaUrl: string, opts?: RunCoreWorkspaceAgentServerOptions): Promise<void>;
|
|
96
102
|
|
|
97
|
-
|
|
98
|
-
workspaceRoot?: string;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Creates a Vercel Function handler.
|
|
102
|
-
* Sets BORING_AGENT_MODE and BORING_AGENT_WORKSPACE_ROOT defaults for Vercel.
|
|
103
|
-
*
|
|
104
|
-
* Usage in vercel-entry.ts:
|
|
105
|
-
* export default createCoreVercelEntry(import.meta.url)
|
|
106
|
-
*/
|
|
107
|
-
declare function createCoreVercelEntry(_importMetaUrl: string, opts?: CreateCoreVercelEntryOptions): VercelFastifyHandler;
|
|
108
|
-
|
|
109
|
-
export { type CoreWorkspaceAgentDevServerHandle, type CoreWorkspaceAgentServer, type CoreWorkspaceAgentServerPlugin, type CreateCoreVercelEntryOptions, type CreateCoreWorkspaceAgentServerOptions, type CreateVercelFastifyHandlerOptions, type RunCoreWorkspaceAgentServerOptions, type StartCoreWorkspaceAgentDevServerFromMetaOptions, type StartCoreWorkspaceAgentDevServerOptions, type VercelFastifyHandler, type VercelFastifyLikeServer, appRootFromImportMeta, createCoreVercelEntry, createCoreWorkspaceAgentServer, createVercelFastifyHandler, runCoreWorkspaceAgentServer, startCoreWorkspaceAgentDevServer, startCoreWorkspaceAgentDevServerFromMeta };
|
|
103
|
+
export { type CoreWorkspaceAgentDevServerHandle, type CoreWorkspaceAgentServer, type CoreWorkspaceAgentServerPlugin, type CreateCoreWorkspaceAgentServerOptions, type CreateVercelFastifyHandlerOptions, type RunCoreWorkspaceAgentServerOptions, type StartCoreWorkspaceAgentDevServerFromMetaOptions, type StartCoreWorkspaceAgentDevServerOptions, type VercelFastifyHandler, type VercelFastifyLikeServer, appRootFromImportMeta, createCoreWorkspaceAgentServer, createVercelFastifyHandler, runCoreWorkspaceAgentServer, startCoreWorkspaceAgentDevServer, startCoreWorkspaceAgentDevServerFromMeta };
|
package/dist/app/server/index.js
CHANGED
|
@@ -37,6 +37,7 @@ import {
|
|
|
37
37
|
import {
|
|
38
38
|
collectWorkspaceAgentServerPlugins,
|
|
39
39
|
hasDirServerPlugin,
|
|
40
|
+
omitPluginAuthoringProvisioning,
|
|
40
41
|
readWorkspacePluginPackagePiSnapshot,
|
|
41
42
|
readWorkspacePluginPackageRuntimePlugins,
|
|
42
43
|
resolveDefaultWorkspacePluginPackagePaths,
|
|
@@ -578,12 +579,14 @@ async function createCoreWorkspaceAgentServer(options = {}) {
|
|
|
578
579
|
pluginResolveContext
|
|
579
580
|
))
|
|
580
581
|
);
|
|
582
|
+
const installPluginAuthoring = options.installPluginAuthoring === true;
|
|
581
583
|
const pluginCollection = collectWorkspaceAgentServerPlugins({
|
|
582
584
|
workspaceRoot: pluginWorkspaceRoot,
|
|
583
585
|
systemPromptAppend: staticSystemPromptAppend,
|
|
584
586
|
pi: mergePiOptions(options.pi, defaultPackagePiOptions),
|
|
585
587
|
plugins: resolvedPlugins,
|
|
586
|
-
excludeDefaults: options.excludeDefaults
|
|
588
|
+
excludeDefaults: options.excludeDefaults,
|
|
589
|
+
installPluginAuthoring
|
|
587
590
|
});
|
|
588
591
|
const resolveWorkspaceId = async (request) => options.getWorkspaceId ? await options.getWorkspaceId(request) : await resolveAuthorizedWorkspaceId(request, workspaceStore);
|
|
589
592
|
const resolveRoot = async (workspaceId, request) => {
|
|
@@ -601,7 +604,8 @@ async function createCoreWorkspaceAgentServer(options = {}) {
|
|
|
601
604
|
systemPromptAppend: staticSystemPromptAppend,
|
|
602
605
|
pi: mergePiOptions(options.pi, defaultPackagePiOptions),
|
|
603
606
|
plugins: resolvedPlugins,
|
|
604
|
-
excludeDefaults: options.excludeDefaults
|
|
607
|
+
excludeDefaults: options.excludeDefaults,
|
|
608
|
+
installPluginAuthoring
|
|
605
609
|
});
|
|
606
610
|
piOptionsByRoot.set(
|
|
607
611
|
resolvedRoot,
|
|
@@ -644,11 +648,12 @@ async function createCoreWorkspaceAgentServer(options = {}) {
|
|
|
644
648
|
getWorkspaceRoot: resolveRoot,
|
|
645
649
|
provisionRuntime: async ({ provisioningAdapter, runtimeLayout, workspaceId, request, runtimeMode }) => {
|
|
646
650
|
if (!provisioningAdapter) return void 0;
|
|
651
|
+
const runtimePlugins = [
|
|
652
|
+
...pluginCollection.runtimePlugins,
|
|
653
|
+
...defaultPackageRuntimePlugins
|
|
654
|
+
];
|
|
647
655
|
return await provisionWorkspaceRuntime({
|
|
648
|
-
plugins:
|
|
649
|
-
...pluginCollection.runtimePlugins,
|
|
650
|
-
...defaultPackageRuntimePlugins
|
|
651
|
-
],
|
|
656
|
+
plugins: runtimeMode === "direct" ? omitPluginAuthoringProvisioning(runtimePlugins) : runtimePlugins,
|
|
652
657
|
adapter: provisioningAdapter,
|
|
653
658
|
runtimeLayout,
|
|
654
659
|
telemetry,
|
|
@@ -664,6 +669,7 @@ async function createCoreWorkspaceAgentServer(options = {}) {
|
|
|
664
669
|
telemetry
|
|
665
670
|
});
|
|
666
671
|
await app.register(uiRoutes, {
|
|
672
|
+
getWorkspaceId: resolveWorkspaceId,
|
|
667
673
|
getBridge: async (request) => getUiBridge(await resolveWorkspaceId(request)),
|
|
668
674
|
preserveStateKeys: pluginCollection.preservedUiStateKeys
|
|
669
675
|
});
|
|
@@ -784,20 +790,8 @@ async function runCoreWorkspaceAgentServer(importMetaUrl, opts = {}) {
|
|
|
784
790
|
const address = await app.listen({ host: app.config.host, port: app.config.port });
|
|
785
791
|
app.log.info({ event: "core.server.ready", address }, "core.server.ready");
|
|
786
792
|
}
|
|
787
|
-
|
|
788
|
-
// src/app/server/vercelEntry.ts
|
|
789
|
-
function createCoreVercelEntry(_importMetaUrl, opts = {}) {
|
|
790
|
-
process.env.BORING_AGENT_MODE ??= "vercel-sandbox";
|
|
791
|
-
process.env.BORING_AGENT_WORKSPACE_ROOT ??= opts.workspaceRoot ?? "/tmp/boring-workspaces";
|
|
792
|
-
const appRoot = process.cwd();
|
|
793
|
-
const workspaceRoot = process.env.BORING_AGENT_WORKSPACE_ROOT;
|
|
794
|
-
return createVercelFastifyHandler({
|
|
795
|
-
createServer: () => createCoreWorkspaceAgentServer({ appRoot, workspaceRoot, serveFrontend: true })
|
|
796
|
-
});
|
|
797
|
-
}
|
|
798
793
|
export {
|
|
799
794
|
appRootFromImportMeta,
|
|
800
|
-
createCoreVercelEntry,
|
|
801
795
|
createCoreWorkspaceAgentServer,
|
|
802
796
|
createVercelFastifyHandler,
|
|
803
797
|
runCoreWorkspaceAgentServer,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hachej/boring-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.32",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Foundation package for boring-ui-v2 apps: DB, auth, config, HTTP app factory, and frontend app shell.",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@zxcvbn-ts/core": "^3.0.4",
|
|
64
64
|
"@zxcvbn-ts/language-common": "^3.0.4",
|
|
65
65
|
"@zxcvbn-ts/language-en": "^3.0.2",
|
|
66
|
-
"better-auth": "^1.6.
|
|
66
|
+
"better-auth": "^1.6.11",
|
|
67
67
|
"close-with-grace": "^2.2.0",
|
|
68
68
|
"drizzle-orm": "^0.45.2",
|
|
69
69
|
"fastify": "^5.3.3",
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
"react-router-dom": "^7.14.2",
|
|
80
80
|
"smol-toml": "^1.6.1",
|
|
81
81
|
"zod": "^3.25.76",
|
|
82
|
-
"@hachej/boring-agent": "0.1.
|
|
83
|
-
"@hachej/boring-ui-kit": "0.1.
|
|
84
|
-
"@hachej/boring-workspace": "0.1.
|
|
82
|
+
"@hachej/boring-agent": "0.1.32",
|
|
83
|
+
"@hachej/boring-ui-kit": "0.1.32",
|
|
84
|
+
"@hachej/boring-workspace": "0.1.32"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"@testing-library/jest-dom": "^6.9.1",
|