@opencode-ai/client
Advanced tools
@@ -1,3 +0,4 @@ | ||
| import type { ModelApi, ProviderApi } from "./api/api.js"; | ||
| import type { ModelApi, ProviderApi, WebsearchApi } from "./api/api.js"; | ||
| export type * from "./api/api.js"; | ||
| export type WebSearchApi<E = never> = WebsearchApi<E>; | ||
| export interface CatalogApi<E = never> { | ||
@@ -4,0 +5,0 @@ readonly provider: ProviderApi<E>; |
@@ -957,2 +957,20 @@ import type { Effect, Stream } from "effect"; | ||
| } | ||
| type Endpoint27_0Request = Parameters<RawClient["server.websearch"]["websearch.providers"]>[0]; | ||
| export type Endpoint27_0Input = { | ||
| readonly location?: Endpoint27_0Request["query"]["location"]; | ||
| }; | ||
| export type Endpoint27_0Output = EffectValue<ReturnType<RawClient["server.websearch"]["websearch.providers"]>>; | ||
| export type WebsearchProvidersOperation<E = never> = (input?: Endpoint27_0Input) => Effect.Effect<Endpoint27_0Output, E>; | ||
| type Endpoint27_1Request = Parameters<RawClient["server.websearch"]["websearch.query"]>[0]; | ||
| export type Endpoint27_1Input = { | ||
| readonly location?: Endpoint27_1Request["query"]["location"]; | ||
| readonly query: Endpoint27_1Request["payload"]["query"]; | ||
| readonly providerID?: Endpoint27_1Request["payload"]["providerID"]; | ||
| }; | ||
| export type Endpoint27_1Output = EffectValue<ReturnType<RawClient["server.websearch"]["websearch.query"]>>; | ||
| export type WebsearchQueryOperation<E = never> = (input: Endpoint27_1Input) => Effect.Effect<Endpoint27_1Output, E>; | ||
| export interface WebsearchApi<E = never> { | ||
| readonly providers: WebsearchProvidersOperation<E>; | ||
| readonly query: WebsearchQueryOperation<E>; | ||
| } | ||
| export interface AppApi<E = never> { | ||
@@ -986,3 +1004,4 @@ readonly health: HealthApi<E>; | ||
| readonly debug: DebugApi<E>; | ||
| readonly websearch: WebsearchApi<E>; | ||
| } | ||
| export {}; |
@@ -409,2 +409,11 @@ // Generated by @opencode-ai/httpapi-codegen. Do not edit. | ||
| }); | ||
| const Endpoint27_0 = (raw) => (input) => raw["websearch.providers"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)); | ||
| const Endpoint27_1 = (raw) => (input) => 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 adaptClient = (raw) => ({ | ||
@@ -438,3 +447,4 @@ health: adaptGroup0(raw["server.health"]), | ||
| debug: adaptGroup26(raw["server.debug"]), | ||
| websearch: adaptGroup27(raw["server.websearch"]), | ||
| }); | ||
| export const make = (options) => HttpApiClient.make(ClientApi, options).pipe(Effect.map(adaptClient)); |
| import type { Effect } from "effect"; | ||
| export * from "./generated/index"; | ||
| export type { AgentApi, AppApi, CatalogApi, CommandApi, EventApi, IntegrationApi, ModelApi, PluginApi, ProviderApi, ReferenceApi, SessionApi, SkillApi, } from "./api.js"; | ||
| export type { AgentApi, AppApi, CatalogApi, CommandApi, EventApi, IntegrationApi, ModelApi, PluginApi, ProviderApi, ReferenceApi, WebSearchApi, SessionApi, SkillApi, } from "./api.js"; | ||
| export { Agent } from "@opencode-ai/schema/agent"; | ||
@@ -22,2 +22,3 @@ export { Command } from "@opencode-ai/schema/command"; | ||
| export { Reference } from "@opencode-ai/schema/reference"; | ||
| export { WebSearch } from "@opencode-ai/schema/websearch"; | ||
| export { AbsolutePath, RelativePath } from "@opencode-ai/schema/schema"; | ||
@@ -24,0 +25,0 @@ export { Session } from "@opencode-ai/schema/session"; |
@@ -20,2 +20,3 @@ export * from "./generated/index"; | ||
| export { Reference } from "@opencode-ai/schema/reference"; | ||
| export { WebSearch } from "@opencode-ai/schema/websearch"; | ||
| export { AbsolutePath, RelativePath } from "@opencode-ai/schema/schema"; | ||
@@ -22,0 +23,0 @@ export { Session } from "@opencode-ai/schema/session"; |
@@ -10,2 +10,3 @@ type Client = ReturnType<typeof import("./generated/client.js").make>; | ||
| export type ReferenceApi = Client["reference"]; | ||
| export type WebSearchApi = Client["websearch"]; | ||
| export type SessionApi = Client["session"]; | ||
@@ -12,0 +13,0 @@ export type SkillApi = Client["skill"]; |
@@ -1,2 +0,2 @@ | ||
| import type { HealthStopInput, ServerGetOutput, LocationGetInput, LocationGetOutput, AgentListInput, AgentListOutput, PluginListInput, PluginListOutput, SessionListInput, SessionCreateInput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionRenameInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionPendingListInput, SessionInstructionsEntryListInput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionGenerateInput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionBackgroundInput, SessionMessageInput, 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, ProjectDirectoriesInput, 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, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellTimeoutInput, ShellTimeoutOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, QuestionRequestListInput, QuestionRequestListOutput, QuestionListInput, QuestionReplyInput, QuestionRejectInput, ReferenceListInput, ReferenceListOutput, ProjectCopyCreateInput, ProjectCopyRemoveInput, ProjectCopyRefreshInput, VcsStatusInput, VcsStatusOutput, VcsDiffInput, VcsDiffOutput, DebugLocationListOutput, DebugLocationEvictInput } from "./types"; | ||
| import type { HealthStopInput, ServerGetOutput, LocationGetInput, LocationGetOutput, AgentListInput, AgentListOutput, PluginListInput, PluginListOutput, SessionListInput, SessionCreateInput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionRenameInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionPendingListInput, SessionInstructionsEntryListInput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionGenerateInput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionBackgroundInput, SessionMessageInput, 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, ProjectDirectoriesInput, 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, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellTimeoutInput, ShellTimeoutOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, QuestionRequestListInput, QuestionRequestListOutput, QuestionListInput, QuestionReplyInput, QuestionRejectInput, ReferenceListInput, ReferenceListOutput, ProjectCopyCreateInput, ProjectCopyRemoveInput, ProjectCopyRefreshInput, VcsStatusInput, VcsStatusOutput, VcsDiffInput, VcsDiffOutput, DebugLocationListOutput, DebugLocationEvictInput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput } from "./types"; | ||
| export interface ClientOptions { | ||
@@ -217,2 +217,6 @@ readonly baseUrl: string; | ||
| }; | ||
| websearch: { | ||
| providers: (input?: WebsearchProvidersInput, requestOptions?: RequestOptions) => Promise<WebsearchProvidersOutput>; | ||
| query: (input: WebsearchQueryInput, requestOptions?: RequestOptions) => Promise<WebsearchQueryOutput>; | ||
| }; | ||
| }; |
@@ -1091,2 +1091,21 @@ import { ClientError } from "./client-error"; | ||
| }, | ||
| websearch: { | ||
| providers: (input, requestOptions) => request({ | ||
| method: "GET", | ||
| path: `/api/websearch/provider`, | ||
| query: { location: input?.["location"] }, | ||
| successStatus: 200, | ||
| declaredStatuses: [503, 401, 400], | ||
| empty: false, | ||
| }, requestOptions), | ||
| query: (input, requestOptions) => request({ | ||
| method: "POST", | ||
| path: `/api/websearch`, | ||
| query: { location: input["location"] }, | ||
| body: { query: input["query"], providerID: input["providerID"] }, | ||
| successStatus: 200, | ||
| declaredStatuses: [400, 503, 401], | ||
| empty: false, | ||
| }, requestOptions), | ||
| }, | ||
| }; | ||
@@ -1093,0 +1112,0 @@ } |
| export * from "./generated/index"; | ||
| export type { AgentApi, CatalogApi, CommandApi, EventApi, IntegrationApi, ModelApi, PluginApi, ProviderApi, ReferenceApi, SessionApi, SkillApi, } from "./api.js"; | ||
| export type { AgentApi, CatalogApi, CommandApi, EventApi, IntegrationApi, ModelApi, PluginApi, ProviderApi, ReferenceApi, WebSearchApi, SessionApi, SkillApi, } from "./api.js"; | ||
| export type { EventSubscribeOutput as OpenCodeEvent } from "./generated/types"; | ||
| export type OpenCodeClient = ReturnType<typeof import("./generated/client").make>; |
+4
-4
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "name": "@opencode-ai/client", | ||
| "version": "0.0.0-next-16229", | ||
| "version": "0.0.0-next-16230", | ||
| "type": "module", | ||
@@ -56,4 +56,4 @@ "license": "MIT", | ||
| "dependencies": { | ||
| "@opencode-ai/schema": "0.0.0-next-16229", | ||
| "@opencode-ai/protocol": "0.0.0-next-16229" | ||
| "@opencode-ai/schema": "0.0.0-next-16230", | ||
| "@opencode-ai/protocol": "0.0.0-next-16230" | ||
| }, | ||
@@ -70,3 +70,3 @@ "peerDependencies": { | ||
| "@effect/platform-node": "4.0.0-beta.98", | ||
| "@opencode-ai/httpapi-codegen": "0.0.0-next-16229", | ||
| "@opencode-ai/httpapi-codegen": "0.0.0-next-16230", | ||
| "@tsconfig/bun": "1.0.9", | ||
@@ -73,0 +73,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
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
997175
0.72%19452
0.85%+ Added
+ Added
- Removed
- Removed