Repository navigation
Conversation
flxkm522
added a commit
that referenced
this pull request
Oct 12, 2026
…tored Squash of the redrob-code ENGINE work that was spread across seven open PRs into a single change on develop. The Electron/desktop app and the build-off/Quality-Lab stack move to the alpha/desktop branch separately and are not part of this. Rolled up: - #67 insights route + /v1/chat/completions (serve the OpenAI face for real, forward x-redrob-session to the Console). - #68 regenerate the JS SDK that had fallen behind the routes. - #69-#74 the media tools and endpoints: image_generate (edit / reference images), speech_generate (mp3), POST /redrob/speech and POST /redrob/transcribe, all on the engine own Redrob credential. - #79 the shared on-device labellers (route-labeller, work-labeller) as source workspace packages, consumed downstream by Cowork/Office/Design. Integration fix found by combining the PRs: - packages/server/src/routes.ts: the chat-completion handler reads LLMClient inside the request, so it was a per-request requirement of the embedded API that Layer.provide(serviceLayer) did not discharge, leaking as a residual requirement and flipping the web.handler signature so the untouched sdk-next caller stopped type-checking. LLMClient is a global service, so it is now provided once via HttpRouter.provideRequest inside makeRoutes. Review + lean/documentation pass (behaviour-preserving): - image_generate / speech_generate: size-limit messages derive from their constants instead of hand-kept 10 MB / 50 MB literals (drift-proof). - speech_generate: characters() uses [...text].length (idiomatic code-point count). - core/insights.ts: tightened the ErrorEnvelope describe() union guard (identical runtime behaviour). - plugin/host.ts: removed a misleading comment on skill.list; it matches the uniform mutable() pattern now. - docs/LOCAL-ENGINE-API.md: documented the shipped /redrob/speech and /redrob/transcribe endpoints (sections 1c, 1d). Verified: bun turbo typecheck 20/20; bun install --frozen-lockfile clean; engine tool/server tests 42/42; core 6/6; work-labeller 77/77.
Author
|
Superseded by #80, which consolidates all redrob-code engine PRs into a single squashed PR on |
flxkm522
added a commit
that referenced
this pull request
Oct 12, 2026
…tored Squash of the redrob-code ENGINE work that was spread across seven open PRs into a single change on develop. The Electron/desktop app and the build-off/Quality-Lab stack move to the alpha/desktop branch separately and are not part of this. Rolled up: - #67 insights route + /v1/chat/completions (serve the OpenAI face for real, forward x-redrob-session to the Console). - #68 regenerate the JS SDK that had fallen behind the routes. - #69-#74 the media tools and endpoints: image_generate (edit / reference images), speech_generate (mp3), POST /redrob/speech and POST /redrob/transcribe, all on the engine own Redrob credential. - #79 the shared on-device labellers (route-labeller, work-labeller) as source workspace packages, consumed downstream by Cowork/Office/Design. Integration fix found by combining the PRs: - packages/server/src/routes.ts: the chat-completion handler reads LLMClient inside the request, so it was a per-request requirement of the embedded API that Layer.provide(serviceLayer) did not discharge, leaking as a residual requirement and flipping the web.handler signature so the untouched sdk-next caller stopped type-checking. LLMClient is a global service, so it is now provided once via HttpRouter.provideRequest inside makeRoutes. Review + lean/documentation pass (behaviour-preserving): - image_generate / speech_generate: size-limit messages derive from their constants instead of hand-kept 10 MB / 50 MB literals (drift-proof). - speech_generate: characters() uses [...text].length (idiomatic code-point count). - core/insights.ts: tightened the ErrorEnvelope describe() union guard (identical runtime behaviour). - plugin/host.ts: removed a misleading comment on skill.list; it matches the uniform mutable() pattern now. - docs/LOCAL-ENGINE-API.md: documented the shipped /redrob/speech and /redrob/transcribe endpoints (sections 1c, 1d). Verified: bun turbo typecheck 20/20; bun install --frozen-lockfile clean; engine tool/server tests 42/42; core 6/6; work-labeller 77/77.
flxkm522
added a commit
that referenced
this pull request
Oct 12, 2026
…cs and compat tests One change on develop that both consolidates the redrob-code ENGINE work and documents + pins the on-device labelling it introduces. The Electron/desktop app and the build-off / Quality-Lab stack are the separate alpha/desktop drafts and are NOT part of this. == Engine consolidation (was seven PRs) == - #67 insights route + /v1/chat/completions (serve the OpenAI face for real; forward x-redrob-session to the Console). - #68 regenerate the JS SDK that had fallen behind the routes. - #69-#74 the media tools and endpoints: image_generate (edit / reference images), speech_generate (mp3), POST /redrob/speech and POST /redrob/transcribe, all on the engine own Redrob credential. - #79 the shared on-device labellers (route-labeller, work-labeller) as source workspace packages, consumed downstream by Cowork/Office/Design. Integration fix: the chat-completion handler reads LLMClient inside the request, so it was a per-request requirement of the embedded API that Layer.provide(serviceLayer) did not discharge, leaking as a residual requirement and breaking the untouched sdk-next caller. LLMClient is a global service, so it is now provided once via HttpRouter.provideRequest inside makeRoutes (packages/server/src/routes.ts). Lean/doc pass (behaviour-preserving): size-limit messages derive from their constants; speech_generate characters() uses [...text].length; the insights describe() union guard is tightened; a misleading plugin/host comment removed; /redrob/speech + /redrob/transcribe documented in LOCAL-ENGINE-API.md; and the httpapi route-coverage harness gained scenarios for the two /redrob/* routes. == On-device labelling: docs + compatibility (answering the CTO review) == - docs/ON-DEVICE-LABELLING.md (new): the single reference for WHY there is encoder code (we wrap pinned off-the-shelf models -- distiluse, multilingual-e5-base -- not our own encoders, for on-device privacy + one implementation across products), WHERE the tensors live (only the small trained layers are ours and in git: work-head.json 159KB, prototypes.json 232KB; base weights are hash-pinned downloads), the model-free-CI vs opt-in-eval story, and the backwards-compat model for third-party clients. Includes the pending checklist to move the e5 release asset from redrob-cowork to redrob-code (SHA pins unchanged; the url is not flipped now because a not-yet-uploaded release would 404). - httpapi-chat-completion.test.ts: two new v1-contract cases -- the newer optional fields (max_completion_tokens, reasoning_effort, user) stay accepted, and unknown request fields (a Console-style redrob block, a bogus key) are IGNORED not rejected. The second pins the exact forward/third-party-compat guarantee and fails CI if the schema rejects excess props. - test.yml: the labellers job comment now spells out that the unit suites are model-free and CI-safe, and the real ~140MB/~278MB encoders are needed ONLY by the opt-in eval/model dev commands, which stay off the PR path. Verified: bun turbo typecheck 20/20; bun install --frozen-lockfile clean; engine tool/server tests + the 7 chat-completion contract cases pass; core 6/6; work-labeller 77/77.
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 this changes
Regenerates the JS SDK (
packages/sdk/js/src/v2/gen) from the current routes, which it had fallen behind. CI doesn't check this SDK, unlikepackages/client, so nothing reported the drift.New in the SDK: the browser-request routes:
GET /api/browser/requestGET /api/session/{sessionID}/browserPOST /api/session/{sessionID}/browser/{requestID}/replyPOST /api/session/{sessionID}/browser/{requestID}/refuseAlso new: their events, and the
iconandautoInjectfields onSkillV2Info.The regeneration surfaced a type mismatch, fixed here. The SDK's generated types spell arrays mutable (
Array<string>), but core's schema spells them readonly. WithautoInject.keywordsnow in the SDK, two places stopped typechecking:src/plugin/host.tsskill.list, which now uses themutable()helper the file already uses for the agent and provider lists;src/plugin/skill.ts, which registers the built-in skills and now casts withDeepMutable, since the host decodes the source anyway.Two core tests that hand core services straight to the plugin host are typed against the plugin API.
Why
Split out of #67, so this catch-up isn't hidden in an unrelated change. It's cut from
develop, so it does not include #67's/api/insights/sessions. Whichever PR merges second regenerates once more.How it was verified
bun ./packages/sdk/js/script/build.ts: exit 0.bun typecheck --force(no turbo cache): exit 0, 18/18 tasks.@redrob-code/tuiand@redrob-code/corefailed. A plainbun typecheckhid this, because turbo replayed cached results.bun test test/config/skill.test.ts test/plugin/skill.test.ts(packages/core): 2 pass.bun test(packages/core): exit 1, 1033 pass, 3 fail. The 3 also fail ondevelophere, because this sandbox runs as root (util.flockandutil.effect-flock"unwritable lock roots", andProjectV2.resolvessh/https remotes).Anything a reviewer should be wary of
publish-sdk.yml), so SDK users get the new methods and the two new skill fields. Nothing is removed.