@powerhousedao/shared 6.2.3-dev.84 → 6.2.3-dev.86

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.
Files changed (44) hide show
  1. package/dist/clis/args/{help-CmnOv3z3.d.mts → help-Cgh3krcq.d.mts} +14 -2
  2. package/dist/clis/args/help-Cgh3krcq.d.mts.map +1 -0
  3. package/dist/clis/args/{help-Cb66IK-J.mjs → help-DnOa5Gr-.mjs} +9 -1
  4. package/dist/clis/args/help-DnOa5Gr-.mjs.map +1 -0
  5. package/dist/clis/args/help.d.mts +1 -1
  6. package/dist/clis/args/help.mjs +2 -1
  7. package/dist/clis/args/index.d.mts +3 -2
  8. package/dist/clis/args/index.mjs +3 -2
  9. package/dist/clis/args/keyframes.d.mts +25 -0
  10. package/dist/clis/args/keyframes.d.mts.map +1 -0
  11. package/dist/clis/args/keyframes.mjs +42 -0
  12. package/dist/clis/args/keyframes.mjs.map +1 -0
  13. package/dist/clis/build-pieces.d.mts +1 -1
  14. package/dist/clis/command-names.d.mts +1 -1
  15. package/dist/clis/command-names.d.mts.map +1 -1
  16. package/dist/clis/command-names.mjs +1 -0
  17. package/dist/clis/command-names.mjs.map +1 -1
  18. package/dist/clis/constants.d.mts +1 -1
  19. package/dist/clis/index.d.mts +90 -2
  20. package/dist/clis/index.d.mts.map +1 -1
  21. package/dist/clis/index.mjs +77 -1
  22. package/dist/clis/index.mjs.map +1 -1
  23. package/dist/clis/{types-0G3o7wZE.d.mts → types-Cu2NW3TI.d.mts} +10 -1
  24. package/dist/clis/{types-0G3o7wZE.d.mts.map → types-Cu2NW3TI.d.mts.map} +1 -1
  25. package/dist/connect/config-loader.d.ts +1 -1
  26. package/dist/connect/index.d.ts +1 -1
  27. package/dist/document-drive/index.d.ts +3 -3
  28. package/dist/document-model/dispatch.d.ts +1 -1
  29. package/dist/document-model/errors.d.ts +1 -1
  30. package/dist/document-model/index.d.ts +2 -2
  31. package/dist/{index-CR7EJfyR.d.ts → index-Dl4JuIBh.d.ts} +2 -2
  32. package/dist/{index-CR7EJfyR.d.ts.map → index-Dl4JuIBh.d.ts.map} +1 -1
  33. package/dist/index.d.ts +4 -4
  34. package/dist/processors/index.d.ts +2 -2
  35. package/dist/processors/testing.d.ts +1 -1
  36. package/dist/registry/index.d.ts +2 -2
  37. package/dist/registry/manifest-slim.d.ts +2 -2
  38. package/dist/{types-DR4mZKAj.d.ts → types-BbovaqKc.d.ts} +135 -4
  39. package/dist/{types-DR4mZKAj.d.ts.map → types-BbovaqKc.d.ts.map} +1 -1
  40. package/dist/{types-DPBZvxkk.d.ts → types-nQBneHs2.d.ts} +2 -2
  41. package/dist/{types-DPBZvxkk.d.ts.map → types-nQBneHs2.d.ts.map} +1 -1
  42. package/package.json +1 -1
  43. package/dist/clis/args/help-Cb66IK-J.mjs.map +0 -1
  44. package/dist/clis/args/help-CmnOv3z3.d.mts.map +0 -1
@@ -1048,6 +1048,43 @@ const installArgs = {
1048
1048
  ...debugArgs
1049
1049
  };
1050
1050
  //#endregion
1051
+ //#region clis/args/keyframes.ts
1052
+ const KEYFRAMES_ACTIONS = [
1053
+ "preview",
1054
+ "clean",
1055
+ "status",
1056
+ "cancel",
1057
+ "reclaim"
1058
+ ];
1059
+ const keyframesArgs = {
1060
+ action: positional({
1061
+ type: oneOf(KEYFRAMES_ACTIONS),
1062
+ displayName: "action",
1063
+ description: "preview: report what a clean-up would remove, without writing. clean: apply the configured keep and remove the keyframes of deleted documents (needs --yes). status: show the latest run and reclaim. cancel: stop a running clean-up. reclaim: rewrite the Keyframe table to give the space back to the disk."
1064
+ }),
1065
+ url: option({
1066
+ type: optional(string),
1067
+ long: "url",
1068
+ description: "The switchboard's GraphQL endpoint, e.g. http://localhost:4001/graphql. Defaults to reactor.port in powerhouse.config.json."
1069
+ }),
1070
+ token: option({
1071
+ type: optional(string),
1072
+ long: "token",
1073
+ description: "Admin bearer token. Defaults to PH_ACCESS_TOKEN, then a token from your `ph login` identity. Its address must be in the host's auth admins."
1074
+ }),
1075
+ yes: flag({
1076
+ type: optional(boolean),
1077
+ long: "yes",
1078
+ description: "Confirms a clean or a reclaim; both refuse to run without it."
1079
+ }),
1080
+ json: flag({
1081
+ type: optional(boolean),
1082
+ long: "json",
1083
+ description: "Print the result as JSON."
1084
+ }),
1085
+ ...debugArgs
1086
+ };
1087
+ //#endregion
1051
1088
  //#region clis/args/list.ts
1052
1089
  const listArgs = { ...debugArgs };
1053
1090
  //#endregion
@@ -1423,6 +1460,7 @@ const phCliCommandNames = [
1423
1460
  "registry-login",
1424
1461
  "inspect",
1425
1462
  "is",
1463
+ "keyframes",
1426
1464
  "mcp",
1427
1465
  "migrate",
1428
1466
  "switchboard",
@@ -1522,6 +1560,12 @@ const allPhCliHelpCommands = {
1522
1560
  description: "Serve the project's reactor-mcp tools over stdio, starting Vetra on the first tool call",
1523
1561
  handler: () => {}
1524
1562
  }),
1563
+ keyframes: helpCommand({
1564
+ name: "keyframes",
1565
+ args: keyframesArgs,
1566
+ description: "Report on and clean up the keyframes of a running switchboard",
1567
+ handler: () => {}
1568
+ }),
1525
1569
  migrate: helpCommand({
1526
1570
  name: "migrate",
1527
1571
  args: migrateArgs,
@@ -7235,6 +7279,22 @@ function emitJsonSchemaFragment(schema) {
7235
7279
  const phConnectRuntimeConfigSchema = /* @__PURE__ */ emitJsonSchemaFragment(connectConfigSchema);
7236
7280
  //#endregion
7237
7281
  //#region clis/source-config-schema.ts
7282
+ const keyframeRuleSchema = {
7283
+ type: "object",
7284
+ additionalProperties: false,
7285
+ properties: {
7286
+ interval: {
7287
+ type: "integer",
7288
+ minimum: 1,
7289
+ description: "Write a keyframe every N revisions."
7290
+ },
7291
+ keep: {
7292
+ type: ["integer", "null"],
7293
+ minimum: 1,
7294
+ description: "Keyframes kept per document stream, newest first; null keeps them all."
7295
+ }
7296
+ }
7297
+ };
7238
7298
  const SOURCE_CONFIG_SCHEMA_ID = "https://powerhouse.inc/schemas/powerhouse.source.json";
7239
7299
  const sourceConfigSchema = {
7240
7300
  $schema: "http://json-schema.org/draft-07/schema#",
@@ -7336,6 +7396,22 @@ const sourceConfigSchema = {
7336
7396
  description: "Required when `type: postgres`."
7337
7397
  }
7338
7398
  }
7399
+ },
7400
+ keyframes: {
7401
+ type: "object",
7402
+ additionalProperties: false,
7403
+ description: "How many keyframes a document stream keeps and how often one is written. Without this block: a keyframe every 10 revisions, all kept. `PH_KEYFRAMES` overrides it.",
7404
+ properties: {
7405
+ default: {
7406
+ ...keyframeRuleSchema,
7407
+ description: "The rule for every type `types` does not name."
7408
+ },
7409
+ types: {
7410
+ type: "object",
7411
+ description: "Rules by exact document type, over `default`.",
7412
+ additionalProperties: keyframeRuleSchema
7413
+ }
7414
+ }
7339
7415
  }
7340
7416
  }
7341
7417
  },
@@ -7505,6 +7581,6 @@ function assertNodeVersion(nodeVersion = process.versions.node) {
7505
7581
  if (lt(nodeVersion, "24.0.0")) throw new NodeVersionError(nodeVersion, MINIMUM_NODE_VERSION);
7506
7582
  }
7507
7583
  //#endregion
7508
- export { AGENTS, ANALYTICS_ENGINE_CORE_PACKAGE, BOILERPLATE_ALLOWED_BUILDS, BOILERPLATE_DEPENDENCY_OVERRIDES, DEFAULT_CONFIG, DEFAULT_CONNECT_OUTDIR, DEFAULT_CONNECT_PREVIEW_PORT, DEFAULT_CONNECT_STUDIO_PORT, DEFAULT_DRIVE_ICON, DEFAULT_EXPIRY_DAYS, DEFAULT_EXPIRY_SECONDS, DEFAULT_REGISTRY_LOGIN_EXPIRY, DEFAULT_REGISTRY_URL, DEFAULT_RENOWN_URL, DEFAULT_SWITCHBOARD_PORT, DEFAULT_TIMEOUT, DEFAULT_VETRA_CONNECT_PORT, DEFAULT_VETRA_DRIVE_ID, DRIVES_PRESERVE_STRATEGIES, FEATURE_DEPENDENCIES, GRAPHQL_PACKAGE, GRAPHQL_TAG_PACKAGE, HOME_DIR, KYSELY_PACKAGE, LEGACY_LINT_FORMAT_DEPENDENCIES, LEGACY_LINT_FORMAT_FILES, LOG_LEVELS, MINIMUM_NODE_VERSION, NodeVersionError, PEER_EXTERNAL_DEPENDENCIES, PH_BIN, PH_GLOBAL_DIR_NAME, PH_GLOBAL_PROJECT_NAME, PIECES_FRAMEWORK_PACKAGE, POWERHOUSE_CONFIG_FILE, POWERHOUSE_GLOBAL_DIR, PROJECT_PORT_BAND_SIZE, PROJECT_PORT_BAND_STUDIO, PROJECT_PORT_BAND_SWITCHBOARD, PROJECT_PORT_BAND_VETRA_CONNECT, REACTOR_API_PACKAGE, RELATIONAL_DB_PROCESSOR_CLASS, SECONDS_IN_DAY, SERVICE_ACTIONS, SOURCE_CONFIG_SCHEMA_ID, SpawnError, VERSIONED_DEPENDENCIES, VERSIONED_DEV_DEPENDENCIES, VERSIONED_PEER_DEPENDENCIES, accessTokenArgs, assertNodeVersion, buildArgs, buildPnpmLink, commonArgs, commonServerArgs, connectArgs, connectBasePath, connectBuildArgs, connectConfigArgs, connectPreviewArgs, connectStudioArgs, debugArgs, defaultDrivesUrl, defaultManifest, defaultStoreDirs, directoryExists, directoryExistsSync, disableLocalPackages, drivesPreserveStrategy, externalDependencies, externalDevDependencies, fetchNpmVersionFromRegistryForTag, fetchPackageVersionFromNpmRegistry, fileExists, fileExistsSync, force, generateArgs, getConfig, getGlobalPowerhouseProjectDirPath, getLocalPowerhouseProjectDirPath, getPackageManagerAtPowerhouseProjectDirPath, getPackageManagerCommand, getPackageNameFromPackageJson, getPackageVersionFromPackageJson, getPhCliVersionInfo, getPhCmdVersionInfo, getPowerhouseProjectInfo, getPowerhouseProjectInstallCommand, getPowerhouseProjectUninstallCommand, getTagFromVersion, getTelemetryStatus, handleMutuallyExclusiveOptions, https, httpsCertFile, httpsKeyFile, initArgs, initCliTelemetry, injectPnpmAllowBuilds, inspectArgs, installArgs, isDirectory, isFile, isPowerhouseProject, listArgs, localPackage, logLevel, logVersionUpdate, loginArgs, lowestVersion, makeDependenciesWithVersions, makeVersionedDependencies, makeVersionedDependenciesMap, migrateArgs, packageJsonExports, packageManagerArgs, packageScripts, packages, parsePackageManager, parsePackageVersion, parseTag, phCliCommandNames, phCliHelpCommands, publishArgs, registryLoginArgs, renownNamespace, renownSwitchboardUrl, resolveConnectPortDefault, resolvePhDir, resolveSwitchboardPortDefault, resolveTelemetryConsent, runCmd, runUseLocal, serviceArgs, setTelemetryConsent, sourceConfigSchema, spawnAsync, switchboardArgs, uninstallArgs, unpublishArgs, versionSatisfies, vetraArgs, vetraSwitchboardArgs, writeFileEnsuringDir };
7584
+ export { AGENTS, ANALYTICS_ENGINE_CORE_PACKAGE, BOILERPLATE_ALLOWED_BUILDS, BOILERPLATE_DEPENDENCY_OVERRIDES, DEFAULT_CONFIG, DEFAULT_CONNECT_OUTDIR, DEFAULT_CONNECT_PREVIEW_PORT, DEFAULT_CONNECT_STUDIO_PORT, DEFAULT_DRIVE_ICON, DEFAULT_EXPIRY_DAYS, DEFAULT_EXPIRY_SECONDS, DEFAULT_REGISTRY_LOGIN_EXPIRY, DEFAULT_REGISTRY_URL, DEFAULT_RENOWN_URL, DEFAULT_SWITCHBOARD_PORT, DEFAULT_TIMEOUT, DEFAULT_VETRA_CONNECT_PORT, DEFAULT_VETRA_DRIVE_ID, DRIVES_PRESERVE_STRATEGIES, FEATURE_DEPENDENCIES, GRAPHQL_PACKAGE, GRAPHQL_TAG_PACKAGE, HOME_DIR, KEYFRAMES_ACTIONS, KYSELY_PACKAGE, LEGACY_LINT_FORMAT_DEPENDENCIES, LEGACY_LINT_FORMAT_FILES, LOG_LEVELS, MINIMUM_NODE_VERSION, NodeVersionError, PEER_EXTERNAL_DEPENDENCIES, PH_BIN, PH_GLOBAL_DIR_NAME, PH_GLOBAL_PROJECT_NAME, PIECES_FRAMEWORK_PACKAGE, POWERHOUSE_CONFIG_FILE, POWERHOUSE_GLOBAL_DIR, PROJECT_PORT_BAND_SIZE, PROJECT_PORT_BAND_STUDIO, PROJECT_PORT_BAND_SWITCHBOARD, PROJECT_PORT_BAND_VETRA_CONNECT, REACTOR_API_PACKAGE, RELATIONAL_DB_PROCESSOR_CLASS, SECONDS_IN_DAY, SERVICE_ACTIONS, SOURCE_CONFIG_SCHEMA_ID, SpawnError, VERSIONED_DEPENDENCIES, VERSIONED_DEV_DEPENDENCIES, VERSIONED_PEER_DEPENDENCIES, accessTokenArgs, assertNodeVersion, buildArgs, buildPnpmLink, commonArgs, commonServerArgs, connectArgs, connectBasePath, connectBuildArgs, connectConfigArgs, connectPreviewArgs, connectStudioArgs, debugArgs, defaultDrivesUrl, defaultManifest, defaultStoreDirs, directoryExists, directoryExistsSync, disableLocalPackages, drivesPreserveStrategy, externalDependencies, externalDevDependencies, fetchNpmVersionFromRegistryForTag, fetchPackageVersionFromNpmRegistry, fileExists, fileExistsSync, force, generateArgs, getConfig, getGlobalPowerhouseProjectDirPath, getLocalPowerhouseProjectDirPath, getPackageManagerAtPowerhouseProjectDirPath, getPackageManagerCommand, getPackageNameFromPackageJson, getPackageVersionFromPackageJson, getPhCliVersionInfo, getPhCmdVersionInfo, getPowerhouseProjectInfo, getPowerhouseProjectInstallCommand, getPowerhouseProjectUninstallCommand, getTagFromVersion, getTelemetryStatus, handleMutuallyExclusiveOptions, https, httpsCertFile, httpsKeyFile, initArgs, initCliTelemetry, injectPnpmAllowBuilds, inspectArgs, installArgs, isDirectory, isFile, isPowerhouseProject, keyframesArgs, listArgs, localPackage, logLevel, logVersionUpdate, loginArgs, lowestVersion, makeDependenciesWithVersions, makeVersionedDependencies, makeVersionedDependenciesMap, migrateArgs, packageJsonExports, packageManagerArgs, packageScripts, packages, parsePackageManager, parsePackageVersion, parseTag, phCliCommandNames, phCliHelpCommands, publishArgs, registryLoginArgs, renownNamespace, renownSwitchboardUrl, resolveConnectPortDefault, resolvePhDir, resolveSwitchboardPortDefault, resolveTelemetryConsent, runCmd, runUseLocal, serviceArgs, setTelemetryConsent, sourceConfigSchema, spawnAsync, switchboardArgs, uninstallArgs, unpublishArgs, versionSatisfies, vetraArgs, vetraSwitchboardArgs, writeFileEnsuringDir };
7509
7585
 
7510
7586
  //# sourceMappingURL=index.mjs.map