DSH HUB
首页插件商店插件包社区排行榜资源发布指南
插件源码
返回插件目录

Pondsi /

Pondsi/dsh-diwen

仅 Topic 仓库

迪文(Diwen)dsh 插件:模型自行判断何时使用;AI↔AI 通讯(本体↔子代理、多 agent、机械化批处理)强制走迪文概念坐标。开源 CC BY 4.0,署名即用(Pondsi)。

★ 0 Stars0 Forks0 IssuesN/A 社区评分0 已确认安装
查看 GitHub项目主页
README来源: main@033819eb

dsh-diwen — Diwen (迪文) Concept Coordinate System

What Diwen is: a communication language for machines

Diwen is designed for machine-to-machine communication — a machine-verifiable concept coordinate system for agent-to-agent exchange, the deterministic content in natural-language↔machine interaction, and machine-to-machine interaction.

Natural language is ambiguous and drifts; Diwen anchors meaning to discrete concept coordinates (S3a semantic field × S3b construction), so machines can align precisely, and each concept renders back to a unique natural-language definition. Typical uses:

  • Multi-agent collaboration — agents exchange meaning via concept coordinates, avoiding misunderstandings caused by natural-language ambiguity.
  • Sub-agent communication — a lead agent and its sub-agents exchange tasks and results as deterministic concepts.
  • Deterministic knowledge-base content — knowledge anchored to machine-verifiable concepts rather than fuzzy text.
  • Context summaries / prompts — compressed meaning carried as concept coordinates, stable across turns and models.

Diwen is not a translator and does not generate natural language; it is a verifiable semantic intermediate representation above natural language.

中文概要见 说明.md。

Status: Chinese is deliverable

The Chinese part is deliverable and usable:

Path Concept accuracy (measured, holdout / real domain)
Cloud deepseek (enhanced) 0.9933 (enhanced holdout reaches 1.0)
Local decision d3:4b (enhanced + calibrated) 0.9636 → curated 0.9828
Local chat qwen3:8b (enhanced) 0.9727
Cross-family ensemble 0.9636
Deterministic mechanical (lower bound, not the production path) 0.5173

Coverage expansion (13 senses + 4 new concepts: convene 3047 / severe 3048 / firm 3049 / issue_document 3050) is verified on three paths: cloud cascade 5/5, local decision d3:4b 8/8 (confidence 94–99%), and local chat qwen3:8b. The curated holdout re-test after expansion is 0.9828 (114/116, round163), a slight improvement over 0.9818 with no regression.

Axiom ① (Diwen → unique Chinese definition) is 100% deterministic. semanticApproval=false always holds: passing mechanical validation ≠ semantically correct ≠ human-approved. When no concept exists, the original text is preserved verbatim (Axiom ④) — nothing is fabricated.

Roadmap

  1. Continuously improve Chinese usability (coverage expansion, real-domain generalization).
  2. Complete development of 27 languages, then support more.
  3. Post-hoc, sense-level concept sharing only where coordinates are provably identical (default: do NOT merge; most pairs stay independent and are linked, not merged). Eliminate natural-language partitions as a machine-interoperation overlay — not by deleting language diversity.
  4. Machine-expand concepts and semantics for more natural languages.
  5. Continuously refine humanity's existing concepts and semantics.
  6. Machine-expand concepts that do not yet exist in natural language.
  7. Machine-refine concepts describing the physical world.
  8. Machine-refine abstract concepts describing the world.
  9. Machine-abstract higher-density concepts, evolving structures better suited to each concept.
  10. Continuously improve Diwen so it can clearly describe all things in the world.

Quick start

This repo is Diwen's open-core public distribution: open loader shell + closed core (minified bundle) + encrypted concept data (AES-256-GCM). Clone, then npm install to use offline.

npm package

Published on npm (current diwen@6.3.0) — install directly:

npm install diwen
import { mapChinese, describeConcept } from 'diwen';

// Natural language → Diwen fill contract (Axiom ②: model sense selection; Axiom ④: no concept → verbatim)
const r = await mapChinese('我吃饭', { model: 'deterministic' }); // 'auto'|'decision'|'off'
console.log(r.contract.status, r.contract.words, r.semanticApproval); // semanticApproval always false

// Diwen → unique Chinese definition (Axiom ①)
console.log(describeConcept(1223).lemma_zh); // 折

Or use from this repo: cd packages/diwen && npm install, then import ... from './index.mjs'.

  • model:'decision' uses a local ollama decision model (d3:4b etc.) + calibrated abstention; enhance:true enables the enhancement layer.
  • The runtime segmentation dependency @node-rs/jieba is installed automatically.

MCP server (zero third-party protocol dependency; core via npm diwen)

npm install diwen-mcp
npx diwen-mcp        # or repo-local: node packages/diwen-mcp/server.mjs

Configure your MCP client with command=node, args=[<absolute path>/diwen-mcp/server.mjs]; 3 tools: diwen_map{text,model?,enhance?}, diwen_describe{id}, diwen_select{cases,mode?,weights?} (cloud cascade/ensemble sense selection; requires DIWEN_KEYS_FILE). Self-test: node packages/diwen-mcp/selftest.mjs (45/45).

DeepSeek Harness (dsh) plugin

Open Cordis shell + depends on npm diwen core + deterministic force layer (diwen-dsh@0.3.0): registers diwen_map/diwen_describe + skill diwen. dsh plugin --profile <p> add diwen-dsh (or a local path). Force-layer seams (systemPrompt required instruction / pre-step input projection / post-execute result projection) each have a settings toggle (forceSystemPrompt/forcePreStep/forcePostExecute, default on, with descriptions). Self-test: node packages/diwen-dsh/selftest.mjs. See docs/DSH-FORCE-USAGE.md.

Manuals

  • docs/USAGE-MANUAL.md: non-technical usage manual (install, call, license, attribution).
  • docs/PACKAGE-USAGE.md: npm / MCP / dsh integration guide.
  • 说明.md: Chinese overview.

Decision-model choice capacity (advice + error feedback)

A decision model's --choice option limit varies per model and is not fixed. Measured hard limit is 255 for all (ollama interface); effective discrimination limits: tev1:0.8b=32 / d3:4b=128 / clef-flash=255 / clef=128. You decide which models to use; Diwen does not forbid any: checkModelCapacity gives advisory hints; on a runtime error decisionSelect uses classifyModelError to report "this is a model-capacity issue (e.g. too many options) — switch model or reduce candidates".

Repository layout

packages/diwen/       npm package: index.mjs/env.cjs open shell + dist/core.mjs closed core + dist/data.enc encrypted data
packages/diwen-mcp/   MCP server (open shell, reuses closed core)
packages/diwen-dsh/   dsh plugin (open Cordis shell + npm diwen core + force layer with settings toggles)
docs/USAGE-MANUAL.md  non-technical usage manual
docs/PACKAGE-USAGE.md integration guide
docs/DSH-FORCE-USAGE.md  dsh force layer + settings toggles
说明.md               Chinese overview
SPONSORS.md           sponsor page
sponsors/             donation QR images
LICENSE               license

License

Commercial use permitted (free, no separate authorization), no redistribution, attribution required: credit Diwen / 迪文 + author Pondsi + repository link. Full terms in LICENSE.

Support

If Diwen helps you, consider sponsoring — see SPONSORS.md. Donations buy no extra features; everything stays free.

Limitations

  • Currently only Chinese is deliverable; other languages are on the roadmap (Axiom ⑤: language-independent mapping, no pivot).
  • Coverage is not 100% (by Axiom ④ design); words without a concept are preserved verbatim, never fabricated.

Author: Pondsi · https://github.com/Pondsi/dsh-diwen

—/ 5

暂无评分

需要先验证清单

Commit 033819eb50ad

社区评论

还没有评论,来写第一条。

DSH HUB

社区维护的 DSH 插件索引。不是 GitHub 或 DeepSeek AI 的官方产品。

社区资源API关于