Initial import: open-design source for helix-mind.ai distribution
Some checks failed
ci / Validate workspace (push) Successful in 12m32s
landing-page-ci / Validate landing page (push) Successful in 9m41s
landing-page-deploy / Deploy landing page (push) Failing after 5m23s
refresh-contributors-wall / Refresh contributors wall cache bust (push) Failing after 12s
github-metrics / Generate repository metrics SVG (push) Failing after 2m8s
Some checks failed
ci / Validate workspace (push) Successful in 12m32s
landing-page-ci / Validate landing page (push) Successful in 9m41s
landing-page-deploy / Deploy landing page (push) Failing after 5m23s
refresh-contributors-wall / Refresh contributors wall cache bust (push) Failing after 12s
github-metrics / Generate repository metrics SVG (push) Failing after 2m8s
This repository contains the open-design daemon CLI source code, built and packaged at https://helix-mind.ai/cli/open-design/latest.tgz for use by the HelixMind /design slash command. Licenses: Apache-2.0 (root) + MIT (skills/*)
This commit is contained in:
48
apps/daemon/tests/acp.test.ts
Normal file
48
apps/daemon/tests/acp.test.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
// @ts-nocheck
|
||||
import assert from 'node:assert/strict';
|
||||
import path from 'node:path';
|
||||
import { test } from 'vitest';
|
||||
import { buildAcpSessionNewParams } from '../src/acp.js';
|
||||
|
||||
test('ACP session params do not require MCP servers by default', () => {
|
||||
assert.deepEqual(buildAcpSessionNewParams('/tmp/od-project'), {
|
||||
cwd: path.resolve('/tmp/od-project'),
|
||||
mcpServers: [],
|
||||
});
|
||||
});
|
||||
|
||||
test('ACP session params do not request global MCP config mutation', () => {
|
||||
const params = buildAcpSessionNewParams('/tmp/od-project');
|
||||
|
||||
assert.equal('mcpConfigPath' in params, false);
|
||||
assert.equal('writeMcpConfig' in params, false);
|
||||
assert.equal('installMcpServers' in params, false);
|
||||
});
|
||||
|
||||
test('ACP session params normalize explicit MCP servers to ACP stdio shape', () => {
|
||||
const mcpServers = [{ name: 'open-design-live-artifacts', command: 'od', args: ['mcp', 'live-artifacts'] }];
|
||||
|
||||
assert.deepEqual(buildAcpSessionNewParams('/tmp/od-project', { mcpServers }), {
|
||||
cwd: path.resolve('/tmp/od-project'),
|
||||
mcpServers: [
|
||||
{
|
||||
type: 'stdio',
|
||||
name: 'open-design-live-artifacts',
|
||||
command: 'od',
|
||||
args: ['mcp', 'live-artifacts'],
|
||||
env: [],
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test('ACP session params preserve caller-provided type and env fields', () => {
|
||||
const mcpServers = [
|
||||
{ type: 'http', name: 'http-server', url: 'http://localhost:3000', headers: {}, env: [{ key: 'TOKEN', value: 'secret' }] },
|
||||
];
|
||||
|
||||
const result = buildAcpSessionNewParams('/tmp/od-project', { mcpServers });
|
||||
assert.equal(result.mcpServers[0].type, 'http');
|
||||
assert.equal(result.mcpServers[0].name, 'http-server');
|
||||
assert.deepEqual(result.mcpServers[0].env, [{ key: 'TOKEN', value: 'secret' }]);
|
||||
});
|
||||
Reference in New Issue
Block a user