@askexenow/exe-os 0.8.12 → 0.8.13
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/dist/bin/cli.js +14 -6
- package/dist/bin/exe-call.js +11 -3
- package/dist/bin/exe-new-employee.js +6 -0
- package/dist/bin/setup.js +12 -4
- package/dist/lib/employee-templates.js +6 -0
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
|
@@ -3713,6 +3713,7 @@ __export(employee_templates_exports, {
|
|
|
3713
3713
|
buildCustomEmployeePrompt: () => buildCustomEmployeePrompt,
|
|
3714
3714
|
getSessionPrompt: () => getSessionPrompt,
|
|
3715
3715
|
getTemplate: () => getTemplate,
|
|
3716
|
+
personalizePrompt: () => personalizePrompt,
|
|
3716
3717
|
renderClientCOOTemplate: () => renderClientCOOTemplate
|
|
3717
3718
|
});
|
|
3718
3719
|
function getSessionPrompt(storedPrompt) {
|
|
@@ -3727,6 +3728,11 @@ function buildCustomEmployeePrompt(name, role) {
|
|
|
3727
3728
|
function getTemplate(name) {
|
|
3728
3729
|
return TEMPLATES[name];
|
|
3729
3730
|
}
|
|
3731
|
+
function personalizePrompt(prompt, templateName, actualName) {
|
|
3732
|
+
if (templateName === actualName) return prompt;
|
|
3733
|
+
const escaped = templateName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
3734
|
+
return prompt.replace(new RegExp(`\\bYou are ${escaped}\\b`, "g"), `You are ${actualName}`);
|
|
3735
|
+
}
|
|
3730
3736
|
function renderClientCOOTemplate(vars) {
|
|
3731
3737
|
for (const key of CLIENT_COO_PLACEHOLDERS) {
|
|
3732
3738
|
const value = vars[key];
|
|
@@ -5024,11 +5030,11 @@ async function runSetupWizard(opts = {}) {
|
|
|
5024
5030
|
const cooName = (cooNameInput || "exe").toLowerCase();
|
|
5025
5031
|
let employees = await loadEmployees2(EMPLOYEES_PATH2).catch(() => []);
|
|
5026
5032
|
if (!employees.some((e) => e.name === cooName)) {
|
|
5027
|
-
const { DEFAULT_EXE: DEFAULT_EXE2 } = await Promise.resolve().then(() => (init_employee_templates(), employee_templates_exports));
|
|
5033
|
+
const { DEFAULT_EXE: DEFAULT_EXE2, personalizePrompt: personalizePrompt2 } = await Promise.resolve().then(() => (init_employee_templates(), employee_templates_exports));
|
|
5028
5034
|
const cooEmployee = {
|
|
5029
5035
|
name: cooName,
|
|
5030
5036
|
role: "COO",
|
|
5031
|
-
systemPrompt: DEFAULT_EXE2.systemPrompt,
|
|
5037
|
+
systemPrompt: personalizePrompt2(DEFAULT_EXE2.systemPrompt, "exe", cooName),
|
|
5032
5038
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5033
5039
|
templateName: "exe",
|
|
5034
5040
|
templateVersion: 1
|
|
@@ -5110,10 +5116,11 @@ async function runSetupWizard(opts = {}) {
|
|
|
5110
5116
|
const ctoName = (ctoNameInput || "yoshi").toLowerCase();
|
|
5111
5117
|
if (!employees.some((e) => e.name === ctoName)) {
|
|
5112
5118
|
const ctoTemplate = getEmployeeTemplate("yoshi");
|
|
5119
|
+
const { personalizePrompt: personalizeCto } = await Promise.resolve().then(() => (init_employee_templates(), employee_templates_exports));
|
|
5113
5120
|
const ctoEmployee = {
|
|
5114
5121
|
name: ctoName,
|
|
5115
5122
|
role: "CTO",
|
|
5116
|
-
systemPrompt: ctoTemplate?.systemPrompt ?? "",
|
|
5123
|
+
systemPrompt: personalizeCto(ctoTemplate?.systemPrompt ?? "", "yoshi", ctoName),
|
|
5117
5124
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
5118
5125
|
};
|
|
5119
5126
|
employees = addEmployee2(employees, ctoEmployee);
|
|
@@ -5136,10 +5143,11 @@ async function runSetupWizard(opts = {}) {
|
|
|
5136
5143
|
const cmoName = (cmoNameInput || "mari").toLowerCase();
|
|
5137
5144
|
if (!employees.some((e) => e.name === cmoName)) {
|
|
5138
5145
|
const cmoTemplate = getEmployeeTemplate("mari");
|
|
5146
|
+
const { personalizePrompt: personalizeCmo } = await Promise.resolve().then(() => (init_employee_templates(), employee_templates_exports));
|
|
5139
5147
|
const cmoEmployee = {
|
|
5140
5148
|
name: cmoName,
|
|
5141
5149
|
role: "CMO",
|
|
5142
|
-
systemPrompt: cmoTemplate?.systemPrompt ?? "",
|
|
5150
|
+
systemPrompt: personalizeCmo(cmoTemplate?.systemPrompt ?? "", "mari", cmoName),
|
|
5143
5151
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
5144
5152
|
};
|
|
5145
5153
|
employees = addEmployee2(employees, cmoEmployee);
|
|
@@ -21508,7 +21516,7 @@ async function runActivate(key) {
|
|
|
21508
21516
|
}
|
|
21509
21517
|
const { saveLicense: saveLicense2, mirrorLicenseKey: mirrorLicenseKey2, validateLicense: validateLicense2 } = await Promise.resolve().then(() => (init_license(), license_exports));
|
|
21510
21518
|
const { loadEmployees: loadEmployees2, saveEmployees: saveEmployees2, addEmployee: addEmployee2, registerBinSymlinks: registerBinSymlinks2 } = await Promise.resolve().then(() => (init_employees(), employees_exports));
|
|
21511
|
-
const { getTemplate: getTemplate3 } = await Promise.resolve().then(() => (init_employee_templates(), employee_templates_exports));
|
|
21519
|
+
const { getTemplate: getTemplate3, personalizePrompt: personalizePrompt2 } = await Promise.resolve().then(() => (init_employee_templates(), employee_templates_exports));
|
|
21512
21520
|
const { getTemplate: getIdentityTemplate } = await Promise.resolve().then(() => (init_identity_templates(), identity_templates_exports));
|
|
21513
21521
|
const { identityPath: identityPath2 } = await Promise.resolve().then(() => (init_identity(), identity_exports));
|
|
21514
21522
|
const { createInterface: createInterface4 } = await import("readline");
|
|
@@ -21536,7 +21544,7 @@ async function runActivate(key) {
|
|
|
21536
21544
|
const name = nameInput || defaultName;
|
|
21537
21545
|
const template = getTemplate3(templateName);
|
|
21538
21546
|
if (!template) return;
|
|
21539
|
-
const emp = { ...template, name, createdAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
21547
|
+
const emp = { ...template, name, systemPrompt: personalizePrompt2(template.systemPrompt, template.name, name), createdAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
21540
21548
|
employees = addEmployee2(employees, emp);
|
|
21541
21549
|
await saveEmployees2(employees);
|
|
21542
21550
|
registerBinSymlinks2(name);
|
package/dist/bin/exe-call.js
CHANGED
|
@@ -216,6 +216,7 @@ __export(employee_templates_exports, {
|
|
|
216
216
|
buildCustomEmployeePrompt: () => buildCustomEmployeePrompt,
|
|
217
217
|
getSessionPrompt: () => getSessionPrompt,
|
|
218
218
|
getTemplate: () => getTemplate,
|
|
219
|
+
personalizePrompt: () => personalizePrompt,
|
|
219
220
|
renderClientCOOTemplate: () => renderClientCOOTemplate
|
|
220
221
|
});
|
|
221
222
|
function getSessionPrompt(storedPrompt) {
|
|
@@ -230,6 +231,11 @@ function buildCustomEmployeePrompt(name, role) {
|
|
|
230
231
|
function getTemplate(name) {
|
|
231
232
|
return TEMPLATES[name];
|
|
232
233
|
}
|
|
234
|
+
function personalizePrompt(prompt, templateName, actualName) {
|
|
235
|
+
if (templateName === actualName) return prompt;
|
|
236
|
+
const escaped = templateName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
237
|
+
return prompt.replace(new RegExp(`\\bYou are ${escaped}\\b`, "g"), `You are ${actualName}`);
|
|
238
|
+
}
|
|
233
239
|
function renderClientCOOTemplate(vars) {
|
|
234
240
|
for (const key of CLIENT_COO_PLACEHOLDERS) {
|
|
235
241
|
const value = vars[key];
|
|
@@ -856,13 +862,15 @@ if (isMainModule(import.meta.url)) {
|
|
|
856
862
|
const employee = resolveEmployee(name, employees);
|
|
857
863
|
let prompt = employee.systemPrompt;
|
|
858
864
|
if (!prompt || prompt.trim().length < 20) {
|
|
859
|
-
const { DEFAULT_EXE: DEFAULT_EXE2, TEMPLATES: TEMPLATES2 } = await Promise.resolve().then(() => (init_employee_templates(), employee_templates_exports));
|
|
865
|
+
const { DEFAULT_EXE: DEFAULT_EXE2, TEMPLATES: TEMPLATES2, personalizePrompt: personalizePrompt2 } = await Promise.resolve().then(() => (init_employee_templates(), employee_templates_exports));
|
|
860
866
|
if (employee.role === "COO") {
|
|
861
|
-
prompt = DEFAULT_EXE2.systemPrompt;
|
|
867
|
+
prompt = personalizePrompt2(DEFAULT_EXE2.systemPrompt, "exe", employee.name);
|
|
862
868
|
} else {
|
|
863
869
|
const templateKey = employee.templateName ?? employee.name;
|
|
864
870
|
const template = TEMPLATES2[templateKey];
|
|
865
|
-
|
|
871
|
+
if (template) {
|
|
872
|
+
prompt = personalizePrompt2(template.systemPrompt, templateKey, employee.name);
|
|
873
|
+
}
|
|
866
874
|
}
|
|
867
875
|
if (prompt && prompt.length > 20) {
|
|
868
876
|
const { saveEmployees: saveEmployees2 } = await Promise.resolve().then(() => (init_employees(), employees_exports));
|
|
@@ -1082,6 +1082,11 @@ function buildCustomEmployeePrompt(name, role) {
|
|
|
1082
1082
|
function getTemplate(name) {
|
|
1083
1083
|
return TEMPLATES[name];
|
|
1084
1084
|
}
|
|
1085
|
+
function personalizePrompt(prompt, templateName, actualName) {
|
|
1086
|
+
if (templateName === actualName) return prompt;
|
|
1087
|
+
const escaped = templateName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1088
|
+
return prompt.replace(new RegExp(`\\bYou are ${escaped}\\b`, "g"), `You are ${actualName}`);
|
|
1089
|
+
}
|
|
1085
1090
|
|
|
1086
1091
|
// src/lib/is-main.ts
|
|
1087
1092
|
import { realpathSync } from "fs";
|
|
@@ -1306,6 +1311,7 @@ async function main() {
|
|
|
1306
1311
|
newEmployee = {
|
|
1307
1312
|
...template,
|
|
1308
1313
|
name,
|
|
1314
|
+
systemPrompt: personalizePrompt(template.systemPrompt, template.name, name),
|
|
1309
1315
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1310
1316
|
templateName: effectiveTemplate,
|
|
1311
1317
|
templateVersion: TEMPLATE_VERSION
|
package/dist/bin/setup.js
CHANGED
|
@@ -1073,6 +1073,7 @@ __export(employee_templates_exports, {
|
|
|
1073
1073
|
buildCustomEmployeePrompt: () => buildCustomEmployeePrompt,
|
|
1074
1074
|
getSessionPrompt: () => getSessionPrompt,
|
|
1075
1075
|
getTemplate: () => getTemplate,
|
|
1076
|
+
personalizePrompt: () => personalizePrompt,
|
|
1076
1077
|
renderClientCOOTemplate: () => renderClientCOOTemplate
|
|
1077
1078
|
});
|
|
1078
1079
|
function getSessionPrompt(storedPrompt) {
|
|
@@ -1087,6 +1088,11 @@ function buildCustomEmployeePrompt(name, role) {
|
|
|
1087
1088
|
function getTemplate(name) {
|
|
1088
1089
|
return TEMPLATES[name];
|
|
1089
1090
|
}
|
|
1091
|
+
function personalizePrompt(prompt, templateName, actualName) {
|
|
1092
|
+
if (templateName === actualName) return prompt;
|
|
1093
|
+
const escaped = templateName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1094
|
+
return prompt.replace(new RegExp(`\\bYou are ${escaped}\\b`, "g"), `You are ${actualName}`);
|
|
1095
|
+
}
|
|
1090
1096
|
function renderClientCOOTemplate(vars) {
|
|
1091
1097
|
for (const key of CLIENT_COO_PLACEHOLDERS) {
|
|
1092
1098
|
const value = vars[key];
|
|
@@ -2525,11 +2531,11 @@ async function runSetupWizard(opts = {}) {
|
|
|
2525
2531
|
const cooName = (cooNameInput || "exe").toLowerCase();
|
|
2526
2532
|
let employees = await loadEmployees2(EMPLOYEES_PATH2).catch(() => []);
|
|
2527
2533
|
if (!employees.some((e) => e.name === cooName)) {
|
|
2528
|
-
const { DEFAULT_EXE: DEFAULT_EXE2 } = await Promise.resolve().then(() => (init_employee_templates(), employee_templates_exports));
|
|
2534
|
+
const { DEFAULT_EXE: DEFAULT_EXE2, personalizePrompt: personalizePrompt2 } = await Promise.resolve().then(() => (init_employee_templates(), employee_templates_exports));
|
|
2529
2535
|
const cooEmployee = {
|
|
2530
2536
|
name: cooName,
|
|
2531
2537
|
role: "COO",
|
|
2532
|
-
systemPrompt: DEFAULT_EXE2.systemPrompt,
|
|
2538
|
+
systemPrompt: personalizePrompt2(DEFAULT_EXE2.systemPrompt, "exe", cooName),
|
|
2533
2539
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2534
2540
|
templateName: "exe",
|
|
2535
2541
|
templateVersion: 1
|
|
@@ -2611,10 +2617,11 @@ async function runSetupWizard(opts = {}) {
|
|
|
2611
2617
|
const ctoName = (ctoNameInput || "yoshi").toLowerCase();
|
|
2612
2618
|
if (!employees.some((e) => e.name === ctoName)) {
|
|
2613
2619
|
const ctoTemplate = getEmployeeTemplate("yoshi");
|
|
2620
|
+
const { personalizePrompt: personalizeCto } = await Promise.resolve().then(() => (init_employee_templates(), employee_templates_exports));
|
|
2614
2621
|
const ctoEmployee = {
|
|
2615
2622
|
name: ctoName,
|
|
2616
2623
|
role: "CTO",
|
|
2617
|
-
systemPrompt: ctoTemplate?.systemPrompt ?? "",
|
|
2624
|
+
systemPrompt: personalizeCto(ctoTemplate?.systemPrompt ?? "", "yoshi", ctoName),
|
|
2618
2625
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
2619
2626
|
};
|
|
2620
2627
|
employees = addEmployee2(employees, ctoEmployee);
|
|
@@ -2637,10 +2644,11 @@ async function runSetupWizard(opts = {}) {
|
|
|
2637
2644
|
const cmoName = (cmoNameInput || "mari").toLowerCase();
|
|
2638
2645
|
if (!employees.some((e) => e.name === cmoName)) {
|
|
2639
2646
|
const cmoTemplate = getEmployeeTemplate("mari");
|
|
2647
|
+
const { personalizePrompt: personalizeCmo } = await Promise.resolve().then(() => (init_employee_templates(), employee_templates_exports));
|
|
2640
2648
|
const cmoEmployee = {
|
|
2641
2649
|
name: cmoName,
|
|
2642
2650
|
role: "CMO",
|
|
2643
|
-
systemPrompt: cmoTemplate?.systemPrompt ?? "",
|
|
2651
|
+
systemPrompt: personalizeCmo(cmoTemplate?.systemPrompt ?? "", "mari", cmoName),
|
|
2644
2652
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
2645
2653
|
};
|
|
2646
2654
|
employees = addEmployee2(employees, cmoEmployee);
|
|
@@ -441,6 +441,11 @@ function buildCustomEmployeePrompt(name, role) {
|
|
|
441
441
|
function getTemplate(name) {
|
|
442
442
|
return TEMPLATES[name];
|
|
443
443
|
}
|
|
444
|
+
function personalizePrompt(prompt, templateName, actualName) {
|
|
445
|
+
if (templateName === actualName) return prompt;
|
|
446
|
+
const escaped = templateName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
447
|
+
return prompt.replace(new RegExp(`\\bYou are ${escaped}\\b`, "g"), `You are ${actualName}`);
|
|
448
|
+
}
|
|
444
449
|
var CLIENT_COO_TEMPLATE = `---
|
|
445
450
|
role: client-coo
|
|
446
451
|
title: Chief Operating Officer
|
|
@@ -566,5 +571,6 @@ export {
|
|
|
566
571
|
buildCustomEmployeePrompt,
|
|
567
572
|
getSessionPrompt,
|
|
568
573
|
getTemplate,
|
|
574
|
+
personalizePrompt,
|
|
569
575
|
renderClientCOOTemplate
|
|
570
576
|
};
|
package/package.json
CHANGED