[SUPERSEDED] Add parallel DeepSeek Harness implementation #125

Closed
lost-rob0t wants to merge 62 commits from agent/124-deepseek-harness-prolog into main
lost-rob0t commented 2026-08-19 14:56:07 +00:00 (Migrated from github.com)

Part of #124.

What changed

Adds DeepSeek Harness as a parallel GUI/headless substrate for PrologAgent while keeping Prolog-RLM authoritative.

  • pins deepseek-ai/deepseek-harness at 141eb6fef83422698aef7a981029e843e8161534 (dsh@0.1.0-rc.8);
  • follows upstream pnpm@11.7.0 + build:official;
  • builds in a standalone local DSH checkout so DeepSeek's normal Lefthook postinstall does not collide with submodule Git metadata;
  • exposes pnpm run build, pnpm run dev, pnpm run start, and pnpm run headless -- "task" from the repository root;
  • adds a Nix development shell with Node 24, Corepack/pnpm, SWI-Prolog, git, pkg-config, and tree-sitter;
  • provides DeepSeek Web GUI and headless execution over the same Prolog-backed Cordis AgentFactory;
  • routes canonical turns, provider/model selection, context, tools, effects, permissions, persistence, cancellation, and lossless history through Prolog-RLM;
  • keeps Web-required DSH registries/services as transport/projection infrastructure while disabling stock LLM providers, agent loop, tool executors, compaction, subagent drivers, and workflow drivers;
  • hides GUI controls that still target disabled DSH semantics.

CI/CD fixes

  • deepseek-harness.yml installs pnpm@11.7.0 explicitly with pnpm/action-setup, verifies pnpm --version, and uses pnpm caching only after pnpm exists;
  • deterministic ci.yml checks out recursive submodules because the Harness profile tests inspect the pinned upstream bundle manifests;
  • fixed the SWI-Prolog meta-call compile failure in rlm_spec_workflow.pl by extracting Config.source_refresher before call/6;
  • CI exercises the public pnpm commands rather than requiring callers to know the helper scripts in bin/.

Runtime invariant

DeepSeek Harness owns presentation, host transport, browser/headless entrypoints, Agent/Session interfaces, and event projection. Prolog-RLM owns agent semantics. GUI and headless converge on the same Prolog session/turn authority and fail closed if the bridge is unavailable.

“Infinite chat” means the canonical transcript is retained losslessly and is never replaced by a summary. Provider requests receive a bounded working projection while omitted history remains available through RLM context/search/slice APIs.

Development

On NixOS:

nix develop
pnpm --version
pnpm run build
pnpm run dev

With an existing Node/Corepack installation, a user-writable pnpm shim can instead be installed once with:

mkdir -p "$HOME/.local/bin"
corepack enable pnpm --install-directory "$HOME/.local/bin"
hash -r
pnpm --version

Then use:

pnpm run build
pnpm run dev
pnpm run start
pnpm run headless -- "Inspect this project."

Status

The original submodule Lefthook failure is fixed by the standalone build checkout. The supplied NixOS build subsequently completed the host build and all visible client bundles but exited 1 at the end of upstream build:lib:client without an underlying diagnostic, before build:web began. The log shows even the final large client runtime bundle reporting Build complete immediately before the bare pnpm lifecycle failure, so no unsupported cause is being guessed.

This PR remains draft until the exact final head passes the standalone build, both runtime surfaces, full repository suite, and reconciliation with current main.

Part of #124. ## What changed Adds DeepSeek Harness as a parallel GUI/headless substrate for PrologAgent while keeping Prolog-RLM authoritative. - pins `deepseek-ai/deepseek-harness` at `141eb6fef83422698aef7a981029e843e8161534` (`dsh@0.1.0-rc.8`); - follows upstream `pnpm@11.7.0` + `build:official`; - builds in a standalone local DSH checkout so DeepSeek's normal Lefthook postinstall does not collide with submodule Git metadata; - exposes `pnpm run build`, `pnpm run dev`, `pnpm run start`, and `pnpm run headless -- "task"` from the repository root; - adds a Nix development shell with Node 24, Corepack/pnpm, SWI-Prolog, git, pkg-config, and tree-sitter; - provides DeepSeek Web GUI and headless execution over the same Prolog-backed Cordis `AgentFactory`; - routes canonical turns, provider/model selection, context, tools, effects, permissions, persistence, cancellation, and lossless history through Prolog-RLM; - keeps Web-required DSH registries/services as transport/projection infrastructure while disabling stock LLM providers, agent loop, tool executors, compaction, subagent drivers, and workflow drivers; - hides GUI controls that still target disabled DSH semantics. ## CI/CD fixes - `deepseek-harness.yml` installs `pnpm@11.7.0` explicitly with `pnpm/action-setup`, verifies `pnpm --version`, and uses pnpm caching only after pnpm exists; - deterministic `ci.yml` checks out recursive submodules because the Harness profile tests inspect the pinned upstream bundle manifests; - fixed the SWI-Prolog meta-call compile failure in `rlm_spec_workflow.pl` by extracting `Config.source_refresher` before `call/6`; - CI exercises the public pnpm commands rather than requiring callers to know the helper scripts in `bin/`. ## Runtime invariant DeepSeek Harness owns presentation, host transport, browser/headless entrypoints, Agent/Session interfaces, and event projection. Prolog-RLM owns agent semantics. GUI and headless converge on the same Prolog session/turn authority and fail closed if the bridge is unavailable. “Infinite chat” means the canonical transcript is retained losslessly and is never replaced by a summary. Provider requests receive a bounded working projection while omitted history remains available through RLM context/search/slice APIs. ## Development On NixOS: ```sh nix develop pnpm --version pnpm run build pnpm run dev ``` With an existing Node/Corepack installation, a user-writable pnpm shim can instead be installed once with: ```sh mkdir -p "$HOME/.local/bin" corepack enable pnpm --install-directory "$HOME/.local/bin" hash -r pnpm --version ``` Then use: ```sh pnpm run build pnpm run dev pnpm run start pnpm run headless -- "Inspect this project." ``` ## Status The original submodule Lefthook failure is fixed by the standalone build checkout. The supplied NixOS build subsequently completed the host build and all visible client bundles but exited 1 at the end of upstream `build:lib:client` without an underlying diagnostic, before `build:web` began. The log shows even the final large client runtime bundle reporting `Build complete` immediately before the bare pnpm lifecycle failure, so no unsupported cause is being guessed. This PR remains draft until the exact final head passes the standalone build, both runtime surfaces, full repository suite, and reconciliation with current `main`.
lost-rob0t commented 2026-08-25 00:18:27 +00:00 (Migrated from github.com)

RLM permanent-context dependency

This harness PR must conform to the approved RLM context design in #183: https://github.com/lost-rob0t/prolog-rlm/issues/183

For any DeepSeek Harness GUI/headless turn that is executing as part of an RLM/Agent run, the harness must not bypass the canonical provider-context path. Permanent RLM operating skills/instructions selected by the Prolog runtime must propagate to the actual provider request, including recursive/subagent/retry/repair calls, while capabilities/authority remain independently narrowed.

This does not make DeepSeek Harness the owner of skill selection or permanent-context policy; it remains presentation/transport over the Prolog-owned runtime.

Workflow gate

Normal ARARD flow is now the default. Auto-RAGE is disabled as a workflow default; RAGE may only run against an explicitly approved design. If this PR needs to alter the #183 context architecture, return to ARARD/design approval first rather than expanding scope during a RAGE loop.

## RLM permanent-context dependency This harness PR must conform to the approved RLM context design in **#183**: https://github.com/lost-rob0t/prolog-rlm/issues/183 For any DeepSeek Harness GUI/headless turn that is executing as part of an RLM/Agent run, the harness must not bypass the canonical provider-context path. Permanent RLM operating skills/instructions selected by the Prolog runtime must propagate to the actual provider request, including recursive/subagent/retry/repair calls, while capabilities/authority remain independently narrowed. This does **not** make DeepSeek Harness the owner of skill selection or permanent-context policy; it remains presentation/transport over the Prolog-owned runtime. ### Workflow gate Normal **ARARD** flow is now the default. **Auto-RAGE is disabled as a workflow default; RAGE may only run against an explicitly approved design.** If this PR needs to alter the #183 context architecture, return to ARARD/design approval first rather than expanding scope during a RAGE loop.
lost-rob0t commented 2026-08-25 02:13:16 +00:00 (Migrated from github.com)

ADARD gate: plugin-only core redesign

The current implementation must now be reconciled against #184: https://github.com/lost-rob0t/prolog-rlm/issues/184

#184 is an AWAITING APPROVAL design candidate, not authorization to RAGE yet.

Key findings affecting this PR:

  • upstream Harness supports replacing the agent loop through an out-of-tree AgentFactory; core edits are not required;
  • the official stock Web and headless surfaces should be reused rather than replaced;
  • the stock headless runner already drives ctx.agents, so the custom headless runner is not justified for the core slice;
  • the current broad Web/headless disable lists conflict with the requested same-upstream-UX direction and are not approved as-is;
  • the private deepseek-harness.json settings authority conflicts with #131 / PR #132 and must not remain a second configuration owner;
  • the adapter should use the canonical managed Prolog conversation/RLM facade rather than freeze to the lower-level rlm_conversation:conversation_turn/4 path;
  • ordinary core development/runtime should not require rebuilding the entire upstream Harness monorepo when the official pinned packaged distribution/profile/plugin path is sufficient;
  • PR #125 is pinned to 0.1.0-rc.8, while upstream has released 0.1.1-rc.2; the exact revised pin is an explicit approval item, not an automatic upgrade.

Do not expand or rewrite this PR under RAGE until #184 is explicitly approved. Normal ARARD/ADARD gating applies.

## ADARD gate: plugin-only core redesign The current implementation must now be reconciled against **#184**: https://github.com/lost-rob0t/prolog-rlm/issues/184 #184 is an **AWAITING APPROVAL** design candidate, not authorization to RAGE yet. Key findings affecting this PR: - upstream Harness supports replacing the agent loop through an out-of-tree `AgentFactory`; core edits are not required; - the official stock Web and headless surfaces should be reused rather than replaced; - the stock headless runner already drives `ctx.agents`, so the custom headless runner is not justified for the core slice; - the current broad Web/headless disable lists conflict with the requested same-upstream-UX direction and are not approved as-is; - the private `deepseek-harness.json` settings authority conflicts with #131 / PR #132 and must not remain a second configuration owner; - the adapter should use the canonical managed Prolog conversation/RLM facade rather than freeze to the lower-level `rlm_conversation:conversation_turn/4` path; - ordinary core development/runtime should not require rebuilding the entire upstream Harness monorepo when the official pinned packaged distribution/profile/plugin path is sufficient; - PR #125 is pinned to `0.1.0-rc.8`, while upstream has released `0.1.1-rc.2`; the exact revised pin is an explicit approval item, not an automatic upgrade. Do not expand or rewrite this PR under RAGE until #184 is explicitly approved. Normal ARARD/ADARD gating applies.
lost-rob0t commented 2026-08-25 03:10:49 +00:00 (Migrated from github.com)

Closing this draft as obsolete implementation scaffolding. The approved architecture is now #184, and #186 explicitly cleans out the old harness paths before the new plugin-only implementation begins. Do not reuse this branch as the implementation base.

Closing this draft as obsolete implementation scaffolding. The approved architecture is now #184, and #186 explicitly cleans out the old harness paths before the new plugin-only implementation begins. Do not reuse this branch as the implementation base.
nsaspy changed title from WIP: [SUPERSEDED] Add parallel DeepSeek Harness implementation to [SUPERSEDED] Add parallel DeepSeek Harness implementation 2026-08-27 20:02:07 +00:00
Some checks failed
CI / Deterministic unit and load checks (push) Has been cancelled
CI / REAL OpenRouter integration (push) Has been cancelled
DeepSeek Harness Prolog bridge / AgentProlog GUI, headless, and real SWI bridge (push) Has been cancelled
Paid OpenRouter / Pinned paid OpenRouter integration (push) Has been cancelled
Tree-sitter FFI / Direct SWI-Prolog Tree-sitter FFI (push) Has been cancelled

Pull request closed

Sign in to join this conversation.
No description provided.