@soleri/cli 9.12.1 → 9.13.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.
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* from usage, not configured upfront.
|
|
7
7
|
*/
|
|
8
8
|
import * as p from '@clack/prompts';
|
|
9
|
-
import { ITALIAN_CRAFTSPERSON } from '@soleri/core/personas';
|
|
9
|
+
import { ITALIAN_CRAFTSPERSON, NEUTRAL_PERSONA } from '@soleri/core/personas';
|
|
10
10
|
import { isGhInstalled } from '../utils/git.js';
|
|
11
11
|
/** Slugify a display name into a kebab-case ID. */
|
|
12
12
|
function slugify(name) {
|
|
@@ -47,51 +47,17 @@ export async function runCreateWizard(initialName) {
|
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
value: 'custom',
|
|
50
|
-
label: '
|
|
51
|
-
hint: '
|
|
50
|
+
label: 'Custom (editable neutral persona)',
|
|
51
|
+
hint: 'Full persona file — customize later via agent.yaml',
|
|
52
52
|
},
|
|
53
53
|
],
|
|
54
54
|
});
|
|
55
55
|
if (p.isCancel(personaChoice))
|
|
56
56
|
return null;
|
|
57
|
-
let personaDescription;
|
|
58
|
-
if (personaChoice === 'custom') {
|
|
59
|
-
const desc = (await p.text({
|
|
60
|
-
message: "Describe your agent's personality (we'll generate the persona from this)",
|
|
61
|
-
placeholder: 'A calm Japanese sensei who speaks in zen metaphors and values harmony in code',
|
|
62
|
-
validate: (v) => {
|
|
63
|
-
if (!v || v.trim().length < 10)
|
|
64
|
-
return 'Give at least a brief description (10+ chars)';
|
|
65
|
-
if (v.length > 500)
|
|
66
|
-
return 'Max 500 characters';
|
|
67
|
-
},
|
|
68
|
-
}));
|
|
69
|
-
if (p.isCancel(desc))
|
|
70
|
-
return null;
|
|
71
|
-
personaDescription = desc;
|
|
72
|
-
}
|
|
73
57
|
// ─── Build config ───────────────────────────────────────────
|
|
74
|
-
const persona =
|
|
75
|
-
? {
|
|
76
|
-
|
|
77
|
-
name: name.trim(),
|
|
78
|
-
voice: personaDescription,
|
|
79
|
-
// Custom personas start with minimal config — the LLM enriches from the voice description
|
|
80
|
-
inspiration: '',
|
|
81
|
-
culture: '',
|
|
82
|
-
metaphors: [],
|
|
83
|
-
traits: [],
|
|
84
|
-
quirks: [],
|
|
85
|
-
opinions: [],
|
|
86
|
-
greetings: [`Hello! I'm ${name.trim()}. What are we working on?`],
|
|
87
|
-
signoffs: ['Until next time!'],
|
|
88
|
-
languageRule: "Speak the user's language naturally.",
|
|
89
|
-
nameRule: 'Adapt to name changes but keep character intact.',
|
|
90
|
-
}
|
|
91
|
-
: {
|
|
92
|
-
...ITALIAN_CRAFTSPERSON,
|
|
93
|
-
name: name.trim(),
|
|
94
|
-
};
|
|
58
|
+
const persona = personaChoice === 'custom'
|
|
59
|
+
? { ...NEUTRAL_PERSONA, name: name.trim() }
|
|
60
|
+
: { ...ITALIAN_CRAFTSPERSON, name: name.trim() };
|
|
95
61
|
const greeting = persona.greetings[0] ?? `Ciao! I'm ${name.trim()}. What are we working on?`;
|
|
96
62
|
// Summary
|
|
97
63
|
p.note([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-wizard.js","sourceRoot":"","sources":["../../src/prompts/create-wizard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAEpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"create-wizard.js","sourceRoot":"","sources":["../../src/prompts/create-wizard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAEpC,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAkBhD,mDAAmD;AACnD,SAAS,OAAO,CAAC,IAAY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oBAC7B,OAAO,EAAE,wBAAwB;oBACjC,WAAW,EAAE,kCAAkC;oBAC/C,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;wBACd,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC;4BAAE,OAAO,iBAAiB,CAAC;wBAC1D,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC;4BACpD,OAAO,sCAAsC,CAAC;oBAClD,CAAC;iBACF,CAAC,CAAC;gBAEH,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC;oBAAE,OAAO,IAAI,CAAC;gBAEvC,GAAG,CAAC,MAAM,GAAG;oBACX,IAAI,EAAE,QAAQ;oBACd,GAAG,EAAG,SAAoB,CAAC,IAAI,EAAE;iBAClC,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO;QACL,MAAM,EAAE;YACN,EAAE;YACF,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE;YACjB,IAAI,EAAE,2DAA2D;YACjE,WAAW,EACT,gHAAgH;YAClH,OAAO,EAAE,EAAE;YACX,UAAU,EAAE,EAAE;YACd,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,QAAQ;YACR,OAAO;SACY;QACrB,GAAG;KACJ,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as p from '@clack/prompts';
|
|
9
9
|
import type { AgentConfigInput } from '@soleri/forge/lib';
|
|
10
|
-
import { ITALIAN_CRAFTSPERSON } from '@soleri/core/personas';
|
|
10
|
+
import { ITALIAN_CRAFTSPERSON, NEUTRAL_PERSONA } from '@soleri/core/personas';
|
|
11
11
|
import { isGhInstalled } from '../utils/git.js';
|
|
12
12
|
|
|
13
13
|
/** Git configuration collected from the wizard. */
|
|
@@ -67,52 +67,19 @@ export async function runCreateWizard(initialName?: string): Promise<CreateWizar
|
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
value: 'custom',
|
|
70
|
-
label: '
|
|
71
|
-
hint: '
|
|
70
|
+
label: 'Custom (editable neutral persona)',
|
|
71
|
+
hint: 'Full persona file — customize later via agent.yaml',
|
|
72
72
|
},
|
|
73
73
|
],
|
|
74
74
|
});
|
|
75
75
|
|
|
76
76
|
if (p.isCancel(personaChoice)) return null;
|
|
77
77
|
|
|
78
|
-
let personaDescription: string | undefined;
|
|
79
|
-
|
|
80
|
-
if (personaChoice === 'custom') {
|
|
81
|
-
const desc = (await p.text({
|
|
82
|
-
message: "Describe your agent's personality (we'll generate the persona from this)",
|
|
83
|
-
placeholder: 'A calm Japanese sensei who speaks in zen metaphors and values harmony in code',
|
|
84
|
-
validate: (v) => {
|
|
85
|
-
if (!v || v.trim().length < 10) return 'Give at least a brief description (10+ chars)';
|
|
86
|
-
if (v.length > 500) return 'Max 500 characters';
|
|
87
|
-
},
|
|
88
|
-
})) as string;
|
|
89
|
-
|
|
90
|
-
if (p.isCancel(desc)) return null;
|
|
91
|
-
personaDescription = desc;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
78
|
// ─── Build config ───────────────────────────────────────────
|
|
95
|
-
const persona =
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
voice: personaDescription,
|
|
100
|
-
// Custom personas start with minimal config — the LLM enriches from the voice description
|
|
101
|
-
inspiration: '',
|
|
102
|
-
culture: '',
|
|
103
|
-
metaphors: [] as string[],
|
|
104
|
-
traits: [] as string[],
|
|
105
|
-
quirks: [] as string[],
|
|
106
|
-
opinions: [] as string[],
|
|
107
|
-
greetings: [`Hello! I'm ${name.trim()}. What are we working on?`],
|
|
108
|
-
signoffs: ['Until next time!'],
|
|
109
|
-
languageRule: "Speak the user's language naturally.",
|
|
110
|
-
nameRule: 'Adapt to name changes but keep character intact.',
|
|
111
|
-
}
|
|
112
|
-
: {
|
|
113
|
-
...ITALIAN_CRAFTSPERSON,
|
|
114
|
-
name: name.trim(),
|
|
115
|
-
};
|
|
79
|
+
const persona =
|
|
80
|
+
personaChoice === 'custom'
|
|
81
|
+
? { ...NEUTRAL_PERSONA, name: name.trim() }
|
|
82
|
+
: { ...ITALIAN_CRAFTSPERSON, name: name.trim() };
|
|
116
83
|
|
|
117
84
|
const greeting = persona.greetings[0] ?? `Ciao! I'm ${name.trim()}. What are we working on?`;
|
|
118
85
|
|