@powerhousedao/shared 6.2.3-dev.70 → 6.2.3-dev.72
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/clis/args/common-BXabdhiO.mjs.map +1 -1
- package/dist/clis/args/{connect-BG3HkYBk.mjs → connect-Bad05YS-.mjs} +3 -3
- package/dist/clis/args/connect-Bad05YS-.mjs.map +1 -0
- package/dist/clis/args/connect.mjs +1 -1
- package/dist/clis/args/{help-BfAqpYvC.mjs → help-Di8n5ZnJ.mjs} +3 -3
- package/dist/clis/args/{help-BfAqpYvC.mjs.map → help-Di8n5ZnJ.mjs.map} +1 -1
- package/dist/clis/args/help.mjs +1 -1
- package/dist/clis/args/index.d.mts +1 -1
- package/dist/clis/args/index.mjs +2 -2
- package/dist/clis/args/{run-CYp5t1xU.mjs → run-l_LiMplO.mjs} +2 -2
- package/dist/clis/args/{run-CYp5t1xU.mjs.map → run-l_LiMplO.mjs.map} +1 -1
- package/dist/clis/args/run.mjs +1 -1
- package/dist/clis/args/{service-CHjY5epu.d.mts → service-DiTFThbn.d.mts} +2 -2
- package/dist/clis/args/service-DiTFThbn.d.mts.map +1 -0
- package/dist/clis/args/service.d.mts +1 -1
- package/dist/clis/{build-config-DwRi23zQ.mjs → build-config-tJhHVdPm.mjs} +17 -2
- package/dist/clis/{build-config-DwRi23zQ.mjs.map → build-config-tJhHVdPm.mjs.map} +1 -1
- package/dist/clis/build-config.d.mts +1 -0
- package/dist/clis/build-config.d.mts.map +1 -1
- package/dist/clis/build-config.mjs +2 -2
- package/dist/clis/build-pieces.d.mts +1 -1
- package/dist/clis/build-pieces.mjs +1 -1
- package/dist/clis/constants.d.mts +1 -1
- package/dist/clis/constants.mjs +6 -1
- package/dist/clis/constants.mjs.map +1 -1
- package/dist/clis/index.d.mts +2063 -889
- package/dist/clis/index.d.mts.map +1 -1
- package/dist/clis/index.mjs +436 -586
- package/dist/clis/index.mjs.map +1 -1
- package/dist/clis/rolldown-runtime-B4iAMlE-.mjs +35 -0
- package/dist/clis/types-BNdhWTBs.d.mts +2321 -0
- package/dist/clis/types-BNdhWTBs.d.mts.map +1 -0
- package/dist/{config-loader-DBJolZd0.js → config-loader-BWt0c0eU.js} +6 -3
- package/dist/config-loader-BWt0c0eU.js.map +1 -0
- package/dist/connect/config-loader.d.ts +1 -1
- package/dist/connect/config-loader.js +1 -1
- package/dist/connect/connect-config-schema.d.ts +3 -0
- package/dist/connect/connect-config-schema.js +445 -0
- package/dist/connect/connect-config-schema.js.map +1 -0
- package/dist/connect/image-ref.d.ts +32 -0
- package/dist/connect/image-ref.d.ts.map +1 -0
- package/dist/connect/image-ref.js +80 -0
- package/dist/connect/image-ref.js.map +1 -0
- package/dist/connect/index.d.ts +60 -641
- package/dist/connect/index.d.ts.map +1 -1
- package/dist/connect/index.js +175 -560
- package/dist/connect/index.js.map +1 -1
- package/dist/connect-config-schema-1-O1CQ4v.d.ts +1731 -0
- package/dist/connect-config-schema-1-O1CQ4v.d.ts.map +1 -0
- package/dist/document-drive/index.d.ts +3 -3
- package/dist/document-drive/index.js +1 -12
- package/dist/document-drive/index.js.map +1 -1
- package/dist/document-model/errors.d.ts +1 -1
- package/dist/document-model/index.d.ts +1 -1
- package/dist/document-model/index.js.map +1 -1
- package/dist/host-tokens/index.d.ts +3 -0
- package/dist/host-tokens/index.js +278 -0
- package/dist/host-tokens/index.js.map +1 -0
- package/dist/index-DIM6qtzj.d.ts +227 -0
- package/dist/index-DIM6qtzj.d.ts.map +1 -0
- package/dist/{index-DeEVCeve.d.ts → index-DvbhwImT.d.ts} +2 -2
- package/dist/{index-DeEVCeve.d.ts.map → index-DvbhwImT.d.ts.map} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/processors/index.d.ts +1 -1
- package/dist/registry/index.d.ts +2 -2
- package/dist/registry/index.js +1 -1
- package/dist/registry/index.js.map +1 -1
- package/dist/registry/manifest-slim.d.ts +2 -2
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/{types-PM0i4vns.d.ts → types-BpO4LIKj.d.ts} +180 -255
- package/dist/types-BpO4LIKj.d.ts.map +1 -0
- package/dist/{types-f_wMStgZ.d.ts → types-OXIqeH8W.d.ts} +2 -2
- package/dist/{types-f_wMStgZ.d.ts.map → types-OXIqeH8W.d.ts.map} +1 -1
- package/package.json +5 -1
- package/dist/clis/args/connect-BG3HkYBk.mjs.map +0 -1
- package/dist/clis/args/service-CHjY5epu.d.mts.map +0 -1
- package/dist/clis/types-BxOUzRvH.d.mts +0 -588
- package/dist/clis/types-BxOUzRvH.d.mts.map +0 -1
- package/dist/config-loader-DBJolZd0.js.map +0 -1
- package/dist/types-PM0i4vns.d.ts.map +0 -1
package/dist/clis/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as __toESM, r as __require, t as __commonJSMin } from "./rolldown-runtime-B4iAMlE-.mjs";
|
|
2
2
|
import { array, boolean, command, flag, multioption, number, oneOf, option, optional, positional, rest, restPositionals, string } from "cmd-ts";
|
|
3
3
|
import { AGENTS as AGENTS$1 } from "package-manager-detector/constants";
|
|
4
4
|
import { homedir } from "node:os";
|
|
@@ -18,31 +18,8 @@ import { packageDirectory } from "package-directory";
|
|
|
18
18
|
import { execSync } from "child_process";
|
|
19
19
|
import { dirname, resolve } from "path";
|
|
20
20
|
import { writePackage } from "write-package";
|
|
21
|
+
import { toJSONSchema, z } from "zod";
|
|
21
22
|
import lt from "semver/functions/lt.js";
|
|
22
|
-
//#region \0rolldown/runtime.js
|
|
23
|
-
var __create = Object.create;
|
|
24
|
-
var __defProp = Object.defineProperty;
|
|
25
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
26
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
27
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
28
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
29
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
30
|
-
var __copyProps = (to, from, except, desc) => {
|
|
31
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
32
|
-
key = keys[i];
|
|
33
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
34
|
-
get: ((k) => from[k]).bind(null, key),
|
|
35
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
return to;
|
|
39
|
-
};
|
|
40
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
41
|
-
value: mod,
|
|
42
|
-
enumerable: true
|
|
43
|
-
}) : target, mod));
|
|
44
|
-
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
45
|
-
//#endregion
|
|
46
23
|
//#region clis/constants.ts
|
|
47
24
|
const SERVICE_ACTIONS = [
|
|
48
25
|
"start",
|
|
@@ -120,6 +97,10 @@ const PEER_EXTERNAL_DEPENDENCIES = {
|
|
|
120
97
|
zod: {
|
|
121
98
|
peer: "^4",
|
|
122
99
|
dev: "4.6.5"
|
|
100
|
+
},
|
|
101
|
+
"@tanstack/react-router": {
|
|
102
|
+
peer: "^1.170.41",
|
|
103
|
+
dev: "1.170.41"
|
|
123
104
|
}
|
|
124
105
|
};
|
|
125
106
|
const FEATURE_DEPENDENCIES = {
|
|
@@ -159,7 +140,8 @@ const VERSIONED_DEV_DEPENDENCIES = [
|
|
|
159
140
|
"@powerhousedao/design-system",
|
|
160
141
|
"@powerhousedao/host-core",
|
|
161
142
|
"@powerhousedao/clint",
|
|
162
|
-
"@powerhousedao/desktop"
|
|
143
|
+
"@powerhousedao/desktop",
|
|
144
|
+
"@powerhousedao/switchboard"
|
|
163
145
|
];
|
|
164
146
|
const packageJsonExports = {
|
|
165
147
|
".": {
|
|
@@ -674,7 +656,7 @@ const connectRuntimeOverrideArgs = {
|
|
|
674
656
|
homeBackground: option({
|
|
675
657
|
type: optional(string),
|
|
676
658
|
long: "home-background",
|
|
677
|
-
description: "Override connect.
|
|
659
|
+
description: "Override connect.home.background (the generic plugin's home screen). URL or path to an image, pinned bottom-right; pass an empty string (\"\") to reset to the bundled gradient."
|
|
678
660
|
}),
|
|
679
661
|
sentryDsn: option({
|
|
680
662
|
type: optional(string),
|
|
@@ -722,7 +704,7 @@ const connectBuildArgs = {
|
|
|
722
704
|
favicon: option({
|
|
723
705
|
type: optional(string),
|
|
724
706
|
long: "favicon",
|
|
725
|
-
description: "Path to a favicon file (e.g. .ico) to bundle in place of the default Connect icon. Emitted as icon.ico; resolved relative to the build cwd."
|
|
707
|
+
description: "Path to a favicon file (e.g. .ico) to bundle in place of the default Connect icon. Emitted as icon.ico, or icon.svg/icon.png for those types; resolved relative to the build cwd."
|
|
726
708
|
}),
|
|
727
709
|
...commonArgs
|
|
728
710
|
};
|
|
@@ -1124,7 +1106,7 @@ const runArgs = {
|
|
|
1124
1106
|
explain: option({
|
|
1125
1107
|
type: optional(string),
|
|
1126
1108
|
long: "explain",
|
|
1127
|
-
description: "explain a resolved aspect instead of running (drives)"
|
|
1109
|
+
description: "explain a resolved aspect instead of running (drives, outputs)"
|
|
1128
1110
|
})
|
|
1129
1111
|
};
|
|
1130
1112
|
//#endregion
|
|
@@ -6655,6 +6637,411 @@ function buildPnpmLink(packageName, monorepoPath) {
|
|
|
6655
6637
|
return `link:${path.join(monorepoPath, packageDir, packageNameWithoutNamespace).replace("analytics-engine-", "analytics-engine/")}`;
|
|
6656
6638
|
}
|
|
6657
6639
|
//#endregion
|
|
6640
|
+
//#region connect/connect-config-schema.ts
|
|
6641
|
+
const IMAGE_REF = "Image reference: a project-relative file path, a URL, or a data URI.";
|
|
6642
|
+
const IMAGE_REF_OR_DEFAULT = "Image reference: a project-relative file path (resolved by the Connect build), a URL, or a data URI. null keeps the default.";
|
|
6643
|
+
/** An image reference: a project-relative file path (the Connect build turns
|
|
6644
|
+
* it into a data URI or an emitted file), a URL, or a data URI. */
|
|
6645
|
+
const connectImageRefSchema = z.string().describe(IMAGE_REF);
|
|
6646
|
+
/** An image reference where `null` (or omitting it) keeps the default. */
|
|
6647
|
+
const optionalImageRef = (description = IMAGE_REF_OR_DEFAULT) => connectImageRefSchema.nullable().optional().describe(description);
|
|
6648
|
+
/** An image per colour scheme: one reference for both, or `{ light, dark }`
|
|
6649
|
+
* (`dark` falls back to `light`). */
|
|
6650
|
+
const connectSchemedImageSchema = z.union([connectImageRefSchema, z.strictObject({
|
|
6651
|
+
light: connectImageRefSchema,
|
|
6652
|
+
dark: connectImageRefSchema.nullable().optional()
|
|
6653
|
+
})]).describe("One image for both colour schemes, or { light, dark } (dark falls back to light).");
|
|
6654
|
+
/** A CSS colour per colour scheme (`dark` falls back to `light`). */
|
|
6655
|
+
const connectSchemedColorSchema = z.union([z.string(), z.strictObject({
|
|
6656
|
+
light: z.string(),
|
|
6657
|
+
dark: z.string().nullable().optional()
|
|
6658
|
+
})]);
|
|
6659
|
+
/** A CSS length: a number is px, a string is passed through as written. */
|
|
6660
|
+
const connectLengthSchema = z.union([z.number(), z.string()]);
|
|
6661
|
+
const optionalLength = () => connectLengthSchema.nullable().optional().describe("A CSS length: a number is px; a string is used as written (\"40%\", \"min(55%, 880px)\", \"calc(50% - 120px)\").");
|
|
6662
|
+
/** Distances to the four edges; each is optional. */
|
|
6663
|
+
const connectEdgesSchema = z.strictObject({
|
|
6664
|
+
top: optionalLength(),
|
|
6665
|
+
right: optionalLength(),
|
|
6666
|
+
bottom: optionalLength(),
|
|
6667
|
+
left: optionalLength()
|
|
6668
|
+
});
|
|
6669
|
+
/** One image of a decorated pane, absolutely positioned inside it. */
|
|
6670
|
+
const connectBackgroundLayerSchema = z.strictObject({
|
|
6671
|
+
src: connectSchemedImageSchema,
|
|
6672
|
+
position: connectEdgesSchema.nullable().optional().describe("Distances to the pane's edges; at most one per axis. Omitted: centred both ways."),
|
|
6673
|
+
width: optionalLength(),
|
|
6674
|
+
height: optionalLength(),
|
|
6675
|
+
minWidth: optionalLength(),
|
|
6676
|
+
minHeight: optionalLength(),
|
|
6677
|
+
maxWidth: optionalLength(),
|
|
6678
|
+
maxHeight: optionalLength(),
|
|
6679
|
+
opacity: z.number().min(0).max(1).nullable().optional().describe("0 to 1 (default 1)."),
|
|
6680
|
+
fade: connectEdgesSchema.nullable().optional().describe("Feather depth per edge, fading the layer into the page colour.")
|
|
6681
|
+
}).describe("An image laid over the page, absolutely positioned: the edges set in `position` pin it, an axis with neither edge set is centred.");
|
|
6682
|
+
/** A decorated pane: the page colour and the images laid over it. */
|
|
6683
|
+
const connectBackgroundLayersSchema = z.strictObject({
|
|
6684
|
+
color: connectSchemedColorSchema.nullable().optional().describe("The page colour, or { light, dark }. Omitted or null: the theme's page background."),
|
|
6685
|
+
layers: z.array(connectBackgroundLayerSchema).describe("Painted in order; the first is at the back.")
|
|
6686
|
+
});
|
|
6687
|
+
/** A pane's background: layers over a page colour, or one image as
|
|
6688
|
+
* shorthand for a single layer pinned bottom-right. */
|
|
6689
|
+
const connectBackgroundSchema = z.union([connectImageRefSchema, connectBackgroundLayersSchema]).describe("Layered images over a page colour, or a single image pinned to the bottom-right corner. null keeps the default.");
|
|
6690
|
+
/** The loading image and the motion applied to it. */
|
|
6691
|
+
const connectLoaderSchema = z.strictObject({
|
|
6692
|
+
src: connectImageRefSchema,
|
|
6693
|
+
animation: z.enum([
|
|
6694
|
+
"pulse",
|
|
6695
|
+
"spin",
|
|
6696
|
+
"none"
|
|
6697
|
+
]).nullable().optional().describe("Motion applied to the image (default pulse)."),
|
|
6698
|
+
size: z.number().min(16).max(512).nullable().optional().describe("Rendered width in CSS pixels (default 96); the height follows the image.")
|
|
6699
|
+
});
|
|
6700
|
+
/** `connect.branding`: Connect's identity and look. */
|
|
6701
|
+
const connectBrandingSchema = z.strictObject({
|
|
6702
|
+
appName: z.string().nullable().optional().describe("Browser tab title, installed-app name and in-app brand text. null or omitted: 'Powerhouse Connect'."),
|
|
6703
|
+
icon: optionalImageRef("App icon master (1024x1024 PNG recommended, or an SVG). The favicons and installed-app icons are found next to it as <name>_16x16.png, _32x32, _64x64, _192x192 and _512x512; the 64 px one is the in-app logo. null or omitted: Connect's icon."),
|
|
6704
|
+
favicon: z.string().nullable().optional().describe("The browser tab icon: a file (.ico, .svg or .png) relative to the project, served and built as icon.ico, or as icon.svg or icon.png for those types. A build input; the built runtime config leaves it out. `ph connect build --favicon` wins over it."),
|
|
6705
|
+
loader: z.union([connectImageRefSchema, connectLoaderSchema]).nullable().optional().describe("The loading image (first paint, app start, drive and editor loading). A path gets a gentle pulse; { src, animation, size } says otherwise, with animation \"none\" for an image that animates itself (animated SVG, GIF or WebP). null or omitted: Connect's animated logo.")
|
|
6706
|
+
}).describe("App identity and visual branding. Every field is optional; null means the default.");
|
|
6707
|
+
/** `connect.home`: the home screen (the generic chrome's landing page). */
|
|
6708
|
+
const connectHomeSchema = z.strictObject({ background: connectBackgroundSchema.nullable().optional().describe("The home screen's background: { color, layers } with each image positioned and sized, or one image pinned bottom-right. null or omitted: the bundled gradient.") }).describe("The home screen (the generic chrome's landing page).");
|
|
6709
|
+
const connectAppSchema = z.strictObject({
|
|
6710
|
+
logLevel: z.enum([
|
|
6711
|
+
"debug",
|
|
6712
|
+
"info",
|
|
6713
|
+
"warn",
|
|
6714
|
+
"error"
|
|
6715
|
+
]).optional().meta({
|
|
6716
|
+
description: "Log level applied by Connect's logger at boot. Affects browser-side output only.",
|
|
6717
|
+
default: "info"
|
|
6718
|
+
}),
|
|
6719
|
+
basePath: z.string().optional().meta({
|
|
6720
|
+
description: "Base path Connect is mounted under (e.g. '/connect' for subpath deploys). Normalised at runtime to start and end with '/'. Defaults to the build-time BASE_URL.",
|
|
6721
|
+
default: "/"
|
|
6722
|
+
}),
|
|
6723
|
+
offline: z.boolean().optional().meta({
|
|
6724
|
+
description: "When true (default), the build emits a precaching service worker so Connect's app shell works offline, and the SPA registers it at boot. Set false to opt this deployment out: no service worker is built, the SPA skips registration, and any previously-installed worker is unregistered.",
|
|
6725
|
+
default: true
|
|
6726
|
+
}),
|
|
6727
|
+
studioMode: z.boolean().optional().meta({
|
|
6728
|
+
description: "Studio mode. Enables builder-only capabilities: Connect loads the vetra package and exposes DocumentModel (and vetra spec types) as creatable documents. Forced on by `ph vetra` / `ph connect studio`; false by default.",
|
|
6729
|
+
default: false
|
|
6730
|
+
}),
|
|
6731
|
+
workflowsEnabled: z.boolean().optional().describe("Powerhouse workflows in Connect. When true the tab loads the @powerhousedao/workflow package (workflow + connection documents, their editors and Workflow Studio) and the reactor worker registers its document models. Falls back to the top-level `workflows.enabled`; set it to override that for Connect. Independent of studioMode. False when neither is set.")
|
|
6732
|
+
}).describe("Top-level Connect application behaviour.");
|
|
6733
|
+
const connectAiSchema = z.strictObject({ assistantEnabled: z.boolean().optional().meta({
|
|
6734
|
+
description: "When true, Connect mounts the in-browser AI assistant (bottom-right chat FAB that talks to a user-configured OpenAI-compatible endpoint and acts on the reactor). Disabled by default.",
|
|
6735
|
+
default: false
|
|
6736
|
+
}) }).describe("AI assistant (chat) behaviour.");
|
|
6737
|
+
const connectPackagesSchema = z.strictObject({
|
|
6738
|
+
externalEnabled: z.boolean().optional().meta({
|
|
6739
|
+
description: "When false, Connect refuses to load any package that wasn't bundled at build time. Affirmative replacement for the legacy PH_CONNECT_EXTERNAL_PACKAGES_DISABLED env var.",
|
|
6740
|
+
default: true
|
|
6741
|
+
}),
|
|
6742
|
+
liveReload: z.boolean().optional().meta({
|
|
6743
|
+
description: "When true, Connect subscribes to the static-mode `/__packages` SSE channel so live publishes flow into the running tab without a page reload. Only works under hosting that serves this channel (e.g. ph-clint static mode).",
|
|
6744
|
+
default: false
|
|
6745
|
+
})
|
|
6746
|
+
}).describe("Runtime behaviour for the Connect package manager (separate from top-level `packages[]`, which lists which packages to load).");
|
|
6747
|
+
const EXPLORER_ICONS_DESCRIPTION = "The drive explorer's icons (the generic plugin's); each null keeps the built-in icon.";
|
|
6748
|
+
/** The drive explorer's icons: the generic chrome's, owned by the generic
|
|
6749
|
+
* plugin. Each `null` keeps the built-in icon. */
|
|
6750
|
+
const connectExplorerIconsSchema = z.strictObject({
|
|
6751
|
+
localDrive: optionalImageRef("Local drives without an icon of their own."),
|
|
6752
|
+
remoteDrive: optionalImageRef("Remote drives without an icon of their own."),
|
|
6753
|
+
folder: optionalImageRef("Folders."),
|
|
6754
|
+
document: optionalImageRef("Documents whose type has no icon in `documents`."),
|
|
6755
|
+
documents: z.record(z.string(), connectImageRefSchema).nullable().optional().describe("Per document type, e.g. \"acme/invoice\".")
|
|
6756
|
+
}).describe(EXPLORER_ICONS_DESCRIPTION);
|
|
6757
|
+
const connectDefaultDriveRemoteSchema = z.strictObject({
|
|
6758
|
+
url: z.string(),
|
|
6759
|
+
name: z.string().nullable().optional(),
|
|
6760
|
+
icon: z.string().nullable().optional()
|
|
6761
|
+
});
|
|
6762
|
+
const connectDefaultDriveLocalSchema = z.strictObject({
|
|
6763
|
+
local: z.literal(true).describe("Discriminator: this entry is a local drive created on first boot."),
|
|
6764
|
+
id: z.string().describe("Stable drive id. The drive is created with this id on first boot and is not re-created on later boots."),
|
|
6765
|
+
name: z.string().nullable().optional(),
|
|
6766
|
+
icon: z.string().nullable().optional(),
|
|
6767
|
+
app: z.string().optional().describe("Drive app (preferred editor) to open on the drive.")
|
|
6768
|
+
});
|
|
6769
|
+
const connectDefaultDriveSchema = z.union([connectDefaultDriveRemoteSchema, connectDefaultDriveLocalSchema]);
|
|
6770
|
+
/** `connect.drives.sections.{remote,local}`: three affirmative toggles. */
|
|
6771
|
+
const connectDriveSectionSchema = z.strictObject({
|
|
6772
|
+
enabled: z.boolean().optional().meta({
|
|
6773
|
+
description: "When false, the section is hidden in the sidebar.",
|
|
6774
|
+
default: true
|
|
6775
|
+
}),
|
|
6776
|
+
allowAdd: z.boolean().optional().meta({
|
|
6777
|
+
description: "When false, the section's 'add drive' affordance is hidden.",
|
|
6778
|
+
default: true
|
|
6779
|
+
}),
|
|
6780
|
+
allowDelete: z.boolean().optional().meta({
|
|
6781
|
+
description: "When false, drives in this section cannot be deleted from the UI.",
|
|
6782
|
+
default: true
|
|
6783
|
+
})
|
|
6784
|
+
}).describe("Visibility and add/delete affordances for a drive section in the sidebar.");
|
|
6785
|
+
const connectDriveSectionsSchema = z.strictObject({
|
|
6786
|
+
remote: connectDriveSectionSchema.optional(),
|
|
6787
|
+
local: connectDriveSectionSchema.optional()
|
|
6788
|
+
}).describe("Per-section visibility and affordance toggles. `remote` covers what was historically split into 'public' + 'cloud'; `local` is browser-local drives.");
|
|
6789
|
+
/** Mirrors DRIVES_PRESERVE_STRATEGIES (../clis/constants.ts, which imports
|
|
6790
|
+
* node: modules, so it is not imported here); a test pins the two. */
|
|
6791
|
+
const connectDrivePreserveStrategySchema = z.enum(["preserve-all", "preserve-by-url-and-detach"]);
|
|
6792
|
+
const connectDrivesSchema = z.strictObject({
|
|
6793
|
+
allowAddDrive: z.boolean().optional().meta({
|
|
6794
|
+
description: "When false, the SPA hides the 'add drive' affordance entirely (top-level). Per-section overrides live in `sections.{remote,local}.allowAdd`.",
|
|
6795
|
+
default: true
|
|
6796
|
+
}),
|
|
6797
|
+
defaultDrives: z.array(connectDefaultDriveSchema).optional().meta({
|
|
6798
|
+
description: "Drives the SPA auto-connects to on first load. Each entry is either a remote drive (a URL, with optional name/icon overrides) or a local drive (created locally on first boot, with a stable id and optional name/icon/app).",
|
|
6799
|
+
default: []
|
|
6800
|
+
}),
|
|
6801
|
+
preserveStrategy: connectDrivePreserveStrategySchema.optional().describe("Strategy applied when defaultDrives change between deploys. 'preserve-all' keeps user-added drives untouched; 'preserve-by-url-and-detach' detaches removed default drives. No schema default — opt-in only."),
|
|
6802
|
+
sections: connectDriveSectionsSchema.optional(),
|
|
6803
|
+
icons: connectExplorerIconsSchema.nullable().optional().describe(EXPLORER_ICONS_DESCRIPTION)
|
|
6804
|
+
}).describe("Default-drive and add-drive UI behaviour.");
|
|
6805
|
+
const connectRenownRainbowAdapterSchema = z.strictObject({
|
|
6806
|
+
walletConnectProjectId: z.string().optional().describe("WalletConnect project id; required for this adapter to function."),
|
|
6807
|
+
infuraProjectId: z.string().optional().describe("Optional Infura project id used to build RPC transports.")
|
|
6808
|
+
}).describe("wagmi + RainbowKit external-wallet adapter config.");
|
|
6809
|
+
const connectRenownPrivyAdapterSchema = z.strictObject({
|
|
6810
|
+
appId: z.string().optional().describe("Privy application id; required for this adapter to function."),
|
|
6811
|
+
clientId: z.string().optional().describe("Optional Privy client id."),
|
|
6812
|
+
methods: z.array(z.string()).optional().describe("Login methods this adapter offers; default per adapter when omitted.")
|
|
6813
|
+
}).describe("Privy embedded/social adapter config.");
|
|
6814
|
+
const connectRenownAdaptersSchema = z.strictObject({
|
|
6815
|
+
rainbow: connectRenownRainbowAdapterSchema.optional(),
|
|
6816
|
+
privy: connectRenownPrivyAdapterSchema.optional()
|
|
6817
|
+
}).describe("Per-adapter wallet config for in-page auth. Presence of an adapter key enables it; omit or leave empty for redirect-only behaviour.");
|
|
6818
|
+
const connectRenownSchema = z.strictObject({
|
|
6819
|
+
url: z.string().optional().meta({
|
|
6820
|
+
description: "Renown auth service URL.",
|
|
6821
|
+
default: "https://www.renown.id"
|
|
6822
|
+
}),
|
|
6823
|
+
networkId: z.string().optional().meta({
|
|
6824
|
+
description: "CAIP-2 network namespace (e.g. 'eip155').",
|
|
6825
|
+
default: "eip155"
|
|
6826
|
+
}),
|
|
6827
|
+
chainId: z.number().optional().meta({
|
|
6828
|
+
description: "CAIP-2 chain reference within the network namespace.",
|
|
6829
|
+
default: 1
|
|
6830
|
+
}),
|
|
6831
|
+
namespace: z.string().optional().describe("Renown localStorage namespace; share it across Connects to share login."),
|
|
6832
|
+
switchboardUrl: z.string().optional().describe("Switchboard GraphQL URL. When set, Connect enables in-page (no-redirect) Renown sign-in; otherwise it falls back to the redirect flow via `url`."),
|
|
6833
|
+
adapters: connectRenownAdaptersSchema.optional()
|
|
6834
|
+
}).describe("Renown identity / authentication coordinates.");
|
|
6835
|
+
const connectSentrySchema = z.strictObject({
|
|
6836
|
+
dsn: z.string().nullable().optional().meta({
|
|
6837
|
+
description: "Sentry DSN URL. `null` disables Sentry entirely; the SPA never loads the Sentry SDK chunk.",
|
|
6838
|
+
default: null
|
|
6839
|
+
}),
|
|
6840
|
+
env: z.string().optional().meta({
|
|
6841
|
+
description: "Sentry environment label, surfaced as the `environment` tag on every event.",
|
|
6842
|
+
default: "dev"
|
|
6843
|
+
}),
|
|
6844
|
+
tracing: z.boolean().optional().meta({
|
|
6845
|
+
description: "Enable Sentry performance tracing.",
|
|
6846
|
+
default: false
|
|
6847
|
+
})
|
|
6848
|
+
}).describe("Sentry error-tracking coordinates. Set `dsn` to enable Sentry; leave `dsn` null to disable. The Sentry release tag stays build-time (stamped via Vite's `define` from WORKSPACE_VERSION) so it always matches the sourcemaps uploaded by CI.");
|
|
6849
|
+
const connectOpenPanelSchema = z.strictObject({
|
|
6850
|
+
clientId: z.string().optional().meta({
|
|
6851
|
+
description: "OpenPanel client id. Empty string disables OpenPanel entirely.",
|
|
6852
|
+
default: ""
|
|
6853
|
+
}),
|
|
6854
|
+
apiUrl: z.string().optional().describe("OpenPanel API URL for self-hosted instances (e.g. 'https://openpanel.example/api'). Omit to use OpenPanel's hosted API."),
|
|
6855
|
+
trackUiEvents: z.boolean().optional().meta({
|
|
6856
|
+
description: "Track UI events.",
|
|
6857
|
+
default: true
|
|
6858
|
+
}),
|
|
6859
|
+
trackOperations: z.boolean().optional().meta({
|
|
6860
|
+
description: "Track document operations.",
|
|
6861
|
+
default: true
|
|
6862
|
+
})
|
|
6863
|
+
}).describe("OpenPanel product analytics. Set `clientId` to enable; an empty `clientId` disables it. Events are only sent after the user accepts analytics cookies. Takes precedence over the build-time PH_CONNECT_OPENPANEL_* env vars.");
|
|
6864
|
+
/** Which reactor client Connect runs (see PHReactorClientMode). */
|
|
6865
|
+
const connectReactorClientModeSchema = z.enum([
|
|
6866
|
+
"in-process",
|
|
6867
|
+
"worker",
|
|
6868
|
+
"remote",
|
|
6869
|
+
"router"
|
|
6870
|
+
]);
|
|
6871
|
+
const connectInstanceSchema = z.strictObject({
|
|
6872
|
+
namespace: z.string().nullable().meta({
|
|
6873
|
+
description: "Explicit storage/SharedWorker namespace for this instance. `null` derives it from the base path (and, later, the configured endpoint), so root deployments stay byte-identical.",
|
|
6874
|
+
default: null
|
|
6875
|
+
}),
|
|
6876
|
+
reactorWorker: z.boolean().meta({
|
|
6877
|
+
description: "Host the reactor in a shared worker instead of on the main thread. Off by default; the main-thread reactor stays the proven path until cutover is verified. Packaged deployments load the worker from the prebuilt bundle `ph connect build` emits under __reactor_worker__/ (the dev server builds it lazily at the same path); when that bundle is absent the feature reports itself unavailable instead of starting a worker that cannot load.",
|
|
6878
|
+
default: false
|
|
6879
|
+
}),
|
|
6880
|
+
multiReactor: z.boolean().optional().meta({
|
|
6881
|
+
description: "Opt-in multi-reactor routing. When on, Connect routes through the in-browser reactor plus remote backends instead of the single in-browser reactor. Off by default; the single-reactor path is unchanged.",
|
|
6882
|
+
default: false
|
|
6883
|
+
})
|
|
6884
|
+
}).describe("Per-instance identity. Lets one origin host multiple isolated Connect instances, each with its own storage + SharedWorker namespace.");
|
|
6885
|
+
const connectReactorFeatureFlagsSchema = z.strictObject({
|
|
6886
|
+
documentDecisions: z.boolean().optional().meta({
|
|
6887
|
+
description: "Decide writes from the document stream rather than the document meta cache, so a backdated deletion denies the operations that sort after it.",
|
|
6888
|
+
default: false
|
|
6889
|
+
}),
|
|
6890
|
+
authEnforcement: z.boolean().optional().meta({
|
|
6891
|
+
description: "Enforce the auth scope's policy at admission, replay, and read. Requires documentDecisions.",
|
|
6892
|
+
default: false
|
|
6893
|
+
}),
|
|
6894
|
+
authGroups: z.boolean().optional().meta({
|
|
6895
|
+
description: "Let `{ group }` principals match against the rosters of the group documents a policy names. Requires authEnforcement.",
|
|
6896
|
+
default: false
|
|
6897
|
+
}),
|
|
6898
|
+
authConditions: z.boolean().optional().meta({
|
|
6899
|
+
description: "Evaluate `where` and `match` conditions on grants. Requires authGroups. Do not enable on a fleet `preflight:auth` reports as crossing a reducer version.",
|
|
6900
|
+
default: false
|
|
6901
|
+
})
|
|
6902
|
+
}).describe("Enforcement flags. Each implies its predecessors, and the reactor refuses to boot on a set that names a later flag without an earlier one. These are consensus settings: a Connect syncing with a fleet must carry the same flags the fleet does, or the two reach different replay outcomes for the same history and diverge.");
|
|
6903
|
+
const connectReactorSchema = z.strictObject({
|
|
6904
|
+
featureFlags: connectReactorFeatureFlagsSchema.optional(),
|
|
6905
|
+
createSignaturePolicy: z.enum(["legacy", "v2-required"]).optional().meta({
|
|
6906
|
+
description: "What new documents are created as. `v2-required` documents accept only v2 action signatures and take content-addressed ids; set `legacy` while any peer Connect syncs with predates them. Existing documents keep their policy.",
|
|
6907
|
+
default: "v2-required"
|
|
6908
|
+
}),
|
|
6909
|
+
unsupportedStoredDocuments: z.enum(["refuse", "read-only"]).optional().meta({
|
|
6910
|
+
description: "What the reactor does when this browser's store holds documents at protocol versions this build does not run. `refuse` fails the boot and names the versions; `read-only` boots and keeps those documents read-only.",
|
|
6911
|
+
default: "refuse"
|
|
6912
|
+
})
|
|
6913
|
+
}).describe("Settings for the reactor Connect runs in the browser, on the main thread or in the shared worker alike.");
|
|
6914
|
+
/** A runtime-caching / denylist URL match. A string is handed to Workbox
|
|
6915
|
+
* verbatim; `{ source, flags }` is rebuilt into a RegExp at build time. */
|
|
6916
|
+
const connectPwaUrlPatternSchema = z.union([z.string(), z.strictObject({
|
|
6917
|
+
source: z.string().describe("RegExp source."),
|
|
6918
|
+
flags: z.string().optional().describe("RegExp flags (e.g. 'i').")
|
|
6919
|
+
}).refine((p) => {
|
|
6920
|
+
try {
|
|
6921
|
+
new RegExp(p.source, p.flags);
|
|
6922
|
+
return true;
|
|
6923
|
+
} catch {
|
|
6924
|
+
return false;
|
|
6925
|
+
}
|
|
6926
|
+
}, { message: "source/flags do not compile to a valid RegExp" })]).describe("URL match. A string is matched verbatim by Workbox; { source, flags } is rebuilt into a RegExp at build time.");
|
|
6927
|
+
const connectPwaCacheStrategySchema = z.enum([
|
|
6928
|
+
"CacheFirst",
|
|
6929
|
+
"CacheOnly",
|
|
6930
|
+
"NetworkFirst",
|
|
6931
|
+
"NetworkOnly",
|
|
6932
|
+
"StaleWhileRevalidate"
|
|
6933
|
+
]);
|
|
6934
|
+
/** Serialisable subset of a Workbox `RuntimeCaching` rule. */
|
|
6935
|
+
const connectPwaRuntimeCachingSchema = z.strictObject({
|
|
6936
|
+
urlPattern: connectPwaUrlPatternSchema,
|
|
6937
|
+
handler: connectPwaCacheStrategySchema,
|
|
6938
|
+
method: z.enum([
|
|
6939
|
+
"GET",
|
|
6940
|
+
"POST",
|
|
6941
|
+
"PUT",
|
|
6942
|
+
"DELETE",
|
|
6943
|
+
"HEAD",
|
|
6944
|
+
"PATCH"
|
|
6945
|
+
]).optional(),
|
|
6946
|
+
options: z.strictObject({
|
|
6947
|
+
cacheName: z.string().optional(),
|
|
6948
|
+
networkTimeoutSeconds: z.number().optional().describe("Seconds a NetworkFirst rule waits for the network before falling back to the cache."),
|
|
6949
|
+
expiration: z.strictObject({
|
|
6950
|
+
maxEntries: z.number().optional(),
|
|
6951
|
+
maxAgeSeconds: z.number().optional()
|
|
6952
|
+
}).optional(),
|
|
6953
|
+
cacheableResponse: z.strictObject({
|
|
6954
|
+
statuses: z.array(z.number()).optional(),
|
|
6955
|
+
headers: z.record(z.string(), z.string()).optional()
|
|
6956
|
+
}).optional()
|
|
6957
|
+
}).optional()
|
|
6958
|
+
});
|
|
6959
|
+
const connectPwaIconSchema = z.strictObject({
|
|
6960
|
+
src: z.string(),
|
|
6961
|
+
sizes: z.string().optional(),
|
|
6962
|
+
type: z.string().optional(),
|
|
6963
|
+
purpose: z.string().optional()
|
|
6964
|
+
});
|
|
6965
|
+
/** A File Handling API entry. No `action`: every handler opens at Connect's
|
|
6966
|
+
* app root, because consuming launched files needs Connect's own code. */
|
|
6967
|
+
const connectPwaFileHandlerSchema = z.strictObject({
|
|
6968
|
+
accept: z.record(z.string(), z.array(z.string().regex(/^\./, "file extensions must start with '.'"))).describe("MIME type → file extensions. Each extension must start with '.'; browsers ignore entries without it."),
|
|
6969
|
+
icons: z.array(connectPwaIconSchema).optional().describe("OS-level file-type icons."),
|
|
6970
|
+
launch_type: z.enum(["single-client", "multiple-clients"]).optional()
|
|
6971
|
+
});
|
|
6972
|
+
/** Web-app-manifest fields a package or project may override. */
|
|
6973
|
+
const connectPwaManifestSchema = z.strictObject({
|
|
6974
|
+
name: z.string().optional(),
|
|
6975
|
+
short_name: z.string().optional(),
|
|
6976
|
+
description: z.string().optional(),
|
|
6977
|
+
theme_color: z.string().optional(),
|
|
6978
|
+
background_color: z.string().optional(),
|
|
6979
|
+
display: z.enum([
|
|
6980
|
+
"fullscreen",
|
|
6981
|
+
"standalone",
|
|
6982
|
+
"minimal-ui",
|
|
6983
|
+
"browser"
|
|
6984
|
+
]).optional(),
|
|
6985
|
+
start_url: z.string().optional(),
|
|
6986
|
+
scope: z.string().optional(),
|
|
6987
|
+
icons: z.array(connectPwaIconSchema).optional().describe("Icons appended to the built-in set and de-duplicated by (src, sizes, purpose)."),
|
|
6988
|
+
file_handlers: z.array(connectPwaFileHandlerSchema).optional().describe("File associations appended after Connect's built-in .phd/.phdm handler and de-duplicated on the whole entry. Entries only declare accepted types; there is no action field, because opening the files requires Connect's own runtime handling, so every handler opens at the app root."),
|
|
6989
|
+
launch_handler: z.strictObject({ client_mode: z.enum([
|
|
6990
|
+
"auto",
|
|
6991
|
+
"focus-existing",
|
|
6992
|
+
"navigate-existing",
|
|
6993
|
+
"navigate-new"
|
|
6994
|
+
]) }).optional().describe("How the OS launches the app for handled files/links. Connect defaults to focus-existing.")
|
|
6995
|
+
}).describe("Web-app-manifest field overrides.");
|
|
6996
|
+
const pwaShape = {
|
|
6997
|
+
globPatterns: z.array(z.string()).optional().describe("Extra Workbox precache globs, unioned with the built-ins."),
|
|
6998
|
+
globIgnores: z.array(z.string()).optional().describe("Extra precache ignore globs, unioned with the built-ins."),
|
|
6999
|
+
maximumFileSizeToCacheInBytes: z.number().optional().describe("Raise the precache file-size ceiling. The max across all contributors wins, so no contributor can shrink another's limit."),
|
|
7000
|
+
runtimeCaching: z.array(connectPwaRuntimeCachingSchema).optional().describe("Runtime-caching rules appended after the built-in rules. Workbox is first-match-wins, so these cannot override a built-in rule matching the same URL."),
|
|
7001
|
+
navigateFallbackDenylist: z.array(connectPwaUrlPatternSchema).optional().describe("Extra SPA navigate-fallback denylist patterns, unioned with the built-ins.")
|
|
7002
|
+
};
|
|
7003
|
+
const PWA_DESCRIPTION = "Progressive-web-app / service-worker overrides, layered on Connect's built-in PWA defaults at build time. Scalar fields deep-merge (this layer wins); the array members (icons, file_handlers, globs, runtimeCaching and denylist patterns) are additive; maximumFileSizeToCacheInBytes takes the max across contributors. (categories is not set here — it is derived from the manifest's category field.) Only applied when connect.app.offline is true.";
|
|
7004
|
+
/** `connect.pwa` as authored. */
|
|
7005
|
+
const connectPwaSchema = z.strictObject({
|
|
7006
|
+
manifest: connectPwaManifestSchema.optional(),
|
|
7007
|
+
...pwaShape
|
|
7008
|
+
}).describe(PWA_DESCRIPTION);
|
|
7009
|
+
/**
|
|
7010
|
+
* The `connect` block as authored: powerhouse.config.json's `connect`, the
|
|
7011
|
+
* connect host's `config`, and `ph connect config` writes. Every field is
|
|
7012
|
+
* optional; omit the section entirely for default behaviour.
|
|
7013
|
+
*/
|
|
7014
|
+
const connectConfigSchema = z.strictObject({
|
|
7015
|
+
branding: connectBrandingSchema.optional(),
|
|
7016
|
+
home: connectHomeSchema.optional(),
|
|
7017
|
+
app: connectAppSchema.optional(),
|
|
7018
|
+
ai: connectAiSchema.optional(),
|
|
7019
|
+
packages: connectPackagesSchema.optional(),
|
|
7020
|
+
drives: connectDrivesSchema.optional(),
|
|
7021
|
+
renown: connectRenownSchema.optional(),
|
|
7022
|
+
sentry: connectSentrySchema.optional(),
|
|
7023
|
+
openPanel: connectOpenPanelSchema.optional(),
|
|
7024
|
+
instance: connectInstanceSchema.optional(),
|
|
7025
|
+
reactor: connectReactorSchema.optional(),
|
|
7026
|
+
pwa: connectPwaSchema.optional()
|
|
7027
|
+
}).describe("Connect-specific UI customisations. All fields optional; omit the section entirely for default behaviour.");
|
|
7028
|
+
/** One entry of the host.js composition, projected into the served config as
|
|
7029
|
+
* data (module specifier + validated config). */
|
|
7030
|
+
const connectCompositionEntrySchema = z.strictObject({
|
|
7031
|
+
module: z.string(),
|
|
7032
|
+
config: z.record(z.string(), z.unknown()).optional()
|
|
7033
|
+
});
|
|
7034
|
+
/** `instance` plus `reactorClient`, derived from the host's reactor backends. */
|
|
7035
|
+
const connectRuntimeInstanceSchema = connectInstanceSchema.extend({ reactorClient: connectReactorClientModeSchema.optional() });
|
|
7036
|
+
/** The manifest plus `categories`, derived from contributors' `category`. */
|
|
7037
|
+
const connectRuntimePwaManifestSchema = connectPwaManifestSchema.extend({ categories: z.array(z.string()).optional() });
|
|
7038
|
+
const connectRuntimePwaSchema = connectPwaSchema.extend({ manifest: connectRuntimePwaManifestSchema.optional() });
|
|
7039
|
+
connectConfigSchema.extend({
|
|
7040
|
+
composition: z.array(connectCompositionEntrySchema).optional(),
|
|
7041
|
+
instance: connectRuntimeInstanceSchema.optional(),
|
|
7042
|
+
pwa: connectRuntimePwaSchema.optional()
|
|
7043
|
+
});
|
|
7044
|
+
//#endregion
|
|
6658
7045
|
//#region connect/schema-fragments.ts
|
|
6659
7046
|
const powerhousePackageSchema = {
|
|
6660
7047
|
type: "object",
|
|
@@ -6685,563 +7072,17 @@ const powerhousePackageSchema = {
|
|
|
6685
7072
|
}
|
|
6686
7073
|
}
|
|
6687
7074
|
};
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
type: "boolean",
|
|
6700
|
-
description: "When false, the section's 'add drive' affordance is hidden.",
|
|
6701
|
-
default: true
|
|
6702
|
-
},
|
|
6703
|
-
allowDelete: {
|
|
6704
|
-
type: "boolean",
|
|
6705
|
-
description: "When false, drives in this section cannot be deleted from the UI.",
|
|
6706
|
-
default: true
|
|
6707
|
-
}
|
|
6708
|
-
}
|
|
6709
|
-
};
|
|
6710
|
-
const pwaUrlPatternSchema = {
|
|
6711
|
-
description: "URL match. A string is matched verbatim by Workbox; { source, flags } is rebuilt into a RegExp at build time.",
|
|
6712
|
-
oneOf: [{ type: "string" }, {
|
|
6713
|
-
type: "object",
|
|
6714
|
-
additionalProperties: false,
|
|
6715
|
-
required: ["source"],
|
|
6716
|
-
properties: {
|
|
6717
|
-
source: {
|
|
6718
|
-
type: "string",
|
|
6719
|
-
description: "RegExp source."
|
|
6720
|
-
},
|
|
6721
|
-
flags: {
|
|
6722
|
-
type: "string",
|
|
6723
|
-
description: "RegExp flags (e.g. 'i')."
|
|
6724
|
-
}
|
|
6725
|
-
}
|
|
6726
|
-
}]
|
|
6727
|
-
};
|
|
6728
|
-
const pwaIconSchema = {
|
|
6729
|
-
type: "object",
|
|
6730
|
-
additionalProperties: false,
|
|
6731
|
-
required: ["src"],
|
|
6732
|
-
properties: {
|
|
6733
|
-
src: { type: "string" },
|
|
6734
|
-
sizes: { type: "string" },
|
|
6735
|
-
type: { type: "string" },
|
|
6736
|
-
purpose: { type: "string" }
|
|
6737
|
-
}
|
|
6738
|
-
};
|
|
6739
|
-
const phConnectRuntimeConfigSchema = {
|
|
6740
|
-
type: "object",
|
|
6741
|
-
additionalProperties: false,
|
|
6742
|
-
description: "Connect-specific UI customisations. All fields optional; omit the section entirely for default behaviour.",
|
|
6743
|
-
properties: {
|
|
6744
|
-
branding: {
|
|
6745
|
-
type: "object",
|
|
6746
|
-
additionalProperties: false,
|
|
6747
|
-
description: "App identity and visual branding.",
|
|
6748
|
-
properties: {
|
|
6749
|
-
appName: {
|
|
6750
|
-
type: "string",
|
|
6751
|
-
description: "Browser tab title and any in-app brand text. Defaults to 'Powerhouse Connect'."
|
|
6752
|
-
},
|
|
6753
|
-
homeBackground: {
|
|
6754
|
-
type: ["string", "null"],
|
|
6755
|
-
description: "Hero image on the empty home screen. URL or path to override; null or omitted uses the bundled default image."
|
|
6756
|
-
},
|
|
6757
|
-
favicon: {
|
|
6758
|
-
type: ["string", "null"],
|
|
6759
|
-
description: "The browser tab icon: a file (.ico, .svg or .png) relative to the project, served and built as icon.ico. A build input; the built runtime config leaves it out. `ph connect build --favicon` wins over it."
|
|
6760
|
-
}
|
|
6761
|
-
}
|
|
6762
|
-
},
|
|
6763
|
-
app: {
|
|
6764
|
-
type: "object",
|
|
6765
|
-
additionalProperties: false,
|
|
6766
|
-
description: "Top-level Connect application behaviour.",
|
|
6767
|
-
properties: {
|
|
6768
|
-
logLevel: {
|
|
6769
|
-
type: "string",
|
|
6770
|
-
enum: [
|
|
6771
|
-
"debug",
|
|
6772
|
-
"info",
|
|
6773
|
-
"warn",
|
|
6774
|
-
"error"
|
|
6775
|
-
],
|
|
6776
|
-
description: "Log level applied by Connect's logger at boot. Affects browser-side output only.",
|
|
6777
|
-
default: "info"
|
|
6778
|
-
},
|
|
6779
|
-
basePath: {
|
|
6780
|
-
type: "string",
|
|
6781
|
-
description: "Base path Connect is mounted under (e.g. '/connect' for subpath deploys). Normalised at runtime to start and end with '/'. Defaults to the build-time BASE_URL.",
|
|
6782
|
-
default: "/"
|
|
6783
|
-
},
|
|
6784
|
-
offline: {
|
|
6785
|
-
type: "boolean",
|
|
6786
|
-
description: "When true (default), the build emits a precaching service worker so Connect's app shell works offline, and the SPA registers it at boot. Set false to opt this deployment out: no service worker is built, the SPA skips registration, and any previously-installed worker is unregistered.",
|
|
6787
|
-
default: true
|
|
6788
|
-
},
|
|
6789
|
-
studioMode: {
|
|
6790
|
-
type: "boolean",
|
|
6791
|
-
description: "Studio mode. Enables builder-only capabilities: Connect loads the vetra package and exposes DocumentModel (and vetra spec types) as creatable documents. Forced on by `ph vetra` / `ph connect studio`; false by default.",
|
|
6792
|
-
default: false
|
|
6793
|
-
},
|
|
6794
|
-
workflowsEnabled: {
|
|
6795
|
-
type: "boolean",
|
|
6796
|
-
description: "Powerhouse workflows in Connect. When true the tab loads the @powerhousedao/workflow package (workflow + connection documents, their editors and Workflow Studio) and the reactor worker registers its document models. Falls back to the top-level `workflows.enabled`; set it to override that for Connect. Independent of studioMode. False when neither is set."
|
|
6797
|
-
}
|
|
6798
|
-
}
|
|
6799
|
-
},
|
|
6800
|
-
ai: {
|
|
6801
|
-
type: "object",
|
|
6802
|
-
additionalProperties: false,
|
|
6803
|
-
description: "AI assistant (chat) behaviour.",
|
|
6804
|
-
properties: { assistantEnabled: {
|
|
6805
|
-
type: "boolean",
|
|
6806
|
-
description: "When true, Connect mounts the in-browser AI assistant (bottom-right chat FAB that talks to a user-configured OpenAI-compatible endpoint and acts on the reactor). Disabled by default.",
|
|
6807
|
-
default: false
|
|
6808
|
-
} }
|
|
6809
|
-
},
|
|
6810
|
-
packages: {
|
|
6811
|
-
type: "object",
|
|
6812
|
-
additionalProperties: false,
|
|
6813
|
-
description: "Runtime behaviour for the Connect package manager (separate from top-level `packages[]`, which lists which packages to load).",
|
|
6814
|
-
properties: {
|
|
6815
|
-
externalEnabled: {
|
|
6816
|
-
type: "boolean",
|
|
6817
|
-
description: "When false, Connect refuses to load any package that wasn't bundled at build time. Affirmative replacement for the legacy PH_CONNECT_EXTERNAL_PACKAGES_DISABLED env var.",
|
|
6818
|
-
default: true
|
|
6819
|
-
},
|
|
6820
|
-
liveReload: {
|
|
6821
|
-
type: "boolean",
|
|
6822
|
-
description: "When true, Connect subscribes to the static-mode `/__packages` SSE channel so live publishes flow into the running tab without a page reload. Only works under hosting that serves this channel (e.g. ph-clint static mode).",
|
|
6823
|
-
default: false
|
|
6824
|
-
}
|
|
6825
|
-
}
|
|
6826
|
-
},
|
|
6827
|
-
drives: {
|
|
6828
|
-
type: "object",
|
|
6829
|
-
additionalProperties: false,
|
|
6830
|
-
description: "Default-drive and add-drive UI behaviour.",
|
|
6831
|
-
properties: {
|
|
6832
|
-
allowAddDrive: {
|
|
6833
|
-
type: "boolean",
|
|
6834
|
-
description: "When false, the SPA hides the 'add drive' affordance entirely (top-level). Per-section overrides live in `sections.{remote,local}.allowAdd`.",
|
|
6835
|
-
default: true
|
|
6836
|
-
},
|
|
6837
|
-
defaultDrives: {
|
|
6838
|
-
type: "array",
|
|
6839
|
-
description: "Drives the SPA auto-connects to on first load. Each entry is either a remote drive (a URL, with optional name/icon overrides) or a local drive (created locally on first boot, with a stable id and optional name/icon/app).",
|
|
6840
|
-
default: [],
|
|
6841
|
-
items: { oneOf: [{
|
|
6842
|
-
type: "object",
|
|
6843
|
-
additionalProperties: false,
|
|
6844
|
-
required: ["url"],
|
|
6845
|
-
properties: {
|
|
6846
|
-
url: { type: "string" },
|
|
6847
|
-
name: { type: ["string", "null"] },
|
|
6848
|
-
icon: { type: ["string", "null"] }
|
|
6849
|
-
}
|
|
6850
|
-
}, {
|
|
6851
|
-
type: "object",
|
|
6852
|
-
additionalProperties: false,
|
|
6853
|
-
required: ["local", "id"],
|
|
6854
|
-
properties: {
|
|
6855
|
-
local: {
|
|
6856
|
-
const: true,
|
|
6857
|
-
description: "Discriminator: this entry is a local drive created on first boot."
|
|
6858
|
-
},
|
|
6859
|
-
id: {
|
|
6860
|
-
type: "string",
|
|
6861
|
-
description: "Stable drive id. The drive is created with this id on first boot and is not re-created on later boots."
|
|
6862
|
-
},
|
|
6863
|
-
name: { type: ["string", "null"] },
|
|
6864
|
-
icon: { type: ["string", "null"] },
|
|
6865
|
-
app: {
|
|
6866
|
-
type: "string",
|
|
6867
|
-
description: "Drive app (preferred editor) to open on the drive."
|
|
6868
|
-
}
|
|
6869
|
-
}
|
|
6870
|
-
}] }
|
|
6871
|
-
},
|
|
6872
|
-
preserveStrategy: {
|
|
6873
|
-
type: "string",
|
|
6874
|
-
enum: ["preserve-all", "preserve-by-url-and-detach"],
|
|
6875
|
-
description: "Strategy applied when defaultDrives change between deploys. 'preserve-all' keeps user-added drives untouched; 'preserve-by-url-and-detach' detaches removed default drives. No schema default — opt-in only."
|
|
6876
|
-
},
|
|
6877
|
-
sections: {
|
|
6878
|
-
type: "object",
|
|
6879
|
-
additionalProperties: false,
|
|
6880
|
-
description: "Per-section visibility and affordance toggles. `remote` covers what was historically split into 'public' + 'cloud'; `local` is browser-local drives.",
|
|
6881
|
-
properties: {
|
|
6882
|
-
remote: driveSectionSchema,
|
|
6883
|
-
local: driveSectionSchema
|
|
6884
|
-
}
|
|
6885
|
-
}
|
|
6886
|
-
}
|
|
6887
|
-
},
|
|
6888
|
-
renown: {
|
|
6889
|
-
type: "object",
|
|
6890
|
-
additionalProperties: false,
|
|
6891
|
-
description: "Renown identity / authentication coordinates.",
|
|
6892
|
-
properties: {
|
|
6893
|
-
url: {
|
|
6894
|
-
type: "string",
|
|
6895
|
-
description: "Renown auth service URL.",
|
|
6896
|
-
default: "https://www.renown.id"
|
|
6897
|
-
},
|
|
6898
|
-
networkId: {
|
|
6899
|
-
type: "string",
|
|
6900
|
-
description: "CAIP-2 network namespace (e.g. 'eip155').",
|
|
6901
|
-
default: "eip155"
|
|
6902
|
-
},
|
|
6903
|
-
chainId: {
|
|
6904
|
-
type: "number",
|
|
6905
|
-
description: "CAIP-2 chain reference within the network namespace.",
|
|
6906
|
-
default: 1
|
|
6907
|
-
},
|
|
6908
|
-
namespace: {
|
|
6909
|
-
type: "string",
|
|
6910
|
-
description: "Renown localStorage namespace; share it across Connects to share login."
|
|
6911
|
-
},
|
|
6912
|
-
switchboardUrl: {
|
|
6913
|
-
type: "string",
|
|
6914
|
-
description: "Switchboard GraphQL URL. When set, Connect enables in-page (no-redirect) Renown sign-in; otherwise it falls back to the redirect flow via `url`."
|
|
6915
|
-
},
|
|
6916
|
-
adapters: {
|
|
6917
|
-
type: "object",
|
|
6918
|
-
additionalProperties: false,
|
|
6919
|
-
description: "Per-adapter wallet config for in-page auth. Presence of an adapter key enables it; omit or leave empty for redirect-only behaviour.",
|
|
6920
|
-
properties: {
|
|
6921
|
-
rainbow: {
|
|
6922
|
-
type: "object",
|
|
6923
|
-
additionalProperties: false,
|
|
6924
|
-
description: "wagmi + RainbowKit external-wallet adapter config.",
|
|
6925
|
-
properties: {
|
|
6926
|
-
walletConnectProjectId: {
|
|
6927
|
-
type: "string",
|
|
6928
|
-
description: "WalletConnect project id; required for this adapter to function."
|
|
6929
|
-
},
|
|
6930
|
-
infuraProjectId: {
|
|
6931
|
-
type: "string",
|
|
6932
|
-
description: "Optional Infura project id used to build RPC transports."
|
|
6933
|
-
}
|
|
6934
|
-
}
|
|
6935
|
-
},
|
|
6936
|
-
privy: {
|
|
6937
|
-
type: "object",
|
|
6938
|
-
additionalProperties: false,
|
|
6939
|
-
description: "Privy embedded/social adapter config.",
|
|
6940
|
-
properties: {
|
|
6941
|
-
appId: {
|
|
6942
|
-
type: "string",
|
|
6943
|
-
description: "Privy application id; required for this adapter to function."
|
|
6944
|
-
},
|
|
6945
|
-
clientId: {
|
|
6946
|
-
type: "string",
|
|
6947
|
-
description: "Optional Privy client id."
|
|
6948
|
-
},
|
|
6949
|
-
methods: {
|
|
6950
|
-
type: "array",
|
|
6951
|
-
description: "Login methods this adapter offers; default per adapter when omitted.",
|
|
6952
|
-
items: { type: "string" }
|
|
6953
|
-
}
|
|
6954
|
-
}
|
|
6955
|
-
}
|
|
6956
|
-
}
|
|
6957
|
-
}
|
|
6958
|
-
}
|
|
6959
|
-
},
|
|
6960
|
-
sentry: {
|
|
6961
|
-
type: "object",
|
|
6962
|
-
additionalProperties: false,
|
|
6963
|
-
description: "Sentry error-tracking coordinates. Set `dsn` to enable Sentry; leave `dsn` null to disable. The Sentry release tag stays build-time (stamped via Vite's `define` from WORKSPACE_VERSION) so it always matches the sourcemaps uploaded by CI.",
|
|
6964
|
-
properties: {
|
|
6965
|
-
dsn: {
|
|
6966
|
-
type: ["string", "null"],
|
|
6967
|
-
description: "Sentry DSN URL. `null` disables Sentry entirely; the SPA never loads the Sentry SDK chunk.",
|
|
6968
|
-
default: null
|
|
6969
|
-
},
|
|
6970
|
-
env: {
|
|
6971
|
-
type: "string",
|
|
6972
|
-
description: "Sentry environment label, surfaced as the `environment` tag on every event.",
|
|
6973
|
-
default: "dev"
|
|
6974
|
-
},
|
|
6975
|
-
tracing: {
|
|
6976
|
-
type: "boolean",
|
|
6977
|
-
description: "Enable Sentry performance tracing.",
|
|
6978
|
-
default: false
|
|
6979
|
-
}
|
|
6980
|
-
}
|
|
6981
|
-
},
|
|
6982
|
-
openPanel: {
|
|
6983
|
-
type: "object",
|
|
6984
|
-
additionalProperties: false,
|
|
6985
|
-
description: "OpenPanel product analytics. Set `clientId` to enable; an empty `clientId` disables it. Events are only sent after the user accepts analytics cookies. Takes precedence over the build-time PH_CONNECT_OPENPANEL_* env vars.",
|
|
6986
|
-
properties: {
|
|
6987
|
-
clientId: {
|
|
6988
|
-
type: "string",
|
|
6989
|
-
description: "OpenPanel client id. Empty string disables OpenPanel entirely.",
|
|
6990
|
-
default: ""
|
|
6991
|
-
},
|
|
6992
|
-
apiUrl: {
|
|
6993
|
-
type: "string",
|
|
6994
|
-
description: "OpenPanel API URL for self-hosted instances (e.g. 'https://openpanel.example/api'). Omit to use OpenPanel's hosted API."
|
|
6995
|
-
},
|
|
6996
|
-
trackUiEvents: {
|
|
6997
|
-
type: "boolean",
|
|
6998
|
-
description: "Track UI events.",
|
|
6999
|
-
default: true
|
|
7000
|
-
},
|
|
7001
|
-
trackOperations: {
|
|
7002
|
-
type: "boolean",
|
|
7003
|
-
description: "Track document operations.",
|
|
7004
|
-
default: true
|
|
7005
|
-
}
|
|
7006
|
-
}
|
|
7007
|
-
},
|
|
7008
|
-
instance: {
|
|
7009
|
-
type: "object",
|
|
7010
|
-
additionalProperties: false,
|
|
7011
|
-
required: ["namespace", "reactorWorker"],
|
|
7012
|
-
description: "Per-instance identity. Lets one origin host multiple isolated Connect instances, each with its own storage + SharedWorker namespace.",
|
|
7013
|
-
properties: {
|
|
7014
|
-
namespace: {
|
|
7015
|
-
type: ["string", "null"],
|
|
7016
|
-
description: "Explicit storage/SharedWorker namespace for this instance. `null` derives it from the base path (and, later, the configured endpoint), so root deployments stay byte-identical.",
|
|
7017
|
-
default: null
|
|
7018
|
-
},
|
|
7019
|
-
reactorWorker: {
|
|
7020
|
-
type: "boolean",
|
|
7021
|
-
description: "Host the reactor in a shared worker instead of on the main thread. Off by default; the main-thread reactor stays the proven path until cutover is verified. Packaged deployments load the worker from the prebuilt bundle `ph connect build` emits under __reactor_worker__/ (the dev server builds it lazily at the same path); when that bundle is absent the feature reports itself unavailable instead of starting a worker that cannot load.",
|
|
7022
|
-
default: false
|
|
7023
|
-
},
|
|
7024
|
-
multiReactor: {
|
|
7025
|
-
type: "boolean",
|
|
7026
|
-
description: "Opt-in multi-reactor routing. When on, Connect routes through the in-browser reactor plus remote backends instead of the single in-browser reactor. Off by default; the single-reactor path is unchanged.",
|
|
7027
|
-
default: false
|
|
7028
|
-
}
|
|
7029
|
-
}
|
|
7030
|
-
},
|
|
7031
|
-
reactor: {
|
|
7032
|
-
type: "object",
|
|
7033
|
-
additionalProperties: false,
|
|
7034
|
-
description: "Settings for the reactor Connect runs in the browser, on the main thread or in the shared worker alike.",
|
|
7035
|
-
properties: {
|
|
7036
|
-
featureFlags: {
|
|
7037
|
-
type: "object",
|
|
7038
|
-
additionalProperties: false,
|
|
7039
|
-
description: "Enforcement flags. Each implies its predecessors, and the reactor refuses to boot on a set that names a later flag without an earlier one. These are consensus settings: a Connect syncing with a fleet must carry the same flags the fleet does, or the two reach different replay outcomes for the same history and diverge.",
|
|
7040
|
-
properties: {
|
|
7041
|
-
documentDecisions: {
|
|
7042
|
-
type: "boolean",
|
|
7043
|
-
description: "Decide writes from the document stream rather than the document meta cache, so a backdated deletion denies the operations that sort after it.",
|
|
7044
|
-
default: false
|
|
7045
|
-
},
|
|
7046
|
-
authEnforcement: {
|
|
7047
|
-
type: "boolean",
|
|
7048
|
-
description: "Enforce the auth scope's policy at admission, replay, and read. Requires documentDecisions.",
|
|
7049
|
-
default: false
|
|
7050
|
-
},
|
|
7051
|
-
authGroups: {
|
|
7052
|
-
type: "boolean",
|
|
7053
|
-
description: "Let `{ group }` principals match against the rosters of the group documents a policy names. Requires authEnforcement.",
|
|
7054
|
-
default: false
|
|
7055
|
-
},
|
|
7056
|
-
authConditions: {
|
|
7057
|
-
type: "boolean",
|
|
7058
|
-
description: "Evaluate `where` and `match` conditions on grants. Requires authGroups. Do not enable on a fleet `preflight:auth` reports as crossing a reducer version.",
|
|
7059
|
-
default: false
|
|
7060
|
-
}
|
|
7061
|
-
}
|
|
7062
|
-
},
|
|
7063
|
-
createSignaturePolicy: {
|
|
7064
|
-
type: "string",
|
|
7065
|
-
enum: ["legacy", "v2-required"],
|
|
7066
|
-
description: "What new documents are created as. `v2-required` documents accept only v2 action signatures and take content-addressed ids; set `legacy` while any peer Connect syncs with predates them. Existing documents keep their policy.",
|
|
7067
|
-
default: "v2-required"
|
|
7068
|
-
},
|
|
7069
|
-
unsupportedStoredDocuments: {
|
|
7070
|
-
type: "string",
|
|
7071
|
-
enum: ["refuse", "read-only"],
|
|
7072
|
-
description: "What the reactor does when this browser's store holds documents at protocol versions this build does not run. `refuse` fails the boot and names the versions; `read-only` boots and keeps those documents read-only.",
|
|
7073
|
-
default: "refuse"
|
|
7074
|
-
}
|
|
7075
|
-
}
|
|
7076
|
-
},
|
|
7077
|
-
pwa: {
|
|
7078
|
-
type: "object",
|
|
7079
|
-
additionalProperties: false,
|
|
7080
|
-
description: "Progressive-web-app / service-worker overrides, layered on Connect's built-in PWA defaults at build time. Scalar fields deep-merge (this layer wins); the array members (icons, file_handlers, globs, runtimeCaching and denylist patterns) are additive; maximumFileSizeToCacheInBytes takes the max across contributors. (categories is not set here — it is derived from the manifest's category field.) Only applied when connect.app.offline is true.",
|
|
7081
|
-
properties: {
|
|
7082
|
-
manifest: {
|
|
7083
|
-
type: "object",
|
|
7084
|
-
additionalProperties: false,
|
|
7085
|
-
description: "Web-app-manifest field overrides.",
|
|
7086
|
-
properties: {
|
|
7087
|
-
name: { type: "string" },
|
|
7088
|
-
short_name: { type: "string" },
|
|
7089
|
-
description: { type: "string" },
|
|
7090
|
-
theme_color: { type: "string" },
|
|
7091
|
-
background_color: { type: "string" },
|
|
7092
|
-
display: {
|
|
7093
|
-
type: "string",
|
|
7094
|
-
enum: [
|
|
7095
|
-
"fullscreen",
|
|
7096
|
-
"standalone",
|
|
7097
|
-
"minimal-ui",
|
|
7098
|
-
"browser"
|
|
7099
|
-
]
|
|
7100
|
-
},
|
|
7101
|
-
start_url: { type: "string" },
|
|
7102
|
-
scope: { type: "string" },
|
|
7103
|
-
icons: {
|
|
7104
|
-
type: "array",
|
|
7105
|
-
description: "Icons appended to the built-in set and de-duplicated by (src, sizes, purpose).",
|
|
7106
|
-
items: pwaIconSchema
|
|
7107
|
-
},
|
|
7108
|
-
file_handlers: {
|
|
7109
|
-
type: "array",
|
|
7110
|
-
description: "File associations appended after Connect's built-in .phd/.phdm handler and de-duplicated on the whole entry. Entries only declare accepted types; there is no action field, because opening the files requires Connect's own runtime handling, so every handler opens at the app root.",
|
|
7111
|
-
items: {
|
|
7112
|
-
type: "object",
|
|
7113
|
-
additionalProperties: false,
|
|
7114
|
-
required: ["accept"],
|
|
7115
|
-
properties: {
|
|
7116
|
-
accept: {
|
|
7117
|
-
type: "object",
|
|
7118
|
-
description: "MIME type → file extensions. Each extension must start with '.'; browsers ignore entries without it.",
|
|
7119
|
-
additionalProperties: {
|
|
7120
|
-
type: "array",
|
|
7121
|
-
items: {
|
|
7122
|
-
type: "string",
|
|
7123
|
-
pattern: "^\\."
|
|
7124
|
-
}
|
|
7125
|
-
}
|
|
7126
|
-
},
|
|
7127
|
-
icons: {
|
|
7128
|
-
type: "array",
|
|
7129
|
-
description: "OS-level file-type icons.",
|
|
7130
|
-
items: pwaIconSchema
|
|
7131
|
-
},
|
|
7132
|
-
launch_type: {
|
|
7133
|
-
type: "string",
|
|
7134
|
-
enum: ["single-client", "multiple-clients"]
|
|
7135
|
-
}
|
|
7136
|
-
}
|
|
7137
|
-
}
|
|
7138
|
-
},
|
|
7139
|
-
launch_handler: {
|
|
7140
|
-
type: "object",
|
|
7141
|
-
additionalProperties: false,
|
|
7142
|
-
required: ["client_mode"],
|
|
7143
|
-
description: "How the OS launches the app for handled files/links. Connect defaults to focus-existing.",
|
|
7144
|
-
properties: { client_mode: {
|
|
7145
|
-
type: "string",
|
|
7146
|
-
enum: [
|
|
7147
|
-
"auto",
|
|
7148
|
-
"focus-existing",
|
|
7149
|
-
"navigate-existing",
|
|
7150
|
-
"navigate-new"
|
|
7151
|
-
]
|
|
7152
|
-
} }
|
|
7153
|
-
}
|
|
7154
|
-
}
|
|
7155
|
-
},
|
|
7156
|
-
globPatterns: {
|
|
7157
|
-
type: "array",
|
|
7158
|
-
items: { type: "string" },
|
|
7159
|
-
description: "Extra Workbox precache globs, unioned with the built-ins."
|
|
7160
|
-
},
|
|
7161
|
-
globIgnores: {
|
|
7162
|
-
type: "array",
|
|
7163
|
-
items: { type: "string" },
|
|
7164
|
-
description: "Extra precache ignore globs, unioned with the built-ins."
|
|
7165
|
-
},
|
|
7166
|
-
maximumFileSizeToCacheInBytes: {
|
|
7167
|
-
type: "number",
|
|
7168
|
-
description: "Raise the precache file-size ceiling. The max across all contributors wins, so no contributor can shrink another's limit."
|
|
7169
|
-
},
|
|
7170
|
-
runtimeCaching: {
|
|
7171
|
-
type: "array",
|
|
7172
|
-
description: "Runtime-caching rules appended after the built-in rules. Workbox is first-match-wins, so these cannot override a built-in rule matching the same URL.",
|
|
7173
|
-
items: {
|
|
7174
|
-
type: "object",
|
|
7175
|
-
additionalProperties: false,
|
|
7176
|
-
required: ["urlPattern", "handler"],
|
|
7177
|
-
properties: {
|
|
7178
|
-
urlPattern: pwaUrlPatternSchema,
|
|
7179
|
-
handler: {
|
|
7180
|
-
type: "string",
|
|
7181
|
-
enum: [
|
|
7182
|
-
"CacheFirst",
|
|
7183
|
-
"CacheOnly",
|
|
7184
|
-
"NetworkFirst",
|
|
7185
|
-
"NetworkOnly",
|
|
7186
|
-
"StaleWhileRevalidate"
|
|
7187
|
-
]
|
|
7188
|
-
},
|
|
7189
|
-
method: {
|
|
7190
|
-
type: "string",
|
|
7191
|
-
enum: [
|
|
7192
|
-
"GET",
|
|
7193
|
-
"POST",
|
|
7194
|
-
"PUT",
|
|
7195
|
-
"DELETE",
|
|
7196
|
-
"HEAD",
|
|
7197
|
-
"PATCH"
|
|
7198
|
-
]
|
|
7199
|
-
},
|
|
7200
|
-
options: {
|
|
7201
|
-
type: "object",
|
|
7202
|
-
additionalProperties: false,
|
|
7203
|
-
properties: {
|
|
7204
|
-
cacheName: { type: "string" },
|
|
7205
|
-
networkTimeoutSeconds: {
|
|
7206
|
-
type: "number",
|
|
7207
|
-
description: "Seconds a NetworkFirst rule waits for the network before falling back to the cache."
|
|
7208
|
-
},
|
|
7209
|
-
expiration: {
|
|
7210
|
-
type: "object",
|
|
7211
|
-
additionalProperties: false,
|
|
7212
|
-
properties: {
|
|
7213
|
-
maxEntries: { type: "number" },
|
|
7214
|
-
maxAgeSeconds: { type: "number" }
|
|
7215
|
-
}
|
|
7216
|
-
},
|
|
7217
|
-
cacheableResponse: {
|
|
7218
|
-
type: "object",
|
|
7219
|
-
additionalProperties: false,
|
|
7220
|
-
properties: {
|
|
7221
|
-
statuses: {
|
|
7222
|
-
type: "array",
|
|
7223
|
-
items: { type: "number" }
|
|
7224
|
-
},
|
|
7225
|
-
headers: {
|
|
7226
|
-
type: "object",
|
|
7227
|
-
additionalProperties: { type: "string" }
|
|
7228
|
-
}
|
|
7229
|
-
}
|
|
7230
|
-
}
|
|
7231
|
-
}
|
|
7232
|
-
}
|
|
7233
|
-
}
|
|
7234
|
-
}
|
|
7235
|
-
},
|
|
7236
|
-
navigateFallbackDenylist: {
|
|
7237
|
-
type: "array",
|
|
7238
|
-
description: "Extra SPA navigate-fallback denylist patterns, unioned with the built-ins.",
|
|
7239
|
-
items: pwaUrlPatternSchema
|
|
7240
|
-
}
|
|
7241
|
-
}
|
|
7242
|
-
}
|
|
7243
|
-
}
|
|
7244
|
-
};
|
|
7075
|
+
/** Emits a zod schema as a draft-07 fragment: input shape, no `$schema`. */
|
|
7076
|
+
function emitJsonSchemaFragment(schema) {
|
|
7077
|
+
const { $schema: _, ...fragment } = toJSONSchema(schema, {
|
|
7078
|
+
target: "draft-7",
|
|
7079
|
+
io: "input",
|
|
7080
|
+
unrepresentable: "throw"
|
|
7081
|
+
});
|
|
7082
|
+
return fragment;
|
|
7083
|
+
}
|
|
7084
|
+
/** The authored `connect` block, as validated by Ajv. */
|
|
7085
|
+
const phConnectRuntimeConfigSchema = /* @__PURE__ */ emitJsonSchemaFragment(connectConfigSchema);
|
|
7245
7086
|
//#endregion
|
|
7246
7087
|
//#region clis/source-config-schema.ts
|
|
7247
7088
|
const SOURCE_CONFIG_SCHEMA_ID = "https://powerhouse.inc/schemas/powerhouse.source.json";
|
|
@@ -7446,6 +7287,15 @@ const sourceConfigSchema = {
|
|
|
7446
7287
|
}
|
|
7447
7288
|
}
|
|
7448
7289
|
},
|
|
7290
|
+
assistant: {
|
|
7291
|
+
type: "object",
|
|
7292
|
+
additionalProperties: false,
|
|
7293
|
+
description: "The project's agent host (hosts/assistant): a headless Mastra agent API on the project switchboard.",
|
|
7294
|
+
properties: { port: {
|
|
7295
|
+
type: "integer",
|
|
7296
|
+
description: "Port the assistant host's chat-completions API listens on. Read by hosts/assistant/host.js (default 4910)."
|
|
7297
|
+
} }
|
|
7298
|
+
},
|
|
7449
7299
|
workflows: {
|
|
7450
7300
|
type: "object",
|
|
7451
7301
|
additionalProperties: false,
|