@powerhousedao/ph-clint-cli 0.1.0-dev.2 → 0.1.0-dev.21

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/cli.js +8 -10
  2. package/dist/codegen/builders/app-index-ts.d.ts +3 -10
  3. package/dist/codegen/builders/app-index-ts.js +10 -14
  4. package/dist/codegen/builders/cli-package-json.js +47 -8
  5. package/dist/codegen/builders/cli-ts.js +18 -15
  6. package/dist/codegen/builders/config-ts.js +11 -15
  7. package/dist/codegen/builders/framework-gen-ts.d.ts +4 -5
  8. package/dist/codegen/builders/framework-gen-ts.js +22 -19
  9. package/dist/codegen/builders/framework-ts.js +21 -1
  10. package/dist/codegen/builders/index.d.ts +1 -0
  11. package/dist/codegen/builders/index.js +1 -0
  12. package/dist/codegen/builders/publish-config-ts.d.ts +6 -0
  13. package/dist/codegen/builders/publish-config-ts.js +21 -0
  14. package/dist/codegen/builders/readme-md.js +8 -7
  15. package/dist/codegen/builders/root-package-json.d.ts +3 -0
  16. package/dist/codegen/builders/root-package-json.js +24 -11
  17. package/dist/codegen/index.js +24 -11
  18. package/dist/codegen/scaffold.d.ts +8 -0
  19. package/dist/codegen/scaffold.js +51 -2
  20. package/dist/commands/clint-project-init.d.ts +11 -6
  21. package/dist/commands/clint-project-init.js +8 -7
  22. package/dist/commands/clint-project-publish.d.ts +1 -0
  23. package/dist/commands/clint-project-publish.js +5 -3
  24. package/dist/commands/clint-project-regen.js +2 -2
  25. package/dist/commands/clint-skills-sync.d.ts +10 -0
  26. package/dist/commands/clint-skills-sync.js +56 -0
  27. package/dist/config.d.ts +3 -5
  28. package/dist/config.js +5 -7
  29. package/dist/framework.d.ts +5 -160
  30. package/dist/framework.gen.d.ts +1 -32
  31. package/dist/framework.gen.js +1 -1
  32. package/dist/skills/sync.d.ts +40 -0
  33. package/dist/skills/sync.js +119 -0
  34. package/dist/spec/from-document.js +11 -7
  35. package/dist/spec/types.d.ts +55 -6
  36. package/dist/spec/types.js +61 -25
  37. package/dist/triggers/publish-trigger.d.ts +11 -0
  38. package/dist/triggers/publish-trigger.js +172 -0
  39. package/dist/triggers/spec-change.d.ts +1 -32
  40. package/dist/triggers/spec-change.js +59 -0
  41. package/package.json +6 -7
  42. package/prompts/agent-profiles/AgentBase.md +0 -13
  43. package/prompts/skills-ext/.gitkeep +0 -0
  44. package/prompts/skills-tpl/.gitkeep +0 -0
@@ -35,7 +35,7 @@ import { hashContent, hashFile, readHashes, writeHashes, } from './hashes.js';
35
35
  import { hasMarkers, spliceMarkerRegions } from './markers.js';
36
36
  import { writeFileEnsuringDir, isDirEmptyEnough } from './write.js';
37
37
  import { migrateFlatToSplit } from './migrate/flat-to-split.js';
38
- import { CLI_FILE_BUILDERS, buildReadme, buildRootPackageJson, buildAppIndexTs, } from './builders/index.js';
38
+ import { CLI_FILE_BUILDERS, buildReadme, buildRootPackageJson, buildPublishConfigTs, buildAppIndexTs, } from './builders/index.js';
39
39
  /**
40
40
  * Generate / reconcile a project at `targetDir` from the given spec.
41
41
  */
@@ -50,8 +50,8 @@ export async function generateProject(options) {
50
50
  let migrated = false;
51
51
  if (resolvedMode === 'update' &&
52
52
  existingSpec &&
53
- !existingSpec.features.powerhouse.enabled &&
54
- spec.features.powerhouse.enabled) {
53
+ existingSpec.features.powerhouse === 'Disabled' &&
54
+ spec.features.powerhouse !== 'Disabled') {
55
55
  await migrateFlatToSplit({
56
56
  targetDir,
57
57
  spec,
@@ -75,7 +75,7 @@ function resolveMode(requested, specExists) {
75
75
  }
76
76
  /** Build the list of files the new spec would emit, with their content. */
77
77
  function planFiles(spec, targetDir) {
78
- const split = spec.features.powerhouse.enabled;
78
+ const split = spec.features.powerhouse !== 'Disabled';
79
79
  const cliDir = split ? path.join(targetDir, getCliFolderName(spec)) : targetDir;
80
80
  const appDir = split ? path.join(targetDir, getAppFolderName(spec)) : null;
81
81
  const planned = [];
@@ -106,6 +106,12 @@ function planFiles(spec, targetDir) {
106
106
  absolutePath: rootPkg,
107
107
  content: buildRootPackageJson(spec),
108
108
  });
109
+ const publishConfig = path.join(targetDir, 'publish.config.ts');
110
+ planned.push({
111
+ relativePath: 'publish.config.ts',
112
+ absolutePath: publishConfig,
113
+ content: buildPublishConfigTs(spec),
114
+ });
109
115
  const appGitkeep = path.join(appDir, '.gitkeep');
110
116
  planned.push({
111
117
  relativePath: path.relative(targetDir, appGitkeep),
@@ -195,13 +201,20 @@ async function runUpdate(options, warn, migrated) {
195
201
  for (const p of planned) {
196
202
  if (p.initOnly) {
197
203
  // User-owned files (e.g. `src/framework.ts` with its `configSchema`)
198
- // are emitted only on create. In update mode we never overwrite them
199
- // and never re-create them if missing — the user may have deliberately
200
- // deleted or inlined them. Keep whatever hash the previous run stored
201
- // so the deletion pass (step 2) still considers them "ours".
202
- const stored = previous[p.relativePath];
203
- if (stored !== undefined)
204
- next[p.relativePath] = stored;
204
+ // are emitted only on create. In update mode we never overwrite them —
205
+ // but we DO create them if they don't yet exist on disk (e.g. first
206
+ // spec-change trigger run where no explicit `init` was run before).
207
+ const onDisk = await hashFile(p.absolutePath);
208
+ if (onDisk === null && p.content) {
209
+ await writeFileEnsuringDir(p.absolutePath, p.content);
210
+ next[p.relativePath] = hashContent(p.content);
211
+ files.push({ absolutePath: p.absolutePath, relativePath: p.relativePath });
212
+ }
213
+ else {
214
+ const stored = previous[p.relativePath];
215
+ if (stored !== undefined)
216
+ next[p.relativePath] = stored;
217
+ }
205
218
  continue;
206
219
  }
207
220
  const existing = await hashFile(p.absolutePath);
@@ -11,12 +11,20 @@ export interface PhInitOptions {
11
11
  binName?: string;
12
12
  /** Stdio passthrough (tests pass 'ignore'). */
13
13
  stdio?: 'inherit' | 'ignore';
14
+ /** Explicit Powerhouse version to pin `ph init` to (tag or semver). */
15
+ phVersion?: string;
14
16
  }
15
17
  export interface PhInitResult {
16
18
  ran: boolean;
17
19
  exitCode?: number;
18
20
  reason?: string;
19
21
  }
22
+ /**
23
+ * Detect the installed `ph` CLI version by parsing `ph --version` output.
24
+ * Returns the version string (e.g. '6.0.0-dev.194') or undefined if
25
+ * detection fails.
26
+ */
27
+ export declare function getPhVersion(binName: string): string | undefined;
20
28
  export declare function runPhInit(options: PhInitOptions): Promise<PhInitResult>;
21
29
  export interface PnpmInstallOptions {
22
30
  /** Directories to run `pnpm install` in, in order. */
@@ -7,7 +7,26 @@
7
7
  */
8
8
  import fs from 'node:fs/promises';
9
9
  import path from 'node:path';
10
+ import { execFileSync } from 'node:child_process';
10
11
  import { hasCommandOnPath, runCommand } from './exec.js';
12
+ /**
13
+ * Detect the installed `ph` CLI version by parsing `ph --version` output.
14
+ * Returns the version string (e.g. '6.0.0-dev.194') or undefined if
15
+ * detection fails.
16
+ */
17
+ export function getPhVersion(binName) {
18
+ try {
19
+ const output = execFileSync(binName, ['--version'], {
20
+ encoding: 'utf-8',
21
+ timeout: 5_000,
22
+ });
23
+ const match = output.match(/PH CMD version:\s*(\S+)/);
24
+ return match?.[1];
25
+ }
26
+ catch {
27
+ return undefined;
28
+ }
29
+ }
11
30
  export async function runPhInit(options) {
12
31
  const log = options.log ?? (() => { });
13
32
  const binName = options.binName ?? 'ph';
@@ -17,21 +36,51 @@ export async function runPhInit(options) {
17
36
  `Install @powerhousedao/ph-cli and re-run manually inside ${appFolder}/.`);
18
37
  return { ran: false, reason: 'ph-not-on-path' };
19
38
  }
39
+ // Pin ph init to the same version as the installed ph CLI, so the
40
+ // generated app uses matching Powerhouse packages.
41
+ const phVersion = options.phVersion ?? getPhVersion(binName);
42
+ const tags = ['dev', 'staging', 'latest'];
43
+ const versionArgs = phVersion
44
+ ? tags.includes(phVersion)
45
+ ? [`--${phVersion}`]
46
+ : ['--version', phVersion]
47
+ : ['--dev']; // fallback if detection fails
20
48
  // `ph init {name}` creates a fresh directory beside the cwd. Our generator
21
49
  // placed a `.gitkeep` + README.md placeholder there; clear it out so
22
50
  // ph init has a blank slate to work with.
23
51
  await fs.rm(options.appDir, { recursive: true, force: true });
24
- log(`Running \`${binName} init ${appFolder}\` in ${options.targetDir} …`);
52
+ log(`Running \`${binName} init ${appFolder}\` (version: ${phVersion ?? 'auto'}) in ${options.targetDir} …`);
25
53
  const result = await runCommand(binName, [
26
54
  'init',
27
55
  appFolder,
56
+ ...versionArgs,
28
57
  '--pnpm',
29
- '--dev',
30
58
  ], { cwd: options.targetDir, stdio: options.stdio ?? 'inherit' });
31
59
  if (result.exitCode !== 0) {
32
60
  log(`\`${binName} init\` exited with code ${result.exitCode}. ` +
33
61
  'You can re-run it manually after resolving the issue.');
34
62
  }
63
+ // ph init creates an unscoped package name. If the spec has a scope, patch
64
+ // the app's package.json to use the scoped name so `file:` deps and publish
65
+ // both resolve correctly. Run even on non-zero exit — ph init may have
66
+ // partially succeeded and created package.json.
67
+ if (options.spec.scope) {
68
+ const appPkgJsonPath = path.join(options.appDir, 'package.json');
69
+ try {
70
+ const raw = await fs.readFile(appPkgJsonPath, 'utf8');
71
+ const pkg = JSON.parse(raw);
72
+ const scopedName = `@${options.spec.scope}/${appFolder}`;
73
+ if (pkg.name !== scopedName) {
74
+ pkg.name = scopedName;
75
+ pkg.publishConfig = { access: 'public' };
76
+ await fs.writeFile(appPkgJsonPath, JSON.stringify(pkg, null, 2) + '\n');
77
+ log(`Patched app package name to ${scopedName}`);
78
+ }
79
+ }
80
+ catch (err) {
81
+ log(`Warning: could not patch app package name: ${err instanceof Error ? err.message : String(err)}`);
82
+ }
83
+ }
35
84
  return { ran: true, exitCode: result.exitCode };
36
85
  }
37
86
  export async function runPnpmInstall(options) {
@@ -35,11 +35,7 @@ export declare const init: import("@powerhousedao/ph-clint").Command<z.ZodObject
35
35
  version: string;
36
36
  description: string;
37
37
  features: {
38
- powerhouse: {
39
- enabled: boolean;
40
- switchboard: boolean;
41
- connect: boolean;
42
- };
38
+ powerhouse: "Disabled" | "Reactor" | "Switchboard" | "Connect";
43
39
  mastra: {
44
40
  enabled: boolean;
45
41
  };
@@ -47,7 +43,16 @@ export declare const init: import("@powerhousedao/ph-clint").Command<z.ZodObject
47
43
  enabled: boolean;
48
44
  };
49
45
  };
50
- documentTypes: string[];
46
+ packages: {
47
+ id: string;
48
+ packageName: string;
49
+ documentTypes: string[];
50
+ }[];
51
+ externalSkills: {
52
+ id: string;
53
+ name: string;
54
+ githubUrl: string;
55
+ }[];
51
56
  scope?: string | undefined;
52
57
  bin?: string | undefined;
53
58
  };
@@ -1,8 +1,8 @@
1
1
  /**
2
- * `ph-clint init` — the project bootstrap wizard.
2
+ * `ph-clint clint-project-init` — the project bootstrap wizard.
3
3
  *
4
4
  * Behavior:
5
- * 1. Resolve target dir (positional `dir`, defaults to cwd).
5
+ * 1. Resolve target dir (positional `dir`, defaults to the project name).
6
6
  * 2. Assert it is empty (or `--force`).
7
7
  * 3. Collect project identity + feature toggles (prompt for missing).
8
8
  * 4. Assemble a ClintProjectSpec and validate with Zod.
@@ -22,7 +22,7 @@ const inputSchema = z.object({
22
22
  dir: z
23
23
  .string()
24
24
  .optional()
25
- .describe('Target directory (defaults to the current directory)'),
25
+ .describe('Target directory (defaults to the project name)'),
26
26
  name: z
27
27
  .string()
28
28
  .describe('Project name — bare, or `@scope/name`. Lowercase letters, digits, hyphens.'),
@@ -75,7 +75,7 @@ export function buildSpec(input) {
75
75
  scope,
76
76
  description: input.description ?? '',
77
77
  features: {
78
- powerhouse: { enabled: input.enablePowerhouse },
78
+ powerhouse: input.enablePowerhouse ? 'Connect' : 'Disabled',
79
79
  mastra: { enabled: input.enableMastra },
80
80
  routine: { enabled: routine },
81
81
  },
@@ -91,7 +91,8 @@ export const init = defineCommand({
91
91
  promptOptional: ['description'],
92
92
  },
93
93
  execute: async (input, { workdir, stdout }) => {
94
- const targetDir = path.resolve(workdir, input.dir ?? '.');
94
+ const { name: bareName } = splitPackageName(input.name);
95
+ const targetDir = path.resolve(workdir, input.dir ?? bareName);
95
96
  if (!input.force) {
96
97
  const empty = await isDirEmptyEnough(targetDir);
97
98
  if (!empty) {
@@ -109,7 +110,7 @@ export const init = defineCommand({
109
110
  allowNonEmpty: input.force,
110
111
  });
111
112
  stdout(`Generated ${result.files.length} files in ${targetDir}\n`);
112
- const split = spec.features.powerhouse.enabled;
113
+ const split = spec.features.powerhouse !== 'Disabled';
113
114
  // Reactor package scaffolding (split layout only).
114
115
  if (split && result.appDir && !input.skipPhInit) {
115
116
  const phResult = await runPhInit({
@@ -159,7 +160,7 @@ export const init = defineCommand({
159
160
  next.push(' pnpm dev');
160
161
  }
161
162
  next.push('');
162
- next.push('Edit the project spec and run `ph-clint regen` to regenerate.');
163
+ next.push('Edit the project spec and run `ph-clint clint-project-regen` to regenerate.');
163
164
  return {
164
165
  text: next.join('\n'),
165
166
  data: { targetDir, spec, fileCount: result.files.length },
@@ -8,6 +8,7 @@ export declare const clintProjectPublish: import("@powerhousedao/ph-clint").Comm
8
8
  dir: z.ZodOptional<z.ZodString>;
9
9
  dryRun: z.ZodDefault<z.ZodBoolean>;
10
10
  skipBuild: z.ZodDefault<z.ZodBoolean>;
11
+ skipGitCheck: z.ZodDefault<z.ZodBoolean>;
11
12
  verbose: z.ZodDefault<z.ZodBoolean>;
12
13
  }, z.core.$strip>, {
13
14
  text: string;
@@ -7,6 +7,7 @@ const inputSchema = z.object({
7
7
  dir: z.string().optional().describe('Project root directory'),
8
8
  dryRun: z.boolean().default(false).describe('Preview without publishing'),
9
9
  skipBuild: z.boolean().default(false),
10
+ skipGitCheck: z.boolean().default(false).describe('Skip git working tree check'),
10
11
  verbose: z.boolean().default(false),
11
12
  });
12
13
  function formatPlanPreview(plan) {
@@ -34,11 +35,12 @@ export const clintProjectPublish = defineCommand({
34
35
  logLines.push(msg);
35
36
  stdout(msg + '\n');
36
37
  };
37
- // 1. Resolve plan
38
+ // 1. Resolve plan — discover config from the target dir, not process.cwd().
39
+ const configFile = path.join(dir, 'publish.config.ts');
38
40
  const plan = await resolvePublishPlan({
39
41
  tag: input.tag,
40
- configPath: undefined, // auto-discover from dir
41
- skipGitCheck: input.dryRun,
42
+ configPath: configFile,
43
+ skipGitCheck: input.dryRun || input.skipGitCheck,
42
44
  log,
43
45
  });
44
46
  // 2. Show preview
@@ -1,5 +1,5 @@
1
1
  /**
2
- * `ph-clint regen` — reconcile an existing project against its persisted
2
+ * `ph-clint clint-project-regen` — reconcile an existing project against its persisted
3
3
  * spec. Equivalent to running the generator in update mode.
4
4
  *
5
5
  * Run inside a project directory (or pass `--dir`). If the spec has flipped
@@ -31,7 +31,7 @@ export const regen = defineCommand({
31
31
  if (!spec) {
32
32
  return {
33
33
  text: `Error: no spec found at ${targetDir}/.ph/ph-clint-cli/project-spec.json.\n` +
34
- 'Run `ph-clint init` first to scaffold a new project.',
34
+ 'Run `ph-clint clint-project-init` first to scaffold a new project.',
35
35
  };
36
36
  }
37
37
  const warnings = [];
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ export declare const skillsSync: import("@powerhousedao/ph-clint").Command<z.ZodObject<{
3
+ dir: z.ZodOptional<z.ZodString>;
4
+ }, z.core.$strip>, {
5
+ text: string;
6
+ data?: undefined;
7
+ } | {
8
+ text: string;
9
+ data: import("../skills/sync.js").SyncResult;
10
+ }, Record<string, unknown>>;
@@ -0,0 +1,56 @@
1
+ /**
2
+ * `ph-clint clint-skills-sync` — reconcile external skills on disk to match
3
+ * the project spec. Clones missing skills from GitHub, removes skills no
4
+ * longer referenced, and updates `.skills-manifest.json`.
5
+ */
6
+ import path from 'node:path';
7
+ import { defineCommand } from '@powerhousedao/ph-clint';
8
+ import { z } from 'zod';
9
+ import { readProjectSpec } from '../spec/file.js';
10
+ import { syncExternalSkills } from '../skills/sync.js';
11
+ const inputSchema = z.object({
12
+ dir: z
13
+ .string()
14
+ .optional()
15
+ .describe('Project directory (defaults to the current directory)'),
16
+ });
17
+ export const skillsSync = defineCommand({
18
+ id: 'clint-skills-sync',
19
+ description: 'Synchronise external skills from the project spec',
20
+ inputSchema,
21
+ execute: async (input, { workdir, stdout, log }) => {
22
+ const targetDir = path.resolve(workdir, input.dir ?? '.');
23
+ const spec = await readProjectSpec(targetDir);
24
+ if (!spec) {
25
+ return {
26
+ text: `Error: no spec found at ${targetDir}/.ph/ph-clint-cli/project-spec.json.\n` +
27
+ 'Run `ph-clint clint-project-init` first to scaffold a new project.',
28
+ };
29
+ }
30
+ const result = await syncExternalSkills({
31
+ targetDir,
32
+ desired: spec.externalSkills,
33
+ log: (msg) => {
34
+ if (log)
35
+ log.info(msg);
36
+ else
37
+ stdout(msg + '\n');
38
+ },
39
+ });
40
+ const lines = [];
41
+ if (result.added.length > 0) {
42
+ lines.push(`Added: ${result.added.join(', ')}`);
43
+ }
44
+ if (result.removed.length > 0) {
45
+ lines.push(`Removed: ${result.removed.join(', ')}`);
46
+ }
47
+ if (result.added.length === 0 && result.removed.length === 0) {
48
+ lines.push('External skills are up to date.');
49
+ }
50
+ stdout(lines.join('\n') + '\n');
51
+ return {
52
+ text: lines.join('\n'),
53
+ data: result,
54
+ };
55
+ },
56
+ });
package/dist/config.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- /** CLI name — used for config resolution, env var prefixing, and .ph/ paths. */
2
- export declare const CLI_NAME = "ph-clint";
3
- export declare const CLI_VERSION = "0.0.0";
4
- /** Project root — resolved from this file's location. */
5
- export declare const PROJECT_ROOT: string;
1
+ export declare const CLI_ROOT: string;
2
+ export declare const CLI_NAME: string;
3
+ export declare const CLI_VERSION: string;
package/dist/config.js CHANGED
@@ -1,7 +1,5 @@
1
- import path from 'node:path';
2
- import { fileURLToPath } from 'node:url';
3
- /** CLI name — used for config resolution, env var prefixing, and .ph/ paths. */
4
- export const CLI_NAME = 'ph-clint';
5
- export const CLI_VERSION = '0.0.0';
6
- /** Project root — resolved from this file's location. */
7
- export const PROJECT_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
1
+ import { readPackageInfo } from '@powerhousedao/ph-clint';
2
+ const pkg = readPackageInfo(import.meta.url);
3
+ export const CLI_ROOT = pkg.root;
4
+ export const CLI_NAME = pkg.name.replace(/-cli$/, '');
5
+ export const CLI_VERSION = pkg.version;
@@ -32,38 +32,7 @@ export declare const defineCommand: <TInput extends z.ZodType, TOutput = unknown
32
32
  phVersion: string;
33
33
  projectDocumentId?: string | undefined;
34
34
  apiKey?: string | undefined;
35
- }, import("@powerhousedao/ph-clint").InferRegistry<readonly [{
36
- readonly version: 1;
37
- readonly reducer: import("document-model").Reducer<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>;
38
- readonly actions: {
39
- enableRoutine: (input: import("@powerhousedao/ph-clint-app").EnableRoutineInput) => import("@powerhousedao/ph-clint-app").EnableRoutineAction;
40
- disableRoutine: (input: import("@powerhousedao/ph-clint-app").DisableRoutineInput) => import("@powerhousedao/ph-clint-app").DisableRoutineAction;
41
- enableMastra: (input: import("@powerhousedao/ph-clint-app").EnableMastraInput) => import("@powerhousedao/ph-clint-app").EnableMastraAction;
42
- disableMastra: (input: import("@powerhousedao/ph-clint-app").DisableMastraInput) => import("@powerhousedao/ph-clint-app").DisableMastraAction;
43
- enablePowerhouse: (input: import("@powerhousedao/ph-clint-app").EnablePowerhouseInput) => import("@powerhousedao/ph-clint-app").EnablePowerhouseAction;
44
- setPowerhouseSwitchboard: (input: import("@powerhousedao/ph-clint-app").SetPowerhouseSwitchboardInput) => import("@powerhousedao/ph-clint-app").SetPowerhouseSwitchboardAction;
45
- setPowerhouseConnect: (input: import("@powerhousedao/ph-clint-app").SetPowerhouseConnectInput) => import("@powerhousedao/ph-clint-app").SetPowerhouseConnectAction;
46
- setPackageName: (input: import("@powerhousedao/ph-clint-app").SetPackageNameInput) => import("@powerhousedao/ph-clint-app").SetPackageNameAction;
47
- clearBin: (input: import("@powerhousedao/ph-clint-app").ClearBinInput) => import("@powerhousedao/ph-clint-app").ClearBinAction;
48
- setBin: (input: import("@powerhousedao/ph-clint-app").SetBinInput) => import("@powerhousedao/ph-clint-app").SetBinAction;
49
- setDescription: (input: import("@powerhousedao/ph-clint-app").SetDescriptionInput) => import("@powerhousedao/ph-clint-app").SetDescriptionAction;
50
- setVersion: (input: import("@powerhousedao/ph-clint-app").SetVersionInput) => import("@powerhousedao/ph-clint-app").SetVersionAction;
51
- clearScope: (input: import("@powerhousedao/ph-clint-app").ClearScopeInput) => import("@powerhousedao/ph-clint-app").ClearScopeAction;
52
- setScope: (input: import("@powerhousedao/ph-clint-app").SetScopeInput) => import("@powerhousedao/ph-clint-app").SetScopeAction;
53
- setName: (name: string | {
54
- name: string;
55
- }) => import("document-model").SetNameAction;
56
- undo: (count?: number, scope?: string) => import("document-model").UndoAction;
57
- redo: (count?: number, scope?: string) => import("document-model").RedoAction;
58
- prune: (start?: number, end?: number, scope?: string) => import("document-model").SchemaPruneAction;
59
- loadState: <TState extends import("document-model").PHBaseState = import("document-model").PHBaseState>(state: TState & {
60
- name: string;
61
- }, operations: number) => import("document-model").LoadStateAction;
62
- noop: (scope?: string) => import("document-model").NOOPAction;
63
- };
64
- readonly utils: import("document-model").DocumentModelUtils<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>;
65
- readonly documentModel: import("document-model").DocumentModelPHState;
66
- }]>>) => Promise<TOutput>;
35
+ }, import("@powerhousedao/ph-clint").InferRegistry<readonly [import("document-model").DocumentModelModule<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>]>>) => Promise<TOutput>;
67
36
  }) => import("@powerhousedao/ph-clint").Command<TInput, TOutput, {
68
37
  model: string;
69
38
  devServicePort: number;
@@ -76,75 +45,13 @@ export declare const defineCommand: <TInput extends z.ZodType, TOutput = unknown
76
45
  phVersion: string;
77
46
  projectDocumentId?: string | undefined;
78
47
  apiKey?: string | undefined;
79
- }, import("@powerhousedao/ph-clint").InferRegistry<readonly [{
80
- readonly version: 1;
81
- readonly reducer: import("document-model").Reducer<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>;
82
- readonly actions: {
83
- enableRoutine: (input: import("@powerhousedao/ph-clint-app").EnableRoutineInput) => import("@powerhousedao/ph-clint-app").EnableRoutineAction;
84
- disableRoutine: (input: import("@powerhousedao/ph-clint-app").DisableRoutineInput) => import("@powerhousedao/ph-clint-app").DisableRoutineAction;
85
- enableMastra: (input: import("@powerhousedao/ph-clint-app").EnableMastraInput) => import("@powerhousedao/ph-clint-app").EnableMastraAction;
86
- disableMastra: (input: import("@powerhousedao/ph-clint-app").DisableMastraInput) => import("@powerhousedao/ph-clint-app").DisableMastraAction;
87
- enablePowerhouse: (input: import("@powerhousedao/ph-clint-app").EnablePowerhouseInput) => import("@powerhousedao/ph-clint-app").EnablePowerhouseAction;
88
- setPowerhouseSwitchboard: (input: import("@powerhousedao/ph-clint-app").SetPowerhouseSwitchboardInput) => import("@powerhousedao/ph-clint-app").SetPowerhouseSwitchboardAction;
89
- setPowerhouseConnect: (input: import("@powerhousedao/ph-clint-app").SetPowerhouseConnectInput) => import("@powerhousedao/ph-clint-app").SetPowerhouseConnectAction;
90
- setPackageName: (input: import("@powerhousedao/ph-clint-app").SetPackageNameInput) => import("@powerhousedao/ph-clint-app").SetPackageNameAction;
91
- clearBin: (input: import("@powerhousedao/ph-clint-app").ClearBinInput) => import("@powerhousedao/ph-clint-app").ClearBinAction;
92
- setBin: (input: import("@powerhousedao/ph-clint-app").SetBinInput) => import("@powerhousedao/ph-clint-app").SetBinAction;
93
- setDescription: (input: import("@powerhousedao/ph-clint-app").SetDescriptionInput) => import("@powerhousedao/ph-clint-app").SetDescriptionAction;
94
- setVersion: (input: import("@powerhousedao/ph-clint-app").SetVersionInput) => import("@powerhousedao/ph-clint-app").SetVersionAction;
95
- clearScope: (input: import("@powerhousedao/ph-clint-app").ClearScopeInput) => import("@powerhousedao/ph-clint-app").ClearScopeAction;
96
- setScope: (input: import("@powerhousedao/ph-clint-app").SetScopeInput) => import("@powerhousedao/ph-clint-app").SetScopeAction;
97
- setName: (name: string | {
98
- name: string;
99
- }) => import("document-model").SetNameAction;
100
- undo: (count?: number, scope?: string) => import("document-model").UndoAction;
101
- redo: (count?: number, scope?: string) => import("document-model").RedoAction;
102
- prune: (start?: number, end?: number, scope?: string) => import("document-model").SchemaPruneAction;
103
- loadState: <TState_1 extends import("document-model").PHBaseState = import("document-model").PHBaseState>(state: TState_1 & {
104
- name: string;
105
- }, operations: number) => import("document-model").LoadStateAction;
106
- noop: (scope?: string) => import("document-model").NOOPAction;
107
- };
108
- readonly utils: import("document-model").DocumentModelUtils<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>;
109
- readonly documentModel: import("document-model").DocumentModelPHState;
110
- }]>>) => import("@powerhousedao/ph-clint").Trigger<TState, {
48
+ }, import("@powerhousedao/ph-clint").InferRegistry<readonly [import("document-model").DocumentModelModule<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>]>>) => import("@powerhousedao/ph-clint").Trigger<TState, {
111
49
  model: string;
112
50
  devServicePort: number;
113
51
  phVersion: string;
114
52
  projectDocumentId?: string | undefined;
115
53
  apiKey?: string | undefined;
116
- }, import("@powerhousedao/ph-clint").InferRegistry<readonly [{
117
- readonly version: 1;
118
- readonly reducer: import("document-model").Reducer<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>;
119
- readonly actions: {
120
- enableRoutine: (input: import("@powerhousedao/ph-clint-app").EnableRoutineInput) => import("@powerhousedao/ph-clint-app").EnableRoutineAction;
121
- disableRoutine: (input: import("@powerhousedao/ph-clint-app").DisableRoutineInput) => import("@powerhousedao/ph-clint-app").DisableRoutineAction;
122
- enableMastra: (input: import("@powerhousedao/ph-clint-app").EnableMastraInput) => import("@powerhousedao/ph-clint-app").EnableMastraAction;
123
- disableMastra: (input: import("@powerhousedao/ph-clint-app").DisableMastraInput) => import("@powerhousedao/ph-clint-app").DisableMastraAction;
124
- enablePowerhouse: (input: import("@powerhousedao/ph-clint-app").EnablePowerhouseInput) => import("@powerhousedao/ph-clint-app").EnablePowerhouseAction;
125
- setPowerhouseSwitchboard: (input: import("@powerhousedao/ph-clint-app").SetPowerhouseSwitchboardInput) => import("@powerhousedao/ph-clint-app").SetPowerhouseSwitchboardAction;
126
- setPowerhouseConnect: (input: import("@powerhousedao/ph-clint-app").SetPowerhouseConnectInput) => import("@powerhousedao/ph-clint-app").SetPowerhouseConnectAction;
127
- setPackageName: (input: import("@powerhousedao/ph-clint-app").SetPackageNameInput) => import("@powerhousedao/ph-clint-app").SetPackageNameAction;
128
- clearBin: (input: import("@powerhousedao/ph-clint-app").ClearBinInput) => import("@powerhousedao/ph-clint-app").ClearBinAction;
129
- setBin: (input: import("@powerhousedao/ph-clint-app").SetBinInput) => import("@powerhousedao/ph-clint-app").SetBinAction;
130
- setDescription: (input: import("@powerhousedao/ph-clint-app").SetDescriptionInput) => import("@powerhousedao/ph-clint-app").SetDescriptionAction;
131
- setVersion: (input: import("@powerhousedao/ph-clint-app").SetVersionInput) => import("@powerhousedao/ph-clint-app").SetVersionAction;
132
- clearScope: (input: import("@powerhousedao/ph-clint-app").ClearScopeInput) => import("@powerhousedao/ph-clint-app").ClearScopeAction;
133
- setScope: (input: import("@powerhousedao/ph-clint-app").SetScopeInput) => import("@powerhousedao/ph-clint-app").SetScopeAction;
134
- setName: (name: string | {
135
- name: string;
136
- }) => import("document-model").SetNameAction;
137
- undo: (count?: number, scope?: string) => import("document-model").UndoAction;
138
- redo: (count?: number, scope?: string) => import("document-model").RedoAction;
139
- prune: (start?: number, end?: number, scope?: string) => import("document-model").SchemaPruneAction;
140
- loadState: <TState_1 extends import("document-model").PHBaseState = import("document-model").PHBaseState>(state: TState_1 & {
141
- name: string;
142
- }, operations: number) => import("document-model").LoadStateAction;
143
- noop: (scope?: string) => import("document-model").NOOPAction;
144
- };
145
- readonly utils: import("document-model").DocumentModelUtils<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>;
146
- readonly documentModel: import("document-model").DocumentModelPHState;
147
- }]>>, defineService: (options: import("@powerhousedao/ph-clint").ServiceDefinition<{
54
+ }, import("@powerhousedao/ph-clint").InferRegistry<readonly [import("document-model").DocumentModelModule<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>]>>, defineService: (options: import("@powerhousedao/ph-clint").ServiceDefinition<{
148
55
  model: string;
149
56
  devServicePort: number;
150
57
  phVersion: string;
@@ -160,38 +67,7 @@ export declare const defineCommand: <TInput extends z.ZodType, TOutput = unknown
160
67
  pending: number;
161
68
  } = {
162
69
  pending: number;
163
- }>(options: import("@powerhousedao/ph-clint").DocumentChangeTriggerOptions<import("@powerhousedao/ph-clint").InferRegistry<readonly [{
164
- readonly version: 1;
165
- readonly reducer: import("document-model").Reducer<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>;
166
- readonly actions: {
167
- enableRoutine: (input: import("@powerhousedao/ph-clint-app").EnableRoutineInput) => import("@powerhousedao/ph-clint-app").EnableRoutineAction;
168
- disableRoutine: (input: import("@powerhousedao/ph-clint-app").DisableRoutineInput) => import("@powerhousedao/ph-clint-app").DisableRoutineAction;
169
- enableMastra: (input: import("@powerhousedao/ph-clint-app").EnableMastraInput) => import("@powerhousedao/ph-clint-app").EnableMastraAction;
170
- disableMastra: (input: import("@powerhousedao/ph-clint-app").DisableMastraInput) => import("@powerhousedao/ph-clint-app").DisableMastraAction;
171
- enablePowerhouse: (input: import("@powerhousedao/ph-clint-app").EnablePowerhouseInput) => import("@powerhousedao/ph-clint-app").EnablePowerhouseAction;
172
- setPowerhouseSwitchboard: (input: import("@powerhousedao/ph-clint-app").SetPowerhouseSwitchboardInput) => import("@powerhousedao/ph-clint-app").SetPowerhouseSwitchboardAction;
173
- setPowerhouseConnect: (input: import("@powerhousedao/ph-clint-app").SetPowerhouseConnectInput) => import("@powerhousedao/ph-clint-app").SetPowerhouseConnectAction;
174
- setPackageName: (input: import("@powerhousedao/ph-clint-app").SetPackageNameInput) => import("@powerhousedao/ph-clint-app").SetPackageNameAction;
175
- clearBin: (input: import("@powerhousedao/ph-clint-app").ClearBinInput) => import("@powerhousedao/ph-clint-app").ClearBinAction;
176
- setBin: (input: import("@powerhousedao/ph-clint-app").SetBinInput) => import("@powerhousedao/ph-clint-app").SetBinAction;
177
- setDescription: (input: import("@powerhousedao/ph-clint-app").SetDescriptionInput) => import("@powerhousedao/ph-clint-app").SetDescriptionAction;
178
- setVersion: (input: import("@powerhousedao/ph-clint-app").SetVersionInput) => import("@powerhousedao/ph-clint-app").SetVersionAction;
179
- clearScope: (input: import("@powerhousedao/ph-clint-app").ClearScopeInput) => import("@powerhousedao/ph-clint-app").ClearScopeAction;
180
- setScope: (input: import("@powerhousedao/ph-clint-app").SetScopeInput) => import("@powerhousedao/ph-clint-app").SetScopeAction;
181
- setName: (name: string | {
182
- name: string;
183
- }) => import("document-model").SetNameAction;
184
- undo: (count?: number, scope?: string) => import("document-model").UndoAction;
185
- redo: (count?: number, scope?: string) => import("document-model").RedoAction;
186
- prune: (start?: number, end?: number, scope?: string) => import("document-model").SchemaPruneAction;
187
- loadState: <TState_1 extends import("document-model").PHBaseState = import("document-model").PHBaseState>(state: TState_1 & {
188
- name: string;
189
- }, operations: number) => import("document-model").LoadStateAction;
190
- noop: (scope?: string) => import("document-model").NOOPAction;
191
- };
192
- readonly utils: import("document-model").DocumentModelUtils<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>;
193
- readonly documentModel: import("document-model").DocumentModelPHState;
194
- }]>, T, {
70
+ }>(options: import("@powerhousedao/ph-clint").DocumentChangeTriggerOptions<import("@powerhousedao/ph-clint").InferRegistry<readonly [import("document-model").DocumentModelModule<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>]>, T, {
195
71
  model: string;
196
72
  devServicePort: number;
197
73
  phVersion: string;
@@ -203,37 +79,6 @@ export declare const defineCommand: <TInput extends z.ZodType, TOutput = unknown
203
79
  phVersion: string;
204
80
  projectDocumentId?: string | undefined;
205
81
  apiKey?: string | undefined;
206
- }, import("@powerhousedao/ph-clint").InferRegistry<readonly [{
207
- readonly version: 1;
208
- readonly reducer: import("document-model").Reducer<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>;
209
- readonly actions: {
210
- enableRoutine: (input: import("@powerhousedao/ph-clint-app").EnableRoutineInput) => import("@powerhousedao/ph-clint-app").EnableRoutineAction;
211
- disableRoutine: (input: import("@powerhousedao/ph-clint-app").DisableRoutineInput) => import("@powerhousedao/ph-clint-app").DisableRoutineAction;
212
- enableMastra: (input: import("@powerhousedao/ph-clint-app").EnableMastraInput) => import("@powerhousedao/ph-clint-app").EnableMastraAction;
213
- disableMastra: (input: import("@powerhousedao/ph-clint-app").DisableMastraInput) => import("@powerhousedao/ph-clint-app").DisableMastraAction;
214
- enablePowerhouse: (input: import("@powerhousedao/ph-clint-app").EnablePowerhouseInput) => import("@powerhousedao/ph-clint-app").EnablePowerhouseAction;
215
- setPowerhouseSwitchboard: (input: import("@powerhousedao/ph-clint-app").SetPowerhouseSwitchboardInput) => import("@powerhousedao/ph-clint-app").SetPowerhouseSwitchboardAction;
216
- setPowerhouseConnect: (input: import("@powerhousedao/ph-clint-app").SetPowerhouseConnectInput) => import("@powerhousedao/ph-clint-app").SetPowerhouseConnectAction;
217
- setPackageName: (input: import("@powerhousedao/ph-clint-app").SetPackageNameInput) => import("@powerhousedao/ph-clint-app").SetPackageNameAction;
218
- clearBin: (input: import("@powerhousedao/ph-clint-app").ClearBinInput) => import("@powerhousedao/ph-clint-app").ClearBinAction;
219
- setBin: (input: import("@powerhousedao/ph-clint-app").SetBinInput) => import("@powerhousedao/ph-clint-app").SetBinAction;
220
- setDescription: (input: import("@powerhousedao/ph-clint-app").SetDescriptionInput) => import("@powerhousedao/ph-clint-app").SetDescriptionAction;
221
- setVersion: (input: import("@powerhousedao/ph-clint-app").SetVersionInput) => import("@powerhousedao/ph-clint-app").SetVersionAction;
222
- clearScope: (input: import("@powerhousedao/ph-clint-app").ClearScopeInput) => import("@powerhousedao/ph-clint-app").ClearScopeAction;
223
- setScope: (input: import("@powerhousedao/ph-clint-app").SetScopeInput) => import("@powerhousedao/ph-clint-app").SetScopeAction;
224
- setName: (name: string | {
225
- name: string;
226
- }) => import("document-model").SetNameAction;
227
- undo: (count?: number, scope?: string) => import("document-model").UndoAction;
228
- redo: (count?: number, scope?: string) => import("document-model").RedoAction;
229
- prune: (start?: number, end?: number, scope?: string) => import("document-model").SchemaPruneAction;
230
- loadState: <TState_1 extends import("document-model").PHBaseState = import("document-model").PHBaseState>(state: TState_1 & {
231
- name: string;
232
- }, operations: number) => import("document-model").LoadStateAction;
233
- noop: (scope?: string) => import("document-model").NOOPAction;
234
- };
235
- readonly utils: import("document-model").DocumentModelUtils<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>;
236
- readonly documentModel: import("document-model").DocumentModelPHState;
237
- }]>>;
82
+ }, import("@powerhousedao/ph-clint").InferRegistry<readonly [import("document-model").DocumentModelModule<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>]>>;
238
83
  export { registry } from './framework.gen.js';
239
84
  export type { Registry } from './framework.gen.js';