mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-13 08:15:14 +02:00
Merge remote-tracking branch 'origin/main' into show-agents-in-worktree
# Conflicts: # conductor.json
This commit is contained in:
commit
d6c43d19e7
99 changed files with 5609 additions and 3483 deletions
49
scripts/conductor-scripts.test.mjs
Normal file
49
scripts/conductor-scripts.test.mjs
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { readFile } from 'node:fs/promises';
|
||||
import { describe, it } from 'node:test';
|
||||
|
||||
async function readText(relativePath) {
|
||||
return readFile(new URL(`../${relativePath}`, import.meta.url), 'utf8');
|
||||
}
|
||||
|
||||
describe('Conductor workspace scripts', () => {
|
||||
it('registers setup and run scripts in nonconcurrent mode', async () => {
|
||||
const manifest = JSON.parse(await readText('conductor.json'));
|
||||
|
||||
assert.deepEqual(manifest.scripts, {
|
||||
setup: 'bash scripts/conductor-setup.sh',
|
||||
run: 'bash scripts/conductor-run.sh',
|
||||
});
|
||||
assert.equal(manifest.runScriptMode, 'nonconcurrent');
|
||||
});
|
||||
|
||||
it('sets up exact uv, Python packages, JS packages, and the built CLI', async () => {
|
||||
const setupScript = await readText('scripts/conductor-setup.sh');
|
||||
|
||||
assert.match(setupScript, /read_required_uv_version\(\)/);
|
||||
assert.match(setupScript, /\.context\/bin\/uv-\$required_version/);
|
||||
assert.match(setupScript, /uv sync --all-packages --all-groups/);
|
||||
assert.match(setupScript, /pnpm install --frozen-lockfile --prefer-offline/);
|
||||
assert.match(setupScript, /pnpm run native:rebuild/);
|
||||
assert.match(setupScript, /pnpm run build/);
|
||||
assert.match(setupScript, /packages\/cli\/dist\/bin\.js dev doctor setup --no-input/);
|
||||
assert.match(setupScript, /sh scripts\/setup-conductor-workspace\.sh/);
|
||||
});
|
||||
|
||||
it('links private agent overlays when KAELIO_SKILLS_ROOT is set', async () => {
|
||||
const workspaceScript = await readText('scripts/setup-conductor-workspace.sh');
|
||||
|
||||
assert.match(workspaceScript, /KAELIO_SKILLS_ROOT/);
|
||||
assert.match(workspaceScript, /agents_source="\$\{KAELIO_SKILLS_ROOT\}\/\.agents"/);
|
||||
assert.match(workspaceScript, /ln -s "\$\{agents_source\}" \.agents/);
|
||||
});
|
||||
|
||||
it('runs the KTX daemon on the documented fixed local port', async () => {
|
||||
const runScript = await readText('scripts/conductor-run.sh');
|
||||
|
||||
assert.match(runScript, /pnpm run build/);
|
||||
assert.match(runScript, /source \.venv\/bin\/activate/);
|
||||
assert.match(runScript, /uv run ktx-daemon serve-http --host 127\.0\.0\.1 --port 8765/);
|
||||
assert.doesNotMatch(runScript, /\bnpx\b/);
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue