@powerhousedao/ph-clint-cli 0.1.0-dev.0
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/README.md +84 -0
- package/dist/agents/clint-agent.d.ts +12 -0
- package/dist/agents/clint-agent.js +42 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +79 -0
- package/dist/codegen/builders/agent-base-md.d.ts +5 -0
- package/dist/codegen/builders/agent-base-md.js +18 -0
- package/dist/codegen/builders/agent-ts.d.ts +9 -0
- package/dist/codegen/builders/agent-ts.js +34 -0
- package/dist/codegen/builders/app-index-ts.d.ts +18 -0
- package/dist/codegen/builders/app-index-ts.js +33 -0
- package/dist/codegen/builders/build-skills-ts.d.ts +4 -0
- package/dist/codegen/builders/build-skills-ts.js +37 -0
- package/dist/codegen/builders/cli-package-json.d.ts +8 -0
- package/dist/codegen/builders/cli-package-json.js +69 -0
- package/dist/codegen/builders/cli-ts.d.ts +7 -0
- package/dist/codegen/builders/cli-ts.js +110 -0
- package/dist/codegen/builders/config-ts.d.ts +8 -0
- package/dist/codegen/builders/config-ts.js +21 -0
- package/dist/codegen/builders/eslint-config-js.d.ts +4 -0
- package/dist/codegen/builders/eslint-config-js.js +13 -0
- package/dist/codegen/builders/framework-gen-ts.d.ts +20 -0
- package/dist/codegen/builders/framework-gen-ts.js +62 -0
- package/dist/codegen/builders/framework-ts.d.ts +21 -0
- package/dist/codegen/builders/framework-ts.js +74 -0
- package/dist/codegen/builders/gitignore.d.ts +4 -0
- package/dist/codegen/builders/gitignore.js +18 -0
- package/dist/codegen/builders/index.d.ts +43 -0
- package/dist/codegen/builders/index.js +60 -0
- package/dist/codegen/builders/jest-config-js.d.ts +4 -0
- package/dist/codegen/builders/jest-config-js.js +19 -0
- package/dist/codegen/builders/main-ts.d.ts +5 -0
- package/dist/codegen/builders/main-ts.js +13 -0
- package/dist/codegen/builders/mastra-index-ts.d.ts +8 -0
- package/dist/codegen/builders/mastra-index-ts.js +30 -0
- package/dist/codegen/builders/readme-md.d.ts +5 -0
- package/dist/codegen/builders/readme-md.js +44 -0
- package/dist/codegen/builders/root-package-json.d.ts +7 -0
- package/dist/codegen/builders/root-package-json.js +27 -0
- package/dist/codegen/builders/tsconfig-json.d.ts +4 -0
- package/dist/codegen/builders/tsconfig-json.js +22 -0
- package/dist/codegen/exec.d.ts +20 -0
- package/dist/codegen/exec.js +41 -0
- package/dist/codegen/hashes.d.ts +6 -0
- package/dist/codegen/hashes.js +60 -0
- package/dist/codegen/index.d.ts +39 -0
- package/dist/codegen/index.js +292 -0
- package/dist/codegen/markers.d.ts +36 -0
- package/dist/codegen/markers.js +86 -0
- package/dist/codegen/migrate/flat-to-split.d.ts +15 -0
- package/dist/codegen/migrate/flat-to-split.js +119 -0
- package/dist/codegen/scaffold.d.ts +34 -0
- package/dist/codegen/scaffold.js +60 -0
- package/dist/codegen/write.d.ts +6 -0
- package/dist/codegen/write.js +32 -0
- package/dist/commands/init.d.ts +57 -0
- package/dist/commands/init.js +168 -0
- package/dist/commands/regen.d.ts +18 -0
- package/dist/commands/regen.js +68 -0
- package/dist/config.d.ts +5 -0
- package/dist/config.js +7 -0
- package/dist/framework.d.ts +239 -0
- package/dist/framework.gen.d.ts +37 -0
- package/dist/framework.gen.js +16 -0
- package/dist/framework.js +41 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +3 -0
- package/dist/mastra/index.d.ts +10 -0
- package/dist/mastra/index.js +11 -0
- package/dist/spec/file.d.ts +4 -0
- package/dist/spec/file.js +34 -0
- package/dist/spec/from-document.d.ts +18 -0
- package/dist/spec/from-document.js +30 -0
- package/dist/spec/types.d.ts +62 -0
- package/dist/spec/types.js +112 -0
- package/dist/triggers/spec-change.d.ts +43 -0
- package/dist/triggers/spec-change.js +171 -0
- package/package.json +60 -0
- package/prompts/agent-profiles/AgentBase.md +13 -0
- package/prompts/skills-ext/.gitkeep +0 -0
- package/prompts/skills-tpl/.gitkeep +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function writeFileEnsuringDir(filePath: string, content: string): Promise<void>;
|
|
2
|
+
/**
|
|
3
|
+
* Returns true if the directory doesn't exist or only contains ignorable
|
|
4
|
+
* entries (`.git`, `.DS_Store`, `.ph/ph-clint-cli/project-spec.json`).
|
|
5
|
+
*/
|
|
6
|
+
export declare function isDirEmptyEnough(dir: string): Promise<boolean>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Low-level file-writing helpers for the code generator.
|
|
3
|
+
*/
|
|
4
|
+
import fs from 'node:fs/promises';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
export async function writeFileEnsuringDir(filePath, content) {
|
|
7
|
+
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
8
|
+
await fs.writeFile(filePath, content, 'utf8');
|
|
9
|
+
}
|
|
10
|
+
function isEnoent(err) {
|
|
11
|
+
return (!!err &&
|
|
12
|
+
typeof err === 'object' &&
|
|
13
|
+
'code' in err &&
|
|
14
|
+
err.code === 'ENOENT');
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns true if the directory doesn't exist or only contains ignorable
|
|
18
|
+
* entries (`.git`, `.DS_Store`, `.ph/ph-clint-cli/project-spec.json`).
|
|
19
|
+
*/
|
|
20
|
+
export async function isDirEmptyEnough(dir) {
|
|
21
|
+
let entries;
|
|
22
|
+
try {
|
|
23
|
+
entries = await fs.readdir(dir);
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
if (isEnoent(err))
|
|
27
|
+
return true;
|
|
28
|
+
throw err;
|
|
29
|
+
}
|
|
30
|
+
const ignorable = new Set(['.git', '.DS_Store', '.ph']);
|
|
31
|
+
return entries.every((entry) => ignorable.has(entry));
|
|
32
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type ClintProjectSpec } from '../spec/types.js';
|
|
3
|
+
declare const inputSchema: z.ZodObject<{
|
|
4
|
+
dir: z.ZodOptional<z.ZodString>;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
description: z.ZodOptional<z.ZodString>;
|
|
7
|
+
enablePowerhouse: z.ZodDefault<z.ZodBoolean>;
|
|
8
|
+
enableMastra: z.ZodDefault<z.ZodBoolean>;
|
|
9
|
+
enableRoutine: z.ZodDefault<z.ZodBoolean>;
|
|
10
|
+
force: z.ZodDefault<z.ZodBoolean>;
|
|
11
|
+
skipPhInit: z.ZodDefault<z.ZodBoolean>;
|
|
12
|
+
skipInstall: z.ZodDefault<z.ZodBoolean>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
type InitInput = z.output<typeof inputSchema>;
|
|
15
|
+
export declare function buildSpec(input: InitInput): ClintProjectSpec;
|
|
16
|
+
export declare const init: import("@powerhousedao/ph-clint").Command<z.ZodObject<{
|
|
17
|
+
dir: z.ZodOptional<z.ZodString>;
|
|
18
|
+
name: z.ZodString;
|
|
19
|
+
description: z.ZodOptional<z.ZodString>;
|
|
20
|
+
enablePowerhouse: z.ZodDefault<z.ZodBoolean>;
|
|
21
|
+
enableMastra: z.ZodDefault<z.ZodBoolean>;
|
|
22
|
+
enableRoutine: z.ZodDefault<z.ZodBoolean>;
|
|
23
|
+
force: z.ZodDefault<z.ZodBoolean>;
|
|
24
|
+
skipPhInit: z.ZodDefault<z.ZodBoolean>;
|
|
25
|
+
skipInstall: z.ZodDefault<z.ZodBoolean>;
|
|
26
|
+
}, z.core.$strip>, {
|
|
27
|
+
text: string;
|
|
28
|
+
data?: undefined;
|
|
29
|
+
} | {
|
|
30
|
+
text: string;
|
|
31
|
+
data: {
|
|
32
|
+
targetDir: string;
|
|
33
|
+
spec: {
|
|
34
|
+
name: string;
|
|
35
|
+
version: string;
|
|
36
|
+
description: string;
|
|
37
|
+
features: {
|
|
38
|
+
powerhouse: {
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
switchboard: boolean;
|
|
41
|
+
connect: boolean;
|
|
42
|
+
};
|
|
43
|
+
mastra: {
|
|
44
|
+
enabled: boolean;
|
|
45
|
+
};
|
|
46
|
+
routine: {
|
|
47
|
+
enabled: boolean;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
documentTypes: string[];
|
|
51
|
+
scope?: string | undefined;
|
|
52
|
+
bin?: string | undefined;
|
|
53
|
+
};
|
|
54
|
+
fileCount: number;
|
|
55
|
+
};
|
|
56
|
+
}, Record<string, unknown>>;
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ph-clint init` — the project bootstrap wizard.
|
|
3
|
+
*
|
|
4
|
+
* Behavior:
|
|
5
|
+
* 1. Resolve target dir (positional `dir`, defaults to cwd).
|
|
6
|
+
* 2. Assert it is empty (or `--force`).
|
|
7
|
+
* 3. Collect project identity + feature toggles (prompt for missing).
|
|
8
|
+
* 4. Assemble a ClintProjectSpec and validate with Zod.
|
|
9
|
+
* 5. Write the spec + emit the generated tree via `generateProject`.
|
|
10
|
+
* 6. (Split layout) run `ph init` in `{name}-app/` unless `--skip-ph-init`.
|
|
11
|
+
* 7. Run `pnpm install` in generated sub-projects unless `--skip-install`.
|
|
12
|
+
* 8. Print next-steps guidance.
|
|
13
|
+
*/
|
|
14
|
+
import path from 'node:path';
|
|
15
|
+
import { defineCommand } from '@powerhousedao/ph-clint';
|
|
16
|
+
import { z } from 'zod';
|
|
17
|
+
import { clintProjectSpecSchema, } from '../spec/types.js';
|
|
18
|
+
import { generateProject } from '../codegen/index.js';
|
|
19
|
+
import { isDirEmptyEnough } from '../codegen/write.js';
|
|
20
|
+
import { runPhInit, runPnpmInstall } from '../codegen/scaffold.js';
|
|
21
|
+
const inputSchema = z.object({
|
|
22
|
+
dir: z
|
|
23
|
+
.string()
|
|
24
|
+
.optional()
|
|
25
|
+
.describe('Target directory (defaults to the current directory)'),
|
|
26
|
+
name: z
|
|
27
|
+
.string()
|
|
28
|
+
.describe('Project name — bare, or `@scope/name`. Lowercase letters, digits, hyphens.'),
|
|
29
|
+
description: z.string().optional().describe('Short project description'),
|
|
30
|
+
enablePowerhouse: z
|
|
31
|
+
.boolean()
|
|
32
|
+
.default(false)
|
|
33
|
+
.describe('Enable Powerhouse reactor (requires split layout)'),
|
|
34
|
+
enableMastra: z
|
|
35
|
+
.boolean()
|
|
36
|
+
.default(false)
|
|
37
|
+
.describe('Enable Mastra AI agent stack'),
|
|
38
|
+
enableRoutine: z
|
|
39
|
+
.boolean()
|
|
40
|
+
.default(false)
|
|
41
|
+
.describe('Enable the tick-based routine loop'),
|
|
42
|
+
force: z
|
|
43
|
+
.boolean()
|
|
44
|
+
.default(false)
|
|
45
|
+
.describe('Overwrite files if the target directory is not empty'),
|
|
46
|
+
skipPhInit: z
|
|
47
|
+
.boolean()
|
|
48
|
+
.default(false)
|
|
49
|
+
.describe('Do not run `ph init` in the app folder after scaffolding'),
|
|
50
|
+
skipInstall: z
|
|
51
|
+
.boolean()
|
|
52
|
+
.default(false)
|
|
53
|
+
.describe('Do not run `pnpm install` after scaffolding'),
|
|
54
|
+
});
|
|
55
|
+
/** Parse `@scope/name` into { scope, name }. */
|
|
56
|
+
function splitPackageName(raw) {
|
|
57
|
+
const match = /^@([a-z0-9][a-z0-9-]*)\/([a-z0-9][a-z0-9-]*)$/.exec(raw);
|
|
58
|
+
if (match)
|
|
59
|
+
return { scope: match[1], name: match[2] };
|
|
60
|
+
if (raw.startsWith('@')) {
|
|
61
|
+
throw new Error(`invalid package name "${raw}" — expected "@scope/name" with lowercase letters, digits, hyphens`);
|
|
62
|
+
}
|
|
63
|
+
if (!/^[a-z0-9][a-z0-9-]*$/.test(raw)) {
|
|
64
|
+
throw new Error(`invalid project name "${raw}" — expected lowercase letters, digits, hyphens`);
|
|
65
|
+
}
|
|
66
|
+
return { name: raw };
|
|
67
|
+
}
|
|
68
|
+
export function buildSpec(input) {
|
|
69
|
+
const { scope, name } = splitPackageName(input.name);
|
|
70
|
+
// Routine is forced on when Mastra is on — the REPL-only path works, but
|
|
71
|
+
// the agent routine loop is what most users actually want.
|
|
72
|
+
const routine = input.enableRoutine || input.enableMastra;
|
|
73
|
+
const candidate = {
|
|
74
|
+
name,
|
|
75
|
+
scope,
|
|
76
|
+
description: input.description ?? '',
|
|
77
|
+
features: {
|
|
78
|
+
powerhouse: { enabled: input.enablePowerhouse },
|
|
79
|
+
mastra: { enabled: input.enableMastra },
|
|
80
|
+
routine: { enabled: routine },
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
return clintProjectSpecSchema.parse(candidate);
|
|
84
|
+
}
|
|
85
|
+
export const init = defineCommand({
|
|
86
|
+
id: 'init',
|
|
87
|
+
description: 'Initialize a new ph-clint project in the target directory',
|
|
88
|
+
inputSchema,
|
|
89
|
+
prompt: {
|
|
90
|
+
promptForDefaults: true,
|
|
91
|
+
promptOptional: ['description'],
|
|
92
|
+
},
|
|
93
|
+
execute: async (input, { workdir, stdout }) => {
|
|
94
|
+
const targetDir = path.resolve(workdir, input.dir ?? '.');
|
|
95
|
+
if (!input.force) {
|
|
96
|
+
const empty = await isDirEmptyEnough(targetDir);
|
|
97
|
+
if (!empty) {
|
|
98
|
+
return {
|
|
99
|
+
text: `Error: ${targetDir} is not empty. Re-run with --force to initialize anyway,\n` +
|
|
100
|
+
'or choose a different --dir.',
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
const spec = buildSpec(input);
|
|
105
|
+
const result = await generateProject({
|
|
106
|
+
targetDir,
|
|
107
|
+
spec,
|
|
108
|
+
mode: 'create',
|
|
109
|
+
allowNonEmpty: input.force,
|
|
110
|
+
});
|
|
111
|
+
stdout(`Generated ${result.files.length} files in ${targetDir}\n`);
|
|
112
|
+
const split = spec.features.powerhouse.enabled;
|
|
113
|
+
// Reactor package scaffolding (split layout only).
|
|
114
|
+
if (split && result.appDir && !input.skipPhInit) {
|
|
115
|
+
const phResult = await runPhInit({
|
|
116
|
+
targetDir,
|
|
117
|
+
appDir: result.appDir,
|
|
118
|
+
spec,
|
|
119
|
+
log: (msg) => stdout(msg + '\n'),
|
|
120
|
+
});
|
|
121
|
+
if (!phResult.ran) {
|
|
122
|
+
stdout(`Note: \`ph init\` did not run — ${phResult.reason ?? 'see above'}.\n`);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// Dependency installation.
|
|
126
|
+
if (!input.skipInstall) {
|
|
127
|
+
const dirs = [];
|
|
128
|
+
if (split) {
|
|
129
|
+
if (result.appDir)
|
|
130
|
+
dirs.push(result.appDir);
|
|
131
|
+
dirs.push(result.cliDir);
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
dirs.push(targetDir);
|
|
135
|
+
}
|
|
136
|
+
await runPnpmInstall({
|
|
137
|
+
dirs,
|
|
138
|
+
log: (msg) => stdout(msg + '\n'),
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
const next = [];
|
|
142
|
+
next.push('');
|
|
143
|
+
next.push('Next steps:');
|
|
144
|
+
const relDir = path.relative(workdir, targetDir) || '.';
|
|
145
|
+
if (split) {
|
|
146
|
+
next.push(` cd ${relDir}`);
|
|
147
|
+
if (input.skipPhInit) {
|
|
148
|
+
next.push(` cd ${spec.name}-app && ph init . && cd ..`);
|
|
149
|
+
}
|
|
150
|
+
if (input.skipInstall) {
|
|
151
|
+
next.push(' pnpm install');
|
|
152
|
+
}
|
|
153
|
+
next.push(' pnpm dev');
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
next.push(` cd ${relDir}`);
|
|
157
|
+
if (input.skipInstall)
|
|
158
|
+
next.push(' pnpm install');
|
|
159
|
+
next.push(' pnpm dev');
|
|
160
|
+
}
|
|
161
|
+
next.push('');
|
|
162
|
+
next.push('Edit the project spec and run `ph-clint regen` to regenerate.');
|
|
163
|
+
return {
|
|
164
|
+
text: next.join('\n'),
|
|
165
|
+
data: { targetDir, spec, fileCount: result.files.length },
|
|
166
|
+
};
|
|
167
|
+
},
|
|
168
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const regen: import("@powerhousedao/ph-clint").Command<z.ZodObject<{
|
|
3
|
+
dir: z.ZodOptional<z.ZodString>;
|
|
4
|
+
force: z.ZodDefault<z.ZodBoolean>;
|
|
5
|
+
}, z.core.$strip>, {
|
|
6
|
+
text: string;
|
|
7
|
+
data?: undefined;
|
|
8
|
+
} | {
|
|
9
|
+
text: string;
|
|
10
|
+
data: {
|
|
11
|
+
mode: "create" | "update";
|
|
12
|
+
files: string[];
|
|
13
|
+
skipped: string[];
|
|
14
|
+
deleted: string[];
|
|
15
|
+
migrated: boolean;
|
|
16
|
+
warnings: string[];
|
|
17
|
+
};
|
|
18
|
+
}, Record<string, unknown>>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ph-clint regen` — reconcile an existing project against its persisted
|
|
3
|
+
* spec. Equivalent to running the generator in update mode.
|
|
4
|
+
*
|
|
5
|
+
* Run inside a project directory (or pass `--dir`). If the spec has flipped
|
|
6
|
+
* `features.powerhouse.enabled` since the last run, the flat → split
|
|
7
|
+
* migration fires first.
|
|
8
|
+
*/
|
|
9
|
+
import path from 'node:path';
|
|
10
|
+
import { defineCommand } from '@powerhousedao/ph-clint';
|
|
11
|
+
import { z } from 'zod';
|
|
12
|
+
import { readProjectSpec } from '../spec/file.js';
|
|
13
|
+
import { generateProject } from '../codegen/index.js';
|
|
14
|
+
const inputSchema = z.object({
|
|
15
|
+
dir: z
|
|
16
|
+
.string()
|
|
17
|
+
.optional()
|
|
18
|
+
.describe('Project directory (defaults to the current directory)'),
|
|
19
|
+
force: z
|
|
20
|
+
.boolean()
|
|
21
|
+
.default(false)
|
|
22
|
+
.describe('Overwrite user-edited managed files and bypass the git-dirty guard'),
|
|
23
|
+
});
|
|
24
|
+
export const regen = defineCommand({
|
|
25
|
+
id: 'regen',
|
|
26
|
+
description: 'Regenerate project files from the persisted spec',
|
|
27
|
+
inputSchema,
|
|
28
|
+
execute: async (input, { workdir, stdout, log }) => {
|
|
29
|
+
const targetDir = path.resolve(workdir, input.dir ?? '.');
|
|
30
|
+
const spec = await readProjectSpec(targetDir);
|
|
31
|
+
if (!spec) {
|
|
32
|
+
return {
|
|
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.',
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const warnings = [];
|
|
38
|
+
const result = await generateProject({
|
|
39
|
+
targetDir,
|
|
40
|
+
spec,
|
|
41
|
+
mode: 'update',
|
|
42
|
+
force: input.force,
|
|
43
|
+
onWarn: (m) => warnings.push(m),
|
|
44
|
+
});
|
|
45
|
+
const lines = [];
|
|
46
|
+
if (result.migrated)
|
|
47
|
+
lines.push('Migrated layout: flat → split.');
|
|
48
|
+
lines.push(`Wrote ${result.files.length} file(s); skipped ${result.skipped.length}; deleted ${result.deleted.length}.`);
|
|
49
|
+
for (const w of warnings) {
|
|
50
|
+
if (log)
|
|
51
|
+
log.warn(w);
|
|
52
|
+
else
|
|
53
|
+
stdout('warning: ' + w + '\n');
|
|
54
|
+
}
|
|
55
|
+
stdout(lines.join('\n') + '\n');
|
|
56
|
+
return {
|
|
57
|
+
text: lines.join('\n'),
|
|
58
|
+
data: {
|
|
59
|
+
mode: result.mode,
|
|
60
|
+
files: result.files.map((f) => f.relativePath),
|
|
61
|
+
skipped: result.skipped.map((f) => f.relativePath),
|
|
62
|
+
deleted: result.deleted.map((f) => f.relativePath),
|
|
63
|
+
migrated: result.migrated,
|
|
64
|
+
warnings,
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
});
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
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;
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
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)), '..');
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-CLI typed framework binding.
|
|
3
|
+
*
|
|
4
|
+
* This file is USER-OWNED. ph-clint-cli emits it once at project creation
|
|
5
|
+
* and never overwrites it afterwards — edit `configSchema` and
|
|
6
|
+
* `secretsSchema` freely.
|
|
7
|
+
*
|
|
8
|
+
* Typed factories (`defineCommand`, `defineTrigger`, ...) and the document
|
|
9
|
+
* `registry` come from `framework.gen.ts`, which IS regenerated whenever
|
|
10
|
+
* the spec's `documentTypes` list changes.
|
|
11
|
+
*/
|
|
12
|
+
import { z } from 'zod';
|
|
13
|
+
export declare const configSchema: z.ZodObject<{
|
|
14
|
+
model: z.ZodDefault<z.ZodString>;
|
|
15
|
+
devServicePort: z.ZodDefault<z.ZodNumber>;
|
|
16
|
+
phVersion: z.ZodDefault<z.ZodString>;
|
|
17
|
+
projectDocumentId: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export declare const secretsSchema: z.ZodObject<{
|
|
20
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export type Config = z.infer<typeof configSchema> & z.infer<typeof secretsSchema>;
|
|
23
|
+
export declare const defineCommand: <TInput extends z.ZodType, TOutput = unknown>(options: {
|
|
24
|
+
id: string;
|
|
25
|
+
description: string;
|
|
26
|
+
inputSchema: TInput;
|
|
27
|
+
outputSchema?: z.ZodType<TOutput, unknown, z.core.$ZodTypeInternals<TOutput, unknown>> | undefined;
|
|
28
|
+
prompt?: import("@powerhousedao/ph-clint").PromptConfig;
|
|
29
|
+
execute: (input: z.core.output<TInput>, ctx: import("@powerhousedao/ph-clint").CommandContext<{
|
|
30
|
+
model: string;
|
|
31
|
+
devServicePort: number;
|
|
32
|
+
phVersion: string;
|
|
33
|
+
projectDocumentId?: string | undefined;
|
|
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>;
|
|
67
|
+
}) => import("@powerhousedao/ph-clint").Command<TInput, TOutput, {
|
|
68
|
+
model: string;
|
|
69
|
+
devServicePort: number;
|
|
70
|
+
phVersion: string;
|
|
71
|
+
projectDocumentId?: string | undefined;
|
|
72
|
+
apiKey?: string | undefined;
|
|
73
|
+
}>, defineTrigger: <TState = Record<string, unknown>>(options: import("@powerhousedao/ph-clint").TriggerOptions<TState, {
|
|
74
|
+
model: string;
|
|
75
|
+
devServicePort: number;
|
|
76
|
+
phVersion: string;
|
|
77
|
+
projectDocumentId?: string | undefined;
|
|
78
|
+
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, {
|
|
111
|
+
model: string;
|
|
112
|
+
devServicePort: number;
|
|
113
|
+
phVersion: string;
|
|
114
|
+
projectDocumentId?: string | undefined;
|
|
115
|
+
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<{
|
|
148
|
+
model: string;
|
|
149
|
+
devServicePort: number;
|
|
150
|
+
phVersion: string;
|
|
151
|
+
projectDocumentId?: string | undefined;
|
|
152
|
+
apiKey?: string | undefined;
|
|
153
|
+
}>) => import("@powerhousedao/ph-clint").ServiceDefinition<{
|
|
154
|
+
model: string;
|
|
155
|
+
devServicePort: number;
|
|
156
|
+
phVersion: string;
|
|
157
|
+
projectDocumentId?: string | undefined;
|
|
158
|
+
apiKey?: string | undefined;
|
|
159
|
+
}>, createDocumentChangeTrigger: <T extends string, TState extends {
|
|
160
|
+
pending: number;
|
|
161
|
+
} = {
|
|
162
|
+
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, {
|
|
195
|
+
model: string;
|
|
196
|
+
devServicePort: number;
|
|
197
|
+
phVersion: string;
|
|
198
|
+
projectDocumentId?: string | undefined;
|
|
199
|
+
apiKey?: string | undefined;
|
|
200
|
+
}, TState>) => import("@powerhousedao/ph-clint").Trigger<TState, {
|
|
201
|
+
model: string;
|
|
202
|
+
devServicePort: number;
|
|
203
|
+
phVersion: string;
|
|
204
|
+
projectDocumentId?: string | undefined;
|
|
205
|
+
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
|
+
}]>>;
|
|
238
|
+
export { registry } from './framework.gen.js';
|
|
239
|
+
export type { Registry } from './framework.gen.js';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed document registry derived from the reactor package's document models.
|
|
3
|
+
* Regenerated whenever the spec's `documentTypes` list changes.
|
|
4
|
+
*/
|
|
5
|
+
export declare const registry: import("@powerhousedao/ph-clint").InferRegistry<readonly [{
|
|
6
|
+
readonly version: 1;
|
|
7
|
+
readonly reducer: import("document-model").Reducer<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>;
|
|
8
|
+
readonly actions: {
|
|
9
|
+
enableRoutine: (input: import("@powerhousedao/ph-clint-app").EnableRoutineInput) => import("@powerhousedao/ph-clint-app").EnableRoutineAction;
|
|
10
|
+
disableRoutine: (input: import("@powerhousedao/ph-clint-app").DisableRoutineInput) => import("@powerhousedao/ph-clint-app").DisableRoutineAction;
|
|
11
|
+
enableMastra: (input: import("@powerhousedao/ph-clint-app").EnableMastraInput) => import("@powerhousedao/ph-clint-app").EnableMastraAction;
|
|
12
|
+
disableMastra: (input: import("@powerhousedao/ph-clint-app").DisableMastraInput) => import("@powerhousedao/ph-clint-app").DisableMastraAction;
|
|
13
|
+
enablePowerhouse: (input: import("@powerhousedao/ph-clint-app").EnablePowerhouseInput) => import("@powerhousedao/ph-clint-app").EnablePowerhouseAction;
|
|
14
|
+
setPowerhouseSwitchboard: (input: import("@powerhousedao/ph-clint-app").SetPowerhouseSwitchboardInput) => import("@powerhousedao/ph-clint-app").SetPowerhouseSwitchboardAction;
|
|
15
|
+
setPowerhouseConnect: (input: import("@powerhousedao/ph-clint-app").SetPowerhouseConnectInput) => import("@powerhousedao/ph-clint-app").SetPowerhouseConnectAction;
|
|
16
|
+
setPackageName: (input: import("@powerhousedao/ph-clint-app").SetPackageNameInput) => import("@powerhousedao/ph-clint-app").SetPackageNameAction;
|
|
17
|
+
clearBin: (input: import("@powerhousedao/ph-clint-app").ClearBinInput) => import("@powerhousedao/ph-clint-app").ClearBinAction;
|
|
18
|
+
setBin: (input: import("@powerhousedao/ph-clint-app").SetBinInput) => import("@powerhousedao/ph-clint-app").SetBinAction;
|
|
19
|
+
setDescription: (input: import("@powerhousedao/ph-clint-app").SetDescriptionInput) => import("@powerhousedao/ph-clint-app").SetDescriptionAction;
|
|
20
|
+
setVersion: (input: import("@powerhousedao/ph-clint-app").SetVersionInput) => import("@powerhousedao/ph-clint-app").SetVersionAction;
|
|
21
|
+
clearScope: (input: import("@powerhousedao/ph-clint-app").ClearScopeInput) => import("@powerhousedao/ph-clint-app").ClearScopeAction;
|
|
22
|
+
setScope: (input: import("@powerhousedao/ph-clint-app").SetScopeInput) => import("@powerhousedao/ph-clint-app").SetScopeAction;
|
|
23
|
+
setName: (name: string | {
|
|
24
|
+
name: string;
|
|
25
|
+
}) => import("document-model").SetNameAction;
|
|
26
|
+
undo: (count?: number, scope?: string) => import("document-model").UndoAction;
|
|
27
|
+
redo: (count?: number, scope?: string) => import("document-model").RedoAction;
|
|
28
|
+
prune: (start?: number, end?: number, scope?: string) => import("document-model").SchemaPruneAction;
|
|
29
|
+
loadState: <TState extends import("document-model").PHBaseState = import("document-model").PHBaseState>(state: TState & {
|
|
30
|
+
name: string;
|
|
31
|
+
}, operations: number) => import("document-model").LoadStateAction;
|
|
32
|
+
noop: (scope?: string) => import("document-model").NOOPAction;
|
|
33
|
+
};
|
|
34
|
+
readonly utils: import("document-model").DocumentModelUtils<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>;
|
|
35
|
+
readonly documentModel: import("document-model").DocumentModelPHState;
|
|
36
|
+
}]>;
|
|
37
|
+
export type Registry = typeof registry;
|