@opencode-ai/client
Advanced tools
+287
-251
@@ -13,14 +13,17 @@ // Generated by @opencode-ai/httpapi-codegen. Do not edit. | ||
| const preserveStream = () => (stream) => stream; | ||
| const Endpoint0_0 = (raw) => () => preserveEffect()(raw["health.get"]({}).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup0 = (raw) => ({ get: Endpoint0_0(raw) }); | ||
| const Endpoint1_0 = (raw) => () => preserveEffect()(raw["server.get"]({}).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup1 = (raw) => ({ get: Endpoint1_0(raw) }); | ||
| const Endpoint2_0 = (raw) => (input) => preserveEffect()(raw["location.get"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup2 = (raw) => ({ get: Endpoint2_0(raw) }); | ||
| const Endpoint3_0 = (raw) => (input) => preserveEffect()(raw["agent.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint3_1 = (raw) => (input) => preserveEffect()(raw["agent.get"]({ params: { agentID: input["agentID"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup3 = (raw) => ({ list: Endpoint3_0(raw), get: Endpoint3_1(raw) }); | ||
| const Endpoint4_0 = (raw) => (input) => preserveEffect()(raw["plugin.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup4 = (raw) => ({ list: Endpoint4_0(raw) }); | ||
| const Endpoint5_0 = (raw) => (input) => preserveEffect()(raw["session.list"]({ | ||
| const EndpointHealthGet = (raw) => () => preserveEffect()(raw["health.get"]({}).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroupHealth = (raw) => ({ get: EndpointHealthGet(raw) }); | ||
| const EndpointServerGet = (raw) => () => preserveEffect()(raw["server.get"]({}).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroupServer = (raw) => ({ get: EndpointServerGet(raw) }); | ||
| const EndpointLocationGet = (raw) => (input) => preserveEffect()(raw["location.get"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroupLocation = (raw) => ({ get: EndpointLocationGet(raw) }); | ||
| const EndpointAgentList = (raw) => (input) => preserveEffect()(raw["agent.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointAgentGet = (raw) => (input) => preserveEffect()(raw["agent.get"]({ params: { agentID: input["agentID"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroupAgent = (raw) => ({ | ||
| list: EndpointAgentList(raw), | ||
| get: EndpointAgentGet(raw), | ||
| }); | ||
| const EndpointPluginList = (raw) => (input) => preserveEffect()(raw["plugin.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroupPlugin = (raw) => ({ list: EndpointPluginList(raw) }); | ||
| const EndpointSessionList = (raw) => (input) => preserveEffect()(raw["session.list"]({ | ||
| query: { | ||
@@ -38,3 +41,3 @@ workspace: input?.["workspace"], | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint5_1 = (raw) => (input) => preserveEffect()(raw["session.create"]({ | ||
| const EndpointSessionCreate = (raw) => (input) => preserveEffect()(raw["session.create"]({ | ||
| payload: { | ||
@@ -48,18 +51,18 @@ id: input?.["id"], | ||
| }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint5_2 = (raw) => (input) => preserveEffect()(raw["session.import"]({ | ||
| const EndpointSessionImport = (raw) => (input) => preserveEffect()(raw["session.import"]({ | ||
| payload: { info: input["info"], messages: input["messages"], location: input["location"] }, | ||
| }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint5_3 = (raw) => (input) => preserveEffect()(raw["session.export"]({ params: { sessionID: input["sessionID"] }, query: { sanitize: input["sanitize"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint5_4 = (raw) => () => preserveEffect()(raw["session.active"]({}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint5_5 = (raw) => (input) => preserveEffect()(raw["session.get"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint5_6 = (raw) => (input) => preserveEffect()(raw["session.remove"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint5_7 = (raw) => (input) => preserveEffect()(raw["session.fork"]({ params: { sessionID: input["sessionID"] }, payload: { boundary: input["boundary"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint5_8 = (raw) => (input) => preserveEffect()(raw["session.switchAgent"]({ params: { sessionID: input["sessionID"] }, payload: { agent: input["agent"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint5_9 = (raw) => (input) => preserveEffect()(raw["session.switchModel"]({ params: { sessionID: input["sessionID"] }, payload: { model: input["model"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint5_10 = (raw) => (input) => preserveEffect()(raw["session.rename"]({ params: { sessionID: input["sessionID"] }, payload: { title: input["title"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint5_11 = (raw) => (input) => preserveEffect()(raw["session.move"]({ | ||
| const EndpointSessionExport = (raw) => (input) => preserveEffect()(raw["session.export"]({ params: { sessionID: input["sessionID"] }, query: { sanitize: input["sanitize"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const EndpointSessionActive = (raw) => () => preserveEffect()(raw["session.active"]({}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const EndpointSessionGet = (raw) => (input) => preserveEffect()(raw["session.get"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const EndpointSessionRemove = (raw) => (input) => preserveEffect()(raw["session.remove"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointSessionFork = (raw) => (input) => preserveEffect()(raw["session.fork"]({ params: { sessionID: input["sessionID"] }, payload: { boundary: input["boundary"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const EndpointSessionSwitchAgent = (raw) => (input) => preserveEffect()(raw["session.switchAgent"]({ params: { sessionID: input["sessionID"] }, payload: { agent: input["agent"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointSessionSwitchModel = (raw) => (input) => preserveEffect()(raw["session.switchModel"]({ params: { sessionID: input["sessionID"] }, payload: { model: input["model"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointSessionRename = (raw) => (input) => preserveEffect()(raw["session.rename"]({ params: { sessionID: input["sessionID"] }, payload: { title: input["title"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointSessionMove = (raw) => (input) => preserveEffect()(raw["session.move"]({ | ||
| params: { sessionID: input["sessionID"] }, | ||
| payload: { directory: input["directory"], workspaceID: input["workspaceID"], delivery: input["delivery"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint5_12 = (raw) => (input) => preserveEffect()(raw["session.prompt"]({ | ||
| const EndpointSessionPrompt = (raw) => (input) => preserveEffect()(raw["session.prompt"]({ | ||
| params: { sessionID: input["sessionID"] }, | ||
@@ -77,3 +80,3 @@ payload: { | ||
| }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint5_13 = (raw) => (input) => preserveEffect()(raw["session.command"]({ | ||
| const EndpointSessionCommand = (raw) => (input) => preserveEffect()(raw["session.command"]({ | ||
| params: { sessionID: input["sessionID"] }, | ||
@@ -93,7 +96,7 @@ payload: { | ||
| }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint5_14 = (raw) => (input) => preserveEffect()(raw["session.skill"]({ | ||
| const EndpointSessionSkill = (raw) => (input) => preserveEffect()(raw["session.skill"]({ | ||
| params: { sessionID: input["sessionID"] }, | ||
| payload: { id: input["id"], skill: input["skill"], resume: input["resume"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint5_15 = (raw) => (input) => preserveEffect()(raw["session.synthetic"]({ | ||
| const EndpointSessionSynthetic = (raw) => (input) => preserveEffect()(raw["session.synthetic"]({ | ||
| params: { sessionID: input["sessionID"] }, | ||
@@ -109,97 +112,120 @@ payload: { | ||
| }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint5_16 = (raw) => (input) => preserveEffect()(raw["session.shell"]({ | ||
| const EndpointSessionShell = (raw) => (input) => preserveEffect()(raw["session.shell"]({ | ||
| params: { sessionID: input["sessionID"] }, | ||
| payload: { id: input["id"], command: input["command"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint5_17 = (raw) => (input) => preserveEffect()(raw["session.compact"]({ | ||
| const EndpointSessionCompact = (raw) => (input) => preserveEffect()(raw["session.compact"]({ | ||
| params: { sessionID: input["sessionID"] }, | ||
| payload: { id: input["id"], delivery: input["delivery"] }, | ||
| }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint5_18 = (raw) => (input) => preserveEffect()(raw["session.wait"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint5_19 = (raw) => (input) => preserveEffect()(raw["session.revert.stage"]({ | ||
| const EndpointSessionWait = (raw) => (input) => preserveEffect()(raw["session.wait"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointSessionRevertStage = (raw) => (input) => preserveEffect()(raw["session.revert.stage"]({ | ||
| params: { sessionID: input["sessionID"] }, | ||
| payload: { messageID: input["messageID"], files: input["files"] }, | ||
| }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint5_20 = (raw) => (input) => preserveEffect()(raw["session.revert.clear"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint5_21 = (raw) => (input) => preserveEffect()(raw["session.revert.commit"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint5_22 = (raw) => (input) => preserveEffect()(raw["session.context"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint5_23 = (raw) => (input) => preserveEffect()(raw["session.inbox.list"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint5_24 = (raw) => (input) => preserveEffect()(raw["session.inbox.cancel"]({ params: { sessionID: input["sessionID"], inboxID: input["inboxID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint5_25 = (raw) => (input) => preserveEffect()(raw["session.inbox.steer"]({ params: { sessionID: input["sessionID"], inboxID: input["inboxID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint5_26 = (raw) => (input) => preserveEffect()(raw["session.inbox.queue"]({ params: { sessionID: input["sessionID"], inboxID: input["inboxID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint5_27 = (raw) => (input) => preserveEffect()(raw["session.instructions.entry.list"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint5_28 = (raw) => (input) => preserveEffect()(raw["session.instructions.entry.put"]({ | ||
| const EndpointSessionRevertClear = (raw) => (input) => preserveEffect()(raw["session.revert.clear"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointSessionRevertCommit = (raw) => (input) => preserveEffect()(raw["session.revert.commit"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointSessionContext = (raw) => (input) => preserveEffect()(raw["session.context"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const EndpointSessionInboxList = (raw) => (input) => preserveEffect()(raw["session.inbox.list"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const EndpointSessionInboxCancel = (raw) => (input) => preserveEffect()(raw["session.inbox.cancel"]({ params: { sessionID: input["sessionID"], inboxID: input["inboxID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointSessionInboxSteer = (raw) => (input) => preserveEffect()(raw["session.inbox.steer"]({ params: { sessionID: input["sessionID"], inboxID: input["inboxID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointSessionInboxQueue = (raw) => (input) => preserveEffect()(raw["session.inbox.queue"]({ params: { sessionID: input["sessionID"], inboxID: input["inboxID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointSessionInstructionsEntryList = (raw) => (input) => preserveEffect()(raw["session.instructions.entry.list"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const EndpointSessionInstructionsEntryPut = (raw) => (input) => preserveEffect()(raw["session.instructions.entry.put"]({ | ||
| params: { sessionID: input["sessionID"], key: input["key"] }, | ||
| payload: { value: input["value"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint5_29 = (raw) => (input) => preserveEffect()(raw["session.instructions.entry.remove"]({ params: { sessionID: input["sessionID"], key: input["key"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint5_30 = (raw) => (input) => preserveEffect()(raw["session.generate"]({ params: { sessionID: input["sessionID"] }, payload: { prompt: input["prompt"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint5_31 = (raw) => (input) => preserveStream()(Stream.unwrap(raw["session.log"]({ | ||
| const EndpointSessionInstructionsEntryRemove = (raw) => (input) => preserveEffect()(raw["session.instructions.entry.remove"]({ params: { sessionID: input["sessionID"], key: input["key"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointSessionGenerate = (raw) => (input) => preserveEffect()(raw["session.generate"]({ params: { sessionID: input["sessionID"] }, payload: { prompt: input["prompt"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const EndpointSessionLog = (raw) => (input) => preserveStream()(Stream.unwrap(raw["session.log"]({ | ||
| params: { sessionID: input["sessionID"] }, | ||
| query: { after: input["after"], follow: input["follow"] }, | ||
| }).pipe(Effect.mapError(mapClientError), Effect.map((stream) => stream.pipe(Stream.mapError(mapClientError)))))); | ||
| const Endpoint5_32 = (raw) => (input) => preserveEffect()(raw["session.interrupt"]({ | ||
| const EndpointSessionInterrupt = (raw) => (input) => preserveEffect()(raw["session.interrupt"]({ | ||
| params: { sessionID: input["sessionID"] }, | ||
| query: { continue: input["continue"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint5_33 = (raw) => (input) => preserveEffect()(raw["session.background"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint5_34 = (raw) => (input) => preserveEffect()(raw["session.message"]({ params: { sessionID: input["sessionID"], messageID: input["messageID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint5_35 = (raw) => (input) => preserveEffect()(raw["session.environment"]({ | ||
| const EndpointSessionBackground = (raw) => (input) => preserveEffect()(raw["session.background"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointSessionMessage = (raw) => (input) => preserveEffect()(raw["session.message"]({ params: { sessionID: input["sessionID"], messageID: input["messageID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const EndpointSessionEnvironment = (raw) => (input) => preserveEffect()(raw["session.environment"]({ | ||
| params: { sessionID: input["sessionID"] }, | ||
| payload: { variables: input["variables"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup5 = (raw) => ({ | ||
| list: Endpoint5_0(raw), | ||
| create: Endpoint5_1(raw), | ||
| import: Endpoint5_2(raw), | ||
| export: Endpoint5_3(raw), | ||
| active: Endpoint5_4(raw), | ||
| get: Endpoint5_5(raw), | ||
| remove: Endpoint5_6(raw), | ||
| fork: Endpoint5_7(raw), | ||
| switchAgent: Endpoint5_8(raw), | ||
| switchModel: Endpoint5_9(raw), | ||
| rename: Endpoint5_10(raw), | ||
| move: Endpoint5_11(raw), | ||
| prompt: Endpoint5_12(raw), | ||
| command: Endpoint5_13(raw), | ||
| skill: Endpoint5_14(raw), | ||
| synthetic: Endpoint5_15(raw), | ||
| shell: Endpoint5_16(raw), | ||
| compact: Endpoint5_17(raw), | ||
| wait: Endpoint5_18(raw), | ||
| revert: { stage: Endpoint5_19(raw), clear: Endpoint5_20(raw), commit: Endpoint5_21(raw) }, | ||
| context: Endpoint5_22(raw), | ||
| inbox: { list: Endpoint5_23(raw), cancel: Endpoint5_24(raw), steer: Endpoint5_25(raw), queue: Endpoint5_26(raw) }, | ||
| instructions: { entry: { list: Endpoint5_27(raw), put: Endpoint5_28(raw), remove: Endpoint5_29(raw) } }, | ||
| generate: Endpoint5_30(raw), | ||
| log: Endpoint5_31(raw), | ||
| interrupt: Endpoint5_32(raw), | ||
| background: Endpoint5_33(raw), | ||
| message: Endpoint5_34(raw), | ||
| environment: Endpoint5_35(raw), | ||
| const EndpointSessionView = (raw) => (input) => preserveEffect()(raw["session.view"]({ params: { sessionID: input["sessionID"] }, payload: { idle: input["idle"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroupSession = (raw) => ({ | ||
| list: EndpointSessionList(raw), | ||
| create: EndpointSessionCreate(raw), | ||
| import: EndpointSessionImport(raw), | ||
| export: EndpointSessionExport(raw), | ||
| active: EndpointSessionActive(raw), | ||
| get: EndpointSessionGet(raw), | ||
| remove: EndpointSessionRemove(raw), | ||
| fork: EndpointSessionFork(raw), | ||
| switchAgent: EndpointSessionSwitchAgent(raw), | ||
| switchModel: EndpointSessionSwitchModel(raw), | ||
| rename: EndpointSessionRename(raw), | ||
| move: EndpointSessionMove(raw), | ||
| prompt: EndpointSessionPrompt(raw), | ||
| command: EndpointSessionCommand(raw), | ||
| skill: EndpointSessionSkill(raw), | ||
| synthetic: EndpointSessionSynthetic(raw), | ||
| shell: EndpointSessionShell(raw), | ||
| compact: EndpointSessionCompact(raw), | ||
| wait: EndpointSessionWait(raw), | ||
| revert: { | ||
| stage: EndpointSessionRevertStage(raw), | ||
| clear: EndpointSessionRevertClear(raw), | ||
| commit: EndpointSessionRevertCommit(raw), | ||
| }, | ||
| context: EndpointSessionContext(raw), | ||
| inbox: { | ||
| list: EndpointSessionInboxList(raw), | ||
| cancel: EndpointSessionInboxCancel(raw), | ||
| steer: EndpointSessionInboxSteer(raw), | ||
| queue: EndpointSessionInboxQueue(raw), | ||
| }, | ||
| instructions: { | ||
| entry: { | ||
| list: EndpointSessionInstructionsEntryList(raw), | ||
| put: EndpointSessionInstructionsEntryPut(raw), | ||
| remove: EndpointSessionInstructionsEntryRemove(raw), | ||
| }, | ||
| }, | ||
| generate: EndpointSessionGenerate(raw), | ||
| log: EndpointSessionLog(raw), | ||
| interrupt: EndpointSessionInterrupt(raw), | ||
| background: EndpointSessionBackground(raw), | ||
| message: EndpointSessionMessage(raw), | ||
| environment: EndpointSessionEnvironment(raw), | ||
| view: EndpointSessionView(raw), | ||
| }); | ||
| const Endpoint6_0 = (raw) => (input) => preserveEffect()(raw["session.messages"]({ | ||
| const EndpointMessageList = (raw) => (input) => preserveEffect()(raw["session.messages"]({ | ||
| params: { sessionID: input["sessionID"] }, | ||
| query: { limit: input["limit"], order: input["order"], cursor: input["cursor"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup6 = (raw) => ({ list: Endpoint6_0(raw) }); | ||
| const Endpoint7_0 = (raw) => (input) => preserveEffect()(raw["model.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint7_1 = (raw) => (input) => preserveEffect()(raw["model.default"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup7 = (raw) => ({ list: Endpoint7_0(raw), default: Endpoint7_1(raw) }); | ||
| const Endpoint8_0 = (raw) => (input) => preserveEffect()(raw["generate.text"]({ | ||
| const adaptGroupMessage = (raw) => ({ list: EndpointMessageList(raw) }); | ||
| const EndpointModelList = (raw) => (input) => preserveEffect()(raw["model.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointModelDefault = (raw) => (input) => preserveEffect()(raw["model.default"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroupModel = (raw) => ({ | ||
| list: EndpointModelList(raw), | ||
| default: EndpointModelDefault(raw), | ||
| }); | ||
| const EndpointGenerateText = (raw) => (input) => preserveEffect()(raw["generate.text"]({ | ||
| query: { location: input["location"] }, | ||
| payload: { prompt: input["prompt"], model: input["model"] }, | ||
| }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const adaptGroup8 = (raw) => ({ text: Endpoint8_0(raw) }); | ||
| const Endpoint9_0 = (raw) => (input) => preserveEffect()(raw["provider.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint9_1 = (raw) => (input) => preserveEffect()(raw["provider.get"]({ params: { providerID: input["providerID"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup9 = (raw) => ({ list: Endpoint9_0(raw), get: Endpoint9_1(raw) }); | ||
| const Endpoint10_0 = (raw) => (input) => preserveEffect()(raw["integration.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint10_1 = (raw) => (input) => preserveEffect()(raw["integration.get"]({ | ||
| const adaptGroupGenerate = (raw) => ({ text: EndpointGenerateText(raw) }); | ||
| const EndpointProviderList = (raw) => (input) => preserveEffect()(raw["provider.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointProviderGet = (raw) => (input) => preserveEffect()(raw["provider.get"]({ params: { providerID: input["providerID"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroupProvider = (raw) => ({ | ||
| list: EndpointProviderList(raw), | ||
| get: EndpointProviderGet(raw), | ||
| }); | ||
| const EndpointIntegrationList = (raw) => (input) => preserveEffect()(raw["integration.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointIntegrationGet = (raw) => (input) => preserveEffect()(raw["integration.get"]({ | ||
| params: { integrationID: input["integrationID"] }, | ||
| query: { location: input["location"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint10_2 = (raw) => (input) => preserveEffect()(raw["integration.wellknown.add"]({ query: { location: input["location"] }, payload: { url: input["url"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint10_3 = (raw) => (input) => preserveEffect()(raw["integration.connect.key"]({ | ||
| const EndpointIntegrationWellknownAdd = (raw) => (input) => preserveEffect()(raw["integration.wellknown.add"]({ query: { location: input["location"] }, payload: { url: input["url"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointIntegrationConnectKey = (raw) => (input) => preserveEffect()(raw["integration.connect.key"]({ | ||
| params: { integrationID: input["integrationID"] }, | ||
@@ -209,3 +235,3 @@ query: { location: input["location"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint10_4 = (raw) => (input) => preserveEffect()(raw["integration.oauth.connect"]({ | ||
| const EndpointIntegrationOauthConnect = (raw) => (input) => preserveEffect()(raw["integration.oauth.connect"]({ | ||
| params: { integrationID: input["integrationID"] }, | ||
@@ -215,7 +241,7 @@ query: { location: input["location"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint10_5 = (raw) => (input) => preserveEffect()(raw["integration.oauth.status"]({ | ||
| const EndpointIntegrationOauthStatus = (raw) => (input) => preserveEffect()(raw["integration.oauth.status"]({ | ||
| params: { integrationID: input["integrationID"], attemptID: input["attemptID"] }, | ||
| query: { location: input["location"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint10_6 = (raw) => (input) => preserveEffect()(raw["integration.oauth.complete"]({ | ||
| const EndpointIntegrationOauthComplete = (raw) => (input) => preserveEffect()(raw["integration.oauth.complete"]({ | ||
| params: { integrationID: input["integrationID"], attemptID: input["attemptID"] }, | ||
@@ -225,7 +251,7 @@ query: { location: input["location"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint10_7 = (raw) => (input) => preserveEffect()(raw["integration.oauth.cancel"]({ | ||
| const EndpointIntegrationOauthCancel = (raw) => (input) => preserveEffect()(raw["integration.oauth.cancel"]({ | ||
| params: { integrationID: input["integrationID"], attemptID: input["attemptID"] }, | ||
| query: { location: input["location"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint10_8 = (raw) => (input) => preserveEffect()(raw["integration.command.connect"]({ | ||
| const EndpointIntegrationCommandConnect = (raw) => (input) => preserveEffect()(raw["integration.command.connect"]({ | ||
| params: { integrationID: input["integrationID"] }, | ||
@@ -235,25 +261,29 @@ query: { location: input["location"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint10_9 = (raw) => (input) => preserveEffect()(raw["integration.command.status"]({ | ||
| const EndpointIntegrationCommandStatus = (raw) => (input) => preserveEffect()(raw["integration.command.status"]({ | ||
| params: { integrationID: input["integrationID"], attemptID: input["attemptID"] }, | ||
| query: { location: input["location"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint10_10 = (raw) => (input) => preserveEffect()(raw["integration.command.cancel"]({ | ||
| const EndpointIntegrationCommandCancel = (raw) => (input) => preserveEffect()(raw["integration.command.cancel"]({ | ||
| params: { integrationID: input["integrationID"], attemptID: input["attemptID"] }, | ||
| query: { location: input["location"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup10 = (raw) => ({ | ||
| list: Endpoint10_0(raw), | ||
| get: Endpoint10_1(raw), | ||
| wellknown: { add: Endpoint10_2(raw) }, | ||
| connect: { key: Endpoint10_3(raw) }, | ||
| const adaptGroupIntegration = (raw) => ({ | ||
| list: EndpointIntegrationList(raw), | ||
| get: EndpointIntegrationGet(raw), | ||
| wellknown: { add: EndpointIntegrationWellknownAdd(raw) }, | ||
| connect: { key: EndpointIntegrationConnectKey(raw) }, | ||
| oauth: { | ||
| connect: Endpoint10_4(raw), | ||
| status: Endpoint10_5(raw), | ||
| complete: Endpoint10_6(raw), | ||
| cancel: Endpoint10_7(raw), | ||
| connect: EndpointIntegrationOauthConnect(raw), | ||
| status: EndpointIntegrationOauthStatus(raw), | ||
| complete: EndpointIntegrationOauthComplete(raw), | ||
| cancel: EndpointIntegrationOauthCancel(raw), | ||
| }, | ||
| command: { connect: Endpoint10_8(raw), status: Endpoint10_9(raw), cancel: Endpoint10_10(raw) }, | ||
| command: { | ||
| connect: EndpointIntegrationCommandConnect(raw), | ||
| status: EndpointIntegrationCommandStatus(raw), | ||
| cancel: EndpointIntegrationCommandCancel(raw), | ||
| }, | ||
| }); | ||
| const Endpoint11_0 = (raw) => (input) => preserveEffect()(raw["mcp.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint11_1 = (raw) => (input) => preserveEffect()(raw["mcp.add"]({ | ||
| const EndpointMcpList = (raw) => (input) => preserveEffect()(raw["mcp.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointMcpAdd = (raw) => (input) => preserveEffect()(raw["mcp.add"]({ | ||
| params: { server: input["server"] }, | ||
@@ -263,15 +293,15 @@ query: { location: input["location"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint11_2 = (raw) => (input) => preserveEffect()(raw["mcp.remove"]({ params: { server: input["server"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint11_3 = (raw) => (input) => preserveEffect()(raw["mcp.connect"]({ params: { server: input["server"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint11_4 = (raw) => (input) => preserveEffect()(raw["mcp.disconnect"]({ params: { server: input["server"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint11_5 = (raw) => (input) => preserveEffect()(raw["mcp.resource.catalog"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup11 = (raw) => ({ | ||
| list: Endpoint11_0(raw), | ||
| add: Endpoint11_1(raw), | ||
| remove: Endpoint11_2(raw), | ||
| connect: Endpoint11_3(raw), | ||
| disconnect: Endpoint11_4(raw), | ||
| resource: { catalog: Endpoint11_5(raw) }, | ||
| const EndpointMcpRemove = (raw) => (input) => preserveEffect()(raw["mcp.remove"]({ params: { server: input["server"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointMcpConnect = (raw) => (input) => preserveEffect()(raw["mcp.connect"]({ params: { server: input["server"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointMcpDisconnect = (raw) => (input) => preserveEffect()(raw["mcp.disconnect"]({ params: { server: input["server"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointMcpResourceCatalog = (raw) => (input) => preserveEffect()(raw["mcp.resource.catalog"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroupMcp = (raw) => ({ | ||
| list: EndpointMcpList(raw), | ||
| add: EndpointMcpAdd(raw), | ||
| remove: EndpointMcpRemove(raw), | ||
| connect: EndpointMcpConnect(raw), | ||
| disconnect: EndpointMcpDisconnect(raw), | ||
| resource: { catalog: EndpointMcpResourceCatalog(raw) }, | ||
| }); | ||
| const Endpoint12_0 = (raw) => (input) => preserveEffect()(raw["credential.update"]({ | ||
| const EndpointCredentialUpdate = (raw) => (input) => preserveEffect()(raw["credential.update"]({ | ||
| params: { credentialID: input["credentialID"] }, | ||
@@ -281,36 +311,42 @@ query: { location: input["location"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint12_1 = (raw) => (input) => preserveEffect()(raw["credential.remove"]({ | ||
| const EndpointCredentialRemove = (raw) => (input) => preserveEffect()(raw["credential.remove"]({ | ||
| params: { credentialID: input["credentialID"] }, | ||
| query: { location: input["location"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup12 = (raw) => ({ update: Endpoint12_0(raw), remove: Endpoint12_1(raw) }); | ||
| const Endpoint13_0 = (raw) => () => preserveEffect()(raw["project.list"]({}).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint13_1 = (raw) => (input) => preserveEffect()(raw["project.current"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup13 = (raw) => ({ list: Endpoint13_0(raw), current: Endpoint13_1(raw) }); | ||
| const Endpoint14_0 = (raw) => (input) => preserveEffect()(raw["form.request.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint14_1 = (raw) => (input) => preserveEffect()(raw["session.form.list"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint14_2 = (raw) => (input) => preserveEffect()(raw["session.form.create"]({ | ||
| const adaptGroupCredential = (raw) => ({ | ||
| update: EndpointCredentialUpdate(raw), | ||
| remove: EndpointCredentialRemove(raw), | ||
| }); | ||
| const EndpointProjectList = (raw) => () => preserveEffect()(raw["project.list"]({}).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointProjectCurrent = (raw) => (input) => preserveEffect()(raw["project.current"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroupProject = (raw) => ({ | ||
| list: EndpointProjectList(raw), | ||
| current: EndpointProjectCurrent(raw), | ||
| }); | ||
| const EndpointFormRequestList = (raw) => (input) => preserveEffect()(raw["form.request.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointFormList = (raw) => (input) => preserveEffect()(raw["session.form.list"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const EndpointFormCreate = (raw) => (input) => preserveEffect()(raw["session.form.create"]({ | ||
| params: { sessionID: input["sessionID"] }, | ||
| payload: { id: input["id"], title: input["title"], metadata: input["metadata"], fields: input["fields"] }, | ||
| }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint14_3 = (raw) => (input) => preserveEffect()(raw["session.form.get"]({ params: { sessionID: input["sessionID"], formID: input["formID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint14_4 = (raw) => (input) => preserveEffect()(raw["session.form.state"]({ params: { sessionID: input["sessionID"], formID: input["formID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint14_5 = (raw) => (input) => preserveEffect()(raw["session.form.reply"]({ | ||
| const EndpointFormGet = (raw) => (input) => preserveEffect()(raw["session.form.get"]({ params: { sessionID: input["sessionID"], formID: input["formID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const EndpointFormState = (raw) => (input) => preserveEffect()(raw["session.form.state"]({ params: { sessionID: input["sessionID"], formID: input["formID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const EndpointFormReply = (raw) => (input) => preserveEffect()(raw["session.form.reply"]({ | ||
| params: { sessionID: input["sessionID"], formID: input["formID"] }, | ||
| payload: { answer: input["answer"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint14_6 = (raw) => (input) => preserveEffect()(raw["session.form.cancel"]({ params: { sessionID: input["sessionID"], formID: input["formID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup14 = (raw) => ({ | ||
| request: { list: Endpoint14_0(raw) }, | ||
| list: Endpoint14_1(raw), | ||
| create: Endpoint14_2(raw), | ||
| get: Endpoint14_3(raw), | ||
| state: Endpoint14_4(raw), | ||
| reply: Endpoint14_5(raw), | ||
| cancel: Endpoint14_6(raw), | ||
| const EndpointFormCancel = (raw) => (input) => preserveEffect()(raw["session.form.cancel"]({ params: { sessionID: input["sessionID"], formID: input["formID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroupForm = (raw) => ({ | ||
| request: { list: EndpointFormRequestList(raw) }, | ||
| list: EndpointFormList(raw), | ||
| create: EndpointFormCreate(raw), | ||
| get: EndpointFormGet(raw), | ||
| state: EndpointFormState(raw), | ||
| reply: EndpointFormReply(raw), | ||
| cancel: EndpointFormCancel(raw), | ||
| }); | ||
| const Endpoint15_0 = (raw) => (input) => preserveEffect()(raw["permission.request.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint15_1 = (raw) => (input) => preserveEffect()(raw["permission.saved.list"]({ query: { projectID: input?.["projectID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint15_2 = (raw) => (input) => preserveEffect()(raw["permission.saved.remove"]({ params: { id: input["id"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint15_3 = (raw) => (input) => preserveEffect()(raw["session.permission.create"]({ | ||
| const EndpointPermissionRequestList = (raw) => (input) => preserveEffect()(raw["permission.request.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointPermissionSavedList = (raw) => (input) => preserveEffect()(raw["permission.saved.list"]({ query: { projectID: input?.["projectID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const EndpointPermissionSavedRemove = (raw) => (input) => preserveEffect()(raw["permission.saved.remove"]({ params: { id: input["id"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointPermissionCreate = (raw) => (input) => preserveEffect()(raw["session.permission.create"]({ | ||
| params: { sessionID: input["sessionID"] }, | ||
@@ -327,29 +363,29 @@ payload: { | ||
| }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint15_4 = (raw) => (input) => preserveEffect()(raw["session.permission.list"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint15_5 = (raw) => (input) => preserveEffect()(raw["session.permission.get"]({ params: { sessionID: input["sessionID"], requestID: input["requestID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const Endpoint15_6 = (raw) => (input) => preserveEffect()(raw["session.permission.reply"]({ | ||
| const EndpointPermissionList = (raw) => (input) => preserveEffect()(raw["session.permission.list"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const EndpointPermissionGet = (raw) => (input) => preserveEffect()(raw["session.permission.get"]({ params: { sessionID: input["sessionID"], requestID: input["requestID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data))); | ||
| const EndpointPermissionReply = (raw) => (input) => preserveEffect()(raw["session.permission.reply"]({ | ||
| params: { sessionID: input["sessionID"], requestID: input["requestID"] }, | ||
| payload: { reply: input["reply"], message: input["message"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup15 = (raw) => ({ | ||
| request: { list: Endpoint15_0(raw) }, | ||
| saved: { list: Endpoint15_1(raw), remove: Endpoint15_2(raw) }, | ||
| create: Endpoint15_3(raw), | ||
| list: Endpoint15_4(raw), | ||
| get: Endpoint15_5(raw), | ||
| reply: Endpoint15_6(raw), | ||
| const adaptGroupPermission = (raw) => ({ | ||
| request: { list: EndpointPermissionRequestList(raw) }, | ||
| saved: { list: EndpointPermissionSavedList(raw), remove: EndpointPermissionSavedRemove(raw) }, | ||
| create: EndpointPermissionCreate(raw), | ||
| list: EndpointPermissionList(raw), | ||
| get: EndpointPermissionGet(raw), | ||
| reply: EndpointPermissionReply(raw), | ||
| }); | ||
| const Endpoint16_0 = (raw) => (input) => preserveEffect()(raw["fs.list"]({ query: { location: input?.["location"], path: input?.["path"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint16_1 = (raw) => (input) => preserveEffect()(raw["fs.find"]({ | ||
| const EndpointFileList = (raw) => (input) => preserveEffect()(raw["fs.list"]({ query: { location: input?.["location"], path: input?.["path"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointFileFind = (raw) => (input) => preserveEffect()(raw["fs.find"]({ | ||
| query: { location: input["location"], query: input["query"], type: input["type"], limit: input["limit"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup16 = (raw) => ({ list: Endpoint16_0(raw), find: Endpoint16_1(raw) }); | ||
| const Endpoint17_0 = (raw) => (input) => preserveEffect()(raw["command.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup17 = (raw) => ({ list: Endpoint17_0(raw) }); | ||
| const Endpoint18_0 = (raw) => (input) => preserveEffect()(raw["skill.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup18 = (raw) => ({ list: Endpoint18_0(raw) }); | ||
| const Endpoint19_0 = (raw) => () => preserveStream()(Stream.unwrap(raw["event.subscribe"]({}).pipe(Effect.mapError(mapClientError), Effect.map((stream) => stream.pipe(Stream.mapError(mapClientError)))))); | ||
| const adaptGroup19 = (raw) => ({ subscribe: Endpoint19_0(raw) }); | ||
| const Endpoint20_0 = (raw) => (input) => preserveEffect()(raw["pty.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint20_1 = (raw) => (input) => preserveEffect()(raw["pty.create"]({ | ||
| const adaptGroupFile = (raw) => ({ list: EndpointFileList(raw), find: EndpointFileFind(raw) }); | ||
| const EndpointCommandList = (raw) => (input) => preserveEffect()(raw["command.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroupCommand = (raw) => ({ list: EndpointCommandList(raw) }); | ||
| const EndpointSkillList = (raw) => (input) => preserveEffect()(raw["skill.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroupSkill = (raw) => ({ list: EndpointSkillList(raw) }); | ||
| const EndpointEventSubscribe = (raw) => () => preserveStream()(Stream.unwrap(raw["event.subscribe"]({}).pipe(Effect.mapError(mapClientError), Effect.map((stream) => stream.pipe(Stream.mapError(mapClientError)))))); | ||
| const adaptGroupEvent = (raw) => ({ subscribe: EndpointEventSubscribe(raw) }); | ||
| const EndpointPtyList = (raw) => (input) => preserveEffect()(raw["pty.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointPtyCreate = (raw) => (input) => preserveEffect()(raw["pty.create"]({ | ||
| query: { location: input?.["location"] }, | ||
@@ -364,4 +400,4 @@ payload: { | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint20_2 = (raw) => (input) => preserveEffect()(raw["pty.get"]({ params: { ptyID: input["ptyID"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint20_3 = (raw) => (input) => preserveEffect()(raw["pty.update"]({ | ||
| const EndpointPtyGet = (raw) => (input) => preserveEffect()(raw["pty.get"]({ params: { ptyID: input["ptyID"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointPtyUpdate = (raw) => (input) => preserveEffect()(raw["pty.update"]({ | ||
| params: { ptyID: input["ptyID"] }, | ||
@@ -371,4 +407,4 @@ query: { location: input["location"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint20_4 = (raw) => (input) => preserveEffect()(raw["pty.remove"]({ params: { ptyID: input["ptyID"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint20_5 = (raw) => (input) => preserveEffect()(raw["pty.connectToken"]({ | ||
| const EndpointPtyRemove = (raw) => (input) => preserveEffect()(raw["pty.remove"]({ params: { ptyID: input["ptyID"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointPtyConnectToken = (raw) => (input) => preserveEffect()(raw["pty.connectToken"]({ | ||
| params: { ptyID: input["ptyID"] }, | ||
@@ -378,17 +414,17 @@ query: { location: input["location"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup20 = (raw) => ({ | ||
| list: Endpoint20_0(raw), | ||
| create: Endpoint20_1(raw), | ||
| get: Endpoint20_2(raw), | ||
| update: Endpoint20_3(raw), | ||
| remove: Endpoint20_4(raw), | ||
| connect: { token: Endpoint20_5(raw) }, | ||
| const adaptGroupPty = (raw) => ({ | ||
| list: EndpointPtyList(raw), | ||
| create: EndpointPtyCreate(raw), | ||
| get: EndpointPtyGet(raw), | ||
| update: EndpointPtyUpdate(raw), | ||
| remove: EndpointPtyRemove(raw), | ||
| connect: { token: EndpointPtyConnectToken(raw) }, | ||
| }); | ||
| const Endpoint21_0 = (raw) => (input) => preserveEffect()(raw["shell.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint21_1 = (raw) => (input) => preserveEffect()(raw["shell.create"]({ | ||
| const EndpointShellList = (raw) => (input) => preserveEffect()(raw["shell.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointShellCreate = (raw) => (input) => preserveEffect()(raw["shell.create"]({ | ||
| query: { location: input["location"] }, | ||
| payload: { command: input["command"], cwd: input["cwd"], timeout: input["timeout"], metadata: input["metadata"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint21_2 = (raw) => (input) => preserveEffect()(raw["shell.get"]({ params: { id: input["id"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint21_3 = (raw) => (input) => preserveEffect()(raw["shell.timeout"]({ | ||
| const EndpointShellGet = (raw) => (input) => preserveEffect()(raw["shell.get"]({ params: { id: input["id"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointShellTimeout = (raw) => (input) => preserveEffect()(raw["shell.timeout"]({ | ||
| params: { id: input["id"] }, | ||
@@ -398,90 +434,90 @@ query: { location: input["location"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint21_4 = (raw) => (input) => preserveEffect()(raw["shell.output"]({ | ||
| const EndpointShellOutput = (raw) => (input) => preserveEffect()(raw["shell.output"]({ | ||
| params: { id: input["id"] }, | ||
| query: { location: input["location"], cursor: input["cursor"], limit: input["limit"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint21_5 = (raw) => (input) => preserveEffect()(raw["shell.remove"]({ params: { id: input["id"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup21 = (raw) => ({ | ||
| list: Endpoint21_0(raw), | ||
| create: Endpoint21_1(raw), | ||
| get: Endpoint21_2(raw), | ||
| timeout: Endpoint21_3(raw), | ||
| output: Endpoint21_4(raw), | ||
| remove: Endpoint21_5(raw), | ||
| const EndpointShellRemove = (raw) => (input) => preserveEffect()(raw["shell.remove"]({ params: { id: input["id"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroupShell = (raw) => ({ | ||
| list: EndpointShellList(raw), | ||
| create: EndpointShellCreate(raw), | ||
| get: EndpointShellGet(raw), | ||
| timeout: EndpointShellTimeout(raw), | ||
| output: EndpointShellOutput(raw), | ||
| remove: EndpointShellRemove(raw), | ||
| }); | ||
| const Endpoint22_0 = (raw) => (input) => preserveEffect()(raw["reference.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup22 = (raw) => ({ list: Endpoint22_0(raw) }); | ||
| const Endpoint23_0 = (raw) => (input) => preserveEffect()(raw["worktree.list"]({ params: { projectID: input["projectID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint23_1 = (raw) => (input) => preserveEffect()(raw["worktree.create"]({ | ||
| const EndpointReferenceList = (raw) => (input) => preserveEffect()(raw["reference.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroupReference = (raw) => ({ list: EndpointReferenceList(raw) }); | ||
| const EndpointWorktreeList = (raw) => (input) => preserveEffect()(raw["worktree.list"]({ params: { projectID: input["projectID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointWorktreeCreate = (raw) => (input) => preserveEffect()(raw["worktree.create"]({ | ||
| params: { projectID: input["projectID"] }, | ||
| payload: { strategy: input["strategy"], from: input["from"], directory: input["directory"], name: input["name"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint23_2 = (raw) => (input) => preserveEffect()(raw["worktree.remove"]({ | ||
| const EndpointWorktreeRemove = (raw) => (input) => preserveEffect()(raw["worktree.remove"]({ | ||
| params: { projectID: input["projectID"] }, | ||
| payload: { directory: input["directory"], force: input["force"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint23_3 = (raw) => (input) => preserveEffect()(raw["worktree.refresh"]({ params: { projectID: input["projectID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup23 = (raw) => ({ | ||
| list: Endpoint23_0(raw), | ||
| create: Endpoint23_1(raw), | ||
| remove: Endpoint23_2(raw), | ||
| refresh: Endpoint23_3(raw), | ||
| const EndpointWorktreeRefresh = (raw) => (input) => preserveEffect()(raw["worktree.refresh"]({ params: { projectID: input["projectID"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroupWorktree = (raw) => ({ | ||
| list: EndpointWorktreeList(raw), | ||
| create: EndpointWorktreeCreate(raw), | ||
| remove: EndpointWorktreeRemove(raw), | ||
| refresh: EndpointWorktreeRefresh(raw), | ||
| }); | ||
| const Endpoint24_0 = (raw) => (input) => preserveEffect()(raw["vcs.get"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint24_1 = (raw) => (input) => preserveEffect()(raw["vcs.status"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint24_2 = (raw) => (input) => preserveEffect()(raw["vcs.diff"]({ query: { location: input["location"], mode: input["mode"], context: input["context"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup24 = (raw) => ({ | ||
| get: Endpoint24_0(raw), | ||
| status: Endpoint24_1(raw), | ||
| diff: Endpoint24_2(raw), | ||
| const EndpointVcsGet = (raw) => (input) => preserveEffect()(raw["vcs.get"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointVcsStatus = (raw) => (input) => preserveEffect()(raw["vcs.status"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointVcsDiff = (raw) => (input) => preserveEffect()(raw["vcs.diff"]({ query: { location: input["location"], mode: input["mode"], context: input["context"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroupVcs = (raw) => ({ | ||
| get: EndpointVcsGet(raw), | ||
| status: EndpointVcsStatus(raw), | ||
| diff: EndpointVcsDiff(raw), | ||
| }); | ||
| const Endpoint25_0 = (raw) => () => preserveEffect()(raw["debug.location"]({}).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint25_1 = (raw) => (input) => preserveEffect()(raw["debug.location.evict"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup25 = (raw) => ({ | ||
| location: { list: Endpoint25_0(raw), evict: Endpoint25_1(raw) }, | ||
| const EndpointDebugLocationList = (raw) => () => preserveEffect()(raw["debug.location"]({}).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointDebugLocationEvict = (raw) => (input) => preserveEffect()(raw["debug.location.evict"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroupDebug = (raw) => ({ | ||
| location: { list: EndpointDebugLocationList(raw), evict: EndpointDebugLocationEvict(raw) }, | ||
| }); | ||
| const Endpoint26_0 = (raw) => () => preserveEffect()(raw["migration.v1.status"]({}).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup26 = (raw) => ({ v1: { status: Endpoint26_0(raw) } }); | ||
| const Endpoint27_0 = (raw) => (input) => preserveEffect()(raw["websearch.providers"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const Endpoint27_1 = (raw) => (input) => preserveEffect()(raw["websearch.query"]({ | ||
| const EndpointMigrationV1Status = (raw) => () => preserveEffect()(raw["migration.v1.status"]({}).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroupMigration = (raw) => ({ v1: { status: EndpointMigrationV1Status(raw) } }); | ||
| const EndpointWebsearchProviders = (raw) => (input) => preserveEffect()(raw["websearch.providers"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const EndpointWebsearchQuery = (raw) => (input) => preserveEffect()(raw["websearch.query"]({ | ||
| query: { location: input["location"] }, | ||
| payload: { query: input["query"], providerID: input["providerID"] }, | ||
| }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup27 = (raw) => ({ | ||
| providers: Endpoint27_0(raw), | ||
| query: Endpoint27_1(raw), | ||
| const adaptGroupWebsearch = (raw) => ({ | ||
| providers: EndpointWebsearchProviders(raw), | ||
| query: EndpointWebsearchQuery(raw), | ||
| }); | ||
| const Endpoint28_0 = (raw) => (input) => preserveEffect()(raw["config.get"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroup28 = (raw) => ({ get: Endpoint28_0(raw) }); | ||
| const EndpointConfigGet = (raw) => (input) => preserveEffect()(raw["config.get"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))); | ||
| const adaptGroupConfig = (raw) => ({ get: EndpointConfigGet(raw) }); | ||
| const adaptClient = (raw) => ({ | ||
| health: adaptGroup0(raw["server.health"]), | ||
| server: adaptGroup1(raw["server.server"]), | ||
| location: adaptGroup2(raw["server.location"]), | ||
| agent: adaptGroup3(raw["server.agent"]), | ||
| plugin: adaptGroup4(raw["server.plugin"]), | ||
| session: adaptGroup5(raw["server.session"]), | ||
| message: adaptGroup6(raw["server.message"]), | ||
| model: adaptGroup7(raw["server.model"]), | ||
| generate: adaptGroup8(raw["server.generate"]), | ||
| provider: adaptGroup9(raw["server.provider"]), | ||
| integration: adaptGroup10(raw["server.integration"]), | ||
| mcp: adaptGroup11(raw["server.mcp"]), | ||
| credential: adaptGroup12(raw["server.credential"]), | ||
| project: adaptGroup13(raw["server.project"]), | ||
| form: adaptGroup14(raw["server.form"]), | ||
| permission: adaptGroup15(raw["server.permission"]), | ||
| file: adaptGroup16(raw["server.fs"]), | ||
| command: adaptGroup17(raw["server.command"]), | ||
| skill: adaptGroup18(raw["server.skill"]), | ||
| event: adaptGroup19(raw["server.event"]), | ||
| pty: adaptGroup20(raw["server.pty"]), | ||
| shell: adaptGroup21(raw["server.shell"]), | ||
| reference: adaptGroup22(raw["server.reference"]), | ||
| worktree: adaptGroup23(raw["server.worktree"]), | ||
| vcs: adaptGroup24(raw["server.vcs"]), | ||
| debug: adaptGroup25(raw["server.debug"]), | ||
| migration: adaptGroup26(raw["server.migration"]), | ||
| websearch: adaptGroup27(raw["server.websearch"]), | ||
| config: adaptGroup28(raw["server.config"]), | ||
| health: adaptGroupHealth(raw["server.health"]), | ||
| server: adaptGroupServer(raw["server.server"]), | ||
| location: adaptGroupLocation(raw["server.location"]), | ||
| agent: adaptGroupAgent(raw["server.agent"]), | ||
| plugin: adaptGroupPlugin(raw["server.plugin"]), | ||
| session: adaptGroupSession(raw["server.session"]), | ||
| message: adaptGroupMessage(raw["server.message"]), | ||
| model: adaptGroupModel(raw["server.model"]), | ||
| generate: adaptGroupGenerate(raw["server.generate"]), | ||
| provider: adaptGroupProvider(raw["server.provider"]), | ||
| integration: adaptGroupIntegration(raw["server.integration"]), | ||
| mcp: adaptGroupMcp(raw["server.mcp"]), | ||
| credential: adaptGroupCredential(raw["server.credential"]), | ||
| project: adaptGroupProject(raw["server.project"]), | ||
| form: adaptGroupForm(raw["server.form"]), | ||
| permission: adaptGroupPermission(raw["server.permission"]), | ||
| file: adaptGroupFile(raw["server.fs"]), | ||
| command: adaptGroupCommand(raw["server.command"]), | ||
| skill: adaptGroupSkill(raw["server.skill"]), | ||
| event: adaptGroupEvent(raw["server.event"]), | ||
| pty: adaptGroupPty(raw["server.pty"]), | ||
| shell: adaptGroupShell(raw["server.shell"]), | ||
| reference: adaptGroupReference(raw["server.reference"]), | ||
| worktree: adaptGroupWorktree(raw["server.worktree"]), | ||
| vcs: adaptGroupVcs(raw["server.vcs"]), | ||
| debug: adaptGroupDebug(raw["server.debug"]), | ||
| migration: adaptGroupMigration(raw["server.migration"]), | ||
| websearch: adaptGroupWebsearch(raw["server.websearch"]), | ||
| config: adaptGroupConfig(raw["server.config"]), | ||
| }); | ||
| export const make = (options) => HttpApiClient.make(ClientApi, options).pipe(Effect.map(adaptClient)); |
@@ -20,3 +20,8 @@ import { ServiceStatus } from "@opencode-ai/protocol/groups/health"; | ||
| export const discover = Effect.fn("service.discover")(function* (options = {}) { | ||
| return (yield* discoverLocal(options))?.endpoint; | ||
| const found = (yield* registered(options.file)).service; | ||
| if (found?.state !== "ready") | ||
| return undefined; | ||
| if (!matchesVersion(found.version, options)) | ||
| return undefined; | ||
| return found.endpoint; | ||
| }); | ||
@@ -33,10 +38,2 @@ /** Recognize an authenticated compatible service bound to an expected URL, including while it starts or fails. */ | ||
| }); | ||
| const discoverLocal = Effect.fnUntraced(function* (options) { | ||
| const found = (yield* registered(options.file)).service; | ||
| if (found?.state !== "ready") | ||
| return undefined; | ||
| if (!matchesVersion(found.version, options)) | ||
| return undefined; | ||
| return found; | ||
| }); | ||
| // Idempotent ensure-running: reuses a healthy compatible server, replaces a | ||
@@ -43,0 +40,0 @@ // version-mismatched one, and otherwise spawns small contenders until a server |
@@ -1,2 +0,2 @@ | ||
| import type { ServerGetOutput, LocationGetInput, LocationGetOutput, AgentListInput, AgentListOutput, AgentGetInput, AgentGetOutput, PluginListInput, PluginListOutput, SessionListInput, SessionCreateInput, SessionImportInput, SessionExportInput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionRenameInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionInboxListInput, SessionInboxCancelInput, SessionInboxSteerInput, SessionInboxQueueInput, SessionInstructionsEntryListInput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionGenerateInput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionBackgroundInput, SessionMessageInput, SessionEnvironmentInput, MessageListInput, ModelListInput, ModelListOutput, ModelDefaultInput, ModelDefaultOutput, GenerateTextInput, ProviderListInput, ProviderListOutput, ProviderGetInput, ProviderGetOutput, IntegrationListInput, IntegrationListOutput, IntegrationGetInput, IntegrationGetOutput, IntegrationWellknownAddInput, IntegrationConnectKeyInput, IntegrationOauthConnectInput, IntegrationOauthConnectOutput, IntegrationOauthStatusInput, IntegrationOauthStatusOutput, IntegrationOauthCompleteInput, IntegrationOauthCancelInput, IntegrationCommandConnectInput, IntegrationCommandConnectOutput, IntegrationCommandStatusInput, IntegrationCommandStatusOutput, IntegrationCommandCancelInput, McpListInput, McpListOutput, McpAddInput, McpRemoveInput, McpConnectInput, McpDisconnectInput, McpResourceCatalogInput, McpResourceCatalogOutput, CredentialUpdateInput, CredentialRemoveInput, ProjectListOutput, ProjectCurrentInput, FormRequestListInput, FormRequestListOutput, FormListInput, FormCreateInput, FormGetInput, FormStateInput, FormReplyInput, FormCancelInput, PermissionRequestListInput, PermissionRequestListOutput, PermissionSavedListInput, PermissionSavedRemoveInput, PermissionCreateInput, PermissionListInput, PermissionGetInput, PermissionReplyInput, FileReadInput, FileReadOutput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, EventSubscribeOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, PtyConnectTokenInput, PtyConnectTokenOutput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellTimeoutInput, ShellTimeoutOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, ReferenceListInput, ReferenceListOutput, WorktreeListInput, WorktreeCreateInput, WorktreeRemoveInput, WorktreeRefreshInput, VcsGetInput, VcsGetOutput, VcsStatusInput, VcsStatusOutput, VcsDiffInput, VcsDiffOutput, DebugLocationListOutput, DebugLocationEvictInput, MigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, ConfigGetInput, ConfigGetOutput } from "./types.js"; | ||
| import type { ServerGetOutput, LocationGetInput, LocationGetOutput, AgentListInput, AgentListOutput, AgentGetInput, AgentGetOutput, PluginListInput, PluginListOutput, SessionListInput, SessionCreateInput, SessionImportInput, SessionExportInput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionRenameInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionInboxListInput, SessionInboxCancelInput, SessionInboxSteerInput, SessionInboxQueueInput, SessionInstructionsEntryListInput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionGenerateInput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionBackgroundInput, SessionMessageInput, SessionEnvironmentInput, SessionViewInput, MessageListInput, ModelListInput, ModelListOutput, ModelDefaultInput, ModelDefaultOutput, GenerateTextInput, ProviderListInput, ProviderListOutput, ProviderGetInput, ProviderGetOutput, IntegrationListInput, IntegrationListOutput, IntegrationGetInput, IntegrationGetOutput, IntegrationWellknownAddInput, IntegrationConnectKeyInput, IntegrationOauthConnectInput, IntegrationOauthConnectOutput, IntegrationOauthStatusInput, IntegrationOauthStatusOutput, IntegrationOauthCompleteInput, IntegrationOauthCancelInput, IntegrationCommandConnectInput, IntegrationCommandConnectOutput, IntegrationCommandStatusInput, IntegrationCommandStatusOutput, IntegrationCommandCancelInput, McpListInput, McpListOutput, McpAddInput, McpRemoveInput, McpConnectInput, McpDisconnectInput, McpResourceCatalogInput, McpResourceCatalogOutput, CredentialUpdateInput, CredentialRemoveInput, ProjectListOutput, ProjectCurrentInput, FormRequestListInput, FormRequestListOutput, FormListInput, FormCreateInput, FormGetInput, FormStateInput, FormReplyInput, FormCancelInput, PermissionRequestListInput, PermissionRequestListOutput, PermissionSavedListInput, PermissionSavedRemoveInput, PermissionCreateInput, PermissionListInput, PermissionGetInput, PermissionReplyInput, FileReadInput, FileReadOutput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, EventSubscribeOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, PtyConnectTokenInput, PtyConnectTokenOutput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellTimeoutInput, ShellTimeoutOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, ReferenceListInput, ReferenceListOutput, WorktreeListInput, WorktreeCreateInput, WorktreeRemoveInput, WorktreeRefreshInput, VcsGetInput, VcsGetOutput, VcsStatusInput, VcsStatusOutput, VcsDiffInput, VcsDiffOutput, DebugLocationListOutput, DebugLocationEvictInput, MigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, ConfigGetInput, ConfigGetOutput } from "./types.js"; | ||
| export interface ClientOptions { | ||
@@ -77,2 +77,3 @@ readonly baseUrl: string; | ||
| environment: (input: SessionEnvironmentInput, requestOptions?: RequestOptions) => Promise<void>; | ||
| view: (input: SessionViewInput, requestOptions?: RequestOptions) => Promise<void>; | ||
| }; | ||
@@ -79,0 +80,0 @@ message: { |
@@ -499,2 +499,10 @@ import { ClientError } from "./client-error.js"; | ||
| }, requestOptions), | ||
| view: (input, requestOptions) => request({ | ||
| method: "POST", | ||
| path: `/api/session/${encodeURIComponent(input.sessionID)}/view`, | ||
| body: { idle: input["idle"] }, | ||
| successStatus: 204, | ||
| declaredStatuses: [404, 401, 400], | ||
| empty: true, | ||
| }, requestOptions), | ||
| }, | ||
@@ -501,0 +509,0 @@ message: { |
@@ -15,5 +15,2 @@ import { readFile, rm } from "node:fs/promises"; | ||
| export async function discover(options = {}) { | ||
| return (await discoverLocal(options))?.endpoint; | ||
| } | ||
| async function discoverLocal(options) { | ||
| const found = (await registered(options.file)).service; | ||
@@ -24,3 +21,3 @@ if (found?.state !== "ready") | ||
| return undefined; | ||
| return found; | ||
| return found.endpoint; | ||
| } | ||
@@ -139,5 +136,2 @@ /** Ensure a healthy, compatible local service is running. */ | ||
| } | ||
| async function probe(info, allowLegacy = false) { | ||
| return (await probeResult(info, allowLegacy)).service; | ||
| } | ||
| async function probeResult(info, allowLegacy = false, timeout = defaultEnsureTiming.requestTimeout) { | ||
@@ -144,0 +138,0 @@ const endpoint = { |
+15
-2
@@ -1,2 +0,2 @@ | ||
| import type { AgentInfo, CommandInfo, FormInfo, IntegrationInfo, LocationRef, LocationGetOutput, McpResource, McpServer, ModelInfo, PermissionSavedInfo, PermissionRequest, PermissionReplyInput, Project, ProviderInfo, ReferenceInfo, SessionMessageInfo, SessionInfo, SessionInboxInfo, ShellInfo, SkillInfo, VcsInfo, OpenCodeEvent, OpenCodeClient, WebSearchProvider } from "../promise"; | ||
| import type { AgentInfo, CommandInfo, FormInfo, IntegrationInfo, LocationRef, LocationGetOutput, McpResource, McpServer, ModelInfo, ModelRef, PermissionSavedInfo, PermissionRequest, PermissionReplyInput, Project, ProviderInfo, ReferenceInfo, SessionMessageInfo, SessionInfo, SessionInboxInfo, ShellInfo, SkillInfo, VcsInfo, OpenCodeEvent, OpenCodeClient, WebSearchProvider } from "../promise"; | ||
| import { type SessionPromptInput } from "../promise"; | ||
@@ -53,3 +53,16 @@ export type DataSessionStatus = "idle" | "running"; | ||
| }; | ||
| prompt(input: SessionPromptInput): Promise<import("../promise").SessionInboxUser>; | ||
| create(input: { | ||
| id?: string; | ||
| title?: string; | ||
| agent?: string; | ||
| model?: ModelRef; | ||
| location?: LocationRef; | ||
| projectID?: string; | ||
| }): { | ||
| id: string; | ||
| request: Promise<SessionInfo>; | ||
| }; | ||
| prompt(input: SessionPromptInput & { | ||
| gate?: Promise<unknown>; | ||
| }): Promise<import("../promise").SessionInboxUser>; | ||
| sync(sessionID: string, options?: { | ||
@@ -56,0 +69,0 @@ children?: boolean; |
+4
-4
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "name": "@opencode-ai/client", | ||
| "version": "0.0.0-beta-17823", | ||
| "version": "0.0.0-beta-17887", | ||
| "type": "module", | ||
@@ -60,4 +60,4 @@ "license": "MIT", | ||
| "dependencies": { | ||
| "@opencode-ai/schema": "0.0.0-beta-17823", | ||
| "@opencode-ai/protocol": "0.0.0-beta-17823" | ||
| "@opencode-ai/schema": "0.0.0-beta-17887", | ||
| "@opencode-ai/protocol": "0.0.0-beta-17887" | ||
| }, | ||
@@ -78,3 +78,3 @@ "peerDependencies": { | ||
| "@effect/platform-node": "4.0.0-rc.110", | ||
| "@opencode-ai/httpapi-codegen": "0.0.0-beta-17823", | ||
| "@opencode-ai/httpapi-codegen": "0.0.0-beta-17887", | ||
| "@tsconfig/bun": "1.0.9", | ||
@@ -81,0 +81,0 @@ "@types/bun": "1.3.13", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
717840
2.16%17350
1.6%+ Added
+ Added
- Removed
- Removed