feat(extension): BYOE 0.8.0 - endpoints commands + bridge --endpoint plumbing (REQ-142)#46
Closed
feat(extension): BYOE 0.8.0 - endpoints commands + bridge --endpoint plumbing (REQ-142)#46
Conversation
… (REQ-142) Phase 3 of the BYOE 0.8.0 sprint. Surfaces the CLI-side endpoints registry to the VS Code extension and threads endpointId through the bridge so the agent can be routed to a self-hosted OpenAI-v1-compatible backend. - src/EndpointsClient.ts: pure TS wrapper around 'specsmith endpoints list / test --json' + JSON parsers (parseEndpointsList, parseEndpointHealth) and the applyEndpointArg bridge helper. Tokens are never read from TypeScript memory; the CLI redacts inline tokens before serialising. - src/types.ts: SessionConfig.endpointId optional field. - src/bridge.ts: appends '--endpoint <id>' to specsmith run when SessionConfig.endpointId is set, routing through the openai-compat driver added in PR-2. - src/extension.ts: new specsmith.endpoints command (Quick Pick over registered endpoints with copy / set-default / test actions) and specsmith.testEndpoint command (probes /v1/models, surfaces a notification with latency + model count). - package.json: declares the two new commands. - src/test/endpoints-client.test.ts: 11 new mocha tests covering the JSON parsers and the bridge arg helper (happy path, malformed body, redacted inline tokens, unknown auth kinds, non-object items). - CHANGELOG.md: [Unreleased] entry. Validation: tsc --noEmit clean; esbuild bundle 279.8kb; npm test 117 passing (was 104; +13 from the new suite). Co-Authored-By: Oz <oz-agent@warp.dev>
Bump package.json to 0.8.0 + cut the BYOE 0.8.0 changelog section. Co-Authored-By: Oz <oz-agent@warp.dev>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What\n\nExtension-side companion to BitConcepts/specsmith#? (BYOE in the CLI). Adds the
EndpointsClientmodule, two new commands, and the bridge--endpointplumbing so VS Code sessions can be routed to a self-hosted OpenAI-v1-compatible backend registered withspecsmith endpoints add.\n\n## Files\n\n-src/EndpointsClient.ts- pure-TS wrapper aroundspecsmith endpoints list / test --json. JSON parsers (parseEndpointsList,parseEndpointHealth) andapplyEndpointArgexported for direct mocha coverage. Tokens never appear in TypeScript memory; the CLI redacts inline tokens.\n-src/types.ts-SessionConfig.endpointIdoptional field.\n-src/bridge.ts- appends--endpoint <id>tospecsmith runwhenSessionConfig.endpointIdis set.\n-src/extension.ts- newspecsmith.endpoints(Quick Pick over registered endpoints with copy-id / set-default / test actions;\\u2605marks default) andspecsmith.testEndpoint(probes/v1/models, surfaces a notification with latency + model count).\n-package.json- declares the two new commands; version 0.7.0 -> 0.8.0; description mentions BYOE OpenAI-v1 endpoints.\n-src/test/endpoints-client.test.ts- 11 new mocha tests.\n-CHANGELOG.md- cut the 0.8.0 section from[Unreleased].\n\n## Validation\n\n-npm run lint(tsc --noEmit): clean.\n-npm run build(esbuild): 279.8kb bundle.\n-npm test: 117 passing (was 104; +13 from the new suite).\n\n## How to test\n\n1. With the BYOE 0.8.0 CLI installed, register an endpoint viaspecsmith endpoints add.\n2. Open the command palette and runspecsmith: BYOE Endpoints\\u2026- the new endpoint appears with a\\u2605if it is default.\n3. Pick the endpoint -> Test endpoint -> see latency / model-count notification.\n4. To route an active session: setSessionConfig.endpointId(currently via API; a Session header dropdown lands in a follow-up PR). The bridge appends--endpoint <id>to everyspecsmith runinvocation.\n\n## Out of scope\n\n- A rich Endpoints tab in the SettingsPanel webview is deferred. The command-palette surface here is enough to drive sessions through BYOE today; a webview tab is a follow-up UI iteration.\n- Per-session UI dropdown to pick the endpoint at session-create time. The plumbing is in place viaSessionConfig.endpointId; the dropdown is a small follow-up.\n\nCo-Authored-By: Oz oz-agent@warp.dev