feat(vision): add the opt-in image-recognition bundle

Mounts the capability seam, the configurable HTTP provider, and the
model-facing recognition consumer. Not in any default profile's bundles
list — a user opts in per profile.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Pine
2026-08-14 10:58:29 +08:00
parent 457304e619
commit 5e962b8a8d
5 changed files with 143 additions and 0 deletions
@@ -0,0 +1,25 @@
# The dsh-image-recognition-bundle patch: an opt-in image-recognition surface
# over dsh-base. It is NOT part of any default profile's bundles list — a user
# opts in by adding this package to the profile's dsh.profile.bundles (or via
# `dsh plugin --profile <name> add @deepseek-ai/dsh-image-recognition-bundle`).
#
# The seam row pins the http provider; the provider row carries the credential
# reference the provider resolves per recognition; the consumer row toggles the
# deterministic image-task injection.
- insert:
- id: image-recognition
name: '@deepseek-ai/dsh-image-recognition'
config:
provider: http
- id: image-recognition-http
name: '@deepseek-ai/dsh-image-recognition-http'
config:
apiKeyEnv: DEEPSEEK_API_KEY
- id: tool-image-recognition
name: '@deepseek-ai/dsh-tool-image-recognition'
config:
detectImageBlocks: true
detectImagePaths: true
@@ -0,0 +1,60 @@
{
"name": "@deepseek-ai/dsh-image-recognition-bundle",
"description": "Opt-in image-recognition bundle for the DeepSeek Harness: mounts the image-recognition capability seam, a configurable HTTP vision provider, and the model-facing recognition tool + skill with deterministic image-task injection",
"version": "0.1.0-rc.5",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
"directory": "packages/bundle/image-recognition"
},
"type": "module",
"main": "lib/index.js",
"types": "lib/types/index.d.ts",
"exports": {
".": {
"types": "./lib/types/index.d.ts",
"default": "./lib/index.js"
},
"./invariant": {
"types": "./lib/types/invariant.d.ts",
"default": "./lib/invariant.js"
},
"./cordis.patch.yml": "./cordis.patch.yml",
"./src/*": "./src/*",
"./package.json": "./package.json"
},
"files": [
"lib/index.js",
"lib/invariant.js",
"cordis.patch.yml",
"lib/types/**/*.d.ts"
],
"license": "MIT",
"dsh": {
"bundle": {
"patch": "./cordis.patch.yml"
}
},
"dependencies": {
"@deepseek-ai/dsh-image-recognition": "workspace:^",
"@deepseek-ai/dsh-image-recognition-http": "workspace:^",
"@deepseek-ai/dsh-tool-image-recognition": "workspace:^",
"@deepseek-ai/schemastery": "workspace:^"
},
"peerDependencies": {
"@deepseek-ai/dsh-agent": "workspace:^",
"@deepseek-ai/dsh-invariants": "workspace:^",
"@deepseek-ai/cordis": "workspace:^"
},
"devDependencies": {
"@deepseek-ai/dsh-agent": "workspace:^",
"@deepseek-ai/dsh-image-recognition": "workspace:^",
"@deepseek-ai/dsh-image-recognition-http": "workspace:^",
"@deepseek-ai/dsh-invariants": "workspace:^",
"@deepseek-ai/dsh-tool-image-recognition": "workspace:^",
"@deepseek-ai/cordis": "workspace:^"
}
}
@@ -0,0 +1,10 @@
/**
* @deepseek-ai/dsh-image-recognition-bundle — opt-in image-recognition surface.
* The bundle patch mounts the image-recognition capability seam, a configurable
* HTTP vision provider, and the model-facing recognition tool + skill with
* deterministic image-task injection. Not in any default profile's bundles
* list; a user opts in per profile.
* @module @deepseek-ai/dsh-image-recognition-bundle
*/
export {}
@@ -0,0 +1,30 @@
/**
* Package-owned invariant companion for `@deepseek-ai/dsh-image-recognition-bundle`.
* @module @deepseek-ai/dsh-image-recognition-bundle/invariant
*/
/* jscpd:ignore-start */
import type { Context } from '@deepseek-ai/cordis'
import type { InvariantInstaller } from '@deepseek-ai/dsh-invariants'
const PACKAGE_NAME = '@deepseek-ai/dsh-image-recognition-bundle'
/** Cordis companion plugin name. */
export const name = 'image-recognition-bundle-invariant'
/** Service required before the companion can reserve package ownership. */
export const inject = ['invariants']
/**
* No runtime invariant: this bundle mounts a patch and owns no runtime state;
* the mounted capability's providers and consumer assert their own relations.
*/
const install: InvariantInstaller = () => {}
/**
* Register this package's invariant companion.
* @param ctx - Cordis context carrying the invariant service.
* @returns the installed registration's disposer after setup succeeds.
*/
export const apply = (ctx: Context): Promise<() => void> =>
Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install))
/* jscpd:ignore-end */
@@ -0,0 +1,18 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib/types"
},
"include": [
"src"
],
"references": [
{
"path": "../../../vendor/cordis"
},
{
"path": "../../runtime-diagnostics/invariants"
}
]
}