@polderlabs/bizar 5.6.0-beta.11 → 5.6.0-beta.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/cli/dev-link.test.mjs +24 -11
- package/cli/doctor.test.mjs +13 -8
- package/cli/install.test.mjs +7 -8
- package/cli/provision.mjs +460 -42
- package/cli/utils.mjs +28 -0
- package/config/agents/agent-browser.yaml +90 -0
- package/config/agents/baldr.yaml +60 -0
- package/config/agents/forseti.yaml +60 -0
- package/config/agents/frigg.yaml +52 -0
- package/config/agents/heimdall.yaml +44 -0
- package/config/agents/hermod.yaml +64 -0
- package/config/agents/mimir.yaml +60 -0
- package/config/agents/odin.yaml +310 -0
- package/config/agents/quick.yaml +47 -0
- package/config/agents/semble-search.yaml +59 -0
- package/config/agents/thor.yaml +64 -0
- package/config/agents/tyr.yaml +67 -0
- package/config/agents/vidarr.yaml +65 -0
- package/config/agents/vor.yaml +62 -0
- package/package.json +1 -1
- package/packages/sdk/package.json +1 -1
package/cli/dev-link.test.mjs
CHANGED
|
@@ -41,26 +41,27 @@ const ORIG_XDG = process.env.XDG_CONFIG_HOME;
|
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Point HOME at a fresh tmpdir so the module's clineConfigDir()
|
|
44
|
-
* resolves inside it (via the fallback `<HOME>/.
|
|
44
|
+
* resolves inside it (via the fallback `<HOME>/.cline`).
|
|
45
45
|
* Returns the tmpdir path.
|
|
46
46
|
*
|
|
47
47
|
* Note: we deliberately do NOT set XDG_CONFIG_HOME here. The
|
|
48
48
|
* clineConfigDir() helper treats a set XDG_CONFIG_HOME as the
|
|
49
|
-
* direct parent (so `XDG_CONFIG_HOME=~/.config` → `~/.
|
|
49
|
+
* direct parent (so `XDG_CONFIG_HOME=~/.config` → `~/.cline`,
|
|
50
50
|
* matching the standard layout). Setting it to a raw tmpdir would
|
|
51
51
|
* produce `<tmpdir>/cline` instead of the expected
|
|
52
|
-
* `<tmpdir>/.
|
|
52
|
+
* `<tmpdir>/.cline` and break path alignment with the test.
|
|
53
53
|
*/
|
|
54
54
|
function freshHome() {
|
|
55
55
|
const home = mkdtempSync(join(tmpdir(), 'bizar-devlink-'));
|
|
56
56
|
process.env.HOME = home;
|
|
57
|
-
delete process.env.
|
|
57
|
+
delete process.env.CLINE_DIR;
|
|
58
|
+
delete process.env.BIZAR_LEGACY_CLINE_DIR;
|
|
58
59
|
return home;
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
/** Path to the deployed plugin dir under the mocked HOME. */
|
|
62
63
|
function pluginDest(home) {
|
|
63
|
-
return join(home, '.
|
|
64
|
+
return join(home, '.cline', 'plugins', 'bizar');
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
after(() => {
|
|
@@ -89,8 +90,12 @@ describe('createDevLink()', () => {
|
|
|
89
90
|
if (home && existsSync(home)) rmSync(home, { recursive: true, force: true });
|
|
90
91
|
if (ORIG_HOME === undefined) delete process.env.HOME;
|
|
91
92
|
else process.env.HOME = ORIG_HOME;
|
|
92
|
-
if (ORIG_XDG === undefined)
|
|
93
|
-
|
|
93
|
+
if (ORIG_XDG === undefined) {
|
|
94
|
+
delete process.env.CLINE_DIR;
|
|
95
|
+
delete process.env.BIZAR_LEGACY_CLINE_DIR;
|
|
96
|
+
} else {
|
|
97
|
+
process.env.XDG_CONFIG_HOME = ORIG_XDG;
|
|
98
|
+
}
|
|
94
99
|
});
|
|
95
100
|
|
|
96
101
|
test('creates a symlink when dest does not exist', () => {
|
|
@@ -188,8 +193,12 @@ describe('removeDevLink()', () => {
|
|
|
188
193
|
if (home && existsSync(home)) rmSync(home, { recursive: true, force: true });
|
|
189
194
|
if (ORIG_HOME === undefined) delete process.env.HOME;
|
|
190
195
|
else process.env.HOME = ORIG_HOME;
|
|
191
|
-
if (ORIG_XDG === undefined)
|
|
192
|
-
|
|
196
|
+
if (ORIG_XDG === undefined) {
|
|
197
|
+
delete process.env.CLINE_DIR;
|
|
198
|
+
delete process.env.BIZAR_LEGACY_CLINE_DIR;
|
|
199
|
+
} else {
|
|
200
|
+
process.env.XDG_CONFIG_HOME = ORIG_XDG;
|
|
201
|
+
}
|
|
193
202
|
});
|
|
194
203
|
|
|
195
204
|
test('errors when dest does not exist', async () => {
|
|
@@ -274,8 +283,12 @@ describe('symlink detection', () => {
|
|
|
274
283
|
if (home && existsSync(home)) rmSync(home, { recursive: true, force: true });
|
|
275
284
|
if (ORIG_HOME === undefined) delete process.env.HOME;
|
|
276
285
|
else process.env.HOME = ORIG_HOME;
|
|
277
|
-
if (ORIG_XDG === undefined)
|
|
278
|
-
|
|
286
|
+
if (ORIG_XDG === undefined) {
|
|
287
|
+
delete process.env.CLINE_DIR;
|
|
288
|
+
delete process.env.BIZAR_LEGACY_CLINE_DIR;
|
|
289
|
+
} else {
|
|
290
|
+
process.env.XDG_CONFIG_HOME = ORIG_XDG;
|
|
291
|
+
}
|
|
279
292
|
});
|
|
280
293
|
|
|
281
294
|
test('lstatSync reports isSymbolicLink()=true after createDevLink', () => {
|
package/cli/doctor.test.mjs
CHANGED
|
@@ -37,25 +37,30 @@ const ORIG_HOME = process.env.HOME;
|
|
|
37
37
|
const ORIG_XDG = process.env.XDG_CONFIG_HOME;
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
* Mock HOME so clineConfigDir() resolves to `<tmpdir>/.
|
|
40
|
+
* Mock HOME so clineConfigDir() resolves to `<tmpdir>/.cline`.
|
|
41
41
|
* Returns the tmpdir path.
|
|
42
42
|
*
|
|
43
43
|
* We don't set XDG_CONFIG_HOME here for the same reason as dev-link.test.mjs:
|
|
44
44
|
* the helper treats a set XDG_CONFIG_HOME as the direct parent (so
|
|
45
|
-
* `XDG_CONFIG_HOME=~/.config` → `~/.
|
|
45
|
+
* `XDG_CONFIG_HOME=~/.config` → `~/.cline`).
|
|
46
46
|
*/
|
|
47
47
|
function freshHome() {
|
|
48
48
|
const home = mkdtempSync(join(tmpdir(), 'bizar-doctor-'));
|
|
49
49
|
process.env.HOME = home;
|
|
50
|
-
delete process.env.
|
|
50
|
+
delete process.env.CLINE_DIR;
|
|
51
|
+
delete process.env.BIZAR_LEGACY_CLINE_DIR;
|
|
51
52
|
return home;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
afterEach(() => {
|
|
55
56
|
if (ORIG_HOME === undefined) delete process.env.HOME;
|
|
56
57
|
else process.env.HOME = ORIG_HOME;
|
|
57
|
-
if (ORIG_XDG === undefined)
|
|
58
|
-
|
|
58
|
+
if (ORIG_XDG === undefined) {
|
|
59
|
+
delete process.env.CLINE_DIR;
|
|
60
|
+
delete process.env.BIZAR_LEGACY_CLINE_DIR;
|
|
61
|
+
} else {
|
|
62
|
+
process.env.XDG_CONFIG_HOME = ORIG_XDG;
|
|
63
|
+
}
|
|
59
64
|
});
|
|
60
65
|
|
|
61
66
|
// ── Shape & silent-mode tests ───────────────────────────────────────────────
|
|
@@ -182,14 +187,14 @@ describe('runDoctor() with fixture HOME', () => {
|
|
|
182
187
|
});
|
|
183
188
|
|
|
184
189
|
function writeClineConfig(json) {
|
|
185
|
-
const cfgDir = join(home, '.
|
|
190
|
+
const cfgDir = join(home, '.cline');
|
|
186
191
|
mkdirSync(cfgDir, { recursive: true });
|
|
187
192
|
writeFileSync(join(cfgDir, 'cline.json'), JSON.stringify(json), 'utf8');
|
|
188
193
|
return cfgDir;
|
|
189
194
|
}
|
|
190
195
|
|
|
191
196
|
function writeAgents(...files) {
|
|
192
|
-
const agentsDir = join(home, '.
|
|
197
|
+
const agentsDir = join(home, '.cline', 'agents');
|
|
193
198
|
mkdirSync(agentsDir, { recursive: true });
|
|
194
199
|
for (const f of files) {
|
|
195
200
|
writeFileSync(join(agentsDir, f), `# ${f}`, 'utf8');
|
|
@@ -270,7 +275,7 @@ describe('runDoctor() with fixture HOME', () => {
|
|
|
270
275
|
|
|
271
276
|
test('plugin-path-resolves passes when tuple path resolves', async () => {
|
|
272
277
|
const home = process.env.HOME;
|
|
273
|
-
const pluginsDir = join(home, '.
|
|
278
|
+
const pluginsDir = join(home, '.cline', 'plugins', 'bizar');
|
|
274
279
|
mkdirSync(pluginsDir, { recursive: true });
|
|
275
280
|
writeFileSync(join(pluginsDir, 'index.ts'), '// fake plugin\n', 'utf8');
|
|
276
281
|
writeClineConfig({ plugin: [['./plugins/bizar/index.ts', {}]] });
|
package/cli/install.test.mjs
CHANGED
|
@@ -32,25 +32,24 @@ const ORIG_XDG = process.env.XDG_CONFIG_HOME;
|
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Point HOME at a fresh tmpdir so the module's clineConfigDir()
|
|
35
|
-
* resolves inside it
|
|
36
|
-
*
|
|
35
|
+
* resolves inside it. As of v5.6.0-beta.12, `clineConfigDir()` returns
|
|
36
|
+
* `<HOME>/.cline/` (matching Cline's own `resolveClineDir` since v3.0).
|
|
37
37
|
*
|
|
38
|
-
* We
|
|
39
|
-
*
|
|
40
|
-
* `~/.config/cline`); setting it to a raw tmpdir would produce
|
|
41
|
-
* `<tmpdir>/cline` instead of `<tmpdir>/.config/cline` and break
|
|
42
|
-
* path alignment with the rest of the test.
|
|
38
|
+
* We also reset CLINE_DIR and BIZAR_LEGACY_CLINE_DIR so the test uses
|
|
39
|
+
* the canonical path even if the developer's env is non-default.
|
|
43
40
|
*/
|
|
44
41
|
function freshHome() {
|
|
45
42
|
const home = mkdtempSync(join(tmpdir(), 'bizar-install-'));
|
|
46
43
|
process.env.HOME = home;
|
|
47
44
|
delete process.env.XDG_CONFIG_HOME;
|
|
45
|
+
delete process.env.CLINE_DIR;
|
|
46
|
+
delete process.env.BIZAR_LEGACY_CLINE_DIR;
|
|
48
47
|
return home;
|
|
49
48
|
}
|
|
50
49
|
|
|
51
50
|
/** Path to the deployed plugin dir under the mocked HOME. */
|
|
52
51
|
function pluginDest(home) {
|
|
53
|
-
return join(home, '.
|
|
52
|
+
return join(home, '.cline', 'plugins', 'bizar');
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
/**
|