@starlein/paperclip-plugin-company-wizard 0.4.16 → 0.4.18
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/CHANGELOG.md +41 -0
- package/dist/manifest.js +1 -1
- package/dist/manifest.js.map +1 -1
- package/dist/ui/index.css +6 -0
- package/dist/ui/index.css.map +2 -2
- package/dist/ui/index.js +145 -6
- package/dist/ui/index.js.map +4 -4
- package/dist/worker.js +205 -84
- package/dist/worker.js.map +4 -4
- package/package.json +17 -17
- package/templates/bootstrap-instructions.md +0 -5
- package/templates/modules/dependency-management/agents/security-engineer/skills/dependency-audit.fallback.md +18 -0
- package/templates/modules/game-design/agents/engineer/skills/game-design.fallback.md +17 -0
- package/templates/modules/triage/agents/engineer/skills/issue-triage.fallback.md +20 -0
- package/templates/roles/engineer/HEARTBEAT.md +1 -1
package/dist/worker.js
CHANGED
|
@@ -7372,25 +7372,25 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7372
7372
|
slots: external_exports.array(pluginUiSlotDeclarationSchema).min(1).optional(),
|
|
7373
7373
|
launchers: external_exports.array(pluginLauncherDeclarationSchema).optional()
|
|
7374
7374
|
}).optional()
|
|
7375
|
-
}).superRefine((
|
|
7376
|
-
const hasUiSlots = (
|
|
7377
|
-
const hasUiLaunchers = (
|
|
7378
|
-
if ((hasUiSlots || hasUiLaunchers) && !
|
|
7375
|
+
}).superRefine((manifest2, ctx) => {
|
|
7376
|
+
const hasUiSlots = (manifest2.ui?.slots?.length ?? 0) > 0;
|
|
7377
|
+
const hasUiLaunchers = (manifest2.ui?.launchers?.length ?? 0) > 0;
|
|
7378
|
+
if ((hasUiSlots || hasUiLaunchers) && !manifest2.entrypoints.ui) {
|
|
7379
7379
|
ctx.addIssue({
|
|
7380
7380
|
code: external_exports.ZodIssueCode.custom,
|
|
7381
7381
|
message: "entrypoints.ui is required when ui.slots or ui.launchers are declared",
|
|
7382
7382
|
path: ["entrypoints", "ui"]
|
|
7383
7383
|
});
|
|
7384
7384
|
}
|
|
7385
|
-
if (
|
|
7385
|
+
if (manifest2.minimumHostVersion && manifest2.minimumPaperclipVersion && manifest2.minimumHostVersion !== manifest2.minimumPaperclipVersion) {
|
|
7386
7386
|
ctx.addIssue({
|
|
7387
7387
|
code: external_exports.ZodIssueCode.custom,
|
|
7388
7388
|
message: "minimumHostVersion and minimumPaperclipVersion must match when both are declared",
|
|
7389
7389
|
path: ["minimumHostVersion"]
|
|
7390
7390
|
});
|
|
7391
7391
|
}
|
|
7392
|
-
if (
|
|
7393
|
-
if (!
|
|
7392
|
+
if (manifest2.tools && manifest2.tools.length > 0) {
|
|
7393
|
+
if (!manifest2.capabilities.includes("agent.tools.register")) {
|
|
7394
7394
|
ctx.addIssue({
|
|
7395
7395
|
code: external_exports.ZodIssueCode.custom,
|
|
7396
7396
|
message: "Capability 'agent.tools.register' is required when tools are declared",
|
|
@@ -7398,8 +7398,8 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7398
7398
|
});
|
|
7399
7399
|
}
|
|
7400
7400
|
}
|
|
7401
|
-
if (
|
|
7402
|
-
if (!
|
|
7401
|
+
if (manifest2.environmentDrivers && manifest2.environmentDrivers.length > 0) {
|
|
7402
|
+
if (!manifest2.capabilities.includes("environment.drivers.register")) {
|
|
7403
7403
|
ctx.addIssue({
|
|
7404
7404
|
code: external_exports.ZodIssueCode.custom,
|
|
7405
7405
|
message: "Capability 'environment.drivers.register' is required when environmentDrivers are declared",
|
|
@@ -7407,8 +7407,8 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7407
7407
|
});
|
|
7408
7408
|
}
|
|
7409
7409
|
}
|
|
7410
|
-
if (
|
|
7411
|
-
if (!
|
|
7410
|
+
if (manifest2.agents && manifest2.agents.length > 0) {
|
|
7411
|
+
if (!manifest2.capabilities.includes("agents.managed")) {
|
|
7412
7412
|
ctx.addIssue({
|
|
7413
7413
|
code: external_exports.ZodIssueCode.custom,
|
|
7414
7414
|
message: "Capability 'agents.managed' is required when managed agents are declared",
|
|
@@ -7416,8 +7416,8 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7416
7416
|
});
|
|
7417
7417
|
}
|
|
7418
7418
|
}
|
|
7419
|
-
if (
|
|
7420
|
-
if (!
|
|
7419
|
+
if (manifest2.projects && manifest2.projects.length > 0) {
|
|
7420
|
+
if (!manifest2.capabilities.includes("projects.managed")) {
|
|
7421
7421
|
ctx.addIssue({
|
|
7422
7422
|
code: external_exports.ZodIssueCode.custom,
|
|
7423
7423
|
message: "Capability 'projects.managed' is required when managed projects are declared",
|
|
@@ -7425,8 +7425,8 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7425
7425
|
});
|
|
7426
7426
|
}
|
|
7427
7427
|
}
|
|
7428
|
-
if (
|
|
7429
|
-
if (!
|
|
7428
|
+
if (manifest2.routines && manifest2.routines.length > 0) {
|
|
7429
|
+
if (!manifest2.capabilities.includes("routines.managed")) {
|
|
7430
7430
|
ctx.addIssue({
|
|
7431
7431
|
code: external_exports.ZodIssueCode.custom,
|
|
7432
7432
|
message: "Capability 'routines.managed' is required when managed routines are declared",
|
|
@@ -7434,8 +7434,8 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7434
7434
|
});
|
|
7435
7435
|
}
|
|
7436
7436
|
}
|
|
7437
|
-
if (
|
|
7438
|
-
if (!
|
|
7437
|
+
if (manifest2.skills && manifest2.skills.length > 0) {
|
|
7438
|
+
if (!manifest2.capabilities.includes("skills.managed")) {
|
|
7439
7439
|
ctx.addIssue({
|
|
7440
7440
|
code: external_exports.ZodIssueCode.custom,
|
|
7441
7441
|
message: "Capability 'skills.managed' is required when managed skills are declared",
|
|
@@ -7443,8 +7443,8 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7443
7443
|
});
|
|
7444
7444
|
}
|
|
7445
7445
|
}
|
|
7446
|
-
if (
|
|
7447
|
-
if (!
|
|
7446
|
+
if (manifest2.localFolders && manifest2.localFolders.length > 0) {
|
|
7447
|
+
if (!manifest2.capabilities.includes("local.folders")) {
|
|
7448
7448
|
ctx.addIssue({
|
|
7449
7449
|
code: external_exports.ZodIssueCode.custom,
|
|
7450
7450
|
message: "Capability 'local.folders' is required when local folders are declared",
|
|
@@ -7452,8 +7452,8 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7452
7452
|
});
|
|
7453
7453
|
}
|
|
7454
7454
|
}
|
|
7455
|
-
if (
|
|
7456
|
-
if (!
|
|
7455
|
+
if (manifest2.jobs && manifest2.jobs.length > 0) {
|
|
7456
|
+
if (!manifest2.capabilities.includes("jobs.schedule")) {
|
|
7457
7457
|
ctx.addIssue({
|
|
7458
7458
|
code: external_exports.ZodIssueCode.custom,
|
|
7459
7459
|
message: "Capability 'jobs.schedule' is required when jobs are declared",
|
|
@@ -7461,8 +7461,8 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7461
7461
|
});
|
|
7462
7462
|
}
|
|
7463
7463
|
}
|
|
7464
|
-
if (
|
|
7465
|
-
if (!
|
|
7464
|
+
if (manifest2.webhooks && manifest2.webhooks.length > 0) {
|
|
7465
|
+
if (!manifest2.capabilities.includes("webhooks.receive")) {
|
|
7466
7466
|
ctx.addIssue({
|
|
7467
7467
|
code: external_exports.ZodIssueCode.custom,
|
|
7468
7468
|
message: "Capability 'webhooks.receive' is required when webhooks are declared",
|
|
@@ -7470,8 +7470,8 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7470
7470
|
});
|
|
7471
7471
|
}
|
|
7472
7472
|
}
|
|
7473
|
-
if (
|
|
7474
|
-
if (!
|
|
7473
|
+
if (manifest2.apiRoutes && manifest2.apiRoutes.length > 0) {
|
|
7474
|
+
if (!manifest2.capabilities.includes("api.routes.register")) {
|
|
7475
7475
|
ctx.addIssue({
|
|
7476
7476
|
code: external_exports.ZodIssueCode.custom,
|
|
7477
7477
|
message: "Capability 'api.routes.register' is required when apiRoutes are declared",
|
|
@@ -7479,13 +7479,13 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7479
7479
|
});
|
|
7480
7480
|
}
|
|
7481
7481
|
}
|
|
7482
|
-
if (
|
|
7482
|
+
if (manifest2.database) {
|
|
7483
7483
|
const requiredCapabilities = [
|
|
7484
7484
|
"database.namespace.migrate",
|
|
7485
7485
|
"database.namespace.read"
|
|
7486
7486
|
];
|
|
7487
7487
|
for (const capability of requiredCapabilities) {
|
|
7488
|
-
if (!
|
|
7488
|
+
if (!manifest2.capabilities.includes(capability)) {
|
|
7489
7489
|
ctx.addIssue({
|
|
7490
7490
|
code: external_exports.ZodIssueCode.custom,
|
|
7491
7491
|
message: `Capability '${capability}' is required when database migrations are declared`,
|
|
@@ -7493,7 +7493,7 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7493
7493
|
});
|
|
7494
7494
|
}
|
|
7495
7495
|
}
|
|
7496
|
-
const coreReadTables =
|
|
7496
|
+
const coreReadTables = manifest2.database.coreReadTables ?? [];
|
|
7497
7497
|
const duplicates = coreReadTables.filter((table, i) => coreReadTables.indexOf(table) !== i);
|
|
7498
7498
|
if (duplicates.length > 0) {
|
|
7499
7499
|
ctx.addIssue({
|
|
@@ -7503,8 +7503,8 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7503
7503
|
});
|
|
7504
7504
|
}
|
|
7505
7505
|
}
|
|
7506
|
-
if (
|
|
7507
|
-
const jobKeys =
|
|
7506
|
+
if (manifest2.jobs) {
|
|
7507
|
+
const jobKeys = manifest2.jobs.map((j) => j.jobKey);
|
|
7508
7508
|
const duplicates = jobKeys.filter((key, i) => jobKeys.indexOf(key) !== i);
|
|
7509
7509
|
if (duplicates.length > 0) {
|
|
7510
7510
|
ctx.addIssue({
|
|
@@ -7514,8 +7514,8 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7514
7514
|
});
|
|
7515
7515
|
}
|
|
7516
7516
|
}
|
|
7517
|
-
if (
|
|
7518
|
-
const endpointKeys =
|
|
7517
|
+
if (manifest2.webhooks) {
|
|
7518
|
+
const endpointKeys = manifest2.webhooks.map((w) => w.endpointKey);
|
|
7519
7519
|
const duplicates = endpointKeys.filter((key, i) => endpointKeys.indexOf(key) !== i);
|
|
7520
7520
|
if (duplicates.length > 0) {
|
|
7521
7521
|
ctx.addIssue({
|
|
@@ -7525,8 +7525,8 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7525
7525
|
});
|
|
7526
7526
|
}
|
|
7527
7527
|
}
|
|
7528
|
-
if (
|
|
7529
|
-
const routeKeys =
|
|
7528
|
+
if (manifest2.apiRoutes) {
|
|
7529
|
+
const routeKeys = manifest2.apiRoutes.map((route) => route.routeKey);
|
|
7530
7530
|
const duplicateKeys = routeKeys.filter((key, i) => routeKeys.indexOf(key) !== i);
|
|
7531
7531
|
if (duplicateKeys.length > 0) {
|
|
7532
7532
|
ctx.addIssue({
|
|
@@ -7535,7 +7535,7 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7535
7535
|
path: ["apiRoutes"]
|
|
7536
7536
|
});
|
|
7537
7537
|
}
|
|
7538
|
-
const routeSignatures =
|
|
7538
|
+
const routeSignatures = manifest2.apiRoutes.map((route) => `${route.method} ${route.path}`);
|
|
7539
7539
|
const duplicateRoutes = routeSignatures.filter((sig, i) => routeSignatures.indexOf(sig) !== i);
|
|
7540
7540
|
if (duplicateRoutes.length > 0) {
|
|
7541
7541
|
ctx.addIssue({
|
|
@@ -7545,8 +7545,8 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7545
7545
|
});
|
|
7546
7546
|
}
|
|
7547
7547
|
}
|
|
7548
|
-
if (
|
|
7549
|
-
const toolNames =
|
|
7548
|
+
if (manifest2.tools) {
|
|
7549
|
+
const toolNames = manifest2.tools.map((t) => t.name);
|
|
7550
7550
|
const duplicates = toolNames.filter((name, i) => toolNames.indexOf(name) !== i);
|
|
7551
7551
|
if (duplicates.length > 0) {
|
|
7552
7552
|
ctx.addIssue({
|
|
@@ -7556,8 +7556,8 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7556
7556
|
});
|
|
7557
7557
|
}
|
|
7558
7558
|
}
|
|
7559
|
-
if (
|
|
7560
|
-
const driverKeys =
|
|
7559
|
+
if (manifest2.environmentDrivers) {
|
|
7560
|
+
const driverKeys = manifest2.environmentDrivers.map((d) => d.driverKey);
|
|
7561
7561
|
const duplicates = driverKeys.filter((key, i) => driverKeys.indexOf(key) !== i);
|
|
7562
7562
|
if (duplicates.length > 0) {
|
|
7563
7563
|
ctx.addIssue({
|
|
@@ -7567,8 +7567,8 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7567
7567
|
});
|
|
7568
7568
|
}
|
|
7569
7569
|
}
|
|
7570
|
-
if (
|
|
7571
|
-
const folderKeys =
|
|
7570
|
+
if (manifest2.localFolders) {
|
|
7571
|
+
const folderKeys = manifest2.localFolders.map((folder) => folder.folderKey);
|
|
7572
7572
|
const duplicates = folderKeys.filter((key, i) => folderKeys.indexOf(key) !== i);
|
|
7573
7573
|
if (duplicates.length > 0) {
|
|
7574
7574
|
ctx.addIssue({
|
|
@@ -7578,8 +7578,8 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7578
7578
|
});
|
|
7579
7579
|
}
|
|
7580
7580
|
}
|
|
7581
|
-
if (
|
|
7582
|
-
const agentKeys =
|
|
7581
|
+
if (manifest2.agents) {
|
|
7582
|
+
const agentKeys = manifest2.agents.map((agent) => agent.agentKey);
|
|
7583
7583
|
const duplicates = agentKeys.filter((key, i) => agentKeys.indexOf(key) !== i);
|
|
7584
7584
|
if (duplicates.length > 0) {
|
|
7585
7585
|
ctx.addIssue({
|
|
@@ -7589,8 +7589,8 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7589
7589
|
});
|
|
7590
7590
|
}
|
|
7591
7591
|
}
|
|
7592
|
-
if (
|
|
7593
|
-
const projectKeys =
|
|
7592
|
+
if (manifest2.projects) {
|
|
7593
|
+
const projectKeys = manifest2.projects.map((project) => project.projectKey);
|
|
7594
7594
|
const duplicates = projectKeys.filter((key, i) => projectKeys.indexOf(key) !== i);
|
|
7595
7595
|
if (duplicates.length > 0) {
|
|
7596
7596
|
ctx.addIssue({
|
|
@@ -7600,8 +7600,8 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7600
7600
|
});
|
|
7601
7601
|
}
|
|
7602
7602
|
}
|
|
7603
|
-
if (
|
|
7604
|
-
const routineKeys =
|
|
7603
|
+
if (manifest2.routines) {
|
|
7604
|
+
const routineKeys = manifest2.routines.map((routine) => routine.routineKey);
|
|
7605
7605
|
const duplicates = routineKeys.filter((key, i) => routineKeys.indexOf(key) !== i);
|
|
7606
7606
|
if (duplicates.length > 0) {
|
|
7607
7607
|
ctx.addIssue({
|
|
@@ -7611,8 +7611,8 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7611
7611
|
});
|
|
7612
7612
|
}
|
|
7613
7613
|
}
|
|
7614
|
-
if (
|
|
7615
|
-
const skillKeys =
|
|
7614
|
+
if (manifest2.skills) {
|
|
7615
|
+
const skillKeys = manifest2.skills.map((skill) => skill.skillKey);
|
|
7616
7616
|
const duplicates = skillKeys.filter((key, i) => skillKeys.indexOf(key) !== i);
|
|
7617
7617
|
if (duplicates.length > 0) {
|
|
7618
7618
|
ctx.addIssue({
|
|
@@ -7622,9 +7622,9 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7622
7622
|
});
|
|
7623
7623
|
}
|
|
7624
7624
|
}
|
|
7625
|
-
if (
|
|
7626
|
-
if (
|
|
7627
|
-
const slotIds =
|
|
7625
|
+
if (manifest2.ui) {
|
|
7626
|
+
if (manifest2.ui.slots) {
|
|
7627
|
+
const slotIds = manifest2.ui.slots.map((s) => s.id);
|
|
7628
7628
|
const duplicates = slotIds.filter((id, i) => slotIds.indexOf(id) !== i);
|
|
7629
7629
|
if (duplicates.length > 0) {
|
|
7630
7630
|
ctx.addIssue({
|
|
@@ -7636,8 +7636,8 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7636
7636
|
}
|
|
7637
7637
|
}
|
|
7638
7638
|
const allLaunchers = [
|
|
7639
|
-
...
|
|
7640
|
-
...
|
|
7639
|
+
...manifest2.launchers ?? [],
|
|
7640
|
+
...manifest2.ui?.launchers ?? []
|
|
7641
7641
|
];
|
|
7642
7642
|
if (allLaunchers.length > 0) {
|
|
7643
7643
|
const launcherIds = allLaunchers.map((launcher) => launcher.id);
|
|
@@ -7646,7 +7646,7 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
7646
7646
|
ctx.addIssue({
|
|
7647
7647
|
code: external_exports.ZodIssueCode.custom,
|
|
7648
7648
|
message: `Duplicate launcher ids: ${[...new Set(duplicates)].join(", ")}`,
|
|
7649
|
-
path:
|
|
7649
|
+
path: manifest2.ui?.launchers ? ["ui", "launchers"] : ["launchers"]
|
|
7650
7650
|
});
|
|
7651
7651
|
}
|
|
7652
7652
|
}
|
|
@@ -8061,7 +8061,7 @@ function startWorkerRpcHost(options) {
|
|
|
8061
8061
|
const rpcTimeoutMs = options.rpcTimeoutMs ?? DEFAULT_RPC_TIMEOUT_MS;
|
|
8062
8062
|
let running = true;
|
|
8063
8063
|
let initialized = false;
|
|
8064
|
-
let
|
|
8064
|
+
let manifest2 = null;
|
|
8065
8065
|
let currentConfig = {};
|
|
8066
8066
|
let databaseNamespace = null;
|
|
8067
8067
|
const invocationContextStorage = new AsyncLocalStorage();
|
|
@@ -8144,9 +8144,9 @@ function startWorkerRpcHost(options) {
|
|
|
8144
8144
|
function buildContext() {
|
|
8145
8145
|
return {
|
|
8146
8146
|
get manifest() {
|
|
8147
|
-
if (!
|
|
8147
|
+
if (!manifest2)
|
|
8148
8148
|
throw new Error("Plugin context accessed before initialization");
|
|
8149
|
-
return
|
|
8149
|
+
return manifest2;
|
|
8150
8150
|
},
|
|
8151
8151
|
config: {
|
|
8152
8152
|
async get() {
|
|
@@ -8155,9 +8155,9 @@ function startWorkerRpcHost(options) {
|
|
|
8155
8155
|
},
|
|
8156
8156
|
localFolders: {
|
|
8157
8157
|
declarations() {
|
|
8158
|
-
if (!
|
|
8158
|
+
if (!manifest2)
|
|
8159
8159
|
throw new Error("Plugin context accessed before initialization");
|
|
8160
|
-
return
|
|
8160
|
+
return manifest2.localFolders ?? [];
|
|
8161
8161
|
},
|
|
8162
8162
|
async configure(input) {
|
|
8163
8163
|
return callHost("localFolders.configure", {
|
|
@@ -8925,7 +8925,7 @@ function startWorkerRpcHost(options) {
|
|
|
8925
8925
|
if (initialized) {
|
|
8926
8926
|
throw new Error("Worker already initialized");
|
|
8927
8927
|
}
|
|
8928
|
-
|
|
8928
|
+
manifest2 = params.manifest;
|
|
8929
8929
|
currentConfig = params.config;
|
|
8930
8930
|
databaseNamespace = params.databaseNamespace ?? null;
|
|
8931
8931
|
await plugin2.definition.setup(ctx);
|
|
@@ -9266,6 +9266,89 @@ import os from "node:os";
|
|
|
9266
9266
|
import path2 from "node:path";
|
|
9267
9267
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
9268
9268
|
|
|
9269
|
+
// src/manifest.ts
|
|
9270
|
+
var manifest = {
|
|
9271
|
+
id: "starlein.paperclip-plugin-company-wizard",
|
|
9272
|
+
apiVersion: 1,
|
|
9273
|
+
version: "0.4.18",
|
|
9274
|
+
displayName: "Company Wizard",
|
|
9275
|
+
description: "AI-powered wizard to bootstrap agent companies from composable templates",
|
|
9276
|
+
author: "Sascha Pietrowski <sp@speednetwork.de>",
|
|
9277
|
+
categories: ["workspace", "ui"],
|
|
9278
|
+
capabilities: [
|
|
9279
|
+
"companies.read",
|
|
9280
|
+
"issues.create",
|
|
9281
|
+
"issues.read",
|
|
9282
|
+
"issues.update",
|
|
9283
|
+
"goals.create",
|
|
9284
|
+
"goals.read",
|
|
9285
|
+
"agents.read",
|
|
9286
|
+
"projects.read",
|
|
9287
|
+
"plugin.state.read",
|
|
9288
|
+
"plugin.state.write",
|
|
9289
|
+
"secrets.read-ref",
|
|
9290
|
+
"events.subscribe",
|
|
9291
|
+
"ui.page.register",
|
|
9292
|
+
"ui.sidebar.register"
|
|
9293
|
+
],
|
|
9294
|
+
instanceConfigSchema: {
|
|
9295
|
+
type: "object",
|
|
9296
|
+
properties: {
|
|
9297
|
+
companiesDir: {
|
|
9298
|
+
type: "string",
|
|
9299
|
+
description: "Directory where assembled company workspaces are written. Auto-detected: ~/instances/default/companies in Docker setups, ~/.paperclip/instances/default/companies otherwise. Rarely needs manual override."
|
|
9300
|
+
},
|
|
9301
|
+
templatesPath: {
|
|
9302
|
+
type: "string",
|
|
9303
|
+
description: "Path to the templates directory. Auto-detected: ~/plugin-templates in Docker setups, ~/.paperclip/plugin-templates otherwise. Rarely needs manual override."
|
|
9304
|
+
},
|
|
9305
|
+
templatesRepoUrl: {
|
|
9306
|
+
type: "string",
|
|
9307
|
+
default: "https://github.com/starlein/paperclip-plugin-company-wizard/tree/main/templates",
|
|
9308
|
+
description: "GitHub tree URL for template downloads. The default is correct for most setups \u2014 only change this if using a custom fork."
|
|
9309
|
+
},
|
|
9310
|
+
anthropicApiKey: {
|
|
9311
|
+
type: "string",
|
|
9312
|
+
description: "Anthropic API key for the AI wizard (e.g. sk-ant-...). Required to use the AI-powered company setup path."
|
|
9313
|
+
},
|
|
9314
|
+
paperclipUrl: {
|
|
9315
|
+
type: "string",
|
|
9316
|
+
description: "Paperclip instance URL. Defaults to http://localhost:3100 or the PAPERCLIP_PUBLIC_URL env var."
|
|
9317
|
+
},
|
|
9318
|
+
paperclipEmail: {
|
|
9319
|
+
type: "string",
|
|
9320
|
+
description: "Board login email (for authenticated instances)."
|
|
9321
|
+
},
|
|
9322
|
+
paperclipPassword: {
|
|
9323
|
+
type: "string",
|
|
9324
|
+
description: "Board login password (for authenticated instances)."
|
|
9325
|
+
}
|
|
9326
|
+
}
|
|
9327
|
+
},
|
|
9328
|
+
entrypoints: {
|
|
9329
|
+
worker: "./dist/worker.js",
|
|
9330
|
+
ui: "./dist/ui"
|
|
9331
|
+
},
|
|
9332
|
+
ui: {
|
|
9333
|
+
slots: [
|
|
9334
|
+
{
|
|
9335
|
+
type: "page",
|
|
9336
|
+
id: "company-wizard",
|
|
9337
|
+
displayName: "Company Wizard",
|
|
9338
|
+
exportName: "WizardPage",
|
|
9339
|
+
routePath: "company-creator"
|
|
9340
|
+
},
|
|
9341
|
+
{
|
|
9342
|
+
type: "sidebar",
|
|
9343
|
+
id: "company-wizard-link",
|
|
9344
|
+
displayName: "Create Company",
|
|
9345
|
+
exportName: "SidebarLink"
|
|
9346
|
+
}
|
|
9347
|
+
]
|
|
9348
|
+
}
|
|
9349
|
+
};
|
|
9350
|
+
var manifest_default = manifest;
|
|
9351
|
+
|
|
9269
9352
|
// src/logic/assemble.js
|
|
9270
9353
|
import {
|
|
9271
9354
|
access,
|
|
@@ -9319,8 +9402,11 @@ function buildAdapterConfig({
|
|
|
9319
9402
|
delete adapterConfig.reasoningEffort;
|
|
9320
9403
|
delete adapterConfig.effort;
|
|
9321
9404
|
if (adapterType === "codex_local") {
|
|
9322
|
-
|
|
9323
|
-
|
|
9405
|
+
const codexEffort = thinkingLevel && thinkingLevel !== "auto" ? thinkingLevel : "";
|
|
9406
|
+
if (codexEffort) {
|
|
9407
|
+
adapterConfig.modelReasoningEffort = codexEffort;
|
|
9408
|
+
adapterConfig.thinkingLevel = codexEffort;
|
|
9409
|
+
}
|
|
9324
9410
|
adapterConfig.dangerouslyBypassApprovalsAndSandbox = true;
|
|
9325
9411
|
} else if (adapterType === "claude_local") {
|
|
9326
9412
|
adapterConfig.dangerouslySkipPermissions = true;
|
|
@@ -9908,8 +9994,11 @@ Read: \`../../docs/${doc}\`
|
|
|
9908
9994
|
}
|
|
9909
9995
|
}
|
|
9910
9996
|
if (adapterType === DEFAULT_CEO_ADAPTER_TYPE) {
|
|
9911
|
-
|
|
9912
|
-
|
|
9997
|
+
const codexEffort = thinkingLevel && thinkingLevel !== "auto" ? thinkingLevel : "";
|
|
9998
|
+
if (codexEffort) {
|
|
9999
|
+
adapterConfig.modelReasoningEffort = codexEffort;
|
|
10000
|
+
adapterConfig.thinkingLevel = codexEffort;
|
|
10001
|
+
}
|
|
9913
10002
|
adapterConfig.dangerouslyBypassApprovalsAndSandbox = true;
|
|
9914
10003
|
}
|
|
9915
10004
|
return { adapterType, adapterConfig };
|
|
@@ -11022,8 +11111,22 @@ var __dirname = path2.dirname(fileURLToPath2(import.meta.url));
|
|
|
11022
11111
|
var DEFAULT_TEMPLATES_REPO_URL = "https://github.com/starlein/paperclip-plugin-company-wizard/tree/main/templates";
|
|
11023
11112
|
var BUNDLED_TEMPLATES_DIR = path2.resolve(__dirname, "..", "templates");
|
|
11024
11113
|
var PLUGIN_PACKAGE_NAME = "@starlein/paperclip-plugin-company-wizard";
|
|
11025
|
-
var CURRENT_PLUGIN_VERSION =
|
|
11114
|
+
var CURRENT_PLUGIN_VERSION = manifest_default.version;
|
|
11026
11115
|
var NPM_LATEST_URL = "https://registry.npmjs.org/@starlein%2Fpaperclip-plugin-company-wizard/latest";
|
|
11116
|
+
async function fetchLatestPluginVersion() {
|
|
11117
|
+
const response = await fetch(NPM_LATEST_URL, {
|
|
11118
|
+
headers: { accept: "application/json" }
|
|
11119
|
+
});
|
|
11120
|
+
if (!response.ok) {
|
|
11121
|
+
throw new Error(`npm registry returned ${response.status}`);
|
|
11122
|
+
}
|
|
11123
|
+
const data = await response.json();
|
|
11124
|
+
const latestVersion = typeof data.version === "string" ? data.version.trim() : "";
|
|
11125
|
+
if (!latestVersion) {
|
|
11126
|
+
throw new Error("npm registry response did not include a version");
|
|
11127
|
+
}
|
|
11128
|
+
return latestVersion;
|
|
11129
|
+
}
|
|
11027
11130
|
function copyDirSync(src, dest) {
|
|
11028
11131
|
fs2.mkdirSync(dest, { recursive: true });
|
|
11029
11132
|
for (const entry of fs2.readdirSync(src, { withFileTypes: true })) {
|
|
@@ -11616,34 +11719,52 @@ var plugin = definePlugin({
|
|
|
11616
11719
|
});
|
|
11617
11720
|
ctx.actions.register("check-update", async () => {
|
|
11618
11721
|
try {
|
|
11619
|
-
const
|
|
11620
|
-
|
|
11621
|
-
|
|
11622
|
-
|
|
11623
|
-
|
|
11624
|
-
|
|
11625
|
-
|
|
11626
|
-
|
|
11627
|
-
|
|
11628
|
-
|
|
11629
|
-
|
|
11630
|
-
|
|
11631
|
-
|
|
11632
|
-
|
|
11722
|
+
const latestVersion = await fetchLatestPluginVersion();
|
|
11723
|
+
return {
|
|
11724
|
+
ok: true,
|
|
11725
|
+
packageName: PLUGIN_PACKAGE_NAME,
|
|
11726
|
+
currentVersion: CURRENT_PLUGIN_VERSION,
|
|
11727
|
+
latestVersion,
|
|
11728
|
+
updateAvailable: isNewerVersion(latestVersion, CURRENT_PLUGIN_VERSION),
|
|
11729
|
+
url: "https://www.npmjs.com/package/@starlein/paperclip-plugin-company-wizard"
|
|
11730
|
+
};
|
|
11731
|
+
} catch (err) {
|
|
11732
|
+
return {
|
|
11733
|
+
ok: false,
|
|
11734
|
+
currentVersion: CURRENT_PLUGIN_VERSION,
|
|
11735
|
+
packageName: PLUGIN_PACKAGE_NAME,
|
|
11736
|
+
error: err instanceof Error ? err.message : String(err)
|
|
11737
|
+
};
|
|
11738
|
+
}
|
|
11739
|
+
});
|
|
11740
|
+
ctx.actions.register("prepare-plugin-update", async () => {
|
|
11741
|
+
try {
|
|
11742
|
+
const latestVersion = await fetchLatestPluginVersion();
|
|
11743
|
+
const updateAvailable = isNewerVersion(latestVersion, CURRENT_PLUGIN_VERSION);
|
|
11744
|
+
const cfg = await ctx.config.get() ?? {};
|
|
11745
|
+
const targetDir = refreshTemplatesCache(cfg);
|
|
11746
|
+
const { client } = await connectSharedClient(cfg);
|
|
11747
|
+
const pluginId = await findPluginId(client);
|
|
11748
|
+
if (!pluginId) {
|
|
11633
11749
|
return {
|
|
11634
11750
|
ok: false,
|
|
11635
11751
|
currentVersion: CURRENT_PLUGIN_VERSION,
|
|
11636
|
-
|
|
11637
|
-
|
|
11752
|
+
latestVersion,
|
|
11753
|
+
updateAvailable,
|
|
11754
|
+
templatesUpdated: true,
|
|
11755
|
+
templatesTargetDir: targetDir,
|
|
11756
|
+
error: "Could not find the installed Company Wizard plugin record."
|
|
11638
11757
|
};
|
|
11639
11758
|
}
|
|
11640
11759
|
return {
|
|
11641
11760
|
ok: true,
|
|
11761
|
+
pluginId,
|
|
11642
11762
|
packageName: PLUGIN_PACKAGE_NAME,
|
|
11643
11763
|
currentVersion: CURRENT_PLUGIN_VERSION,
|
|
11644
11764
|
latestVersion,
|
|
11645
|
-
updateAvailable
|
|
11646
|
-
|
|
11765
|
+
updateAvailable,
|
|
11766
|
+
templatesUpdated: true,
|
|
11767
|
+
templatesTargetDir: targetDir
|
|
11647
11768
|
};
|
|
11648
11769
|
} catch (err) {
|
|
11649
11770
|
return {
|