@powerhousedao/ph-clint-cli 0.1.0-dev.27 → 0.1.0-dev.29

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.
@@ -100,6 +100,10 @@ export function buildCliTs(spec) {
100
100
  lines.push(' // @clint:begin events');
101
101
  lines.push(' events: {},');
102
102
  lines.push(' // @clint:end events');
103
+ if (spec.deployment.serviceAnnouncement) {
104
+ lines.push('');
105
+ lines.push(' serviceAnnouncement: { enabled: true },');
106
+ }
103
107
  lines.push('');
104
108
  lines.push(' // @clint:begin interactive');
105
109
  lines.push(' interactive: {');
@@ -20,6 +20,7 @@ import { buildAgentTs } from './agent-ts.js';
20
20
  import { buildDemoAgentTs } from './demo-agent-ts.js';
21
21
  import { buildFrameworkGenTs } from './framework-gen-ts.js';
22
22
  import { buildFrameworkTs } from './framework-ts.js';
23
+ import { buildManifestJson } from './manifest-json.js';
23
24
  import { type ClintProjectSpec } from '../../spec/types.js';
24
25
  /**
25
26
  * A spec-driven file builder. Returns `null` from `build` to indicate the
@@ -43,7 +44,7 @@ export interface FileBuilder {
43
44
  */
44
45
  export declare function getProfileFileBuilders(spec: ClintProjectSpec): FileBuilder[];
45
46
  export declare const CLI_FILE_BUILDERS: FileBuilder[];
46
- export { buildCliPackageJson, buildCliTs, buildConfigTs, buildMainTs, buildTsconfigJson, buildJestConfigJs, buildEslintConfigJs, buildGitignore, buildMastraIndexTs, buildBuildSkillsScript, buildAgentBaseMd, buildAgentTs, buildDemoAgentTs, buildFrameworkGenTs, buildFrameworkTs, };
47
+ export { buildCliPackageJson, buildCliTs, buildConfigTs, buildMainTs, buildTsconfigJson, buildJestConfigJs, buildEslintConfigJs, buildGitignore, buildMastraIndexTs, buildBuildSkillsScript, buildAgentBaseMd, buildAgentTs, buildDemoAgentTs, buildFrameworkGenTs, buildFrameworkTs, buildManifestJson, };
47
48
  export { buildRootPackageJson } from './root-package-json.js';
48
49
  export { buildPublishConfigTs } from './publish-config-ts.js';
49
50
  export { buildReadme } from './readme-md.js';
@@ -20,6 +20,7 @@ import { buildAgentTs } from './agent-ts.js';
20
20
  import { buildDemoAgentTs } from './demo-agent-ts.js';
21
21
  import { buildFrameworkGenTs } from './framework-gen-ts.js';
22
22
  import { buildFrameworkTs } from './framework-ts.js';
23
+ import { buildManifestJson } from './manifest-json.js';
23
24
  /**
24
25
  * Generate dynamic file builders for agent profile markdown files.
25
26
  * One file per profile in `prompts/agent-profiles/{id}.md`.
@@ -34,6 +35,7 @@ export function getProfileFileBuilders(spec) {
34
35
  }));
35
36
  }
36
37
  export const CLI_FILE_BUILDERS = [
38
+ { relativePath: 'powerhouse.manifest.json', build: buildManifestJson },
37
39
  { relativePath: 'package.json', build: buildCliPackageJson },
38
40
  { relativePath: 'tsconfig.json', build: () => buildTsconfigJson() },
39
41
  { relativePath: 'jest.config.js', build: () => buildJestConfigJs() },
@@ -75,7 +77,7 @@ export const CLI_FILE_BUILDERS = [
75
77
  { relativePath: 'prompts/skills-ext/.gitkeep', build: () => '' },
76
78
  { relativePath: 'tests/.gitkeep', build: () => '' },
77
79
  ];
78
- export { buildCliPackageJson, buildCliTs, buildConfigTs, buildMainTs, buildTsconfigJson, buildJestConfigJs, buildEslintConfigJs, buildGitignore, buildMastraIndexTs, buildBuildSkillsScript, buildAgentBaseMd, buildAgentTs, buildDemoAgentTs, buildFrameworkGenTs, buildFrameworkTs, };
80
+ export { buildCliPackageJson, buildCliTs, buildConfigTs, buildMainTs, buildTsconfigJson, buildJestConfigJs, buildEslintConfigJs, buildGitignore, buildMastraIndexTs, buildBuildSkillsScript, buildAgentBaseMd, buildAgentTs, buildDemoAgentTs, buildFrameworkGenTs, buildFrameworkTs, buildManifestJson, };
79
81
  export { buildRootPackageJson } from './root-package-json.js';
80
82
  export { buildPublishConfigTs } from './publish-config-ts.js';
81
83
  export { buildReadme } from './readme-md.js';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Builds `powerhouse.manifest.json` — a machine-readable manifest describing
3
+ * the CLI project's capabilities for service discovery and deployment.
4
+ */
5
+ import { type ClintProjectSpec } from '../../spec/types.js';
6
+ export declare function buildManifestJson(spec: ClintProjectSpec): string;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Builds `powerhouse.manifest.json` — a machine-readable manifest describing
3
+ * the CLI project's capabilities for service discovery and deployment.
4
+ */
5
+ import { getBinName, getAppPackageName, phAtLeast, } from '../../spec/types.js';
6
+ export function buildManifestJson(spec) {
7
+ const { mastra, powerhouse } = spec.features;
8
+ const agent = mastra.enabled
9
+ ? {
10
+ id: mastra.agentId ?? spec.name,
11
+ name: mastra.agentName ?? spec.name,
12
+ description: mastra.agentDescription ?? null,
13
+ image: mastra.agentImage ?? null,
14
+ models: mastra.models.map((m) => ({ id: m.id, default: m.isDefault })),
15
+ }
16
+ : false;
17
+ const ph = phAtLeast(powerhouse, 'Reactor')
18
+ ? {
19
+ support: powerhouse,
20
+ package: getAppPackageName(spec),
21
+ }
22
+ : false;
23
+ const manifest = {
24
+ type: 'clint-project',
25
+ features: { agent, powerhouse: ph },
26
+ serviceCommand: getBinName(spec),
27
+ serviceAnnouncement: spec.deployment.serviceAnnouncement,
28
+ supportedResources: spec.deployment.supportedResources,
29
+ };
30
+ return JSON.stringify(manifest, null, 2) + '\n';
31
+ }
@@ -40,6 +40,8 @@ export declare const init: import("@powerhousedao/ph-clint").Command<z.ZodObject
40
40
  enabled: boolean;
41
41
  agentId: string | null;
42
42
  agentName: string | null;
43
+ agentDescription: string | null;
44
+ agentImage: string | null;
43
45
  models: {
44
46
  id: string;
45
47
  isDefault: boolean;
@@ -64,6 +66,10 @@ export declare const init: import("@powerhousedao/ph-clint").Command<z.ZodObject
64
66
  name: string;
65
67
  githubUrl: string;
66
68
  }[];
69
+ deployment: {
70
+ serviceAnnouncement: boolean;
71
+ supportedResources: string[];
72
+ };
67
73
  scope?: string | undefined;
68
74
  bin?: string | undefined;
69
75
  documentId?: string | undefined;
@@ -29,6 +29,10 @@ export function specFromDocumentState(state, meta) {
29
29
  name: s.name,
30
30
  githubUrl: s.githubUrl,
31
31
  })),
32
+ deployment: {
33
+ serviceAnnouncement: state.deployment.serviceAnnouncement,
34
+ supportedResources: [...state.deployment.supportedResources],
35
+ },
32
36
  documentId: meta?.documentId,
33
37
  documentType: meta?.documentType,
34
38
  });
@@ -63,6 +63,8 @@ export declare const clintProjectSpecSchema: z.ZodObject<{
63
63
  enabled: z.ZodDefault<z.ZodBoolean>;
64
64
  agentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
65
65
  agentName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
66
+ agentDescription: z.ZodDefault<z.ZodNullable<z.ZodString>>;
67
+ agentImage: z.ZodDefault<z.ZodNullable<z.ZodString>>;
66
68
  models: z.ZodDefault<z.ZodArray<z.ZodObject<{
67
69
  id: z.ZodString;
68
70
  isDefault: z.ZodBoolean;
@@ -87,6 +89,10 @@ export declare const clintProjectSpecSchema: z.ZodObject<{
87
89
  name: z.ZodString;
88
90
  githubUrl: z.ZodString;
89
91
  }, z.core.$strip>>>;
92
+ deployment: z.ZodDefault<z.ZodObject<{
93
+ serviceAnnouncement: z.ZodDefault<z.ZodBoolean>;
94
+ supportedResources: z.ZodDefault<z.ZodArray<z.ZodString>>;
95
+ }, z.core.$strip>>;
90
96
  documentId: z.ZodOptional<z.ZodString>;
91
97
  documentType: z.ZodOptional<z.ZodString>;
92
98
  }, z.core.$strip>;
@@ -39,6 +39,8 @@ const mastraFeatureSchema = z.object({
39
39
  enabled: z.boolean().default(false),
40
40
  agentId: z.string().nullable().default(null),
41
41
  agentName: z.string().nullable().default(null),
42
+ agentDescription: z.string().nullable().default(null),
43
+ agentImage: z.string().nullable().default(null),
42
44
  models: z.array(agentModelSchema).default([]),
43
45
  profiles: z.array(agentProfileSchema).default([]),
44
46
  });
@@ -49,6 +51,8 @@ const DEFAULT_MASTRA = {
49
51
  enabled: false,
50
52
  agentId: null,
51
53
  agentName: null,
54
+ agentDescription: null,
55
+ agentImage: null,
52
56
  models: [],
53
57
  profiles: [],
54
58
  };
@@ -98,6 +102,10 @@ export const clintProjectSpecSchema = z.object({
98
102
  * (kebab-case) and a GitHub URL for installation.
99
103
  */
100
104
  externalSkills: z.array(externalSkillSchema).default([]),
105
+ deployment: z.object({
106
+ serviceAnnouncement: z.boolean().default(false),
107
+ supportedResources: z.array(z.string()).default([]),
108
+ }).default({ serviceAnnouncement: false, supportedResources: [] }),
101
109
  /** ID of the source specification document (if backed by a Powerhouse document). */
102
110
  documentId: z.string().optional(),
103
111
  /** Document type of the source specification document. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerhousedao/ph-clint-cli",
3
- "version": "0.1.0-dev.27",
3
+ "version": "0.1.0-dev.29",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -29,9 +29,9 @@
29
29
  "@mastra/core": "^1.22.0",
30
30
  "@mastra/libsql": "^1.7.4",
31
31
  "@mastra/memory": "^1.13.1",
32
- "@powerhousedao/ph-clint": "^0.1.0-dev.27",
33
- "@powerhousedao/ph-clint-app": "^0.1.0-dev.27",
34
- "@powerhousedao/ph-clint-dev": "^0.1.0-dev.27",
32
+ "@powerhousedao/ph-clint": "^0.1.0-dev.29",
33
+ "@powerhousedao/ph-clint-app": "^0.1.0-dev.29",
34
+ "@powerhousedao/ph-clint-dev": "^0.1.0-dev.29",
35
35
  "@powerhousedao/reactor": "6.0.0-dev.170",
36
36
  "@powerhousedao/reactor-api": "6.0.0-dev.170",
37
37
  "@powerhousedao/shared": "6.0.0-dev.170",