@powerhousedao/ph-clint-cli 0.0.1
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 +122 -0
- package/dist/codegen/index.d.ts +11 -0
- package/dist/codegen/index.js +11 -0
- package/dist/commands/clint-project-build.d.ts +83 -0
- package/dist/commands/clint-project-build.js +34 -0
- package/dist/commands/clint-project-init.d.ts +177 -0
- package/dist/commands/clint-project-init.js +193 -0
- package/dist/commands/clint-project-publish.d.ts +92 -0
- package/dist/commands/clint-project-publish.js +73 -0
- package/dist/commands/clint-project-regen.d.ts +94 -0
- package/dist/commands/clint-project-regen.js +92 -0
- package/dist/commands/clint-skills-sync.d.ts +86 -0
- package/dist/commands/clint-skills-sync.js +56 -0
- package/dist/config.d.ts +3 -0
- package/dist/config.js +5 -0
- package/dist/framework.d.ts +501 -0
- package/dist/framework.gen.d.ts +77 -0
- package/dist/framework.gen.js +16 -0
- package/dist/framework.js +37 -0
- package/dist/gen/agent-profiles/PhClintDevAgent.md +13 -0
- package/dist/gen/skills/cli-setup/.cli-docs.md +135 -0
- package/dist/gen/skills/cli-setup/SKILL.md +125 -0
- package/dist/gen/skills/cli-setup/references/00.assess-cli-needs.md +53 -0
- package/dist/gen/skills/cli-setup/references/01.define-config-schema.md +78 -0
- package/dist/gen/skills/cli-setup/references/02.wire-cli.md +141 -0
- package/dist/gen/skills/cli-setup/references/03.add-entrypoint.md +128 -0
- package/dist/gen/skills/cli-setup/references/expected-outcome.md +3 -0
- package/dist/gen/skills/command-definition/.cli-docs.md +84 -0
- package/dist/gen/skills/command-definition/SKILL.md +99 -0
- package/dist/gen/skills/command-definition/references/00.assess-requirements.md +58 -0
- package/dist/gen/skills/command-definition/references/01.define-schema.md +72 -0
- package/dist/gen/skills/command-definition/references/02.implement-execute.md +118 -0
- package/dist/gen/skills/command-definition/references/03.add-prompting.md +54 -0
- package/dist/gen/skills/command-definition/references/expected-outcome.md +3 -0
- package/dist/gen/skills/service-definition/.cli-docs.md +214 -0
- package/dist/gen/skills/service-definition/SKILL.md +148 -0
- package/dist/gen/skills/service-definition/references/00.assess-service.md +69 -0
- package/dist/gen/skills/service-definition/references/01.define-service.md +166 -0
- package/dist/gen/skills/service-definition/references/02.add-preflight.md +132 -0
- package/dist/gen/skills/service-definition/references/03.add-project-scanner.md +82 -0
- package/dist/gen/skills/service-definition/references/04.wire-events.md +120 -0
- package/dist/gen/skills/service-definition/references/expected-outcome.md +3 -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/services/clint-project.d.ts +1 -0
- package/dist/services/clint-project.js +68 -0
- package/dist/spec/ensure-document.d.ts +17 -0
- package/dist/spec/ensure-document.js +56 -0
- package/dist/spec/file.d.ts +1 -0
- package/dist/spec/file.js +1 -0
- package/dist/spec/from-document.d.ts +21 -0
- package/dist/spec/from-document.js +18 -0
- package/dist/spec/types.d.ts +1 -0
- package/dist/spec/types.js +1 -0
- package/dist/triggers/publish-trigger.d.ts +81 -0
- package/dist/triggers/publish-trigger.js +137 -0
- package/dist/triggers/spec-change.d.ts +85 -0
- package/dist/triggers/spec-change.js +224 -0
- package/package.json +54 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const skillsSync: import("@powerhousedao/ph-clint").Command<z.ZodObject<{
|
|
3
|
+
dir: z.ZodOptional<z.ZodString>;
|
|
4
|
+
}, z.core.$strip>, {
|
|
5
|
+
text: string;
|
|
6
|
+
data?: undefined;
|
|
7
|
+
} | {
|
|
8
|
+
text: string;
|
|
9
|
+
data: import("@powerhousedao/ph-clint-dev/skills/sync").SyncResult;
|
|
10
|
+
}, {
|
|
11
|
+
model: string;
|
|
12
|
+
devServicePort: number;
|
|
13
|
+
phVersion: string;
|
|
14
|
+
apiKey?: string | undefined;
|
|
15
|
+
}, import("@powerhousedao/ph-clint").InferRegistry<readonly [{
|
|
16
|
+
readonly version: 1;
|
|
17
|
+
readonly reducer: import("document-model").Reducer<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>;
|
|
18
|
+
readonly actions: {
|
|
19
|
+
setAgentModel: (input: import("@powerhousedao/ph-clint-app").SetAgentModelInput) => import("@powerhousedao/ph-clint-app").SetAgentModelAction;
|
|
20
|
+
addAgentProfileRef: (input: import("@powerhousedao/ph-clint-app").AddAgentProfileRefInput) => import("@powerhousedao/ph-clint-app").AddAgentProfileRefAction;
|
|
21
|
+
removeAgentProfileRef: (input: import("@powerhousedao/ph-clint-app").RemoveAgentProfileRefInput) => import("@powerhousedao/ph-clint-app").RemoveAgentProfileRefAction;
|
|
22
|
+
reorderAgentProfileRefs: (input: import("@powerhousedao/ph-clint-app").ReorderAgentProfileRefsInput) => import("@powerhousedao/ph-clint-app").ReorderAgentProfileRefsAction;
|
|
23
|
+
addAgentSkill: (input: import("@powerhousedao/ph-clint-app").AddAgentSkillInput) => import("@powerhousedao/ph-clint-app").AddAgentSkillAction;
|
|
24
|
+
removeAgentSkill: (input: import("@powerhousedao/ph-clint-app").RemoveAgentSkillInput) => import("@powerhousedao/ph-clint-app").RemoveAgentSkillAction;
|
|
25
|
+
addAgentToolPattern: (input: import("@powerhousedao/ph-clint-app").AddAgentToolPatternInput) => import("@powerhousedao/ph-clint-app").AddAgentToolPatternAction;
|
|
26
|
+
removeAgentToolPattern: (input: import("@powerhousedao/ph-clint-app").RemoveAgentToolPatternInput) => import("@powerhousedao/ph-clint-app").RemoveAgentToolPatternAction;
|
|
27
|
+
addSubAgent: (input: import("@powerhousedao/ph-clint-app").AddSubAgentInput) => import("@powerhousedao/ph-clint-app").AddSubAgentAction;
|
|
28
|
+
removeSubAgent: (input: import("@powerhousedao/ph-clint-app").RemoveSubAgentInput) => import("@powerhousedao/ph-clint-app").RemoveSubAgentAction;
|
|
29
|
+
setSubAgentName: (input: import("@powerhousedao/ph-clint-app").SetSubAgentNameInput) => import("@powerhousedao/ph-clint-app").SetSubAgentNameAction;
|
|
30
|
+
setSubAgentDescription: (input: import("@powerhousedao/ph-clint-app").SetSubAgentDescriptionInput) => import("@powerhousedao/ph-clint-app").SetSubAgentDescriptionAction;
|
|
31
|
+
setMainAgentName: (input: import("@powerhousedao/ph-clint-app").SetMainAgentNameInput) => import("@powerhousedao/ph-clint-app").SetMainAgentNameAction;
|
|
32
|
+
setMainAgentDescription: (input: import("@powerhousedao/ph-clint-app").SetMainAgentDescriptionInput) => import("@powerhousedao/ph-clint-app").SetMainAgentDescriptionAction;
|
|
33
|
+
clearMainAgentDescription: (input: import("@powerhousedao/ph-clint-app").ClearMainAgentDescriptionInput) => import("@powerhousedao/ph-clint-app").ClearMainAgentDescriptionAction;
|
|
34
|
+
setMainAgentImage: (input: import("@powerhousedao/ph-clint-app").SetMainAgentImageInput) => import("@powerhousedao/ph-clint-app").SetMainAgentImageAction;
|
|
35
|
+
clearMainAgentImage: (input: import("@powerhousedao/ph-clint-app").ClearMainAgentImageInput) => import("@powerhousedao/ph-clint-app").ClearMainAgentImageAction;
|
|
36
|
+
addProfile: (input: import("@powerhousedao/ph-clint-app").AddProfileInput) => import("@powerhousedao/ph-clint-app").AddProfileAction;
|
|
37
|
+
updateProfile: (input: import("@powerhousedao/ph-clint-app").UpdateProfileInput) => import("@powerhousedao/ph-clint-app").UpdateProfileAction;
|
|
38
|
+
removeProfile: (input: import("@powerhousedao/ph-clint-app").RemoveProfileInput) => import("@powerhousedao/ph-clint-app").RemoveProfileAction;
|
|
39
|
+
reorderProfiles: (input: import("@powerhousedao/ph-clint-app").ReorderProfilesInput) => import("@powerhousedao/ph-clint-app").ReorderProfilesAction;
|
|
40
|
+
addModel: (input: import("@powerhousedao/ph-clint-app").AddModelInput) => import("@powerhousedao/ph-clint-app").AddModelAction;
|
|
41
|
+
removeModel: (input: import("@powerhousedao/ph-clint-app").RemoveModelInput) => import("@powerhousedao/ph-clint-app").RemoveModelAction;
|
|
42
|
+
enableMastra: (input: import("@powerhousedao/ph-clint-app").EnableMastraInput) => import("@powerhousedao/ph-clint-app").EnableMastraAction;
|
|
43
|
+
disableMastra: (input: import("@powerhousedao/ph-clint-app").DisableMastraInput) => import("@powerhousedao/ph-clint-app").DisableMastraAction;
|
|
44
|
+
setEnableChat: (input: import("@powerhousedao/ph-clint-app").SetEnableChatInput) => import("@powerhousedao/ph-clint-app").SetEnableChatAction;
|
|
45
|
+
addSupportedResource: (input: import("@powerhousedao/ph-clint-app").AddSupportedResourceInput) => import("@powerhousedao/ph-clint-app").AddSupportedResourceAction;
|
|
46
|
+
removeSupportedResource: (input: import("@powerhousedao/ph-clint-app").RemoveSupportedResourceInput) => import("@powerhousedao/ph-clint-app").RemoveSupportedResourceAction;
|
|
47
|
+
setProxyEnabled: (input: import("@powerhousedao/ph-clint-app").SetProxyEnabledInput) => import("@powerhousedao/ph-clint-app").SetProxyEnabledAction;
|
|
48
|
+
setObservabilityEnabled: (input: import("@powerhousedao/ph-clint-app").SetObservabilityEnabledInput) => import("@powerhousedao/ph-clint-app").SetObservabilityEnabledAction;
|
|
49
|
+
importSpec: (input: import("@powerhousedao/ph-clint-app").ImportSpecInput) => import("@powerhousedao/ph-clint-app").ImportSpecAction;
|
|
50
|
+
bumpVersion: (input: import("@powerhousedao/ph-clint-app").BumpVersionInput) => import("@powerhousedao/ph-clint-app").BumpVersionAction;
|
|
51
|
+
publishDev: (input: import("@powerhousedao/ph-clint-app").PublishDevInput) => import("@powerhousedao/ph-clint-app").PublishDevAction;
|
|
52
|
+
publishStaging: (input: import("@powerhousedao/ph-clint-app").PublishStagingInput) => import("@powerhousedao/ph-clint-app").PublishStagingAction;
|
|
53
|
+
publishProduction: (input: import("@powerhousedao/ph-clint-app").PublishProductionInput) => import("@powerhousedao/ph-clint-app").PublishProductionAction;
|
|
54
|
+
setPublishStatus: (input: import("@powerhousedao/ph-clint-app").SetPublishStatusInput) => import("@powerhousedao/ph-clint-app").SetPublishStatusAction;
|
|
55
|
+
addExternalSkill: (input: import("@powerhousedao/ph-clint-app").AddExternalSkillInput) => import("@powerhousedao/ph-clint-app").AddExternalSkillAction;
|
|
56
|
+
removeExternalSkill: (input: import("@powerhousedao/ph-clint-app").RemoveExternalSkillInput) => import("@powerhousedao/ph-clint-app").RemoveExternalSkillAction;
|
|
57
|
+
setExternalSkillName: (input: import("@powerhousedao/ph-clint-app").SetExternalSkillNameInput) => import("@powerhousedao/ph-clint-app").SetExternalSkillNameAction;
|
|
58
|
+
setExternalSkillGithubUrl: (input: import("@powerhousedao/ph-clint-app").SetExternalSkillGithubUrlInput) => import("@powerhousedao/ph-clint-app").SetExternalSkillGithubUrlAction;
|
|
59
|
+
addPowerhousePackage: (input: import("@powerhousedao/ph-clint-app").AddPowerhousePackageInput) => import("@powerhousedao/ph-clint-app").AddPowerhousePackageAction;
|
|
60
|
+
removePowerhousePackage: (input: import("@powerhousedao/ph-clint-app").RemovePowerhousePackageInput) => import("@powerhousedao/ph-clint-app").RemovePowerhousePackageAction;
|
|
61
|
+
addPackageDocumentType: (input: import("@powerhousedao/ph-clint-app").AddPackageDocumentTypeInput) => import("@powerhousedao/ph-clint-app").AddPackageDocumentTypeAction;
|
|
62
|
+
removePackageDocumentType: (input: import("@powerhousedao/ph-clint-app").RemovePackageDocumentTypeInput) => import("@powerhousedao/ph-clint-app").RemovePackageDocumentTypeAction;
|
|
63
|
+
setPackageVersion: (input: import("@powerhousedao/ph-clint-app").SetPackageVersionInput) => import("@powerhousedao/ph-clint-app").SetPackageVersionAction;
|
|
64
|
+
enableRoutine: (input: import("@powerhousedao/ph-clint-app").EnableRoutineInput) => import("@powerhousedao/ph-clint-app").EnableRoutineAction;
|
|
65
|
+
disableRoutine: (input: import("@powerhousedao/ph-clint-app").DisableRoutineInput) => import("@powerhousedao/ph-clint-app").DisableRoutineAction;
|
|
66
|
+
setPowerhouseLevel: (input: import("@powerhousedao/ph-clint-app").SetPowerhouseLevelInput) => import("@powerhousedao/ph-clint-app").SetPowerhouseLevelAction;
|
|
67
|
+
setDescription: (input: import("@powerhousedao/ph-clint-app").SetDescriptionInput) => import("@powerhousedao/ph-clint-app").SetDescriptionAction;
|
|
68
|
+
setVersion: (input: import("@powerhousedao/ph-clint-app").SetVersionInput) => import("@powerhousedao/ph-clint-app").SetVersionAction;
|
|
69
|
+
setPackageIdentifier: (input: import("@powerhousedao/ph-clint-app").SetPackageIdentifierInput) => import("@powerhousedao/ph-clint-app").SetPackageIdentifierAction;
|
|
70
|
+
setName: (name: string | {
|
|
71
|
+
name: string;
|
|
72
|
+
}) => import("document-model").SetNameAction;
|
|
73
|
+
setPreferredEditor: (input: string | null | {
|
|
74
|
+
preferredEditor: string | null;
|
|
75
|
+
}) => import("document-model").SetPreferredEditorAction;
|
|
76
|
+
undo: (count?: number, scope?: string) => import("document-model").UndoAction;
|
|
77
|
+
redo: (count?: number, scope?: string) => import("document-model").RedoAction;
|
|
78
|
+
prune: (start?: number, end?: number, scope?: string) => import("document-model").SchemaPruneAction;
|
|
79
|
+
loadState: <TState extends import("document-model").PHBaseState = import("document-model").PHBaseState>(state: TState & {
|
|
80
|
+
name: string;
|
|
81
|
+
}, operations: number) => import("document-model").LoadStateAction;
|
|
82
|
+
noop: (scope?: string) => import("document-model").NOOPAction;
|
|
83
|
+
};
|
|
84
|
+
readonly utils: import("document-model").DocumentModelUtils<import("@powerhousedao/ph-clint-app").PhClintProjectPHState>;
|
|
85
|
+
readonly documentModel: import("document-model").DocumentModelPHState;
|
|
86
|
+
}]>>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ph-clint clint-skills-sync` — reconcile external skills on disk to match
|
|
3
|
+
* the project spec. Clones missing skills from GitHub, removes skills no
|
|
4
|
+
* longer referenced, and updates `.skills-manifest.json`.
|
|
5
|
+
*/
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
import { defineCommand } from '../framework.js';
|
|
8
|
+
import { z } from 'zod';
|
|
9
|
+
import { readProjectSpec } from '../spec/file.js';
|
|
10
|
+
import { syncExternalSkills } from '@powerhousedao/ph-clint-dev/skills/sync';
|
|
11
|
+
const inputSchema = z.object({
|
|
12
|
+
dir: z
|
|
13
|
+
.string()
|
|
14
|
+
.optional()
|
|
15
|
+
.describe('Project directory (defaults to the current directory)'),
|
|
16
|
+
});
|
|
17
|
+
export const skillsSync = defineCommand({
|
|
18
|
+
id: 'clint-skills-sync',
|
|
19
|
+
description: 'Synchronise external skills from the project spec',
|
|
20
|
+
inputSchema,
|
|
21
|
+
execute: async (input, { workdir, stdout, log }) => {
|
|
22
|
+
const targetDir = path.resolve(workdir, input.dir ?? '.');
|
|
23
|
+
const spec = await readProjectSpec(targetDir);
|
|
24
|
+
if (!spec) {
|
|
25
|
+
return {
|
|
26
|
+
text: `Error: no spec found at ${targetDir}/.ph/ph-clint-cli/project-spec.json.\n` +
|
|
27
|
+
'Run `ph-clint clint-project-init` first to scaffold a new project.',
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
const result = await syncExternalSkills({
|
|
31
|
+
targetDir,
|
|
32
|
+
desired: spec.externalSkills,
|
|
33
|
+
log: (msg) => {
|
|
34
|
+
if (log)
|
|
35
|
+
log.info(msg);
|
|
36
|
+
else
|
|
37
|
+
stdout(msg + '\n');
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
const lines = [];
|
|
41
|
+
if (result.added.length > 0) {
|
|
42
|
+
lines.push(`Added: ${result.added.join(', ')}`);
|
|
43
|
+
}
|
|
44
|
+
if (result.removed.length > 0) {
|
|
45
|
+
lines.push(`Removed: ${result.removed.join(', ')}`);
|
|
46
|
+
}
|
|
47
|
+
if (result.added.length === 0 && result.removed.length === 0) {
|
|
48
|
+
lines.push('External skills are up to date.');
|
|
49
|
+
}
|
|
50
|
+
stdout(lines.join('\n') + '\n');
|
|
51
|
+
return {
|
|
52
|
+
text: lines.join('\n'),
|
|
53
|
+
data: result,
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
});
|
package/dist/config.d.ts
ADDED