@foldbun/dsh-stack 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/README.md +63 -2
- package/cordis.patch.yml +26 -0
- package/launch.mjs +10 -0
- package/package.json +38 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 — 2026-11-23
|
|
4
|
+
|
|
5
|
+
- First version: a DeepSeek Harness bundle that mounts the Foldbun Stack MCP server (`@foldbun/stack-mcp` 0.1.0) so DSH gains `stack_ocr`, `stack_segment`, `stack_remove_background`, `stack_parse_document`, `stack_embed`, `stack_usage` and `stack_register_agent_project`.
|
|
6
|
+
- Tested against `@deepseek-ai/dsh` 0.2.2-rc.5.
|
|
7
|
+
- Also exposes the new server tools `stack_batch`, `stack_product_photo`, `stack_annotate`, `stack_document_to_markdown` and `stack_image_search`; README notes that the tools need no shell (not tested against every DSH preset).
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Foldbun Technologies Limited
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,64 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @foldbun/dsh-stack
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A DeepSeek Harness (DSH) bundle that adds [Foldbun Stack](https://stack.foldbun.com/) image tools to your harness: read text in images (OCR), parse document pages, find and outline objects (SAM 3), cut out subjects (background removal) and compute embeddings.
|
|
4
|
+
|
|
5
|
+
It is a thin bundle. All it does is mount the [Foldbun Stack MCP server](https://www.npmjs.com/package/@foldbun/stack-mcp) (`@foldbun/stack-mcp`) through DSH's MCP client, passing your Foldbun credentials from the environment. The model sees these tools:
|
|
6
|
+
|
|
7
|
+
| Tool | Use |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `mcp__foldbun-stack__stack_ocr` | Read text in a photo, screenshot or crop (good with mixed Chinese, Japanese and English) |
|
|
10
|
+
| `mcp__foldbun-stack__stack_segment` | Outline objects from text prompts, exemplar boxes or points; returns boxes, scores, polygons and an overlay |
|
|
11
|
+
| `mcp__foldbun-stack__stack_remove_background` | Cut the main subject out as a transparent PNG or WebP |
|
|
12
|
+
| `mcp__foldbun-stack__stack_parse_document` | One document page image to Markdown (tables, formulas) plus layout blocks |
|
|
13
|
+
| `mcp__foldbun-stack__stack_embed` | Image or text embeddings (SigLIP 2, DINOv3) written to a file |
|
|
14
|
+
| `mcp__foldbun-stack__stack_batch` | One operation over a whole folder of images (OCR, background removal, segmentation, document parsing, embeddings), resumable, with a CSV summary |
|
|
15
|
+
| `mcp__foldbun-stack__stack_product_photo` | Cut out a product and place it on white, a colour or a transparent canvas |
|
|
16
|
+
| `mcp__foldbun-stack__stack_annotate` | Find objects by name and draw labelled boxes on the image |
|
|
17
|
+
| `mcp__foldbun-stack__stack_document_to_markdown` | Document page images to a Markdown file (needs an API key or a claimed project) |
|
|
18
|
+
| `mcp__foldbun-stack__stack_image_search` | Index a folder of images, then search it by text or by example image |
|
|
19
|
+
| `mcp__foldbun-stack__stack_usage` | Show credential, limits or balance and prices (free) |
|
|
20
|
+
| `mcp__foldbun-stack__stack_register_agent_project` | Offered only while no credential is set; lets an agent register an evaluation project |
|
|
21
|
+
|
|
22
|
+
See the [MCP server README](https://www.npmjs.com/package/@foldbun/stack-mcp) for inputs, outputs, limits and the data-handling note.
|
|
23
|
+
|
|
24
|
+
## Works without a shell
|
|
25
|
+
|
|
26
|
+
The tools do not depend on a shell or on the model reading local files. Images can be passed as a local path, an `http(s)` URL (the server downloads it, with safeguards against reaching internal addresses), a `data:` URL or base64; results come back as text, files and, for pictures, an inline image. An agent whose only tool is code execution (such as the `ptc` preset) or a chat-style agent without bash can therefore call them directly. This follows from the tool design; the bundle has not been run against every DSH preset, so check your own preset.
|
|
27
|
+
|
|
28
|
+
## Pairs with a vision-language model
|
|
29
|
+
|
|
30
|
+
Foldbun Stack does not describe pictures or answer open questions about them. It returns exact things: the characters in a screenshot, the pixel outline of an object, a clean cutout. A vision-language model (VLM) plugin is good at the other half: understanding what an image shows, judging a layout, answering questions. The two work well together. A typical flow is to let the VLM decide what matters in an image, then call Foldbun Stack to read its text exactly or to outline the object the VLM pointed at. Install whichever VLM plugin you prefer; this bundle does not depend on one and does not replace one.
|
|
31
|
+
|
|
32
|
+
## Install
|
|
33
|
+
|
|
34
|
+
Requires Node.js 24.9 or newer and DSH `>=0.2.2-rc.1 <0.3.0-0`.
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
dsh plugin --profile <profile> add @foldbun/dsh-stack
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
This adds the package to the profile and to its `dsh.profile.bundles`.
|
|
41
|
+
|
|
42
|
+
Then give it a credential in the environment you start DSH from. Pick one:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
export FOLDBUN_API_KEY=fbs_... # paid; create at https://stack.foldbun.com/console/keys
|
|
46
|
+
export FOLDBUN_PROJECT_ID=fbp_... # free tier of a project
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
With neither set, the tools are still listed and `stack_usage` explains what to do; an agent that is developing or evaluating on behalf of its operator may register a restricted free-tier agent project through `stack_register_agent_project` (the claim link is shown once and never stored).
|
|
50
|
+
|
|
51
|
+
Optional variables passed through to the server: `FOLDBUN_BASE_URL`, `FOLDBUN_OUTPUT_DIR`, `FOLDBUN_STATE_DIR`, `FOLDBUN_TIMEOUT_MS`, `FOLDBUN_SOURCE_PROJECT`, and `HTTPS_PROXY` / `HTTP_PROXY` / `NO_PROXY`. DSH removes its own `DSH_*` variables from MCP servers, which is why the bundle forwards credentials explicitly through the server's `env`.
|
|
52
|
+
|
|
53
|
+
Result files are written to `.foldbun-stack/` in the directory DSH was started in; add it to your `.gitignore`.
|
|
54
|
+
|
|
55
|
+
## Notes
|
|
56
|
+
|
|
57
|
+
- Access to `api.stack.foldbun.com` from mainland China is not guaranteed; set `HTTPS_PROXY` or `FOLDBUN_BASE_URL` if needed.
|
|
58
|
+
- Images are uploaded to Foldbun Stack servers, are not used for training and are deleted within 7 days. See the [privacy policy](https://foldbun.com/privacy/).
|
|
59
|
+
- DSH is moving quickly between release candidates. This bundle was checked against `@deepseek-ai/dsh` 0.2.2-rc.5.
|
|
60
|
+
- Each release pins `@foldbun/stack-mcp` to an exact version.
|
|
61
|
+
|
|
62
|
+
## License
|
|
63
|
+
|
|
64
|
+
MIT
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Mounts the Foldbun Stack MCP server (@foldbun/stack-mcp) in DSH.
|
|
2
|
+
#
|
|
3
|
+
# DSH scrubs its own DSH_* variables from the server process, so credentials are passed through
|
|
4
|
+
# the row's `env` from the environment DSH was started in. Values must be strings, so a variable that
|
|
5
|
+
# is not set becomes an empty string, which the server treats as unset.
|
|
6
|
+
# The server runs with `node` and a resolved path because a bare bin name is not on PATH there.
|
|
7
|
+
- insert:
|
|
8
|
+
- id: foldbun-stack
|
|
9
|
+
name: '@deepseek-ai/dsh-mcp-client'
|
|
10
|
+
config:
|
|
11
|
+
serverName: foldbun-stack
|
|
12
|
+
transport: stdio
|
|
13
|
+
command: node
|
|
14
|
+
args:
|
|
15
|
+
- !!js process.getBuiltinModule('module').createRequire(ctx.baseUrl).resolve('@foldbun/dsh-stack/launch.mjs')
|
|
16
|
+
env:
|
|
17
|
+
FOLDBUN_API_KEY: !!js process.env.FOLDBUN_API_KEY || ''
|
|
18
|
+
FOLDBUN_PROJECT_ID: !!js process.env.FOLDBUN_PROJECT_ID || ''
|
|
19
|
+
FOLDBUN_SOURCE_PROJECT: !!js process.env.FOLDBUN_SOURCE_PROJECT || ''
|
|
20
|
+
FOLDBUN_BASE_URL: !!js process.env.FOLDBUN_BASE_URL || ''
|
|
21
|
+
FOLDBUN_OUTPUT_DIR: !!js process.env.FOLDBUN_OUTPUT_DIR || ''
|
|
22
|
+
FOLDBUN_STATE_DIR: !!js process.env.FOLDBUN_STATE_DIR || ''
|
|
23
|
+
FOLDBUN_TIMEOUT_MS: !!js process.env.FOLDBUN_TIMEOUT_MS || ''
|
|
24
|
+
HTTPS_PROXY: !!js process.env.HTTPS_PROXY || process.env.https_proxy || ''
|
|
25
|
+
HTTP_PROXY: !!js process.env.HTTP_PROXY || process.env.http_proxy || ''
|
|
26
|
+
NO_PROXY: !!js process.env.NO_PROXY || process.env.no_proxy || ''
|
package/launch.mjs
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Entry point for the MCP stdio server that this bundle mounts into DSH.
|
|
2
|
+
// DSH starts this server twice at startup (a probe, then the serving process), so nothing here
|
|
3
|
+
// may have side effects: the server itself neither contacts the network nor writes files until
|
|
4
|
+
// a tool is called.
|
|
5
|
+
import { main } from '@foldbun/stack-mcp/server'
|
|
6
|
+
|
|
7
|
+
main().catch((err) => {
|
|
8
|
+
process.stderr.write(`foldbun-stack-mcp: ${err?.message ?? err}\n`)
|
|
9
|
+
process.exit(1)
|
|
10
|
+
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foldbun/dsh-stack",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "DeepSeek Harness bundle that adds Foldbun Stack image tools (OCR, segmentation, background removal) through the Foldbun Stack MCP server.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"files": [
|
|
8
|
+
"cordis.patch.yml",
|
|
9
|
+
"launch.mjs",
|
|
10
|
+
"README.md",
|
|
11
|
+
"CHANGELOG.md",
|
|
12
|
+
"LICENSE"
|
|
13
|
+
],
|
|
14
|
+
"engines": {
|
|
15
|
+
"dsh": ">=0.2.2-rc.1 <0.3.0-0",
|
|
16
|
+
"node": ">=24.9.0"
|
|
17
|
+
},
|
|
18
|
+
"dsh": {
|
|
19
|
+
"bundle": {
|
|
20
|
+
"patch": "./cordis.patch.yml"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@foldbun/stack-mcp": "0.1.0"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"dsh",
|
|
28
|
+
"deepseek-harness",
|
|
29
|
+
"mcp",
|
|
30
|
+
"ocr",
|
|
31
|
+
"segmentation",
|
|
32
|
+
"background-removal",
|
|
33
|
+
"foldbun-stack"
|
|
34
|
+
],
|
|
35
|
+
"homepage": "https://stack.foldbun.com/",
|
|
36
|
+
"author": "Foldbun Technologies Limited",
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
}
|
|
40
|
+
}
|