@powerhousedao/ph-clint-cli 0.1.0-dev.8 → 0.1.0-dev.80

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 (99) hide show
  1. package/dist/cli.js +52 -10
  2. package/dist/codegen/actions.d.ts +46 -0
  3. package/dist/codegen/actions.js +424 -0
  4. package/dist/codegen/builders/agent-ts.d.ts +4 -4
  5. package/dist/codegen/builders/agent-ts.js +92 -2
  6. package/dist/codegen/builders/app-index-ts.d.ts +3 -10
  7. package/dist/codegen/builders/app-index-ts.js +30 -20
  8. package/dist/codegen/builders/cli-package-json.js +46 -14
  9. package/dist/codegen/builders/cli-ts.js +87 -49
  10. package/dist/codegen/builders/config-ts.d.ts +1 -1
  11. package/dist/codegen/builders/config-ts.js +2 -8
  12. package/dist/codegen/builders/demo-agent-ts.d.ts +8 -0
  13. package/dist/codegen/builders/demo-agent-ts.js +50 -0
  14. package/dist/codegen/builders/eslint-config-js.d.ts +1 -1
  15. package/dist/codegen/builders/eslint-config-js.js +7 -4
  16. package/dist/codegen/builders/framework-gen-ts.d.ts +11 -6
  17. package/dist/codegen/builders/framework-gen-ts.js +73 -21
  18. package/dist/codegen/builders/framework-ts.js +33 -7
  19. package/dist/codegen/builders/index.d.ts +10 -2
  20. package/dist/codegen/builders/index.js +30 -6
  21. package/dist/codegen/builders/manifest-json.d.ts +6 -0
  22. package/dist/codegen/builders/manifest-json.js +31 -0
  23. package/dist/codegen/builders/mastra-index-ts.d.ts +3 -0
  24. package/dist/codegen/builders/mastra-index-ts.js +47 -5
  25. package/dist/codegen/builders/publish-config-js.d.ts +8 -0
  26. package/dist/codegen/builders/publish-config-js.js +33 -0
  27. package/dist/codegen/builders/readme-md.js +7 -6
  28. package/dist/codegen/builders/root-package-json.js +11 -12
  29. package/dist/codegen/builders/smoke-test-ts.d.ts +2 -0
  30. package/dist/codegen/builders/smoke-test-ts.js +15 -0
  31. package/dist/codegen/exec.d.ts +0 -18
  32. package/dist/codegen/exec.js +0 -27
  33. package/dist/codegen/generated.d.ts +17 -0
  34. package/dist/codegen/generated.js +49 -0
  35. package/dist/codegen/index.d.ts +8 -36
  36. package/dist/codegen/index.js +6 -293
  37. package/dist/codegen/scaffold.d.ts +41 -3
  38. package/dist/codegen/scaffold.js +106 -16
  39. package/dist/commands/clint-project-build.d.ts +77 -1
  40. package/dist/commands/clint-project-build.js +11 -28
  41. package/dist/commands/clint-project-init.d.ts +128 -10
  42. package/dist/commands/clint-project-init.js +72 -47
  43. package/dist/commands/clint-project-publish.d.ts +78 -1
  44. package/dist/commands/clint-project-publish.js +6 -4
  45. package/dist/commands/clint-project-regen.d.ts +77 -1
  46. package/dist/commands/clint-project-regen.js +26 -2
  47. package/dist/commands/clint-skills-sync.d.ts +86 -0
  48. package/dist/commands/clint-skills-sync.js +56 -0
  49. package/dist/framework.d.ts +322 -60
  50. package/dist/framework.gen.d.ts +50 -10
  51. package/dist/framework.js +1 -5
  52. package/{prompts/agent-profiles/AgentBase.md → dist/gen/agent-profiles/PhClintDevAgent.md} +1 -1
  53. package/dist/gen/skills/cli-setup/.cli-docs.md +135 -0
  54. package/dist/gen/skills/cli-setup/SKILL.md +125 -0
  55. package/dist/gen/skills/cli-setup/references/00.assess-cli-needs.md +53 -0
  56. package/dist/gen/skills/cli-setup/references/01.define-config-schema.md +78 -0
  57. package/dist/gen/skills/cli-setup/references/02.wire-cli.md +141 -0
  58. package/dist/gen/skills/cli-setup/references/03.add-entrypoint.md +128 -0
  59. package/dist/gen/skills/cli-setup/references/expected-outcome.md +3 -0
  60. package/dist/gen/skills/command-definition/.cli-docs.md +84 -0
  61. package/dist/gen/skills/command-definition/SKILL.md +99 -0
  62. package/dist/gen/skills/command-definition/references/00.assess-requirements.md +58 -0
  63. package/dist/gen/skills/command-definition/references/01.define-schema.md +72 -0
  64. package/dist/gen/skills/command-definition/references/02.implement-execute.md +118 -0
  65. package/dist/gen/skills/command-definition/references/03.add-prompting.md +54 -0
  66. package/dist/gen/skills/command-definition/references/expected-outcome.md +3 -0
  67. package/dist/gen/skills/service-definition/.cli-docs.md +214 -0
  68. package/dist/gen/skills/service-definition/SKILL.md +148 -0
  69. package/dist/gen/skills/service-definition/references/00.assess-service.md +69 -0
  70. package/dist/gen/skills/service-definition/references/01.define-service.md +166 -0
  71. package/dist/gen/skills/service-definition/references/02.add-preflight.md +132 -0
  72. package/dist/gen/skills/service-definition/references/03.add-project-scanner.md +82 -0
  73. package/dist/gen/skills/service-definition/references/04.wire-events.md +120 -0
  74. package/dist/gen/skills/service-definition/references/expected-outcome.md +3 -0
  75. package/dist/main.js +0 -0
  76. package/dist/services/clint-project.js +21 -0
  77. package/dist/skills/sync.d.ts +40 -0
  78. package/dist/skills/sync.js +119 -0
  79. package/dist/spec/ensure-document.d.ts +17 -0
  80. package/dist/spec/ensure-document.js +56 -0
  81. package/dist/spec/file.d.ts +1 -4
  82. package/dist/spec/file.js +1 -34
  83. package/dist/spec/from-document.d.ts +4 -1
  84. package/dist/spec/from-document.js +4 -16
  85. package/dist/spec/types.d.ts +1 -62
  86. package/dist/spec/types.js +1 -112
  87. package/dist/triggers/publish-trigger.d.ts +81 -0
  88. package/dist/triggers/publish-trigger.js +137 -0
  89. package/dist/triggers/spec-change.d.ts +60 -18
  90. package/dist/triggers/spec-change.js +154 -101
  91. package/package.json +13 -18
  92. package/dist/codegen/builders/publish-config-ts.d.ts +0 -6
  93. package/dist/codegen/builders/publish-config-ts.js +0 -18
  94. package/dist/commands/init.d.ts +0 -57
  95. package/dist/commands/init.js +0 -168
  96. package/dist/commands/regen.d.ts +0 -18
  97. package/dist/commands/regen.js +0 -68
  98. package/prompts/skills-ext/.gitkeep +0 -0
  99. package/prompts/skills-tpl/.gitkeep +0 -0
@@ -5,26 +5,14 @@ import { clintProjectSpecSchema, } from './types.js';
5
5
  * Returns `null` if the document has no valid package name yet — callers
6
6
  * should wait for the user to populate it before triggering codegen.
7
7
  */
8
- export function specFromDocumentState(state) {
8
+ export function specFromDocumentState(state, meta) {
9
9
  if (!state.name)
10
10
  return null;
11
- // `documentTypes` is a forward-compatible field — older `ph-clint-project`
12
- // document states don't declare it yet. Pull through if present, otherwise
13
- // leave it to the schema default (`[]`). Codegen treats the empty list as
14
- // "no registry entries" and emits an empty `defineRegistry([...])`.
15
- const documentTypes = state.documentTypes ?? undefined;
16
11
  const parsed = clintProjectSpecSchema.safeParse({
17
- name: state.name,
12
+ ...state,
18
13
  scope: state.scope ?? undefined,
19
- version: state.version,
20
- description: state.description,
21
- bin: state.bin ?? undefined,
22
- features: {
23
- powerhouse: { ...state.features.powerhouse },
24
- mastra: { ...state.features.mastra },
25
- routine: { ...state.features.routine },
26
- },
27
- ...(Array.isArray(documentTypes) ? { documentTypes } : {}),
14
+ documentId: meta?.documentId,
15
+ documentType: meta?.documentType,
28
16
  });
29
17
  return parsed.success ? parsed.data : null;
30
18
  }
@@ -1,62 +1 @@
1
- /**
2
- * ClintProjectSpec — the in-memory shape that describes a ph-clint
3
- * implementation project. Persisted at
4
- * `{impl-project}/.ph/ph-clint-cli/project-spec.json` and consumed by
5
- * the code generator (src/codegen/).
6
- *
7
- * Intentionally minimal. Richer structure (services, skills, agents,
8
- * triggers, document-models) gets added in later phases as each
9
- * generator step actually needs it.
10
- */
11
- import { z } from 'zod';
12
- export declare const clintProjectSpecSchema: z.ZodObject<{
13
- name: z.ZodString;
14
- scope: z.ZodOptional<z.ZodString>;
15
- version: z.ZodDefault<z.ZodString>;
16
- description: z.ZodDefault<z.ZodString>;
17
- bin: z.ZodOptional<z.ZodString>;
18
- features: z.ZodDefault<z.ZodObject<{
19
- powerhouse: z.ZodDefault<z.ZodObject<{
20
- enabled: z.ZodDefault<z.ZodBoolean>;
21
- switchboard: z.ZodDefault<z.ZodBoolean>;
22
- connect: z.ZodDefault<z.ZodBoolean>;
23
- }, z.core.$strip>>;
24
- mastra: z.ZodDefault<z.ZodObject<{
25
- enabled: z.ZodDefault<z.ZodBoolean>;
26
- }, z.core.$strip>>;
27
- routine: z.ZodDefault<z.ZodObject<{
28
- enabled: z.ZodDefault<z.ZodBoolean>;
29
- }, z.core.$strip>>;
30
- }, z.core.$strip>>;
31
- documentTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
32
- }, z.core.$strip>;
33
- export type ClintProjectSpec = z.infer<typeof clintProjectSpecSchema>;
34
- export type ClintProjectSpecInput = z.input<typeof clintProjectSpecSchema>;
35
- /** npm package name (e.g. `@scope/foo` or `foo`). */
36
- export declare function getPackageName(spec: ClintProjectSpec): string;
37
- /** bin name (defaults to the bare project name). */
38
- export declare function getBinName(spec: ClintProjectSpec): string;
39
- /**
40
- * Name of the CLI sub-folder when the project is split (Powerhouse enabled).
41
- * For flat projects this is irrelevant — callers use the project root directly.
42
- */
43
- export declare function getCliFolderName(spec: ClintProjectSpec): string;
44
- /**
45
- * Name of the reactor-package sub-folder when the project is split.
46
- */
47
- export declare function getAppFolderName(spec: ClintProjectSpec): string;
48
- /**
49
- * Folder slug for a documentType ID. The slug is the portion after the last
50
- * `/` (e.g. `powerhouse/ph-clint-project` → `ph-clint-project`). Matches the
51
- * convention used by Powerhouse's reactor-package codegen — each document
52
- * model lives at `document-models/<slug>/`.
53
- */
54
- export declare function getDocumentTypeSlug(documentType: string): string;
55
- /**
56
- * PascalCase export name for a documentType ID. Powerhouse's module
57
- * generator exports each module as `PascalCase(<slug>)` (e.g.
58
- * `powerhouse/ph-clint-project` → `PhClintProject`). The top-level reactor
59
- * package re-exports these names, so this helper gives codegen the string
60
- * it needs both for the import and the `defineRegistry` entry.
61
- */
62
- export declare function getDocumentTypeModuleName(documentType: string): string;
1
+ export { POWERHOUSE_LEVELS, powerhouseLevelSchema, type PowerhouseLevel, phAtLeast, agentModelSchema, type AgentModel, agentProfileSchema, type AgentProfile, powerhousePackageSchema, type PowerhousePackage, externalSkillSchema, type ExternalSkill, clintProjectSpecSchema, type ClintProjectSpec, type ClintProjectSpecInput, getPackageName, getBinName, getCliFolderName, getAppFolderName, getAllDocumentTypes, getAppPackageName, getAppDirName, getDocumentTypeSlug, getDocumentTypeModuleName, isDocTypeGlob, docTypeGlobToRegex, } from '@powerhousedao/ph-clint-dev/spec';
@@ -1,112 +1 @@
1
- /**
2
- * ClintProjectSpec — the in-memory shape that describes a ph-clint
3
- * implementation project. Persisted at
4
- * `{impl-project}/.ph/ph-clint-cli/project-spec.json` and consumed by
5
- * the code generator (src/codegen/).
6
- *
7
- * Intentionally minimal. Richer structure (services, skills, agents,
8
- * triggers, document-models) gets added in later phases as each
9
- * generator step actually needs it.
10
- */
11
- import { z } from 'zod';
12
- const powerhouseFeatureSchema = z.object({
13
- enabled: z.boolean().default(false),
14
- switchboard: z.boolean().default(true),
15
- connect: z.boolean().default(true),
16
- });
17
- const mastraFeatureSchema = z.object({
18
- enabled: z.boolean().default(false),
19
- });
20
- const routineFeatureSchema = z.object({
21
- enabled: z.boolean().default(false),
22
- });
23
- // Zod 4 does not cascade `.default({})` through nested object schemas — a
24
- // missing outer key fills in `{}`, but nested keys with their own `.default`
25
- // are not re-defaulted unless the object itself re-parses. We spell out full
26
- // defaults here so `clintProjectSpecSchema.parse({ name: 'x' })` yields a
27
- // fully-populated feature tree.
28
- const DEFAULT_POWERHOUSE = {
29
- enabled: false,
30
- switchboard: true,
31
- connect: true,
32
- };
33
- const DEFAULT_MASTRA = { enabled: false };
34
- const DEFAULT_ROUTINE = { enabled: false };
35
- export const clintProjectSpecSchema = z.object({
36
- name: z
37
- .string()
38
- .regex(/^[a-z0-9][a-z0-9-]*$/, 'lowercase letters, digits, hyphens only'),
39
- scope: z
40
- .string()
41
- .regex(/^[a-z0-9][a-z0-9-]*$/, 'lowercase letters, digits, hyphens only')
42
- .optional(),
43
- version: z.string().default('0.1.0'),
44
- description: z.string().default(''),
45
- bin: z.string().optional(),
46
- features: z
47
- .object({
48
- powerhouse: powerhouseFeatureSchema.default(DEFAULT_POWERHOUSE),
49
- mastra: mastraFeatureSchema.default(DEFAULT_MASTRA),
50
- routine: routineFeatureSchema.default(DEFAULT_ROUTINE),
51
- })
52
- .default({
53
- powerhouse: DEFAULT_POWERHOUSE,
54
- mastra: DEFAULT_MASTRA,
55
- routine: DEFAULT_ROUTINE,
56
- }),
57
- /**
58
- * Document types registered with this CLI — full documentType ID strings
59
- * (e.g. `powerhouse/ph-clint-project`). Drives codegen of `src/framework.gen.ts`,
60
- * which emits a typed `defineRegistry([...] as const)` call so impl code
61
- * gets narrowed `reactor.client.get(id, 'my-type')` access. Empty on
62
- * fresh projects — populated as document models are added to the reactor
63
- * package.
64
- */
65
- documentTypes: z.array(z.string()).default([]),
66
- });
67
- /** npm package name (e.g. `@scope/foo` or `foo`). */
68
- export function getPackageName(spec) {
69
- return spec.scope ? `@${spec.scope}/${spec.name}` : spec.name;
70
- }
71
- /** bin name (defaults to the bare project name). */
72
- export function getBinName(spec) {
73
- return spec.bin ?? spec.name;
74
- }
75
- /**
76
- * Name of the CLI sub-folder when the project is split (Powerhouse enabled).
77
- * For flat projects this is irrelevant — callers use the project root directly.
78
- */
79
- export function getCliFolderName(spec) {
80
- return `${spec.name}-cli`;
81
- }
82
- /**
83
- * Name of the reactor-package sub-folder when the project is split.
84
- */
85
- export function getAppFolderName(spec) {
86
- return `${spec.name}-app`;
87
- }
88
- /**
89
- * Folder slug for a documentType ID. The slug is the portion after the last
90
- * `/` (e.g. `powerhouse/ph-clint-project` → `ph-clint-project`). Matches the
91
- * convention used by Powerhouse's reactor-package codegen — each document
92
- * model lives at `document-models/<slug>/`.
93
- */
94
- export function getDocumentTypeSlug(documentType) {
95
- const lastSlash = documentType.lastIndexOf('/');
96
- return lastSlash >= 0 ? documentType.slice(lastSlash + 1) : documentType;
97
- }
98
- /**
99
- * PascalCase export name for a documentType ID. Powerhouse's module
100
- * generator exports each module as `PascalCase(<slug>)` (e.g.
101
- * `powerhouse/ph-clint-project` → `PhClintProject`). The top-level reactor
102
- * package re-exports these names, so this helper gives codegen the string
103
- * it needs both for the import and the `defineRegistry` entry.
104
- */
105
- export function getDocumentTypeModuleName(documentType) {
106
- const slug = getDocumentTypeSlug(documentType);
107
- return slug
108
- .split(/[-_]/)
109
- .filter((s) => s.length > 0)
110
- .map((s) => s[0].toUpperCase() + s.slice(1))
111
- .join('');
112
- }
1
+ export { POWERHOUSE_LEVELS, powerhouseLevelSchema, phAtLeast, agentModelSchema, agentProfileSchema, powerhousePackageSchema, externalSkillSchema, clintProjectSpecSchema, getPackageName, getBinName, getCliFolderName, getAppFolderName, getAllDocumentTypes, getAppPackageName, getAppDirName, getDocumentTypeSlug, getDocumentTypeModuleName, isDocTypeGlob, docTypeGlobToRegex, } from '@powerhousedao/ph-clint-dev/spec';
@@ -0,0 +1,81 @@
1
+ /** Map document model PublishTag values to CLI --tag values. */
2
+ export declare function tagToCli(tag: string): 'dev' | 'staging' | 'production' | null;
3
+ export declare const publishTrigger: import("@powerhousedao/ph-clint").Trigger<{
4
+ pending: number;
5
+ }, {
6
+ model: string;
7
+ devServicePort: number;
8
+ phVersion: string;
9
+ apiKey?: string | undefined;
10
+ }, import("@powerhousedao/ph-clint").InferRegistry<readonly [{
11
+ readonly version: 1;
12
+ readonly reducer: import("document-model").Reducer<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>;
13
+ readonly actions: {
14
+ setAgentModel: (input: import("@powerhousedao/ph-clint-app").SetAgentModelInput) => import("@powerhousedao/ph-clint-app").SetAgentModelAction;
15
+ addAgentProfileRef: (input: import("@powerhousedao/ph-clint-app").AddAgentProfileRefInput) => import("@powerhousedao/ph-clint-app").AddAgentProfileRefAction;
16
+ removeAgentProfileRef: (input: import("@powerhousedao/ph-clint-app").RemoveAgentProfileRefInput) => import("@powerhousedao/ph-clint-app").RemoveAgentProfileRefAction;
17
+ reorderAgentProfileRefs: (input: import("@powerhousedao/ph-clint-app").ReorderAgentProfileRefsInput) => import("@powerhousedao/ph-clint-app").ReorderAgentProfileRefsAction;
18
+ addAgentSkill: (input: import("@powerhousedao/ph-clint-app").AddAgentSkillInput) => import("@powerhousedao/ph-clint-app").AddAgentSkillAction;
19
+ removeAgentSkill: (input: import("@powerhousedao/ph-clint-app").RemoveAgentSkillInput) => import("@powerhousedao/ph-clint-app").RemoveAgentSkillAction;
20
+ addAgentToolPattern: (input: import("@powerhousedao/ph-clint-app").AddAgentToolPatternInput) => import("@powerhousedao/ph-clint-app").AddAgentToolPatternAction;
21
+ removeAgentToolPattern: (input: import("@powerhousedao/ph-clint-app").RemoveAgentToolPatternInput) => import("@powerhousedao/ph-clint-app").RemoveAgentToolPatternAction;
22
+ addSubAgent: (input: import("@powerhousedao/ph-clint-app").AddSubAgentInput) => import("@powerhousedao/ph-clint-app").AddSubAgentAction;
23
+ removeSubAgent: (input: import("@powerhousedao/ph-clint-app").RemoveSubAgentInput) => import("@powerhousedao/ph-clint-app").RemoveSubAgentAction;
24
+ setSubAgentName: (input: import("@powerhousedao/ph-clint-app").SetSubAgentNameInput) => import("@powerhousedao/ph-clint-app").SetSubAgentNameAction;
25
+ setSubAgentDescription: (input: import("@powerhousedao/ph-clint-app").SetSubAgentDescriptionInput) => import("@powerhousedao/ph-clint-app").SetSubAgentDescriptionAction;
26
+ setMainAgentName: (input: import("@powerhousedao/ph-clint-app").SetMainAgentNameInput) => import("@powerhousedao/ph-clint-app").SetMainAgentNameAction;
27
+ setMainAgentDescription: (input: import("@powerhousedao/ph-clint-app").SetMainAgentDescriptionInput) => import("@powerhousedao/ph-clint-app").SetMainAgentDescriptionAction;
28
+ clearMainAgentDescription: (input: import("@powerhousedao/ph-clint-app").ClearMainAgentDescriptionInput) => import("@powerhousedao/ph-clint-app").ClearMainAgentDescriptionAction;
29
+ setMainAgentImage: (input: import("@powerhousedao/ph-clint-app").SetMainAgentImageInput) => import("@powerhousedao/ph-clint-app").SetMainAgentImageAction;
30
+ clearMainAgentImage: (input: import("@powerhousedao/ph-clint-app").ClearMainAgentImageInput) => import("@powerhousedao/ph-clint-app").ClearMainAgentImageAction;
31
+ addProfile: (input: import("@powerhousedao/ph-clint-app").AddProfileInput) => import("@powerhousedao/ph-clint-app").AddProfileAction;
32
+ updateProfile: (input: import("@powerhousedao/ph-clint-app").UpdateProfileInput) => import("@powerhousedao/ph-clint-app").UpdateProfileAction;
33
+ removeProfile: (input: import("@powerhousedao/ph-clint-app").RemoveProfileInput) => import("@powerhousedao/ph-clint-app").RemoveProfileAction;
34
+ reorderProfiles: (input: import("@powerhousedao/ph-clint-app").ReorderProfilesInput) => import("@powerhousedao/ph-clint-app").ReorderProfilesAction;
35
+ addModel: (input: import("@powerhousedao/ph-clint-app").AddModelInput) => import("@powerhousedao/ph-clint-app").AddModelAction;
36
+ removeModel: (input: import("@powerhousedao/ph-clint-app").RemoveModelInput) => import("@powerhousedao/ph-clint-app").RemoveModelAction;
37
+ enableMastra: (input: import("@powerhousedao/ph-clint-app").EnableMastraInput) => import("@powerhousedao/ph-clint-app").EnableMastraAction;
38
+ disableMastra: (input: import("@powerhousedao/ph-clint-app").DisableMastraInput) => import("@powerhousedao/ph-clint-app").DisableMastraAction;
39
+ setEnableChat: (input: import("@powerhousedao/ph-clint-app").SetEnableChatInput) => import("@powerhousedao/ph-clint-app").SetEnableChatAction;
40
+ addSupportedResource: (input: import("@powerhousedao/ph-clint-app").AddSupportedResourceInput) => import("@powerhousedao/ph-clint-app").AddSupportedResourceAction;
41
+ removeSupportedResource: (input: import("@powerhousedao/ph-clint-app").RemoveSupportedResourceInput) => import("@powerhousedao/ph-clint-app").RemoveSupportedResourceAction;
42
+ setProxyEnabled: (input: import("@powerhousedao/ph-clint-app").SetProxyEnabledInput) => import("@powerhousedao/ph-clint-app").SetProxyEnabledAction;
43
+ setObservabilityEnabled: (input: import("@powerhousedao/ph-clint-app").SetObservabilityEnabledInput) => import("@powerhousedao/ph-clint-app").SetObservabilityEnabledAction;
44
+ importSpec: (input: import("@powerhousedao/ph-clint-app").ImportSpecInput) => import("@powerhousedao/ph-clint-app").ImportSpecAction;
45
+ bumpVersion: (input: import("@powerhousedao/ph-clint-app").BumpVersionInput) => import("@powerhousedao/ph-clint-app").BumpVersionAction;
46
+ publishDev: (input: import("@powerhousedao/ph-clint-app").PublishDevInput) => import("@powerhousedao/ph-clint-app").PublishDevAction;
47
+ publishStaging: (input: import("@powerhousedao/ph-clint-app").PublishStagingInput) => import("@powerhousedao/ph-clint-app").PublishStagingAction;
48
+ publishProduction: (input: import("@powerhousedao/ph-clint-app").PublishProductionInput) => import("@powerhousedao/ph-clint-app").PublishProductionAction;
49
+ setPublishStatus: (input: import("@powerhousedao/ph-clint-app").SetPublishStatusInput) => import("@powerhousedao/ph-clint-app").SetPublishStatusAction;
50
+ addExternalSkill: (input: import("@powerhousedao/ph-clint-app").AddExternalSkillInput) => import("@powerhousedao/ph-clint-app").AddExternalSkillAction;
51
+ removeExternalSkill: (input: import("@powerhousedao/ph-clint-app").RemoveExternalSkillInput) => import("@powerhousedao/ph-clint-app").RemoveExternalSkillAction;
52
+ setExternalSkillName: (input: import("@powerhousedao/ph-clint-app").SetExternalSkillNameInput) => import("@powerhousedao/ph-clint-app").SetExternalSkillNameAction;
53
+ setExternalSkillGithubUrl: (input: import("@powerhousedao/ph-clint-app").SetExternalSkillGithubUrlInput) => import("@powerhousedao/ph-clint-app").SetExternalSkillGithubUrlAction;
54
+ addPowerhousePackage: (input: import("@powerhousedao/ph-clint-app").AddPowerhousePackageInput) => import("@powerhousedao/ph-clint-app").AddPowerhousePackageAction;
55
+ removePowerhousePackage: (input: import("@powerhousedao/ph-clint-app").RemovePowerhousePackageInput) => import("@powerhousedao/ph-clint-app").RemovePowerhousePackageAction;
56
+ addPackageDocumentType: (input: import("@powerhousedao/ph-clint-app").AddPackageDocumentTypeInput) => import("@powerhousedao/ph-clint-app").AddPackageDocumentTypeAction;
57
+ removePackageDocumentType: (input: import("@powerhousedao/ph-clint-app").RemovePackageDocumentTypeInput) => import("@powerhousedao/ph-clint-app").RemovePackageDocumentTypeAction;
58
+ setPackageVersion: (input: import("@powerhousedao/ph-clint-app").SetPackageVersionInput) => import("@powerhousedao/ph-clint-app").SetPackageVersionAction;
59
+ enableRoutine: (input: import("@powerhousedao/ph-clint-app").EnableRoutineInput) => import("@powerhousedao/ph-clint-app").EnableRoutineAction;
60
+ disableRoutine: (input: import("@powerhousedao/ph-clint-app").DisableRoutineInput) => import("@powerhousedao/ph-clint-app").DisableRoutineAction;
61
+ setPowerhouseLevel: (input: import("@powerhousedao/ph-clint-app").SetPowerhouseLevelInput) => import("@powerhousedao/ph-clint-app").SetPowerhouseLevelAction;
62
+ setDescription: (input: import("@powerhousedao/ph-clint-app").SetDescriptionInput) => import("@powerhousedao/ph-clint-app").SetDescriptionAction;
63
+ setVersion: (input: import("@powerhousedao/ph-clint-app").SetVersionInput) => import("@powerhousedao/ph-clint-app").SetVersionAction;
64
+ setPackageIdentifier: (input: import("@powerhousedao/ph-clint-app").SetPackageIdentifierInput) => import("@powerhousedao/ph-clint-app").SetPackageIdentifierAction;
65
+ setName: (name: string | {
66
+ name: string;
67
+ }) => import("document-model").SetNameAction;
68
+ setPreferredEditor: (input: string | null | {
69
+ preferredEditor: string | null;
70
+ }) => import("document-model").SetPreferredEditorAction;
71
+ undo: (count?: number, scope?: string) => import("document-model").UndoAction;
72
+ redo: (count?: number, scope?: string) => import("document-model").RedoAction;
73
+ prune: (start?: number, end?: number, scope?: string) => import("document-model").SchemaPruneAction;
74
+ loadState: <TState extends import("document-model").PHBaseState = import("document-model").PHBaseState>(state: TState & {
75
+ name: string;
76
+ }, operations: number) => import("document-model").LoadStateAction;
77
+ noop: (scope?: string) => import("document-model").NOOPAction;
78
+ };
79
+ readonly utils: import("document-model").DocumentModelUtils<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>;
80
+ readonly documentModel: import("document-model").DocumentModelPHState;
81
+ }]>>;
@@ -0,0 +1,137 @@
1
+ /**
2
+ * `publish-trigger` — watches ALL `powerhouse/ph-clint-project` documents for
3
+ * publish records with `Pending` status and invokes the publish pipeline.
4
+ *
5
+ * Unlike `spec-change`, this trigger does NOT convert to a `ClintProjectSpec`.
6
+ * It reads `publishHistory` directly from the document state, since publish
7
+ * records are a doc-model concern (not a codegen input).
8
+ *
9
+ * Uses the multi-doc path (no `documentId`), scanning all matching documents
10
+ * on each poll. For each document with a pending publish record, it uses the
11
+ * project mapping to resolve the on-disk project directory.
12
+ *
13
+ * Flow:
14
+ * 1. On document change, scans `publishHistory` for records with status
15
+ * `"Pending"`.
16
+ * 2. For each pending record, returns a work item that:
17
+ * a. Dispatches SET_PUBLISH_STATUS({ id, status: "InProgress" }).
18
+ * b. Runs `ph-clint clint-project-publish --tag <tag>`.
19
+ * c. Dispatches SET_PUBLISH_STATUS({ id, status: "Succeeded"|"Failed" }).
20
+ */
21
+ import path from 'node:path';
22
+ import { scanProjects, getProjectMapping } from '@powerhousedao/ph-clint';
23
+ import { setPublishStatus } from '@powerhousedao/ph-clint-app';
24
+ import { createDocumentChangeTrigger } from '../framework.js';
25
+ import { specFromDocumentState } from '../spec/from-document.js';
26
+ import { clintProject } from '../services/clint-project.js';
27
+ const DOCUMENT_TYPE = 'powerhouse/ph-clint-project';
28
+ const TAG = '[publish]';
29
+ /** Map document model PublishTag values to CLI --tag values. */
30
+ export function tagToCli(tag) {
31
+ switch (tag) {
32
+ case 'Dev':
33
+ return 'dev';
34
+ case 'Staging':
35
+ return 'staging';
36
+ case 'Production':
37
+ return 'production';
38
+ default:
39
+ return null;
40
+ }
41
+ }
42
+ export const publishTrigger = createDocumentChangeTrigger({
43
+ id: 'publish-trigger',
44
+ documentType: DOCUMENT_TYPE,
45
+ // No documentId → watches ALL ph-clint-project docs
46
+ // Don't fire on startup — only react to new pending records.
47
+ initialReconcile: false,
48
+ async onChange(docs, ctx) {
49
+ const log = ctx.context.log;
50
+ const folders = ctx.context.folders;
51
+ // Build the mapping to resolve on-disk project directories
52
+ const scanner = clintProject.projectScanner;
53
+ const scanResults = scanner
54
+ ? scanProjects(ctx.context.workdir, scanner)
55
+ : [];
56
+ const mapping = await getProjectMapping(scanResults, folders);
57
+ for (const doc of docs) {
58
+ const publishHistory = doc.state.global.publishHistory ?? [];
59
+ const pending = publishHistory.filter((r) => r.status === 'Pending');
60
+ if (pending.length === 0)
61
+ continue;
62
+ // Resolve the on-disk target directory for this document
63
+ const spec = specFromDocumentState(doc.state.global, {
64
+ documentId: doc.header.id,
65
+ documentType: doc.header.documentType,
66
+ });
67
+ const entry = mapping.find((m) => m.documentId === doc.header.id);
68
+ const workdir = entry?.path
69
+ ?? (spec ? path.join(ctx.context.workdir, spec.name) : ctx.context.workdir);
70
+ // Process the first pending record (one per tick to avoid races).
71
+ const record = pending[0];
72
+ const cliTag = tagToCli(record.tag);
73
+ if (!cliTag) {
74
+ log?.warn(`${TAG} unknown publish tag "${record.tag}" for record ${record.id}`);
75
+ continue;
76
+ }
77
+ log?.info(`${TAG} found pending ${record.tag} publish for doc ${doc.header.id} (id=${record.id}, version=${record.version})`);
78
+ const { runProcess, stdout } = ctx.context;
79
+ return {
80
+ type: 'function',
81
+ params: {
82
+ fn: async () => {
83
+ const reactor = await ctx.reactor();
84
+ if (!reactor) {
85
+ log?.error(`${TAG} reactor not available, cannot update publish status`);
86
+ return;
87
+ }
88
+ // Mark as InProgress.
89
+ log?.info(`${TAG} marking record ${record.id} as InProgress`);
90
+ await reactor.client.execute(doc.header.id, 'main', [
91
+ setPublishStatus({ id: record.id, status: 'InProgress' }),
92
+ ]);
93
+ // Install dependencies in the generated project before publishing.
94
+ // CI=true suppresses pnpm 11's interactive build-script approval
95
+ // prompt; --no-frozen-lockfile overrides CI's default so a regen
96
+ // that added new deps doesn't fail with ERR_PNPM_OUTDATED_LOCKFILE.
97
+ stdout(`${TAG} running pnpm install in ${workdir}\n`);
98
+ const installResult = await runProcess('pnpm install --no-frozen-lockfile', {
99
+ cwd: workdir,
100
+ timeout: 300_000,
101
+ env: { CI: 'true' },
102
+ });
103
+ if (!installResult.success) {
104
+ log?.error(`${TAG} pnpm install failed in ${workdir}`);
105
+ }
106
+ // Run the publish command.
107
+ let success = false;
108
+ try {
109
+ stdout(`${TAG} invoking clint-project-publish --tag ${cliTag}\n`);
110
+ const { clintProjectPublish } = await import('../commands/clint-project-publish.js');
111
+ const result = await clintProjectPublish.execute({ tag: cliTag, dir: workdir, dryRun: false, skipBuild: false, skipGitCheck: true, verbose: false }, ctx.commandContext);
112
+ success = !result.text.includes('failed');
113
+ }
114
+ catch (err) {
115
+ log?.error(`${TAG} publish failed: ${err instanceof Error ? err.message : String(err)}`);
116
+ }
117
+ // Update status.
118
+ const finalStatus = success ? 'Succeeded' : 'Failed';
119
+ stdout(`${TAG} marking record ${record.id} as ${finalStatus}\n`);
120
+ await reactor.client.execute(doc.header.id, 'main', [
121
+ setPublishStatus({
122
+ id: record.id,
123
+ status: finalStatus,
124
+ }),
125
+ ]);
126
+ },
127
+ },
128
+ callbacks: {
129
+ onFailure: (err) => {
130
+ log?.error(`${TAG} publish trigger failed: ${err.message}`);
131
+ },
132
+ },
133
+ };
134
+ }
135
+ return null;
136
+ },
137
+ });
@@ -1,35 +1,77 @@
1
+ import type { ImportSpecInput } from '@powerhousedao/ph-clint-app/document-models/ph-clint-project';
1
2
  import type { ClintProjectSpec } from '../spec/types.js';
2
- /** Stable hash of a ClintProjectSpec (sha256 of canonical-key JSON). */
3
+ /** Stable hash of a ClintProjectSpec (sha256 of canonical-key JSON).
4
+ * Excludes documentId/documentType — they don't affect codegen output. */
3
5
  export declare function hashSpec(spec: ClintProjectSpec): string;
6
+ export declare function specToImportInput(spec: ClintProjectSpec): ImportSpecInput;
4
7
  export declare const specChangeTrigger: import("@powerhousedao/ph-clint").Trigger<{
5
8
  pending: number;
6
9
  }, {
7
10
  model: string;
8
11
  devServicePort: number;
9
12
  phVersion: string;
10
- projectDocumentId?: string | undefined;
11
13
  apiKey?: string | undefined;
12
14
  }, import("@powerhousedao/ph-clint").InferRegistry<readonly [{
13
15
  readonly version: 1;
14
- readonly reducer: import("document-model").Reducer<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>;
16
+ readonly reducer: import("document-model").Reducer<import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").PhClintProjectPHState>;
15
17
  readonly actions: {
16
- enableRoutine: (input: import("@powerhousedao/ph-clint-app").EnableRoutineInput) => import("@powerhousedao/ph-clint-app").EnableRoutineAction;
17
- disableRoutine: (input: import("@powerhousedao/ph-clint-app").DisableRoutineInput) => import("@powerhousedao/ph-clint-app").DisableRoutineAction;
18
- enableMastra: (input: import("@powerhousedao/ph-clint-app").EnableMastraInput) => import("@powerhousedao/ph-clint-app").EnableMastraAction;
19
- disableMastra: (input: import("@powerhousedao/ph-clint-app").DisableMastraInput) => import("@powerhousedao/ph-clint-app").DisableMastraAction;
20
- enablePowerhouse: (input: import("@powerhousedao/ph-clint-app").EnablePowerhouseInput) => import("@powerhousedao/ph-clint-app").EnablePowerhouseAction;
21
- setPowerhouseSwitchboard: (input: import("@powerhousedao/ph-clint-app").SetPowerhouseSwitchboardInput) => import("@powerhousedao/ph-clint-app").SetPowerhouseSwitchboardAction;
22
- setPowerhouseConnect: (input: import("@powerhousedao/ph-clint-app").SetPowerhouseConnectInput) => import("@powerhousedao/ph-clint-app").SetPowerhouseConnectAction;
23
- setPackageName: (input: import("@powerhousedao/ph-clint-app").SetPackageNameInput) => import("@powerhousedao/ph-clint-app").SetPackageNameAction;
24
- clearBin: (input: import("@powerhousedao/ph-clint-app").ClearBinInput) => import("@powerhousedao/ph-clint-app").ClearBinAction;
25
- setBin: (input: import("@powerhousedao/ph-clint-app").SetBinInput) => import("@powerhousedao/ph-clint-app").SetBinAction;
26
- setDescription: (input: import("@powerhousedao/ph-clint-app").SetDescriptionInput) => import("@powerhousedao/ph-clint-app").SetDescriptionAction;
27
- setVersion: (input: import("@powerhousedao/ph-clint-app").SetVersionInput) => import("@powerhousedao/ph-clint-app").SetVersionAction;
28
- clearScope: (input: import("@powerhousedao/ph-clint-app").ClearScopeInput) => import("@powerhousedao/ph-clint-app").ClearScopeAction;
29
- setScope: (input: import("@powerhousedao/ph-clint-app").SetScopeInput) => import("@powerhousedao/ph-clint-app").SetScopeAction;
18
+ setAgentModel: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetAgentModelInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetAgentModelAction;
19
+ addAgentProfileRef: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").AddAgentProfileRefInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").AddAgentProfileRefAction;
20
+ removeAgentProfileRef: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").RemoveAgentProfileRefInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").RemoveAgentProfileRefAction;
21
+ reorderAgentProfileRefs: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").ReorderAgentProfileRefsInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").ReorderAgentProfileRefsAction;
22
+ addAgentSkill: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").AddAgentSkillInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").AddAgentSkillAction;
23
+ removeAgentSkill: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").RemoveAgentSkillInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").RemoveAgentSkillAction;
24
+ addAgentToolPattern: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").AddAgentToolPatternInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").AddAgentToolPatternAction;
25
+ removeAgentToolPattern: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").RemoveAgentToolPatternInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").RemoveAgentToolPatternAction;
26
+ addSubAgent: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").AddSubAgentInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").AddSubAgentAction;
27
+ removeSubAgent: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").RemoveSubAgentInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").RemoveSubAgentAction;
28
+ setSubAgentName: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetSubAgentNameInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetSubAgentNameAction;
29
+ setSubAgentDescription: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetSubAgentDescriptionInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetSubAgentDescriptionAction;
30
+ setMainAgentName: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetMainAgentNameInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetMainAgentNameAction;
31
+ setMainAgentDescription: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetMainAgentDescriptionInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetMainAgentDescriptionAction;
32
+ clearMainAgentDescription: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").ClearMainAgentDescriptionInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").ClearMainAgentDescriptionAction;
33
+ setMainAgentImage: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetMainAgentImageInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetMainAgentImageAction;
34
+ clearMainAgentImage: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").ClearMainAgentImageInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").ClearMainAgentImageAction;
35
+ addProfile: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").AddProfileInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").AddProfileAction;
36
+ updateProfile: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").UpdateProfileInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").UpdateProfileAction;
37
+ removeProfile: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").RemoveProfileInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").RemoveProfileAction;
38
+ reorderProfiles: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").ReorderProfilesInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").ReorderProfilesAction;
39
+ addModel: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").AddModelInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").AddModelAction;
40
+ removeModel: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").RemoveModelInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").RemoveModelAction;
41
+ enableMastra: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").EnableMastraInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").EnableMastraAction;
42
+ disableMastra: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").DisableMastraInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").DisableMastraAction;
43
+ setEnableChat: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetEnableChatInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetEnableChatAction;
44
+ addSupportedResource: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").AddSupportedResourceInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").AddSupportedResourceAction;
45
+ removeSupportedResource: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").RemoveSupportedResourceInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").RemoveSupportedResourceAction;
46
+ setProxyEnabled: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetProxyEnabledInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetProxyEnabledAction;
47
+ setObservabilityEnabled: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetObservabilityEnabledInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetObservabilityEnabledAction;
48
+ importSpec: (input: ImportSpecInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").ImportSpecAction;
49
+ bumpVersion: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").BumpVersionInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").BumpVersionAction;
50
+ publishDev: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").PublishDevInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").PublishDevAction;
51
+ publishStaging: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").PublishStagingInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").PublishStagingAction;
52
+ publishProduction: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").PublishProductionInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").PublishProductionAction;
53
+ setPublishStatus: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetPublishStatusInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetPublishStatusAction;
54
+ addExternalSkill: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").AddExternalSkillInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").AddExternalSkillAction;
55
+ removeExternalSkill: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").RemoveExternalSkillInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").RemoveExternalSkillAction;
56
+ setExternalSkillName: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetExternalSkillNameInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetExternalSkillNameAction;
57
+ setExternalSkillGithubUrl: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetExternalSkillGithubUrlInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetExternalSkillGithubUrlAction;
58
+ addPowerhousePackage: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").AddPowerhousePackageInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").AddPowerhousePackageAction;
59
+ removePowerhousePackage: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").RemovePowerhousePackageInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").RemovePowerhousePackageAction;
60
+ addPackageDocumentType: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").AddPackageDocumentTypeInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").AddPackageDocumentTypeAction;
61
+ removePackageDocumentType: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").RemovePackageDocumentTypeInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").RemovePackageDocumentTypeAction;
62
+ setPackageVersion: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetPackageVersionInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetPackageVersionAction;
63
+ enableRoutine: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").EnableRoutineInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").EnableRoutineAction;
64
+ disableRoutine: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").DisableRoutineInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").DisableRoutineAction;
65
+ setPowerhouseLevel: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetPowerhouseLevelInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetPowerhouseLevelAction;
66
+ setDescription: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetDescriptionInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetDescriptionAction;
67
+ setVersion: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetVersionInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetVersionAction;
68
+ setPackageIdentifier: (input: import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetPackageIdentifierInput) => import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").SetPackageIdentifierAction;
30
69
  setName: (name: string | {
31
70
  name: string;
32
71
  }) => import("document-model").SetNameAction;
72
+ setPreferredEditor: (input: string | null | {
73
+ preferredEditor: string | null;
74
+ }) => import("document-model").SetPreferredEditorAction;
33
75
  undo: (count?: number, scope?: string) => import("document-model").UndoAction;
34
76
  redo: (count?: number, scope?: string) => import("document-model").RedoAction;
35
77
  prune: (start?: number, end?: number, scope?: string) => import("document-model").SchemaPruneAction;
@@ -38,6 +80,6 @@ export declare const specChangeTrigger: import("@powerhousedao/ph-clint").Trigge
38
80
  }, operations: number) => import("document-model").LoadStateAction;
39
81
  noop: (scope?: string) => import("document-model").NOOPAction;
40
82
  };
41
- readonly utils: import("document-model").DocumentModelUtils<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>;
83
+ readonly utils: import("document-model").DocumentModelUtils<import("@powerhousedao/ph-clint-app/document-models/ph-clint-project").PhClintProjectPHState>;
42
84
  readonly documentModel: import("document-model").DocumentModelPHState;
43
85
  }]>>;