Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 66 additions & 57 deletions docs/design/daemon-transport-abstraction/README.md

Large diffs are not rendered by default.

36 changes: 15 additions & 21 deletions docs/superpowers/plans/2026-05-27-daemon-workspace-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,13 +326,11 @@ describe('FileService', () => {
describe('read', () => {
it('calls fsFactory.forRequest with context and delegates to readFile', async () => {
const mockFs = {
readFile: vi
.fn()
.mockResolvedValue({
content: 'hello',
truncated: false,
bytesRead: 5,
}),
readFile: vi.fn().mockResolvedValue({
content: 'hello',
truncated: false,
bytesRead: 5,
}),
};
const fsFactory = { forRequest: vi.fn().mockReturnValue(mockFs) };
const service = createFileService({
Expand Down Expand Up @@ -461,13 +459,11 @@ Add to the test file:
describe('write', () => {
it('passes originatorClientId to forRequest for audit', async () => {
const mockFs = {
writeFile: vi
.fn()
.mockResolvedValue({
ok: true,
filePath: '/workspace/f.ts',
bytesWritten: 3,
}),
writeFile: vi.fn().mockResolvedValue({
ok: true,
filePath: '/workspace/f.ts',
bytesWritten: 3,
}),
};
const fsFactory = { forRequest: vi.fn().mockReturnValue(mockFs) };
const service = createFileService({
Expand Down Expand Up @@ -531,13 +527,11 @@ const ctx: WorkspaceRequestContext = {
describe('AuthService', () => {
it('startFlow delegates to registry.start and returns flowId + verificationUri + userCode', async () => {
const registry = {
start: vi
.fn()
.mockReturnValue({
id: 'flow-1',
verificationUri: 'https://auth.example/device',
userCode: 'ABCD-1234',
}),
start: vi.fn().mockReturnValue({
id: 'flow-1',
verificationUri: 'https://auth.example/device',
userCode: 'ABCD-1234',
}),
};
const service = createAuthService({ deviceFlowRegistry: registry as any });

Expand Down
3 changes: 1 addition & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 28 additions & 32 deletions packages/cli/src/acp-integration/session/Session.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5103,22 +5103,20 @@ describe('Session', () => {
isOutputMarkdown: true,
});

const parts = await (session as unknown as ToolCallInternals).runToolCalls(
new AbortController().signal,
'prompt-dup',
[
{
id: 'dup_id_0001',
name: 'read_file',
args: { file_path: 'a.ts' },
},
{
id: 'dup_id_0001',
name: 'read_file',
args: { file_path: 'b.ts' },
},
],
);
const parts = await (
session as unknown as ToolCallInternals
).runToolCalls(new AbortController().signal, 'prompt-dup', [
{
id: 'dup_id_0001',
name: 'read_file',
args: { file_path: 'a.ts' },
},
{
id: 'dup_id_0001',
name: 'read_file',
args: { file_path: 'b.ts' },
},
]);

expect(execute).toHaveBeenCalledOnce();
expect(parts.map((part) => part.functionResponse?.id)).toEqual([
Expand Down Expand Up @@ -5148,22 +5146,20 @@ describe('Session', () => {
isOutputMarkdown: true,
});

const parts = await (session as unknown as ToolCallInternals).runToolCalls(
new AbortController().signal,
'prompt-empty',
[
{
id: '',
name: 'read_file',
args: { file_path: 'a.ts' },
},
{
id: '',
name: 'read_file',
args: { file_path: 'b.ts' },
},
],
);
const parts = await (
session as unknown as ToolCallInternals
).runToolCalls(new AbortController().signal, 'prompt-empty', [
{
id: '',
name: 'read_file',
args: { file_path: 'a.ts' },
},
{
id: '',
name: 'read_file',
args: { file_path: 'b.ts' },
},
]);

expect(execute).toHaveBeenCalledTimes(2);
expect(parts).toHaveLength(2);
Expand Down
Loading
Loading