dsh-decision-tools: Use local Ollama for probability judgments without stuffing materials into the conversation

Preface

In DSH, when you want an agent to classify, filter, score, or “wait until some condition holds,” a common approach is repeated LLM calls where the entire log or list is stuffed into the context each time. That burns tokens and crowds the main conversation with noise. Another approach is hand-written rule scripts that are costly to maintain and hard to express semantic boundaries.

dsh-decision-tools splits judgment into two dedicated tools: in a single call it uses the local Ollama System One endpoint to output probabilities and confidence, and materials can be passed via files, globs, or raw outputs from other tools without entering your session context; when waiting is needed, monitor polls a source, observing only and not acting on your behalf.

What is this

dsh-decision-tools is a DSH community plugin maintained by Dinosaur-MC and categorized as workflow in the directory. It registers the decision and monitor tools for agents: the former makes bounded judgments on up to 64 items or 64 distinct questions in a single call; the latter samples a file, command, background job, or task events at intervals until a rubric match is hit or a timeout occurs. Judgment runs via local Ollama (/v1/systemone); the README states that the judgment itself does not send requests to cloud providers and requires no API key.

Core features

decision: one call, one mode

decision requires material and allows exactly one of the two modes below.

Batch: rubric + items (1–64 entries) + type. Each item is judged independently against the same rubric. type is choice (pick one), noul (yes/no, boolean value, with probability under probabilities.true), or score (0..N-1 scale). choice / score must provide labels via criteria.

Mixed: questions (1–64), asking different questions about the same material. Each entry includes name, type, and instructions, with optional criteria.

material supports: an inline string; { file: { path, startLine?, endLine? } }; { glob: { pattern, limit? } }; { images: [...] } or { text, images }; { tool: { name, arguments? } }. Tool outputs do not enter the context; the full text is written to material.spillPath. tool cannot be mixed with other material forms, and it rejects the plugin’s own tools. Images must be PNG/JPEG/WebP within the workspace (1–8 images, each ≤16 MiB, total raw ≤24 MiB) and require a vision-capable model (e.g., clef / clef-flash); the default tev1 / nimble return unsupported for vision.

Optional parameters include depth (quick / normal / deep) and model (pin the model and disable capacity selection and escalation). The return structure contains results[], coverage (truncation, failures, etc.), cost (model, tokens, duration, etc.), and notes (the first line often explains model selection). confidence indicates concentration, not accuracy; when confidence is low, inspect probabilities.

Key design points (README Why): the rubric is sent only once and up to 64 items are judged per call, avoiding the “one call per item” anti-pattern; materials and tool outputs can remain on the workspace side, leaving the main conversation to read only the answers.

monitor: poll until the condition holds

monitor samples a single source at intervalMs (default 5000), asking with the same rubric each time and accumulating hits. With mode set to once, it returns after reaching countThreshold or timeoutMs (default 120000); in continuous mode it runs until the deadline and returns the cumulative count. The plugin does not kill processes, retry, or cancel any external tasks; background monitors can stream progress and emit a one-line notification when triggered.

source types include: job (background task output), file, glob, command (re-runs argv via the upstream pipeline), and events (task event ring buffer). description (for identification) is also required. type is currently noul; hitThreshold defaults to 0.5; background and notify enable background execution and notifications (e.g., notify: "inbox" in Quick start).

Environment and dependencies

  • A DSH desktop app that can enable this plugin (see installation).
  • Local Ollama providing the decision model; default is tev1:0.8b, overridable per call with model.
  • package.json requires Node ^22.19.0 || >=24.0.0, and DSH >=0.2.0-rc.2.
  • Image judgment requires a vision model; no API key.

Default configuration snapshot: baseUrl = http://localhost:11434, defaultModel = tev1:0.8b, and a four-tier ladder; these can be adjusted via defaultModel, baseUrl, and ladder: [{ model, numCtx }]. The repo provides node scripts/list-models.mjs to view installed models and a paste-ready ladder.

Installation and enabling

After the npm package is published, install under the web profile:

dsh plugin --profile web add dsh-decision-tools

When developing from a local checkout, link it to the profile:

dsh plugin --profile web add link:/absolute/path/to/dsh-decision-tools

Confirm the tools are registered:

cordis_inspect_query(platform="host", provider="Tool", method="listTools")

The plugin registers a companion skill decision-usage, loaded on demand to document each parameter. The current package version is 0.4.0, MIT licensed.

Typical usage

The examples below come from the project README Quick start and can be used directly as reference shapes for tool call parameters.

1) Filter a list with the same rubric (batch / noul)

{ "material": "<the list or its context>", "rubric": "Is this a bug report?",
  "items": ["app crashes on save", "please add dark mode"], "type": "noul" }

2) Ask multiple different questions about a single file (mixed)

{ "material": { "file": { "path": "build.log", "startLine": 1, "endLine": 200 } },
  "questions": [
    { "name": "ok", "type": "noul", "instructions": "Did the build succeed?" },
    { "name": "why", "type": "choice", "instructions": "What failed?",
      "criteria": { "compile": "compile error", "test": "a test failed", "env": "missing dependency" } }
  ] }

3) Judge outputs from other tools without reading them into the conversation

{ "material": { "tool": { "name": "git_bash", "arguments": { "command": "npm test" } } },
  "rubric": "Did the test suite pass?", "items": ["the test suite output"], "type": "noul" }

4) Screenshot judgment (requires a vision model)

{ "material": { "images": ["screenshots/checkout-error.png"] },
  "model": "clef-flash:latest",
  "questions": [ { "name": "has_error", "type": "noul", "instructions": "Does this screenshot show an error state?" } ] }

5) Wait in the background for a job to finish and receive a notification

{ "source": { "kind": "job", "id": "<jobId>" },
  "rubric": "Did the job finish successfully?", "background": true, "notify": "inbox" }

Use cases and caveats

Suitable for scenarios that need local, repeatable semantic judgment within DSH workflows: ticket classification, request routing, candidate ranking, determining whether logs indicate failure, whether a build succeeded, and so on. monitor fits flows that “wait until a condition holds and then notify”—waiting for a build to finish, for a particular log line to appear, or for a task to fail; it only observes and will not kill tasks or alter system state on your behalf.

Before use, prepare Ollama and a suitable model on the local machine; do not mix default availability between vision and text-only models. The plugin runs with the current DSH process privileges: a command-type source will re-run host commands, and tool material will call other tools—it is recommended to review the repo source and the MIT license before installation to ensure compliance with your security policies.

The DSH ecosystem emphasizes “everything is a plugin”; the community directory skillhub.cn is an independent site and has no official affiliation with DeepSeek or High-Flyer. This article introduces the community-maintained Dinosaur-MC/dsh-decision-tools.

Conclusion

dsh-decision-tools consolidates “want probabilities, not long-form text” judgment and “poll until hit” waiting into two DSH tools that interface with Ollama System One, keeping raw materials on the workspace side as much as possible. You can continue exploring via the directory page and source:

  • Directory page: https://www.skillhub.cn/plugins/Dinosaur-MC/dsh-decision-tools
  • GitHub: https://github.com/Dinosaur-MC/dsh-decision-tools
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye