@starlein/paperclip-plugin-company-wizard 0.2.1 → 0.2.3
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/manifest.js +1 -1
- package/dist/manifest.js.map +1 -1
- package/dist/ui/index.js +2 -2
- package/dist/ui/index.js.map +1 -1
- package/dist/worker.js +15 -7
- package/dist/worker.js.map +2 -2
- package/package.json +2 -2
package/dist/worker.js
CHANGED
|
@@ -6413,8 +6413,7 @@ function normalizeCeoAdapterType(userCeoAdapter = {}) {
|
|
|
6413
6413
|
function buildCeoAdapterConfig({
|
|
6414
6414
|
userCeoAdapter = {},
|
|
6415
6415
|
companyDir,
|
|
6416
|
-
roleAdapterOverrides = {}
|
|
6417
|
-
promptTemplate = ""
|
|
6416
|
+
roleAdapterOverrides = {}
|
|
6418
6417
|
} = {}) {
|
|
6419
6418
|
const adapterType = normalizeCeoAdapterType(userCeoAdapter);
|
|
6420
6419
|
const userCwd = asTrimmedString(userCeoAdapter.cwd);
|
|
@@ -6426,9 +6425,10 @@ function buildCeoAdapterConfig({
|
|
|
6426
6425
|
const adapterConfig = {
|
|
6427
6426
|
...roleAdapterOverrides,
|
|
6428
6427
|
cwd: userCwd || companyDir,
|
|
6429
|
-
...asTrimmedString(promptTemplate) ? { promptTemplate } : {},
|
|
6430
6428
|
...model ? { model } : {}
|
|
6431
6429
|
};
|
|
6430
|
+
delete adapterConfig.promptTemplate;
|
|
6431
|
+
delete adapterConfig.bootstrapPromptTemplate;
|
|
6432
6432
|
if (adapterType === "codex_local") {
|
|
6433
6433
|
adapterConfig.modelReasoningEffort = thinkingLevel;
|
|
6434
6434
|
adapterConfig.thinkingLevel = thinkingLevel;
|
|
@@ -7328,7 +7328,8 @@ var PaperclipClient = class {
|
|
|
7328
7328
|
runtimeConfig,
|
|
7329
7329
|
budgetMonthlyCents,
|
|
7330
7330
|
permissions,
|
|
7331
|
-
metadata
|
|
7331
|
+
metadata,
|
|
7332
|
+
instructionsBundle
|
|
7332
7333
|
} = agent || {};
|
|
7333
7334
|
const payload = {
|
|
7334
7335
|
name,
|
|
@@ -7344,7 +7345,8 @@ var PaperclipClient = class {
|
|
|
7344
7345
|
...runtimeConfig ? { runtimeConfig } : {},
|
|
7345
7346
|
...budgetMonthlyCents !== void 0 ? { budgetMonthlyCents } : {},
|
|
7346
7347
|
...permissions ? { permissions } : {},
|
|
7347
|
-
...metadata !== void 0 ? { metadata } : {}
|
|
7348
|
+
...metadata !== void 0 ? { metadata } : {},
|
|
7349
|
+
...instructionsBundle !== void 0 ? { instructionsBundle } : {}
|
|
7348
7350
|
};
|
|
7349
7351
|
try {
|
|
7350
7352
|
return await this._fetch(`/api/companies/${companyId}/agents`, {
|
|
@@ -8078,9 +8080,13 @@ var plugin = definePlugin({
|
|
|
8078
8080
|
const adapterConfig = buildCeoAdapterConfig({
|
|
8079
8081
|
userCeoAdapter,
|
|
8080
8082
|
companyDir,
|
|
8081
|
-
roleAdapterOverrides: assembleResult.roleAdapterOverrides?.get("ceo") ?? {}
|
|
8082
|
-
promptTemplate: ceoPromptTemplate
|
|
8083
|
+
roleAdapterOverrides: assembleResult.roleAdapterOverrides?.get("ceo") ?? {}
|
|
8083
8084
|
});
|
|
8085
|
+
const ceoInstructionFiles = collectInstructionFiles(ceoInstructionsDir);
|
|
8086
|
+
if (!ceoInstructionFiles[ceoEntryFile] && typeof ceoPromptTemplate === "string" && ceoPromptTemplate.trim()) {
|
|
8087
|
+
ceoInstructionFiles[ceoEntryFile] = ceoPromptTemplate;
|
|
8088
|
+
}
|
|
8089
|
+
const ceoInstructionsBundle = Object.keys(ceoInstructionFiles).length > 0 ? { entryFile: ceoEntryFile, files: ceoInstructionFiles } : void 0;
|
|
8084
8090
|
const logPendingApproval = (agent) => {
|
|
8085
8091
|
if (!agent?._pendingApprovalId) return;
|
|
8086
8092
|
log(
|
|
@@ -8131,6 +8137,7 @@ var plugin = definePlugin({
|
|
|
8131
8137
|
reportsTo: null,
|
|
8132
8138
|
adapterType,
|
|
8133
8139
|
adapterConfig,
|
|
8140
|
+
instructionsBundle: ceoInstructionsBundle,
|
|
8134
8141
|
runtimeConfig: ceoRuntimeConfig,
|
|
8135
8142
|
permissions: { canCreateAgents: true }
|
|
8136
8143
|
});
|
|
@@ -8149,6 +8156,7 @@ var plugin = definePlugin({
|
|
|
8149
8156
|
reportsTo: null,
|
|
8150
8157
|
adapterType,
|
|
8151
8158
|
adapterConfig,
|
|
8159
|
+
instructionsBundle: ceoInstructionsBundle,
|
|
8152
8160
|
runtimeConfig: ceoRuntimeConfig,
|
|
8153
8161
|
permissions: { canCreateAgents: true }
|
|
8154
8162
|
});
|