sharp 0.35.5 local Node SDK; fixed-source resize and PNG/JPEG export declarations. Proposed white-contain recipe, never executed.
调用方式 / profile:sharp-0355-local-sdk · 组件版本:0.35.5@51a990faa26ade5586a4934ac9673c98d8893326 · 引用此版本与调用方式
已记录条件
- operation = image_delivery:支持。Supported within this profile and component version. 依据:sharp-0355-resize, sharp-0355-output, sharp-0355-pipeline
- invocation_mode = sdk:支持。Supported within this profile and component version. 依据:sharp-0355-package
- execution_location = local:支持。Supported within this profile and component version. 依据:sharp-0355-package
- output_format = png:支持。Supported within this profile and component version. 依据:sharp-0355-output, sharp-0355-pipeline
- output_format = jpeg:支持。Supported within this profile and component version. 依据:sharp-0355-output, sharp-0355-pipeline
- input_format = image:未知(可能存在冲突或待复核)。The selected code review does not establish accepted input decoders or usable native dependencies. 依据:
- runtime_os = windows:未知(可能存在冲突或待复核)。No Windows installation, native load or image task was executed. 依据:
- runtime_os = linux:未知(可能存在冲突或待复核)。No target-environment image task was executed. 依据:
- runtime_os = macos:未知(可能存在冲突或待复核)。No target-environment image task was executed. 依据:
- cpu_only = true:未知(可能存在冲突或待复核)。CPU/GPU dependency and actual environment requirements were not checked. 依据:
- gpu_required = false:未知(可能存在冲突或待复核)。No complete dependency or environment audit. 依据:
- runtime_network_required = false:未知(可能存在冲突或待复核)。Local SDK architecture is not a zero-egress privacy audit. 依据:
- setup_network_required = false:未知(可能存在冲突或待复核)。Setup and dependency acquisition were not tested. 依据:
- setup_required = false:未知(可能存在冲突或待复核)。Caller must first establish an authorized usable installation; its current presence is unknown. 依据:
- auth_required = false:未知(可能存在冲突或待复核)。No complete application/dependency authorization audit. 依据:
- account_required = false:未知(可能存在冲突或待复核)。No complete application/account requirements audit. 依据:
入口与前提
- 协议
- Node.js SDK
- 认证
- unknown; existing authorized caller environment required
- 价格是否查明
- unknown
- 配额是否查明
- unknown
sharp
- Node >=20.9.0 declared
- Authorized sharp 0.35.5 installation and usable native dependencies required; not tested
配方 sharp-0355-contain-white-png · 修订 1
所需调用能力:
- sdk_runtime
- image_delivery
运行前提:
- Existing user-authorized sharp0.35.5 installation with usable native dependencies; this review did not install it.
- Node>=20.9.0 is a package declaration, not a tested environment.
- Caller supplies authorized inputBuffer and finite targetWidth/targetHeight.
- For hard privacy, alpha/color/metadata fidelity, or exact no-enlargement requirements, current unknown conditions must be resolved before treating the recipe as suitable.
- PROPOSED; not_run. This card describes source declarations, not provider availability or task success.
使用步骤:
- Use only an already authorized sharp 0.35.5 installation with working native dependencies; do not install or execute from this recipe automatically.
- const { data, info } = await sharp(inputBuffer).resize({ width: targetWidth, height: targetHeight, fit: 'contain', position: 'centre', background: { r: 255, g: 255, b: 255, alpha: 1 }, withoutEnlargement: true }).png().toBuffer({ resolveWithObject: true });
- Caller must explicitly persist the returned data buffer to a caller-owned output artifact before file retrieval; this proposed caller step was not executed and no output file exists from this review.
- Independently check the actual output and return unknown/failure if any hard requirement remains unproven.
- 输入约定
- Caller-authorized inputBuffer and positive finite targetWidth/targetHeight. Decoder, input byte/pixel limit and metadata policy require caller-specific validation; no private input was used here.
- 输出约定
- Proposed PNG buffer plus info. contain with explicit opaque white RGBA and withoutEnlargement:true. No guaranteed dimensions, byte bound, PNG alpha/color/ICC/EXIF/rotation fidelity or privacy guarantee. JPEG alpha preservation is unsupported in the reviewed JPEG branches. Structured file retrieval requires the caller to persist the returned buffer to its own artifact; it is not an automatic toFile result.
- 成功检查
- Independently decode data and check actual PNG type, width/height and task-selected fit against the input. Inspect actual padding, content scaling/cropping, alpha/color/rotation requirements for the same input and environment. Bind output bytes/SHA to that actual task. A200 response or code snippet is not task success.
- 失败与回退
- Return unmet conditions as unknown; use existing same-hard-condition alternatives rather than installing, uploading or executing automatically.
适用证据
sharp-0355-package · 来源文档声明
- 原文定位
- JSON $.name, $.version, $.engines, $.exports; npm gitHead chain
- 来源版本
- 0.35.5@51a990faa26ade5586a4934ac9673c98d8893326
- 内容摘要
- ad4a2535d72eb638053a38867b1abf43c328cd1c1dbae5cf4172d498365a8b97
- 采集时间
- 2026-11-02T06:19:43.0611260+00:00
Fixed package declares sharp 0.35.5, Node >=20.9.0 and local module entry dist/index.cjs/dist/index.mjs. This is a local SDK declaration, not proof that installation, native loading or any image task works.
覆盖条件:invocation_mode=sdk; execution_location=local
sharp-0355-resize · 静态源码检查
- 原文定位
- lib/resize.mjs L85-103, L121-128, L248-338
- 来源版本
- 0.35.5@51a990faa26ade5586a4934ac9673c98d8893326
- 内容摘要
- e3d26f31cf391e28f3f96e708ccb96745cf016e18f8ef4486c837e5efcb3c922
- 采集时间
- 2026-11-02T06:31:20.6129155+00:00
Fixed source maps contain/cover/fill/inside/outside, validates width/height, exposes background/position and withoutEnlargement. Default contain background is black/opaque; proposed white padding explicitly sets RGBA. Only the last resize in a pipeline applies. Exact output dimensions and runtime geometry have not been tested.
覆盖条件:operation=image_delivery
sharp-0355-output · 静态源码检查
- 原文定位
- lib/output.mjs L73-94, L149-171, L612-672, L718-770
- 来源版本
- 0.35.5@51a990faa26ade5586a4934ac9673c98d8893326
- 内容摘要
- d1be82aace2d7f96bfc29e6e76538521fc8dfe6d4e90f7eda71a8f4c2a1597ba
- 采集时间
- 2026-11-02T06:31:20.8353768+00:00
Fixed source exposes toFile/toBuffer with resolveWithObject, and png/jpeg encoder selection. Declared APIs do not establish decoder availability, usable native codecs, output pixels or alpha/color fidelity.
覆盖条件:operation=image_delivery; output_format=png; output_format=jpeg
sharp-0355-pipeline · 静态源码检查
- 原文定位
- src/pipeline.cc L202-204, L353-355, L510-550, L976-1048, L1238-1245
- 来源版本
- 0.35.5@51a990faa26ade5586a4934ac9673c98d8893326
- 内容摘要
- 445ed9aa726806dc01188cf13a2866ee47ccd38504cddd049e4e639703edc0e9
- 采集时间
- 2026-11-02T06:31:21.0649411+00:00
Native resize/embed and PNG/JPEG save paths are present. JPEG output marks alpha false. ResolveShrink implementation was not examined. Without-enlargement does not promise exact requested canvas for every fit/input. No native execution or resulting file has been checked.
覆盖条件:operation=image_delivery; output_format=png; output_format=jpeg
结构化配方与步骤连接
未知,仍缺条件。只核对公开声明;本站未执行此任务,不据接口兼容推断任务成功。
- 配方固定引用
- cap-3e147bbc918c224354d77f0c@2/sharp-0355-local-sdk/sharp-0355-contain-white-png@1
- 整链声明费用上限(货币最小单位)
- 未知
步骤 resize-and-export
固定名片与调用方式 · 0.35.5@51a990faa26ade5586a4934ac9673c98d8893326 · sharp-0355-contain-white-png 修订 1
- 调用方式 / 方法
- sdk / 未知或不适用
- 公开入口
- sharp
- 调用方工具
- sdk_runtime
- 需要安装
- 未知
- 认证
- 未知
- 可用地区
- 未知
- 执行位置 / 接收方
- local / 未知
- 上传 / 留存
- 未知 / 未知
- 声明费用
- 未知
- 输入格式 / 语义 / 大小
- 未知 / caller-authorized encoded image buffer; decoder and resource limits unknown / 未知 bytes
- 输出格式 / 语义 / 大小
- png / proposed contain with explicit white background; actual pixels and exact canvas untested / 未知 bytes
- 输出取回
- file / client_owned_output
- 成功检查(尚未执行)
- output_schema=Independently decode actual PNG bytes; check actual media type, width/height and task-selected geometry, padding and scaling against the authorized input.; output_contains=Bind actual output bytes/SHA to the task; validate alpha, color, metadata and rotation if required. No image was produced or checked during source review.; human_confirmation=Confirm authorized existing installation and input, finite byte/pixel budgets, privacy/retention/cost constraints. Unknown hard conditions prevent task acceptance.
- 失败备选(尚未采用)
- return_unknown:unverified_runtime_or_hard_conditions
- 同版本证据
- sharp-0355-package, sharp-0355-resize, sharp-0355-output, sharp-0355-pipeline
仍缺条件或存在冲突(没有入队)
- steps.resize-and-export.invocation.installation:installation_unknown · 未知,仍缺条件
- steps.resize-and-export.input:io_contract_unknown · 未知,仍缺条件
- steps.resize-and-export.output:io_contract_unknown · 未知,仍缺条件
- steps.resize-and-export.invocation.authentication:authorization_unknown · 未知,仍缺条件
- steps.resize-and-export.invocation.regions:region_unknown · 未知,仍缺条件
- steps.resize-and-export.invocation.recipient:recipient_unknown · 未知,仍缺条件
- steps.resize-and-export.invocation.upload_required:upload_unknown · 未知,仍缺条件
- steps.resize-and-export.invocation.retains_data:retention_unknown · 未知,仍缺条件
- steps.resize-and-export.invocation.cost:cost_unknown · 未知,仍缺条件
- steps.resize-and-export.policy.maximum_cost_minor:cost_limit_unknown · 未知,仍缺条件
完整结构、字段、单位、编码、版本、场景策略与备选引用
{
"contract": {
"anchor": {
"card_id": "cap-3e147bbc918c224354d77f0c",
"card_version": 2,
"profile_id": "sharp-0355-local-sdk",
"component_version": "0.35.5@51a990faa26ade5586a4934ac9673c98d8893326",
"recipe_id": "sharp-0355-contain-white-png",
"recipe_revision": 1
},
"steps": [
{
"step_id": "resize-and-export",
"reference": {
"card_id": "cap-3e147bbc918c224354d77f0c",
"card_version": 2,
"profile_id": "sharp-0355-local-sdk",
"component_version": "0.35.5@51a990faa26ade5586a4934ac9673c98d8893326",
"recipe_id": "sharp-0355-contain-white-png",
"recipe_revision": 1
},
"invocation": {
"mode": "sdk",
"entry": "sharp",
"method": null,
"caller_tools": [
"sdk_runtime"
],
"installation_required": null,
"authentication": null,
"regions": null,
"execution_location": "local",
"recipient": null,
"upload_required": null,
"retains_data": null,
"accepts_private_data": null,
"cost": {
"maximum_minor": null,
"currency": null,
"basis": null
}
},
"input": {
"format": null,
"schema_id": null,
"semantics": "caller-authorized encoded image buffer; decoder and resource limits unknown",
"version": null,
"encoding": "binary",
"maximum_bytes": null,
"fields_complete": false,
"allow_additional_fields": null,
"fields": []
},
"output": {
"format": "png",
"schema_id": null,
"semantics": "proposed contain with explicit white background; actual pixels and exact canvas untested",
"version": null,
"encoding": "binary",
"maximum_bytes": null,
"fields_complete": false,
"allow_additional_fields": null,
"fields": [],
"image": {
"width": null,
"height": null,
"fit": "contain",
"crop_anchor": null,
"padding_color": "#FFFFFFFF",
"allow_upscale": null,
"transparency": null,
"color_space": null,
"orientation": null
}
},
"retrieval": {
"mode": "file",
"locator": "client_owned_output"
},
"success_checks": [
{
"kind": "output_schema",
"expected": "Independently decode actual PNG bytes; check actual media type, width/height and task-selected geometry, padding and scaling against the authorized input."
},
{
"kind": "output_contains",
"expected": "Bind actual output bytes/SHA to the task; validate alpha, color, metadata and rotation if required. No image was produced or checked during source review."
},
{
"kind": "human_confirmation",
"expected": "Confirm authorized existing installation and input, finite byte/pixel budgets, privacy/retention/cost constraints. Unknown hard conditions prevent task acceptance."
}
],
"alternatives": [
{
"mode": "return_unknown",
"reason_code": "unverified_runtime_or_hard_conditions",
"reference": null
}
],
"evidence_refs": [
"sharp-0355-package",
"sharp-0355-resize",
"sharp-0355-output",
"sharp-0355-pipeline"
]
}
],
"links": [],
"policy": {
"data_class": "public",
"local_only": true,
"allow_upload": false,
"allow_retention": false,
"allowed_recipients": [
"self"
],
"region": null,
"available_tools": [
"sdk_runtime"
],
"authorization_kinds": [],
"allow_installation": false,
"maximum_cost_minor": null,
"currency": null
}
},
"assessment": {
"state": "unknown",
"execution_state": "not_executed_by_validator",
"declared_maximum_cost_minor": null,
"currency": null,
"links": [],
"gaps": [
{
"gap_id": "recipe-gap-f413aa630d6ba242b90f9443",
"code": "installation_unknown",
"state": "unknown",
"reference": {
"card_id": "cap-3e147bbc918c224354d77f0c",
"card_version": 2,
"profile_id": "sharp-0355-local-sdk",
"component_version": "0.35.5@51a990faa26ade5586a4934ac9673c98d8893326",
"recipe_id": "sharp-0355-contain-white-png",
"recipe_revision": 1
},
"path": "steps.resize-and-export.invocation.installation"
},
{
"gap_id": "recipe-gap-00d5c4e76e6f4d06864d91a7",
"code": "io_contract_unknown",
"state": "unknown",
"reference": {
"card_id": "cap-3e147bbc918c224354d77f0c",
"card_version": 2,
"profile_id": "sharp-0355-local-sdk",
"component_version": "0.35.5@51a990faa26ade5586a4934ac9673c98d8893326",
"recipe_id": "sharp-0355-contain-white-png",
"recipe_revision": 1
},
"path": "steps.resize-and-export.input"
},
{
"gap_id": "recipe-gap-59585a0ecf5f1bc0667f3954",
"code": "io_contract_unknown",
"state": "unknown",
"reference": {
"card_id": "cap-3e147bbc918c224354d77f0c",
"card_version": 2,
"profile_id": "sharp-0355-local-sdk",
"component_version": "0.35.5@51a990faa26ade5586a4934ac9673c98d8893326",
"recipe_id": "sharp-0355-contain-white-png",
"recipe_revision": 1
},
"path": "steps.resize-and-export.output"
},
{
"gap_id": "recipe-gap-6616f82f33f90de9be905dbc",
"code": "authorization_unknown",
"state": "unknown",
"reference": {
"card_id": "cap-3e147bbc918c224354d77f0c",
"card_version": 2,
"profile_id": "sharp-0355-local-sdk",
"component_version": "0.35.5@51a990faa26ade5586a4934ac9673c98d8893326",
"recipe_id": "sharp-0355-contain-white-png",
"recipe_revision": 1
},
"path": "steps.resize-and-export.invocation.authentication"
},
{
"gap_id": "recipe-gap-40b8df4e49c580581852f09e",
"code": "region_unknown",
"state": "unknown",
"reference": {
"card_id": "cap-3e147bbc918c224354d77f0c",
"card_version": 2,
"profile_id": "sharp-0355-local-sdk",
"component_version": "0.35.5@51a990faa26ade5586a4934ac9673c98d8893326",
"recipe_id": "sharp-0355-contain-white-png",
"recipe_revision": 1
},
"path": "steps.resize-and-export.invocation.regions"
},
{
"gap_id": "recipe-gap-8d3dda7c864b9a8be749e0ec",
"code": "recipient_unknown",
"state": "unknown",
"reference": {
"card_id": "cap-3e147bbc918c224354d77f0c",
"card_version": 2,
"profile_id": "sharp-0355-local-sdk",
"component_version": "0.35.5@51a990faa26ade5586a4934ac9673c98d8893326",
"recipe_id": "sharp-0355-contain-white-png",
"recipe_revision": 1
},
"path": "steps.resize-and-export.invocation.recipient"
},
{
"gap_id": "recipe-gap-10025b3d5fa85e5c991cb1f3",
"code": "upload_unknown",
"state": "unknown",
"reference": {
"card_id": "cap-3e147bbc918c224354d77f0c",
"card_version": 2,
"profile_id": "sharp-0355-local-sdk",
"component_version": "0.35.5@51a990faa26ade5586a4934ac9673c98d8893326",
"recipe_id": "sharp-0355-contain-white-png",
"recipe_revision": 1
},
"path": "steps.resize-and-export.invocation.upload_required"
},
{
"gap_id": "recipe-gap-c24c4224d95403e0989e3cf6",
"code": "retention_unknown",
"state": "unknown",
"reference": {
"card_id": "cap-3e147bbc918c224354d77f0c",
"card_version": 2,
"profile_id": "sharp-0355-local-sdk",
"component_version": "0.35.5@51a990faa26ade5586a4934ac9673c98d8893326",
"recipe_id": "sharp-0355-contain-white-png",
"recipe_revision": 1
},
"path": "steps.resize-and-export.invocation.retains_data"
},
{
"gap_id": "recipe-gap-2ede05812cb59925dab046df",
"code": "cost_unknown",
"state": "unknown",
"reference": {
"card_id": "cap-3e147bbc918c224354d77f0c",
"card_version": 2,
"profile_id": "sharp-0355-local-sdk",
"component_version": "0.35.5@51a990faa26ade5586a4934ac9673c98d8893326",
"recipe_id": "sharp-0355-contain-white-png",
"recipe_revision": 1
},
"path": "steps.resize-and-export.invocation.cost"
},
{
"gap_id": "recipe-gap-9d93a05538eae5c5159d4a99",
"code": "cost_limit_unknown",
"state": "unknown",
"reference": {
"card_id": "cap-3e147bbc918c224354d77f0c",
"card_version": 2,
"profile_id": "sharp-0355-local-sdk",
"component_version": "0.35.5@51a990faa26ade5586a4934ac9673c98d8893326",
"recipe_id": "sharp-0355-contain-white-png",
"recipe_revision": 1
},
"path": "steps.resize-and-export.policy.maximum_cost_minor"
}
]
}
}