@powerhousedao/ph-clint-cli 0.1.0-dev.50 → 0.1.0-dev.51

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.
@@ -49,29 +49,33 @@ const inputSchema = z.object({
49
49
  .default(false)
50
50
  .describe('Do not run `pnpm install` after scaffolding'),
51
51
  });
52
- /** Parse `@scope/name` into { scope, name }. */
52
+ /** Parse `@scope/name` into { scope, name }. Auto-appends `-cli` if missing. */
53
53
  function splitPackageName(raw) {
54
54
  const match = /^@([a-z0-9][a-z0-9-]*)\/([a-z0-9][a-z0-9-]*)$/.exec(raw);
55
- if (match)
56
- return { scope: `@${match[1]}`, name: match[2] };
55
+ if (match) {
56
+ const name = match[2].endsWith('-cli') ? match[2] : `${match[2]}-cli`;
57
+ return { scope: `@${match[1]}`, name };
58
+ }
57
59
  if (raw.startsWith('@')) {
58
60
  throw new Error(`invalid package name "${raw}" — expected "@scope/name" with lowercase letters, digits, hyphens`);
59
61
  }
60
62
  if (!/^[a-z0-9][a-z0-9-]*$/.test(raw)) {
61
63
  throw new Error(`invalid project name "${raw}" — expected lowercase letters, digits, hyphens`);
62
64
  }
63
- return { name: raw };
65
+ const name = raw.endsWith('-cli') ? raw : `${raw}-cli`;
66
+ return { name };
64
67
  }
65
68
  export function buildSpec(input) {
66
69
  const { scope, name } = splitPackageName(input.name);
67
70
  // Routine is forced on when Mastra is on — the REPL-only path works, but
68
71
  // the agent routine loop is what most users actually want.
69
72
  const routine = input.enableRoutine || input.enableMastra;
73
+ const baseName = name.replace(/-cli$/, '');
70
74
  const mastra = input.enableMastra
71
75
  ? {
72
76
  enabled: true,
73
- agentId: `${name}-agent`,
74
- agentName: `${name.charAt(0).toUpperCase()}${name.slice(1).replace(/-(\w)/g, (_, c) => ' ' + c.toUpperCase())} Agent`,
77
+ agentId: `${baseName}-agent`,
78
+ agentName: `${baseName.charAt(0).toUpperCase()}${baseName.slice(1).replace(/-(\w)/g, (_, c) => ' ' + c.toUpperCase())} Agent`,
75
79
  models: [{ id: 'anthropic/claude-sonnet-4-5', isDefault: true }],
76
80
  profiles: [{ id: 'base', title: 'Base', content: 'You are a helpful assistant.' }],
77
81
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerhousedao/ph-clint-cli",
3
- "version": "0.1.0-dev.50",
3
+ "version": "0.1.0-dev.51",
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.50",
33
- "@powerhousedao/ph-clint-app": "^0.1.0-dev.50",
34
- "@powerhousedao/ph-clint-dev": "^0.1.0-dev.50",
32
+ "@powerhousedao/ph-clint": "^0.1.0-dev.51",
33
+ "@powerhousedao/ph-clint-app": "^0.1.0-dev.51",
34
+ "@powerhousedao/ph-clint-dev": "^0.1.0-dev.51",
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",