d4551/cloudflare-dsh--packages-core0

@d4551/dsh-cloudflare-core

Cloudflare capability seam for DeepSeek Harness: the ctx.cloudflare service.

包名
@d4551/dsh-cloudflare-core
版本
0.1.0
许可证
MIT
最近更新
2026年9月12日

安装

此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗

Configuration

Every deployment-varying value is a validated Schemastery field, changeable from cordis.yml without a code edit. There are no tunables hidden as constants.

[!WARNING] A patch layer replaces a row's entire config value rather than merging into it. That is why each row's configuration is small and local: overriding one key never forces you to restate the rest.

cloudflare — the seam (@d4551/dsh-cloudflare-core)

FieldDefaultMeaning
apiTokenRefCLOUDFLARE_API_TOKENCredential reference — a POSIX env-var name, never a value
accountId''Account to operate on; discovered at first use when empty
baseUrlhttps://api.cloudflare.com/client/v4REST root; overridable for API-compatible proxies
requestTimeoutMs30000Deadline for one attempt, aborting the request. A retry gets a fresh budget, so this caps an attempt rather than the whole retried operation; a tool with a longer budget of its own passes it per request
maxRetries3Retry budget for transient failures
retryBaseDelayMs250First backoff step
retryMaxDelayMs10000Backoff ceiling, and the cap applied to a server Retry-After
maxPages100Hard ceiling on pages walked by one list call

cloudflare-llm — the model provider (cloudflare-dsh/ai)

FieldDefaultMeaning
gatewayId''Gateway to route through; required for the gateway route
gatewayProviderworkers-aiProvider slug the gateway forwards to
chatCompletionsPath/chat/completionsPath appended to the resolved base URL
workersAiPath/ai/v1/chat/completionsOpenAI-compatible Workers AI path, relative to the account scope
cacheTtlSeconds0cf-aig-cache-ttl
skipCachefalsecf-aig-skip-cache
collectLogtruecf-aig-collect-log — required for session cost attribution
tags{}Static tags merged into cf-aig-metadata
customCostPerTokenIn0Per-token input cost override recorded by the gateway; zero sends none
customCostPerTokenOut0Per-token output cost override, paired with the input one
gatewayRequestTimeoutMs0Gateway-side request timeout; zero leaves the gateway's own default
streamIdleTimeoutMs300000How long a stream may go quiet before failing as a timeout
models[]Advertised models; empty means query the catalogue

cloudflare-tools-ai (cloudflare-dsh/tools/ai)

FieldDefaultMeaning
pageSize50Default page size for the model catalogue and gateway listings
searchMaxResults10Default number of chunks cloudflare_aisearch_search returns
vectorTopK5Default number of matches cloudflare_vectorize_query returns
inferenceTimeoutMs120000Budget for tools that wait on model inference: the tool's own, and its request deadline

cloudflare-tools-data (cloudflare-dsh/tools/data)

FieldDefaultMeaning
pageSize50Default page size for namespace, database and bucket listings
keyListLimit1000Default number of keys cloudflare_kv_list_keys returns per page
renderLimit4000Characters of a KV value shown to the model before truncation
queueBatchSize10Default number of messages cloudflare_queue_pull takes
queueVisibilityTimeoutMs30000Default time pulled messages stay invisible to other consumers

cloudflare-tools-web (cloudflare-dsh/tools/web)

FieldDefaultMeaning
renderLimit8000Characters of a rendered page or accessibility tree shown before truncation
renderTimeoutMs120000Budget for a real browser render: the tool's own, and its request deadline
screenshotTypepngImage encoding of a screenshot when the call does not choose one
screenshotFullPagefalseWhether a screenshot captures the whole page when the call does not say

cloudflare-tools-meta — the escape hatch (cloudflare-dsh/tools/meta)

FieldDefaultMeaning
allowMutationsfalseWhen false, cloudflare_api rejects anything but GET/HEAD
denyPathPrefixes[]Path prefixes cloudflare_api refuses outright

The shipped patch layer

- insert:
    - id: cloudflare
      name: '@d4551/dsh-cloudflare-core'
      config:
        apiTokenRef: CLOUDFLARE_API_TOKEN
    - id: cloudflare-tools-ai
      name: 'cloudflare-dsh/tools/ai'
    - id: cloudflare-tools-data
      name: 'cloudflare-dsh/tools/data'
    - id: cloudflare-tools-web
      name: 'cloudflare-dsh/tools/web'
    - id: cloudflare-llm
      name: 'cloudflare-dsh/ai'
    - id: cloudflare-tools-meta
      name: 'cloudflare-dsh/tools/meta'
      config:
        allowMutations: false
        denyPathPrefixes: []