@openpalm/lib 0.11.0-beta.10 → 0.11.0-beta.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openpalm/lib",
3
- "version": "0.11.0-beta.10",
3
+ "version": "0.11.0-beta.11",
4
4
  "license": "MPL-2.0",
5
5
  "type": "module",
6
6
  "description": "Shared control-plane library for OpenPalm — lifecycle, staging, secrets, channels, connections, scheduler",
@@ -498,4 +498,22 @@ describe("performSetup", () => {
498
498
  expect(stackEnvContent).toContain("discord-bot-token-xyz");
499
499
  expect(stackEnvContent).toContain("discord-app-id-123");
500
500
  });
501
+
502
+ it("ensureOpenCodeConfig never writes forbidden keys (providers, smallModel, model) to the user config", async () => {
503
+ // OpenCode v1.2.24+ rejects these keys with ConfigInvalidError at startup.
504
+ // This test locks the starter config shape so future changes can't
505
+ // accidentally introduce keys that would crash the assistant on boot.
506
+ const { ensureOpenCodeConfig } = await import("./secrets.js");
507
+ ensureOpenCodeConfig();
508
+
509
+ const configPath = join(homeDir, "config", "assistant", "opencode.json");
510
+ expect(existsSync(configPath)).toBe(true);
511
+
512
+ const config = JSON.parse(readFileSync(configPath, "utf-8"));
513
+ expect(config).not.toHaveProperty("providers");
514
+ expect(config).not.toHaveProperty("smallModel");
515
+ expect(config).not.toHaveProperty("model");
516
+ // $schema is the only required key
517
+ expect(config.$schema).toBeTruthy();
518
+ });
501
519
  });