Skip to content

Integrate Triton-RISCV agent backend and workbench with Harness - #2

Merged
shirohasuki merged 3 commits into
RuyiAI-Stack:mainfrom
ada-cl25:triton-riscv-agent-plugin-v2
Oct 8, 2026
Merged

shirohasuki merged 3 commits into
RuyiAI-Stack:mainfrom
ada-cl25:triton-riscv-agent-plugin-v2

Conversation

@ada-cl25

Copy link
Copy Markdown
Contributor

Summary

Migrate the existing Triton-RISCV Agent into an installable Harness plugin under packages/dsh-triton-riscv/. This PR includes the full plugin integration, not only a cleanup.

  • Reuse the native Harness agent loop with MCP tools for operator discovery, development, validation, diagnosis, and repair.
  • Integrate native approvals, session isolation, source fingerprint checks, and acceptance-test protection. Source changes invalidate previous validation results.
  • Preserve RAG, evidence memory, and context management. Defaults remain legacy/classic with embeddings disabled.
  • Preserve the React/FastAPI workbench and provide a native sidebar entry. The workbench starts separately, and the two interfaces do not share sessions.
  • Remove the obsolete LangGraph experiment and its dedicated dependencies; consolidate documentation, installation scripts, and packaging checks.

Repository-level changes are limited to the necessary installation, configuration, and check integration. Other plugins' business logic is unchanged. Credentials, databases, logs, virtual environments, and local host copies are excluded.

Related Issue

Follow-up to #1 and its review comments.

Addresses the previous feedback by separating prompt responsibilities, clarifying MCP installation scope, using config.yml, passing explicit configuration parameters, and organizing Vitest coverage around inputs, outputs, and state.

See packages/dsh-triton-riscv/REVIEW_FOLLOWUP.md for details. This PR does not automatically close the earlier PR.

Validation

Completed local checks:

  • Python: 269 tests passed, plus 5 passing subtests.
  • Plugin Vitest: 33 passed; frontend Vitest: 8 passed.
  • Pinned real Harness + stdio MCP integration: 5 passed.
  • TypeScript/Vite build, npm package audit, Python wheel build, and temporary-install smoke checks passed.
  • Prettier, source text checks, and git diff --check passed.

Integration tests use temporary fixtures and scripted model responses. They do not represent a fresh live-model or RISC-V numerical acceptance run.

The repository-level pnpm test:unit run passed 59 tests, but the agent-observer suite could not load because the local @deepseek-ai/dsh-tools dependency was missing. That suite was neither modified nor skipped. Full repository CI is not yet certified.

Workbench Demo

Requires Node >=22.19, Python >=3.10, and an existing operator checkout:

cd packages/dsh-triton-riscv
npm run setup
export TRITON_RISCV_REPO_ROOT=/absolute/path/to/triton-riscv
npm run workbench

Open http://127.0.0.1:8765. Setup installs dependencies on the user's machine. Native Harness installation and configuration are documented in the plugin README. Live model calls and remote validation require the user's API credentials, SSH access, and RISC-V toolchain.

This is a trusted local development tool, not a hardened public multi-user service. Plugin approvals do not replace host sandboxing.

Checklist

  • Changes are limited to the plugin and necessary integration files.
  • Previous review feedback has been addressed in the implementation.
  • Applicable tests and documentation have been added or updated.
  • Plugin-level tests, builds, formatting, and packaging checks have been run.
  • Full repository installation and CI pass; the current local dependency limitation is documented.
  • Compatibility, security, and validation boundaries are documented.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documents written by AI do not need to be added to the repository. Documents are intended for human readers; the AI will analyse the code itself and does not require documentation.

Comment thread config.yml.example Outdated
- id: triton-riscv-native-host
config:
enabled: false
repoRoot: '' # Absolute operator checkout path

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't suggest writing repoRoot: before excustion. What if we have more than one working repository?

Comment thread packages/dsh-triton-riscv/lib/config.js Outdated
const tokenBudget = e.tokenBudget ?? null
if (tokenBudget !== null && (!Number.isInteger(tokenBudget) || tokenBudget <= 0))
throw new Error('embedding.tokenBudget must be a positive integer')
const env = {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are rather too many environment variables; to be honest, they’re difficult to maintain.

@shirohasuki

Copy link
Copy Markdown
Collaborator

Thanks for your time. I've left some comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants