opencode-ext-connector 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +1 -1
- package/dist/catalog/parse-ids.d.ts +1 -1
- package/dist/catalog/parse-ids.js +1 -1
- package/dist/core/adapter.d.ts +3 -3
- package/dist/core/adapter.js +1 -1
- package/dist/core/deadline.d.ts +2 -2
- package/dist/core/deadline.js +2 -2
- package/dist/core/errors.d.ts +1 -1
- package/dist/core/logger.d.ts +1 -1
- package/dist/core/models.d.ts +1 -1
- package/dist/core/models.js +1 -1
- package/dist/core/options.d.ts +1 -1
- package/dist/core/process.d.ts +1 -1
- package/dist/http/fetch-transport.d.ts +1 -1
- package/dist/http/package-version.d.ts +1 -1
- package/dist/http/read-body.d.ts +1 -1
- package/dist/logging/logger.d.ts +2 -2
- package/dist/logging/logger.js +1 -1
- package/dist/opencode/catalog-bridge.d.ts +2 -2
- package/dist/opencode/catalog-bridge.js +1 -1
- package/dist/opencode/health-refresh.d.ts +5 -5
- package/dist/opencode/health-refresh.js +4 -4
- package/dist/opencode/host-options.d.ts +1 -1
- package/dist/opencode/language-factory.d.ts +3 -3
- package/dist/opencode/language-factory.js +5 -5
- package/dist/opencode/ollama-probe.d.ts +1 -1
- package/dist/opencode/ollama-probe.js +3 -3
- package/dist/opencode/ollama-production.d.ts +2 -2
- package/dist/opencode/ollama-production.js +3 -3
- package/dist/opencode/plugin.d.ts +6 -6
- package/dist/opencode/plugin.js +1 -1
- package/dist/opencode/provider-entry.d.ts +6 -6
- package/dist/opencode/providers.d.ts +4 -4
- package/dist/opencode/providers.js +16 -16
- package/dist/opencode/register-integrations.d.ts +2 -2
- package/dist/opencode/reload.d.ts +1 -1
- package/dist/opencode/reload.js +1 -1
- package/dist/opencode/v1-anthropic-auth.d.ts +1 -1
- package/dist/opencode/v1-anthropic-auth.js +1 -1
- package/dist/opencode/v1-catalog.d.ts +2 -2
- package/dist/opencode/v1-catalog.js +1 -1
- package/dist/opencode/v1-language.js +7 -7
- package/dist/opencode/v1-module.d.ts +6 -6
- package/dist/opencode/v1-module.js +6 -6
- package/dist/opencode/v1-session-auth.d.ts +1 -1
- package/dist/opencode/v1-session-auth.js +4 -4
- package/dist/providers/claude/adapter.d.ts +2 -2
- package/dist/providers/claude/adapter.js +3 -3
- package/dist/providers/claude/auth-json.d.ts +1 -1
- package/dist/providers/claude/auth.d.ts +4 -4
- package/dist/providers/claude/auth.js +3 -3
- package/dist/providers/claude/cli-version.d.ts +1 -1
- package/dist/providers/claude/cli-version.js +1 -1
- package/dist/providers/claude/compat-betas.js +1 -1
- package/dist/providers/claude/compat-request.js +3 -3
- package/dist/providers/claude/compat-response.js +1 -1
- package/dist/providers/claude/compat-transform.js +2 -2
- package/dist/providers/claude/emit-stream.js +1 -1
- package/dist/providers/claude/language-model.d.ts +1 -1
- package/dist/providers/claude/language-model.js +5 -5
- package/dist/providers/claude/models.d.ts +2 -2
- package/dist/providers/claude/models.js +2 -2
- package/dist/providers/claude/prompt.d.ts +1 -1
- package/dist/providers/claude/prompt.js +1 -1
- package/dist/providers/claude/refresh.d.ts +3 -3
- package/dist/providers/claude/sse-convert.d.ts +1 -1
- package/dist/providers/claude/sse.d.ts +1 -1
- package/dist/providers/claude/sse.js +2 -2
- package/dist/providers/claude/writeback.d.ts +1 -1
- package/dist/providers/claude/writeback.js +4 -4
- package/dist/providers/command-code/adapter.d.ts +2 -2
- package/dist/providers/command-code/adapter.js +3 -3
- package/dist/providers/command-code/auth.js +1 -1
- package/dist/providers/command-code/cli-version.d.ts +1 -1
- package/dist/providers/command-code/cli-version.js +1 -1
- package/dist/providers/command-code/emit-stream.js +2 -2
- package/dist/providers/command-code/language-model.d.ts +2 -2
- package/dist/providers/command-code/language-model.js +10 -13
- package/dist/providers/command-code/models.d.ts +2 -2
- package/dist/providers/command-code/models.js +1 -1
- package/dist/providers/command-code/record-stream.js +1 -1
- package/dist/providers/command-code/request-lifecycle.d.ts +1 -1
- package/dist/providers/command-code/request-lifecycle.js +3 -3
- package/dist/providers/command-code/request.d.ts +1 -1
- package/dist/providers/cursor/adapter.d.ts +2 -2
- package/dist/providers/cursor/adapter.js +3 -3
- package/dist/providers/cursor/auth.d.ts +1 -1
- package/dist/providers/cursor/auth.js +2 -2
- package/dist/providers/cursor/blob-store.d.ts +1 -1
- package/dist/providers/cursor/blob-store.js +1 -1
- package/dist/providers/cursor/bridge-client.d.ts +2 -2
- package/dist/providers/cursor/bridge-client.js +4 -4
- package/dist/providers/cursor/bridge-event-sanitize.d.ts +1 -1
- package/dist/providers/cursor/bridge-limits.js +1 -1
- package/dist/providers/cursor/bridge-process.d.ts +1 -1
- package/dist/providers/cursor/bridge-process.js +2 -2
- package/dist/providers/cursor/bridge-protocol.d.ts +4 -4
- package/dist/providers/cursor/bridge-protocol.js +6 -6
- package/dist/providers/cursor/bridge-serialize.d.ts +1 -1
- package/dist/providers/cursor/bridge-serialize.js +3 -3
- package/dist/providers/cursor/bridge-wire.d.ts +1 -1
- package/dist/providers/cursor/bridge-wire.js +3 -3
- package/dist/providers/cursor/checkpoint-store.d.ts +3 -3
- package/dist/providers/cursor/checkpoint-store.js +1 -1
- package/dist/providers/cursor/connect-frame-stream.js +2 -2
- package/dist/providers/cursor/connect-frame.js +1 -1
- package/dist/providers/cursor/direct-run-types.d.ts +7 -7
- package/dist/providers/cursor/direct-run.d.ts +2 -2
- package/dist/providers/cursor/direct-run.js +14 -14
- package/dist/providers/cursor/direct-runtime.d.ts +5 -5
- package/dist/providers/cursor/direct-runtime.js +9 -9
- package/dist/providers/cursor/direct-stream.d.ts +4 -4
- package/dist/providers/cursor/direct-stream.js +4 -4
- package/dist/providers/cursor/exec-reply.d.ts +4 -4
- package/dist/providers/cursor/exec-reply.js +4 -4
- package/dist/providers/cursor/h2-bridge-response.js +1 -1
- package/dist/providers/cursor/h2-bridge-session.d.ts +1 -1
- package/dist/providers/cursor/h2-bridge-session.js +2 -2
- package/dist/providers/cursor/http2.js +1 -1
- package/dist/providers/cursor/interaction-reply.d.ts +1 -1
- package/dist/providers/cursor/interaction-reply.js +2 -2
- package/dist/providers/cursor/language-generate.js +1 -1
- package/dist/providers/cursor/language-model.d.ts +1 -1
- package/dist/providers/cursor/language-model.js +6 -6
- package/dist/providers/cursor/legacy-stream.js +5 -5
- package/dist/providers/cursor/mcp-tools.js +2 -2
- package/dist/providers/cursor/models.d.ts +2 -2
- package/dist/providers/cursor/models.js +4 -4
- package/dist/providers/cursor/proto/checkpoint.js +3 -3
- package/dist/providers/cursor/proto/context.js +3 -3
- package/dist/providers/cursor/proto/exec-control.js +3 -3
- package/dist/providers/cursor/proto/exec.d.ts +3 -3
- package/dist/providers/cursor/proto/exec.js +5 -5
- package/dist/providers/cursor/proto/fields.d.ts +1 -1
- package/dist/providers/cursor/proto/fields.js +3 -3
- package/dist/providers/cursor/proto/interaction-query.js +3 -3
- package/dist/providers/cursor/proto/interaction-tool-update.d.ts +1 -1
- package/dist/providers/cursor/proto/interaction-tool-update.js +3 -3
- package/dist/providers/cursor/proto/interaction-turn-ended.js +2 -2
- package/dist/providers/cursor/proto/interaction.d.ts +4 -4
- package/dist/providers/cursor/proto/interaction.js +7 -7
- package/dist/providers/cursor/proto/kv.js +3 -3
- package/dist/providers/cursor/proto/mcp-result.d.ts +2 -2
- package/dist/providers/cursor/proto/mcp-result.js +5 -5
- package/dist/providers/cursor/proto/mcp.d.ts +1 -1
- package/dist/providers/cursor/proto/mcp.js +5 -5
- package/dist/providers/cursor/proto/model.js +2 -2
- package/dist/providers/cursor/proto/output-location.js +4 -4
- package/dist/providers/cursor/proto/prewarm.d.ts +3 -3
- package/dist/providers/cursor/proto/prewarm.js +5 -5
- package/dist/providers/cursor/proto/request-context.d.ts +1 -1
- package/dist/providers/cursor/proto/request-context.js +4 -4
- package/dist/providers/cursor/proto/request.d.ts +11 -11
- package/dist/providers/cursor/proto/request.js +11 -11
- package/dist/providers/cursor/proto/run-request.d.ts +4 -4
- package/dist/providers/cursor/proto/run-request.js +6 -6
- package/dist/providers/cursor/proto/server.d.ts +7 -7
- package/dist/providers/cursor/proto/server.js +8 -8
- package/dist/providers/cursor/proto/unknown-field.js +2 -2
- package/dist/providers/cursor/proto-value.js +3 -3
- package/dist/providers/cursor/proto-wire.js +1 -1
- package/dist/providers/cursor/protocol-failure.d.ts +1 -1
- package/dist/providers/cursor/protocol-failure.js +1 -1
- package/dist/providers/cursor/recovery.d.ts +2 -2
- package/dist/providers/cursor/recovery.js +2 -2
- package/dist/providers/cursor/request-blob-ownership.d.ts +1 -1
- package/dist/providers/cursor/request-build.d.ts +3 -3
- package/dist/providers/cursor/request-build.js +6 -6
- package/dist/providers/cursor/request-history.d.ts +4 -4
- package/dist/providers/cursor/request-history.js +2 -2
- package/dist/providers/cursor/request-input.d.ts +4 -4
- package/dist/providers/cursor/request-input.js +2 -2
- package/dist/providers/cursor/run-events.js +1 -1
- package/dist/providers/cursor/run-session-expiry.d.ts +1 -1
- package/dist/providers/cursor/run-session.d.ts +6 -6
- package/dist/providers/cursor/run-session.js +4 -4
- package/dist/providers/cursor/run.d.ts +2 -2
- package/dist/providers/cursor/run.js +8 -8
- package/dist/providers/cursor/runner.js +3 -3
- package/dist/providers/cursor/server-dispatch-types.d.ts +6 -6
- package/dist/providers/cursor/server-dispatch.d.ts +2 -2
- package/dist/providers/cursor/server-dispatch.js +5 -5
- package/dist/providers/cursor/session-state.d.ts +2 -2
- package/dist/providers/cursor/session-state.js +1 -1
- package/dist/providers/cursor/stream-adapter.d.ts +2 -2
- package/dist/providers/cursor/stream-adapter.js +1 -1
- package/dist/providers/cursor/tool-continuation.d.ts +1 -1
- package/dist/providers/cursor/tool-continuation.js +1 -1
- package/dist/providers/ollama/adapter.d.ts +3 -3
- package/dist/providers/ollama/adapter.js +5 -5
- package/dist/providers/ollama/catalog-state.d.ts +3 -3
- package/dist/providers/ollama/catalog-state.js +4 -4
- package/dist/providers/ollama/cloud-catalog.d.ts +2 -2
- package/dist/providers/ollama/cloud-catalog.js +4 -4
- package/dist/providers/ollama/http.js +2 -2
- package/dist/providers/ollama/index.d.ts +8 -8
- package/dist/providers/ollama/index.js +8 -8
- package/dist/providers/ollama/language-model.d.ts +3 -3
- package/dist/providers/ollama/language-model.js +5 -5
- package/dist/providers/ollama/local-catalog.d.ts +2 -2
- package/dist/providers/ollama/local-catalog.js +3 -3
- package/dist/providers/ollama/ndjson.d.ts +1 -1
- package/dist/providers/ollama/ndjson.js +1 -1
- package/dist/providers/ollama/prompt.d.ts +1 -1
- package/dist/providers/ollama/prompt.js +1 -1
- package/dist/providers/ollama/runtime.d.ts +3 -3
- package/dist/providers/ollama/runtime.js +6 -6
- package/dist/providers/ollama/stream.js +3 -3
- package/dist/sdk/command-code.js +1 -1
- package/dist/sdk/cursor.js +1 -1
- package/dist/sdk/ollama.js +1 -1
- package/dist/server.js +10 -10
- package/docs/README.ko.md +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { parseAdapterModel } from "../../core/models";
|
|
3
|
-
import { OllamaCatalogError } from "./errors";
|
|
4
|
-
import { requestOllamaCatalog } from "./http";
|
|
2
|
+
import { parseAdapterModel } from "../../core/models.js";
|
|
3
|
+
import { OllamaCatalogError } from "./errors.js";
|
|
4
|
+
import { requestOllamaCatalog } from "./http.js";
|
|
5
5
|
const LOCAL_TAGS_URL = "http://localhost:11434/api/tags";
|
|
6
6
|
const LocalModelSchema = z
|
|
7
7
|
.object({ model: z.string().optional(), name: z.string().optional() })
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { z } from "zod";
|
|
2
|
-
import { type OllamaGenerationOperation } from "./errors";
|
|
2
|
+
import { type OllamaGenerationOperation } from "./errors.js";
|
|
3
3
|
export declare function parseOllamaNdjson<T>(response: Response, schema: z.ZodType<T>, operation: OllamaGenerationOperation): AsyncGenerator<T>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LanguageModelV3CallOptions, SharedV3Warning } from "@ai-sdk/provider";
|
|
2
|
-
import type { OllamaChatRequest } from "./protocol";
|
|
2
|
+
import type { OllamaChatRequest } from "./protocol.js";
|
|
3
3
|
type BuiltOllamaCall = {
|
|
4
4
|
readonly request: OllamaChatRequest;
|
|
5
5
|
readonly warnings: SharedV3Warning[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { OllamaCatalogState } from "./catalog-state";
|
|
2
|
-
import { type OllamaFetch } from "./http";
|
|
3
|
-
import { type OllamaChatRequest } from "./protocol";
|
|
1
|
+
import type { OllamaCatalogState } from "./catalog-state.js";
|
|
2
|
+
import { type OllamaFetch } from "./http.js";
|
|
3
|
+
import { type OllamaChatRequest } from "./protocol.js";
|
|
4
4
|
export type OllamaRuntimeOptions = {
|
|
5
5
|
readonly catalog: OllamaCatalogState;
|
|
6
6
|
readonly fetch?: OllamaFetch;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { OperationCancelledError } from "../../core/errors";
|
|
2
|
-
import { OllamaGenerationError } from "./errors";
|
|
3
|
-
import { productionOllamaFetch } from "./http";
|
|
4
|
-
import { listLocalOllamaModels } from "./local-catalog";
|
|
5
|
-
import { parseOllamaNdjson } from "./ndjson";
|
|
6
|
-
import { OllamaPullChunkSchema } from "./protocol";
|
|
1
|
+
import { OperationCancelledError } from "../../core/errors.js";
|
|
2
|
+
import { OllamaGenerationError } from "./errors.js";
|
|
3
|
+
import { productionOllamaFetch } from "./http.js";
|
|
4
|
+
import { listLocalOllamaModels } from "./local-catalog.js";
|
|
5
|
+
import { parseOllamaNdjson } from "./ndjson.js";
|
|
6
|
+
import { OllamaPullChunkSchema } from "./protocol.js";
|
|
7
7
|
const PULL_URL = "http://localhost:11434/api/pull";
|
|
8
8
|
const CHAT_URL = "http://localhost:11434/api/chat";
|
|
9
9
|
const JSON_HEADERS = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { OllamaGenerationError } from "./errors";
|
|
2
|
-
import { parseOllamaNdjson } from "./ndjson";
|
|
3
|
-
import { OllamaChatChunkSchema } from "./protocol";
|
|
1
|
+
import { OllamaGenerationError } from "./errors.js";
|
|
2
|
+
import { parseOllamaNdjson } from "./ndjson.js";
|
|
3
|
+
import { OllamaChatChunkSchema } from "./protocol.js";
|
|
4
4
|
function usage(chunk) {
|
|
5
5
|
return {
|
|
6
6
|
inputTokens: {
|
package/dist/sdk/command-code.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { languageForV1Provider } from "../opencode/v1-language";
|
|
1
|
+
import { languageForV1Provider } from "../opencode/v1-language.js";
|
|
2
2
|
export function createCommandCode(options = {}) {
|
|
3
3
|
return {
|
|
4
4
|
languageModel: (modelId) => languageForV1Provider("command-code", modelId, options),
|
package/dist/sdk/cursor.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { languageForV1Provider } from "../opencode/v1-language";
|
|
1
|
+
import { languageForV1Provider } from "../opencode/v1-language.js";
|
|
2
2
|
export function createCursor(options = {}) {
|
|
3
3
|
return {
|
|
4
4
|
languageModel: (modelId) => languageForV1Provider("cursor", modelId, options),
|
package/dist/sdk/ollama.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { languageForV1Provider } from "../opencode/v1-language";
|
|
1
|
+
import { languageForV1Provider } from "../opencode/v1-language.js";
|
|
2
2
|
export function createOllama(options = {}) {
|
|
3
3
|
return {
|
|
4
4
|
languageModel: (modelId) => languageForV1Provider("ollama", modelId, options),
|
package/dist/server.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { dirname, join } from "node:path";
|
|
2
2
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
3
|
-
import { createAsyncDisposable } from "./core/lifecycle";
|
|
4
|
-
import { parseConnectorOptions } from "./core/options";
|
|
5
|
-
import { createFetchHttpTransport } from "./http/fetch-transport";
|
|
6
|
-
import { createConsoleLogger } from "./logging/logger";
|
|
7
|
-
import { createOpenCodeAuthStore } from "./opencode/auth-store";
|
|
8
|
-
import { pickConnectorOptionsInput } from "./opencode/host-options";
|
|
9
|
-
import { createProviderRegistry, selectConfiguredProviders } from "./opencode/providers";
|
|
10
|
-
import { disposeV1LanguageRuntime } from "./opencode/v1-language";
|
|
11
|
-
import { createV1AuthServer, createV1Server } from "./opencode/v1-module";
|
|
12
|
-
import { writeClaudeCredentials } from "./providers/claude/writeback";
|
|
3
|
+
import { createAsyncDisposable } from "./core/lifecycle.js";
|
|
4
|
+
import { parseConnectorOptions } from "./core/options.js";
|
|
5
|
+
import { createFetchHttpTransport } from "./http/fetch-transport.js";
|
|
6
|
+
import { createConsoleLogger } from "./logging/logger.js";
|
|
7
|
+
import { createOpenCodeAuthStore } from "./opencode/auth-store.js";
|
|
8
|
+
import { pickConnectorOptionsInput } from "./opencode/host-options.js";
|
|
9
|
+
import { createProviderRegistry, selectConfiguredProviders } from "./opencode/providers.js";
|
|
10
|
+
import { disposeV1LanguageRuntime } from "./opencode/v1-language.js";
|
|
11
|
+
import { createV1AuthServer, createV1Server } from "./opencode/v1-module.js";
|
|
12
|
+
import { writeClaudeCredentials } from "./providers/claude/writeback.js";
|
|
13
13
|
const env = process.env;
|
|
14
14
|
const transport = createFetchHttpTransport();
|
|
15
15
|
const authStore = createOpenCodeAuthStore({ env });
|
package/docs/README.ko.md
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
## 상태
|
|
21
21
|
|
|
22
|
-
> 독립적인 비공식 커뮤니티 플러그인, 버전 **0.3.
|
|
22
|
+
> 독립적인 비공식 커뮤니티 플러그인, 버전 **0.3.2**. CI에 설치된 OpenCode CLI를 대상으로 legacy multi-function 로더를 패키지 E2E 테스트로 검증합니다. `@opencode-ai/plugin@1.18.18`은 컴파일 시 사용하는 플러그인 API 대상이며 OpenCode 런타임 버전 고정이 아닙니다. 소스는 BSD-3-Clause입니다. 이 프로젝트는 OpenCode 또는 어떤 프로바이더와도 제휴, 보증, 후원, 승인 관계가 없습니다. 전체 조건은 [라이선스 및 면책 조항](#라이선스-및-면책-조항)에 있습니다.
|
|
23
23
|
|
|
24
24
|
이미 가지고 있는 Claude, Cursor, Command Code, Ollama 세션을 재사용합니다. `opencode.json` 플러그인 항목 하나가 라이브 카탈로그를 OpenCode에 공개합니다. Claude와 Cursor는 OpenCode에 마커 또는 OAuth 레코드가 있고 벤더 세션이 있을 때까지 연결되지 않은 상태로 유지됩니다. Command Code는 OpenCode에 저장된 직접 API 키 또는 기존 CLI 세션/키를 사용할 수 있습니다. Ollama는 정확한 세션 마커와 응답하는 localhost 데몬이 필요합니다.
|
|
25
25
|
|