OpenViking
volcengine
Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:TtTRz/dsh-gatedflow
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Gated, durable, human-in-the-loop workflows for DeepSeek Harness — gates as control flow: "must verify / confirm / review" rules live in the engine, not in prompts, so no agent can skip them under load.
Zero-mutation replan · gates as control flow · declarative subflows. The engine core contains no LLM and no orchestrator dependencies.
| Package | Description | Dependencies |
|---|---|---|
@gatedflow/engine |
Framework-agnostic engine core: validation, expansion, deterministic conditions, the workflow state machine. | none |
@gatedflow/dsh |
DeepSeek Harness adapter: gf_* tools, the gate panel UI, the anti-bypass guard, filesystem persistence. |
@gatedflow/engine + DSH services |
user task ──► agent composes atomics (Ref/Inline) ──► gf_start
│
path ① single Ref ──────────────┐ │
path ② multi/inline ── pre_start_gate (human approves the plan)
▼
shell (command + expect) ─ interrupt (human gate via panel)
handoff (delegate back to the agent) ─ conditional (structured fields)
▼
done (auto)
interrupt steps pause the engine; the human
approves or rejects through a panel card in the conversation. The model
agent has no approve/reject channel — gf_advance rejects them (guardpause_on_failure → pause → human repairs → retry (prior outputs kept);
otherwise abort → failed → human reviews → new workflow.==, !=, >=, <=, >, <, contains, &&, ||, !).npm install
npm run check # build + typecheck + unit tests
The adapter registers seven tools. The agent composes a plan, then:
gf_start({ atomics: [
{ name: 'gf-verify-demo', params: { note: 'hello' } },
{ type: 'shell', params: { command: 'echo done', expect: 'true' } },
]})
pre_start_gate: the engine pauses
and the plan appears as a panel card above the composer. Click ✓ Approve
to proceed or ✕ Reject to abort.gf_advance(handoff_complete, result).pause_on_failure shows an Awaiting retry card;
after the human repairs the environment,
gf_advance(decision: 'retry') re-runs only that step.Drop a JSON file into a subflows directory — the session workspace's
.gatedflow/subflows (scanned automatically, takes precedence on name
conflicts) or the shared root (~/.gatedflow/subflows by default,
GATEDFLOW_SUBFLOWS_DIR to override) — then call gf_reload_subflows
(hot-loaded, no restart):
{
"name": "release",
"description": "build with objective verification, human review, then publish",
"keywords": ["release", "build", "review"],
"params": { "branch": { "required": true } },
"steps": [
{ "id": "build", "type": "shell", "params": { "command": "npm run build", "expect": "test -f dist/index.js", "max_retries": 1, "pause_on_failure": true }, "on_success": "review", "on_failure": "abort" },
{ "id": "review", "type": "interrupt", "params": { "message": "Publish ${branch}?" }, "on_approve": "publish", "on_reject": "abort" },
{ "id": "publish", "type": "shell", "params": { "command": "npm publish" }, "on_success": "next", "on_failure": "abort" }
]
}
See examples/subflows/ for more.
docs/DESIGN.md — root constraints, step model, routing,
data references, gate protocol, persistence and anti-stuck design, with
the decision record.docs/INTEGRATION.md — mounting the adapter in a
DSH composition, environment variables, tool reference, and the agent
skill guidance.npm install
npm run test # unit tests (vitest, engine + adapter)
npm run typecheck # strict TS across both packages
npm run build # tsc output for engine + dsh
The engine package is deliberately dependency-free and framework-agnostic;
the DSH adapter is a thin, typed wiring layer over the harness services
(fs, shell, tools, timer, subagents; the gateway row additionally
consumes webServer), configurable through a
schemastery Config schema exactly like the official DSH plugins. See the
package README for the plugin contract.
Contributions welcome — see CONTRIBUTING.md.
v0.1 ships the engine core plus the DSH adapter with shell / interrupt /
handoff / conditional / agent_delegate / agent_resume steps, the
gate panel, the anti-bypass guard, gate deadlines, /stop-safe interruption
semantics, hot-reloadable subflows, bounded-tail audit logs, and
restore-on-reference persistence. Roadmap: YAML-native subflow authoring
improvements and a solidify flow that turns recurring dynamic plans into
named presets.
MIT — see LICENSE.
This project is an independent, native implementation of the gatedflow philosophy for DeepSeek Harness. It shares the vocabulary (atomics, subflows, pre_start_gate, zero-mutation replan, decision records) but re-implements everything on harness-native primitives — the engine core is written from scratch in TypeScript with no external dependencies.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: workflow。