| ... | @@ -30,7 +30,6 @@ import { GrokSettings } from "@t3tools/provider-grok/settings"; | ... | @@ -30,7 +30,6 @@ import { GrokSettings } from "@t3tools/provider-grok/settings"; |
| 30 | import { HostProcessIsExecutable, HostProcessPlatform } from "@t3tools/shared/hostProcess"; | 30 | import { HostProcessIsExecutable, HostProcessPlatform } from "@t3tools/shared/hostProcess"; |
| 31 | import { resolveSelfInvocation } from "@t3tools/shared/nodeRuntime"; | 31 | import { resolveSelfInvocation } from "@t3tools/shared/nodeRuntime"; |
| 32 | import * as DateTime from "effect/DateTime"; | 32 | import * as DateTime from "effect/DateTime"; |
| 33 | import * as Crypto from "effect/Crypto"; | | |
| 34 | import * as Deferred from "effect/Deferred"; | 33 | import * as Deferred from "effect/Deferred"; |
| 35 | import type * as Duration from "effect/Duration"; | 34 | import type * as Duration from "effect/Duration"; |
| 36 | import * as Cause from "effect/Cause"; | 35 | import * as Cause from "effect/Cause"; |
| ... | @@ -54,7 +53,6 @@ import * as EffectAcpErrors from "effect-acp/errors"; | ... | @@ -54,7 +53,6 @@ import * as EffectAcpErrors from "effect-acp/errors"; |
| 54 | import type * as EffectAcpProtocol from "effect-acp/protocol"; | 53 | import type * as EffectAcpProtocol from "effect-acp/protocol"; |
| 55 | import type * as EffectAcpSchema from "effect-acp/compat"; | 54 | import type * as EffectAcpSchema from "effect-acp/compat"; |
| 56 | | 55 | |
| 57 | import * as ProviderHost from "@t3tools/provider-core/server/ProviderHost"; | | |
| 58 | import { layerTestProviderHost } from "@t3tools/provider-testing/host"; | 56 | import { layerTestProviderHost } from "@t3tools/provider-testing/host"; |
| 59 | import * as McpProviderSession from "@t3tools/provider-core/server/mcpSession"; | 57 | import * as McpProviderSession from "@t3tools/provider-core/server/mcpSession"; |
| 60 | import * as AcpSessionRuntime from "@t3tools/provider-acp/server/AcpSessionRuntime"; | 58 | import * as AcpSessionRuntime from "@t3tools/provider-acp/server/AcpSessionRuntime"; |
| ... | @@ -610,12 +608,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -610,12 +608,8 @@ describe("AcpAdapterV2", () => { |
| 610 | const path = yield* Path.Path; | 608 | const path = yield* Path.Path; |
| 611 | const instanceId = ProviderInstanceId.make(`vibe-retry-${outcome}`); | 609 | const instanceId = ProviderInstanceId.make(`vibe-retry-${outcome}`); |
| 612 | const threadId = ThreadId.make(`thread-vibe-retry-${outcome}`); | 610 | const threadId = ThreadId.make(`thread-vibe-retry-${outcome}`); |
| 613 | const adapter = makeAcpAdapterV2({ | 611 | const adapter = yield* makeAcpAdapterV2({ |
| 614 | crypto: yield* Crypto.Crypto, | | |
| 615 | instanceId, | 612 | instanceId, |
| 616 | fileSystem: yield* FileSystem.FileSystem, | | |
| 617 | idAllocator: yield* IdAllocator.IdAllocatorV2, | | |
| 618 | host: yield* ProviderHost.ProviderHost, | | |
| 619 | selfInvocation: yield* resolveSelfInvocation(), | 613 | selfInvocation: yield* resolveSelfInvocation(), |
| 620 | flavor: { | 614 | flavor: { |
| 621 | driver: ProviderDriverKind.make("acpRegistry"), | 615 | driver: ProviderDriverKind.make("acpRegistry"), |
| ... | @@ -709,10 +703,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -709,10 +703,7 @@ describe("AcpAdapterV2", () => { |
| 709 | it.effect("starts the MCP bridge directly from the self-contained runtime", () => | 703 | it.effect("starts the MCP bridge directly from the self-contained runtime", () => |
| 710 | Effect.gen(function* () { | 704 | Effect.gen(function* () { |
| 711 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 705 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 712 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 713 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 714 | const path = yield* Path.Path; | 706 | const path = yield* Path.Path; |
| 715 | const host = yield* ProviderHost.ProviderHost; | | |
| 716 | const selfInvocation = yield* resolveSelfInvocation().pipe( | 707 | const selfInvocation = yield* resolveSelfInvocation().pipe( |
| 717 | Effect.provideService(HostProcessIsExecutable, true), | 708 | Effect.provideService(HostProcessIsExecutable, true), |
| 718 | ); | 709 | ); |
| ... | @@ -739,8 +730,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -739,8 +730,7 @@ describe("AcpAdapterV2", () => { |
| 739 | | 730 | |
| 740 | let runtimeInput: AcpAdapterV2RuntimeInput | undefined; | 731 | let runtimeInput: AcpAdapterV2RuntimeInput | undefined; |
| 741 | const makeRuntime = makeMockRuntime({ childProcessSpawner, mockAgentPath }); | 732 | const makeRuntime = makeMockRuntime({ childProcessSpawner, mockAgentPath }); |
| 742 | const adapter = makeAcpAdapterV2({ | 733 | const adapter = yield* makeAcpAdapterV2({ |
| 743 | crypto: yield* Crypto.Crypto, | | |
| 744 | instanceId, | 734 | instanceId, |
| 745 | flavor: { | 735 | flavor: { |
| 746 | driver: ACP_TEST_DRIVER, | 736 | driver: ACP_TEST_DRIVER, |
| ... | @@ -750,9 +740,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -750,9 +740,6 @@ describe("AcpAdapterV2", () => { |
| 750 | runtimeInput = input; | 740 | runtimeInput = input; |
| 751 | }).pipe(Effect.andThen(makeRuntime(input))), | 741 | }).pipe(Effect.andThen(makeRuntime(input))), |
| 752 | }, | 742 | }, |
| 753 | fileSystem, | | |
| 754 | idAllocator, | | |
| 755 | host, | | |
| 756 | selfInvocation, | 743 | selfInvocation, |
| 757 | }); | 744 | }); |
| 758 | const runtimePolicy = ProviderAdapterV2RuntimePolicy.make({ | 745 | const runtimePolicy = ProviderAdapterV2RuntimePolicy.make({ |
| ... | @@ -782,10 +769,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -782,10 +769,7 @@ describe("AcpAdapterV2", () => { |
| 782 | it.live("refreshes ACP prompt instructions when the interaction mode changes", () => | 769 | it.live("refreshes ACP prompt instructions when the interaction mode changes", () => |
| 783 | Effect.gen(function* () { | 770 | Effect.gen(function* () { |
| 784 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 771 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 785 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 786 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 787 | const path = yield* Path.Path; | 772 | const path = yield* Path.Path; |
| 788 | const host = yield* ProviderHost.ProviderHost; | | |
| 789 | const selfInvocation = yield* resolveSelfInvocation(); | 773 | const selfInvocation = yield* resolveSelfInvocation(); |
| 790 | const mockAgentPath = yield* path.fromFileUrl( | 774 | const mockAgentPath = yield* path.fromFileUrl( |
| 791 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 775 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -805,17 +789,13 @@ describe("AcpAdapterV2", () => { | ... | @@ -805,17 +789,13 @@ describe("AcpAdapterV2", () => { |
| 805 | yield* Effect.addFinalizer(() => | 789 | yield* Effect.addFinalizer(() => |
| 806 | Effect.sync(() => McpProviderSession.clearMcpProviderSession(threadId)), | 790 | Effect.sync(() => McpProviderSession.clearMcpProviderSession(threadId)), |
| 807 | ); | 791 | ); |
| 808 | const adapter = makeAcpAdapterV2({ | 792 | const adapter = yield* makeAcpAdapterV2({ |
| 809 | crypto: yield* Crypto.Crypto, | | |
| 810 | instanceId, | 793 | instanceId, |
| 811 | flavor: { | 794 | flavor: { |
| 812 | driver: ACP_TEST_DRIVER, | 795 | driver: ACP_TEST_DRIVER, |
| 813 | capabilities: AcpProviderCapabilitiesV2, | 796 | capabilities: AcpProviderCapabilitiesV2, |
| 814 | makeRuntime: makeMockRuntime({ childProcessSpawner, mockAgentPath, protocolEvents }), | 797 | makeRuntime: makeMockRuntime({ childProcessSpawner, mockAgentPath, protocolEvents }), |
| 815 | }, | 798 | }, |
| 816 | fileSystem, | | |
| 817 | idAllocator, | | |
| 818 | host, | | |
| 819 | selfInvocation, | 799 | selfInvocation, |
| 820 | }); | 800 | }); |
| 821 | const policy = (interactionMode: "default" | "plan") => | 801 | const policy = (interactionMode: "default" | "plan") => |
| ... | @@ -909,10 +889,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -909,10 +889,7 @@ describe("AcpAdapterV2", () => { |
| 909 | it.effect("starts a new replay message after ACP v2 plan boundaries", () => | 889 | it.effect("starts a new replay message after ACP v2 plan boundaries", () => |
| 910 | Effect.gen(function* () { | 890 | Effect.gen(function* () { |
| 911 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 891 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 912 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 913 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 914 | const path = yield* Path.Path; | 892 | const path = yield* Path.Path; |
| 915 | const host = yield* ProviderHost.ProviderHost; | | |
| 916 | const selfInvocation = yield* resolveSelfInvocation(); | 893 | const selfInvocation = yield* resolveSelfInvocation(); |
| 917 | const mockAgentPath = yield* path.fromFileUrl( | 894 | const mockAgentPath = yield* path.fromFileUrl( |
| 918 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 895 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -920,8 +897,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -920,8 +897,7 @@ describe("AcpAdapterV2", () => { |
| 920 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; | 897 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; |
| 921 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; | 898 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; |
| 922 | const instanceId = ProviderInstanceId.make("acp-test-v2-plan-replay-boundary"); | 899 | const instanceId = ProviderInstanceId.make("acp-test-v2-plan-replay-boundary"); |
| 923 | const adapter = makeAcpAdapterV2({ | 900 | const adapter = yield* makeAcpAdapterV2({ |
| 924 | crypto: yield* Crypto.Crypto, | | |
| 925 | instanceId, | 901 | instanceId, |
| 926 | flavor: { | 902 | flavor: { |
| 927 | driver: ACP_TEST_DRIVER, | 903 | driver: ACP_TEST_DRIVER, |
| ... | @@ -938,9 +914,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -938,9 +914,6 @@ describe("AcpAdapterV2", () => { |
| 938 | }), | 914 | }), |
| 939 | }), | 915 | }), |
| 940 | }, | 916 | }, |
| 941 | fileSystem, | | |
| 942 | idAllocator, | | |
| 943 | host, | | |
| 944 | selfInvocation, | 917 | selfInvocation, |
| 945 | }); | 918 | }); |
| 946 | const threadId = ThreadId.make("thread-acp-v2-plan-replay-boundary"); | 919 | const threadId = ThreadId.make("thread-acp-v2-plan-replay-boundary"); |
| ... | @@ -1043,12 +1016,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -1043,12 +1016,8 @@ describe("AcpAdapterV2", () => { |
| 1043 | ]; | 1016 | ]; |
| 1044 | }; | 1017 | }; |
| 1045 | const instanceId = ProviderInstanceId.make("devin-streamed-write"); | 1018 | const instanceId = ProviderInstanceId.make("devin-streamed-write"); |
| 1046 | const adapter = makeAcpAdapterV2({ | 1019 | const adapter = yield* makeAcpAdapterV2({ |
| 1047 | instanceId, | 1020 | instanceId, |
| 1048 | crypto: yield* Crypto.Crypto, | | |
| 1049 | fileSystem: yield* FileSystem.FileSystem, | | |
| 1050 | idAllocator: yield* IdAllocator.IdAllocatorV2, | | |
| 1051 | host: yield* ProviderHost.ProviderHost, | | |
| 1052 | selfInvocation: yield* resolveSelfInvocation(), | 1021 | selfInvocation: yield* resolveSelfInvocation(), |
| 1053 | flavor: { | 1022 | flavor: { |
| 1054 | driver: ACP_TEST_DRIVER, | 1023 | driver: ACP_TEST_DRIVER, |
| ... | @@ -1178,7 +1147,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -1178,7 +1147,6 @@ describe("AcpAdapterV2", () => { |
| 1178 | it.effect("keeps Devin parent paragraphs intact while projecting native child work", () => | 1147 | it.effect("keeps Devin parent paragraphs intact while projecting native child work", () => |
| 1179 | Effect.gen(function* () { | 1148 | Effect.gen(function* () { |
| 1180 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 1149 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 1181 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 1182 | const path = yield* Path.Path; | 1150 | const path = yield* Path.Path; |
| 1183 | const mockAgentPath = yield* path.fromFileUrl( | 1151 | const mockAgentPath = yield* path.fromFileUrl( |
| 1184 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 1152 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -1187,14 +1155,10 @@ describe("AcpAdapterV2", () => { | ... | @@ -1187,14 +1155,10 @@ describe("AcpAdapterV2", () => { |
| 1187 | let handler: Parameters<Runtime["handleSessionUpdate"]>[0] | undefined; | 1155 | let handler: Parameters<Runtime["handleSessionUpdate"]>[0] | undefined; |
| 1188 | let createTerminal: Parameters<Runtime["handleCreateTerminal"]>[0] | undefined; | 1156 | let createTerminal: Parameters<Runtime["handleCreateTerminal"]>[0] | undefined; |
| 1189 | const instanceId = ProviderInstanceId.make("devin-replay"); | 1157 | const instanceId = ProviderInstanceId.make("devin-replay"); |
| 1190 | const adapter = makeAcpAdapterV2({ | 1158 | const adapter = yield* makeAcpAdapterV2({ |
| 1191 | instanceId, | 1159 | instanceId, |
| 1192 | // Production Devin runs commands through client terminals. | 1160 | // Production Devin runs commands through client terminals. |
| 1193 | clientTerminals: { childProcessSpawner, shellCommands: true }, | 1161 | clientTerminals: { childProcessSpawner, shellCommands: true }, |
| 1194 | crypto: yield* Crypto.Crypto, | | |
| 1195 | fileSystem: yield* FileSystem.FileSystem, | | |
| 1196 | idAllocator, | | |
| 1197 | host: yield* ProviderHost.ProviderHost, | | |
| 1198 | selfInvocation: yield* resolveSelfInvocation(), | 1162 | selfInvocation: yield* resolveSelfInvocation(), |
| 1199 | flavor: { | 1163 | flavor: { |
| 1200 | driver: ACP_TEST_DRIVER, | 1164 | driver: ACP_TEST_DRIVER, |
| ... | @@ -1511,10 +1475,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -1511,10 +1475,7 @@ describe("AcpAdapterV2", () => { |
| 1511 | it.effect("projects ACP v2 fidelity updates into first-class orchestration items", () => | 1475 | it.effect("projects ACP v2 fidelity updates into first-class orchestration items", () => |
| 1512 | Effect.gen(function* () { | 1476 | Effect.gen(function* () { |
| 1513 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 1477 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 1514 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 1515 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 1516 | const path = yield* Path.Path; | 1478 | const path = yield* Path.Path; |
| 1517 | const host = yield* ProviderHost.ProviderHost; | | |
| 1518 | const selfInvocation = yield* resolveSelfInvocation(); | 1479 | const selfInvocation = yield* resolveSelfInvocation(); |
| 1519 | const mockAgentPath = yield* path.fromFileUrl( | 1480 | const mockAgentPath = yield* path.fromFileUrl( |
| 1520 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 1481 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -1522,8 +1483,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -1522,8 +1483,7 @@ describe("AcpAdapterV2", () => { |
| 1522 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; | 1483 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; |
| 1523 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; | 1484 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; |
| 1524 | const instanceId = ProviderInstanceId.make("acp-test-v2-fidelity"); | 1485 | const instanceId = ProviderInstanceId.make("acp-test-v2-fidelity"); |
| 1525 | const adapter = makeAcpAdapterV2({ | 1486 | const adapter = yield* makeAcpAdapterV2({ |
| 1526 | crypto: yield* Crypto.Crypto, | | |
| 1527 | instanceId, | 1487 | instanceId, |
| 1528 | flavor: { | 1488 | flavor: { |
| 1529 | driver: ACP_TEST_DRIVER, | 1489 | driver: ACP_TEST_DRIVER, |
| ... | @@ -1541,9 +1501,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -1541,9 +1501,6 @@ describe("AcpAdapterV2", () => { |
| 1541 | }), | 1501 | }), |
| 1542 | }), | 1502 | }), |
| 1543 | }, | 1503 | }, |
| 1544 | fileSystem, | | |
| 1545 | idAllocator, | | |
| 1546 | host, | | |
| 1547 | selfInvocation, | 1504 | selfInvocation, |
| 1548 | }); | 1505 | }); |
| 1549 | const threadId = ThreadId.make("thread-acp-v2-fidelity"); | 1506 | const threadId = ThreadId.make("thread-acp-v2-fidelity"); |
| ... | @@ -1705,18 +1662,15 @@ describe("AcpAdapterV2", () => { | ... | @@ -1705,18 +1662,15 @@ describe("AcpAdapterV2", () => { |
| 1705 | () => | 1662 | () => |
| 1706 | Effect.gen(function* () { | 1663 | Effect.gen(function* () { |
| 1707 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 1664 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 1708 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 1709 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 1665 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 1710 | const path = yield* Path.Path; | 1666 | const path = yield* Path.Path; |
| 1711 | const host = yield* ProviderHost.ProviderHost; | | |
| 1712 | const selfInvocation = yield* resolveSelfInvocation(); | 1667 | const selfInvocation = yield* resolveSelfInvocation(); |
| 1713 | const mockAgentPath = yield* path.fromFileUrl( | 1668 | const mockAgentPath = yield* path.fromFileUrl( |
| 1714 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 1669 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| 1715 | ); | 1670 | ); |
| 1716 | const protocolEvents = yield* Queue.unbounded<EffectAcpProtocol.AcpProtocolLogEvent>(); | 1671 | const protocolEvents = yield* Queue.unbounded<EffectAcpProtocol.AcpProtocolLogEvent>(); |
| 1717 | const instanceId = ProviderInstanceId.make("acp-test-eager-resume"); | 1672 | const instanceId = ProviderInstanceId.make("acp-test-eager-resume"); |
| 1718 | const adapter = makeAcpAdapterV2({ | 1673 | const adapter = yield* makeAcpAdapterV2({ |
| 1719 | crypto: yield* Crypto.Crypto, | | |
| 1720 | instanceId, | 1674 | instanceId, |
| 1721 | flavor: { | 1675 | flavor: { |
| 1722 | driver: ACP_TEST_DRIVER, | 1676 | driver: ACP_TEST_DRIVER, |
| ... | @@ -1727,9 +1681,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -1727,9 +1681,6 @@ describe("AcpAdapterV2", () => { |
| 1727 | protocolEvents, | 1681 | protocolEvents, |
| 1728 | }), | 1682 | }), |
| 1729 | }, | 1683 | }, |
| 1730 | fileSystem, | | |
| 1731 | idAllocator, | | |
| 1732 | host, | | |
| 1733 | selfInvocation, | 1684 | selfInvocation, |
| 1734 | }); | 1685 | }); |
| 1735 | const threadId = ThreadId.make("thread-acp-eager-resume"); | 1686 | const threadId = ThreadId.make("thread-acp-eager-resume"); |
| ... | @@ -1790,18 +1741,15 @@ describe("AcpAdapterV2", () => { | ... | @@ -1790,18 +1741,15 @@ describe("AcpAdapterV2", () => { |
| 1790 | it.live("preserves new-session fallback when an eager ACP session load is stale", () => | 1741 | it.live("preserves new-session fallback when an eager ACP session load is stale", () => |
| 1791 | Effect.gen(function* () { | 1742 | Effect.gen(function* () { |
| 1792 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 1743 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 1793 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 1794 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 1744 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 1795 | const path = yield* Path.Path; | 1745 | const path = yield* Path.Path; |
| 1796 | const host = yield* ProviderHost.ProviderHost; | | |
| 1797 | const selfInvocation = yield* resolveSelfInvocation(); | 1746 | const selfInvocation = yield* resolveSelfInvocation(); |
| 1798 | const mockAgentPath = yield* path.fromFileUrl( | 1747 | const mockAgentPath = yield* path.fromFileUrl( |
| 1799 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 1748 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| 1800 | ); | 1749 | ); |
| 1801 | const protocolEvents = yield* Queue.unbounded<EffectAcpProtocol.AcpProtocolLogEvent>(); | 1750 | const protocolEvents = yield* Queue.unbounded<EffectAcpProtocol.AcpProtocolLogEvent>(); |
| 1802 | const instanceId = ProviderInstanceId.make("acp-test-stale-eager-resume"); | 1751 | const instanceId = ProviderInstanceId.make("acp-test-stale-eager-resume"); |
| 1803 | const adapter = makeAcpAdapterV2({ | 1752 | const adapter = yield* makeAcpAdapterV2({ |
| 1804 | crypto: yield* Crypto.Crypto, | | |
| 1805 | instanceId, | 1753 | instanceId, |
| 1806 | flavor: { | 1754 | flavor: { |
| 1807 | driver: ACP_TEST_DRIVER, | 1755 | driver: ACP_TEST_DRIVER, |
| ... | @@ -1814,9 +1762,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -1814,9 +1762,6 @@ describe("AcpAdapterV2", () => { |
| 1814 | runtimeOrdinal === 1 ? { T3_ACP_FAIL_LOAD_SESSION: "1" } : {}, | 1762 | runtimeOrdinal === 1 ? { T3_ACP_FAIL_LOAD_SESSION: "1" } : {}, |
| 1815 | }), | 1763 | }), |
| 1816 | }, | 1764 | }, |
| 1817 | fileSystem, | | |
| 1818 | idAllocator, | | |
| 1819 | host, | | |
| 1820 | selfInvocation, | 1765 | selfInvocation, |
| 1821 | }); | 1766 | }); |
| 1822 | const threadId = ThreadId.make("thread-acp-stale-eager-resume"); | 1767 | const threadId = ThreadId.make("thread-acp-stale-eager-resume"); |
| ... | @@ -1936,10 +1881,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -1936,10 +1881,7 @@ describe("AcpAdapterV2", () => { |
| 1936 | it.live("replaces an unexpectedly terminated ACP runtime before the next turn", () => | 1881 | it.live("replaces an unexpectedly terminated ACP runtime before the next turn", () => |
| 1937 | Effect.gen(function* () { | 1882 | Effect.gen(function* () { |
| 1938 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 1883 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 1939 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 1940 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 1941 | const path = yield* Path.Path; | 1884 | const path = yield* Path.Path; |
| 1942 | const host = yield* ProviderHost.ProviderHost; | | |
| 1943 | const selfInvocation = yield* resolveSelfInvocation(); | 1885 | const selfInvocation = yield* resolveSelfInvocation(); |
| 1944 | const mockAgentPath = yield* path.fromFileUrl( | 1886 | const mockAgentPath = yield* path.fromFileUrl( |
| 1945 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 1887 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -1955,8 +1897,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -1955,8 +1897,7 @@ describe("AcpAdapterV2", () => { |
| 1955 | }, | 1897 | }, |
| 1956 | }); | 1898 | }); |
| 1957 | const instanceId = ProviderInstanceId.make("acp-test-unexpected-termination"); | 1899 | const instanceId = ProviderInstanceId.make("acp-test-unexpected-termination"); |
| 1958 | const adapter = makeAcpAdapterV2({ | 1900 | const adapter = yield* makeAcpAdapterV2({ |
| 1959 | crypto: yield* Crypto.Crypto, | | |
| 1960 | instanceId, | 1901 | instanceId, |
| 1961 | flavor: { | 1902 | flavor: { |
| 1962 | driver: ACP_TEST_DRIVER, | 1903 | driver: ACP_TEST_DRIVER, |
| ... | @@ -1966,9 +1907,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -1966,9 +1907,6 @@ describe("AcpAdapterV2", () => { |
| 1966 | runtimeInputs.push(runtimeInput); | 1907 | runtimeInputs.push(runtimeInput); |
| 1967 | }).pipe(Effect.andThen(baseMakeRuntime(runtimeInput))), | 1908 | }).pipe(Effect.andThen(baseMakeRuntime(runtimeInput))), |
| 1968 | }, | 1909 | }, |
| 1969 | fileSystem, | | |
| 1970 | idAllocator, | | |
| 1971 | host, | | |
| 1972 | selfInvocation, | 1910 | selfInvocation, |
| 1973 | }); | 1911 | }); |
| 1974 | const threadId = ThreadId.make("thread-acp-unexpected-termination"); | 1912 | const threadId = ThreadId.make("thread-acp-unexpected-termination"); |
| ... | @@ -2020,9 +1958,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -2020,9 +1958,7 @@ describe("AcpAdapterV2", () => { |
| 2020 | if ((yield* HostProcessPlatform) !== "linux") return; | 1958 | if ((yield* HostProcessPlatform) !== "linux") return; |
| 2021 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 1959 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 2022 | const fileSystem = yield* FileSystem.FileSystem; | 1960 | const fileSystem = yield* FileSystem.FileSystem; |
| 2023 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 2024 | const path = yield* Path.Path; | 1961 | const path = yield* Path.Path; |
| 2025 | const host = yield* ProviderHost.ProviderHost; | | |
| 2026 | const selfInvocation = yield* resolveSelfInvocation(); | 1962 | const selfInvocation = yield* resolveSelfInvocation(); |
| 2027 | const mockAgentPath = yield* path.fromFileUrl( | 1963 | const mockAgentPath = yield* path.fromFileUrl( |
| 2028 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 1964 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -2034,8 +1970,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -2034,8 +1970,7 @@ describe("AcpAdapterV2", () => { |
| 2034 | Effect.sync(() => cleanupPublishedDetachedFixture(commandPidPath)), | 1970 | Effect.sync(() => cleanupPublishedDetachedFixture(commandPidPath)), |
| 2035 | ); | 1971 | ); |
| 2036 | const instanceId = ProviderInstanceId.make("acp-test-provider-exit"); | 1972 | const instanceId = ProviderInstanceId.make("acp-test-provider-exit"); |
| 2037 | const adapter = makeAcpAdapterV2({ | 1973 | const adapter = yield* makeAcpAdapterV2({ |
| 2038 | crypto: yield* Crypto.Crypto, | | |
| 2039 | instanceId, | 1974 | instanceId, |
| 2040 | flavor: { | 1975 | flavor: { |
| 2041 | driver: ACP_TEST_DRIVER, | 1976 | driver: ACP_TEST_DRIVER, |
| ... | @@ -2055,9 +1990,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -2055,9 +1990,6 @@ describe("AcpAdapterV2", () => { |
| 2055 | }, | 1990 | }, |
| 2056 | }), | 1991 | }), |
| 2057 | }, | 1992 | }, |
| 2058 | fileSystem, | | |
| 2059 | idAllocator, | | |
| 2060 | host, | | |
| 2061 | selfInvocation, | 1993 | selfInvocation, |
| 2062 | }); | 1994 | }); |
| 2063 | const threadId = ThreadId.make("thread-acp-provider-exit-running-command"); | 1995 | const threadId = ThreadId.make("thread-acp-provider-exit-running-command"); |
| ... | @@ -2104,10 +2036,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -2104,10 +2036,7 @@ describe("AcpAdapterV2", () => { |
| 2104 | Effect.gen(function* () { | 2036 | Effect.gen(function* () { |
| 2105 | if ((yield* HostProcessPlatform) !== "linux") return; | 2037 | if ((yield* HostProcessPlatform) !== "linux") return; |
| 2106 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 2038 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 2107 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 2108 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 2109 | const path = yield* Path.Path; | 2039 | const path = yield* Path.Path; |
| 2110 | const host = yield* ProviderHost.ProviderHost; | | |
| 2111 | const selfInvocation = yield* resolveSelfInvocation(); | 2040 | const selfInvocation = yield* resolveSelfInvocation(); |
| 2112 | const mockAgentPath = yield* path.fromFileUrl( | 2041 | const mockAgentPath = yield* path.fromFileUrl( |
| 2113 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 2042 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -2116,8 +2045,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -2116,8 +2045,7 @@ describe("AcpAdapterV2", () => { |
| 2116 | | AcpSessionRuntime.AcpSessionRuntime["Service"]["processContainment"] | 2045 | | AcpSessionRuntime.AcpSessionRuntime["Service"]["processContainment"] |
| 2117 | | undefined; | 2046 | | undefined; |
| 2118 | const instanceId = ProviderInstanceId.make("acp-test-cgroup-unavailable"); | 2047 | const instanceId = ProviderInstanceId.make("acp-test-cgroup-unavailable"); |
| 2119 | const adapter = makeAcpAdapterV2({ | 2048 | const adapter = yield* makeAcpAdapterV2({ |
| 2120 | crypto: yield* Crypto.Crypto, | | |
| 2121 | instanceId, | 2049 | instanceId, |
| 2122 | flavor: { | 2050 | flavor: { |
| 2123 | driver: ACP_TEST_DRIVER, | 2051 | driver: ACP_TEST_DRIVER, |
| ... | @@ -2134,9 +2062,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -2134,9 +2062,6 @@ describe("AcpAdapterV2", () => { |
| 2134 | }, | 2062 | }, |
| 2135 | }), | 2063 | }), |
| 2136 | }, | 2064 | }, |
| 2137 | fileSystem, | | |
| 2138 | idAllocator, | | |
| 2139 | host, | | |
| 2140 | selfInvocation, | 2065 | selfInvocation, |
| 2141 | }); | 2066 | }); |
| 2142 | const threadId = ThreadId.make("thread-acp-cgroup-unavailable"); | 2067 | const threadId = ThreadId.make("thread-acp-cgroup-unavailable"); |
| ... | @@ -2160,10 +2085,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -2160,10 +2085,7 @@ describe("AcpAdapterV2", () => { |
| 2160 | it.live("cleans a cgroup lease when the pre-exec join wrapper fails", () => | 2085 | it.live("cleans a cgroup lease when the pre-exec join wrapper fails", () => |
| 2161 | Effect.gen(function* () { | 2086 | Effect.gen(function* () { |
| 2162 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 2087 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 2163 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 2164 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 2165 | const path = yield* Path.Path; | 2088 | const path = yield* Path.Path; |
| 2166 | const host = yield* ProviderHost.ProviderHost; | | |
| 2167 | const selfInvocation = yield* resolveSelfInvocation(); | 2089 | const selfInvocation = yield* resolveSelfInvocation(); |
| 2168 | const mockAgentPath = yield* path.fromFileUrl( | 2090 | const mockAgentPath = yield* path.fromFileUrl( |
| 2169 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 2091 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -2192,8 +2114,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -2192,8 +2114,7 @@ describe("AcpAdapterV2", () => { |
| 2192 | }, | 2114 | }, |
| 2193 | }; | 2115 | }; |
| 2194 | const instanceId = ProviderInstanceId.make("acp-test-cgroup-join-failure"); | 2116 | const instanceId = ProviderInstanceId.make("acp-test-cgroup-join-failure"); |
| 2195 | const adapter = makeAcpAdapterV2({ | 2117 | const adapter = yield* makeAcpAdapterV2({ |
| 2196 | crypto: yield* Crypto.Crypto, | | |
| 2197 | instanceId, | 2118 | instanceId, |
| 2198 | flavor: { | 2119 | flavor: { |
| 2199 | driver: ACP_TEST_DRIVER, | 2120 | driver: ACP_TEST_DRIVER, |
| ... | @@ -2206,9 +2127,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -2206,9 +2127,6 @@ describe("AcpAdapterV2", () => { |
| 2206 | ownDetachedProcessGroup: true, | 2127 | ownDetachedProcessGroup: true, |
| 2207 | }), | 2128 | }), |
| 2208 | }, | 2129 | }, |
| 2209 | fileSystem, | | |
| 2210 | idAllocator, | | |
| 2211 | host, | | |
| 2212 | selfInvocation, | 2130 | selfInvocation, |
| 2213 | }); | 2131 | }); |
| 2214 | const threadId = ThreadId.make("thread-acp-cgroup-join-failure"); | 2132 | const threadId = ThreadId.make("thread-acp-cgroup-join-failure"); |
| ... | @@ -2238,10 +2156,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -2238,10 +2156,7 @@ describe("AcpAdapterV2", () => { |
| 2238 | it.effect("negotiates and executes optional native session forks through the ACP runtime", () => | 2156 | it.effect("negotiates and executes optional native session forks through the ACP runtime", () => |
| 2239 | Effect.gen(function* () { | 2157 | Effect.gen(function* () { |
| 2240 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 2158 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 2241 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 2242 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 2243 | const path = yield* Path.Path; | 2159 | const path = yield* Path.Path; |
| 2244 | const host = yield* ProviderHost.ProviderHost; | | |
| 2245 | const selfInvocation = yield* resolveSelfInvocation(); | 2160 | const selfInvocation = yield* resolveSelfInvocation(); |
| 2246 | const mockAgentPath = yield* path.fromFileUrl( | 2161 | const mockAgentPath = yield* path.fromFileUrl( |
| 2247 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 2162 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -2275,17 +2190,13 @@ describe("AcpAdapterV2", () => { | ... | @@ -2275,17 +2190,13 @@ describe("AcpAdapterV2", () => { |
| 2275 | }); | 2190 | }); |
| 2276 | | 2191 | |
| 2277 | const instanceId = ProviderInstanceId.make("acp-test"); | 2192 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 2278 | const adapter = makeAcpAdapterV2({ | 2193 | const adapter = yield* makeAcpAdapterV2({ |
| 2279 | crypto: yield* Crypto.Crypto, | | |
| 2280 | instanceId, | 2194 | instanceId, |
| 2281 | flavor: { | 2195 | flavor: { |
| 2282 | driver: ACP_TEST_DRIVER, | 2196 | driver: ACP_TEST_DRIVER, |
| 2283 | capabilities: AcpProviderCapabilitiesV2, | 2197 | capabilities: AcpProviderCapabilitiesV2, |
| 2284 | makeRuntime, | 2198 | makeRuntime, |
| 2285 | }, | 2199 | }, |
| 2286 | fileSystem, | | |
| 2287 | idAllocator, | | |
| 2288 | host, | | |
| 2289 | selfInvocation, | 2200 | selfInvocation, |
| 2290 | clientTerminals: { childProcessSpawner }, | 2201 | clientTerminals: { childProcessSpawner }, |
| 2291 | }); | 2202 | }); |
| ... | @@ -2451,9 +2362,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -2451,9 +2362,7 @@ describe("AcpAdapterV2", () => { |
| 2451 | Effect.gen(function* () { | 2362 | Effect.gen(function* () { |
| 2452 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 2363 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 2453 | const fileSystem = yield* FileSystem.FileSystem; | 2364 | const fileSystem = yield* FileSystem.FileSystem; |
| 2454 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 2455 | const path = yield* Path.Path; | 2365 | const path = yield* Path.Path; |
| 2456 | const host = yield* ProviderHost.ProviderHost; | | |
| 2457 | const selfInvocation = yield* resolveSelfInvocation(); | 2366 | const selfInvocation = yield* resolveSelfInvocation(); |
| 2458 | const mockAgentPath = yield* path.fromFileUrl( | 2367 | const mockAgentPath = yield* path.fromFileUrl( |
| 2459 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 2368 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -2465,8 +2374,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -2465,8 +2374,7 @@ describe("AcpAdapterV2", () => { |
| 2465 | const probeLogPath = path.join(workspace, "fs-probe.jsonl"); | 2374 | const probeLogPath = path.join(workspace, "fs-probe.jsonl"); |
| 2466 | const protocolEvents = yield* Queue.unbounded<EffectAcpProtocol.AcpProtocolLogEvent>(); | 2375 | const protocolEvents = yield* Queue.unbounded<EffectAcpProtocol.AcpProtocolLogEvent>(); |
| 2467 | const instanceId = ProviderInstanceId.make("acp-test-no-client-fs"); | 2376 | const instanceId = ProviderInstanceId.make("acp-test-no-client-fs"); |
| 2468 | const adapter = makeAcpAdapterV2({ | 2377 | const adapter = yield* makeAcpAdapterV2({ |
| 2469 | crypto: yield* Crypto.Crypto, | | |
| 2470 | instanceId, | 2378 | instanceId, |
| 2471 | flavor: { | 2379 | flavor: { |
| 2472 | driver: ACP_TEST_DRIVER, | 2380 | driver: ACP_TEST_DRIVER, |
| ... | @@ -2481,9 +2389,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -2481,9 +2389,6 @@ describe("AcpAdapterV2", () => { |
| 2481 | }, | 2389 | }, |
| 2482 | }), | 2390 | }), |
| 2483 | }, | 2391 | }, |
| 2484 | fileSystem, | | |
| 2485 | idAllocator, | | |
| 2486 | host, | | |
| 2487 | selfInvocation, | 2392 | selfInvocation, |
| 2488 | }); | 2393 | }); |
| 2489 | const threadId = ThreadId.make("thread-acp-no-client-fs"); | 2394 | const threadId = ThreadId.make("thread-acp-no-client-fs"); |
| ... | @@ -2547,10 +2452,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -2547,10 +2452,7 @@ describe("AcpAdapterV2", () => { |
| 2547 | it.effect("does not turn an unknown permission approval into an execute grant", () => | 2452 | it.effect("does not turn an unknown permission approval into an execute grant", () => |
| 2548 | Effect.gen(function* () { | 2453 | Effect.gen(function* () { |
| 2549 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 2454 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 2550 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 2551 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 2552 | const path = yield* Path.Path; | 2455 | const path = yield* Path.Path; |
| 2553 | const host = yield* ProviderHost.ProviderHost; | | |
| 2554 | const selfInvocation = yield* resolveSelfInvocation(); | 2456 | const selfInvocation = yield* resolveSelfInvocation(); |
| 2555 | const mockAgentPath = yield* path.fromFileUrl( | 2457 | const mockAgentPath = yield* path.fromFileUrl( |
| 2556 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 2458 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -2576,8 +2478,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -2576,8 +2478,7 @@ describe("AcpAdapterV2", () => { |
| 2576 | }), | 2478 | }), |
| 2577 | }); | 2479 | }); |
| 2578 | const instanceId = ProviderInstanceId.make("acp-test-unknown-permission-grant"); | 2480 | const instanceId = ProviderInstanceId.make("acp-test-unknown-permission-grant"); |
| 2579 | const adapter = makeAcpAdapterV2({ | 2481 | const adapter = yield* makeAcpAdapterV2({ |
| 2580 | crypto: yield* Crypto.Crypto, | | |
| 2581 | instanceId, | 2482 | instanceId, |
| 2582 | flavor: { | 2483 | flavor: { |
| 2583 | driver: ACP_TEST_DRIVER, | 2484 | driver: ACP_TEST_DRIVER, |
| ... | @@ -2588,9 +2489,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -2588,9 +2489,6 @@ describe("AcpAdapterV2", () => { |
| 2588 | runtimeInput = input; | 2489 | runtimeInput = input; |
| 2589 | }).pipe(Effect.andThen(makeRuntime(input))), | 2490 | }).pipe(Effect.andThen(makeRuntime(input))), |
| 2590 | }, | 2491 | }, |
| 2591 | fileSystem, | | |
| 2592 | idAllocator, | | |
| 2593 | host, | | |
| 2594 | selfInvocation, | 2492 | selfInvocation, |
| 2595 | clientTerminals: { childProcessSpawner }, | 2493 | clientTerminals: { childProcessSpawner }, |
| 2596 | }); | 2494 | }); |
| ... | @@ -2684,26 +2582,19 @@ describe("AcpAdapterV2", () => { | ... | @@ -2684,26 +2582,19 @@ describe("AcpAdapterV2", () => { |
| 2684 | it.effect("fails missing native ACP session ids through the typed start-turn error channel", () => | 2582 | it.effect("fails missing native ACP session ids through the typed start-turn error channel", () => |
| 2685 | Effect.gen(function* () { | 2583 | Effect.gen(function* () { |
| 2686 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 2584 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 2687 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 2688 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 2689 | const path = yield* Path.Path; | 2585 | const path = yield* Path.Path; |
| 2690 | const host = yield* ProviderHost.ProviderHost; | | |
| 2691 | const selfInvocation = yield* resolveSelfInvocation(); | 2586 | const selfInvocation = yield* resolveSelfInvocation(); |
| 2692 | const mockAgentPath = yield* path.fromFileUrl( | 2587 | const mockAgentPath = yield* path.fromFileUrl( |
| 2693 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 2588 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| 2694 | ); | 2589 | ); |
| 2695 | const instanceId = ProviderInstanceId.make("acp-test-missing-native-thread"); | 2590 | const instanceId = ProviderInstanceId.make("acp-test-missing-native-thread"); |
| 2696 | const adapter = makeAcpAdapterV2({ | 2591 | const adapter = yield* makeAcpAdapterV2({ |
| 2697 | crypto: yield* Crypto.Crypto, | | |
| 2698 | instanceId, | 2592 | instanceId, |
| 2699 | flavor: { | 2593 | flavor: { |
| 2700 | driver: ACP_TEST_DRIVER, | 2594 | driver: ACP_TEST_DRIVER, |
| 2701 | capabilities: AcpProviderCapabilitiesV2, | 2595 | capabilities: AcpProviderCapabilitiesV2, |
| 2702 | makeRuntime: makeMockRuntime({ childProcessSpawner, mockAgentPath }), | 2596 | makeRuntime: makeMockRuntime({ childProcessSpawner, mockAgentPath }), |
| 2703 | }, | 2597 | }, |
| 2704 | fileSystem, | | |
| 2705 | idAllocator, | | |
| 2706 | host, | | |
| 2707 | selfInvocation, | 2598 | selfInvocation, |
| 2708 | }); | 2599 | }); |
| 2709 | const threadId = ThreadId.make("thread-acp-missing-native-thread"); | 2600 | const threadId = ThreadId.make("thread-acp-missing-native-thread"); |
| ... | @@ -2746,10 +2637,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -2746,10 +2637,8 @@ describe("AcpAdapterV2", () => { |
| 2746 | it.effect("replaces the ACP session and clears conversation state on rollback", () => | 2637 | it.effect("replaces the ACP session and clears conversation state on rollback", () => |
| 2747 | Effect.gen(function* () { | 2638 | Effect.gen(function* () { |
| 2748 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 2639 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 2749 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 2750 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 2640 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 2751 | const path = yield* Path.Path; | 2641 | const path = yield* Path.Path; |
| 2752 | const host = yield* ProviderHost.ProviderHost; | | |
| 2753 | const selfInvocation = yield* resolveSelfInvocation(); | 2642 | const selfInvocation = yield* resolveSelfInvocation(); |
| 2754 | const mockAgentPath = yield* path.fromFileUrl( | 2643 | const mockAgentPath = yield* path.fromFileUrl( |
| 2755 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 2644 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -2774,8 +2663,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -2774,8 +2663,7 @@ describe("AcpAdapterV2", () => { |
| 2774 | mockAgentPath, | 2663 | mockAgentPath, |
| 2775 | environment: { T3_ACP_PROMPT_DELAY_MS: "100" }, | 2664 | environment: { T3_ACP_PROMPT_DELAY_MS: "100" }, |
| 2776 | }); | 2665 | }); |
| 2777 | const adapter = makeAcpAdapterV2({ | 2666 | const adapter = yield* makeAcpAdapterV2({ |
| 2778 | crypto: yield* Crypto.Crypto, | | |
| 2779 | instanceId, | 2667 | instanceId, |
| 2780 | flavor: { | 2668 | flavor: { |
| 2781 | driver: ACP_TEST_DRIVER, | 2669 | driver: ACP_TEST_DRIVER, |
| ... | @@ -2785,9 +2673,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -2785,9 +2673,6 @@ describe("AcpAdapterV2", () => { |
| 2785 | Effect.andThen(makeRuntime(runtimeInput)), | 2673 | Effect.andThen(makeRuntime(runtimeInput)), |
| 2786 | ), | 2674 | ), |
| 2787 | }, | 2675 | }, |
| 2788 | fileSystem, | | |
| 2789 | idAllocator, | | |
| 2790 | host, | | |
| 2791 | selfInvocation, | 2676 | selfInvocation, |
| 2792 | }); | 2677 | }); |
| 2793 | const threadId = ThreadId.make("thread-acp-rollback-session"); | 2678 | const threadId = ThreadId.make("thread-acp-rollback-session"); |
| ... | @@ -2913,10 +2798,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -2913,10 +2798,7 @@ describe("AcpAdapterV2", () => { |
| 2913 | it.effect("quarantines callbacks from a failed rollback replacement before retrying", () => | 2798 | it.effect("quarantines callbacks from a failed rollback replacement before retrying", () => |
| 2914 | Effect.gen(function* () { | 2799 | Effect.gen(function* () { |
| 2915 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 2800 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 2916 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 2917 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 2918 | const path = yield* Path.Path; | 2801 | const path = yield* Path.Path; |
| 2919 | const host = yield* ProviderHost.ProviderHost; | | |
| 2920 | const selfInvocation = yield* resolveSelfInvocation(); | 2802 | const selfInvocation = yield* resolveSelfInvocation(); |
| 2921 | const mockAgentPath = yield* path.fromFileUrl( | 2803 | const mockAgentPath = yield* path.fromFileUrl( |
| 2922 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 2804 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -2979,8 +2861,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -2979,8 +2861,7 @@ describe("AcpAdapterV2", () => { |
| 2979 | }, | 2861 | }, |
| 2980 | }); | 2862 | }); |
| 2981 | const instanceId = ProviderInstanceId.make("acp-test-rollback-retry-generation"); | 2863 | const instanceId = ProviderInstanceId.make("acp-test-rollback-retry-generation"); |
| 2982 | const adapter = makeAcpAdapterV2({ | 2864 | const adapter = yield* makeAcpAdapterV2({ |
| 2983 | crypto: yield* Crypto.Crypto, | | |
| 2984 | instanceId, | 2865 | instanceId, |
| 2985 | flavor: { | 2866 | flavor: { |
| 2986 | driver: ACP_TEST_DRIVER, | 2867 | driver: ACP_TEST_DRIVER, |
| ... | @@ -2998,9 +2879,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -2998,9 +2879,6 @@ describe("AcpAdapterV2", () => { |
| 2998 | }), | 2879 | }), |
| 2999 | makeRuntime, | 2880 | makeRuntime, |
| 3000 | }, | 2881 | }, |
| 3001 | fileSystem, | | |
| 3002 | idAllocator, | | |
| 3003 | host, | | |
| 3004 | selfInvocation, | 2882 | selfInvocation, |
| 3005 | continuationRequests: { offer: () => Effect.void }, | 2883 | continuationRequests: { offer: () => Effect.void }, |
| 3006 | }); | 2884 | }); |
| ... | @@ -3074,10 +2952,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -3074,10 +2952,8 @@ describe("AcpAdapterV2", () => { |
| 3074 | it.effect("keeps the original ACP session usable when a staged replacement terminates", () => | 2952 | it.effect("keeps the original ACP session usable when a staged replacement terminates", () => |
| 3075 | Effect.gen(function* () { | 2953 | Effect.gen(function* () { |
| 3076 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 2954 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 3077 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 3078 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 2955 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 3079 | const path = yield* Path.Path; | 2956 | const path = yield* Path.Path; |
| 3080 | const host = yield* ProviderHost.ProviderHost; | | |
| 3081 | const selfInvocation = yield* resolveSelfInvocation(); | 2957 | const selfInvocation = yield* resolveSelfInvocation(); |
| 3082 | const mockAgentPath = yield* path.fromFileUrl( | 2958 | const mockAgentPath = yield* path.fromFileUrl( |
| 3083 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 2959 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -3109,17 +2985,13 @@ describe("AcpAdapterV2", () => { | ... | @@ -3109,17 +2985,13 @@ describe("AcpAdapterV2", () => { |
| 3109 | }; | 2985 | }; |
| 3110 | }); | 2986 | }); |
| 3111 | const instanceId = ProviderInstanceId.make("acp-test-rollback-failure-compensation"); | 2987 | const instanceId = ProviderInstanceId.make("acp-test-rollback-failure-compensation"); |
| 3112 | const adapter = makeAcpAdapterV2({ | 2988 | const adapter = yield* makeAcpAdapterV2({ |
| 3113 | crypto: yield* Crypto.Crypto, | | |
| 3114 | instanceId, | 2989 | instanceId, |
| 3115 | flavor: { | 2990 | flavor: { |
| 3116 | driver: ACP_TEST_DRIVER, | 2991 | driver: ACP_TEST_DRIVER, |
| 3117 | capabilities: AcpProviderCapabilitiesV2, | 2992 | capabilities: AcpProviderCapabilitiesV2, |
| 3118 | makeRuntime, | 2993 | makeRuntime, |
| 3119 | }, | 2994 | }, |
| 3120 | fileSystem, | | |
| 3121 | idAllocator, | | |
| 3122 | host, | | |
| 3123 | selfInvocation, | 2995 | selfInvocation, |
| 3124 | }); | 2996 | }); |
| 3125 | const threadId = ThreadId.make("thread-acp-rollback-failure-compensation"); | 2997 | const threadId = ThreadId.make("thread-acp-rollback-failure-compensation"); |
| ... | @@ -3190,27 +3062,20 @@ describe("AcpAdapterV2", () => { | ... | @@ -3190,27 +3062,20 @@ describe("AcpAdapterV2", () => { |
| 3190 | it.effect("closes an idle ACP session exactly once through the transition permit", () => | 3062 | it.effect("closes an idle ACP session exactly once through the transition permit", () => |
| 3191 | Effect.gen(function* () { | 3063 | Effect.gen(function* () { |
| 3192 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 3064 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 3193 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 3194 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 3195 | const path = yield* Path.Path; | 3065 | const path = yield* Path.Path; |
| 3196 | const host = yield* ProviderHost.ProviderHost; | | |
| 3197 | const selfInvocation = yield* resolveSelfInvocation(); | 3066 | const selfInvocation = yield* resolveSelfInvocation(); |
| 3198 | const mockAgentPath = yield* path.fromFileUrl( | 3067 | const mockAgentPath = yield* path.fromFileUrl( |
| 3199 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 3068 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| 3200 | ); | 3069 | ); |
| 3201 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); | 3070 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); |
| 3202 | const instanceId = ProviderInstanceId.make("acp-test"); | 3071 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 3203 | const adapter = makeAcpAdapterV2({ | 3072 | const adapter = yield* makeAcpAdapterV2({ |
| 3204 | crypto: yield* Crypto.Crypto, | | |
| 3205 | instanceId, | 3073 | instanceId, |
| 3206 | flavor: { | 3074 | flavor: { |
| 3207 | driver: ACP_TEST_DRIVER, | 3075 | driver: ACP_TEST_DRIVER, |
| 3208 | capabilities: AcpProviderCapabilitiesV2, | 3076 | capabilities: AcpProviderCapabilitiesV2, |
| 3209 | makeRuntime: makeMockRuntime({ childProcessSpawner, mockAgentPath, protocolEvents }), | 3077 | makeRuntime: makeMockRuntime({ childProcessSpawner, mockAgentPath, protocolEvents }), |
| 3210 | }, | 3078 | }, |
| 3211 | fileSystem, | | |
| 3212 | idAllocator, | | |
| 3213 | host, | | |
| 3214 | selfInvocation, | 3079 | selfInvocation, |
| 3215 | }); | 3080 | }); |
| 3216 | const threadId = ThreadId.make("thread-acp-idle-finalizer"); | 3081 | const threadId = ThreadId.make("thread-acp-idle-finalizer"); |
| ... | @@ -3241,26 +3106,18 @@ describe("AcpAdapterV2", () => { | ... | @@ -3241,26 +3106,18 @@ describe("AcpAdapterV2", () => { |
| 3241 | (model) => | 3106 | (model) => |
| 3242 | Effect.gen(function* () { | 3107 | Effect.gen(function* () { |
| 3243 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 3108 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 3244 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 3245 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 3246 | const path = yield* Path.Path; | 3109 | const path = yield* Path.Path; |
| 3247 | const host = yield* ProviderHost.ProviderHost; | | |
| 3248 | const selfInvocation = yield* resolveSelfInvocation(); | 3110 | const selfInvocation = yield* resolveSelfInvocation(); |
| 3249 | const mockAgentPath = yield* path.fromFileUrl( | 3111 | const mockAgentPath = yield* path.fromFileUrl( |
| 3250 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 3112 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| 3251 | ); | 3113 | ); |
| 3252 | const protocolEvents = yield* Queue.unbounded<EffectAcpProtocol.AcpProtocolLogEvent>(); | 3114 | const protocolEvents = yield* Queue.unbounded<EffectAcpProtocol.AcpProtocolLogEvent>(); |
| 3253 | const instanceId = ProviderInstanceId.make("grok-test"); | 3115 | const instanceId = ProviderInstanceId.make("grok-test"); |
| 3254 | const adapter = makeGrokAdapterV2({ | 3116 | const adapter = yield* makeGrokAdapterV2({ |
| 3255 | instanceId, | 3117 | instanceId, |
| 3256 | settings: DEFAULT_GROK_SETTINGS, | 3118 | settings: DEFAULT_GROK_SETTINGS, |
| 3257 | environment: {}, | 3119 | environment: {}, |
| 3258 | hostPlatform: yield* HostProcessPlatform, | 3120 | hostPlatform: yield* HostProcessPlatform, |
| 3259 | childProcessSpawner, | | |
| 3260 | crypto: yield* Crypto.Crypto, | | |
| 3261 | fileSystem, | | |
| 3262 | idAllocator, | | |
| 3263 | host, | | |
| 3264 | selfInvocation: yield* resolveSelfInvocation(), | 3121 | selfInvocation: yield* resolveSelfInvocation(), |
| 3265 | // Production Grok runtimes are wrapped by the x.ai prompt runtime. | 3122 | // Production Grok runtimes are wrapped by the x.ai prompt runtime. |
| 3266 | makeRuntime: (input) => | 3123 | makeRuntime: (input) => |
| ... | @@ -3296,26 +3153,18 @@ describe("AcpAdapterV2", () => { | ... | @@ -3296,26 +3153,18 @@ describe("AcpAdapterV2", () => { |
| 3296 | it.live("Grok reapplies an explicit return to the session's setup-time model", () => | 3153 | it.live("Grok reapplies an explicit return to the session's setup-time model", () => |
| 3297 | Effect.gen(function* () { | 3154 | Effect.gen(function* () { |
| 3298 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 3155 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 3299 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 3300 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 3301 | const path = yield* Path.Path; | 3156 | const path = yield* Path.Path; |
| 3302 | const host = yield* ProviderHost.ProviderHost; | | |
| 3303 | const selfInvocation = yield* resolveSelfInvocation(); | 3157 | const selfInvocation = yield* resolveSelfInvocation(); |
| 3304 | const mockAgentPath = yield* path.fromFileUrl( | 3158 | const mockAgentPath = yield* path.fromFileUrl( |
| 3305 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 3159 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| 3306 | ); | 3160 | ); |
| 3307 | const protocolEvents = yield* Queue.unbounded<EffectAcpProtocol.AcpProtocolLogEvent>(); | 3161 | const protocolEvents = yield* Queue.unbounded<EffectAcpProtocol.AcpProtocolLogEvent>(); |
| 3308 | const instanceId = ProviderInstanceId.make("grok-test-switch-back"); | 3162 | const instanceId = ProviderInstanceId.make("grok-test-switch-back"); |
| 3309 | const adapter = makeGrokAdapterV2({ | 3163 | const adapter = yield* makeGrokAdapterV2({ |
| 3310 | instanceId, | 3164 | instanceId, |
| 3311 | settings: DEFAULT_GROK_SETTINGS, | 3165 | settings: DEFAULT_GROK_SETTINGS, |
| 3312 | environment: {}, | 3166 | environment: {}, |
| 3313 | hostPlatform: yield* HostProcessPlatform, | 3167 | hostPlatform: yield* HostProcessPlatform, |
| 3314 | childProcessSpawner, | | |
| 3315 | crypto: yield* Crypto.Crypto, | | |
| 3316 | fileSystem, | | |
| 3317 | idAllocator, | | |
| 3318 | host, | | |
| 3319 | selfInvocation: yield* resolveSelfInvocation(), | 3168 | selfInvocation: yield* resolveSelfInvocation(), |
| 3320 | // Production Grok runtimes are wrapped by the x.ai prompt runtime. | 3169 | // Production Grok runtimes are wrapped by the x.ai prompt runtime. |
| 3321 | makeRuntime: (input) => | 3170 | makeRuntime: (input) => |
| ... | @@ -3377,26 +3226,19 @@ describe("AcpAdapterV2", () => { | ... | @@ -3377,26 +3226,19 @@ describe("AcpAdapterV2", () => { |
| 3377 | it.effect("skips requested options that the active ACP session does not expose", () => | 3226 | it.effect("skips requested options that the active ACP session does not expose", () => |
| 3378 | Effect.gen(function* () { | 3227 | Effect.gen(function* () { |
| 3379 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 3228 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 3380 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 3381 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 3382 | const path = yield* Path.Path; | 3229 | const path = yield* Path.Path; |
| 3383 | const host = yield* ProviderHost.ProviderHost; | | |
| 3384 | const selfInvocation = yield* resolveSelfInvocation(); | 3230 | const selfInvocation = yield* resolveSelfInvocation(); |
| 3385 | const mockAgentPath = yield* path.fromFileUrl( | 3231 | const mockAgentPath = yield* path.fromFileUrl( |
| 3386 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 3232 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| 3387 | ); | 3233 | ); |
| 3388 | const instanceId = ProviderInstanceId.make("acp-test"); | 3234 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 3389 | const adapter = makeAcpAdapterV2({ | 3235 | const adapter = yield* makeAcpAdapterV2({ |
| 3390 | crypto: yield* Crypto.Crypto, | | |
| 3391 | instanceId, | 3236 | instanceId, |
| 3392 | flavor: { | 3237 | flavor: { |
| 3393 | driver: ACP_TEST_DRIVER, | 3238 | driver: ACP_TEST_DRIVER, |
| 3394 | capabilities: AcpProviderCapabilitiesV2, | 3239 | capabilities: AcpProviderCapabilitiesV2, |
| 3395 | makeRuntime: makeMockRuntime({ childProcessSpawner, mockAgentPath }), | 3240 | makeRuntime: makeMockRuntime({ childProcessSpawner, mockAgentPath }), |
| 3396 | }, | 3241 | }, |
| 3397 | fileSystem, | | |
| 3398 | idAllocator, | | |
| 3399 | host, | | |
| 3400 | selfInvocation, | 3242 | selfInvocation, |
| 3401 | }); | 3243 | }); |
| 3402 | const threadId = ThreadId.make("thread-acp-unsupported-option"); | 3244 | const threadId = ThreadId.make("thread-acp-unsupported-option"); |
| ... | @@ -3426,27 +3268,20 @@ describe("AcpAdapterV2", () => { | ... | @@ -3426,27 +3268,20 @@ describe("AcpAdapterV2", () => { |
| 3426 | it.effect("reconfigures a loaded ACP session from its own active setup metadata", () => | 3268 | it.effect("reconfigures a loaded ACP session from its own active setup metadata", () => |
| 3427 | Effect.gen(function* () { | 3269 | Effect.gen(function* () { |
| 3428 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 3270 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 3429 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 3430 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 3431 | const path = yield* Path.Path; | 3271 | const path = yield* Path.Path; |
| 3432 | const host = yield* ProviderHost.ProviderHost; | | |
| 3433 | const selfInvocation = yield* resolveSelfInvocation(); | 3272 | const selfInvocation = yield* resolveSelfInvocation(); |
| 3434 | const mockAgentPath = yield* path.fromFileUrl( | 3273 | const mockAgentPath = yield* path.fromFileUrl( |
| 3435 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 3274 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| 3436 | ); | 3275 | ); |
| 3437 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); | 3276 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); |
| 3438 | const instanceId = ProviderInstanceId.make("acp-test"); | 3277 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 3439 | const adapter = makeAcpAdapterV2({ | 3278 | const adapter = yield* makeAcpAdapterV2({ |
| 3440 | crypto: yield* Crypto.Crypto, | | |
| 3441 | instanceId, | 3279 | instanceId, |
| 3442 | flavor: { | 3280 | flavor: { |
| 3443 | driver: ACP_TEST_DRIVER, | 3281 | driver: ACP_TEST_DRIVER, |
| 3444 | capabilities: AcpProviderCapabilitiesV2, | 3282 | capabilities: AcpProviderCapabilitiesV2, |
| 3445 | makeRuntime: makeMockRuntime({ childProcessSpawner, mockAgentPath, protocolEvents }), | 3283 | makeRuntime: makeMockRuntime({ childProcessSpawner, mockAgentPath, protocolEvents }), |
| 3446 | }, | 3284 | }, |
| 3447 | fileSystem, | | |
| 3448 | idAllocator, | | |
| 3449 | host, | | |
| 3450 | selfInvocation, | 3285 | selfInvocation, |
| 3451 | }); | 3286 | }); |
| 3452 | const firstThreadId = ThreadId.make("thread-acp-active-setup:first"); | 3287 | const firstThreadId = ThreadId.make("thread-acp-active-setup:first"); |
| ... | @@ -3537,18 +3372,15 @@ describe("AcpAdapterV2", () => { | ... | @@ -3537,18 +3372,15 @@ describe("AcpAdapterV2", () => { |
| 3537 | it.live("terminalizes an empty successful foreground Bash tool when the turn completes", () => | 3372 | it.live("terminalizes an empty successful foreground Bash tool when the turn completes", () => |
| 3538 | Effect.gen(function* () { | 3373 | Effect.gen(function* () { |
| 3539 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 3374 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 3540 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 3541 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 3375 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 3542 | const path = yield* Path.Path; | 3376 | const path = yield* Path.Path; |
| 3543 | const host = yield* ProviderHost.ProviderHost; | | |
| 3544 | const selfInvocation = yield* resolveSelfInvocation(); | 3377 | const selfInvocation = yield* resolveSelfInvocation(); |
| 3545 | const mockAgentPath = yield* path.fromFileUrl( | 3378 | const mockAgentPath = yield* path.fromFileUrl( |
| 3546 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 3379 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| 3547 | ); | 3380 | ); |
| 3548 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); | 3381 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); |
| 3549 | const instanceId = ProviderInstanceId.make("acp-test"); | 3382 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 3550 | const adapter = makeAcpAdapterV2({ | 3383 | const adapter = yield* makeAcpAdapterV2({ |
| 3551 | crypto: yield* Crypto.Crypto, | | |
| 3552 | instanceId, | 3384 | instanceId, |
| 3553 | flavor: { | 3385 | flavor: { |
| 3554 | driver: ACP_TEST_DRIVER, | 3386 | driver: ACP_TEST_DRIVER, |
| ... | @@ -3565,9 +3397,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -3565,9 +3397,6 @@ describe("AcpAdapterV2", () => { |
| 3565 | restartRuntimeAfterInterrupt: true, | 3397 | restartRuntimeAfterInterrupt: true, |
| 3566 | terminateRuntimeProcessGroupOnInterrupt: true, | 3398 | terminateRuntimeProcessGroupOnInterrupt: true, |
| 3567 | }, | 3399 | }, |
| 3568 | fileSystem, | | |
| 3569 | idAllocator, | | |
| 3570 | host, | | |
| 3571 | selfInvocation, | 3400 | selfInvocation, |
| 3572 | }); | 3401 | }); |
| 3573 | const threadId = ThreadId.make("thread-acp-empty-successful-bash"); | 3402 | const threadId = ThreadId.make("thread-acp-empty-successful-bash"); |
| ... | @@ -3684,16 +3513,12 @@ describe("AcpAdapterV2", () => { | ... | @@ -3684,16 +3513,12 @@ describe("AcpAdapterV2", () => { |
| 3684 | it.effect("drains native ACP cancellation before admitting the next prompt", () => | 3513 | it.effect("drains native ACP cancellation before admitting the next prompt", () => |
| 3685 | Effect.gen(function* () { | 3514 | Effect.gen(function* () { |
| 3686 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 3515 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 3687 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 3688 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 3689 | const path = yield* Path.Path; | 3516 | const path = yield* Path.Path; |
| 3690 | const host = yield* ProviderHost.ProviderHost; | | |
| 3691 | const selfInvocation = yield* resolveSelfInvocation(); | 3517 | const selfInvocation = yield* resolveSelfInvocation(); |
| 3692 | const protocolEvents = yield* Queue.unbounded<EffectAcpProtocol.AcpProtocolLogEvent>(); | 3518 | const protocolEvents = yield* Queue.unbounded<EffectAcpProtocol.AcpProtocolLogEvent>(); |
| 3693 | const native: { current?: AcpSessionRuntime.AcpSessionRuntime["Service"] } = {}; | 3519 | const native: { current?: AcpSessionRuntime.AcpSessionRuntime["Service"] } = {}; |
| 3694 | const instanceId = ProviderInstanceId.make("acp-native-cancel"); | 3520 | const instanceId = ProviderInstanceId.make("acp-native-cancel"); |
| 3695 | const adapter = makeAcpAdapterV2({ | 3521 | const adapter = yield* makeAcpAdapterV2({ |
| 3696 | crypto: yield* Crypto.Crypto, | | |
| 3697 | instanceId, | 3522 | instanceId, |
| 3698 | flavor: { | 3523 | flavor: { |
| 3699 | driver: ACP_TEST_DRIVER, | 3524 | driver: ACP_TEST_DRIVER, |
| ... | @@ -3712,9 +3537,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -3712,9 +3537,6 @@ describe("AcpAdapterV2", () => { |
| 3712 | }, | 3537 | }, |
| 3713 | }), | 3538 | }), |
| 3714 | }, | 3539 | }, |
| 3715 | fileSystem, | | |
| 3716 | idAllocator, | | |
| 3717 | host, | | |
| 3718 | selfInvocation, | 3540 | selfInvocation, |
| 3719 | }); | 3541 | }); |
| 3720 | const threadId = ThreadId.make("thread-acp-native-cancel"); | 3542 | const threadId = ThreadId.make("thread-acp-native-cancel"); |
| ... | @@ -3798,18 +3620,14 @@ describe("AcpAdapterV2", () => { | ... | @@ -3798,18 +3620,14 @@ describe("AcpAdapterV2", () => { |
| 3798 | it.effect("cancels pending permission requests while interrupting an ACP turn", () => | 3620 | it.effect("cancels pending permission requests while interrupting an ACP turn", () => |
| 3799 | Effect.gen(function* () { | 3621 | Effect.gen(function* () { |
| 3800 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 3622 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 3801 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 3802 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 3803 | const path = yield* Path.Path; | 3623 | const path = yield* Path.Path; |
| 3804 | const host = yield* ProviderHost.ProviderHost; | | |
| 3805 | const selfInvocation = yield* resolveSelfInvocation(); | 3624 | const selfInvocation = yield* resolveSelfInvocation(); |
| 3806 | const mockAgentPath = yield* path.fromFileUrl( | 3625 | const mockAgentPath = yield* path.fromFileUrl( |
| 3807 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 3626 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| 3808 | ); | 3627 | ); |
| 3809 | const releaseCancel = yield* Deferred.make<void>(); | 3628 | const releaseCancel = yield* Deferred.make<void>(); |
| 3810 | const instanceId = ProviderInstanceId.make("acp-test"); | 3629 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 3811 | const adapter = makeAcpAdapterV2({ | 3630 | const adapter = yield* makeAcpAdapterV2({ |
| 3812 | crypto: yield* Crypto.Crypto, | | |
| 3813 | instanceId, | 3631 | instanceId, |
| 3814 | flavor: { | 3632 | flavor: { |
| 3815 | driver: ACP_TEST_DRIVER, | 3633 | driver: ACP_TEST_DRIVER, |
| ... | @@ -3821,9 +3639,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -3821,9 +3639,6 @@ describe("AcpAdapterV2", () => { |
| 3821 | wrapCancel: (cancel) => Deferred.await(releaseCancel).pipe(Effect.andThen(cancel)), | 3639 | wrapCancel: (cancel) => Deferred.await(releaseCancel).pipe(Effect.andThen(cancel)), |
| 3822 | }), | 3640 | }), |
| 3823 | }, | 3641 | }, |
| 3824 | fileSystem, | | |
| 3825 | idAllocator, | | |
| 3826 | host, | | |
| 3827 | selfInvocation, | 3642 | selfInvocation, |
| 3828 | }); | 3643 | }); |
| 3829 | const threadId = ThreadId.make("thread-acp-cancel-permission"); | 3644 | const threadId = ThreadId.make("thread-acp-cancel-permission"); |
| ... | @@ -3899,10 +3714,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -3899,10 +3714,7 @@ describe("AcpAdapterV2", () => { |
| 3899 | it.live("keeps hard teardown excluded until a permission response is enqueued", () => | 3714 | it.live("keeps hard teardown excluded until a permission response is enqueued", () => |
| 3900 | Effect.gen(function* () { | 3715 | Effect.gen(function* () { |
| 3901 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 3716 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 3902 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 3903 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 3904 | const path = yield* Path.Path; | 3717 | const path = yield* Path.Path; |
| 3905 | const host = yield* ProviderHost.ProviderHost; | | |
| 3906 | const selfInvocation = yield* resolveSelfInvocation(); | 3718 | const selfInvocation = yield* resolveSelfInvocation(); |
| 3907 | const mockAgentPath = yield* path.fromFileUrl( | 3719 | const mockAgentPath = yield* path.fromFileUrl( |
| 3908 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 3720 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -3910,8 +3722,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -3910,8 +3722,7 @@ describe("AcpAdapterV2", () => { |
| 3910 | const responseEnqueued = yield* Deferred.make<void>(); | 3722 | const responseEnqueued = yield* Deferred.make<void>(); |
| 3911 | const releaseResponseAcknowledgement = yield* Deferred.make<void>(); | 3723 | const releaseResponseAcknowledgement = yield* Deferred.make<void>(); |
| 3912 | const instanceId = ProviderInstanceId.make("acp-test"); | 3724 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 3913 | const adapter = makeAcpAdapterV2({ | 3725 | const adapter = yield* makeAcpAdapterV2({ |
| 3914 | crypto: yield* Crypto.Crypto, | | |
| 3915 | instanceId, | 3726 | instanceId, |
| 3916 | flavor: { | 3727 | flavor: { |
| 3917 | driver: ACP_TEST_DRIVER, | 3728 | driver: ACP_TEST_DRIVER, |
| ... | @@ -3927,9 +3738,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -3927,9 +3738,6 @@ describe("AcpAdapterV2", () => { |
| 3927 | ), | 3738 | ), |
| 3928 | }), | 3739 | }), |
| 3929 | }, | 3740 | }, |
| 3930 | fileSystem, | | |
| 3931 | idAllocator, | | |
| 3932 | host, | | |
| 3933 | selfInvocation, | 3741 | selfInvocation, |
| 3934 | }); | 3742 | }); |
| 3935 | const threadId = ThreadId.make("thread-acp-response-wins-permission"); | 3743 | const threadId = ThreadId.make("thread-acp-response-wins-permission"); |
| ... | @@ -3998,10 +3806,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -3998,10 +3806,7 @@ describe("AcpAdapterV2", () => { |
| 3998 | it.live("carries elicitation request identity through the completed stdout write", () => | 3806 | it.live("carries elicitation request identity through the completed stdout write", () => |
| 3999 | Effect.gen(function* () { | 3807 | Effect.gen(function* () { |
| 4000 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 3808 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 4001 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 4002 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 4003 | const path = yield* Path.Path; | 3809 | const path = yield* Path.Path; |
| 4004 | const host = yield* ProviderHost.ProviderHost; | | |
| 4005 | const selfInvocation = yield* resolveSelfInvocation(); | 3810 | const selfInvocation = yield* resolveSelfInvocation(); |
| 4006 | const mockAgentPath = yield* path.fromFileUrl( | 3811 | const mockAgentPath = yield* path.fromFileUrl( |
| 4007 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 3812 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -4009,8 +3814,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -4009,8 +3814,7 @@ describe("AcpAdapterV2", () => { |
| 4009 | const responseWritten = yield* Deferred.make<void>(); | 3814 | const responseWritten = yield* Deferred.make<void>(); |
| 4010 | const releaseResponseAcknowledgement = yield* Deferred.make<void>(); | 3815 | const releaseResponseAcknowledgement = yield* Deferred.make<void>(); |
| 4011 | const instanceId = ProviderInstanceId.make("acp-test-reordered-elicitation"); | 3816 | const instanceId = ProviderInstanceId.make("acp-test-reordered-elicitation"); |
| 4012 | const adapter = makeAcpAdapterV2({ | 3817 | const adapter = yield* makeAcpAdapterV2({ |
| 4013 | crypto: yield* Crypto.Crypto, | | |
| 4014 | instanceId, | 3818 | instanceId, |
| 4015 | flavor: { | 3819 | flavor: { |
| 4016 | driver: ACP_TEST_DRIVER, | 3820 | driver: ACP_TEST_DRIVER, |
| ... | @@ -4026,9 +3830,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -4026,9 +3830,6 @@ describe("AcpAdapterV2", () => { |
| 4026 | ), | 3830 | ), |
| 4027 | }), | 3831 | }), |
| 4028 | }, | 3832 | }, |
| 4029 | fileSystem, | | |
| 4030 | idAllocator, | | |
| 4031 | host, | | |
| 4032 | selfInvocation, | 3833 | selfInvocation, |
| 4033 | }); | 3834 | }); |
| 4034 | const threadId = ThreadId.make("thread-acp-reordered-elicitation"); | 3835 | const threadId = ThreadId.make("thread-acp-reordered-elicitation"); |
| ... | @@ -4087,17 +3888,13 @@ describe("AcpAdapterV2", () => { | ... | @@ -4087,17 +3888,13 @@ describe("AcpAdapterV2", () => { |
| 4087 | it.live("auto-approves tagged MCP elicitations under full-access policy", () => | 3888 | it.live("auto-approves tagged MCP elicitations under full-access policy", () => |
| 4088 | Effect.gen(function* () { | 3889 | Effect.gen(function* () { |
| 4089 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 3890 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 4090 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 4091 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 4092 | const path = yield* Path.Path; | 3891 | const path = yield* Path.Path; |
| 4093 | const host = yield* ProviderHost.ProviderHost; | | |
| 4094 | const selfInvocation = yield* resolveSelfInvocation(); | 3892 | const selfInvocation = yield* resolveSelfInvocation(); |
| 4095 | const mockAgentPath = yield* path.fromFileUrl( | 3893 | const mockAgentPath = yield* path.fromFileUrl( |
| 4096 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 3894 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| 4097 | ); | 3895 | ); |
| 4098 | const instanceId = ProviderInstanceId.make("acp-test-mcp-approval-elicitation"); | 3896 | const instanceId = ProviderInstanceId.make("acp-test-mcp-approval-elicitation"); |
| 4099 | const adapter = makeAcpAdapterV2({ | 3897 | const adapter = yield* makeAcpAdapterV2({ |
| 4100 | crypto: yield* Crypto.Crypto, | | |
| 4101 | instanceId, | 3898 | instanceId, |
| 4102 | flavor: { | 3899 | flavor: { |
| 4103 | driver: ACP_TEST_DRIVER, | 3900 | driver: ACP_TEST_DRIVER, |
| ... | @@ -4108,9 +3905,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -4108,9 +3905,6 @@ describe("AcpAdapterV2", () => { |
| 4108 | environment: { T3_ACP_EMIT_MCP_TOOL_APPROVAL_ELICITATION: "1" }, | 3905 | environment: { T3_ACP_EMIT_MCP_TOOL_APPROVAL_ELICITATION: "1" }, |
| 4109 | }), | 3906 | }), |
| 4110 | }, | 3907 | }, |
| 4111 | fileSystem, | | |
| 4112 | idAllocator, | | |
| 4113 | host, | | |
| 4114 | selfInvocation, | 3908 | selfInvocation, |
| 4115 | }); | 3909 | }); |
| 4116 | const threadId = ThreadId.make("thread-acp-mcp-approval-elicitation"); | 3910 | const threadId = ThreadId.make("thread-acp-mcp-approval-elicitation"); |
| ... | @@ -4155,10 +3949,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -4155,10 +3949,7 @@ describe("AcpAdapterV2", () => { |
| 4155 | it.live("fails a held native response acknowledgement before normal session close", () => | 3949 | it.live("fails a held native response acknowledgement before normal session close", () => |
| 4156 | Effect.gen(function* () { | 3950 | Effect.gen(function* () { |
| 4157 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 3951 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 4158 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 4159 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 4160 | const path = yield* Path.Path; | 3952 | const path = yield* Path.Path; |
| 4161 | const host = yield* ProviderHost.ProviderHost; | | |
| 4162 | const selfInvocation = yield* resolveSelfInvocation(); | 3953 | const selfInvocation = yield* resolveSelfInvocation(); |
| 4163 | const mockAgentPath = yield* path.fromFileUrl( | 3954 | const mockAgentPath = yield* path.fromFileUrl( |
| 4164 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 3955 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -4167,8 +3958,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -4167,8 +3958,7 @@ describe("AcpAdapterV2", () => { |
| 4167 | const releaseResponseAcknowledgement = yield* Deferred.make<void>(); | 3958 | const releaseResponseAcknowledgement = yield* Deferred.make<void>(); |
| 4168 | const responseLifecycle: Array<string> = []; | 3959 | const responseLifecycle: Array<string> = []; |
| 4169 | const instanceId = ProviderInstanceId.make("acp-test-normal-close-held-response"); | 3960 | const instanceId = ProviderInstanceId.make("acp-test-normal-close-held-response"); |
| 4170 | const adapter = makeAcpAdapterV2({ | 3961 | const adapter = yield* makeAcpAdapterV2({ |
| 4171 | crypto: yield* Crypto.Crypto, | | |
| 4172 | instanceId, | 3962 | instanceId, |
| 4173 | flavor: { | 3963 | flavor: { |
| 4174 | driver: ACP_TEST_DRIVER, | 3964 | driver: ACP_TEST_DRIVER, |
| ... | @@ -4184,9 +3974,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -4184,9 +3974,6 @@ describe("AcpAdapterV2", () => { |
| 4184 | ), | 3974 | ), |
| 4185 | }), | 3975 | }), |
| 4186 | }, | 3976 | }, |
| 4187 | fileSystem, | | |
| 4188 | idAllocator, | | |
| 4189 | host, | | |
| 4190 | selfInvocation, | 3977 | selfInvocation, |
| 4191 | testHooks: { | 3978 | testHooks: { |
| 4192 | onNativeResponseLifecycle: (event) => | 3979 | onNativeResponseLifecycle: (event) => |
| ... | @@ -4263,10 +4050,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -4263,10 +4050,7 @@ describe("AcpAdapterV2", () => { |
| 4263 | it.live("rejects delayed native response registration when normal close wins the permit", () => | 4050 | it.live("rejects delayed native response registration when normal close wins the permit", () => |
| 4264 | Effect.gen(function* () { | 4051 | Effect.gen(function* () { |
| 4265 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 4052 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 4266 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 4267 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 4268 | const path = yield* Path.Path; | 4053 | const path = yield* Path.Path; |
| 4269 | const host = yield* ProviderHost.ProviderHost; | | |
| 4270 | const selfInvocation = yield* resolveSelfInvocation(); | 4054 | const selfInvocation = yield* resolveSelfInvocation(); |
| 4271 | const mockAgentPath = yield* path.fromFileUrl( | 4055 | const mockAgentPath = yield* path.fromFileUrl( |
| 4272 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 4056 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -4277,8 +4061,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -4277,8 +4061,7 @@ describe("AcpAdapterV2", () => { |
| 4277 | const releaseTransportClose = yield* Deferred.make<void>(); | 4061 | const releaseTransportClose = yield* Deferred.make<void>(); |
| 4278 | const responseLifecycle: Array<string> = []; | 4062 | const responseLifecycle: Array<string> = []; |
| 4279 | const instanceId = ProviderInstanceId.make("acp-test-close-wins-registration"); | 4063 | const instanceId = ProviderInstanceId.make("acp-test-close-wins-registration"); |
| 4280 | const adapter = makeAcpAdapterV2({ | 4064 | const adapter = yield* makeAcpAdapterV2({ |
| 4281 | crypto: yield* Crypto.Crypto, | | |
| 4282 | instanceId, | 4065 | instanceId, |
| 4283 | flavor: { | 4066 | flavor: { |
| 4284 | driver: ACP_TEST_DRIVER, | 4067 | driver: ACP_TEST_DRIVER, |
| ... | @@ -4289,9 +4072,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -4289,9 +4072,6 @@ describe("AcpAdapterV2", () => { |
| 4289 | environment: { T3_ACP_EMIT_TOOL_CALLS: "1" }, | 4072 | environment: { T3_ACP_EMIT_TOOL_CALLS: "1" }, |
| 4290 | }), | 4073 | }), |
| 4291 | }, | 4074 | }, |
| 4292 | fileSystem, | | |
| 4293 | idAllocator, | | |
| 4294 | host, | | |
| 4295 | selfInvocation, | 4075 | selfInvocation, |
| 4296 | testHooks: { | 4076 | testHooks: { |
| 4297 | afterNativeResponseTransportClosed: () => | 4077 | afterNativeResponseTransportClosed: () => |
| ... | @@ -4377,10 +4157,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -4377,10 +4157,7 @@ describe("AcpAdapterV2", () => { |
| 4377 | it.live("bounds a missing pending permission response acknowledgement", () => | 4157 | it.live("bounds a missing pending permission response acknowledgement", () => |
| 4378 | Effect.gen(function* () { | 4158 | Effect.gen(function* () { |
| 4379 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 4159 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 4380 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 4381 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 4382 | const path = yield* Path.Path; | 4160 | const path = yield* Path.Path; |
| 4383 | const host = yield* ProviderHost.ProviderHost; | | |
| 4384 | const selfInvocation = yield* resolveSelfInvocation(); | 4161 | const selfInvocation = yield* resolveSelfInvocation(); |
| 4385 | const mockAgentPath = yield* path.fromFileUrl( | 4162 | const mockAgentPath = yield* path.fromFileUrl( |
| 4386 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 4163 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -4390,8 +4167,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -4390,8 +4167,7 @@ describe("AcpAdapterV2", () => { |
| 4390 | const responseLifecycle: Array<string> = []; | 4167 | const responseLifecycle: Array<string> = []; |
| 4391 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); | 4168 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); |
| 4392 | const instanceId = ProviderInstanceId.make("acp-test-pending-response-timeout"); | 4169 | const instanceId = ProviderInstanceId.make("acp-test-pending-response-timeout"); |
| 4393 | const adapter = makeAcpAdapterV2({ | 4170 | const adapter = yield* makeAcpAdapterV2({ |
| 4394 | crypto: yield* Crypto.Crypto, | | |
| 4395 | instanceId, | 4171 | instanceId, |
| 4396 | flavor: { | 4172 | flavor: { |
| 4397 | driver: ACP_TEST_DRIVER, | 4173 | driver: ACP_TEST_DRIVER, |
| ... | @@ -4423,9 +4199,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -4423,9 +4199,6 @@ describe("AcpAdapterV2", () => { |
| 4423 | ), | 4199 | ), |
| 4424 | }), | 4200 | }), |
| 4425 | }, | 4201 | }, |
| 4426 | fileSystem, | | |
| 4427 | idAllocator, | | |
| 4428 | host, | | |
| 4429 | selfInvocation, | 4202 | selfInvocation, |
| 4430 | testHooks: { | 4203 | testHooks: { |
| 4431 | onNativeResponseLifecycle: (event) => | 4204 | onNativeResponseLifecycle: (event) => |
| ... | @@ -4518,10 +4291,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -4518,10 +4291,7 @@ describe("AcpAdapterV2", () => { |
| 4518 | it.live("defers caller cancellation until a pending response acknowledgement is bounded", () => | 4291 | it.live("defers caller cancellation until a pending response acknowledgement is bounded", () => |
| 4519 | Effect.gen(function* () { | 4292 | Effect.gen(function* () { |
| 4520 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 4293 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 4521 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 4522 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 4523 | const path = yield* Path.Path; | 4294 | const path = yield* Path.Path; |
| 4524 | const host = yield* ProviderHost.ProviderHost; | | |
| 4525 | const selfInvocation = yield* resolveSelfInvocation(); | 4295 | const selfInvocation = yield* resolveSelfInvocation(); |
| 4526 | const mockAgentPath = yield* path.fromFileUrl( | 4296 | const mockAgentPath = yield* path.fromFileUrl( |
| 4527 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 4297 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -4529,8 +4299,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -4529,8 +4299,7 @@ describe("AcpAdapterV2", () => { |
| 4529 | const responseEnqueued = yield* Deferred.make<void>(); | 4299 | const responseEnqueued = yield* Deferred.make<void>(); |
| 4530 | const releaseNativeHook = yield* Deferred.make<void>(); | 4300 | const releaseNativeHook = yield* Deferred.make<void>(); |
| 4531 | const instanceId = ProviderInstanceId.make("acp-test-pending-response-cancel"); | 4301 | const instanceId = ProviderInstanceId.make("acp-test-pending-response-cancel"); |
| 4532 | const adapter = makeAcpAdapterV2({ | 4302 | const adapter = yield* makeAcpAdapterV2({ |
| 4533 | crypto: yield* Crypto.Crypto, | | |
| 4534 | instanceId, | 4303 | instanceId, |
| 4535 | flavor: { | 4304 | flavor: { |
| 4536 | driver: ACP_TEST_DRIVER, | 4305 | driver: ACP_TEST_DRIVER, |
| ... | @@ -4561,9 +4330,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -4561,9 +4330,6 @@ describe("AcpAdapterV2", () => { |
| 4561 | ), | 4330 | ), |
| 4562 | }), | 4331 | }), |
| 4563 | }, | 4332 | }, |
| 4564 | fileSystem, | | |
| 4565 | idAllocator, | | |
| 4566 | host, | | |
| 4567 | selfInvocation, | 4333 | selfInvocation, |
| 4568 | }); | 4334 | }); |
| 4569 | const threadId = ThreadId.make("thread-acp-pending-response-cancel"); | 4335 | const threadId = ThreadId.make("thread-acp-pending-response-cancel"); |
| ... | @@ -4634,10 +4400,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -4634,10 +4400,8 @@ describe("AcpAdapterV2", () => { |
| 4634 | it.live("waits for immediate allow and deny permission responses before hard teardown", () => | 4400 | it.live("waits for immediate allow and deny permission responses before hard teardown", () => |
| 4635 | Effect.gen(function* () { | 4401 | Effect.gen(function* () { |
| 4636 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 4402 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 4637 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 4638 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 4403 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 4639 | const path = yield* Path.Path; | 4404 | const path = yield* Path.Path; |
| 4640 | const host = yield* ProviderHost.ProviderHost; | | |
| 4641 | const selfInvocation = yield* resolveSelfInvocation(); | 4405 | const selfInvocation = yield* resolveSelfInvocation(); |
| 4642 | const mockAgentPath = yield* path.fromFileUrl( | 4406 | const mockAgentPath = yield* path.fromFileUrl( |
| 4643 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 4407 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -4651,8 +4415,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -4651,8 +4415,7 @@ describe("AcpAdapterV2", () => { |
| 4651 | const responseEnqueued = yield* Deferred.make<void>(); | 4415 | const responseEnqueued = yield* Deferred.make<void>(); |
| 4652 | const releaseResponseAcknowledgement = yield* Deferred.make<void>(); | 4416 | const releaseResponseAcknowledgement = yield* Deferred.make<void>(); |
| 4653 | const instanceId = ProviderInstanceId.make(`acp-test-${name}`); | 4417 | const instanceId = ProviderInstanceId.make(`acp-test-${name}`); |
| 4654 | const adapter = makeAcpAdapterV2({ | 4418 | const adapter = yield* makeAcpAdapterV2({ |
| 4655 | crypto: yield* Crypto.Crypto, | | |
| 4656 | instanceId, | 4419 | instanceId, |
| 4657 | flavor: { | 4420 | flavor: { |
| 4658 | driver: ACP_TEST_DRIVER, | 4421 | driver: ACP_TEST_DRIVER, |
| ... | @@ -4676,9 +4439,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -4676,9 +4439,6 @@ describe("AcpAdapterV2", () => { |
| 4676 | ), | 4439 | ), |
| 4677 | }), | 4440 | }), |
| 4678 | }, | 4441 | }, |
| 4679 | fileSystem, | | |
| 4680 | idAllocator, | | |
| 4681 | host, | | |
| 4682 | selfInvocation, | 4442 | selfInvocation, |
| 4683 | }); | 4443 | }); |
| 4684 | const threadId = ThreadId.make(`thread-acp-immediate-permission-${name}`); | 4444 | const threadId = ThreadId.make(`thread-acp-immediate-permission-${name}`); |
| ... | @@ -4739,10 +4499,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -4739,10 +4499,8 @@ describe("AcpAdapterV2", () => { |
| 4739 | it.live("waits for immediate URL elicitation responses before hard teardown", () => | 4499 | it.live("waits for immediate URL elicitation responses before hard teardown", () => |
| 4740 | Effect.gen(function* () { | 4500 | Effect.gen(function* () { |
| 4741 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 4501 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 4742 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 4743 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 4502 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 4744 | const path = yield* Path.Path; | 4503 | const path = yield* Path.Path; |
| 4745 | const host = yield* ProviderHost.ProviderHost; | | |
| 4746 | const selfInvocation = yield* resolveSelfInvocation(); | 4504 | const selfInvocation = yield* resolveSelfInvocation(); |
| 4747 | const mockAgentPath = yield* path.fromFileUrl( | 4505 | const mockAgentPath = yield* path.fromFileUrl( |
| 4748 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 4506 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -4750,8 +4508,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -4750,8 +4508,7 @@ describe("AcpAdapterV2", () => { |
| 4750 | const responseEnqueued = yield* Deferred.make<void>(); | 4508 | const responseEnqueued = yield* Deferred.make<void>(); |
| 4751 | const releaseResponseAcknowledgement = yield* Deferred.make<void>(); | 4509 | const releaseResponseAcknowledgement = yield* Deferred.make<void>(); |
| 4752 | const instanceId = ProviderInstanceId.make("acp-test-url-elicitation"); | 4510 | const instanceId = ProviderInstanceId.make("acp-test-url-elicitation"); |
| 4753 | const adapter = makeAcpAdapterV2({ | 4511 | const adapter = yield* makeAcpAdapterV2({ |
| 4754 | crypto: yield* Crypto.Crypto, | | |
| 4755 | instanceId, | 4512 | instanceId, |
| 4756 | flavor: { | 4513 | flavor: { |
| 4757 | driver: ACP_TEST_DRIVER, | 4514 | driver: ACP_TEST_DRIVER, |
| ... | @@ -4775,9 +4532,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -4775,9 +4532,6 @@ describe("AcpAdapterV2", () => { |
| 4775 | ), | 4532 | ), |
| 4776 | }), | 4533 | }), |
| 4777 | }, | 4534 | }, |
| 4778 | fileSystem, | | |
| 4779 | idAllocator, | | |
| 4780 | host, | | |
| 4781 | selfInvocation, | 4535 | selfInvocation, |
| 4782 | }); | 4536 | }); |
| 4783 | const threadId = ThreadId.make("thread-acp-immediate-url-elicitation"); | 4537 | const threadId = ThreadId.make("thread-acp-immediate-url-elicitation"); |
| ... | @@ -4832,10 +4586,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -4832,10 +4586,8 @@ describe("AcpAdapterV2", () => { |
| 4832 | it.live("bounds a missing immediate response acknowledgement before hard teardown", () => | 4586 | it.live("bounds a missing immediate response acknowledgement before hard teardown", () => |
| 4833 | Effect.gen(function* () { | 4587 | Effect.gen(function* () { |
| 4834 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 4588 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 4835 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 4836 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 4589 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 4837 | const path = yield* Path.Path; | 4590 | const path = yield* Path.Path; |
| 4838 | const host = yield* ProviderHost.ProviderHost; | | |
| 4839 | const selfInvocation = yield* resolveSelfInvocation(); | 4591 | const selfInvocation = yield* resolveSelfInvocation(); |
| 4840 | const mockAgentPath = yield* path.fromFileUrl( | 4592 | const mockAgentPath = yield* path.fromFileUrl( |
| 4841 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 4593 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -4843,8 +4595,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -4843,8 +4595,7 @@ describe("AcpAdapterV2", () => { |
| 4843 | const responseEnqueued = yield* Deferred.make<void>(); | 4595 | const responseEnqueued = yield* Deferred.make<void>(); |
| 4844 | const releaseNativeHook = yield* Deferred.make<void>(); | 4596 | const releaseNativeHook = yield* Deferred.make<void>(); |
| 4845 | const instanceId = ProviderInstanceId.make("acp-test-missing-response-ack"); | 4597 | const instanceId = ProviderInstanceId.make("acp-test-missing-response-ack"); |
| 4846 | const adapter = makeAcpAdapterV2({ | 4598 | const adapter = yield* makeAcpAdapterV2({ |
| 4847 | crypto: yield* Crypto.Crypto, | | |
| 4848 | instanceId, | 4599 | instanceId, |
| 4849 | flavor: { | 4600 | flavor: { |
| 4850 | driver: ACP_TEST_DRIVER, | 4601 | driver: ACP_TEST_DRIVER, |
| ... | @@ -4872,9 +4623,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -4872,9 +4623,6 @@ describe("AcpAdapterV2", () => { |
| 4872 | ), | 4623 | ), |
| 4873 | }), | 4624 | }), |
| 4874 | }, | 4625 | }, |
| 4875 | fileSystem, | | |
| 4876 | idAllocator, | | |
| 4877 | host, | | |
| 4878 | selfInvocation, | 4626 | selfInvocation, |
| 4879 | }); | 4627 | }); |
| 4880 | const threadId = ThreadId.make("thread-acp-missing-response-ack"); | 4628 | const threadId = ThreadId.make("thread-acp-missing-response-ack"); |
| ... | @@ -4925,10 +4673,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -4925,10 +4673,7 @@ describe("AcpAdapterV2", () => { |
| 4925 | it.live("rejects an elicitation response when hard teardown wins admission", () => | 4673 | it.live("rejects an elicitation response when hard teardown wins admission", () => |
| 4926 | Effect.gen(function* () { | 4674 | Effect.gen(function* () { |
| 4927 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 4675 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 4928 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 4929 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 4930 | const path = yield* Path.Path; | 4676 | const path = yield* Path.Path; |
| 4931 | const host = yield* ProviderHost.ProviderHost; | | |
| 4932 | const selfInvocation = yield* resolveSelfInvocation(); | 4677 | const selfInvocation = yield* resolveSelfInvocation(); |
| 4933 | const mockAgentPath = yield* path.fromFileUrl( | 4678 | const mockAgentPath = yield* path.fromFileUrl( |
| 4934 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 4679 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -4936,8 +4681,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -4936,8 +4681,7 @@ describe("AcpAdapterV2", () => { |
| 4936 | const teardownStarted = yield* Deferred.make<void>(); | 4681 | const teardownStarted = yield* Deferred.make<void>(); |
| 4937 | const releaseTeardown = yield* Deferred.make<void>(); | 4682 | const releaseTeardown = yield* Deferred.make<void>(); |
| 4938 | const instanceId = ProviderInstanceId.make("acp-test"); | 4683 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 4939 | const adapter = makeAcpAdapterV2({ | 4684 | const adapter = yield* makeAcpAdapterV2({ |
| 4940 | crypto: yield* Crypto.Crypto, | | |
| 4941 | instanceId, | 4685 | instanceId, |
| 4942 | flavor: { | 4686 | flavor: { |
| 4943 | driver: ACP_TEST_DRIVER, | 4687 | driver: ACP_TEST_DRIVER, |
| ... | @@ -4961,9 +4705,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -4961,9 +4705,6 @@ describe("AcpAdapterV2", () => { |
| 4961 | ), | 4705 | ), |
| 4962 | }), | 4706 | }), |
| 4963 | }, | 4707 | }, |
| 4964 | fileSystem, | | |
| 4965 | idAllocator, | | |
| 4966 | host, | | |
| 4967 | selfInvocation, | 4708 | selfInvocation, |
| 4968 | }); | 4709 | }); |
| 4969 | const threadId = ThreadId.make("thread-acp-teardown-wins-elicitation"); | 4710 | const threadId = ThreadId.make("thread-acp-teardown-wins-elicitation"); |
| ... | @@ -5038,18 +4779,15 @@ describe("AcpAdapterV2", () => { | ... | @@ -5038,18 +4779,15 @@ describe("AcpAdapterV2", () => { |
| 5038 | it.effect("releases an ACP turn when cancellation times out", () => | 4779 | it.effect("releases an ACP turn when cancellation times out", () => |
| 5039 | Effect.gen(function* () { | 4780 | Effect.gen(function* () { |
| 5040 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 4781 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 5041 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 5042 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 4782 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 5043 | const path = yield* Path.Path; | 4783 | const path = yield* Path.Path; |
| 5044 | const host = yield* ProviderHost.ProviderHost; | | |
| 5045 | const selfInvocation = yield* resolveSelfInvocation(); | 4784 | const selfInvocation = yield* resolveSelfInvocation(); |
| 5046 | const mockAgentPath = yield* path.fromFileUrl( | 4785 | const mockAgentPath = yield* path.fromFileUrl( |
| 5047 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 4786 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| 5048 | ); | 4787 | ); |
| 5049 | const instanceId = ProviderInstanceId.make("acp-test"); | 4788 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 5050 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); | 4789 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); |
| 5051 | const adapter = makeAcpAdapterV2({ | 4790 | const adapter = yield* makeAcpAdapterV2({ |
| 5052 | crypto: yield* Crypto.Crypto, | | |
| 5053 | instanceId, | 4791 | instanceId, |
| 5054 | flavor: { | 4792 | flavor: { |
| 5055 | driver: ACP_TEST_DRIVER, | 4793 | driver: ACP_TEST_DRIVER, |
| ... | @@ -5061,9 +4799,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -5061,9 +4799,6 @@ describe("AcpAdapterV2", () => { |
| 5061 | protocolEvents, | 4799 | protocolEvents, |
| 5062 | }), | 4800 | }), |
| 5063 | }, | 4801 | }, |
| 5064 | fileSystem, | | |
| 5065 | idAllocator, | | |
| 5066 | host, | | |
| 5067 | selfInvocation, | 4802 | selfInvocation, |
| 5068 | }); | 4803 | }); |
| 5069 | const threadId = ThreadId.make("thread-acp-cancel-timeout"); | 4804 | const threadId = ThreadId.make("thread-acp-cancel-timeout"); |
| ... | @@ -5141,18 +4876,15 @@ describe("AcpAdapterV2", () => { | ... | @@ -5141,18 +4876,15 @@ describe("AcpAdapterV2", () => { |
| 5141 | it.live("treats a second hard Stop as success when the turn is already gone", () => | 4876 | it.live("treats a second hard Stop as success when the turn is already gone", () => |
| 5142 | Effect.gen(function* () { | 4877 | Effect.gen(function* () { |
| 5143 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 4878 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 5144 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 5145 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 4879 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 5146 | const path = yield* Path.Path; | 4880 | const path = yield* Path.Path; |
| 5147 | const host = yield* ProviderHost.ProviderHost; | | |
| 5148 | const selfInvocation = yield* resolveSelfInvocation(); | 4881 | const selfInvocation = yield* resolveSelfInvocation(); |
| 5149 | const mockAgentPath = yield* path.fromFileUrl( | 4882 | const mockAgentPath = yield* path.fromFileUrl( |
| 5150 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 4883 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| 5151 | ); | 4884 | ); |
| 5152 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); | 4885 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); |
| 5153 | const instanceId = ProviderInstanceId.make("acp-test"); | 4886 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 5154 | const adapter = makeAcpAdapterV2({ | 4887 | const adapter = yield* makeAcpAdapterV2({ |
| 5155 | crypto: yield* Crypto.Crypto, | | |
| 5156 | instanceId, | 4888 | instanceId, |
| 5157 | flavor: { | 4889 | flavor: { |
| 5158 | driver: ACP_TEST_DRIVER, | 4890 | driver: ACP_TEST_DRIVER, |
| ... | @@ -5168,9 +4900,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -5168,9 +4900,6 @@ describe("AcpAdapterV2", () => { |
| 5168 | protocolEvents, | 4900 | protocolEvents, |
| 5169 | }), | 4901 | }), |
| 5170 | }, | 4902 | }, |
| 5171 | fileSystem, | | |
| 5172 | idAllocator, | | |
| 5173 | host, | | |
| 5174 | selfInvocation, | 4903 | selfInvocation, |
| 5175 | }); | 4904 | }); |
| 5176 | const threadId = ThreadId.make("thread-acp-double-stop"); | 4905 | const threadId = ThreadId.make("thread-acp-double-stop"); |
| ... | @@ -5239,22 +4968,19 @@ describe("AcpAdapterV2", () => { | ... | @@ -5239,22 +4968,19 @@ describe("AcpAdapterV2", () => { |
| 5239 | it.effect("finalizes a settled turn held open for background work when interrupted", () => | 4968 | it.effect("finalizes a settled turn held open for background work when interrupted", () => |
| 5240 | Effect.gen(function* () { | 4969 | Effect.gen(function* () { |
| 5241 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 4970 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 5242 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 5243 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 4971 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 5244 | const path = yield* Path.Path; | 4972 | const path = yield* Path.Path; |
| 5245 | const host = yield* ProviderHost.ProviderHost; | | |
| 5246 | const selfInvocation = yield* resolveSelfInvocation(); | 4973 | const selfInvocation = yield* resolveSelfInvocation(); |
| 5247 | const mockAgentPath = yield* path.fromFileUrl( | 4974 | const mockAgentPath = yield* path.fromFileUrl( |
| 5248 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 4975 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| 5249 | ); | 4976 | ); |
| 5250 | const instanceId = ProviderInstanceId.make("acp-test"); | 4977 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 5251 | const promptSettled = yield* Deferred.make<void>(); | 4978 | const promptSettled = yield* Deferred.make<void>(); |
| 5252 | const adapter = makeAcpAdapterV2({ | 4979 | const adapter = yield* makeAcpAdapterV2({ |
| 5253 | testHooks: { | 4980 | testHooks: { |
| 5254 | afterPromptSettledWithBackgroundWork: () => | 4981 | afterPromptSettledWithBackgroundWork: () => |
| 5255 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), | 4982 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), |
| 5256 | }, | 4983 | }, |
| 5257 | crypto: yield* Crypto.Crypto, | | |
| 5258 | instanceId, | 4984 | instanceId, |
| 5259 | flavor: { | 4985 | flavor: { |
| 5260 | driver: ACP_TEST_DRIVER, | 4986 | driver: ACP_TEST_DRIVER, |
| ... | @@ -5278,9 +5004,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -5278,9 +5004,6 @@ describe("AcpAdapterV2", () => { |
| 5278 | environment: { T3_ACP_EMIT_GENERIC_TOOL_PLACEHOLDERS: "1" }, | 5004 | environment: { T3_ACP_EMIT_GENERIC_TOOL_PLACEHOLDERS: "1" }, |
| 5279 | }), | 5005 | }), |
| 5280 | }, | 5006 | }, |
| 5281 | fileSystem, | | |
| 5282 | idAllocator, | | |
| 5283 | host, | | |
| 5284 | selfInvocation, | 5007 | selfInvocation, |
| 5285 | }); | 5008 | }); |
| 5286 | const threadId = ThreadId.make("thread-acp-interrupt-background-hold"); | 5009 | const threadId = ThreadId.make("thread-acp-interrupt-background-hold"); |
| ... | @@ -5335,10 +5058,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -5335,10 +5058,8 @@ describe("AcpAdapterV2", () => { |
| 5335 | () => | 5058 | () => |
| 5336 | Effect.gen(function* () { | 5059 | Effect.gen(function* () { |
| 5337 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 5060 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 5338 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 5339 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 5061 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 5340 | const path = yield* Path.Path; | 5062 | const path = yield* Path.Path; |
| 5341 | const host = yield* ProviderHost.ProviderHost; | | |
| 5342 | const selfInvocation = yield* resolveSelfInvocation(); | 5063 | const selfInvocation = yield* resolveSelfInvocation(); |
| 5343 | const mockAgentPath = yield* path.fromFileUrl( | 5064 | const mockAgentPath = yield* path.fromFileUrl( |
| 5344 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 5065 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -5346,12 +5067,11 @@ describe("AcpAdapterV2", () => { | ... | @@ -5346,12 +5067,11 @@ describe("AcpAdapterV2", () => { |
| 5346 | const instanceId = ProviderInstanceId.make("acp-test"); | 5067 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 5347 | let subagentPhase: "spawn" | "complete" = "spawn"; | 5068 | let subagentPhase: "spawn" | "complete" = "spawn"; |
| 5348 | const promptSettled = yield* Deferred.make<void>(); | 5069 | const promptSettled = yield* Deferred.make<void>(); |
| 5349 | const adapter = makeAcpAdapterV2({ | 5070 | const adapter = yield* makeAcpAdapterV2({ |
| 5350 | testHooks: { | 5071 | testHooks: { |
| 5351 | afterPromptSettledWithBackgroundWork: () => | 5072 | afterPromptSettledWithBackgroundWork: () => |
| 5352 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), | 5073 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), |
| 5353 | }, | 5074 | }, |
| 5354 | crypto: yield* Crypto.Crypto, | | |
| 5355 | instanceId, | 5075 | instanceId, |
| 5356 | flavor: { | 5076 | flavor: { |
| 5357 | driver: ACP_TEST_DRIVER, | 5077 | driver: ACP_TEST_DRIVER, |
| ... | @@ -5388,9 +5108,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -5388,9 +5108,6 @@ describe("AcpAdapterV2", () => { |
| 5388 | environment: { T3_ACP_EMIT_GENERIC_TOOL_PLACEHOLDERS: "1" }, | 5108 | environment: { T3_ACP_EMIT_GENERIC_TOOL_PLACEHOLDERS: "1" }, |
| 5389 | }), | 5109 | }), |
| 5390 | }, | 5110 | }, |
| 5391 | fileSystem, | | |
| 5392 | idAllocator, | | |
| 5393 | host, | | |
| 5394 | selfInvocation, | 5111 | selfInvocation, |
| 5395 | }); | 5112 | }); |
| 5396 | const threadId = ThreadId.make("thread-acp-subagent-carryover"); | 5113 | const threadId = ThreadId.make("thread-acp-subagent-carryover"); |
| ... | @@ -5483,10 +5200,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -5483,10 +5200,8 @@ describe("AcpAdapterV2", () => { |
| 5483 | () => | 5200 | () => |
| 5484 | Effect.gen(function* () { | 5201 | Effect.gen(function* () { |
| 5485 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 5202 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 5486 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 5487 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 5203 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 5488 | const path = yield* Path.Path; | 5204 | const path = yield* Path.Path; |
| 5489 | const host = yield* ProviderHost.ProviderHost; | | |
| 5490 | const selfInvocation = yield* resolveSelfInvocation(); | 5205 | const selfInvocation = yield* resolveSelfInvocation(); |
| 5491 | const mockAgentPath = yield* path.fromFileUrl( | 5206 | const mockAgentPath = yield* path.fromFileUrl( |
| 5492 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 5207 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -5494,12 +5209,11 @@ describe("AcpAdapterV2", () => { | ... | @@ -5494,12 +5209,11 @@ describe("AcpAdapterV2", () => { |
| 5494 | const instanceId = ProviderInstanceId.make("acp-test"); | 5209 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 5495 | let subagentPhase: "spawn" | "complete" = "spawn"; | 5210 | let subagentPhase: "spawn" | "complete" = "spawn"; |
| 5496 | const promptSettled = yield* Deferred.make<void>(); | 5211 | const promptSettled = yield* Deferred.make<void>(); |
| 5497 | const adapter = makeAcpAdapterV2({ | 5212 | const adapter = yield* makeAcpAdapterV2({ |
| 5498 | testHooks: { | 5213 | testHooks: { |
| 5499 | afterPromptSettledWithBackgroundWork: () => | 5214 | afterPromptSettledWithBackgroundWork: () => |
| 5500 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), | 5215 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), |
| 5501 | }, | 5216 | }, |
| 5502 | crypto: yield* Crypto.Crypto, | | |
| 5503 | instanceId, | 5217 | instanceId, |
| 5504 | flavor: { | 5218 | flavor: { |
| 5505 | driver: ACP_TEST_DRIVER, | 5219 | driver: ACP_TEST_DRIVER, |
| ... | @@ -5534,9 +5248,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -5534,9 +5248,6 @@ describe("AcpAdapterV2", () => { |
| 5534 | environment: { T3_ACP_EMIT_GENERIC_TOOL_PLACEHOLDERS: "1" }, | 5248 | environment: { T3_ACP_EMIT_GENERIC_TOOL_PLACEHOLDERS: "1" }, |
| 5535 | }), | 5249 | }), |
| 5536 | }, | 5250 | }, |
| 5537 | fileSystem, | | |
| 5538 | idAllocator, | | |
| 5539 | host, | | |
| 5540 | selfInvocation, | 5251 | selfInvocation, |
| 5541 | continuationRequests: { offer: () => Effect.void }, | 5252 | continuationRequests: { offer: () => Effect.void }, |
| 5542 | }); | 5253 | }); |
| ... | @@ -5630,10 +5341,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -5630,10 +5341,8 @@ describe("AcpAdapterV2", () => { |
| 5630 | it.effect("handles a child terminal after carryover rehydrate", () => | 5341 | it.effect("handles a child terminal after carryover rehydrate", () => |
| 5631 | Effect.gen(function* () { | 5342 | Effect.gen(function* () { |
| 5632 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 5343 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 5633 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 5634 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 5344 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 5635 | const path = yield* Path.Path; | 5345 | const path = yield* Path.Path; |
| 5636 | const host = yield* ProviderHost.ProviderHost; | | |
| 5637 | const selfInvocation = yield* resolveSelfInvocation(); | 5346 | const selfInvocation = yield* resolveSelfInvocation(); |
| 5638 | const mockAgentPath = yield* path.fromFileUrl( | 5347 | const mockAgentPath = yield* path.fromFileUrl( |
| 5639 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 5348 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -5647,12 +5356,11 @@ describe("AcpAdapterV2", () => { | ... | @@ -5647,12 +5356,11 @@ describe("AcpAdapterV2", () => { |
| 5647 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; | 5356 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; |
| 5648 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; | 5357 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; |
| 5649 | const promptSettled = yield* Deferred.make<void>(); | 5358 | const promptSettled = yield* Deferred.make<void>(); |
| 5650 | const adapter = makeAcpAdapterV2({ | 5359 | const adapter = yield* makeAcpAdapterV2({ |
| 5651 | testHooks: { | 5360 | testHooks: { |
| 5652 | afterPromptSettledWithBackgroundWork: () => | 5361 | afterPromptSettledWithBackgroundWork: () => |
| 5653 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), | 5362 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), |
| 5654 | }, | 5363 | }, |
| 5655 | crypto: yield* Crypto.Crypto, | | |
| 5656 | instanceId, | 5364 | instanceId, |
| 5657 | flavor: { | 5365 | flavor: { |
| 5658 | driver: ACP_TEST_DRIVER, | 5366 | driver: ACP_TEST_DRIVER, |
| ... | @@ -5704,9 +5412,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -5704,9 +5412,6 @@ describe("AcpAdapterV2", () => { |
| 5704 | }), | 5412 | }), |
| 5705 | }), | 5413 | }), |
| 5706 | }, | 5414 | }, |
| 5707 | fileSystem, | | |
| 5708 | idAllocator, | | |
| 5709 | host, | | |
| 5710 | selfInvocation, | 5415 | selfInvocation, |
| 5711 | continuationRequests: { offer: () => Effect.void }, | 5416 | continuationRequests: { offer: () => Effect.void }, |
| 5712 | }); | 5417 | }); |
| ... | @@ -5867,10 +5572,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -5867,10 +5572,8 @@ describe("AcpAdapterV2", () => { |
| 5867 | () => | 5572 | () => |
| 5868 | Effect.gen(function* () { | 5573 | Effect.gen(function* () { |
| 5869 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 5574 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 5870 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 5871 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 5575 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 5872 | const path = yield* Path.Path; | 5576 | const path = yield* Path.Path; |
| 5873 | const host = yield* ProviderHost.ProviderHost; | | |
| 5874 | const selfInvocation = yield* resolveSelfInvocation(); | 5577 | const selfInvocation = yield* resolveSelfInvocation(); |
| 5875 | const mockAgentPath = yield* path.fromFileUrl( | 5578 | const mockAgentPath = yield* path.fromFileUrl( |
| 5876 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 5579 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -5903,12 +5606,11 @@ describe("AcpAdapterV2", () => { | ... | @@ -5903,12 +5606,11 @@ describe("AcpAdapterV2", () => { |
| 5903 | | Parameters<RuntimeService["handleSessionUpdate"]>[0] | 5606 | | Parameters<RuntimeService["handleSessionUpdate"]>[0] |
| 5904 | | undefined; | 5607 | | undefined; |
| 5905 | const promptSettled = yield* Deferred.make<void>(); | 5608 | const promptSettled = yield* Deferred.make<void>(); |
| 5906 | const adapter = makeAcpAdapterV2({ | 5609 | const adapter = yield* makeAcpAdapterV2({ |
| 5907 | testHooks: { | 5610 | testHooks: { |
| 5908 | afterPromptSettledWithBackgroundWork: () => | 5611 | afterPromptSettledWithBackgroundWork: () => |
| 5909 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), | 5612 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), |
| 5910 | }, | 5613 | }, |
| 5911 | crypto: yield* Crypto.Crypto, | | |
| 5912 | instanceId, | 5614 | instanceId, |
| 5913 | flavor: { | 5615 | flavor: { |
| 5914 | driver: ACP_TEST_DRIVER, | 5616 | driver: ACP_TEST_DRIVER, |
| ... | @@ -5955,9 +5657,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -5955,9 +5657,6 @@ describe("AcpAdapterV2", () => { |
| 5955 | }), | 5657 | }), |
| 5956 | }), | 5658 | }), |
| 5957 | }, | 5659 | }, |
| 5958 | fileSystem, | | |
| 5959 | idAllocator, | | |
| 5960 | host, | | |
| 5961 | selfInvocation, | 5660 | selfInvocation, |
| 5962 | continuationRequests: { offer: () => Effect.void }, | 5661 | continuationRequests: { offer: () => Effect.void }, |
| 5963 | }); | 5662 | }); |
| ... | @@ -6090,10 +5789,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -6090,10 +5789,8 @@ describe("AcpAdapterV2", () => { |
| 6090 | () => | 5789 | () => |
| 6091 | Effect.gen(function* () { | 5790 | Effect.gen(function* () { |
| 6092 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 5791 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 6093 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 6094 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 5792 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 6095 | const path = yield* Path.Path; | 5793 | const path = yield* Path.Path; |
| 6096 | const host = yield* ProviderHost.ProviderHost; | | |
| 6097 | const selfInvocation = yield* resolveSelfInvocation(); | 5794 | const selfInvocation = yield* resolveSelfInvocation(); |
| 6098 | const mockAgentPath = yield* path.fromFileUrl( | 5795 | const mockAgentPath = yield* path.fromFileUrl( |
| 6099 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 5796 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -6106,12 +5803,11 @@ describe("AcpAdapterV2", () => { | ... | @@ -6106,12 +5803,11 @@ describe("AcpAdapterV2", () => { |
| 6106 | let subagentPhase: "spawn" | "complete" = "spawn"; | 5803 | let subagentPhase: "spawn" | "complete" = "spawn"; |
| 6107 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; | 5804 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; |
| 6108 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; | 5805 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; |
| 6109 | const adapter = makeAcpAdapterV2({ | 5806 | const adapter = yield* makeAcpAdapterV2({ |
| 6110 | testHooks: { | 5807 | testHooks: { |
| 6111 | afterPromptSettledWithBackgroundWork: () => | 5808 | afterPromptSettledWithBackgroundWork: () => |
| 6112 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), | 5809 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), |
| 6113 | }, | 5810 | }, |
| 6114 | crypto: yield* Crypto.Crypto, | | |
| 6115 | instanceId, | 5811 | instanceId, |
| 6116 | flavor: { | 5812 | flavor: { |
| 6117 | driver: ACP_TEST_DRIVER, | 5813 | driver: ACP_TEST_DRIVER, |
| ... | @@ -6154,9 +5850,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -6154,9 +5850,6 @@ describe("AcpAdapterV2", () => { |
| 6154 | }), | 5850 | }), |
| 6155 | }), | 5851 | }), |
| 6156 | }, | 5852 | }, |
| 6157 | fileSystem, | | |
| 6158 | idAllocator, | | |
| 6159 | host, | | |
| 6160 | selfInvocation, | 5853 | selfInvocation, |
| 6161 | continuationRequests: { | 5854 | continuationRequests: { |
| 6162 | offer: (request) => | 5855 | offer: (request) => |
| ... | @@ -6309,10 +6002,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -6309,10 +6002,8 @@ describe("AcpAdapterV2", () => { |
| 6309 | it.effect("finishes a settled root's carryover subagent from its structured end", () => | 6002 | it.effect("finishes a settled root's carryover subagent from its structured end", () => |
| 6310 | Effect.gen(function* () { | 6003 | Effect.gen(function* () { |
| 6311 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 6004 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 6312 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 6313 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 6005 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 6314 | const path = yield* Path.Path; | 6006 | const path = yield* Path.Path; |
| 6315 | const host = yield* ProviderHost.ProviderHost; | | |
| 6316 | const selfInvocation = yield* resolveSelfInvocation(); | 6007 | const selfInvocation = yield* resolveSelfInvocation(); |
| 6317 | const mockAgentPath = yield* path.fromFileUrl( | 6008 | const mockAgentPath = yield* path.fromFileUrl( |
| 6318 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 6009 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -6321,8 +6012,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -6321,8 +6012,7 @@ describe("AcpAdapterV2", () => { |
| 6321 | const instanceId = ProviderInstanceId.make("acp-test"); | 6012 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 6322 | const childSessionId = "019f44a6-4820-7402-925d-bc862ee711dd"; | 6013 | const childSessionId = "019f44a6-4820-7402-925d-bc862ee711dd"; |
| 6323 | let finishSubagent: AcpAdapterV2ExtensionContext["finishSubagent"] | undefined; | 6014 | let finishSubagent: AcpAdapterV2ExtensionContext["finishSubagent"] | undefined; |
| 6324 | const adapter = makeAcpAdapterV2({ | 6015 | const adapter = yield* makeAcpAdapterV2({ |
| 6325 | crypto: yield* Crypto.Crypto, | | |
| 6326 | instanceId, | 6016 | instanceId, |
| 6327 | flavor: { | 6017 | flavor: { |
| 6328 | driver: ACP_TEST_DRIVER, | 6018 | driver: ACP_TEST_DRIVER, |
| ... | @@ -6352,9 +6042,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -6352,9 +6042,6 @@ describe("AcpAdapterV2", () => { |
| 6352 | protocolEvents, | 6042 | protocolEvents, |
| 6353 | }), | 6043 | }), |
| 6354 | }, | 6044 | }, |
| 6355 | fileSystem, | | |
| 6356 | idAllocator, | | |
| 6357 | host, | | |
| 6358 | selfInvocation, | 6045 | selfInvocation, |
| 6359 | continuationRequests: { offer: () => Effect.void }, | 6046 | continuationRequests: { offer: () => Effect.void }, |
| 6360 | }); | 6047 | }); |
| ... | @@ -6457,10 +6144,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -6457,10 +6144,8 @@ describe("AcpAdapterV2", () => { |
| 6457 | it.effect("projects completed-root carryover eagerly and drain cannot resurrect it", () => | 6144 | it.effect("projects completed-root carryover eagerly and drain cannot resurrect it", () => |
| 6458 | Effect.gen(function* () { | 6145 | Effect.gen(function* () { |
| 6459 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 6146 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 6460 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 6461 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 6147 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 6462 | const path = yield* Path.Path; | 6148 | const path = yield* Path.Path; |
| 6463 | const host = yield* ProviderHost.ProviderHost; | | |
| 6464 | const selfInvocation = yield* resolveSelfInvocation(); | 6149 | const selfInvocation = yield* resolveSelfInvocation(); |
| 6465 | const mockAgentPath = yield* path.fromFileUrl( | 6150 | const mockAgentPath = yield* path.fromFileUrl( |
| 6466 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 6151 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -6472,8 +6157,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -6472,8 +6157,7 @@ describe("AcpAdapterV2", () => { |
| 6472 | let subagentPhase: "spawn" | "complete" = "spawn"; | 6157 | let subagentPhase: "spawn" | "complete" = "spawn"; |
| 6473 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; | 6158 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; |
| 6474 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; | 6159 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; |
| 6475 | const adapter = makeAcpAdapterV2({ | 6160 | const adapter = yield* makeAcpAdapterV2({ |
| 6476 | crypto: yield* Crypto.Crypto, | | |
| 6477 | instanceId, | 6161 | instanceId, |
| 6478 | flavor: { | 6162 | flavor: { |
| 6479 | driver: ACP_TEST_DRIVER, | 6163 | driver: ACP_TEST_DRIVER, |
| ... | @@ -6517,9 +6201,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -6517,9 +6201,6 @@ describe("AcpAdapterV2", () => { |
| 6517 | }), | 6201 | }), |
| 6518 | }), | 6202 | }), |
| 6519 | }, | 6203 | }, |
| 6520 | fileSystem, | | |
| 6521 | idAllocator, | | |
| 6522 | host, | | |
| 6523 | selfInvocation, | 6204 | selfInvocation, |
| 6524 | continuationRequests: { | 6205 | continuationRequests: { |
| 6525 | offer: (request) => | 6206 | offer: (request) => |
| ... | @@ -6709,10 +6390,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -6709,10 +6390,8 @@ describe("AcpAdapterV2", () => { |
| 6709 | () => | 6390 | () => |
| 6710 | Effect.gen(function* () { | 6391 | Effect.gen(function* () { |
| 6711 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 6392 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 6712 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 6713 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 6393 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 6714 | const path = yield* Path.Path; | 6394 | const path = yield* Path.Path; |
| 6715 | const host = yield* ProviderHost.ProviderHost; | | |
| 6716 | const selfInvocation = yield* resolveSelfInvocation(); | 6395 | const selfInvocation = yield* resolveSelfInvocation(); |
| 6717 | const mockAgentPath = yield* path.fromFileUrl( | 6396 | const mockAgentPath = yield* path.fromFileUrl( |
| 6718 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 6397 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -6724,12 +6403,11 @@ describe("AcpAdapterV2", () => { | ... | @@ -6724,12 +6403,11 @@ describe("AcpAdapterV2", () => { |
| 6724 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; | 6403 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; |
| 6725 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; | 6404 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; |
| 6726 | const promptSettled = yield* Deferred.make<void>(); | 6405 | const promptSettled = yield* Deferred.make<void>(); |
| 6727 | const adapter = makeAcpAdapterV2({ | 6406 | const adapter = yield* makeAcpAdapterV2({ |
| 6728 | testHooks: { | 6407 | testHooks: { |
| 6729 | afterPromptSettledWithBackgroundWork: () => | 6408 | afterPromptSettledWithBackgroundWork: () => |
| 6730 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), | 6409 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), |
| 6731 | }, | 6410 | }, |
| 6732 | crypto: yield* Crypto.Crypto, | | |
| 6733 | instanceId, | 6411 | instanceId, |
| 6734 | flavor: { | 6412 | flavor: { |
| 6735 | driver: ACP_TEST_DRIVER, | 6413 | driver: ACP_TEST_DRIVER, |
| ... | @@ -6771,9 +6449,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -6771,9 +6449,6 @@ describe("AcpAdapterV2", () => { |
| 6771 | }), | 6449 | }), |
| 6772 | }), | 6450 | }), |
| 6773 | }, | 6451 | }, |
| 6774 | fileSystem, | | |
| 6775 | idAllocator, | | |
| 6776 | host, | | |
| 6777 | selfInvocation, | 6452 | selfInvocation, |
| 6778 | continuationRequests: { | 6453 | continuationRequests: { |
| 6779 | offer: (request) => | 6454 | offer: (request) => |
| ... | @@ -6997,10 +6672,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -6997,10 +6672,8 @@ describe("AcpAdapterV2", () => { |
| 6997 | () => | 6672 | () => |
| 6998 | Effect.gen(function* () { | 6673 | Effect.gen(function* () { |
| 6999 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 6674 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 7000 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 7001 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 6675 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 7002 | const path = yield* Path.Path; | 6676 | const path = yield* Path.Path; |
| 7003 | const host = yield* ProviderHost.ProviderHost; | | |
| 7004 | const selfInvocation = yield* resolveSelfInvocation(); | 6677 | const selfInvocation = yield* resolveSelfInvocation(); |
| 7005 | const mockAgentPath = yield* path.fromFileUrl( | 6678 | const mockAgentPath = yield* path.fromFileUrl( |
| 7006 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 6679 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -7013,12 +6686,11 @@ describe("AcpAdapterV2", () => { | ... | @@ -7013,12 +6686,11 @@ describe("AcpAdapterV2", () => { |
| 7013 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; | 6686 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; |
| 7014 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; | 6687 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; |
| 7015 | const promptSettled = yield* Deferred.make<void>(); | 6688 | const promptSettled = yield* Deferred.make<void>(); |
| 7016 | const adapter = makeAcpAdapterV2({ | 6689 | const adapter = yield* makeAcpAdapterV2({ |
| 7017 | testHooks: { | 6690 | testHooks: { |
| 7018 | afterPromptSettledWithBackgroundWork: () => | 6691 | afterPromptSettledWithBackgroundWork: () => |
| 7019 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), | 6692 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), |
| 7020 | }, | 6693 | }, |
| 7021 | crypto: yield* Crypto.Crypto, | | |
| 7022 | instanceId, | 6694 | instanceId, |
| 7023 | flavor: { | 6695 | flavor: { |
| 7024 | driver: ACP_TEST_DRIVER, | 6696 | driver: ACP_TEST_DRIVER, |
| ... | @@ -7069,9 +6741,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -7069,9 +6741,6 @@ describe("AcpAdapterV2", () => { |
| 7069 | }), | 6741 | }), |
| 7070 | }), | 6742 | }), |
| 7071 | }, | 6743 | }, |
| 7072 | fileSystem, | | |
| 7073 | idAllocator, | | |
| 7074 | host, | | |
| 7075 | selfInvocation, | 6744 | selfInvocation, |
| 7076 | continuationRequests: { | 6745 | continuationRequests: { |
| 7077 | offer: (request) => | 6746 | offer: (request) => |
| ... | @@ -7238,10 +6907,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -7238,10 +6907,8 @@ describe("AcpAdapterV2", () => { |
| 7238 | it.effect("projects an interrupted root-session end notice at the next attach", () => | 6907 | it.effect("projects an interrupted root-session end notice at the next attach", () => |
| 7239 | Effect.gen(function* () { | 6908 | Effect.gen(function* () { |
| 7240 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 6909 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 7241 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 7242 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 6910 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 7243 | const path = yield* Path.Path; | 6911 | const path = yield* Path.Path; |
| 7244 | const host = yield* ProviderHost.ProviderHost; | | |
| 7245 | const selfInvocation = yield* resolveSelfInvocation(); | 6912 | const selfInvocation = yield* resolveSelfInvocation(); |
| 7246 | const mockAgentPath = yield* path.fromFileUrl( | 6913 | const mockAgentPath = yield* path.fromFileUrl( |
| 7247 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 6914 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -7254,12 +6921,11 @@ describe("AcpAdapterV2", () => { | ... | @@ -7254,12 +6921,11 @@ describe("AcpAdapterV2", () => { |
| 7254 | let subagentPhase: "spawn" | "complete" = "spawn"; | 6921 | let subagentPhase: "spawn" | "complete" = "spawn"; |
| 7255 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; | 6922 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; |
| 7256 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; | 6923 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; |
| 7257 | const adapter = makeAcpAdapterV2({ | 6924 | const adapter = yield* makeAcpAdapterV2({ |
| 7258 | testHooks: { | 6925 | testHooks: { |
| 7259 | afterPromptSettledWithBackgroundWork: () => | 6926 | afterPromptSettledWithBackgroundWork: () => |
| 7260 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), | 6927 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), |
| 7261 | }, | 6928 | }, |
| 7262 | crypto: yield* Crypto.Crypto, | | |
| 7263 | instanceId, | 6929 | instanceId, |
| 7264 | flavor: { | 6930 | flavor: { |
| 7265 | driver: ACP_TEST_DRIVER, | 6931 | driver: ACP_TEST_DRIVER, |
| ... | @@ -7313,9 +6979,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -7313,9 +6979,6 @@ describe("AcpAdapterV2", () => { |
| 7313 | }), | 6979 | }), |
| 7314 | }), | 6980 | }), |
| 7315 | }, | 6981 | }, |
| 7316 | fileSystem, | | |
| 7317 | idAllocator, | | |
| 7318 | host, | | |
| 7319 | selfInvocation, | 6982 | selfInvocation, |
| 7320 | continuationRequests: { | 6983 | continuationRequests: { |
| 7321 | offer: (request) => | 6984 | offer: (request) => |
| ... | @@ -7467,10 +7130,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -7467,10 +7130,8 @@ describe("AcpAdapterV2", () => { |
| 7467 | () => | 7130 | () => |
| 7468 | Effect.gen(function* () { | 7131 | Effect.gen(function* () { |
| 7469 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 7132 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 7470 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 7471 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 7133 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 7472 | const path = yield* Path.Path; | 7134 | const path = yield* Path.Path; |
| 7473 | const host = yield* ProviderHost.ProviderHost; | | |
| 7474 | const selfInvocation = yield* resolveSelfInvocation(); | 7135 | const selfInvocation = yield* resolveSelfInvocation(); |
| 7475 | const mockAgentPath = yield* path.fromFileUrl( | 7136 | const mockAgentPath = yield* path.fromFileUrl( |
| 7476 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 7137 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -7483,12 +7144,11 @@ describe("AcpAdapterV2", () => { | ... | @@ -7483,12 +7144,11 @@ describe("AcpAdapterV2", () => { |
| 7483 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; | 7144 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; |
| 7484 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; | 7145 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; |
| 7485 | const promptSettled = yield* Deferred.make<void>(); | 7146 | const promptSettled = yield* Deferred.make<void>(); |
| 7486 | const adapter = makeAcpAdapterV2({ | 7147 | const adapter = yield* makeAcpAdapterV2({ |
| 7487 | testHooks: { | 7148 | testHooks: { |
| 7488 | afterPromptSettledWithBackgroundWork: () => | 7149 | afterPromptSettledWithBackgroundWork: () => |
| 7489 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), | 7150 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), |
| 7490 | }, | 7151 | }, |
| 7491 | crypto: yield* Crypto.Crypto, | | |
| 7492 | instanceId, | 7152 | instanceId, |
| 7493 | flavor: { | 7153 | flavor: { |
| 7494 | driver: ACP_TEST_DRIVER, | 7154 | driver: ACP_TEST_DRIVER, |
| ... | @@ -7530,9 +7190,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -7530,9 +7190,6 @@ describe("AcpAdapterV2", () => { |
| 7530 | }), | 7190 | }), |
| 7531 | }), | 7191 | }), |
| 7532 | }, | 7192 | }, |
| 7533 | fileSystem, | | |
| 7534 | idAllocator, | | |
| 7535 | host, | | |
| 7536 | selfInvocation, | 7193 | selfInvocation, |
| 7537 | continuationRequests: { | 7194 | continuationRequests: { |
| 7538 | offer: (request) => | 7195 | offer: (request) => |
| ... | @@ -7738,10 +7395,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -7738,10 +7395,8 @@ describe("AcpAdapterV2", () => { |
| 7738 | () => | 7395 | () => |
| 7739 | Effect.gen(function* () { | 7396 | Effect.gen(function* () { |
| 7740 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 7397 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 7741 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 7742 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 7398 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 7743 | const path = yield* Path.Path; | 7399 | const path = yield* Path.Path; |
| 7744 | const host = yield* ProviderHost.ProviderHost; | | |
| 7745 | const selfInvocation = yield* resolveSelfInvocation(); | 7400 | const selfInvocation = yield* resolveSelfInvocation(); |
| 7746 | const mockAgentPath = yield* path.fromFileUrl( | 7401 | const mockAgentPath = yield* path.fromFileUrl( |
| 7747 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 7402 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -7753,12 +7408,11 @@ describe("AcpAdapterV2", () => { | ... | @@ -7753,12 +7408,11 @@ describe("AcpAdapterV2", () => { |
| 7753 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; | 7408 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; |
| 7754 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; | 7409 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; |
| 7755 | const promptSettled = yield* Deferred.make<void>(); | 7410 | const promptSettled = yield* Deferred.make<void>(); |
| 7756 | const adapter = makeAcpAdapterV2({ | 7411 | const adapter = yield* makeAcpAdapterV2({ |
| 7757 | testHooks: { | 7412 | testHooks: { |
| 7758 | afterPromptSettledWithBackgroundWork: () => | 7413 | afterPromptSettledWithBackgroundWork: () => |
| 7759 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), | 7414 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), |
| 7760 | }, | 7415 | }, |
| 7761 | crypto: yield* Crypto.Crypto, | | |
| 7762 | instanceId, | 7416 | instanceId, |
| 7763 | flavor: { | 7417 | flavor: { |
| 7764 | driver: ACP_TEST_DRIVER, | 7418 | driver: ACP_TEST_DRIVER, |
| ... | @@ -7800,9 +7454,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -7800,9 +7454,6 @@ describe("AcpAdapterV2", () => { |
| 7800 | }), | 7454 | }), |
| 7801 | }), | 7455 | }), |
| 7802 | }, | 7456 | }, |
| 7803 | fileSystem, | | |
| 7804 | idAllocator, | | |
| 7805 | host, | | |
| 7806 | selfInvocation, | 7457 | selfInvocation, |
| 7807 | continuationRequests: { | 7458 | continuationRequests: { |
| 7808 | offer: (request) => | 7459 | offer: (request) => |
| ... | @@ -7980,10 +7631,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -7980,10 +7631,8 @@ describe("AcpAdapterV2", () => { |
| 7980 | () => | 7631 | () => |
| 7981 | Effect.gen(function* () { | 7632 | Effect.gen(function* () { |
| 7982 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 7633 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 7983 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 7984 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 7634 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 7985 | const path = yield* Path.Path; | 7635 | const path = yield* Path.Path; |
| 7986 | const host = yield* ProviderHost.ProviderHost; | | |
| 7987 | const selfInvocation = yield* resolveSelfInvocation(); | 7636 | const selfInvocation = yield* resolveSelfInvocation(); |
| 7988 | const mockAgentPath = yield* path.fromFileUrl( | 7637 | const mockAgentPath = yield* path.fromFileUrl( |
| 7989 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 7638 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -7993,12 +7642,11 @@ describe("AcpAdapterV2", () => { | ... | @@ -7993,12 +7642,11 @@ describe("AcpAdapterV2", () => { |
| 7993 | let cancelCalled = false; | 7642 | let cancelCalled = false; |
| 7994 | let runtimeOrdinalSeen = 0; | 7643 | let runtimeOrdinalSeen = 0; |
| 7995 | const promptSettled = yield* Deferred.make<void>(); | 7644 | const promptSettled = yield* Deferred.make<void>(); |
| 7996 | const adapter = makeAcpAdapterV2({ | 7645 | const adapter = yield* makeAcpAdapterV2({ |
| 7997 | testHooks: { | 7646 | testHooks: { |
| 7998 | afterPromptSettledWithBackgroundWork: () => | 7647 | afterPromptSettledWithBackgroundWork: () => |
| 7999 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), | 7648 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), |
| 8000 | }, | 7649 | }, |
| 8001 | crypto: yield* Crypto.Crypto, | | |
| 8002 | instanceId, | 7650 | instanceId, |
| 8003 | flavor: { | 7651 | flavor: { |
| 8004 | driver: ACP_TEST_DRIVER, | 7652 | driver: ACP_TEST_DRIVER, |
| ... | @@ -8050,9 +7698,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -8050,9 +7698,6 @@ describe("AcpAdapterV2", () => { |
| 8050 | }).pipe(Effect.andThen(cancel)), | 7698 | }).pipe(Effect.andThen(cancel)), |
| 8051 | }), | 7699 | }), |
| 8052 | }, | 7700 | }, |
| 8053 | fileSystem, | | |
| 8054 | idAllocator, | | |
| 8055 | host, | | |
| 8056 | selfInvocation, | 7701 | selfInvocation, |
| 8057 | }); | 7702 | }); |
| 8058 | const threadId = ThreadId.make("thread-acp-settled-soft-steer"); | 7703 | const threadId = ThreadId.make("thread-acp-settled-soft-steer"); |
| ... | @@ -8156,18 +7801,15 @@ describe("AcpAdapterV2", () => { | ... | @@ -8156,18 +7801,15 @@ describe("AcpAdapterV2", () => { |
| 8156 | it.live("preserveRuntimeOnSettledInterrupt does not soften a mid-prompt steering interrupt", () => | 7801 | it.live("preserveRuntimeOnSettledInterrupt does not soften a mid-prompt steering interrupt", () => |
| 8157 | Effect.gen(function* () { | 7802 | Effect.gen(function* () { |
| 8158 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 7803 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 8159 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 8160 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 7804 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 8161 | const path = yield* Path.Path; | 7805 | const path = yield* Path.Path; |
| 8162 | const host = yield* ProviderHost.ProviderHost; | | |
| 8163 | const selfInvocation = yield* resolveSelfInvocation(); | 7806 | const selfInvocation = yield* resolveSelfInvocation(); |
| 8164 | const mockAgentPath = yield* path.fromFileUrl( | 7807 | const mockAgentPath = yield* path.fromFileUrl( |
| 8165 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 7808 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| 8166 | ); | 7809 | ); |
| 8167 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); | 7810 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); |
| 8168 | const instanceId = ProviderInstanceId.make("acp-test"); | 7811 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 8169 | const adapter = makeAcpAdapterV2({ | 7812 | const adapter = yield* makeAcpAdapterV2({ |
| 8170 | crypto: yield* Crypto.Crypto, | | |
| 8171 | instanceId, | 7813 | instanceId, |
| 8172 | flavor: { | 7814 | flavor: { |
| 8173 | driver: ACP_TEST_DRIVER, | 7815 | driver: ACP_TEST_DRIVER, |
| ... | @@ -8189,9 +7831,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -8189,9 +7831,6 @@ describe("AcpAdapterV2", () => { |
| 8189 | protocolEvents, | 7831 | protocolEvents, |
| 8190 | }), | 7832 | }), |
| 8191 | }, | 7833 | }, |
| 8192 | fileSystem, | | |
| 8193 | idAllocator, | | |
| 8194 | host, | | |
| 8195 | selfInvocation, | 7834 | selfInvocation, |
| 8196 | }); | 7835 | }); |
| 8197 | const threadId = ThreadId.make("thread-acp-unsettled-steer-stays-hard"); | 7836 | const threadId = ThreadId.make("thread-acp-unsettled-steer-stays-hard"); |
| ... | @@ -8246,10 +7885,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -8246,10 +7885,8 @@ describe("AcpAdapterV2", () => { |
| 8246 | () => | 7885 | () => |
| 8247 | Effect.gen(function* () { | 7886 | Effect.gen(function* () { |
| 8248 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 7887 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 8249 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 8250 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 7888 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 8251 | const path = yield* Path.Path; | 7889 | const path = yield* Path.Path; |
| 8252 | const host = yield* ProviderHost.ProviderHost; | | |
| 8253 | const selfInvocation = yield* resolveSelfInvocation(); | 7890 | const selfInvocation = yield* resolveSelfInvocation(); |
| 8254 | const mockAgentPath = yield* path.fromFileUrl( | 7891 | const mockAgentPath = yield* path.fromFileUrl( |
| 8255 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 7892 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -8259,8 +7896,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -8259,8 +7896,7 @@ describe("AcpAdapterV2", () => { |
| 8259 | const instanceId = ProviderInstanceId.make("acp-test"); | 7896 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 8260 | let cancelCalled = false; | 7897 | let cancelCalled = false; |
| 8261 | let runtimeOrdinalSeen = 0; | 7898 | let runtimeOrdinalSeen = 0; |
| 8262 | const adapter = makeAcpAdapterV2({ | 7899 | const adapter = yield* makeAcpAdapterV2({ |
| 8263 | crypto: yield* Crypto.Crypto, | | |
| 8264 | instanceId, | 7900 | instanceId, |
| 8265 | flavor: { | 7901 | flavor: { |
| 8266 | driver: ACP_TEST_DRIVER, | 7902 | driver: ACP_TEST_DRIVER, |
| ... | @@ -8295,9 +7931,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -8295,9 +7931,6 @@ describe("AcpAdapterV2", () => { |
| 8295 | }).pipe(Effect.andThen(cancel)), | 7931 | }).pipe(Effect.andThen(cancel)), |
| 8296 | }), | 7932 | }), |
| 8297 | }, | 7933 | }, |
| 8298 | fileSystem, | | |
| 8299 | idAllocator, | | |
| 8300 | host, | | |
| 8301 | selfInvocation, | 7934 | selfInvocation, |
| 8302 | continuationRequests: { | 7935 | continuationRequests: { |
| 8303 | offer: (request) => | 7936 | offer: (request) => |
| ... | @@ -8440,10 +8073,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -8440,10 +8073,8 @@ describe("AcpAdapterV2", () => { |
| 8440 | it.live("direct Stop quarantine drops late background task mutations from the stopped run", () => | 8073 | it.live("direct Stop quarantine drops late background task mutations from the stopped run", () => |
| 8441 | Effect.gen(function* () { | 8074 | Effect.gen(function* () { |
| 8442 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 8075 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 8443 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 8444 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 8076 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 8445 | const path = yield* Path.Path; | 8077 | const path = yield* Path.Path; |
| 8446 | const host = yield* ProviderHost.ProviderHost; | | |
| 8447 | const selfInvocation = yield* resolveSelfInvocation(); | 8078 | const selfInvocation = yield* resolveSelfInvocation(); |
| 8448 | const mockAgentPath = yield* path.fromFileUrl( | 8079 | const mockAgentPath = yield* path.fromFileUrl( |
| 8449 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 8080 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -8459,8 +8090,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -8459,8 +8090,7 @@ describe("AcpAdapterV2", () => { |
| 8459 | }) => Effect.Effect<void>) | 8090 | }) => Effect.Effect<void>) |
| 8460 | | null; | 8091 | | null; |
| 8461 | } = { current: null }; | 8092 | } = { current: null }; |
| 8462 | const adapter = makeAcpAdapterV2({ | 8093 | const adapter = yield* makeAcpAdapterV2({ |
| 8463 | crypto: yield* Crypto.Crypto, | | |
| 8464 | instanceId, | 8094 | instanceId, |
| 8465 | flavor: { | 8095 | flavor: { |
| 8466 | driver: ACP_TEST_DRIVER, | 8096 | driver: ACP_TEST_DRIVER, |
| ... | @@ -8481,9 +8111,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -8481,9 +8111,6 @@ describe("AcpAdapterV2", () => { |
| 8481 | protocolEvents, | 8111 | protocolEvents, |
| 8482 | }), | 8112 | }), |
| 8483 | }, | 8113 | }, |
| 8484 | fileSystem, | | |
| 8485 | idAllocator, | | |
| 8486 | host, | | |
| 8487 | selfInvocation, | 8114 | selfInvocation, |
| 8488 | continuationRequests: { offer: () => Effect.void }, | 8115 | continuationRequests: { offer: () => Effect.void }, |
| 8489 | }); | 8116 | }); |
| ... | @@ -8587,10 +8214,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -8587,10 +8214,8 @@ describe("AcpAdapterV2", () => { |
| 8587 | it.live("production Grok interrupt flags still hard-kill and respawn on user Stop", () => | 8214 | it.live("production Grok interrupt flags still hard-kill and respawn on user Stop", () => |
| 8588 | Effect.gen(function* () { | 8215 | Effect.gen(function* () { |
| 8589 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 8216 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 8590 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 8591 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 8217 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 8592 | const path = yield* Path.Path; | 8218 | const path = yield* Path.Path; |
| 8593 | const host = yield* ProviderHost.ProviderHost; | | |
| 8594 | const selfInvocation = yield* resolveSelfInvocation(); | 8219 | const selfInvocation = yield* resolveSelfInvocation(); |
| 8595 | const mockAgentPath = yield* path.fromFileUrl( | 8220 | const mockAgentPath = yield* path.fromFileUrl( |
| 8596 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 8221 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -8598,8 +8223,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -8598,8 +8223,7 @@ describe("AcpAdapterV2", () => { |
| 8598 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); | 8223 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); |
| 8599 | const instanceId = ProviderInstanceId.make("acp-test"); | 8224 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 8600 | let runtimeOrdinalSeen = 0; | 8225 | let runtimeOrdinalSeen = 0; |
| 8601 | const adapter = makeAcpAdapterV2({ | 8226 | const adapter = yield* makeAcpAdapterV2({ |
| 8602 | crypto: yield* Crypto.Crypto, | | |
| 8603 | instanceId, | 8227 | instanceId, |
| 8604 | flavor: { | 8228 | flavor: { |
| 8605 | driver: ACP_TEST_DRIVER, | 8229 | driver: ACP_TEST_DRIVER, |
| ... | @@ -8627,9 +8251,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -8627,9 +8251,6 @@ describe("AcpAdapterV2", () => { |
| 8627 | protocolEvents, | 8251 | protocolEvents, |
| 8628 | }), | 8252 | }), |
| 8629 | }, | 8253 | }, |
| 8630 | fileSystem, | | |
| 8631 | idAllocator, | | |
| 8632 | host, | | |
| 8633 | selfInvocation, | 8254 | selfInvocation, |
| 8634 | continuationRequests: { offer: () => Effect.void }, | 8255 | continuationRequests: { offer: () => Effect.void }, |
| 8635 | }); | 8256 | }); |
| ... | @@ -8718,10 +8339,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -8718,10 +8339,8 @@ describe("AcpAdapterV2", () => { |
| 8718 | () => | 8339 | () => |
| 8719 | Effect.gen(function* () { | 8340 | Effect.gen(function* () { |
| 8720 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 8341 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 8721 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 8722 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 8342 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 8723 | const path = yield* Path.Path; | 8343 | const path = yield* Path.Path; |
| 8724 | const host = yield* ProviderHost.ProviderHost; | | |
| 8725 | const selfInvocation = yield* resolveSelfInvocation(); | 8344 | const selfInvocation = yield* resolveSelfInvocation(); |
| 8726 | const mockAgentPath = yield* path.fromFileUrl( | 8345 | const mockAgentPath = yield* path.fromFileUrl( |
| 8727 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 8346 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -8736,12 +8355,11 @@ describe("AcpAdapterV2", () => { | ... | @@ -8736,12 +8355,11 @@ describe("AcpAdapterV2", () => { |
| 8736 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; | 8355 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; |
| 8737 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; | 8356 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; |
| 8738 | const promptSettled = yield* Deferred.make<void>(); | 8357 | const promptSettled = yield* Deferred.make<void>(); |
| 8739 | const adapter = makeAcpAdapterV2({ | 8358 | const adapter = yield* makeAcpAdapterV2({ |
| 8740 | testHooks: { | 8359 | testHooks: { |
| 8741 | afterPromptSettledWithBackgroundWork: () => | 8360 | afterPromptSettledWithBackgroundWork: () => |
| 8742 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), | 8361 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), |
| 8743 | }, | 8362 | }, |
| 8744 | crypto: yield* Crypto.Crypto, | | |
| 8745 | instanceId, | 8363 | instanceId, |
| 8746 | flavor: { | 8364 | flavor: { |
| 8747 | driver: ACP_TEST_DRIVER, | 8365 | driver: ACP_TEST_DRIVER, |
| ... | @@ -8796,9 +8414,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -8796,9 +8414,6 @@ describe("AcpAdapterV2", () => { |
| 8796 | }), | 8414 | }), |
| 8797 | }), | 8415 | }), |
| 8798 | }, | 8416 | }, |
| 8799 | fileSystem, | | |
| 8800 | idAllocator, | | |
| 8801 | host, | | |
| 8802 | selfInvocation, | 8417 | selfInvocation, |
| 8803 | }); | 8418 | }); |
| 8804 | const threadId = ThreadId.make("thread-acp-stop-after-soft-steer-orphan"); | 8419 | const threadId = ThreadId.make("thread-acp-stop-after-soft-steer-orphan"); |
| ... | @@ -9022,10 +8637,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -9022,10 +8637,8 @@ describe("AcpAdapterV2", () => { |
| 9022 | it.live("Direct Stop projects an interrupt-deferred terminal exactly once", () => | 8637 | it.live("Direct Stop projects an interrupt-deferred terminal exactly once", () => |
| 9023 | Effect.gen(function* () { | 8638 | Effect.gen(function* () { |
| 9024 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 8639 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 9025 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 9026 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 8640 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 9027 | const path = yield* Path.Path; | 8641 | const path = yield* Path.Path; |
| 9028 | const host = yield* ProviderHost.ProviderHost; | | |
| 9029 | const selfInvocation = yield* resolveSelfInvocation(); | 8642 | const selfInvocation = yield* resolveSelfInvocation(); |
| 9030 | const mockAgentPath = yield* path.fromFileUrl( | 8643 | const mockAgentPath = yield* path.fromFileUrl( |
| 9031 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 8644 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -9036,8 +8649,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -9036,8 +8649,7 @@ describe("AcpAdapterV2", () => { |
| 9036 | let subagentPhase: "spawn" | "complete" = "spawn"; | 8649 | let subagentPhase: "spawn" | "complete" = "spawn"; |
| 9037 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; | 8650 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; |
| 9038 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; | 8651 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; |
| 9039 | const adapter = makeAcpAdapterV2({ | 8652 | const adapter = yield* makeAcpAdapterV2({ |
| 9040 | crypto: yield* Crypto.Crypto, | | |
| 9041 | instanceId, | 8653 | instanceId, |
| 9042 | flavor: { | 8654 | flavor: { |
| 9043 | driver: ACP_TEST_DRIVER, | 8655 | driver: ACP_TEST_DRIVER, |
| ... | @@ -9084,9 +8696,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -9084,9 +8696,6 @@ describe("AcpAdapterV2", () => { |
| 9084 | }), | 8696 | }), |
| 9085 | }), | 8697 | }), |
| 9086 | }, | 8698 | }, |
| 9087 | fileSystem, | | |
| 9088 | idAllocator, | | |
| 9089 | host, | | |
| 9090 | selfInvocation, | 8699 | selfInvocation, |
| 9091 | continuationRequests: { offer: () => Effect.void }, | 8700 | continuationRequests: { offer: () => Effect.void }, |
| 9092 | }); | 8701 | }); |
| ... | @@ -9219,10 +8828,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -9219,10 +8828,8 @@ describe("AcpAdapterV2", () => { |
| 9219 | () => | 8828 | () => |
| 9220 | Effect.gen(function* () { | 8829 | Effect.gen(function* () { |
| 9221 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 8830 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 9222 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 9223 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 8831 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 9224 | const path = yield* Path.Path; | 8832 | const path = yield* Path.Path; |
| 9225 | const host = yield* ProviderHost.ProviderHost; | | |
| 9226 | const selfInvocation = yield* resolveSelfInvocation(); | 8833 | const selfInvocation = yield* resolveSelfInvocation(); |
| 9227 | const mockAgentPath = yield* path.fromFileUrl( | 8834 | const mockAgentPath = yield* path.fromFileUrl( |
| 9228 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 8835 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -9238,8 +8845,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -9238,8 +8845,7 @@ describe("AcpAdapterV2", () => { |
| 9238 | // interrupt then ORs wire-done with promptSettled under the permit. | 8845 | // interrupt then ORs wire-done with promptSettled under the permit. |
| 9239 | const promptWireReturned = yield* Deferred.make<void>(); | 8846 | const promptWireReturned = yield* Deferred.make<void>(); |
| 9240 | const releasePromptCompletion = yield* Deferred.make<void>(); | 8847 | const releasePromptCompletion = yield* Deferred.make<void>(); |
| 9241 | const adapter = makeAcpAdapterV2({ | 8848 | const adapter = yield* makeAcpAdapterV2({ |
| 9242 | crypto: yield* Crypto.Crypto, | | |
| 9243 | instanceId, | 8849 | instanceId, |
| 9244 | flavor: { | 8850 | flavor: { |
| 9245 | driver: ACP_TEST_DRIVER, | 8851 | driver: ACP_TEST_DRIVER, |
| ... | @@ -9295,9 +8901,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -9295,9 +8901,6 @@ describe("AcpAdapterV2", () => { |
| 9295 | }), | 8901 | }), |
| 9296 | }), | 8902 | }), |
| 9297 | }, | 8903 | }, |
| 9298 | fileSystem, | | |
| 9299 | idAllocator, | | |
| 9300 | host, | | |
| 9301 | selfInvocation, | 8904 | selfInvocation, |
| 9302 | }); | 8905 | }); |
| 9303 | const threadId = ThreadId.make("thread-acp-settled-soft-admission-race"); | 8906 | const threadId = ThreadId.make("thread-acp-settled-soft-admission-race"); |
| ... | @@ -9389,10 +8992,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -9389,10 +8992,8 @@ describe("AcpAdapterV2", () => { |
| 9389 | () => | 8992 | () => |
| 9390 | Effect.gen(function* () { | 8993 | Effect.gen(function* () { |
| 9391 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 8994 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 9392 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 9393 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 8995 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 9394 | const path = yield* Path.Path; | 8996 | const path = yield* Path.Path; |
| 9395 | const host = yield* ProviderHost.ProviderHost; | | |
| 9396 | const selfInvocation = yield* resolveSelfInvocation(); | 8997 | const selfInvocation = yield* resolveSelfInvocation(); |
| 9397 | const mockAgentPath = yield* path.fromFileUrl( | 8998 | const mockAgentPath = yield* path.fromFileUrl( |
| 9398 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 8999 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -9400,8 +9001,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -9400,8 +9001,7 @@ describe("AcpAdapterV2", () => { |
| 9400 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); | 9001 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); |
| 9401 | const continuationRequests: Array<ProviderContinuationRequest> = []; | 9002 | const continuationRequests: Array<ProviderContinuationRequest> = []; |
| 9402 | const instanceId = ProviderInstanceId.make("acp-test"); | 9003 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 9403 | const adapter = makeAcpAdapterV2({ | 9004 | const adapter = yield* makeAcpAdapterV2({ |
| 9404 | crypto: yield* Crypto.Crypto, | | |
| 9405 | instanceId, | 9005 | instanceId, |
| 9406 | flavor: { | 9006 | flavor: { |
| 9407 | driver: ACP_TEST_DRIVER, | 9007 | driver: ACP_TEST_DRIVER, |
| ... | @@ -9428,9 +9028,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -9428,9 +9028,6 @@ describe("AcpAdapterV2", () => { |
| 9428 | protocolEvents, | 9028 | protocolEvents, |
| 9429 | }), | 9029 | }), |
| 9430 | }, | 9030 | }, |
| 9431 | fileSystem, | | |
| 9432 | idAllocator, | | |
| 9433 | host, | | |
| 9434 | selfInvocation, | 9031 | selfInvocation, |
| 9435 | continuationRequests: { | 9032 | continuationRequests: { |
| 9436 | offer: (request) => | 9033 | offer: (request) => |
| ... | @@ -9520,10 +9117,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -9520,10 +9117,8 @@ describe("AcpAdapterV2", () => { |
| 9520 | () => | 9117 | () => |
| 9521 | Effect.gen(function* () { | 9118 | Effect.gen(function* () { |
| 9522 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 9119 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 9523 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 9524 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 9120 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 9525 | const path = yield* Path.Path; | 9121 | const path = yield* Path.Path; |
| 9526 | const host = yield* ProviderHost.ProviderHost; | | |
| 9527 | const selfInvocation = yield* resolveSelfInvocation(); | 9122 | const selfInvocation = yield* resolveSelfInvocation(); |
| 9528 | const mockAgentPath = yield* path.fromFileUrl( | 9123 | const mockAgentPath = yield* path.fromFileUrl( |
| 9529 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 9124 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -9532,8 +9127,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -9532,8 +9127,7 @@ describe("AcpAdapterV2", () => { |
| 9532 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; | 9127 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; |
| 9533 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; | 9128 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; |
| 9534 | const instanceId = ProviderInstanceId.make("acp-test"); | 9129 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 9535 | const adapter = makeAcpAdapterV2({ | 9130 | const adapter = yield* makeAcpAdapterV2({ |
| 9536 | crypto: yield* Crypto.Crypto, | | |
| 9537 | instanceId, | 9131 | instanceId, |
| 9538 | flavor: { | 9132 | flavor: { |
| 9539 | driver: ACP_TEST_DRIVER, | 9133 | driver: ACP_TEST_DRIVER, |
| ... | @@ -9551,9 +9145,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -9551,9 +9145,6 @@ describe("AcpAdapterV2", () => { |
| 9551 | }), | 9145 | }), |
| 9552 | }), | 9146 | }), |
| 9553 | }, | 9147 | }, |
| 9554 | fileSystem, | | |
| 9555 | idAllocator, | | |
| 9556 | host, | | |
| 9557 | selfInvocation, | 9148 | selfInvocation, |
| 9558 | continuationRequests: { | 9149 | continuationRequests: { |
| 9559 | offer: (request) => | 9150 | offer: (request) => |
| ... | @@ -9640,10 +9231,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -9640,10 +9231,8 @@ describe("AcpAdapterV2", () => { |
| 9640 | it.effect("keeps a buffered continuation current when a user turn starts before dispatch", () => | 9231 | it.effect("keeps a buffered continuation current when a user turn starts before dispatch", () => |
| 9641 | Effect.gen(function* () { | 9232 | Effect.gen(function* () { |
| 9642 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 9233 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 9643 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 9644 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 9234 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 9645 | const path = yield* Path.Path; | 9235 | const path = yield* Path.Path; |
| 9646 | const host = yield* ProviderHost.ProviderHost; | | |
| 9647 | const selfInvocation = yield* resolveSelfInvocation(); | 9236 | const selfInvocation = yield* resolveSelfInvocation(); |
| 9648 | const mockAgentPath = yield* path.fromFileUrl( | 9237 | const mockAgentPath = yield* path.fromFileUrl( |
| 9649 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 9238 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -9656,8 +9245,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -9656,8 +9245,7 @@ describe("AcpAdapterV2", () => { |
| 9656 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; | 9245 | type RuntimeService = AcpSessionRuntime.AcpSessionRuntime["Service"]; |
| 9657 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; | 9246 | let sessionUpdateHandler: Parameters<RuntimeService["handleSessionUpdate"]>[0] | undefined; |
| 9658 | const instanceId = ProviderInstanceId.make("acp-test"); | 9247 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 9659 | const adapter = makeAcpAdapterV2({ | 9248 | const adapter = yield* makeAcpAdapterV2({ |
| 9660 | crypto: yield* Crypto.Crypto, | | |
| 9661 | instanceId, | 9249 | instanceId, |
| 9662 | flavor: { | 9250 | flavor: { |
| 9663 | driver: ACP_TEST_DRIVER, | 9251 | driver: ACP_TEST_DRIVER, |
| ... | @@ -9687,9 +9275,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -9687,9 +9275,6 @@ describe("AcpAdapterV2", () => { |
| 9687 | }), | 9275 | }), |
| 9688 | }), | 9276 | }), |
| 9689 | }, | 9277 | }, |
| 9690 | fileSystem, | | |
| 9691 | idAllocator, | | |
| 9692 | host, | | |
| 9693 | selfInvocation, | 9278 | selfInvocation, |
| 9694 | continuationRequests: { | 9279 | continuationRequests: { |
| 9695 | offer: (request) => | 9280 | offer: (request) => |
| ... | @@ -9852,7 +9437,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -9852,7 +9437,6 @@ describe("AcpAdapterV2", () => { |
| 9852 | const fileSystem = yield* FileSystem.FileSystem; | 9437 | const fileSystem = yield* FileSystem.FileSystem; |
| 9853 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 9438 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 9854 | const path = yield* Path.Path; | 9439 | const path = yield* Path.Path; |
| 9855 | const host = yield* ProviderHost.ProviderHost; | | |
| 9856 | const selfInvocation = yield* resolveSelfInvocation(); | 9440 | const selfInvocation = yield* resolveSelfInvocation(); |
| 9857 | const mockAgentPath = yield* path.fromFileUrl( | 9441 | const mockAgentPath = yield* path.fromFileUrl( |
| 9858 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 9442 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -9861,8 +9445,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -9861,8 +9445,7 @@ describe("AcpAdapterV2", () => { |
| 9861 | const triggerPath = path.join(triggerDir, "report-trigger"); | 9445 | const triggerPath = path.join(triggerDir, "report-trigger"); |
| 9862 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); | 9446 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); |
| 9863 | const instanceId = ProviderInstanceId.make("acp-test"); | 9447 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 9864 | const adapter = makeAcpAdapterV2({ | 9448 | const adapter = yield* makeAcpAdapterV2({ |
| 9865 | crypto: yield* Crypto.Crypto, | | |
| 9866 | instanceId, | 9449 | instanceId, |
| 9867 | flavor: { | 9450 | flavor: { |
| 9868 | driver: ACP_TEST_DRIVER, | 9451 | driver: ACP_TEST_DRIVER, |
| ... | @@ -9894,9 +9477,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -9894,9 +9477,6 @@ describe("AcpAdapterV2", () => { |
| 9894 | protocolEvents, | 9477 | protocolEvents, |
| 9895 | }), | 9478 | }), |
| 9896 | }, | 9479 | }, |
| 9897 | fileSystem, | | |
| 9898 | idAllocator, | | |
| 9899 | host, | | |
| 9900 | selfInvocation, | 9480 | selfInvocation, |
| 9901 | }); | 9481 | }); |
| 9902 | const threadId = ThreadId.make("thread-acp-injected-report-hold"); | 9482 | const threadId = ThreadId.make("thread-acp-injected-report-hold"); |
| ... | @@ -10018,7 +9598,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -10018,7 +9598,6 @@ describe("AcpAdapterV2", () => { |
| 10018 | const fileSystem = yield* FileSystem.FileSystem; | 9598 | const fileSystem = yield* FileSystem.FileSystem; |
| 10019 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 9599 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 10020 | const path = yield* Path.Path; | 9600 | const path = yield* Path.Path; |
| 10021 | const host = yield* ProviderHost.ProviderHost; | | |
| 10022 | const selfInvocation = yield* resolveSelfInvocation(); | 9601 | const selfInvocation = yield* resolveSelfInvocation(); |
| 10023 | const mockAgentPath = yield* path.fromFileUrl( | 9602 | const mockAgentPath = yield* path.fromFileUrl( |
| 10024 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 9603 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -10037,8 +9616,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -10037,8 +9616,7 @@ describe("AcpAdapterV2", () => { |
| 10037 | | null; | 9616 | | null; |
| 10038 | } = { current: null }; | 9617 | } = { current: null }; |
| 10039 | const instanceId = ProviderInstanceId.make("acp-test"); | 9618 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 10040 | const adapter = makeAcpAdapterV2({ | 9619 | const adapter = yield* makeAcpAdapterV2({ |
| 10041 | crypto: yield* Crypto.Crypto, | | |
| 10042 | instanceId, | 9620 | instanceId, |
| 10043 | flavor: { | 9621 | flavor: { |
| 10044 | driver: ACP_TEST_DRIVER, | 9622 | driver: ACP_TEST_DRIVER, |
| ... | @@ -10075,9 +9653,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -10075,9 +9653,6 @@ describe("AcpAdapterV2", () => { |
| 10075 | protocolEvents, | 9653 | protocolEvents, |
| 10076 | }), | 9654 | }), |
| 10077 | }, | 9655 | }, |
| 10078 | fileSystem, | | |
| 10079 | idAllocator, | | |
| 10080 | host, | | |
| 10081 | selfInvocation, | 9656 | selfInvocation, |
| 10082 | continuationRequests: { | 9657 | continuationRequests: { |
| 10083 | offer: (request) => | 9658 | offer: (request) => |
| ... | @@ -10217,10 +9792,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -10217,10 +9792,8 @@ describe("AcpAdapterV2", () => { |
| 10217 | () => | 9792 | () => |
| 10218 | Effect.gen(function* () { | 9793 | Effect.gen(function* () { |
| 10219 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 9794 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 10220 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 10221 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 9795 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 10222 | const path = yield* Path.Path; | 9796 | const path = yield* Path.Path; |
| 10223 | const host = yield* ProviderHost.ProviderHost; | | |
| 10224 | const selfInvocation = yield* resolveSelfInvocation(); | 9797 | const selfInvocation = yield* resolveSelfInvocation(); |
| 10225 | const mockAgentPath = yield* path.fromFileUrl( | 9798 | const mockAgentPath = yield* path.fromFileUrl( |
| 10226 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 9799 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -10240,8 +9813,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -10240,8 +9813,7 @@ describe("AcpAdapterV2", () => { |
| 10240 | | null; | 9813 | | null; |
| 10241 | } = { current: null }; | 9814 | } = { current: null }; |
| 10242 | const instanceId = ProviderInstanceId.make("acp-test"); | 9815 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 10243 | const adapter = makeAcpAdapterV2({ | 9816 | const adapter = yield* makeAcpAdapterV2({ |
| 10244 | crypto: yield* Crypto.Crypto, | | |
| 10245 | instanceId, | 9817 | instanceId, |
| 10246 | flavor: { | 9818 | flavor: { |
| 10247 | driver: ACP_TEST_DRIVER, | 9819 | driver: ACP_TEST_DRIVER, |
| ... | @@ -10273,9 +9845,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -10273,9 +9845,6 @@ describe("AcpAdapterV2", () => { |
| 10273 | }), | 9845 | }), |
| 10274 | }), | 9846 | }), |
| 10275 | }, | 9847 | }, |
| 10276 | fileSystem, | | |
| 10277 | idAllocator, | | |
| 10278 | host, | | |
| 10279 | selfInvocation, | 9848 | selfInvocation, |
| 10280 | continuationRequests: { | 9849 | continuationRequests: { |
| 10281 | offer: (request) => | 9850 | offer: (request) => |
| ... | @@ -10457,10 +10026,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -10457,10 +10026,8 @@ describe("AcpAdapterV2", () => { |
| 10457 | () => | 10026 | () => |
| 10458 | Effect.gen(function* () { | 10027 | Effect.gen(function* () { |
| 10459 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 10028 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 10460 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 10461 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 10029 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 10462 | const path = yield* Path.Path; | 10030 | const path = yield* Path.Path; |
| 10463 | const host = yield* ProviderHost.ProviderHost; | | |
| 10464 | const selfInvocation = yield* resolveSelfInvocation(); | 10031 | const selfInvocation = yield* resolveSelfInvocation(); |
| 10465 | const mockAgentPath = yield* path.fromFileUrl( | 10032 | const mockAgentPath = yield* path.fromFileUrl( |
| 10466 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 10033 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -10480,8 +10047,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -10480,8 +10047,7 @@ describe("AcpAdapterV2", () => { |
| 10480 | | null; | 10047 | | null; |
| 10481 | } = { current: null }; | 10048 | } = { current: null }; |
| 10482 | const instanceId = ProviderInstanceId.make("acp-test"); | 10049 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 10483 | const adapter = makeAcpAdapterV2({ | 10050 | const adapter = yield* makeAcpAdapterV2({ |
| 10484 | crypto: yield* Crypto.Crypto, | | |
| 10485 | instanceId, | 10051 | instanceId, |
| 10486 | flavor: { | 10052 | flavor: { |
| 10487 | driver: ACP_TEST_DRIVER, | 10053 | driver: ACP_TEST_DRIVER, |
| ... | @@ -10520,9 +10086,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -10520,9 +10086,6 @@ describe("AcpAdapterV2", () => { |
| 10520 | }), | 10086 | }), |
| 10521 | }), | 10087 | }), |
| 10522 | }, | 10088 | }, |
| 10523 | fileSystem, | | |
| 10524 | idAllocator, | | |
| 10525 | host, | | |
| 10526 | selfInvocation, | 10089 | selfInvocation, |
| 10527 | continuationRequests: { | 10090 | continuationRequests: { |
| 10528 | offer: (request) => | 10091 | offer: (request) => |
| ... | @@ -10676,10 +10239,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -10676,10 +10239,8 @@ describe("AcpAdapterV2", () => { |
| 10676 | () => | 10239 | () => |
| 10677 | Effect.gen(function* () { | 10240 | Effect.gen(function* () { |
| 10678 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 10241 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 10679 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 10680 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 10242 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 10681 | const path = yield* Path.Path; | 10243 | const path = yield* Path.Path; |
| 10682 | const host = yield* ProviderHost.ProviderHost; | | |
| 10683 | const selfInvocation = yield* resolveSelfInvocation(); | 10244 | const selfInvocation = yield* resolveSelfInvocation(); |
| 10684 | const mockAgentPath = yield* path.fromFileUrl( | 10245 | const mockAgentPath = yield* path.fromFileUrl( |
| 10685 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 10246 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -10699,8 +10260,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -10699,8 +10260,7 @@ describe("AcpAdapterV2", () => { |
| 10699 | | null; | 10260 | | null; |
| 10700 | } = { current: null }; | 10261 | } = { current: null }; |
| 10701 | const instanceId = ProviderInstanceId.make("acp-test"); | 10262 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 10702 | const adapter = makeAcpAdapterV2({ | 10263 | const adapter = yield* makeAcpAdapterV2({ |
| 10703 | crypto: yield* Crypto.Crypto, | | |
| 10704 | instanceId, | 10264 | instanceId, |
| 10705 | flavor: { | 10265 | flavor: { |
| 10706 | driver: ACP_TEST_DRIVER, | 10266 | driver: ACP_TEST_DRIVER, |
| ... | @@ -10743,9 +10303,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -10743,9 +10303,6 @@ describe("AcpAdapterV2", () => { |
| 10743 | }), | 10303 | }), |
| 10744 | }), | 10304 | }), |
| 10745 | }, | 10305 | }, |
| 10746 | fileSystem, | | |
| 10747 | idAllocator, | | |
| 10748 | host, | | |
| 10749 | selfInvocation, | 10306 | selfInvocation, |
| 10750 | continuationRequests: { | 10307 | continuationRequests: { |
| 10751 | offer: (request) => | 10308 | offer: (request) => |
| ... | @@ -10891,10 +10448,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -10891,10 +10448,8 @@ describe("AcpAdapterV2", () => { |
| 10891 | () => | 10448 | () => |
| 10892 | Effect.gen(function* () { | 10449 | Effect.gen(function* () { |
| 10893 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 10450 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 10894 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 10895 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 10451 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 10896 | const path = yield* Path.Path; | 10452 | const path = yield* Path.Path; |
| 10897 | const host = yield* ProviderHost.ProviderHost; | | |
| 10898 | const selfInvocation = yield* resolveSelfInvocation(); | 10453 | const selfInvocation = yield* resolveSelfInvocation(); |
| 10899 | const mockAgentPath = yield* path.fromFileUrl( | 10454 | const mockAgentPath = yield* path.fromFileUrl( |
| 10900 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 10455 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -10914,8 +10469,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -10914,8 +10469,7 @@ describe("AcpAdapterV2", () => { |
| 10914 | | null; | 10469 | | null; |
| 10915 | } = { current: null }; | 10470 | } = { current: null }; |
| 10916 | const instanceId = ProviderInstanceId.make("acp-test"); | 10471 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 10917 | const adapter = makeAcpAdapterV2({ | 10472 | const adapter = yield* makeAcpAdapterV2({ |
| 10918 | crypto: yield* Crypto.Crypto, | | |
| 10919 | instanceId, | 10473 | instanceId, |
| 10920 | flavor: { | 10474 | flavor: { |
| 10921 | driver: ACP_TEST_DRIVER, | 10475 | driver: ACP_TEST_DRIVER, |
| ... | @@ -10980,9 +10534,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -10980,9 +10534,6 @@ describe("AcpAdapterV2", () => { |
| 10980 | }), | 10534 | }), |
| 10981 | }), | 10535 | }), |
| 10982 | }, | 10536 | }, |
| 10983 | fileSystem, | | |
| 10984 | idAllocator, | | |
| 10985 | host, | | |
| 10986 | selfInvocation, | 10537 | selfInvocation, |
| 10987 | continuationRequests: { | 10538 | continuationRequests: { |
| 10988 | offer: (request) => | 10539 | offer: (request) => |
| ... | @@ -11263,10 +10814,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -11263,10 +10814,8 @@ describe("AcpAdapterV2", () => { |
| 11263 | it.effect("a wake names work that ended while the previous wake was queued", () => | 10814 | it.effect("a wake names work that ended while the previous wake was queued", () => |
| 11264 | Effect.gen(function* () { | 10815 | Effect.gen(function* () { |
| 11265 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 10816 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 11266 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 11267 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 10817 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 11268 | const path = yield* Path.Path; | 10818 | const path = yield* Path.Path; |
| 11269 | const host = yield* ProviderHost.ProviderHost; | | |
| 11270 | const selfInvocation = yield* resolveSelfInvocation(); | 10819 | const selfInvocation = yield* resolveSelfInvocation(); |
| 11271 | const mockAgentPath = yield* path.fromFileUrl( | 10820 | const mockAgentPath = yield* path.fromFileUrl( |
| 11272 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 10821 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -11277,8 +10826,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -11277,8 +10826,7 @@ describe("AcpAdapterV2", () => { |
| 11277 | let applyMutation: AcpAdapterV2ExtensionContext["applyBackgroundTaskMutation"] | undefined; | 10826 | let applyMutation: AcpAdapterV2ExtensionContext["applyBackgroundTaskMutation"] | undefined; |
| 11278 | const promptGate = yield* Deferred.make<EffectAcpSchema.PromptResponse>(); | 10827 | const promptGate = yield* Deferred.make<EffectAcpSchema.PromptResponse>(); |
| 11279 | const instanceId = ProviderInstanceId.make("acp-test"); | 10828 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 11280 | const adapter = makeAcpAdapterV2({ | 10829 | const adapter = yield* makeAcpAdapterV2({ |
| 11281 | crypto: yield* Crypto.Crypto, | | |
| 11282 | instanceId, | 10830 | instanceId, |
| 11283 | flavor: { | 10831 | flavor: { |
| 11284 | driver: ACP_TEST_DRIVER, | 10832 | driver: ACP_TEST_DRIVER, |
| ... | @@ -11303,9 +10851,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -11303,9 +10851,6 @@ describe("AcpAdapterV2", () => { |
| 11303 | }), | 10851 | }), |
| 11304 | }), | 10852 | }), |
| 11305 | }, | 10853 | }, |
| 11306 | fileSystem, | | |
| 11307 | idAllocator, | | |
| 11308 | host, | | |
| 11309 | selfInvocation, | 10854 | selfInvocation, |
| 11310 | continuationRequests: { | 10855 | continuationRequests: { |
| 11311 | offer: (request) => | 10856 | offer: (request) => |
| ... | @@ -11417,10 +10962,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -11417,10 +10962,8 @@ describe("AcpAdapterV2", () => { |
| 11417 | it.effect("mid-turn completed mutation defers offer until finalize only when unhandled", () => | 10962 | it.effect("mid-turn completed mutation defers offer until finalize only when unhandled", () => |
| 11418 | Effect.gen(function* () { | 10963 | Effect.gen(function* () { |
| 11419 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 10964 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 11420 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 11421 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 10965 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 11422 | const path = yield* Path.Path; | 10966 | const path = yield* Path.Path; |
| 11423 | const host = yield* ProviderHost.ProviderHost; | | |
| 11424 | const selfInvocation = yield* resolveSelfInvocation(); | 10967 | const selfInvocation = yield* resolveSelfInvocation(); |
| 11425 | const mockAgentPath = yield* path.fromFileUrl( | 10968 | const mockAgentPath = yield* path.fromFileUrl( |
| 11426 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 10969 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -11440,8 +10983,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -11440,8 +10983,7 @@ describe("AcpAdapterV2", () => { |
| 11440 | | null; | 10983 | | null; |
| 11441 | } = { current: null }; | 10984 | } = { current: null }; |
| 11442 | const instanceId = ProviderInstanceId.make("acp-test"); | 10985 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 11443 | const adapter = makeAcpAdapterV2({ | 10986 | const adapter = yield* makeAcpAdapterV2({ |
| 11444 | crypto: yield* Crypto.Crypto, | | |
| 11445 | instanceId, | 10987 | instanceId, |
| 11446 | flavor: { | 10988 | flavor: { |
| 11447 | driver: ACP_TEST_DRIVER, | 10989 | driver: ACP_TEST_DRIVER, |
| ... | @@ -11487,9 +11029,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -11487,9 +11029,6 @@ describe("AcpAdapterV2", () => { |
| 11487 | }), | 11029 | }), |
| 11488 | }), | 11030 | }), |
| 11489 | }, | 11031 | }, |
| 11490 | fileSystem, | | |
| 11491 | idAllocator, | | |
| 11492 | host, | | |
| 11493 | selfInvocation, | 11032 | selfInvocation, |
| 11494 | continuationRequests: { | 11033 | continuationRequests: { |
| 11495 | offer: (request) => | 11034 | offer: (request) => |
| ... | @@ -11748,10 +11287,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -11748,10 +11287,8 @@ describe("AcpAdapterV2", () => { |
| 11748 | () => | 11287 | () => |
| 11749 | Effect.gen(function* () { | 11288 | Effect.gen(function* () { |
| 11750 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 11289 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 11751 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 11752 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 11290 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 11753 | const path = yield* Path.Path; | 11291 | const path = yield* Path.Path; |
| 11754 | const host = yield* ProviderHost.ProviderHost; | | |
| 11755 | const selfInvocation = yield* resolveSelfInvocation(); | 11292 | const selfInvocation = yield* resolveSelfInvocation(); |
| 11756 | const mockAgentPath = yield* path.fromFileUrl( | 11293 | const mockAgentPath = yield* path.fromFileUrl( |
| 11757 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 11294 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -11771,8 +11308,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -11771,8 +11308,7 @@ describe("AcpAdapterV2", () => { |
| 11771 | | null; | 11308 | | null; |
| 11772 | } = { current: null }; | 11309 | } = { current: null }; |
| 11773 | const instanceId = ProviderInstanceId.make("acp-test"); | 11310 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 11774 | const adapter = makeAcpAdapterV2({ | 11311 | const adapter = yield* makeAcpAdapterV2({ |
| 11775 | crypto: yield* Crypto.Crypto, | | |
| 11776 | instanceId, | 11312 | instanceId, |
| 11777 | flavor: { | 11313 | flavor: { |
| 11778 | driver: ACP_TEST_DRIVER, | 11314 | driver: ACP_TEST_DRIVER, |
| ... | @@ -11799,9 +11335,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -11799,9 +11335,6 @@ describe("AcpAdapterV2", () => { |
| 11799 | }), | 11335 | }), |
| 11800 | }), | 11336 | }), |
| 11801 | }, | 11337 | }, |
| 11802 | fileSystem, | | |
| 11803 | idAllocator, | | |
| 11804 | host, | | |
| 11805 | selfInvocation, | 11338 | selfInvocation, |
| 11806 | continuationRequests: { | 11339 | continuationRequests: { |
| 11807 | offer: (request) => | 11340 | offer: (request) => |
| ... | @@ -11935,10 +11468,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -11935,10 +11468,8 @@ describe("AcpAdapterV2", () => { |
| 11935 | it.effect("empty-drain continuation turn waits the quiet window so late frames can attach", () => | 11468 | it.effect("empty-drain continuation turn waits the quiet window so late frames can attach", () => |
| 11936 | Effect.gen(function* () { | 11469 | Effect.gen(function* () { |
| 11937 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 11470 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 11938 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 11939 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 11471 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 11940 | const path = yield* Path.Path; | 11472 | const path = yield* Path.Path; |
| 11941 | const host = yield* ProviderHost.ProviderHost; | | |
| 11942 | const selfInvocation = yield* resolveSelfInvocation(); | 11473 | const selfInvocation = yield* resolveSelfInvocation(); |
| 11943 | const mockAgentPath = yield* path.fromFileUrl( | 11474 | const mockAgentPath = yield* path.fromFileUrl( |
| 11944 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 11475 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -11958,8 +11489,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -11958,8 +11489,7 @@ describe("AcpAdapterV2", () => { |
| 11958 | | null; | 11489 | | null; |
| 11959 | } = { current: null }; | 11490 | } = { current: null }; |
| 11960 | const instanceId = ProviderInstanceId.make("acp-test"); | 11491 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 11961 | const adapter = makeAcpAdapterV2({ | 11492 | const adapter = yield* makeAcpAdapterV2({ |
| 11962 | crypto: yield* Crypto.Crypto, | | |
| 11963 | instanceId, | 11493 | instanceId, |
| 11964 | flavor: { | 11494 | flavor: { |
| 11965 | driver: ACP_TEST_DRIVER, | 11495 | driver: ACP_TEST_DRIVER, |
| ... | @@ -11990,9 +11520,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -11990,9 +11520,6 @@ describe("AcpAdapterV2", () => { |
| 11990 | }), | 11520 | }), |
| 11991 | }), | 11521 | }), |
| 11992 | }, | 11522 | }, |
| 11993 | fileSystem, | | |
| 11994 | idAllocator, | | |
| 11995 | host, | | |
| 11996 | selfInvocation, | 11523 | selfInvocation, |
| 11997 | continuationRequests: { | 11524 | continuationRequests: { |
| 11998 | offer: (request) => | 11525 | offer: (request) => |
| ... | @@ -12179,10 +11706,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -12179,10 +11706,8 @@ describe("AcpAdapterV2", () => { |
| 12179 | it.effect("empty-drain continuation turn finalizes after the quiet window with no frames", () => | 11706 | it.effect("empty-drain continuation turn finalizes after the quiet window with no frames", () => |
| 12180 | Effect.gen(function* () { | 11707 | Effect.gen(function* () { |
| 12181 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 11708 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 12182 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 12183 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 11709 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 12184 | const path = yield* Path.Path; | 11710 | const path = yield* Path.Path; |
| 12185 | const host = yield* ProviderHost.ProviderHost; | | |
| 12186 | const selfInvocation = yield* resolveSelfInvocation(); | 11711 | const selfInvocation = yield* resolveSelfInvocation(); |
| 12187 | const mockAgentPath = yield* path.fromFileUrl( | 11712 | const mockAgentPath = yield* path.fromFileUrl( |
| 12188 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 11713 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -12202,8 +11727,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -12202,8 +11727,7 @@ describe("AcpAdapterV2", () => { |
| 12202 | | null; | 11727 | | null; |
| 12203 | } = { current: null }; | 11728 | } = { current: null }; |
| 12204 | const instanceId = ProviderInstanceId.make("acp-test"); | 11729 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 12205 | const adapter = makeAcpAdapterV2({ | 11730 | const adapter = yield* makeAcpAdapterV2({ |
| 12206 | crypto: yield* Crypto.Crypto, | | |
| 12207 | instanceId, | 11731 | instanceId, |
| 12208 | flavor: { | 11732 | flavor: { |
| 12209 | driver: ACP_TEST_DRIVER, | 11733 | driver: ACP_TEST_DRIVER, |
| ... | @@ -12232,9 +11756,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -12232,9 +11756,6 @@ describe("AcpAdapterV2", () => { |
| 12232 | }), | 11756 | }), |
| 12233 | }), | 11757 | }), |
| 12234 | }, | 11758 | }, |
| 12235 | fileSystem, | | |
| 12236 | idAllocator, | | |
| 12237 | host, | | |
| 12238 | selfInvocation, | 11759 | selfInvocation, |
| 12239 | continuationRequests: { | 11760 | continuationRequests: { |
| 12240 | offer: (request) => | 11761 | offer: (request) => |
| ... | @@ -12369,18 +11890,15 @@ describe("AcpAdapterV2", () => { | ... | @@ -12369,18 +11890,15 @@ describe("AcpAdapterV2", () => { |
| 12369 | it.effect("restarts the ACP child process before the next prompt after interrupt", () => | 11890 | it.effect("restarts the ACP child process before the next prompt after interrupt", () => |
| 12370 | Effect.gen(function* () { | 11891 | Effect.gen(function* () { |
| 12371 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 11892 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 12372 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 12373 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 11893 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 12374 | const path = yield* Path.Path; | 11894 | const path = yield* Path.Path; |
| 12375 | const host = yield* ProviderHost.ProviderHost; | | |
| 12376 | const selfInvocation = yield* resolveSelfInvocation(); | 11895 | const selfInvocation = yield* resolveSelfInvocation(); |
| 12377 | const mockAgentPath = yield* path.fromFileUrl( | 11896 | const mockAgentPath = yield* path.fromFileUrl( |
| 12378 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 11897 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| 12379 | ); | 11898 | ); |
| 12380 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); | 11899 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); |
| 12381 | const instanceId = ProviderInstanceId.make("acp-test"); | 11900 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 12382 | const adapter = makeAcpAdapterV2({ | 11901 | const adapter = yield* makeAcpAdapterV2({ |
| 12383 | crypto: yield* Crypto.Crypto, | | |
| 12384 | instanceId, | 11902 | instanceId, |
| 12385 | flavor: { | 11903 | flavor: { |
| 12386 | driver: ACP_TEST_DRIVER, | 11904 | driver: ACP_TEST_DRIVER, |
| ... | @@ -12392,9 +11910,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -12392,9 +11910,6 @@ describe("AcpAdapterV2", () => { |
| 12392 | protocolEvents, | 11910 | protocolEvents, |
| 12393 | }), | 11911 | }), |
| 12394 | }, | 11912 | }, |
| 12395 | fileSystem, | | |
| 12396 | idAllocator, | | |
| 12397 | host, | | |
| 12398 | selfInvocation, | 11913 | selfInvocation, |
| 12399 | }); | 11914 | }); |
| 12400 | const threadId = ThreadId.make("thread-acp-restart-after-interrupt"); | 11915 | const threadId = ThreadId.make("thread-acp-restart-after-interrupt"); |
| ... | @@ -12618,7 +12133,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -12618,7 +12133,6 @@ describe("AcpAdapterV2", () => { |
| 12618 | const fileSystem = yield* FileSystem.FileSystem; | 12133 | const fileSystem = yield* FileSystem.FileSystem; |
| 12619 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 12134 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 12620 | const path = yield* Path.Path; | 12135 | const path = yield* Path.Path; |
| 12621 | const host = yield* ProviderHost.ProviderHost; | | |
| 12622 | const selfInvocation = yield* resolveSelfInvocation(); | 12136 | const selfInvocation = yield* resolveSelfInvocation(); |
| 12623 | const mockAgentPath = yield* path.fromFileUrl( | 12137 | const mockAgentPath = yield* path.fromFileUrl( |
| 12624 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 12138 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -12635,8 +12149,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -12635,8 +12149,7 @@ describe("AcpAdapterV2", () => { |
| 12635 | const releaseTeardown = yield* Deferred.make<void>(); | 12149 | const releaseTeardown = yield* Deferred.make<void>(); |
| 12636 | let terminatorCallCount = 0; | 12150 | let terminatorCallCount = 0; |
| 12637 | const instanceId = ProviderInstanceId.make("acp-test"); | 12151 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 12638 | const adapter = makeAcpAdapterV2({ | 12152 | const adapter = yield* makeAcpAdapterV2({ |
| 12639 | crypto: yield* Crypto.Crypto, | | |
| 12640 | instanceId, | 12153 | instanceId, |
| 12641 | flavor: { | 12154 | flavor: { |
| 12642 | driver: ACP_TEST_DRIVER, | 12155 | driver: ACP_TEST_DRIVER, |
| ... | @@ -12665,9 +12178,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -12665,9 +12178,6 @@ describe("AcpAdapterV2", () => { |
| 12665 | protocolEvents, | 12178 | protocolEvents, |
| 12666 | }), | 12179 | }), |
| 12667 | }, | 12180 | }, |
| 12668 | fileSystem, | | |
| 12669 | idAllocator, | | |
| 12670 | host, | | |
| 12671 | selfInvocation, | 12181 | selfInvocation, |
| 12672 | continuationRequests: { | 12182 | continuationRequests: { |
| 12673 | offer: (request) => | 12183 | offer: (request) => |
| ... | @@ -12833,18 +12343,15 @@ describe("AcpAdapterV2", () => { | ... | @@ -12833,18 +12343,15 @@ describe("AcpAdapterV2", () => { |
| 12833 | it.live("durably poisons start and resume when required hard teardown is unavailable", () => | 12343 | it.live("durably poisons start and resume when required hard teardown is unavailable", () => |
| 12834 | Effect.gen(function* () { | 12344 | Effect.gen(function* () { |
| 12835 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 12345 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 12836 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 12837 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 12346 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 12838 | const path = yield* Path.Path; | 12347 | const path = yield* Path.Path; |
| 12839 | const host = yield* ProviderHost.ProviderHost; | | |
| 12840 | const selfInvocation = yield* resolveSelfInvocation(); | 12348 | const selfInvocation = yield* resolveSelfInvocation(); |
| 12841 | const mockAgentPath = yield* path.fromFileUrl( | 12349 | const mockAgentPath = yield* path.fromFileUrl( |
| 12842 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 12350 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| 12843 | ); | 12351 | ); |
| 12844 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); | 12352 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); |
| 12845 | const instanceId = ProviderInstanceId.make("acp-test"); | 12353 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 12846 | const adapter = makeAcpAdapterV2({ | 12354 | const adapter = yield* makeAcpAdapterV2({ |
| 12847 | crypto: yield* Crypto.Crypto, | | |
| 12848 | instanceId, | 12355 | instanceId, |
| 12849 | flavor: { | 12356 | flavor: { |
| 12850 | driver: ACP_TEST_DRIVER, | 12357 | driver: ACP_TEST_DRIVER, |
| ... | @@ -12858,9 +12365,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -12858,9 +12365,6 @@ describe("AcpAdapterV2", () => { |
| 12858 | protocolEvents, | 12365 | protocolEvents, |
| 12859 | }), | 12366 | }), |
| 12860 | }, | 12367 | }, |
| 12861 | fileSystem, | | |
| 12862 | idAllocator, | | |
| 12863 | host, | | |
| 12864 | selfInvocation, | 12368 | selfInvocation, |
| 12865 | }); | 12369 | }); |
| 12866 | const threadId = ThreadId.make("thread-acp-missing-hard-teardown"); | 12370 | const threadId = ThreadId.make("thread-acp-missing-hard-teardown"); |
| ... | @@ -12922,10 +12426,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -12922,10 +12426,8 @@ describe("AcpAdapterV2", () => { |
| 12922 | it.live("holds concurrent startTurn behind successful hard teardown and reloads once", () => | 12426 | it.live("holds concurrent startTurn behind successful hard teardown and reloads once", () => |
| 12923 | Effect.gen(function* () { | 12427 | Effect.gen(function* () { |
| 12924 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 12428 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 12925 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 12926 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 12429 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 12927 | const path = yield* Path.Path; | 12430 | const path = yield* Path.Path; |
| 12928 | const host = yield* ProviderHost.ProviderHost; | | |
| 12929 | const selfInvocation = yield* resolveSelfInvocation(); | 12431 | const selfInvocation = yield* resolveSelfInvocation(); |
| 12930 | const mockAgentPath = yield* path.fromFileUrl( | 12432 | const mockAgentPath = yield* path.fromFileUrl( |
| 12931 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 12433 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -12935,8 +12437,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -12935,8 +12437,7 @@ describe("AcpAdapterV2", () => { |
| 12935 | const releaseTeardown = yield* Deferred.make<void>(); | 12437 | const releaseTeardown = yield* Deferred.make<void>(); |
| 12936 | let runtimeOrdinalSeen = 0; | 12438 | let runtimeOrdinalSeen = 0; |
| 12937 | const instanceId = ProviderInstanceId.make("acp-test"); | 12439 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 12938 | const adapter = makeAcpAdapterV2({ | 12440 | const adapter = yield* makeAcpAdapterV2({ |
| 12939 | crypto: yield* Crypto.Crypto, | | |
| 12940 | instanceId, | 12441 | instanceId, |
| 12941 | flavor: { | 12442 | flavor: { |
| 12942 | driver: ACP_TEST_DRIVER, | 12443 | driver: ACP_TEST_DRIVER, |
| ... | @@ -12960,9 +12461,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -12960,9 +12461,6 @@ describe("AcpAdapterV2", () => { |
| 12960 | protocolEvents, | 12461 | protocolEvents, |
| 12961 | }), | 12462 | }), |
| 12962 | }, | 12463 | }, |
| 12963 | fileSystem, | | |
| 12964 | idAllocator, | | |
| 12965 | host, | | |
| 12966 | selfInvocation, | 12464 | selfInvocation, |
| 12967 | }); | 12465 | }); |
| 12968 | const threadId = ThreadId.make("thread-acp-concurrent-hard-teardown"); | 12466 | const threadId = ThreadId.make("thread-acp-concurrent-hard-teardown"); |
| ... | @@ -13035,10 +12533,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -13035,10 +12533,8 @@ describe("AcpAdapterV2", () => { |
| 13035 | it.live("quarantines old-runtime callbacks after successful hard teardown", () => | 12533 | it.live("quarantines old-runtime callbacks after successful hard teardown", () => |
| 13036 | Effect.gen(function* () { | 12534 | Effect.gen(function* () { |
| 13037 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 12535 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 13038 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 13039 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 12536 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 13040 | const path = yield* Path.Path; | 12537 | const path = yield* Path.Path; |
| 13041 | const host = yield* ProviderHost.ProviderHost; | | |
| 13042 | const selfInvocation = yield* resolveSelfInvocation(); | 12538 | const selfInvocation = yield* resolveSelfInvocation(); |
| 13043 | const mockAgentPath = yield* path.fromFileUrl( | 12539 | const mockAgentPath = yield* path.fromFileUrl( |
| 13044 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 12540 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -13101,8 +12597,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -13101,8 +12597,7 @@ describe("AcpAdapterV2", () => { |
| 13101 | }; | 12597 | }; |
| 13102 | }, | 12598 | }, |
| 13103 | }); | 12599 | }); |
| 13104 | const adapter = makeAcpAdapterV2({ | 12600 | const adapter = yield* makeAcpAdapterV2({ |
| 13105 | crypto: yield* Crypto.Crypto, | | |
| 13106 | instanceId, | 12601 | instanceId, |
| 13107 | flavor: { | 12602 | flavor: { |
| 13108 | driver: ACP_TEST_DRIVER, | 12603 | driver: ACP_TEST_DRIVER, |
| ... | @@ -13119,9 +12614,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -13119,9 +12614,6 @@ describe("AcpAdapterV2", () => { |
| 13119 | runtimeInputs.push(runtimeInput); | 12614 | runtimeInputs.push(runtimeInput); |
| 13120 | }).pipe(Effect.andThen(makeRuntime(runtimeInput))), | 12615 | }).pipe(Effect.andThen(makeRuntime(runtimeInput))), |
| 13121 | }, | 12616 | }, |
| 13122 | fileSystem, | | |
| 13123 | idAllocator, | | |
| 13124 | host, | | |
| 13125 | selfInvocation, | 12617 | selfInvocation, |
| 13126 | testHooks: { | 12618 | testHooks: { |
| 13127 | afterHardTeardownTransportDrained: () => | 12619 | afterHardTeardownTransportDrained: () => |
| ... | @@ -13397,18 +12889,14 @@ describe("AcpAdapterV2", () => { | ... | @@ -13397,18 +12889,14 @@ describe("AcpAdapterV2", () => { |
| 13397 | it.live("keeps stale deferred cleanup inert while replacement requests remain live", () => | 12889 | it.live("keeps stale deferred cleanup inert while replacement requests remain live", () => |
| 13398 | Effect.gen(function* () { | 12890 | Effect.gen(function* () { |
| 13399 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 12891 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 13400 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 13401 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | | |
| 13402 | const path = yield* Path.Path; | 12892 | const path = yield* Path.Path; |
| 13403 | const host = yield* ProviderHost.ProviderHost; | | |
| 13404 | const selfInvocation = yield* resolveSelfInvocation(); | 12893 | const selfInvocation = yield* resolveSelfInvocation(); |
| 13405 | const mockAgentPath = yield* path.fromFileUrl( | 12894 | const mockAgentPath = yield* path.fromFileUrl( |
| 13406 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 12895 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| 13407 | ); | 12896 | ); |
| 13408 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); | 12897 | const protocolEvents = yield* Queue.bounded<EffectAcpProtocol.AcpProtocolLogEvent>(256); |
| 13409 | const instanceId = ProviderInstanceId.make("acp-test"); | 12898 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 13410 | const adapter = makeAcpAdapterV2({ | 12899 | const adapter = yield* makeAcpAdapterV2({ |
| 13411 | crypto: yield* Crypto.Crypto, | | |
| 13412 | instanceId, | 12900 | instanceId, |
| 13413 | flavor: { | 12901 | flavor: { |
| 13414 | driver: ACP_TEST_DRIVER, | 12902 | driver: ACP_TEST_DRIVER, |
| ... | @@ -13425,9 +12913,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -13425,9 +12913,6 @@ describe("AcpAdapterV2", () => { |
| 13425 | protocolEvents, | 12913 | protocolEvents, |
| 13426 | }), | 12914 | }), |
| 13427 | }, | 12915 | }, |
| 13428 | fileSystem, | | |
| 13429 | idAllocator, | | |
| 13430 | host, | | |
| 13431 | selfInvocation, | 12916 | selfInvocation, |
| 13432 | }); | 12917 | }); |
| 13433 | const threadId = ThreadId.make("thread-acp-stale-deferred-cleanup"); | 12918 | const threadId = ThreadId.make("thread-acp-stale-deferred-cleanup"); |
| ... | @@ -13522,10 +13007,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -13522,10 +13007,8 @@ describe("AcpAdapterV2", () => { |
| 13522 | it.live("resolves owner cancellation and concurrent resume waiters after hard teardown", () => | 13007 | it.live("resolves owner cancellation and concurrent resume waiters after hard teardown", () => |
| 13523 | Effect.gen(function* () { | 13008 | Effect.gen(function* () { |
| 13524 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 13009 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 13525 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 13526 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 13010 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 13527 | const path = yield* Path.Path; | 13011 | const path = yield* Path.Path; |
| 13528 | const host = yield* ProviderHost.ProviderHost; | | |
| 13529 | const selfInvocation = yield* resolveSelfInvocation(); | 13012 | const selfInvocation = yield* resolveSelfInvocation(); |
| 13530 | const mockAgentPath = yield* path.fromFileUrl( | 13013 | const mockAgentPath = yield* path.fromFileUrl( |
| 13531 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 13014 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -13535,8 +13018,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -13535,8 +13018,7 @@ describe("AcpAdapterV2", () => { |
| 13535 | const releaseTeardown = yield* Deferred.make<void>(); | 13018 | const releaseTeardown = yield* Deferred.make<void>(); |
| 13536 | let runtimeOrdinalSeen = 0; | 13019 | let runtimeOrdinalSeen = 0; |
| 13537 | const instanceId = ProviderInstanceId.make("acp-test"); | 13020 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 13538 | const adapter = makeAcpAdapterV2({ | 13021 | const adapter = yield* makeAcpAdapterV2({ |
| 13539 | crypto: yield* Crypto.Crypto, | | |
| 13540 | instanceId, | 13022 | instanceId, |
| 13541 | flavor: { | 13023 | flavor: { |
| 13542 | driver: ACP_TEST_DRIVER, | 13024 | driver: ACP_TEST_DRIVER, |
| ... | @@ -13560,9 +13042,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -13560,9 +13042,6 @@ describe("AcpAdapterV2", () => { |
| 13560 | protocolEvents, | 13042 | protocolEvents, |
| 13561 | }), | 13043 | }), |
| 13562 | }, | 13044 | }, |
| 13563 | fileSystem, | | |
| 13564 | idAllocator, | | |
| 13565 | host, | | |
| 13566 | selfInvocation, | 13045 | selfInvocation, |
| 13567 | }); | 13046 | }); |
| 13568 | const threadId = ThreadId.make("thread-acp-concurrent-resume-teardown"); | 13047 | const threadId = ThreadId.make("thread-acp-concurrent-resume-teardown"); |
| ... | @@ -13659,7 +13138,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -13659,7 +13138,6 @@ describe("AcpAdapterV2", () => { |
| 13659 | const fileSystem = yield* FileSystem.FileSystem; | 13138 | const fileSystem = yield* FileSystem.FileSystem; |
| 13660 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 13139 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 13661 | const path = yield* Path.Path; | 13140 | const path = yield* Path.Path; |
| 13662 | const host = yield* ProviderHost.ProviderHost; | | |
| 13663 | const selfInvocation = yield* resolveSelfInvocation(); | 13141 | const selfInvocation = yield* resolveSelfInvocation(); |
| 13664 | const mockAgentPath = yield* path.fromFileUrl( | 13142 | const mockAgentPath = yield* path.fromFileUrl( |
| 13665 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 13143 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -13673,8 +13151,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -13673,8 +13151,7 @@ describe("AcpAdapterV2", () => { |
| 13673 | ); | 13151 | ); |
| 13674 | let cancelCalled = false; | 13152 | let cancelCalled = false; |
| 13675 | const instanceId = ProviderInstanceId.make("acp-test"); | 13153 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 13676 | const adapter = makeAcpAdapterV2({ | 13154 | const adapter = yield* makeAcpAdapterV2({ |
| 13677 | crypto: yield* Crypto.Crypto, | | |
| 13678 | instanceId, | 13155 | instanceId, |
| 13679 | flavor: { | 13156 | flavor: { |
| 13680 | driver: ACP_TEST_DRIVER, | 13157 | driver: ACP_TEST_DRIVER, |
| ... | @@ -13711,9 +13188,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -13711,9 +13188,6 @@ describe("AcpAdapterV2", () => { |
| 13711 | }).pipe(Effect.andThen(Effect.never)), | 13188 | }).pipe(Effect.andThen(Effect.never)), |
| 13712 | }), | 13189 | }), |
| 13713 | }, | 13190 | }, |
| 13714 | fileSystem, | | |
| 13715 | idAllocator, | | |
| 13716 | host, | | |
| 13717 | selfInvocation, | 13191 | selfInvocation, |
| 13718 | continuationRequests: { offer: () => Effect.void }, | 13192 | continuationRequests: { offer: () => Effect.void }, |
| 13719 | }); | 13193 | }); |
| ... | @@ -13933,10 +13407,8 @@ describe("AcpAdapterV2", () => { | ... | @@ -13933,10 +13407,8 @@ describe("AcpAdapterV2", () => { |
| 13933 | () => | 13407 | () => |
| 13934 | Effect.gen(function* () { | 13408 | Effect.gen(function* () { |
| 13935 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; | 13409 | const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 13936 | const fileSystem = yield* FileSystem.FileSystem; | | |
| 13937 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 13410 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 13938 | const path = yield* Path.Path; | 13411 | const path = yield* Path.Path; |
| 13939 | const host = yield* ProviderHost.ProviderHost; | | |
| 13940 | const selfInvocation = yield* resolveSelfInvocation(); | 13412 | const selfInvocation = yield* resolveSelfInvocation(); |
| 13941 | const mockAgentPath = yield* path.fromFileUrl( | 13413 | const mockAgentPath = yield* path.fromFileUrl( |
| 13942 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 13414 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -13944,12 +13416,11 @@ describe("AcpAdapterV2", () => { | ... | @@ -13944,12 +13416,11 @@ describe("AcpAdapterV2", () => { |
| 13944 | const instanceId = ProviderInstanceId.make("acp-test"); | 13416 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 13945 | let subagentPhase: "spawn" | "complete" = "spawn"; | 13417 | let subagentPhase: "spawn" | "complete" = "spawn"; |
| 13946 | const promptSettled = yield* Deferred.make<void>(); | 13418 | const promptSettled = yield* Deferred.make<void>(); |
| 13947 | const adapter = makeAcpAdapterV2({ | 13419 | const adapter = yield* makeAcpAdapterV2({ |
| 13948 | testHooks: { | 13420 | testHooks: { |
| 13949 | afterPromptSettledWithBackgroundWork: () => | 13421 | afterPromptSettledWithBackgroundWork: () => |
| 13950 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), | 13422 | Deferred.succeed(promptSettled, undefined).pipe(Effect.asVoid), |
| 13951 | }, | 13423 | }, |
| 13952 | crypto: yield* Crypto.Crypto, | | |
| 13953 | instanceId, | 13424 | instanceId, |
| 13954 | flavor: { | 13425 | flavor: { |
| 13955 | driver: ACP_TEST_DRIVER, | 13426 | driver: ACP_TEST_DRIVER, |
| ... | @@ -13984,9 +13455,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -13984,9 +13455,6 @@ describe("AcpAdapterV2", () => { |
| 13984 | environment: { T3_ACP_EMIT_GENERIC_TOOL_PLACEHOLDERS: "1" }, | 13455 | environment: { T3_ACP_EMIT_GENERIC_TOOL_PLACEHOLDERS: "1" }, |
| 13985 | }), | 13456 | }), |
| 13986 | }, | 13457 | }, |
| 13987 | fileSystem, | | |
| 13988 | idAllocator, | | |
| 13989 | host, | | |
| 13990 | selfInvocation, | 13458 | selfInvocation, |
| 13991 | }); | 13459 | }); |
| 13992 | const threadId = ThreadId.make("thread-acp-direct-stop-subagent-hold"); | 13460 | const threadId = ThreadId.make("thread-acp-direct-stop-subagent-hold"); |
| ... | @@ -14090,7 +13558,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -14090,7 +13558,6 @@ describe("AcpAdapterV2", () => { |
| 14090 | const fileSystem = yield* FileSystem.FileSystem; | 13558 | const fileSystem = yield* FileSystem.FileSystem; |
| 14091 | const idAllocator = yield* IdAllocator.IdAllocatorV2; | 13559 | const idAllocator = yield* IdAllocator.IdAllocatorV2; |
| 14092 | const path = yield* Path.Path; | 13560 | const path = yield* Path.Path; |
| 14093 | const host = yield* ProviderHost.ProviderHost; | | |
| 14094 | const selfInvocation = yield* resolveSelfInvocation(); | 13561 | const selfInvocation = yield* resolveSelfInvocation(); |
| 14095 | const mockAgentPath = yield* path.fromFileUrl( | 13562 | const mockAgentPath = yield* path.fromFileUrl( |
| 14096 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), | 13563 | new URL("../../../scripts/acp-mock-agent.ts", import.meta.url), |
| ... | @@ -14103,8 +13570,7 @@ describe("AcpAdapterV2", () => { | ... | @@ -14103,8 +13570,7 @@ describe("AcpAdapterV2", () => { |
| 14103 | Effect.sync(() => cleanupPublishedDetachedFixture(commandPidPath)), | 13570 | Effect.sync(() => cleanupPublishedDetachedFixture(commandPidPath)), |
| 14104 | ); | 13571 | ); |
| 14105 | const instanceId = ProviderInstanceId.make("acp-test"); | 13572 | const instanceId = ProviderInstanceId.make("acp-test"); |
| 14106 | const adapter = makeAcpAdapterV2({ | 13573 | const adapter = yield* makeAcpAdapterV2({ |
| 14107 | crypto: yield* Crypto.Crypto, | | |
| 14108 | instanceId, | 13574 | instanceId, |
| 14109 | flavor: { | 13575 | flavor: { |
| 14110 | driver: ACP_TEST_DRIVER, | 13576 | driver: ACP_TEST_DRIVER, |
| ... | @@ -14133,9 +13599,6 @@ describe("AcpAdapterV2", () => { | ... | @@ -14133,9 +13599,6 @@ describe("AcpAdapterV2", () => { |
| 14133 | wrapCancel: (cancel) => cancel.pipe(Effect.andThen(Effect.sleep("250 millis"))), | 13599 | wrapCancel: (cancel) => cancel.pipe(Effect.andThen(Effect.sleep("250 millis"))), |
| 14134 | }), | 13600 | }), |
| 14135 | }, | 13601 | }, |
| 14136 | fileSystem, | | |
| 14137 | idAllocator, | | |
| 14138 | host, | | |
| 14139 | selfInvocation, | 13602 | selfInvocation, |
| 14140 | }); | 13603 | }); |
| 14141 | const threadId = ThreadId.make("thread-acp-restart-active-in-process"); | 13604 | const threadId = ThreadId.make("thread-acp-restart-active-in-process"); |