@@ -22,7 +22,6 @@ import * as ProviderEventLoggers from "@t3tools/provider-core/server/ProviderEve
2222import * as ProviderMaintenance from "@t3tools/provider-core/server/maintenanceResolver" ;
2323import * as OpenCodeRuntime from "./OpenCodeRuntime.ts" ;
2424import {
25- OPENCODE_1_RESPONSES ,
2625 OPENCODE_2_RESPONSES ,
2726 OPENCODE_2_WORKSPACE_RESPONSES ,
2827 replayOpenCodeServer ,
@@ -117,64 +116,6 @@ it.layer(layer)("OpenCodeDriver runtime selection", (it) => {
117116 } ) . pipe ( Effect . scoped ) ,
118117 ) ;
119118
120- it . effect ( "keeps an OpenCode 2 workspace's commands pending when its scan never ends" , ( ) =>
121- Effect . gen ( function * ( ) {
122- const instance = yield * create (
123- { serverUrl : "http://127.0.0.1:4096" , serverPassword : "secret" } ,
124- replayOpenCodeServer (
125- {
126- ...OPENCODE_2_RESPONSES ,
127- ...OPENCODE_2_WORKSPACE_RESPONSES ,
128- "/api/command" : {
129- ...OPENCODE_2_WORKSPACE_RESPONSES [ "/api/command" ] ,
130- body : '{"location":{"directory":"/work"},"data":[]}' ,
131- } ,
132- } ,
133- "secret" ,
134- ) ,
135- ) ;
136-
137- const scan = yield * instance . snapshotForCwd ! ( "/work" ) . pipe ( Effect . forkChild ) ;
138- yield * TestClock . adjust ( "10 seconds" ) ;
139- const workspace = yield * Fiber . join ( scan ) ;
140- assert . includeMembers (
141- workspace . skills . map ( ( skill ) => skill . name ) ,
142- [ "plum" ] ,
143- ) ;
144- assert . strictEqual ( workspace . slashCommandsPending , true ) ;
145- } ) . pipe ( Effect . scoped , Effect . provide ( TestClock . layer ( ) ) ) ,
146- ) ;
147-
148- it . effect ( "keeps an OpenCode 1.x workspace's commands pending when listing them fails" , ( ) =>
149- Effect . gen ( function * ( ) {
150- const openCode1Runtime = {
151- connectToOpenCodeServer : ( ) =>
152- Effect . succeed ( {
153- url : "http://127.0.0.1:4096" ,
154- version : "1.18.32" ,
155- exitCode : null ,
156- external : true ,
157- } ) ,
158- createOpenCodeSdkClient : ( ) => ( {
159- command : { list : ( ) => Promise . reject ( new Error ( "command.list failed" ) ) } ,
160- } ) ,
161- loadOpenCodeSkills : ( ) =>
162- Effect . succeed ( [ { name : "plum" , location : "/work/.opencode/skills/plum/SKILL.md" } ] ) ,
163- } as unknown as OpenCodeRuntime . OpenCodeRuntime [ "Service" ] ;
164- const instance = yield * create (
165- { serverUrl : "http://127.0.0.1:4096" , serverPassword : "secret" } ,
166- replayOpenCodeServer ( OPENCODE_1_RESPONSES , "secret" ) ,
167- ) . pipe ( Effect . provideService ( OpenCodeRuntime . OpenCodeRuntime , openCode1Runtime ) ) ;
168-
169- const workspace = yield * instance . snapshotForCwd ! ( "/work" ) ;
170- assert . deepStrictEqual (
171- workspace . skills . map ( ( skill ) => skill . name ) ,
172- [ "plum" ] ,
173- ) ;
174- assert . strictEqual ( workspace . slashCommandsPending , true ) ;
175- } ) . pipe ( Effect . scoped ) ,
176- ) ;
177-
178119 it . effect ( "answers capability reads without waiting on an unreachable server" , ( ) =>
179120 Effect . gen ( function * ( ) {
180121 const hang = HttpClient . make ( ( ) => Effect . never ) ;
0 commit comments